comparison h263.h @ 10818:514dc1c87b2e libavcodec

Rename most non static h263 tables so their name contains h263.
author michael
date Fri, 08 Jan 2010 17:51:48 +0000
parents 4605bd2fdb7f
children d0657e337f91
comparison
equal deleted inserted replaced
10817:d1fe22d92a65 10818:514dc1c87b2e
28 #define INTER_MCBPC_VLC_BITS 7 28 #define INTER_MCBPC_VLC_BITS 7
29 #define CBPY_VLC_BITS 6 29 #define CBPY_VLC_BITS 6
30 #define TEX_VLC_BITS 9 30 #define TEX_VLC_BITS 9
31 31
32 extern const AVRational ff_h263_pixel_aspect[16]; 32 extern const AVRational ff_h263_pixel_aspect[16];
33 extern const uint8_t cbpy_tab[16][2]; 33 extern const uint8_t ff_h263_cbpy_tab[16][2];
34 34
35 extern const uint8_t mvtab[33][2]; 35 extern const uint8_t mvtab[33][2];
36 36
37 extern const uint8_t intra_MCBPC_code[9]; 37 extern const uint8_t ff_h263_intra_MCBPC_code[9];
38 extern const uint8_t intra_MCBPC_bits[9]; 38 extern const uint8_t ff_h263_intra_MCBPC_bits[9];
39 39
40 extern const uint8_t inter_MCBPC_code[28]; 40 extern const uint8_t ff_h263_inter_MCBPC_code[28];
41 extern const uint8_t inter_MCBPC_bits[28]; 41 extern const uint8_t ff_h263_inter_MCBPC_bits[28];
42 42
43 extern VLC intra_MCBPC_vlc; 43 extern VLC ff_h263_intra_MCBPC_vlc;
44 extern VLC inter_MCBPC_vlc; 44 extern VLC ff_h263_inter_MCBPC_vlc;
45 extern VLC cbpy_vlc; 45 extern VLC ff_h263_cbpy_vlc;
46 46
47 extern RLTable rl_inter; 47 extern RLTable ff_h263_rl_inter;
48 48
49 int h263_decode_motion(MpegEncContext * s, int pred, int f_code); 49 int h263_decode_motion(MpegEncContext * s, int pred, int f_code);
50 av_const int ff_h263_aspect_to_info(AVRational aspect); 50 av_const int ff_h263_aspect_to_info(AVRational aspect);
51 51
52 static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){ 52 static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){
88 int cbpc = (-1), cbpy= (-1); 88 int cbpc = (-1), cbpy= (-1);
89 const int offset= (s->mv_type==MV_TYPE_16X16 ? 0 : 16) + (s->dquant ? 8 : 0); 89 const int offset= (s->mv_type==MV_TYPE_16X16 ? 0 : 16) + (s->dquant ? 8 : 0);
90 const int lambda= s->lambda2 >> (FF_LAMBDA_SHIFT - 6); 90 const int lambda= s->lambda2 >> (FF_LAMBDA_SHIFT - 6);
91 91
92 for(i=0; i<4; i++){ 92 for(i=0; i<4; i++){
93 int score= inter_MCBPC_bits[i + offset] * lambda; 93 int score= ff_h263_inter_MCBPC_bits[i + offset] * lambda;
94 if(i&1) score += s->coded_score[5]; 94 if(i&1) score += s->coded_score[5];
95 if(i&2) score += s->coded_score[4]; 95 if(i&2) score += s->coded_score[4];
96 96
97 if(score < best_cbpc_score){ 97 if(score < best_cbpc_score){
98 best_cbpc_score= score; 98 best_cbpc_score= score;
99 cbpc= i; 99 cbpc= i;
100 } 100 }
101 } 101 }
102 102
103 for(i=0; i<16; i++){ 103 for(i=0; i<16; i++){
104 int score= cbpy_tab[i ^ 0xF][1] * lambda; 104 int score= ff_h263_cbpy_tab[i ^ 0xF][1] * lambda;
105 if(i&1) score += s->coded_score[3]; 105 if(i&1) score += s->coded_score[3];
106 if(i&2) score += s->coded_score[2]; 106 if(i&2) score += s->coded_score[2];
107 if(i&4) score += s->coded_score[1]; 107 if(i&4) score += s->coded_score[1];
108 if(i&8) score += s->coded_score[0]; 108 if(i&8) score += s->coded_score[0];
109 109