aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-08 17:51:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-08 17:51:48 +0000
commit101ada9abd92185d80e6011c7c6b96dc15b69292 (patch)
tree72306372040125306e42f603950f9021f77c7ae8
parentfef59a5b4b8f83b940042b62399afe30fa126512 (diff)
downloadffmpeg-101ada9abd92185d80e6011c7c6b96dc15b69292.tar.gz
Rename most non static h263 tables so their name contains h263.
Originally committed as revision 21098 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h263.c74
-rw-r--r--libavcodec/h263.h22
-rw-r--r--libavcodec/h263data.h12
-rw-r--r--libavcodec/mpeg4videodec.c24
-rw-r--r--libavcodec/mpeg4videoenc.c32
-rw-r--r--libavcodec/msmpeg4.c28
6 files changed, 96 insertions, 96 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index fd1c41a399..23179a17f3 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -505,7 +505,7 @@ static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n)
int level, run, last, i, j, last_index, last_non_zero, sign, slevel, code;
RLTable *rl;
- rl = &rl_inter;
+ rl = &ff_h263_rl_inter;
if (s->mb_intra && !s->h263_aic) {
/* DC coef */
level = block[0];
@@ -723,10 +723,10 @@ void h263_encode_mb(MpegEncContext * s,
if(s->dquant) cbpc+= 8;
if(s->mv_type==MV_TYPE_16X16){
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc],
- inter_MCBPC_code[cbpc]);
+ ff_h263_inter_MCBPC_bits[cbpc],
+ ff_h263_inter_MCBPC_code[cbpc]);
- put_bits(&s->pb, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ put_bits(&s->pb, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(s->dquant)
put_bits(&s->pb, 2, dquant_code[s->dquant+2]);
@@ -750,9 +750,9 @@ void h263_encode_mb(MpegEncContext * s,
}
}else{
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc+16],
- inter_MCBPC_code[cbpc+16]);
- put_bits(&s->pb, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ ff_h263_inter_MCBPC_bits[cbpc+16],
+ ff_h263_inter_MCBPC_code[cbpc+16]);
+ put_bits(&s->pb, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(s->dquant)
put_bits(&s->pb, 2, dquant_code[s->dquant+2]);
@@ -845,21 +845,21 @@ void h263_encode_mb(MpegEncContext * s,
if (s->pict_type == FF_I_TYPE) {
if(s->dquant) cbpc+=4;
put_bits(&s->pb,
- intra_MCBPC_bits[cbpc],
- intra_MCBPC_code[cbpc]);
+ ff_h263_intra_MCBPC_bits[cbpc],
+ ff_h263_intra_MCBPC_code[cbpc]);
} else {
if(s->dquant) cbpc+=8;
put_bits(&s->pb, 1, 0); /* mb coded */
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc + 4],
- inter_MCBPC_code[cbpc + 4]);
+ ff_h263_inter_MCBPC_bits[cbpc + 4],
+ ff_h263_inter_MCBPC_code[cbpc + 4]);
}
if (s->h263_aic) {
/* XXX: currently, we do not try to use ac prediction */
put_bits(&s->pb, 1, 0); /* no AC prediction */
}
cbpy = cbp >> 2;
- put_bits(&s->pb, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ put_bits(&s->pb, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(s->dquant)
put_bits(&s->pb, 2, dquant_code[s->dquant+2]);
@@ -1247,11 +1247,11 @@ void h263_encode_init(MpegEncContext *s)
if (!done) {
done = 1;
- init_rl(&rl_inter, static_rl_table_store[0]);
+ init_rl(&ff_h263_rl_inter, static_rl_table_store[0]);
init_rl(&rl_intra_aic, static_rl_table_store[1]);
init_uni_h263_rl_tab(&rl_intra_aic, NULL, uni_h263_intra_aic_rl_len);
- init_uni_h263_rl_tab(&rl_inter , NULL, uni_h263_inter_rl_len);
+ init_uni_h263_rl_tab(&ff_h263_rl_inter , NULL, uni_h263_inter_rl_len);
init_mv_penalty_and_fcode(s);
}
@@ -1305,9 +1305,9 @@ void h263_encode_init(MpegEncContext *s)
/***********************************************/
/* decoding */
-VLC intra_MCBPC_vlc;
-VLC inter_MCBPC_vlc;
-VLC cbpy_vlc;
+VLC ff_h263_intra_MCBPC_vlc;
+VLC ff_h263_inter_MCBPC_vlc;
+VLC ff_h263_cbpy_vlc;
static VLC mv_vlc;
static VLC h263_mbtype_b_vlc;
static VLC cbpc_b_vlc;
@@ -1322,21 +1322,21 @@ void h263_decode_init_vlc(MpegEncContext *s)
if (!done) {
done = 1;
- INIT_VLC_STATIC(&intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9,
- intra_MCBPC_bits, 1, 1,
- intra_MCBPC_code, 1, 1, 72);
- INIT_VLC_STATIC(&inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 28,
- inter_MCBPC_bits, 1, 1,
- inter_MCBPC_code, 1, 1, 198);
- INIT_VLC_STATIC(&cbpy_vlc, CBPY_VLC_BITS, 16,
- &cbpy_tab[0][1], 2, 1,
- &cbpy_tab[0][0], 2, 1, 64);
+ INIT_VLC_STATIC(&ff_h263_intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9,
+ ff_h263_intra_MCBPC_bits, 1, 1,
+ ff_h263_intra_MCBPC_code, 1, 1, 72);
+ INIT_VLC_STATIC(&ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 28,
+ ff_h263_inter_MCBPC_bits, 1, 1,
+ ff_h263_inter_MCBPC_code, 1, 1, 198);
+ INIT_VLC_STATIC(&ff_h263_cbpy_vlc, CBPY_VLC_BITS, 16,
+ &ff_h263_cbpy_tab[0][1], 2, 1,
+ &ff_h263_cbpy_tab[0][0], 2, 1, 64);
INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 33,
&mvtab[0][1], 2, 1,
&mvtab[0][0], 2, 1, 538);
- init_rl(&rl_inter, static_rl_table_store[0]);
+ init_rl(&ff_h263_rl_inter, static_rl_table_store[0]);
init_rl(&rl_intra_aic, static_rl_table_store[1]);
- INIT_VLC_RL(rl_inter, 554);
+ INIT_VLC_RL(ff_h263_rl_inter, 554);
INIT_VLC_RL(rl_intra_aic, 554);
INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15,
&h263_mbtype_b_tab[0][1], 2, 1,
@@ -1606,13 +1606,13 @@ static void preview_obmc(MpegEncContext *s){
s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
goto end;
}
- cbpc = get_vlc2(&s->gb, inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
}while(cbpc == 20);
if(cbpc & 4){
s->current_picture.mb_type[xy]= MB_TYPE_INTRA;
}else{
- get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if (cbpc & 8) {
if(s->modified_quant){
if(get_bits1(&s->gb)) skip_bits(&s->gb, 1);
@@ -1687,7 +1687,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded)
{
int code, level, i, j, last, run;
- RLTable *rl = &rl_inter;
+ RLTable *rl = &ff_h263_rl_inter;
const uint8_t *scan_table;
GetBitContext gb= s->gb;
@@ -1780,7 +1780,7 @@ retry:
}
i += run;
if (i >= 64){
- if(s->alt_inter_vlc && rl == &rl_inter && !s->mb_intra){
+ if(s->alt_inter_vlc && rl == &ff_h263_rl_inter && !s->mb_intra){
//Looks like a hack but no, it's the way it is supposed to work ...
rl = &rl_intra_aic;
i = 0;
@@ -1868,7 +1868,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
s->mb_skipped = !(s->obmc | s->loop_filter);
goto end;
}
- cbpc = get_vlc2(&s->gb, inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "cbpc damaged at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -1883,7 +1883,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
if(s->pb_frame && get_bits1(&s->gb))
pb_mv_count = h263_get_modb(&s->gb, s->pb_frame, &cbpb);
- cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(s->alt_inter_vlc==0 || (cbpc & 3)!=3)
cbpy ^= 0xF;
@@ -1977,7 +1977,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
goto intra;
}
- cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if (cbpy < 0){
av_log(s->avctx, AV_LOG_ERROR, "b cbpy damaged at %d %d\n", s->mb_x, s->mb_y);
@@ -2035,7 +2035,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
s->current_picture.mb_type[xy]= mb_type;
} else { /* I-Frame */
do{
- cbpc = get_vlc2(&s->gb, intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpc damaged at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -2060,7 +2060,7 @@ intra:
if(s->pb_frame && get_bits1(&s->gb))
pb_mv_count = h263_get_modb(&s->gb, s->pb_frame, &cbpb);
- cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpy damaged at %d %d\n", s->mb_x, s->mb_y);
return -1;
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 9c98e5e575..f7c5fd0172 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -30,21 +30,21 @@
#define TEX_VLC_BITS 9
extern const AVRational ff_h263_pixel_aspect[16];
-extern const uint8_t cbpy_tab[16][2];
+extern const uint8_t ff_h263_cbpy_tab[16][2];
extern const uint8_t mvtab[33][2];
-extern const uint8_t intra_MCBPC_code[9];
-extern const uint8_t intra_MCBPC_bits[9];
+extern const uint8_t ff_h263_intra_MCBPC_code[9];
+extern const uint8_t ff_h263_intra_MCBPC_bits[9];
-extern const uint8_t inter_MCBPC_code[28];
-extern const uint8_t inter_MCBPC_bits[28];
+extern const uint8_t ff_h263_inter_MCBPC_code[28];
+extern const uint8_t ff_h263_inter_MCBPC_bits[28];
-extern VLC intra_MCBPC_vlc;
-extern VLC inter_MCBPC_vlc;
-extern VLC cbpy_vlc;
+extern VLC ff_h263_intra_MCBPC_vlc;
+extern VLC ff_h263_inter_MCBPC_vlc;
+extern VLC ff_h263_cbpy_vlc;
-extern RLTable rl_inter;
+extern RLTable ff_h263_rl_inter;
int h263_decode_motion(MpegEncContext * s, int pred, int f_code);
av_const int ff_h263_aspect_to_info(AVRational aspect);
@@ -90,7 +90,7 @@ static inline int get_p_cbp(MpegEncContext * s,
const int lambda= s->lambda2 >> (FF_LAMBDA_SHIFT - 6);
for(i=0; i<4; i++){
- int score= inter_MCBPC_bits[i + offset] * lambda;
+ int score= ff_h263_inter_MCBPC_bits[i + offset] * lambda;
if(i&1) score += s->coded_score[5];
if(i&2) score += s->coded_score[4];
@@ -101,7 +101,7 @@ static inline int get_p_cbp(MpegEncContext * s,
}
for(i=0; i<16; i++){
- int score= cbpy_tab[i ^ 0xF][1] * lambda;
+ int score= ff_h263_cbpy_tab[i ^ 0xF][1] * lambda;
if(i&1) score += s->coded_score[3];
if(i&2) score += s->coded_score[2];
if(i&4) score += s->coded_score[1];
diff --git a/libavcodec/h263data.h b/libavcodec/h263data.h
index 9b22b2dea4..0553ca701c 100644
--- a/libavcodec/h263data.h
+++ b/libavcodec/h263data.h
@@ -33,12 +33,12 @@
#include "mpegvideo.h"
/* intra MCBPC, mb_type = (intra), then (intraq) */
-const uint8_t intra_MCBPC_code[9] = { 1, 1, 2, 3, 1, 1, 2, 3, 1 };
-const uint8_t intra_MCBPC_bits[9] = { 1, 3, 3, 3, 4, 6, 6, 6, 9 };
+const uint8_t ff_h263_intra_MCBPC_code[9] = { 1, 1, 2, 3, 1, 1, 2, 3, 1 };
+const uint8_t ff_h263_intra_MCBPC_bits[9] = { 1, 3, 3, 3, 4, 6, 6, 6, 9 };
/* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */
/* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */
-const uint8_t inter_MCBPC_code[28] = {
+const uint8_t ff_h263_inter_MCBPC_code[28] = {
1, 3, 2, 5,
3, 4, 3, 3,
3, 7, 6, 5,
@@ -47,7 +47,7 @@ const uint8_t inter_MCBPC_code[28] = {
1, 0, 0, 0, /* Stuffing */
2, 12, 14, 15,
};
-const uint8_t inter_MCBPC_bits[28] = {
+const uint8_t ff_h263_inter_MCBPC_bits[28] = {
1, 4, 4, 6, /* inter */
5, 8, 8, 7, /* intra */
3, 7, 7, 9, /* interQ */
@@ -100,7 +100,7 @@ static const uint8_t cbpc_b_tab[4][2] = {
{6, 3},
};
-const uint8_t cbpy_tab[16][2] =
+const uint8_t ff_h263_cbpy_tab[16][2] =
{
{3,4}, {5,5}, {4,5}, {9,4}, {3,5}, {7,4}, {2,6}, {11,4},
{2,5}, {3,6}, {5,4}, {10,4}, {4,4}, {8,4}, {6,4}, {3,2}
@@ -177,7 +177,7 @@ const int8_t inter_run[102] = {
35, 36, 37, 38, 39, 40,
};
-RLTable rl_inter = {
+RLTable ff_h263_rl_inter = {
102,
58,
inter_vlc,
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 7a543069d1..a1786e822f 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -556,7 +556,7 @@ static int mpeg4_decode_partition_a(MpegEncContext *s){
return mb_num-1;
}
- cbpc = get_vlc2(&s->gb, intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "cbpc corrupted at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -615,7 +615,7 @@ try_again:
continue;
}
- cbpc = get_vlc2(&s->gb, inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "cbpc corrupted at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -712,7 +712,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){
if(s->pict_type==FF_I_TYPE){
int ac_pred= get_bits1(&s->gb);
- int cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "cbpy corrupted at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -724,7 +724,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){
if(IS_INTRA(s->current_picture.mb_type[xy])){
int dir=0,i;
int ac_pred = get_bits1(&s->gb);
- int cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpy corrupted at %d %d\n", s->mb_x, s->mb_y);
@@ -754,7 +754,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){
s->current_picture.qscale_table[xy]= s->qscale;
s->cbp_table[xy]= 0;
}else{
- int cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "P cbpy corrupted at %d %d\n", s->mb_x, s->mb_y);
@@ -892,7 +892,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
return 0;
}
if(rvlc) rl = &rvlc_rl_inter;
- else rl = &rl_inter;
+ else rl = &ff_h263_rl_inter;
scan_table = s->intra_scantable.permutated;
@@ -902,7 +902,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
if(rvlc){
rl_vlc = rvlc_rl_inter.rl_vlc[0];
}else{
- rl_vlc = rl_inter.rl_vlc[0];
+ rl_vlc = ff_h263_rl_inter.rl_vlc[0];
}
}else{
qmul = s->qscale << 1;
@@ -910,7 +910,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
if(rvlc){
rl_vlc = rvlc_rl_inter.rl_vlc[s->qscale];
}else{
- rl_vlc = rl_inter.rl_vlc[s->qscale];
+ rl_vlc = ff_h263_rl_inter.rl_vlc[s->qscale];
}
}
}
@@ -1207,7 +1207,7 @@ static int mpeg4_decode_mb(MpegEncContext *s,
}
goto end;
}
- cbpc = get_vlc2(&s->gb, inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "cbpc damaged at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -1222,7 +1222,7 @@ static int mpeg4_decode_mb(MpegEncContext *s,
if(s->pict_type==FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE && (cbpc & 16) == 0)
s->mcsel= get_bits1(&s->gb);
else s->mcsel= 0;
- cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1) ^ 0x0F;
+ cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1) ^ 0x0F;
cbp = (cbpc & 3) | (cbpy << 2);
if (dquant) {
@@ -1438,7 +1438,7 @@ static int mpeg4_decode_mb(MpegEncContext *s,
s->current_picture.mb_type[xy]= mb_type;
} else { /* I-Frame */
do{
- cbpc = get_vlc2(&s->gb, intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
+ cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpc damaged at %d %d\n", s->mb_x, s->mb_y);
return -1;
@@ -1454,7 +1454,7 @@ intra:
else
s->current_picture.mb_type[xy]= MB_TYPE_INTRA;
- cbpy = get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpy damaged at %d %d\n", s->mb_x, s->mb_y);
return -1;
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index bb399e208a..28d026b332 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -315,7 +315,7 @@ static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n
} else {
if(last_index<0) return;
i = 0;
- rl = &rl_inter;
+ rl = &ff_h263_rl_inter;
bits_tab= uni_mpeg4_inter_rl_bits;
len_tab = uni_mpeg4_inter_rl_len;
}
@@ -697,10 +697,10 @@ void mpeg4_encode_mb(MpegEncContext * s,
if(s->mv_type==MV_TYPE_16X16){
if(s->dquant) cbpc+= 8;
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc],
- inter_MCBPC_code[cbpc]);
+ ff_h263_inter_MCBPC_bits[cbpc],
+ ff_h263_inter_MCBPC_code[cbpc]);
- put_bits(pb2, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ put_bits(pb2, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(s->dquant)
put_bits(pb2, 2, dquant_code[s->dquant+2]);
@@ -722,10 +722,10 @@ void mpeg4_encode_mb(MpegEncContext * s,
}else if(s->mv_type==MV_TYPE_FIELD){
if(s->dquant) cbpc+= 8;
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc],
- inter_MCBPC_code[cbpc]);
+ ff_h263_inter_MCBPC_bits[cbpc],
+ ff_h263_inter_MCBPC_code[cbpc]);
- put_bits(pb2, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ put_bits(pb2, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(s->dquant)
put_bits(pb2, 2, dquant_code[s->dquant+2]);
@@ -752,9 +752,9 @@ void mpeg4_encode_mb(MpegEncContext * s,
}else{
assert(s->mv_type==MV_TYPE_8X8);
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc+16],
- inter_MCBPC_code[cbpc+16]);
- put_bits(pb2, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ ff_h263_inter_MCBPC_bits[cbpc+16],
+ ff_h263_inter_MCBPC_code[cbpc+16]);
+ put_bits(pb2, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(!s->progressive_sequence){
if(cbp)
@@ -815,18 +815,18 @@ void mpeg4_encode_mb(MpegEncContext * s,
if (s->pict_type == FF_I_TYPE) {
if(s->dquant) cbpc+=4;
put_bits(&s->pb,
- intra_MCBPC_bits[cbpc],
- intra_MCBPC_code[cbpc]);
+ ff_h263_intra_MCBPC_bits[cbpc],
+ ff_h263_intra_MCBPC_code[cbpc]);
} else {
if(s->dquant) cbpc+=8;
put_bits(&s->pb, 1, 0); /* mb coded */
put_bits(&s->pb,
- inter_MCBPC_bits[cbpc + 4],
- inter_MCBPC_code[cbpc + 4]);
+ ff_h263_inter_MCBPC_bits[cbpc + 4],
+ ff_h263_inter_MCBPC_code[cbpc + 4]);
}
put_bits(pb2, 1, s->ac_pred);
cbpy = cbp >> 2;
- put_bits(pb2, cbpy_tab[cbpy][1], cbpy_tab[cbpy][0]);
+ put_bits(pb2, ff_h263_cbpy_tab[cbpy][1], ff_h263_cbpy_tab[cbpy][0]);
if(s->dquant)
put_bits(dc_pb, 2, dquant_code[s->dquant+2]);
@@ -1255,7 +1255,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
init_uni_mpeg4_rl_tab(&ff_mpeg4_rl_intra, uni_mpeg4_intra_rl_bits, uni_mpeg4_intra_rl_len);
- init_uni_mpeg4_rl_tab(&rl_inter, uni_mpeg4_inter_rl_bits, uni_mpeg4_inter_rl_len);
+ init_uni_mpeg4_rl_tab(&ff_h263_rl_inter, uni_mpeg4_inter_rl_bits, uni_mpeg4_inter_rl_len);
}
s->min_qcoeff= -2048;
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 9687297620..132f393cab 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -576,8 +576,8 @@ void msmpeg4_encode_mb(MpegEncContext * s,
else coded_cbp= cbp;
put_bits(&s->pb,
- cbpy_tab[coded_cbp>>2][1],
- cbpy_tab[coded_cbp>>2][0]);
+ ff_h263_cbpy_tab[coded_cbp>>2][1],
+ ff_h263_cbpy_tab[coded_cbp>>2][0]);
s->misc_bits += get_bits_diff(s);
@@ -637,8 +637,8 @@ void msmpeg4_encode_mb(MpegEncContext * s,
}
put_bits(&s->pb, 1, 0); /* no AC prediction yet */
put_bits(&s->pb,
- cbpy_tab[cbp>>2][1],
- cbpy_tab[cbp>>2][0]);
+ ff_h263_cbpy_tab[cbp>>2][1],
+ ff_h263_cbpy_tab[cbp>>2][0]);
}else{
if (s->pict_type == FF_I_TYPE) {
put_bits(&s->pb,
@@ -1146,7 +1146,7 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
if (!s->mb_intra) {
int mx, my, cbpy;
- cbpy= get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1);
+ cbpy= get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "cbpy %d invalid at %d %d\n", cbp, s->mb_x, s->mb_y);
return -1;
@@ -1166,10 +1166,10 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
} else {
if(s->msmpeg4_version==2){
s->ac_pred = get_bits1(&s->gb);
- cbp|= get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1)<<2; //FIXME check errors
+ cbp|= get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1)<<2; //FIXME check errors
} else{
s->ac_pred = 0;
- cbp|= get_vlc2(&s->gb, cbpy_vlc.table, CBPY_VLC_BITS, 1)<<2; //FIXME check errors
+ cbp|= get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1)<<2; //FIXME check errors
if(s->pict_type==FF_P_TYPE) cbp^=0x3C;
}
}
@@ -1326,9 +1326,9 @@ av_cold int ff_msmpeg4_decode_init(MpegEncContext *s)
&v2_dc_chroma_table[0][1], 8, 4,
&v2_dc_chroma_table[0][0], 8, 4, 1506);
- INIT_VLC_STATIC(&cbpy_vlc, CBPY_VLC_BITS, 16,
- &cbpy_tab[0][1], 2, 1,
- &cbpy_tab[0][0], 2, 1, 64);
+ INIT_VLC_STATIC(&ff_h263_cbpy_vlc, CBPY_VLC_BITS, 16,
+ &ff_h263_cbpy_tab[0][1], 2, 1,
+ &ff_h263_cbpy_tab[0][0], 2, 1, 64);
INIT_VLC_STATIC(&v2_intra_cbpc_vlc, V2_INTRA_CBPC_VLC_BITS, 4,
&v2_intra_cbpc[0][1], 2, 1,
&v2_intra_cbpc[0][0], 2, 1, 8);
@@ -1357,11 +1357,11 @@ av_cold int ff_msmpeg4_decode_init(MpegEncContext *s)
&ff_msmp4_mb_i_table[0][0], 4, 2, 536);
INIT_VLC_STATIC(&v1_intra_cbpc_vlc, V1_INTRA_CBPC_VLC_BITS, 8,
- intra_MCBPC_bits, 1, 1,
- intra_MCBPC_code, 1, 1, 64);
+ ff_h263_intra_MCBPC_bits, 1, 1,
+ ff_h263_intra_MCBPC_code, 1, 1, 64);
INIT_VLC_STATIC(&v1_inter_cbpc_vlc, V1_INTER_CBPC_VLC_BITS, 25,
- inter_MCBPC_bits, 1, 1,
- inter_MCBPC_code, 1, 1, 104);
+ ff_h263_inter_MCBPC_bits, 1, 1,
+ ff_h263_inter_MCBPC_code, 1, 1, 104);
INIT_VLC_STATIC(&ff_inter_intra_vlc, INTER_INTRA_VLC_BITS, 4,
&table_inter_intra[0][1], 2, 1,