Add support for super-res
Fixes #172 (closed).
To give a slightly longer explanation of what the patch does. Super_res allows a picture to be upscaled horizontally by a factor of up to 2 between CDEF and LR. Therefore, we make the following changes to accomodate:
- split
f->cur(Dav1dThreadPicture) intof->sr_cur(Dav1dThreadPicture) andf->cur(Dav1dPicture); the first deals with reconstruction (pre-resize), and the second deals only with LR (post-resize). Since progress to next frames is signaled after all post-filters, that means onlysr_curneeds to be aDav1dThreadPicture. If super_res is disabled, both point to the same data. If super_res is enabled, we use a normative scaling filter to upscalecurtosr_cur; - LR is changed so it decides whether to read LR coefs for edge superblocks based on pixel-accurate units, not block (aligned to 8 pixels) units;
- we add parsing for LR coefs when super_res is enabled;
-
Av1Filteris split intoAv1Filter(cdef/deblock) andAv1Restoration(LR), since the dimensions of one are pre-resize and the other one are post-resize. Same forlr_lpf_line; - normative horizontal rescaling filter in
MCDSPContext.
Edited by Ronald S. Bultje