diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-29 21:45:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-29 21:45:54 +0200 |
commit | dfa07e89289b25d44b6f2b959130077913921e0a (patch) | |
tree | b83687405107f879c20b2ccc3dd66d6db35ae4fa /libavcodec/rv34.c | |
parent | 46eba43e0ef28d9d08ed41774e6bd1ce94388c35 (diff) | |
parent | acb2c79c2102026747468dcafa6780ab1094b3c5 (diff) | |
download | ffmpeg-dfa07e89289b25d44b6f2b959130077913921e0a.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
4xm: fix invalid array indexing
rv34dsp: factorize a multiplication in the noround inverse transform
rv40: perform bitwise checks in loop filter
rv34: remove inline keyword from rv34_decode_block().
rv40: change a logical test into a bitwise one.
rv34: remove constant parameter
rv40: don't always do the full prev_type search
dsputil x86: revert a test back to its previous value
rv34dsp x86: implement MMX2 inverse transform
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 263ad94b17..62619b3203 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -260,20 +260,15 @@ static inline void decode_subblock1(DCTELEM *dst, int code, GetBitContext *gb, V decode_coeff(dst, coeff, 3, gb, vlc, q); } -static inline void decode_subblock3(DCTELEM *dst, int code, const int is_block2, GetBitContext *gb, VLC *vlc, +static inline void decode_subblock3(DCTELEM *dst, int code, GetBitContext *gb, VLC *vlc, int q_dc, int q_ac1, int q_ac2) { int flags = modulo_three_table[code]; - decode_coeff( dst+0*4+0, (flags >> 6) , 3, gb, vlc, q_dc); - if(is_block2){ - decode_coeff(dst+1*4+0, (flags >> 4) & 3, 2, gb, vlc, q_ac1); - decode_coeff(dst+0*4+1, (flags >> 2) & 3, 2, gb, vlc, q_ac1); - }else{ - decode_coeff(dst+0*4+1, (flags >> 4) & 3, 2, gb, vlc, q_ac1); - decode_coeff(dst+1*4+0, (flags >> 2) & 3, 2, gb, vlc, q_ac1); - } - decode_coeff( dst+1*4+1, (flags >> 0) & 3, 2, gb, vlc, q_ac2); + decode_coeff(dst+0*4+0, (flags >> 6) , 3, gb, vlc, q_dc); + decode_coeff(dst+0*4+1, (flags >> 4) & 3, 2, gb, vlc, q_ac1); + decode_coeff(dst+1*4+0, (flags >> 2) & 3, 2, gb, vlc, q_ac1); + decode_coeff(dst+1*4+1, (flags >> 0) & 3, 2, gb, vlc, q_ac2); } /** @@ -287,7 +282,7 @@ static inline void decode_subblock3(DCTELEM *dst, int code, const int is_block2, * o--o */ -static inline int rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rvlc, int fc, int sc, int q_dc, int q_ac1, int q_ac2) +static int rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rvlc, int fc, int sc, int q_dc, int q_ac1, int q_ac2) { int code, pattern, has_ac = 1; @@ -298,7 +293,7 @@ static inline int rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rv code >>= 3; if (modulo_three_table[code] & 0x3F) { - decode_subblock3(dst, code, 0, gb, &rvlc->coefficient, q_dc, q_ac1, q_ac2); + decode_subblock3(dst, code, gb, &rvlc->coefficient, q_dc, q_ac1, q_ac2); } else { decode_subblock1(dst, code, gb, &rvlc->coefficient, q_dc); if (!pattern) @@ -318,7 +313,7 @@ static inline int rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rv code = get_vlc2(gb, rvlc->third_pattern[sc].table, 9, 2); decode_subblock(dst + 4*2+2, code, 0, gb, &rvlc->coefficient, q_ac2); } - return has_ac || pattern; + return has_ac | pattern; } /** |