aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2015-03-14 07:57:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2015-03-14 13:23:27 +0100
commit8200575d849473516cfe0a76cfceecdf9099a218 (patch)
tree2cb8c0664bdfd8925af8b02f09bc2560cf2f5c51 /libavcodec/x86
parent4eb4451be191a0144ee6af0650f3798b526b9b2c (diff)
downloadffmpeg-8200575d849473516cfe0a76cfceecdf9099a218.tar.gz
x86: dct-test: evaluate prores idct avx version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r--libavcodec/x86/dct-test.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/libavcodec/x86/dct-test.c b/libavcodec/x86/dct-test.c
index 63a9aeb9fb..d1a50677e8 100644
--- a/libavcodec/x86/dct-test.c
+++ b/libavcodec/x86/dct-test.c
@@ -26,21 +26,31 @@
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
int16_t *block, int16_t *qmat);
-static void ff_prores_idct_put_10_sse2_wrap(int16_t *dst){
- DECLARE_ALIGNED(16, static int16_t, qmat)[64];
- DECLARE_ALIGNED(16, static int16_t, tmp)[64];
- int i;
+#define PR_WRAP(INSN) \
+static void ff_prores_idct_put_10_##INSN##_wrap(int16_t *dst){ \
+ DECLARE_ALIGNED(16, static int16_t, qmat)[64]; \
+ DECLARE_ALIGNED(16, static int16_t, tmp)[64]; \
+ int i; \
+ \
+ for(i=0; i<64; i++){ \
+ qmat[i]=4; \
+ tmp[i]= dst[i]; \
+ } \
+ ff_prores_idct_put_10_##INSN (dst, 16, tmp, qmat); \
+ \
+ for(i=0; i<64; i++) { \
+ dst[i] -= 512; \
+ } \
+}
- for(i=0; i<64; i++){
- qmat[i]=4;
- tmp[i]= dst[i];
- }
- ff_prores_idct_put_10_sse2(dst, 16, tmp, qmat);
+PR_WRAP(sse2)
+
+# if HAVE_AVX_EXTERNAL
+void ff_prores_idct_put_10_avx(uint16_t *dst, int linesize,
+ int16_t *block, int16_t *qmat);
+PR_WRAP(avx)
+# endif
- for(i=0; i<64; i++) {
- dst[i] -= 512;
- }
-}
#endif
static const struct algo fdct_tab_arch[] = {
@@ -71,6 +81,9 @@ static const struct algo idct_tab_arch[] = {
#endif /* CONFIG_MPEG4_DECODER && HAVE_YASM */
#if (CONFIG_PRORES_DECODER || CONFIG_PRORES_LGPL_DECODER) && ARCH_X86_64 && HAVE_YASM
{ "PR-SSE2", ff_prores_idct_put_10_sse2_wrap, FF_IDCT_PERM_TRANSPOSE, AV_CPU_FLAG_SSE2, 1 },
+# if HAVE_AVX_EXTERNAL
+ { "PR-AVX", ff_prores_idct_put_10_avx_wrap, FF_IDCT_PERM_TRANSPOSE, AV_CPU_FLAG_AVX, 1 },
+# endif
#endif
{ 0 }
};