Skip to content

Instantly share code, notes, and snippets.

@shreevari
Last active July 10, 2019 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreevari/3aa043a35f87099263b4160769c465e8 to your computer and use it in GitHub Desktop.
Save shreevari/3aa043a35f87099263b4160769c465e8 to your computer and use it in GitHub Desktop.
Relation between biasing scale and encoded file size.

Biasing RDO using scale s_1

biased_distortion = actual_distortion * (s_1 * (mean_activity as f64 / activity as f64) + s_0)

Sets encoded : subset3-y4m and objective-1-fast.

Interpolated scale is to be used as a starting point for Newton-Raphson method to derive the biasing scale as follows:

s' = s - (MSE/f'(s))
where f : s -> file_size

Mean Squared Error

MSE = (Sum(biased_encode - unbiased_encode) ^ 2) / n

Mean Squared Relative error

MSRE = (Sum((biased_encode - unbiased_encode) / unbiased_encode) ^ 2) / n

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment