Remove the MV grid border

Multimedia / Daala - Timothy B. Terriberry [xiph.org] - 28 April 2015 22:52 UTC

We had a border of +/- 8 pixels to the MV grid relative to the
video frame. When 16x16 was the largest transform block size we supported, this meant that we were always able to compute the prediction 8 pixels in advance of a 16x16 MB (assuming that some day we encoded MVs in the stream interleaved with coefficient data), which was exactly what we needed for the lapping. However, when we added a 32-point filter, 16 pixels was no longer enough, and when we switched to fixed-lapping, it is now too much (4 pixels would have been enough). Since it's not really practical to add a 4-pixel offset when the maximum block size is 32x32 (or even 64x64), since it would mean accurately representing MVs on the border would require lots of splitting, instead this commit just removes the border. This will simplify implementing 32x32 MV blocks.

Some things get simpler with this approach (e.g., all the special cases for grid points outside the frame go away), and some things get more complicated (we can no longer assume the neighbor of a grid point inside the frame must exist when computing predictors, and have to do special tricks to ensure level 2 and 4 MVs on the top/left edges have predictors at all). Overall it's probably a bit simpler. The worst place complications show up is the MV prediction, which at least is self-contained, if unfortunately called quite frequently. But it should definitely make things simpler to reason about going forward.

Results on metrics are mixed, but small:

RATE (%) DSNR (dB) PSNR 0.07743 -0.00290 PSNRHVS 0.04403 -0.00245 SSIM -0.03269 0.00096 FASTSSIM -0.15730 0.00501

4613109 Remove the MV grid border.
src/decode.c | 65 ++----
src/encode.c | 90 ++------
src/mc.c | 174 +++++++-------
src/mcenc.c | 719 +++++++++++++++++++++++++++++-----------------------------
src/state.c | 66 ++----
5 files changed, 499 insertions(+), 615 deletions(-)

Upstream: git.xiph.org


  • Share