[FFmpeg-cvslog] avfilter/avf_showcqt: avoid using fminf()
Michael Niedermayer
git at videolan.org
Fri Jun 6 17:30:58 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 6 16:31:31 2014 +0200| [867c02acd24126797753458a552336dc8f5a9088] | committer: Michael Niedermayer
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 at pkh.me>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=867c02acd24126797753458a552336dc8f5a9088
---
libavfilter/avf_showcqt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index eaa632d..0870507 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -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++)
More information about the ffmpeg-cvslog
mailing list