search for: pcrdbuf

Displaying 7 results from an estimated 7 matches for "pcrdbuf".

Did you mean: pci_buf
2016 Jan 07
2
Issue with decoding 8-bit PCM data
...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, opi16_out, (ui32SizeOfWrBuf/ui8ScaleFactor), 0); I am not able to understand what the issue is. Or do I need to look at the encoder? Regards Amit -------------- ne...
2016 Jan 07
3
Issue with decoding 8-bit PCM data
...> > 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 retu...
2016 Jan 11
2
Issue with decoding 8-bit PCM data
Hello Mark, The resulting 8 bit file has a lot of squelching noise compared to the 16 bit output from OPUS decoder. During encode I am using popi16fmtBuffer[ui32Loop] = (opus_int16)pcRdBuf[ui32Loop]; And during decode since the data is in the lower 8 bit I use pc8bitSamples[ui32Loop] = ((unsigned short)pcop16OutBuf[ui32Loop] ^ 0x80); Regards Amit On Sat, Jan 9, 2016 at 2:39 PM, Amit Ashara <ashara.amit at gmail.com> wrote: > Hello Mark, > > Thanks. Let me try the...
2016 Jan 07
0
Issue with decoding 8-bit PCM data
.../16 10:04 AM, Amit Ashara wrote: > 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, rega...
2016 Jan 14
0
Issue with decoding 8-bit PCM data
...Mon, Jan 11, 2016 at 11:05 AM, Amit Ashara <ashara.amit at gmail.com> wrote: > Hello Mark, > > The resulting 8 bit file has a lot of squelching noise compared to the 16 > bit output from OPUS decoder. > During encode I am using > > popi16fmtBuffer[ui32Loop] = (opus_int16)pcRdBuf[ui32Loop]; > > And during decode since the data is in the lower 8 bit I use > > pc8bitSamples[ui32Loop] = ((unsigned short)pcop16OutBuf[ui32Loop] ^ 0x80); > > Regards > Amit > > On Sat, Jan 9, 2016 at 2:39 PM, Amit Ashara <ashara.amit at gmail.com> wrote: > >&...
2016 Jan 09
0
Issue with decoding 8-bit PCM data
...le)); >>>> >>>> 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 s...
2016 Jan 09
2
Issue with decoding 8-bit PCM data
opus_decode() produces 16-bit signed linear PCM, and opus_decode_float() produces 32-bit floating point PCM that is useful when you want a higher bit depth. If you need 8-bit linear PCM then a simple solution would be to use only the top 8 bits of each 16-bit sample from opus_decode(). Note that the WAV format uses unsigned rather than signed integers for 8-bit linear PCM. (It uses signed for