Commit 3f55a651 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

Another microopt, 4 cpu cycles for avoidance of FFABS().

Originally committed as revision 21248 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1c6f46be
......@@ -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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment