diff options
author | plepere <pierre-edouard.lepere@insa-rennes.fr> | 2014-06-16 14:47:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-25 14:49:44 +0200 |
commit | 942e22c651166e8aa67bfffa7a431970200d3203 (patch) | |
tree | 5021462f1fc42fd5720fcb5e008d1cfef33ab881 /libavcodec/x86/hevcdsp_init.c | |
parent | a30f1b15c7ee559fecd14b381d1f4352e394ab5d (diff) |
avcodec/x86/hevc: add avx2 dc idct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/hevcdsp_init.c')
-rw-r--r-- | libavcodec/x86/hevcdsp_init.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 58a0891e5b..cad236ddad 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -92,6 +92,17 @@ void ff_hevc_idct32_dc_add_10_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t strid } #endif //HAVE_AVX_EXTERNAL +#if HAVE_AVX2_EXTERNAL + +void ff_hevc_idct32_dc_add_10_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +{ + ff_hevc_idct16_dc_add_10_avx2(dst, coeffs, stride); + ff_hevc_idct16_dc_add_10_avx2(dst+32, coeffs, stride); + ff_hevc_idct16_dc_add_10_avx2(dst+16*stride, coeffs, stride); + ff_hevc_idct16_dc_add_10_avx2(dst+16*stride+32, coeffs, stride); +} +#endif //HAVE_AVX2_EXTERNAL + #define mc_rep_func(name, bitd, step, W, opt) \ void ff_hevc_put_hevc_##name##W##_##bitd##_##opt(int16_t *_dst, ptrdiff_t dststride, \ uint8_t *_src, ptrdiff_t _srcstride, int height, \ @@ -438,6 +449,9 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth) QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8, sse4); QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv, 8, sse4); } + if (EXTERNAL_AVX2(mm_flags)) { + c->transform_dc_add[3] = ff_hevc_idct32_dc_add_8_avx2; + } } else if (bit_depth == 10) { if (EXTERNAL_MMXEXT(mm_flags)) { c->transform_dc_add[0] = ff_hevc_idct4_dc_add_10_mmxext; @@ -473,6 +487,10 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->transform_dc_add[2] = ff_hevc_idct16_dc_add_10_avx; c->transform_dc_add[3] = ff_hevc_idct32_dc_add_10_avx; } + if (EXTERNAL_AVX2(mm_flags)) { + c->transform_dc_add[2] = ff_hevc_idct16_dc_add_10_avx2; + c->transform_dc_add[3] = ff_hevc_idct32_dc_add_10_avx2; + } } } |