search for: opus_decoder_create

Displaying 16 results from an estimated 16 matches for "opus_decoder_create".

2017 Jun 05
3
Trying to use Opus in an STM32F429IIT6 embedded project
...but still having no success. The code I wrote is: int size; int error; OpusDecoder* dec; size = opus_decoder_get_size(1); dec = (OpusDecoder *) malloc(size); error = opus_decoder_init(dec, 8000, 1); I also tried this code: int error; OpusDecoder *dec; dec = opus_decoder_create(8000, 1, &error); In this particular case, I got an error and the firmware crashes. Once I'm totally new to embedded systems, I'd like to ask some help from you. Can anyone shed some light on it? Thx a lot. Regards, Ulisses -------------- next part -------------- An HTML attachment...
2015 Apr 02
2
Question on opus_decoder output sampling rate
Hi, is there any way to tell the decoder the output sampling Fz we want ? opus_decoder_create = Sampling rate of input signal (Hz) Considering this example (VoIP-out from WebRTC/RTP) MICROPHONE(44.1/48kHz) >> [encoder created at 48kHz but with internalSampleRate set to 8kHz]>> INTERNET >> [decoder(created with 48kHz)] >> 48kHz(?) >> G.711(8kHz) This leaves u...
2016 Mar 15
3
Question on opus_decoder output sampling rate
...gt; resampling. Have a look at the speexdsp resampler if you don't already > have one. > > Cheers, > > Jean-Marc > > On 02/04/15 10:42 AM, Julien Chavanton wrote: > > Hi, is there any way to tell the decoder the output sampling Fz we want ? > > > > opus_decoder_create = Sampling rate of input signal (Hz) > > > > Considering this example (VoIP-out from WebRTC/RTP) > > > > MICROPHONE(44.1/48kHz) >> [encoder created at 48kHz but with > > internalSampleRate set to 8kHz]>> INTERNET >> [decoder(created with > > 48k...
2016 May 04
1
opus_encode
...vert pcm (16bit pcm) stereo file to mono pcm file using opus_encode and opus_decode, i am able do this but i have doubt about TOC byte after opus encode. below is how encoder and decoder structures are used to do encode and decode file opus_encoder_create(8000, 2, OPUS_APPLICATION_AUDIO, &err); opus_decoder_create(8000, 1, &err); after opus encode bits looks like this 00 00 00 12 31 69 52 10 08 doubts are 1)i know 12(hexa) is size of encoded frame and 08 is TOC byte, here i have doubt i am using stereo input and 20ms frame then TOC should be 0C, and 2)also about the 4 bytes after 12 -- Thanks & R...
2016 Jun 17
2
Opus Raw Pakcets
Hi, I have application, where I am reciving the RTP packets, which has OPUS payload. >From the RTP packets I got following information: (12 byes Header) tells about the version, payload time, time stamp, srsc, etc. The rest of the packet is OPUS payload (raw format), The TOC byte from OPUS payload tells its 20ms frame, even the time stamp different of 960 means 20 msec frame. Questions: 1)
2012 Oct 25
2
WAVE PCM to OPUS and back
...rm.nBlockAlign; #define BUFSIZE 512 ... case MM_WIM_DATA: { WAVEHDR *Hdr = (WAVEHDR *) msg.lParam; int opusRes; m_opusEncoder = opus_encoder_create(48000, 2, OPUS_APPLICATION_AUDIO, &opusRes); m_opusDecoder = opus_decoder_create(48000, 2, &opusRes); unsigned char data[BUFSIZE]; opus_int32 dataLength = opus_encode(m_opusEncoder, (short*)Hdr->lpData, 80, data, BUFSIZE); dataLength = opus_decode(m_opusDecoder, (unsigned char*)data, dataLength, (short*)WaveHdrOut...
2012 Nov 13
1
Integer overflow in opus_packet_parse_impl
...nclude <string.h> #include "opus.h" unsigned char in_buf[16909318]; unsigned short out_buf[11520]; int main() { OpusDecoder *decoder; int result; int error; in_buf[0] = 0xff; in_buf[1] = 0x41; memset(in_buf + 2, 0xff, 16909315); in_buf[16909317] = 0x0b; decoder = opus_decoder_create(48000, 2, &error); result = opus_decode(decoder, in_buf, 16909318, out_buf, 5760, 0); } Here is the patch I'm suggesting: --- opus_decoder_old.c 2012-11-12 23:35:03.289595241 -0800 +++ opus_decoder.c 2012-11-12 23:36:44.550437586 -0800 @@ -34,6 +34,7 @@ #endif #include <stdarg.h&...
2016 Jan 27
1
opus-tools: fix PIE configure test
...-pie -Wl,-z,relro -Wl,-z,now" LIBS="$LIBS $OPUS_LIBS" AC_MSG_CHECKING([for PIE support]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <opus/opus.h>]], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <opus.h>]], [[OpusDecoder *dec = opus_decoder_create(48000, 2, 0L)]])], [ AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) -- Christian "naddy" Weisgerber naddy at mips.inka.de
2015 Apr 02
0
Question on opus_decoder output sampling rate
...tes other than 8/12/16/24/48, then you'll have to do resampling. Have a look at the speexdsp resampler if you don't already have one. Cheers, Jean-Marc On 02/04/15 10:42 AM, Julien Chavanton wrote: > Hi, is there any way to tell the decoder the output sampling Fz we want ? > > opus_decoder_create = Sampling rate of input signal (Hz) > > Considering this example (VoIP-out from WebRTC/RTP) > > MICROPHONE(44.1/48kHz) >> [encoder created at 48kHz but with > internalSampleRate set to 8kHz]>> INTERNET >> [decoder(created with > 48kHz)] >> 48kHz(?) >&...
2016 Jun 17
0
Opus Raw Pakcets
...split into frames, the duration, audio bandwidth, and the coding mode. This is described in https://tools.ietf.org/html/rfc6716#section-3.1 > 4) I have RAW opus packets now, I want to convert it to representable > files, integer, float any method?? or any help (decoder)?? You need to call `opus_decoder_create` to set up a decoder instance, and then pass each successive payload buffer to `opus_decode` or `opus_decode_float`. Hope that helps, -r
2016 Nov 10
1
Error running opus encoder/decoder under PIC32
...CATION_AUDIO application. The lib version is 1.1.3. The initialization procedure is as follows: _encoder = opus_encoder_create(48000, 2, OPUS_APPLICATION_AUDIO, &error); error = opus_encoder_ctl(_encoder, OPUS_SET_BITRATE(64000)); _decoder = opus_decoder_create(48000, 2, &error); The variable error is always set to OPUS_OK. The encoding and decoding procedure is as follows: bytesEncoded = opus_encode(_encoder, _encoderBuffer, _frameSize, codedBuffer, sizeof(codedBuffer)); sampsDecoded = opus_decode(_decoder, c...
2017 Jun 05
0
Trying to use Opus in an STM32F429IIT6 embedded project
On 05/06/17 08:28 AM, Ulisses Piassa wrote: > I ported all the files from OpusLib 1.1.4 needed to compile the project, > but when I try to create and OpusDecode state, it returns the error -7 > (OPUS_ALLOC_FAIL). Are you getting OPUS_ALLOC_FAIL on the opus_decoder_init() too or just on opus_decoder_create()? > I'm compiling it with the USE_ALLOCA flag. I also tried to compile it > with the flags OVERRIDE_OPUS_ALLOC OVERRIDE_OPUS_FREE > 'opus_alloc(x)=NULL' and 'opus_free(x)=NULL', but still having no success. when you use OVERRIDE_OPUS_ALLOC and opus_alloc(x)=NULL you&...
2016 Mar 15
0
Question on opus_decoder output sampling rate
...her than 8/12/16/24/48, then you'll have to do resampling. Have a look at the speexdsp resampler if you don't already have one. Cheers, ? ? ? ? Jean-Marc On 02/04/15 10:42 AM, Julien Chavanton wrote: > Hi, is there any way to tell the decoder the output sampling Fz we want ? > > opus_decoder_create = Sampling rate of input signal (Hz) > > Considering this example (VoIP-out from WebRTC/RTP) > > MICROPHONE(44.1/48kHz) >> [encoder created at 48kHz but with > internalSampleRate set to 8kHz]>> INTERNET >> [decoder(created with > 48kHz)] >> 48kHz(?) >&gt...
2018 Jun 29
1
OPUS on cortex M4
...ory for the encoder as well as decoder state and they both return with OPUS_OK. uint32_t error; opus_int32 Fs = 8000; int channels = 1; OpusEncoder *enc; enc = opus_encoder_create(Fs, channels, OPUS_APPLICATION_RESTRICTED_LOWDELAY, &error); OpusDecoder *dec; dec = opus_decoder_create(Fs, channels, &error); However, If I try to make a simple example of opus_encode followed by and immediate opus_decode I do not get reasonable values compared to the input. I'm wondering if I'm somehow misunderstanding how the codec works. Could somebody tell me if my approach could wo...
2016 Jan 07
2
Issue with decoding 8-bit PCM data
...on. For both 8 and 16 bit data I have used the following parameters ui32SamplingRate = 8000 ui32Channel = 1 FRAME_SIZE_IN_MS is 20 MAX_PACKET is 1500 ui8ScaleFactor = 1 for 8-bit and 2 for 16-bit data ui32BitsPerSample = 8 for 8-bit data and 16 for 16-bit data The code is as follows sOpusDec = opus_decoder_create(ui32SamplingRate, ui32Channel, &i32error); if (i32error != OPUS_OK) { return((int)i32error); } opus_decoder_ctl(sOpusDec, OPUS_SET_LSB_DEPTH(ui32BitsPerSample)); ui32SizeOfWrBuf = (ui32SamplingRate*ui32Channel*FRAME_SIZE_IN_MS*ui8ScaleFactor)/1000; opi16_out = (int16_t*)calloc(((ui32Si...
2017 Jan 27
3
Adding a decoder fuzz target
Hi all, I'm working on fuzzing Opus with OSS-Fuzz and have started with the decoder. Attached is a patch to add the corresponding fuzz target. Please let me know if there are any concerns? Thanks, Felicia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20170127/f69951aa/attachment-0001.html>