diff options
author | Niklas Haas <git@haasn.xyz> | 2019-01-01 07:30:00 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-02-18 01:54:06 +0200 |
commit | 6179dcbb798aa9e3501af82ae46975e881d80626 (patch) | |
tree | 4ec798500982b8a3bf39bb4a03fe242cca5555d1 /video/out/vo_caca.c | |
parent | 3fe882d4ae80fa060a71dad0d6d1605afcfe98b6 (diff) | |
download | mpv-6179dcbb798aa9e3501af82ae46975e881d80626.tar.bz2 mpv-6179dcbb798aa9e3501af82ae46975e881d80626.tar.xz |
vo_gpu: redesign peak detection algorithm
The previous approach of using an FIR with tunable hard threshold for
scene changes had several problems:
- the FIR involved annoying hard-coded buffer sizes, high VRAM usage,
and the FIR sum was prone to numerical overflow which limited the
number of frames we could average over. We also totally redesign the
scene change detection.
- the hard scene change detection was prone to both false positives and
false negatives, each with their own (annoying) issues.
Scrap this entirely and switch to a dual approach of using a simple
single-pole IIR low pass filter to smooth out noise, while using a
softer scene change curve (with tunable low and high thresholds), based
on `smoothstep`. The IIR filter is extremely simple in its
implementation and has an arbitrarily user-tunable cutoff frequency,
while the smoothstep-based scene change curve provides a good, tunable
tradeoff between adaptation speed and stability - without exhibiting
either of the traditional issues associated with the hard cutoff.
Another way to think about the new options is that the "low threshold"
provides a margin of error within which we don't care about small
fluctuations in the scene (which will therefore be smoothed out by the
IIR filter).
Diffstat (limited to 'video/out/vo_caca.c')
0 files changed, 0 insertions, 0 deletions