summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-30 20:07:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-30 20:07:37 +0000
commit26468148979842f2c76531b8646bfbcae23a9a74 (patch)
tree56a3fd5598082e7c629995188ddbeee7bbcc0553
parent3d05c1fbec5cd6c9622b8b2021f00d4a8dc8f5a4 (diff)
Split first reference list comparission from mv comparission.
about 0.5% faster MBAFF loop filtering Originally committed as revision 21552 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264_loopfilter.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 2c27929b55..e7cece38a8 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -418,9 +418,10 @@ void ff_h264_filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y,
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)