help me ! compile the g729 sample.

help me ! compile the g729 sample.

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.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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[i] = 0;
for (j = 7; j >=0; j--){
if( (bitstream[i]>>j)&1 )
*bits++ = BIT_1;
else
*bits++ = BIT_0;
}

}
return;
}

Leave a Comment

Please sign in to add a comment. Not a member? Join today