* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "config.h"
+
#include <gstyadif.h>
#include <string.h>
#endif
void yadif_filter (GstYadif * yadif, int parity, int tff);
-void filter_line_x86 (guint8 * dst,
+#ifdef HAVE_CPU_X86_64
+void filter_line_x86_64 (guint8 * dst,
guint8 * prev, guint8 * cur, guint8 * next,
int w, int prefs, int mrefs, int parity, int mode);
+#endif
void
yadif_filter (GstYadif * yadif, int parity, int tff)
guint8 *next = next_data + y * refs;
guint8 *dst = dest_data + y * refs;
int mode = ((y == 1) || (y + 2 == h)) ? 2 : yadif->mode;
+#if HAVE_CPU_X86_64
if (0) {
filter_line_c (dst, prev, cur, next, w,
y + 1 < h ? refs : -refs, y ? -refs : refs, parity ^ tff, mode);
} else {
- filter_line_x86 (dst, prev, cur, next, w,
+ filter_line_x86_64 (dst, prev, cur, next, w,
y + 1 < h ? refs : -refs, y ? -refs : refs, parity ^ tff, mode);
}
+#else
+ filter_line_c (dst, prev, cur, next, w,
+ y + 1 < h ? refs : -refs, y ? -refs : refs, parity ^ tff, mode);
+#endif
} else {
guint8 *dst = dest_data + y * refs;
guint8 *cur = cur_data + y * refs;
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "config.h"
+
#include <glib.h>
-#if 0
-#include "libavutil/attributes.h"
-#include "libavutil/cpu.h"
-#include "libavutil/internal.h"
-#include "libavutil/mem.h"
-#include "libavutil/x86/asm.h"
-#include "libavcodec/x86/dsputil_mmx.h"
-#include "libavfilter/yadif.h"
-#endif
-//#if HAVE_INLINE_ASM
+#if HAVE_CPU_X86_64
typedef struct xmm_reg
{
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) static const t __attribute__((used)) __attribute__ ((aligned (n))) v
-#define ARCH_X86_64 1
-//#if ARCH_X86_64 && defined(__PIC__)
-#if 1
+#if defined(__PIC__)
# define LOCAL_MANGLE(a) #a "(%%rip)"
#else
# define LOCAL_MANGLE(a) #a
0x0001000100010001ULL, 0x0001000100010001ULL};
+#define HAVE_SSE2_INLINE 1
#if HAVE_SSSE3_INLINE
#define COMPILE_TEMPLATE_SSE2 1
#undef COMPILE_TEMPLATE_SSSE3
#endif
-//#if HAVE_SSE2_INLINE
+#if HAVE_SSE2_INLINE
#undef RENAME
#define RENAME(a) a ## _sse2
#include "yadif_template.c"
#undef COMPILE_TEMPLATE_SSE2
-//#endif
+#endif
#if HAVE_MMXEXT_INLINE
#undef RENAME
#include "yadif_template.c"
#endif
-//#endif /* HAVE_INLINE_ASM */
-void filter_line_x86 (guint8 * dst,
+void filter_line_x86_64 (guint8 * dst,
guint8 * prev, guint8 * cur, guint8 * next,
int w, int prefs, int mrefs, int parity, int mode);
void
-filter_line_x86 (guint8 * dst,
+filter_line_x86_64 (guint8 * dst,
guint8 * prev, guint8 * cur, guint8 * next,
int w, int prefs, int mrefs, int parity, int mode)
{
#endif
yadif_filter_line_sse2 (dst, prev, cur, next, w, prefs, mrefs, parity, mode);
}
+
+#endif