diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-11-21 09:17:44 +0100 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2017-11-21 09:42:08 +0100 |
commit | ba98f8463fd1345fab173fa405ac98aefd92ed06 (patch) | |
tree | 6a7f58c62d2faeb2ce33547abf95f0bbce16dec0 | |
parent | d189a426fa0e7b8a7bb62d797ed490ece868da28 (diff) | |
download | ffmpeg-ba98f8463fd1345fab173fa405ac98aefd92ed06.tar.gz |
avcodec/huffyuvdspenc : add diff_int16 AVX2 func
-rw-r--r-- | libavcodec/x86/huffyuvencdsp.asm | 4 | ||||
-rw-r--r-- | libavcodec/x86/huffyuvencdsp_init.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/x86/huffyuvencdsp.asm b/libavcodec/x86/huffyuvencdsp.asm index 3f5a7df7ff..d994fd0fd6 100644 --- a/libavcodec/x86/huffyuvencdsp.asm +++ b/libavcodec/x86/huffyuvencdsp.asm @@ -59,6 +59,10 @@ DIFF_INT16 INIT_XMM sse2 DIFF_INT16 +%if HAVE_AVX2_EXTERNAL +INIT_YMM avx2 +DIFF_INT16 +%endif INIT_MMX mmxext cglobal sub_hfyu_median_pred_int16, 7,7,0, dst, src1, src2, mask, w, left, left_top diff --git a/libavcodec/x86/huffyuvencdsp_init.c b/libavcodec/x86/huffyuvencdsp_init.c index f66bc8c4f0..6c6e068cf8 100644 --- a/libavcodec/x86/huffyuvencdsp_init.c +++ b/libavcodec/x86/huffyuvencdsp_init.c @@ -32,6 +32,8 @@ void ff_diff_int16_mmx (uint16_t *dst, const uint16_t *src1, const uint16_t *src unsigned mask, int w); void ff_diff_int16_sse2(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w); +void ff_diff_int16_avx2(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, + unsigned mask, int w); void ff_sub_hfyu_median_pred_int16_mmxext(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w, int *left, int *left_top); @@ -51,4 +53,8 @@ av_cold void ff_huffyuvencdsp_init_x86(HuffYUVEncDSPContext *c, AVCodecContext * if (EXTERNAL_SSE2(cpu_flags)) { c->diff_int16 = ff_diff_int16_sse2; } + + if (EXTERNAL_AVX2_FAST(cpu_flags)) { + c->diff_int16 = ff_diff_int16_avx2; + } } |