Commit db6d0a5b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/snowenc: Fix used reference MV in fullpel iterative ME

This very very slightly improves quality, no measurable speed change
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f349703e
......@@ -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);
......
e4de85f539ef50b08d2a1dc7e57c7f49 *tests/data/fate/vsynth1-snow.avi
136080 tests/data/fate/vsynth1-snow.avi
91021b7d6d7908648fe78cc1975af8c4 *tests/data/fate/vsynth1-snow.out.rawvideo
61915927233f94db766dd968e750d6a8 *tests/data/fate/vsynth1-snow.avi
136324 tests/data/fate/vsynth1-snow.avi
443a1fbdfea490453e790b7e99c0c8df *tests/data/fate/vsynth1-snow.out.rawvideo
stddev: 22.77 PSNR: 20.98 MAXDIFF: 172 bytes: 7603200/ 7603200
a9e99877f757a99816fd82461d047812 *tests/data/fate/vsynth1-snow-hpel.avi
138704 tests/data/fate/vsynth1-snow-hpel.avi
d6845c8f1310e041afdcebc6bbfc449b *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
a49202654daa09408565be55b2a18010 *tests/data/fate/vsynth1-snow-hpel.avi
138684 tests/data/fate/vsynth1-snow-hpel.avi
00a7d96a4829e4babbe496bb0d1a1cdc *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
stddev: 22.74 PSNR: 20.99 MAXDIFF: 171 bytes: 7603200/ 7603200
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