rav1e
rav1e copied to clipboard
[WIP] Bias RDO based on activity
Biasing the distortion based on activity measured using activity calculated in #1263. The scale for the distortion bias will be computed empirically to produce encodes of the same file size as without activity bias.
The plan is to use Newton-Raphson Method to compute the scale which minimizes MSE of file size as compared to encodes without any activity bias.
s' = s - (MSE/f'(s))
where f : s -> file_size
Have you tried running this through AWCY?
Have you tried running this through AWCY?
Not yet.
s' = s - (MSE/f'(s)) where f : s -> file_size
I'm trying to derive the function in order to perform Newton's method on Hydra. I plan to run encodes to sample values of this function, plot a graph and try to approximate an equation for f (assuming that f does not change with quantizer value).
In case you missed it on IRC:
[08:51] < barrbrain_> Taking a look at s_p's WIP 1323, if using many tiles and --tune Psnr it may behave as intended.
[08:53] < barrbrain_> Otherwise, tile granularity is too coarse and --tune doubles up on biasing for activity.
[08:53] < barrbrain_> *--tune Pschovisual
This may be related to what we saw with the horse picture on Friday.
Coverage increased (+0.1%) to 75.604% when pulling 4a52db4c425e0d080b16e52768e5b45688ee3085 on shreevari:biasing_rdo into 08b6705b764ba5b258f4bbec81e964f1d19e379b on xiph:master.
The scale is tuned using Newton-Raphson's algorithm. Data gathered for tuning can be found here.
Do you have awcy results of this rebased on the new activity masking patch?
Do you have awcy results of this rebased on the new activity masking patch?
The scale needs tuning. I am yet to figure out how to change the scale with respect to the base quantizer. I've to discuss this with @tterribe.
Please check my relevant comment at https://github.com/xiph/rav1e/pull/1485#issuecomment-540082355 I probably should have stated this earlier, I think the activity based RDO would not help yielding PSNR gains by its nature but is more expected to have gains in the metrics that are similar to the methodology to obtain activity. Hence, it is even possible that no subjective quality metric, though ssim usually responds to activity masking based rdo, is available to reflect the gains from activity based RDO. In any case, when we apply activity masking, I hope we don't spare efforts doing visually checking the decoded video.
This has been partly superseded by the changes in #2682. In particular, it was made explicit that the activity scale is implied by ssim_boost
as a function of variance. The work of rationalising the various factors in weighting distortion is yet to be completed.