Mercurial > libavcodec.hg
diff h263.c @ 945:463f7260b155 libavcodec
trellis quantization
author | michaelni |
---|---|
date | Tue, 31 Dec 2002 17:23:56 +0000 |
parents | c237f5db1c22 |
children | 9eb066d6e0db |
line wrap: on
line diff
--- a/h263.c Mon Dec 30 23:00:02 2002 +0000 +++ b/h263.c Tue Dec 31 17:23:56 2002 +0000 @@ -82,12 +82,13 @@ static UINT8 fcode_tab[MAX_MV*2+1]; static UINT8 umv_fcode_tab[MAX_MV*2+1]; -static UINT32 uni_mpeg4_intra_rl_bits[64*64*2*2]; -static UINT8 uni_mpeg4_intra_rl_len [64*64*2*2]; -static UINT32 uni_mpeg4_inter_rl_bits[64*64*2*2]; -static UINT8 uni_mpeg4_inter_rl_len [64*64*2*2]; -#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level)) +static uint32_t uni_mpeg4_intra_rl_bits[64*64*2*2]; +static uint8_t uni_mpeg4_intra_rl_len [64*64*2*2]; +static uint32_t uni_mpeg4_inter_rl_bits[64*64*2*2]; +static uint8_t uni_mpeg4_inter_rl_len [64*64*2*2]; +//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level)) //#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run) + (level)*64) +#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run)*128 + (level)) /* mpeg4 inter @@ -1441,6 +1442,11 @@ s->fcode_tab= fcode_tab; s->min_qcoeff= -2048; s->max_qcoeff= 2047; + s->intra_ac_vlc_length = uni_mpeg4_intra_rl_len; + s->intra_ac_vlc_last_length= uni_mpeg4_intra_rl_len + 128*64; + s->inter_ac_vlc_length = uni_mpeg4_inter_rl_len; + s->inter_ac_vlc_last_length= uni_mpeg4_inter_rl_len + 128*64; + s->ac_esc_length= 7+2+1+6+1+12+1; break; case CODEC_ID_H263P: s->fcode_tab= umv_fcode_tab;