aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2013-01-17 01:24:15 -0500
committerLuca Barbato <lu_zero@gentoo.org>2013-01-17 22:00:01 +0100
commitc3c1db7c5637c4e4d8dfdd748466a223f83fffa8 (patch)
tree5121c92f90824340d20f6860590ef6dd96bd15df /libavcodec
parent21ca4ab9449f1165913fd971dc0eb7387b8fe5a8 (diff)
downloadffmpeg-c3c1db7c5637c4e4d8dfdd748466a223f83fffa8.tar.gz
rv30: fix masking in rv30_loop_filter()
The mask `x && (1 << y)' is incorrect and always yields true. The correct form should be `x & (1 << y)'. CC: libav-stable@libav.org Signed-off-by: Xi Wang <xi.wang@gmail.com> (cherry picked from commit 783e37f7ef3b3cdcfe7aa927a25b4184ae46cd53) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/rv30.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index e4f3251047..3c3579b565 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -182,7 +182,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
for(i = !mb_x; i < 2; i++, C += 4){
int ij = i + (j >> 1);
loc_lim = 0;
- if(cur_cbp && (1 << ij))
+ if (cur_cbp & (1 << ij))
loc_lim = cur_lim;
else if(!i && left_cbp & (1 << (ij + 1)))
loc_lim = left_lim;
@@ -224,7 +224,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
for(i = 0; i < 2; i++, C += 4){
int ij = i + (j >> 1);
loc_lim = 0;
- if(r->cbp_chroma[mb_pos] && (1 << ij))
+ if (r->cbp_chroma[mb_pos] & (1 << ij))
loc_lim = cur_lim;
else if(!j && top_cbp & (1 << (ij + 2)))
loc_lim = top_lim;