1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter/avf_showcqt: avoid using fminf()

The loop with fminf() changes from 18093856 to 17403218 dezicycles (gcc 4.6.3, sandybridge i7)

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-06-06 16:31:31 +02:00
parent afce834843
commit 867c02acd2

View File

@ -357,9 +357,9 @@ static int plot_cqt(AVFilterLink *inlink)
result[x][2] = r.re * r.re + r.im * r.im;
result[x][1] = 0.5f * (result[x][0] + result[x][2]);
result[x][3] = result[x][1];
result[x][0] = 255.0f * powf(fminf(1.0f,result[x][0]), g);
result[x][1] = 255.0f * powf(fminf(1.0f,result[x][1]), g);
result[x][2] = 255.0f * powf(fminf(1.0f,result[x][2]), g);
result[x][0] = 255.0f * powf(FFMIN(1.0f,result[x][0]), g);
result[x][1] = 255.0f * powf(FFMIN(1.0f,result[x][1]), g);
result[x][2] = 255.0f * powf(FFMIN(1.0f,result[x][2]), g);
}
for (x = 0; x < VIDEO_WIDTH; x++)