mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-25 19:01:51 +02:00
avfilter/avf_showcqt: Fix gamma comparisons
Fixes CID1297587, CID1297586, 1297585 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0d05406482
commit
d3c9f1fdbe
@ -585,11 +585,11 @@ static int plot_cqt(AVFilterLink *inlink)
|
|||||||
|
|
||||||
if (s->gamma2 == 1.0f)
|
if (s->gamma2 == 1.0f)
|
||||||
result[x][3] = result[x][1];
|
result[x][3] = result[x][1];
|
||||||
else if (s->gamma2 = 2.0f)
|
else if (s->gamma2 == 2.0f)
|
||||||
result[x][3] = sqrtf(result[x][1]);
|
result[x][3] = sqrtf(result[x][1]);
|
||||||
else if (s->gamma2 = 3.0f)
|
else if (s->gamma2 == 3.0f)
|
||||||
result[x][3] = cbrtf(result[x][1]);
|
result[x][3] = cbrtf(result[x][1]);
|
||||||
else if (s->gamma2 = 4.0f)
|
else if (s->gamma2 == 4.0f)
|
||||||
result[x][3] = sqrtf(sqrtf(result[x][1]));
|
result[x][3] = sqrtf(sqrtf(result[x][1]));
|
||||||
else
|
else
|
||||||
result[x][3] = expf(logf(result[x][1]) * (1.0f / s->gamma2));
|
result[x][3] = expf(logf(result[x][1]) * (1.0f / s->gamma2));
|
||||||
|
Loading…
Reference in New Issue
Block a user