- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, guys, i'm a fresh man of IPP, i think it will be greate to use IPP, but I have several questions, hope you can give me the answer.
Q1: ippsALawToLin_8u16s is this function mean,
8-bits/sample PCMA data will be converted to 16-bits/sample Lin-PCM data automatically?
Q2: if the answer of Q1 is yes, in the sample code of the speech-codecs , there is an application named usc_speech_codec. In this application, there is only 16bit/sample PCMA supported by the sample code to convert PCMUA data to other codecs. But in the player.c, the sample code will call a function named USC_CvtToLinear, which calls the function ippsALawToLin_8u16s, how could
a 16-bits/sample data is used as an input 8-bits/sample data.
Q1: ippsALawToLin_8u16s is this function mean,
8-bits/sample PCMA data will be converted to 16-bits/sample Lin-PCM data automatically?
Q2: if the answer of Q1 is yes, in the sample code of the speech-codecs , there is an application named usc_speech_codec. In this application, there is only 16bit/sample PCMA supported by the sample code to convert PCMUA data to other codecs. But in the player.c, the sample code will call a function named USC_CvtToLinear, which calls the function ippsALawToLin_8u16s, how could
a 16-bits/sample data is used as an input 8-bits/sample data.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Welcome to the forum :-). This is a good place to share information and ask questions:
Q1: yes, it takes 8 bits and create 16-bits output
Q2: the sample support 16bit PCM data, and 8 bit A-Law/Mu-Law data.
The readme file (applicationusc_speech_codecreadme.htm) may help you find some detail on input and output data format:
When in encoding mode the sample consumes either 16bit narrowband 8000 Hz or 16bit wideband 16000 Hz raw PCM data or 8 bit narrowband 8000 Hz A-Law/Mu-Law PCM or 8bit wideband 16000 Hz A-Law/Mu-Law PCM data stored in WAVE file format and produces a compressed USC bitstream stored in a compressed WAVE file.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Chao Y (Intel)
Hi,
Welcome to the forum :-). This is a good place to share information and ask questions:
Q1: yes, it takes 8 bits and create 16-bits output
Q2: the sample support 16bit PCM data, and 8 bit A-Law/Mu-Law data.
The readme file (applicationusc_speech_codecreadme.htm) may help you find some detail on input and output data format:
When in encoding mode the sample consumes either 16bit narrowband 8000 Hz or 16bit wideband 16000 Hz raw PCM data or 8 bit narrowband 8000 Hz A-Law/Mu-Law PCM or 8bit wideband 16000 Hz A-Law/Mu-Law PCM data stored in WAVE file format and produces a compressed USC bitstream stored in a compressed WAVE file.
Thanks,
Chao
Hi Chao,
Very glad to have an answer so quickly. Q1 is the same as I though. But Q2, I want a little more discussion.
Actually, I have read the readme.htm before, and this really make me confusion. According to both the readme.htm and what you havetold me in the reply, I think I know PCMUA with 8-bits/sample should be supported. But in fact, in the file uscg711.c, there is a definitionof pcmTypesTbl_G711and it shows only #define G711_BITS_PER_SAMPLE 16 is supported.
In fact, this is alsoOK to me, I can understand what it's mean. AndIhave test the code, it'strue that 16-bits/sample PCMA can pass thesample code and8-bits/sample PCMA can't.
The key I'm really confused is that if 16-bits/sample PCMA can be converted to other codecs, it must call the function USC_CvtToLinear whichcall ippsALawToLin_8u16s indirectly. However , the input source is 16-bits/sample already, why it can call ippsALawToLin_8u16s which the source data should be 8-bits/sample?
Look forward to your answer. Thanks very much!
BR
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - samsmile
Hi Chao,
Very glad to have an answer so quickly. Q1 is the same as I though. But Q2, I want a little more discussion.
Actually, I have read the readme.htm before, and this really make me confusion. According to both the readme.htm and what you havetold me in the reply, I think I know PCMUA with 8-bits/sample should be supported. But in fact, in the file uscg711.c, there is a definitionof pcmTypesTbl_G711and it shows only #define G711_BITS_PER_SAMPLE 16 is supported.
In fact, this is alsoOK to me, I can understand what it's mean. AndIhave test the code, it'strue that 16-bits/sample PCMA can pass thesample code and8-bits/sample PCMA can't.
The key I'm really confused is that if 16-bits/sample PCMA can be converted to other codecs, it must call the function USC_CvtToLinear whichcall ippsALawToLin_8u16s indirectly. However , the input source is 16-bits/sample already, why it can call ippsALawToLin_8u16s which the source data should be 8-bits/sample?
Look forward to your answer. Thanks very much!
BR
Sam
In fact, USC G711A/U encoder consumesand decoder produces10ms frame of 16bit linear PCM. Oppositely,G711 encodeproduces andG711 decode consumes 10ms frame of 8bitA or Mu -lawPCM.
More over, any USCnarrow band codecs, for example G729, G723.1 etc abd G711A/U among them all supportlinear16bit PCM only, and GetInfo function ofsuch codecwill return PCM type as following:
pInfo->params.pcmType.sample_frequency: 8000
pInfo->params.pcmType.nChannels: 1
pInfo->params.pcmType.bitPerSample 16
Frame size may be different, for example USC G711* codecs support 10 msframe of linear PCMproducing10ms frame of compressed (compound) 8bit PCM as a bitsreamstoring it in the output file in USC format.
Vyacheslav, IPP speech coding

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page