summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-21 18:06:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-21 18:06:23 +0000
commit72caa912f24f31a2a958831382f2485354e38702 (patch)
tree609064e13c0cc66bf68bed74991c418cbe8cd23f /libavcodec/h264.c
parent091d3bdc738c547ab4ccf1bc71f3e1f08343330e (diff)
More correct ref comparison in the loop filter.
Originally committed as revision 14322 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7fa1b07473..c35779dfcb 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -6727,7 +6727,7 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
int b_idx= 8 + 4 + edge * (dir ? 8:1);
int bn_idx= b_idx - (dir ? 8:1);
int v = 0;
- int xn= (h->ref_cache[0][ b_idx] ^ h->ref_cache[0][bn_idx]) < 0;
+ int xn= h->slice_type == FF_B_TYPE && h->ref2frm[0][h->ref_cache[0][b_idx]+2] != h->ref2frm[0][h->ref_cache[0][bn_idx]+2];
for( l = 0; !v && l < 1 + (h->slice_type == FF_B_TYPE); l++ ) {
int ln= l^xn;
@@ -6753,7 +6753,7 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
}
else if(!mv_done)
{
- int xn= (h->ref_cache[0][ b_idx] ^ h->ref_cache[0][bn_idx]) < 0;
+ int xn= h->slice_type == FF_B_TYPE && h->ref2frm[0][h->ref_cache[0][b_idx]+2] != h->ref2frm[0][h->ref_cache[0][bn_idx]+2];
bS[i] = 0;
for( l = 0; l < 1 + (h->slice_type == FF_B_TYPE); l++ ) {
int ln= l^xn;