Mercurial > libavcodec.hg
diff h263.c @ 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 | c03a8c6c755b |
children | 82d006235248 |
line wrap: on
line diff
--- a/h263.c Fri Jan 08 17:41:14 2010 +0000 +++ b/h263.c Fri Jan 08 17:51:48 2010 +0000 @@ -505,7 +505,7 @@ 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 @@ 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 @@ } }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 @@ 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 @@ 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 @@ /***********************************************/ /* 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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;