changeset 10901:2a5c3d89201d libavcodec

Another microopt, 4 cpu cycles for avoidance of FFABS().
author michael
date Sat, 16 Jan 2010 16:14:32 +0000
parents a69d6f292f95
children 1e41e6ab9a18
files h264_loopfilter.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264_loopfilter.c	Sat Jan 16 15:54:01 2010 +0000
+++ b/h264_loopfilter.c	Sat Jan 16 16:14:32 2010 +0000
@@ -555,7 +555,7 @@
 
                 for( l = 0; !v && l < 1 + (h->slice_type_nos == FF_B_TYPE); l++ ) {
                     v |= ref2frm[l][h->ref_cache[l][b_idx]] != ref2frmn[l][h->ref_cache[l][bn_idx]] |
-                         FFABS( h->mv_cache[l][b_idx][0] - h->mv_cache[l][bn_idx][0] ) >= 4 |
+                         h->mv_cache[l][b_idx][0] - h->mv_cache[l][bn_idx][0] + 3 >= 7U |
                          FFABS( h->mv_cache[l][b_idx][1] - h->mv_cache[l][bn_idx][1] ) >= mvy_limit;
                 }
 
@@ -564,7 +564,7 @@
                     for( l = 0; !v && l < 2; l++ ) {
                         int ln= 1-l;
                         v |= ref2frm[l][h->ref_cache[l][b_idx]] != ref2frmn[ln][h->ref_cache[ln][bn_idx]] |
-                            FFABS( h->mv_cache[l][b_idx][0] - h->mv_cache[ln][bn_idx][0] ) >= 4 |
+                            h->mv_cache[l][b_idx][0] - h->mv_cache[ln][bn_idx][0] + 3 >= 7U |
                             FFABS( h->mv_cache[l][b_idx][1] - h->mv_cache[ln][bn_idx][1] ) >= mvy_limit;
                     }
                 }