Mercurial > libavcodec.hg
comparison h263.c @ 945:463f7260b155 libavcodec
trellis quantization
author | michaelni |
---|---|
date | Tue, 31 Dec 2002 17:23:56 +0000 |
parents | c237f5db1c22 |
children | 9eb066d6e0db |
comparison
equal
deleted
inserted
replaced
944:927c246f1f6d | 945:463f7260b155 |
---|---|
80 #ifdef CONFIG_ENCODERS | 80 #ifdef CONFIG_ENCODERS |
81 static UINT16 (*mv_penalty)[MAX_MV*2+1]= NULL; | 81 static UINT16 (*mv_penalty)[MAX_MV*2+1]= NULL; |
82 static UINT8 fcode_tab[MAX_MV*2+1]; | 82 static UINT8 fcode_tab[MAX_MV*2+1]; |
83 static UINT8 umv_fcode_tab[MAX_MV*2+1]; | 83 static UINT8 umv_fcode_tab[MAX_MV*2+1]; |
84 | 84 |
85 static UINT32 uni_mpeg4_intra_rl_bits[64*64*2*2]; | 85 static uint32_t uni_mpeg4_intra_rl_bits[64*64*2*2]; |
86 static UINT8 uni_mpeg4_intra_rl_len [64*64*2*2]; | 86 static uint8_t uni_mpeg4_intra_rl_len [64*64*2*2]; |
87 static UINT32 uni_mpeg4_inter_rl_bits[64*64*2*2]; | 87 static uint32_t uni_mpeg4_inter_rl_bits[64*64*2*2]; |
88 static UINT8 uni_mpeg4_inter_rl_len [64*64*2*2]; | 88 static uint8_t uni_mpeg4_inter_rl_len [64*64*2*2]; |
89 #define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level)) | 89 //#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level)) |
90 //#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run) + (level)*64) | 90 //#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run) + (level)*64) |
91 #define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run)*128 + (level)) | |
91 | 92 |
92 /* mpeg4 | 93 /* mpeg4 |
93 inter | 94 inter |
94 max level: 24/6 | 95 max level: 24/6 |
95 max run: 53/63 | 96 max run: 53/63 |
1439 switch(s->codec_id){ | 1440 switch(s->codec_id){ |
1440 case CODEC_ID_MPEG4: | 1441 case CODEC_ID_MPEG4: |
1441 s->fcode_tab= fcode_tab; | 1442 s->fcode_tab= fcode_tab; |
1442 s->min_qcoeff= -2048; | 1443 s->min_qcoeff= -2048; |
1443 s->max_qcoeff= 2047; | 1444 s->max_qcoeff= 2047; |
1445 s->intra_ac_vlc_length = uni_mpeg4_intra_rl_len; | |
1446 s->intra_ac_vlc_last_length= uni_mpeg4_intra_rl_len + 128*64; | |
1447 s->inter_ac_vlc_length = uni_mpeg4_inter_rl_len; | |
1448 s->inter_ac_vlc_last_length= uni_mpeg4_inter_rl_len + 128*64; | |
1449 s->ac_esc_length= 7+2+1+6+1+12+1; | |
1444 break; | 1450 break; |
1445 case CODEC_ID_H263P: | 1451 case CODEC_ID_H263P: |
1446 s->fcode_tab= umv_fcode_tab; | 1452 s->fcode_tab= umv_fcode_tab; |
1447 s->min_qcoeff= -128; | 1453 s->min_qcoeff= -128; |
1448 s->max_qcoeff= 127; | 1454 s->max_qcoeff= 127; |