diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-09-19 13:47:59 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-09-19 13:49:55 +0200 |
commit | 0b150e4f614aa5eda415ade9b2c80a0707c647dc (patch) | |
tree | a39848ea7e6375bb0174caeabd422a92edbe3927 /libavfilter | |
parent | 7747ab7dedb9f489256cbd9149e9bb2b9c59c931 (diff) | |
download | ffmpeg-0b150e4f614aa5eda415ade9b2c80a0707c647dc.tar.gz |
avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avf_avectorscope.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index e1d43b4766..e927b241ff 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -303,6 +303,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) av_assert2(0); } + switch (s->scale) { + case SQRT: + max = sqrtf(max); + break; + case CBRT: + max = cbrtf(max); + break; + case LOG: + max = logf(1 + max) / logf(2); + break; + } + zoom = 1. / max; } |