summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showcqt.c
diff options
context:
space:
mode:
authorMuhammad Faiz <mfcc64@gmail.com>2016-06-04 14:33:05 +0700
committerMuhammad Faiz <mfcc64@gmail.com>2016-06-08 16:09:43 +0700
commit1e69ac9246be8c9a1bf595e7fe949df5bc541c55 (patch)
tree1a27b5398516a8ccbaeb71048a17200f621f6b30 /libavfilter/avf_showcqt.c
parent49b024663501320310ec729f3bd15d0420bd9e59 (diff)
avfilter/avf_showcqt: cqt_calc optimization on x86
on x86_64: time PSNR plain 3.303 inf SSE 1.649 107.087535 SSE3 1.632 107.087535 AVX 1.409 106.986771 FMA3 1.265 107.108437 on x86_32 (PSNR compared to x86_64 plain): time PSNR plain 7.225 103.951979 SSE 1.827 105.859282 SSE3 1.819 105.859282 AVX 1.533 105.997661 FMA3 1.384 105.885377 FMA4 test is not available Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libavfilter/avf_showcqt.c')
-rw-r--r--libavfilter/avf_showcqt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index b88c83cfa6..62d5b09d8c 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -320,6 +320,9 @@ static int init_cqt(ShowCQTContext *s)
w *= sign * (1.0 / s->fft_len);
s->coeffs[m].val[x - s->coeffs[m].start] = w;
}
+
+ if (s->permute_coeffs)
+ s->permute_coeffs(s->coeffs[m].val, s->coeffs[m].len);
}
av_expr_free(expr);
@@ -1230,6 +1233,7 @@ static int config_output(AVFilterLink *outlink)
s->cqt_align = 1;
s->cqt_calc = cqt_calc;
+ s->permute_coeffs = NULL;
s->draw_sono = draw_sono;
if (s->format == AV_PIX_FMT_RGB24) {
s->draw_bar = draw_bar_rgb;
@@ -1241,6 +1245,9 @@ static int config_output(AVFilterLink *outlink)
s->update_sono = update_sono_yuv;
}
+ if (ARCH_X86)
+ ff_showcqt_init_x86(s);
+
if ((ret = init_cqt(s)) < 0)
return ret;