History

avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale

Paul B Mahol committed 5 years ago

Commit 0b150e41 parent 7747ab71 file · +12 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/avf_avectorscope.c+12−0
@@ -303,6 +303,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 302 unmodified lines
303303 av_assert2(0);
304304 }
305305
306+ switch (s->scale) {
307+ case SQRT:
308+ max = sqrtf(max);
309+ break;
310+ case CBRT:
311+ max = cbrtf(max);
312+ break;
313+ case LOG:
314+ max = logf(1 + max) / logf(2);
315+ break;
316+ }
317+
306318 zoom = 1. / max;
307319 }
308320

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t