changeset 11061:40b84645b089 libavcodec

Split first reference list comparission from mv comparission. about 0.5% faster MBAFF loop filtering
author michael
date Sat, 30 Jan 2010 20:07:37 +0000
parents daff45175333
children a8e640f4f388
files h264_loopfilter.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/h264_loopfilter.c	Sat Jan 30 19:26:47 2010 +0000
+++ b/h264_loopfilter.c	Sat Jan 30 20:07:37 2010 +0000
@@ -418,9 +418,10 @@
 static int check_mv(H264Context *h, long b_idx, long bn_idx, int mvy_limit){
     int v;
 
-    v = h->ref_cache[0][b_idx] != h->ref_cache[0][bn_idx] |
-        h->mv_cache[0][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U |
-        FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit;
+    v= h->ref_cache[0][b_idx] != h->ref_cache[0][bn_idx];
+    if(!v && h->ref_cache[0][b_idx]!=-1)
+        v= h->mv_cache[0][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U |
+           FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit;
 
     if(h->list_count==2){
         if(!v)