diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-04-04 14:56:01 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-04-10 13:32:04 +0200 |
commit | 8a776ad90e00ab2b98e8683ac6182d641a383c3a (patch) | |
tree | 4671a446d30fcc2dbd313b66cc928bdb4134be5f /libavcodec/h261enc.c | |
parent | b93b27edb0455287f49182fbf11b68e575f59225 (diff) | |
download | ffmpeg-8a776ad90e00ab2b98e8683ac6182d641a383c3a.tar.gz |
h261: Move shared data tables from a header to a proper C file
Diffstat (limited to 'libavcodec/h261enc.c')
-rw-r--r-- | libavcodec/h261enc.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index ccc1fd279c..c866776a57 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -29,7 +29,6 @@ #include "mpegvideo.h" #include "h263.h" #include "h261.h" -#include "h261data.h" int ff_h261_get_picture_format(int width, int height) { @@ -129,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) val -= 32; @@ -137,7 +136,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); } } @@ -163,7 +162,7 @@ static void h261_encode_block(H261Context *h, int16_t *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]; @@ -253,8 +252,9 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64], } /* 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) { @@ -272,9 +272,11 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64], 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); @@ -294,7 +296,9 @@ void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64], 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 */ @@ -313,7 +317,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; |