summaryrefslogtreecommitdiff
path: root/libavcodec/h264_loopfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-16 16:14:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-16 16:14:32 +0000
commit3f55a651c44e8d5e7eaaf6dfb837721fae20885e (patch)
tree0ee59118e48c46b3695fa31315471d5018f93a80 /libavcodec/h264_loopfilter.c
parent1c6f46be03a6c23c9daba19c77b53aac6c1d83f2 (diff)
Another microopt, 4 cpu cycles for avoidance of FFABS().
Originally committed as revision 21248 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_loopfilter.c')
-rw-r--r--libavcodec/h264_loopfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 4d404d056d..e75ab3f8a9 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -555,7 +555,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
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 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
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;
}
}