- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 */
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;
}
{
bits = 0;
for (j = 7; j >=0; j--){
if( (bitstream>>j)&1 )
*bits++ = BIT_1;
else
*bits++ = BIT_0;
}
}
return;
}
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