diff options
-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; } |