Mercurial > libavcodec.hg
comparison h264_loopfilter.c @ 11039:b9a6d26f48eb libavcodec
Restructure if() in check_mv()
quite a bit faster
author | michael |
---|---|
date | Thu, 28 Jan 2010 10:38:43 +0000 |
parents | ee6d89b26e7f |
children | f0b31169d04d |
comparison
equal
deleted
inserted
replaced
11038:ee6d89b26e7f | 11039:b9a6d26f48eb |
---|---|
428 int v; | 428 int v; |
429 | 429 |
430 v = h->ref_cache[0][b_idx] != h->ref_cache[0][bn_idx] | | 430 v = h->ref_cache[0][b_idx] != h->ref_cache[0][bn_idx] | |
431 h->mv_cache[0][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U | | 431 h->mv_cache[0][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U | |
432 FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit; | 432 FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit; |
433 if(h->list_count==2 && !v) | 433 |
434 if(h->list_count==2){ | |
435 if(!v) | |
434 v = h->ref_cache[1][b_idx] != h->ref_cache[1][bn_idx] | | 436 v = h->ref_cache[1][b_idx] != h->ref_cache[1][bn_idx] | |
435 h->mv_cache[1][b_idx][0] - h->mv_cache[1][bn_idx][0] + 3 >= 7U | | 437 h->mv_cache[1][b_idx][0] - h->mv_cache[1][bn_idx][0] + 3 >= 7U | |
436 FFABS( h->mv_cache[1][b_idx][1] - h->mv_cache[1][bn_idx][1] ) >= mvy_limit; | 438 FFABS( h->mv_cache[1][b_idx][1] - h->mv_cache[1][bn_idx][1] ) >= mvy_limit; |
437 | 439 |
438 if(h->list_count==2 && v){ | 440 if(v){ |
439 if(h->ref_cache[0][b_idx] != h->ref_cache[1][bn_idx] | | 441 if(h->ref_cache[0][b_idx] != h->ref_cache[1][bn_idx] | |
440 h->mv_cache[0][b_idx][0] - h->mv_cache[1][bn_idx][0] + 3 >= 7U | | 442 h->mv_cache[0][b_idx][0] - h->mv_cache[1][bn_idx][0] + 3 >= 7U | |
441 FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[1][bn_idx][1] ) >= mvy_limit) | 443 FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[1][bn_idx][1] ) >= mvy_limit) |
442 return 1; | 444 return 1; |
443 if(h->ref_cache[1][b_idx] != h->ref_cache[0][bn_idx] | | 445 if(h->ref_cache[1][b_idx] != h->ref_cache[0][bn_idx] | |
444 h->mv_cache[1][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U | | 446 h->mv_cache[1][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U | |
445 FFABS( h->mv_cache[1][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit) | 447 FFABS( h->mv_cache[1][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit) |
446 return 1; | 448 return 1; |
447 return 0; | 449 return 0; |
450 } | |
448 } | 451 } |
449 | 452 |
450 return v; | 453 return v; |
451 } | 454 } |
452 | 455 |