2010-09-25 16:43:42 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2006 Michael Niedermayer <michaelni@gmx.at>
|
|
|
|
*
|
2011-03-18 17:35:10 +00:00
|
|
|
* This file is part of Libav.
|
2010-09-25 16:43:42 +00:00
|
|
|
*
|
2011-03-18 17:35:10 +00:00
|
|
|
* Libav is free software; you can redistribute it and/or modify
|
2010-09-25 16:43:42 +00:00
|
|
|
* 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.
|
|
|
|
*
|
2011-03-18 17:35:10 +00:00
|
|
|
* Libav is distributed in the hope that it will be useful,
|
2010-09-25 16:43:42 +00:00
|
|
|
* 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
|
2011-03-18 17:35:10 +00:00
|
|
|
* with Libav; if not, write to the Free Software Foundation, Inc.,
|
2010-09-25 16:43:42 +00:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2012-07-01 12:08:17 +00:00
|
|
|
#include "libavutil/attributes.h"
|
2010-09-25 16:43:42 +00:00
|
|
|
#include "libavutil/cpu.h"
|
2012-08-06 13:49:32 +00:00
|
|
|
#include "libavutil/internal.h"
|
|
|
|
#include "libavutil/mem.h"
|
2012-08-08 12:51:52 +00:00
|
|
|
#include "libavutil/x86/asm.h"
|
2013-01-09 15:34:46 +00:00
|
|
|
#include "libavutil/x86/cpu.h"
|
2010-09-25 16:43:42 +00:00
|
|
|
#include "libavfilter/yadif.h"
|
|
|
|
|
vf_yadif: silence a warning.
clang says:
libavfilter/vf_yadif.c:192:28: warning: incompatible pointer types assigning to
'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)'
from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)'
2013-01-26 19:49:16 +00:00
|
|
|
void ff_yadif_filter_line_mmxext(void *dst, void *prev, void *cur,
|
|
|
|
void *next, int w, int prefs,
|
2013-01-09 15:34:46 +00:00
|
|
|
int mrefs, int parity, int mode);
|
vf_yadif: silence a warning.
clang says:
libavfilter/vf_yadif.c:192:28: warning: incompatible pointer types assigning to
'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)'
from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)'
2013-01-26 19:49:16 +00:00
|
|
|
void ff_yadif_filter_line_sse2(void *dst, void *prev, void *cur,
|
|
|
|
void *next, int w, int prefs,
|
2013-01-09 15:34:46 +00:00
|
|
|
int mrefs, int parity, int mode);
|
vf_yadif: silence a warning.
clang says:
libavfilter/vf_yadif.c:192:28: warning: incompatible pointer types assigning to
'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)'
from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)'
2013-01-26 19:49:16 +00:00
|
|
|
void ff_yadif_filter_line_ssse3(void *dst, void *prev, void *cur,
|
|
|
|
void *next, int w, int prefs,
|
2013-01-09 15:34:46 +00:00
|
|
|
int mrefs, int parity, int mode);
|
2012-07-22 00:03:12 +00:00
|
|
|
|
2012-07-01 12:08:17 +00:00
|
|
|
av_cold void ff_yadif_init_x86(YADIFContext *yadif)
|
|
|
|
{
|
2013-04-22 02:57:48 +00:00
|
|
|
#if HAVE_YASM
|
2012-07-01 12:08:17 +00:00
|
|
|
int cpu_flags = av_get_cpu_flags();
|
|
|
|
|
2013-01-09 15:34:46 +00:00
|
|
|
#if ARCH_X86_32
|
2013-03-10 14:08:50 +00:00
|
|
|
if (EXTERNAL_MMXEXT(cpu_flags))
|
2013-01-09 15:34:46 +00:00
|
|
|
yadif->filter_line = ff_yadif_filter_line_mmxext;
|
|
|
|
#endif /* ARCH_X86_32 */
|
2013-03-10 14:08:50 +00:00
|
|
|
if (EXTERNAL_SSE2(cpu_flags))
|
2013-01-09 15:34:46 +00:00
|
|
|
yadif->filter_line = ff_yadif_filter_line_sse2;
|
2013-03-10 14:08:50 +00:00
|
|
|
if (EXTERNAL_SSSE3(cpu_flags))
|
2013-01-09 15:34:46 +00:00
|
|
|
yadif->filter_line = ff_yadif_filter_line_ssse3;
|
|
|
|
#endif /* HAVE_YASM */
|
2012-07-01 12:08:17 +00:00
|
|
|
}
|