diff options
author | Thomas Mundt <tmundt75@gmail.com> | 2017-09-19 22:23:23 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-09-23 16:19:58 -0300 |
commit | 40bfaa190c61b6eeff1b76b767c12edd6609967d (patch) | |
tree | 533340612ea536e60bd9189fb110772e4513a49a /libavfilter/x86/vf_interlace_init.c | |
parent | 58ca446672fec10e851b820ce7df64bd2d1f3a70 (diff) |
avfilter/interlace: add support for 10 and 12 bit
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/x86/vf_interlace_init.c')
-rw-r--r-- | libavfilter/x86/vf_interlace_init.c | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/libavfilter/x86/vf_interlace_init.c b/libavfilter/x86/vf_interlace_init.c index c0f04dcd97..70fe86ccff 100644 --- a/libavfilter/x86/vf_interlace_init.c +++ b/libavfilter/x86/vf_interlace_init.c @@ -27,27 +27,50 @@ #include "libavfilter/interlace.h" void ff_lowpass_line_sse2(uint8_t *dstp, ptrdiff_t linesize, - const uint8_t *srcp, - ptrdiff_t mref, ptrdiff_t pref); + const uint8_t *srcp, ptrdiff_t mref, + ptrdiff_t pref, int clip_max); void ff_lowpass_line_avx (uint8_t *dstp, ptrdiff_t linesize, - const uint8_t *srcp, - ptrdiff_t mref, ptrdiff_t pref); + 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, + ptrdiff_t pref, int clip_max); +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_complex_sse2(uint8_t *dstp, ptrdiff_t linesize, - const uint8_t *srcp, - ptrdiff_t mref, ptrdiff_t pref); + const uint8_t *srcp, ptrdiff_t mref, + ptrdiff_t pref, int clip_max); + +void ff_lowpass_line_complex_12_sse2(uint8_t *dstp, ptrdiff_t linesize, + const uint8_t *srcp, ptrdiff_t mref, + ptrdiff_t pref, int clip_max); av_cold void ff_interlace_init_x86(InterlaceContext *s) { int cpu_flags = av_get_cpu_flags(); - if (EXTERNAL_SSE2(cpu_flags)) { - if (s->lowpass == VLPF_LIN) - s->lowpass_line = ff_lowpass_line_sse2; - else if (s->lowpass == VLPF_CMP) - s->lowpass_line = ff_lowpass_line_complex_sse2; + if (s->csp->comp[0].depth > 8) { + if (EXTERNAL_SSE2(cpu_flags)) { + if (s->lowpass == VLPF_LIN) + s->lowpass_line = ff_lowpass_line_16_sse2; + else if (s->lowpass == VLPF_CMP) + s->lowpass_line = ff_lowpass_line_complex_12_sse2; + } + if (EXTERNAL_AVX(cpu_flags)) + if (s->lowpass == VLPF_LIN) + s->lowpass_line = ff_lowpass_line_16_avx; + } else { + if (EXTERNAL_SSE2(cpu_flags)) { + if (s->lowpass == VLPF_LIN) + s->lowpass_line = ff_lowpass_line_sse2; + else if (s->lowpass == VLPF_CMP) + s->lowpass_line = ff_lowpass_line_complex_sse2; + } + if (EXTERNAL_AVX(cpu_flags)) + if (s->lowpass == VLPF_LIN) + s->lowpass_line = ff_lowpass_line_avx; } - if (EXTERNAL_AVX(cpu_flags)) - if (s->lowpass == VLPF_LIN) - s->lowpass_line = ff_lowpass_line_avx; } |