summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showcqt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-06 16:31:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-06 17:20:05 +0200
commit867c02acd24126797753458a552336dc8f5a9088 (patch)
treeff419ba09d5333c911ca0ac6cca60b5a35278f97 /libavfilter/avf_showcqt.c
parentafce8348432463e135f2de69844e55598539c6bf (diff)
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>
Diffstat (limited to 'libavfilter/avf_showcqt.c')
-rw-r--r--libavfilter/avf_showcqt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index eaa632d18b..0870507051 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++)