x86: dct-test: evaluate prores idct avx version

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Christophe Gisquet 2015-03-14 07:57:43 +00:00 committed by Michael Niedermayer
parent 4eb4451be1
commit 8200575d84
1 changed files with 27 additions and 14 deletions

View File

@ -26,21 +26,31 @@
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize, void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
int16_t *block, int16_t *qmat); int16_t *block, int16_t *qmat);
static void ff_prores_idct_put_10_sse2_wrap(int16_t *dst){ #define PR_WRAP(INSN) \
DECLARE_ALIGNED(16, static int16_t, qmat)[64]; static void ff_prores_idct_put_10_##INSN##_wrap(int16_t *dst){ \
DECLARE_ALIGNED(16, static int16_t, tmp)[64]; DECLARE_ALIGNED(16, static int16_t, qmat)[64]; \
int i; DECLARE_ALIGNED(16, static int16_t, tmp)[64]; \
int i; \
for(i=0; i<64; i++){ \
qmat[i]=4; for(i=0; i<64; i++){ \
tmp[i]= dst[i]; qmat[i]=4; \
} tmp[i]= dst[i]; \
ff_prores_idct_put_10_sse2(dst, 16, tmp, qmat); } \
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++) { \
} dst[i] -= 512; \
} \
} }
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
#endif #endif
static const struct algo fdct_tab_arch[] = { static const struct algo fdct_tab_arch[] = {
@ -71,6 +81,9 @@ static const struct algo idct_tab_arch[] = {
#endif /* CONFIG_MPEG4_DECODER && HAVE_YASM */ #endif /* CONFIG_MPEG4_DECODER && HAVE_YASM */
#if (CONFIG_PRORES_DECODER || CONFIG_PRORES_LGPL_DECODER) && ARCH_X86_64 && 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 }, { "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 #endif
{ 0 } { 0 }
}; };