- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
コピーされたリンク
1 返信
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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;
}
