ffmpeg | branch: master | Paul B Mahol <[email protected]> | 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;
     }
 

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to