diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-10 01:57:06 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-10 02:05:42 +0300 |
commit | db6d0a5bd2447b764d67bcd66741e8044a3d7c3f (patch) | |
tree | 2301fbdae8645b077f80b76e32ad33897c3195ee /libavcodec/snowenc.c | |
parent | f349703e1dcc2181a3f7557b8547664cedfedbb3 (diff) |
avcodec/snowenc: Fix used reference MV in fullpel iterative ME
This very very slightly improves quality, no measurable speed change
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index a30c618004..a8f4106355 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1112,13 +1112,15 @@ static void iterative_me(SnowContext *s){ /* fullpel ME */ //FIXME avoid subpel interpolation / round to nearest integer do{ + int newx = block->mx; + int newy = block->my; dia_change=0; for(i=0; i<FFMAX(s->avctx->dia_size, 1); i++){ for(j=0; j<i; j++){ - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my+(4*j), obmc_edged, &best_rd); - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my-(4*j), obmc_edged, &best_rd); - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my-(4*j), obmc_edged, &best_rd); - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my+(4*j), obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, newx+4*(i-j), newy+(4*j), obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, newx-4*(i-j), newy-(4*j), obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, newx+4*(i-j), newy-(4*j), obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, newx-4*(i-j), newy+(4*j), obmc_edged, &best_rd); } } }while(dia_change); |