Commit 0d3c9065 authored by Romain Vimont's avatar Romain Vimont Committed by Luca Barbato

Fix refactor of subsampled motion estimation

In commit 1d39058a, I didn't notice that
the offsets were different for each save_block_motion() call.

As a result, objective quality results decreased:

  PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
0.3851 |  0.3281 |  0.3225 |   0.3801 | 0.3967 |  0.3853 |     0.3381
parent 3c2aebf8
......@@ -2141,10 +2141,17 @@ fn encode_tile<T: Pixel>(
fi, fs, BlockSize::BLOCK_32X32, r, sbo.block_offset(8, 8), &[Some(pmv), pmv_e, pmv_s], i
);
for k in 1..5 {
if let Some(mv) = pmvs[k][r] {
save_block_motion(fs, fi.w_in_b, fi.h_in_b, BlockSize::BLOCK_32X32, sbo.block_offset(0, 0), i, mv);
}
if let Some(mv) = pmvs[1][r] {
save_block_motion(fs, fi.w_in_b, fi.h_in_b, BlockSize::BLOCK_32X32, sbo.block_offset(0, 0), i, mv);
}
if let Some(mv) = pmvs[2][r] {
save_block_motion(fs, fi.w_in_b, fi.h_in_b, BlockSize::BLOCK_32X32, sbo.block_offset(8, 0), i, mv);
}
if let Some(mv) = pmvs[3][r] {
save_block_motion(fs, fi.w_in_b, fi.h_in_b, BlockSize::BLOCK_32X32, sbo.block_offset(0, 8), i, mv);
}
if let Some(mv) = pmvs[4][r] {
save_block_motion(fs, fi.w_in_b, fi.h_in_b, BlockSize::BLOCK_32X32, sbo.block_offset(8, 8), i, mv);
}
}
}
......
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