diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-12-18 11:19:17 +0100 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2017-12-19 20:59:54 +0100 |
commit | 1a5865b6dcc97754a1d7eedc130fb58237d2a715 (patch) | |
tree | 96684044470a9e6b2ad7a7687ae4a5708b2a6d07 /libavfilter/x86 | |
parent | adff97be5e2ff51c0bb66080c2f904ed40b6c571 (diff) | |
download | ffmpeg-1a5865b6dcc97754a1d7eedc130fb58237d2a715.tar.gz |
avfilter/vf_interlace : add AVX2 for lowpass_line 8 and 16
Diffstat (limited to 'libavfilter/x86')
-rw-r--r-- | libavfilter/x86/vf_interlace.asm | 5 | ||||
-rw-r--r-- | libavfilter/x86/vf_interlace_init.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libavfilter/x86/vf_interlace.asm b/libavfilter/x86/vf_interlace.asm index 06b269828a..99ec9e0542 100644 --- a/libavfilter/x86/vf_interlace.asm +++ b/libavfilter/x86/vf_interlace.asm @@ -201,5 +201,10 @@ LOWPASS_LINE INIT_XMM avx LOWPASS_LINE +%if HAVE_AVX2_EXTERNAL +INIT_YMM avx2 +LOWPASS_LINE +%endif + INIT_XMM sse2 LOWPASS_LINE_COMPLEX diff --git a/libavfilter/x86/vf_interlace_init.c b/libavfilter/x86/vf_interlace_init.c index b024b61735..0de0fea382 100644 --- a/libavfilter/x86/vf_interlace_init.c +++ b/libavfilter/x86/vf_interlace_init.c @@ -32,6 +32,9 @@ void ff_lowpass_line_sse2(uint8_t *dstp, ptrdiff_t linesize, void ff_lowpass_line_avx (uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref, int clip_max); +void ff_lowpass_line_avx2 (uint8_t *dstp, ptrdiff_t linesize, + const uint8_t *srcp, ptrdiff_t mref, + ptrdiff_t pref, int clip_max); void ff_lowpass_line_16_sse2(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, @@ -39,6 +42,9 @@ void ff_lowpass_line_16_sse2(uint8_t *dstp, ptrdiff_t linesize, void ff_lowpass_line_16_avx (uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref, int clip_max); +void ff_lowpass_line_16_avx2 (uint8_t *dstp, ptrdiff_t linesize, + const uint8_t *srcp, ptrdiff_t mref, + ptrdiff_t pref, int clip_max); void ff_lowpass_line_complex_sse2(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, @@ -62,6 +68,9 @@ av_cold void ff_interlace_init_x86(InterlaceContext *s, int depth) if (EXTERNAL_AVX(cpu_flags)) if (s->lowpass == VLPF_LIN) s->lowpass_line = ff_lowpass_line_16_avx; + if (EXTERNAL_AVX2_FAST(cpu_flags)) + if (s->lowpass == VLPF_LIN) + s->lowpass_line = ff_lowpass_line_16_avx2; } else { if (EXTERNAL_SSE2(cpu_flags)) { if (s->lowpass == VLPF_LIN) @@ -72,5 +81,8 @@ av_cold void ff_interlace_init_x86(InterlaceContext *s, int depth) if (EXTERNAL_AVX(cpu_flags)) if (s->lowpass == VLPF_LIN) s->lowpass_line = ff_lowpass_line_avx; + if (EXTERNAL_AVX2_FAST(cpu_flags)) + if (s->lowpass == VLPF_LIN) + s->lowpass_line = ff_lowpass_line_avx2; } } |