Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

help me ! compile the g729 sample.

sendhb
Beginner
391 Views
hi verybody:
I download the speech sample. And compile the g729 sample. I use the encoder729i.exe to encoder a sample. It's PCM, 16bit, 8000Hz, 1ch, 128Kbps.The source file is 838,822 bytes. After encodering. The target file is 859,688 bytes. Why the target file is as almost long as source file.Can anybody help me .Thanks very much.
0 Kudos
1 Reply
stray109
Beginner
391 Views
just see below codes:
static void encodedBitsUnPack_G729(
const char *bitstream, /* input bitstream */
short *bits, /* output: ITU bitstream unpacked format: 0 - BIT_0, 1 - BIT_1 */
int len
)
{
short i,j;
*bits++ = SYNC_WORD; /* bit[0], at receiver this bits indicates BFI */
if(len==10) *bits++ = SIZE_WORD; /* bit[1], to be compatible with hardware */
else if(len==8) *bits++ = RATE_6400; /* bit[1], to be compatible with hardware */
else if(len==15) *bits++ = RATE_11800; /* bit[1], to be compatible with hardware */
for (i = 0; i < len; i++)
{
bits = 0;
for (j = 7; j >=0; j--){
if( (bitstream>>j)&1 )
*bits++ = BIT_1;
else
*bits++ = BIT_0;
}

}
return;
}
0 Kudos
Reply