search for: ui32sizeofwrbuf

Displaying 4 results from an estimated 4 matches for "ui32sizeofwrbuf".

2016 Jan 07
2
Issue with decoding 8-bit PCM data
...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(((ui32SizeOfWrBuf/ui8ScaleFactor)+1),sizeof(int16_t)); pcRdBuf = (uint8_t *)calloc(MAX_PACKET,sizeof(uint8_t)); output_samples = opus_decode(sOpusDec, (const unsigned char *)&pcRdBuf[0], len, op...
2016 Jan 07
3
Issue with decoding 8-bit PCM data
...OpusDec, OPUS_SET_LSB_DEPTH(ui32BitsPerSample)); > > OPUS_SET_LSB_DEPTH only affects the encoder. If you check the return > value here you should get OPUS_UNIMPLEMENTED. > > > output_samples = opus_decode(sOpusDec, (const unsigned char > > *)&pcRdBuf[0], len, opi16_out, (ui32SizeOfWrBuf/ui8ScaleFactor), 0); > > I suspect the issue is dividing by ui8ScaleFactor = 1 here. > OPUS_SET_LSB_DEPTH works as a precision hint to the encoder about where > to set the noise floor, but opus_decode still returns 16 bit samples. It > always returns 16 bit samples, regardless of whe...
2016 Jan 07
0
Issue with decoding 8-bit PCM data
...te: > opus_decoder_ctl(sOpusDec, OPUS_SET_LSB_DEPTH(ui32BitsPerSample)); OPUS_SET_LSB_DEPTH only affects the encoder. If you check the return value here you should get OPUS_UNIMPLEMENTED. > output_samples = opus_decode(sOpusDec, (const unsigned char > *)&pcRdBuf[0], len, opi16_out, (ui32SizeOfWrBuf/ui8ScaleFactor), 0); I suspect the issue is dividing by ui8ScaleFactor = 1 here. OPUS_SET_LSB_DEPTH works as a precision hint to the encoder about where to set the noise floor, but opus_decode still returns 16 bit samples. It always returns 16 bit samples, regardless of whether the original input...
2016 Jan 09
0
Issue with decoding 8-bit PCM data
...t;>> OPUS_SET_LSB_DEPTH only affects the encoder. If you check the return >>>> value here you should get OPUS_UNIMPLEMENTED. >>>> >>>> > output_samples = opus_decode(sOpusDec, (const unsigned char >>>> > *)&pcRdBuf[0], len, opi16_out, (ui32SizeOfWrBuf/ui8ScaleFactor), 0); >>>> >>>> I suspect the issue is dividing by ui8ScaleFactor = 1 here. >>>> OPUS_SET_LSB_DEPTH works as a precision hint to the encoder about where >>>> to set the noise floor, but opus_decode still returns 16 bit samples. It >&...