diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-27 03:32:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-27 03:32:45 +0200 |
commit | f211d9d8391c15e7408b8468dd7430eae2514544 (patch) | |
tree | f432096b52ab7971a7ca7fb05db18dcc1cfcb3a5 /libavcodec/mpeg4videoenc.c | |
parent | 721719dd0c0321b47500fa49b649c78422e910aa (diff) | |
parent | 659aa20e56de03b461afdaa6ae7e5d4be6e0d5fc (diff) | |
download | ffmpeg-f211d9d8391c15e7408b8468dd7430eae2514544.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
build: improve rules for test programs
build: factor out the .c and .S compile commands as a macro
swscale: remove unused xInc/srcW arguments from hScale().
H.264: disable 2tap qpel with CODEC_FLAG2_FAST and >8-bit
H.264: make filter_mb_fast support 4:4:4
mpeg4videoenc: Remove disabled variant of mpeg4_encode_block().
configure: allow post-fixed cpu strings for athlon64, k8, and opteron when setting the -march flag.
Move some variable declarations below the proper #ifdefs.
Conflicts:
Makefile
ffplay.c
libswscale/swscale.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r-- | libavcodec/mpeg4videoenc.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index bdff535a99..2760ca064f 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -296,10 +296,6 @@ static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n uint8_t *scan_table, PutBitContext *dc_pb, PutBitContext *ac_pb) { int i, last_non_zero; -#if 0 //variables for the outcommented version - int code, sign, last; -#endif - const RLTable *rl; uint32_t *bits_tab; uint8_t *len_tab; const int last_index = s->block_last_index[n]; @@ -309,20 +305,17 @@ static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n mpeg4_encode_dc(dc_pb, intra_dc, n); if(last_index<1) return; i = 1; - rl = &ff_mpeg4_rl_intra; bits_tab= uni_mpeg4_intra_rl_bits; len_tab = uni_mpeg4_intra_rl_len; } else { if(last_index<0) return; i = 0; - rl = &ff_h263_rl_inter; bits_tab= uni_mpeg4_inter_rl_bits; len_tab = uni_mpeg4_inter_rl_len; } /* AC coefs */ last_non_zero = i - 1; -#if 1 for (; i < last_index; i++) { int level = block[ scan_table[i] ]; if (level) { @@ -348,64 +341,6 @@ static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n put_bits(ac_pb, 7+2+1+6+1+12+1, (3<<23)+(3<<21)+(1<<20)+(run<<14)+(1<<13)+(((level-64)&0xfff)<<1)+1); } } -#else - for (; i <= last_index; i++) { - const int slevel = block[ scan_table[i] ]; - if (slevel) { - int level; - int run = i - last_non_zero - 1; - last = (i == last_index); - sign = 0; - level = slevel; - if (level < 0) { - sign = 1; - level = -level; - } - code = get_rl_index(rl, last, run, level); - put_bits(ac_pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); - if (code == rl->n) { - int level1, run1; - level1 = level - rl->max_level[last][run]; - if (level1 < 1) - goto esc2; - code = get_rl_index(rl, last, run, level1); - if (code == rl->n) { - esc2: - put_bits(ac_pb, 1, 1); - if (level > MAX_LEVEL) - goto esc3; - run1 = run - rl->max_run[last][level] - 1; - if (run1 < 0) - goto esc3; - code = get_rl_index(rl, last, run1, level); - if (code == rl->n) { - esc3: - /* third escape */ - put_bits(ac_pb, 1, 1); - put_bits(ac_pb, 1, last); - put_bits(ac_pb, 6, run); - put_bits(ac_pb, 1, 1); - put_sbits(ac_pb, 12, slevel); - put_bits(ac_pb, 1, 1); - } else { - /* second escape */ - put_bits(ac_pb, 1, 0); - put_bits(ac_pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); - put_bits(ac_pb, 1, sign); - } - } else { - /* first escape */ - put_bits(ac_pb, 1, 0); - put_bits(ac_pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); - put_bits(ac_pb, 1, sign); - } - } else { - put_bits(ac_pb, 1, sign); - } - last_non_zero = i; - } - } -#endif } static int mpeg4_get_block_length(MpegEncContext * s, DCTELEM * block, int n, int intra_dc, |