]> git.sesse.net Git - x264/commit
Switch to exponential interpolation between presets. speedcontrol
authorSteinar H. Gunderson <sesse@google.com>
Thu, 21 Apr 2016 13:58:20 +0000 (15:58 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 23 Apr 2016 18:32:32 +0000 (20:32 +0200)
commit64db190d1157916a75656101fdf51e6bd00ba6e3
treef8db2a6f2081627c475dd45e7a7fedab73e4a66d
parenta20ab8599f7f0834993c0700b8766159872aedc4
Switch to exponential interpolation between presets.

The preset timings mostly grow in an exponential fashion, not linear,
and as such, interpolation should be exponential, too. More importantly,
this changes extrapolation to be exponential. This fixes an issue where
the chosen preset goes way out of range: If the picture has been at very low
complexity, we would have a very high target (say, 10000 seconds), which
due to linear interpolation would choose a way too high preset (say, preset
5000 out of 25). This would completely drown out the controller responsible
for turning down the preset based on the queue length alone; even though
it would subtract e.g. 20 levels from the chosen preset, still preset 4980
would we be chosen, and effectively, we'd oscillate between the highest
and the lowest presets all the time.

As an extra precaution, we cap the chosen preset to five levels of
extrapolation. This makes us less sensitive to choosing a max_presets where the
last two entries are not that far apart (throwing the extrapolation off).
encoder/speed.c