?? g729a_coder.c
字號:
#include "../Common/typedef.h"
#include "../Include/G729A_basic_op.h"
#include "../Include/G729A_ld8a.h"
#include "../Include/G729A_tab_ld8a.h"
#include "../Include/G729A_Coder.h"
extern Word16 *G729A_new_speech;
static Word16 G729A_prm[G729A_PRM_SIZE];
static unsigned int G729A_bb_;
static unsigned int G729A_nbb_;
static unsigned char* G729A_bc_;
void G729AInitEncoder()
{
G729AInit_Pre_Process();
G729AInit_Coder_ld8a();
G729ASet_zero(G729A_prm, G729A_PRM_SIZE);
}
int G729AEnCoder(Word16 *sample, char *buf, int samplelen, int *buflen)
{
int i = 0, j = 0;
*buflen = 0;
G729A_bc_ = (unsigned char *)buf;
G729A_bb_ = 0;
G729A_nbb_ = 0;
for(i = 0; i < 3; i++)
{
memcpy((char *)G729A_new_speech, (char *)(sample + i*G729A_L_FRAME), G729A_L_FRAME*2);
G729APre_Process(G729A_new_speech, G729A_L_FRAME);
G729ACoder_ld8a(G729A_prm);
for(j = 0; j < G729A_PRM_SIZE; j++)
{
PUT_BITS(G729A_prm[j], G729A_bitsno [j], G729A_nbb_, G729A_bb_, G729A_bc_);
}
*buflen += 10;
STORE_BITS(G729A_bb_, G729A_bc_);
}
return (0);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -