diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-10 23:13:59 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-11 21:46:33 +0200 |
commit | 5735f768b0b6d2f71478636502ba1e42f1a9a788 (patch) | |
tree | 75e14068ab4ef0ab4c02e54c74e3a0e74a9d0c54 /libavcodec/h261enc.c | |
parent | 6952301f33add347906af4d3e10b36a57d933ce0 (diff) | |
download | ffmpeg-5735f768b0b6d2f71478636502ba1e42f1a9a788.tar.gz |
h261: move tables from header to .c file.
Currently they end up twice in the binary, since both
encoder and decoder include the header and thus each gets
their own copy.
This is clearly nonsense for the const tables, but shouldn't
be necessary for the RLTable either.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/h261enc.c')
-rw-r--r-- | libavcodec/h261enc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index df97dc1988..a91652cd43 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -128,7 +128,7 @@ static void h261_encode_motion(H261Context * h, int val){ int sign, code; if(val==0){ code = 0; - put_bits(&s->pb,h261_mv_tab[code][1],h261_mv_tab[code][0]); + put_bits(&s->pb,ff_h261_mv_tab[code][1],ff_h261_mv_tab[code][0]); } else{ if(val > 15) @@ -137,7 +137,7 @@ static void h261_encode_motion(H261Context * h, int val){ val+=32; sign = val < 0; code = sign ? -val : val; - put_bits(&s->pb,h261_mv_tab[code][1],h261_mv_tab[code][0]); + put_bits(&s->pb,ff_h261_mv_tab[code][1],ff_h261_mv_tab[code][0]); put_bits(&s->pb,1,sign); } } @@ -182,7 +182,7 @@ void ff_h261_encode_mb(MpegEncContext * s, } /* MB is not skipped, encode MBA */ - put_bits(&s->pb, h261_mba_bits[(h->current_mba-h->previous_mba)-1], h261_mba_code[(h->current_mba-h->previous_mba)-1]); + put_bits(&s->pb, ff_h261_mba_bits[(h->current_mba-h->previous_mba)-1], ff_h261_mba_code[(h->current_mba-h->previous_mba)-1]); /* calculate MTYPE */ if(!s->mb_intra){ @@ -200,9 +200,9 @@ void ff_h261_encode_mb(MpegEncContext * s, if(s->dquant) h->mtype++; - put_bits(&s->pb, h261_mtype_bits[h->mtype], h261_mtype_code[h->mtype]); + put_bits(&s->pb, ff_h261_mtype_bits[h->mtype], ff_h261_mtype_code[h->mtype]); - h->mtype = h261_mtype_map[h->mtype]; + h->mtype = ff_h261_mtype_map[h->mtype]; if(IS_QUANT(h->mtype)){ ff_set_qscale(s,s->qscale+s->dquant); @@ -222,7 +222,7 @@ void ff_h261_encode_mb(MpegEncContext * s, if(HAS_CBP(h->mtype)){ assert(cbp>0); - put_bits(&s->pb,h261_cbp_tab[cbp-1][1],h261_cbp_tab[cbp-1][0]); + put_bits(&s->pb,ff_h261_cbp_tab[cbp-1][1],ff_h261_cbp_tab[cbp-1][0]); } for(i=0; i<6; i++) { /* encode each block */ @@ -240,7 +240,7 @@ void ff_h261_encode_init(MpegEncContext *s){ if (!done) { done = 1; - ff_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); + ff_init_rl(&ff_h261_rl_tcoeff, ff_h261_rl_table_store); } s->min_qcoeff= -127; @@ -260,7 +260,7 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){ int level, run, i, j, last_index, last_non_zero, sign, slevel, code; RLTable *rl; - rl = &h261_rl_tcoeff; + rl = &ff_h261_rl_tcoeff; if (s->mb_intra) { /* DC coef */ level = block[0]; |