diff options
author | Vasile Toncu <vasile.toncu@tremend.com> | 2018-04-17 13:48:28 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-04-23 23:48:30 +0200 |
commit | 9c01cdb94e24aaf50f867a0a5c42b097c17c42b1 (patch) | |
tree | 1f4ada360bf58c0c46c58086d97fa4a9b27d53fb /libavfilter/x86 | |
parent | 4ac0ff8ec2afb609ecebcc135bbedf04b1dced5b (diff) | |
download | ffmpeg-9c01cdb94e24aaf50f867a0a5c42b097c17c42b1.tar.gz |
avfilter/vf_interlace: remove duplicate code with same funcionality
Diffstat (limited to 'libavfilter/x86')
-rw-r--r-- | libavfilter/x86/Makefile | 2 | ||||
-rw-r--r-- | libavfilter/x86/vf_interlace_init.c | 88 |
2 files changed, 1 insertions, 89 deletions
diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile index 4d4c5e503a..f60de3b73b 100644 --- a/libavfilter/x86/Makefile +++ b/libavfilter/x86/Makefile @@ -9,7 +9,7 @@ OBJS-$(CONFIG_FRAMERATE_FILTER) += x86/vf_framerate_init.o OBJS-$(CONFIG_HFLIP_FILTER) += x86/vf_hflip_init.o OBJS-$(CONFIG_HQDN3D_FILTER) += x86/vf_hqdn3d_init.o OBJS-$(CONFIG_IDET_FILTER) += x86/vf_idet_init.o -OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_interlace_init.o +OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_tinterlace_init.o OBJS-$(CONFIG_LIMITER_FILTER) += x86/vf_limiter_init.o OBJS-$(CONFIG_MASKEDMERGE_FILTER) += x86/vf_maskedmerge_init.o OBJS-$(CONFIG_NOISE_FILTER) += x86/vf_noise.o diff --git a/libavfilter/x86/vf_interlace_init.c b/libavfilter/x86/vf_interlace_init.c deleted file mode 100644 index 0de0fea382..0000000000 --- a/libavfilter/x86/vf_interlace_init.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2014 Kieran Kunhya <kierank@obe.tv> - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with FFmpeg; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "libavutil/attributes.h" -#include "libavutil/cpu.h" -#include "libavutil/internal.h" -#include "libavutil/mem.h" -#include "libavutil/x86/cpu.h" - -#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, int clip_max); -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, - 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_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, - 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 depth) -{ - int cpu_flags = av_get_cpu_flags(); - - if (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; - 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) - 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_AVX2_FAST(cpu_flags)) - if (s->lowpass == VLPF_LIN) - s->lowpass_line = ff_lowpass_line_avx2; - } -} |