changeset 7337:1328ffc5e0fd libavcodec

More correct ref comparison in the loop filter.
author michael
date Mon, 21 Jul 2008 18:06:23 +0000
parents aaf3e396f094
children b088035801d5
files h264.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Mon Jul 21 01:41:56 2008 +0000
+++ b/h264.c	Mon Jul 21 18:06:23 2008 +0000
@@ -6727,7 +6727,7 @@
                     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 @@
                     }
                     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;