[FFmpeg-cvslog] avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale
Paul B Mahol
git at videolan.org
Sun Sep 19 14:50:41 EEST 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep 19 13:47:59 2021 +0200| [0b150e4f614aa5eda415ade9b2c80a0707c647dc] | committer: Paul B Mahol
avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b150e4f614aa5eda415ade9b2c80a0707c647dc
---
libavfilter/avf_avectorscope.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
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;
}
More information about the ffmpeg-cvslog
mailing list