Commit f14972bf authored by David Schleef's avatar David Schleef

deinterlace: convert from liboil to orc

parent d9817d5e
......@@ -15,9 +15,9 @@ libgstdeinterlace_la_SOURCES = \
tvtime/scalerbob.c
libgstdeinterlace_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(LIBOIL_CFLAGS)
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
libgstdeinterlace_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_LIBS) $(LIBOIL_LIBS)
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS)
libgstdeinterlace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstdeinterlace_la_LIBTOOLFLAGS = --tag=disable-static
......
......@@ -1759,8 +1759,6 @@ plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (deinterlace_debug, "deinterlace", 0, "Deinterlacer");
oil_init ();
if (!gst_element_register (plugin, "deinterlace", GST_RANK_NONE,
GST_TYPE_DEINTERLACE)) {
return FALSE;
......
......@@ -25,10 +25,6 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <liboil/liboil.h>
#include <liboil/liboilcpu.h>
#include <liboil/liboilfunction.h>
#include "gstdeinterlacemethod.h"
G_BEGIN_DECLS
......
......@@ -24,9 +24,6 @@
#include <string.h>
#include <liboil/liboil.h>
#include <liboil/liboilfunction.h>
#include "gstdeinterlacemethod.h"
G_DEFINE_ABSTRACT_TYPE (GstDeinterlaceMethod, gst_deinterlace_method,
......@@ -292,14 +289,14 @@ static void
(GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[0]);
memcpy (out, scanlines->m1, self->parent.row_stride[0]);
}
static void
gst_deinterlace_simple_method_copy_scanline_packed (GstDeinterlaceSimpleMethod *
self, guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[0]);
memcpy (out, scanlines->m0, self->parent.row_stride[0]);
}
static void
......@@ -348,11 +345,11 @@ gst_deinterlace_simple_method_deinterlace_frame_packed (GstDeinterlaceMethod *
if (cur_field_flags == PICTURE_INTERLACED_BOTTOM) {
/* double the first scanline of the bottom field */
oil_memcpy (out, field0, row_stride);
memcpy (out, field0, row_stride);
out += row_stride;
}
oil_memcpy (out, field0, row_stride);
memcpy (out, field0, row_stride);
out += row_stride;
for (line = 2; line <= field_height; line++) {
......@@ -435,7 +432,7 @@ gst_deinterlace_simple_method_deinterlace_frame_packed (GstDeinterlaceMethod *
if (cur_field_flags == PICTURE_INTERLACED_TOP) {
/* double the last scanline of the top field */
oil_memcpy (out, field0, row_stride);
memcpy (out, field0, row_stride);
}
}
......@@ -444,14 +441,14 @@ static void
(GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[0]);
memcpy (out, scanlines->m1, self->parent.row_stride[0]);
}
static void
gst_deinterlace_simple_method_copy_scanline_planar_y (GstDeinterlaceSimpleMethod
* self, guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[0]);
memcpy (out, scanlines->m0, self->parent.row_stride[0]);
}
static void
......@@ -459,14 +456,14 @@ static void
(GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[1]);
memcpy (out, scanlines->m1, self->parent.row_stride[1]);
}
static void
gst_deinterlace_simple_method_copy_scanline_planar_u (GstDeinterlaceSimpleMethod
* self, guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[1]);
memcpy (out, scanlines->m0, self->parent.row_stride[1]);
}
static void
......@@ -474,14 +471,14 @@ static void
(GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[2]);
memcpy (out, scanlines->m1, self->parent.row_stride[2]);
}
static void
gst_deinterlace_simple_method_copy_scanline_planar_v (GstDeinterlaceSimpleMethod
* self, guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[2]);
memcpy (out, scanlines->m0, self->parent.row_stride[2]);
}
static void
......@@ -503,11 +500,11 @@ static void
if (cur_field_flags == PICTURE_INTERLACED_BOTTOM) {
/* double the first scanline of the bottom field */
oil_memcpy (out, field0, row_stride);
memcpy (out, field0, row_stride);
out += row_stride;
}
oil_memcpy (out, field0, row_stride);
memcpy (out, field0, row_stride);
out += row_stride;
for (line = 2; line <= field_height; line++) {
......@@ -590,7 +587,7 @@ static void
if (cur_field_flags == PICTURE_INTERLACED_TOP) {
/* double the last scanline of the top field */
oil_memcpy (out, field0, row_stride);
memcpy (out, field0, row_stride);
}
}
......
......@@ -21,14 +21,10 @@
#ifndef __GST_DEINTERLACE_METHOD_H__
#define __GST_DEINTERLACE_METHOD_H__
#include <liboil/liboil.h>
#include <liboil/liboilcpu.h>
#include <liboil/liboilfunction.h>
#include <gst/gst.h>
#include <gst/video/video.h>
#ifdef HAVE_GCC_ASM
#if defined(HAVE_GCC_ASM) && defined(HAVE_ORC)
#if defined(HAVE_CPU_I386) || defined(HAVE_CPU_X86_64)
#define BUILD_X86_ASM
#endif
......
......@@ -34,6 +34,10 @@
#include "gstdeinterlacemethod.h"
#include <string.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#define GST_TYPE_DEINTERLACE_METHOD_GREEDY_L (gst_deinterlace_method_greedy_l_get_type ())
#define GST_IS_DEINTERLACE_METHOD_GREEDY_L(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_L))
......@@ -371,7 +375,7 @@ deinterlace_frame_di_greedy_packed (GstDeinterlaceMethod * method,
L2P += RowStride;
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
InfoIsOdd = 0;
......@@ -389,17 +393,17 @@ deinterlace_frame_di_greedy_packed (GstDeinterlaceMethod * method,
L2P += RowStride;
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
// then first odd line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
klass->scanline (self, L2, L1, L3, L2P, Dest, RowStride);
Dest += RowStride;
oil_memcpy (Dest, L3, RowStride);
memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
......@@ -409,7 +413,7 @@ deinterlace_frame_di_greedy_packed (GstDeinterlaceMethod * method,
}
if (InfoIsOdd) {
oil_memcpy (Dest, L2, RowStride);
memcpy (Dest, L2, RowStride);
}
}
......@@ -426,21 +430,21 @@ deinterlace_frame_di_greedy_planar_plane (GstDeinterlaceMethodGreedyL * self,
if (InfoIsOdd) {
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
// then first odd line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
scanline (self, L2, L1, L3, L2P, Dest, RowStride);
Dest += RowStride;
oil_memcpy (Dest, L3, RowStride);
memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
......@@ -450,7 +454,7 @@ deinterlace_frame_di_greedy_planar_plane (GstDeinterlaceMethodGreedyL * self,
}
if (InfoIsOdd) {
oil_memcpy (Dest, L2, RowStride);
memcpy (Dest, L2, RowStride);
}
}
......@@ -549,7 +553,8 @@ gst_deinterlace_method_greedy_l_class_init (GstDeinterlaceMethodGreedyLClass *
GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass;
GObjectClass *gobject_class = (GObjectClass *) klass;
#ifdef BUILD_X86_ASM
guint cpu_flags = oil_cpu_get_flags ();
guint cpu_flags =
orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
#endif
gobject_class->set_property = gst_deinterlace_method_greedy_l_set_property;
......@@ -583,9 +588,9 @@ gst_deinterlace_method_greedy_l_class_init (GstDeinterlaceMethodGreedyLClass *
dim_class->deinterlace_frame_bgr = deinterlace_frame_di_greedy_packed;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) {
if (cpu_flags & ORC_TARGET_MMX_MMXEXT) {
klass->scanline = deinterlace_greedy_scanline_mmxext;
} else if (cpu_flags & OIL_IMPL_FLAG_MMX) {
} else if (cpu_flags & ORC_TARGET_MMX_MMX) {
klass->scanline = deinterlace_greedy_scanline_mmx;
} else {
klass->scanline = deinterlace_greedy_scanline_c;
......
......@@ -37,6 +37,9 @@
#include <gst/gst.h>
#include "plugins.h"
#include "gstdeinterlacemethod.h"
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#define GST_TYPE_DEINTERLACE_METHOD_GREEDY_H (gst_deinterlace_method_greedy_h_get_type ())
#define GST_IS_DEINTERLACE_METHOD_GREEDY_H(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_H))
......@@ -769,7 +772,7 @@ deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
L2P += RowStride;
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
InfoIsOdd = 0;
......@@ -787,17 +790,17 @@ deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
L2P += RowStride;
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
// then first odd line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
scanline (self, L1, L2, L3, L2P, Dest, RowStride);
Dest += RowStride;
oil_memcpy (Dest, L3, RowStride);
memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
......@@ -807,7 +810,7 @@ deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
}
if (InfoIsOdd) {
oil_memcpy (Dest, L2, RowStride);
memcpy (Dest, L2, RowStride);
}
}
......@@ -824,21 +827,21 @@ deinterlace_frame_di_greedyh_planar_plane (GstDeinterlaceMethodGreedyH * self,
if (InfoIsOdd) {
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
// copy first even line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
// then first odd line
oil_memcpy (Dest, L1, RowStride);
memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
scanline (self, L1, L2, L3, L2P, Dest, RowStride);
Dest += RowStride;
oil_memcpy (Dest, L3, RowStride);
memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
......@@ -848,7 +851,7 @@ deinterlace_frame_di_greedyh_planar_plane (GstDeinterlaceMethodGreedyH * self,
}
if (InfoIsOdd) {
oil_memcpy (Dest, L2, RowStride);
memcpy (Dest, L2, RowStride);
}
}
......@@ -966,7 +969,8 @@ gst_deinterlace_method_greedy_h_class_init (GstDeinterlaceMethodGreedyHClass *
GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass;
GObjectClass *gobject_class = (GObjectClass *) klass;
#ifdef BUILD_X86_ASM
guint cpu_flags = oil_cpu_get_flags ();
guint cpu_flags =
orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
#endif
gobject_class->set_property = gst_deinterlace_method_greedy_h_set_property;
......@@ -1008,13 +1012,13 @@ gst_deinterlace_method_greedy_h_class_init (GstDeinterlaceMethodGreedyHClass *
dim_class->deinterlace_frame_y41b = deinterlace_frame_di_greedyh_planar;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) {
if (cpu_flags & ORC_TARGET_MMX_MMXEXT) {
klass->scanline_yuy2 = greedyh_scanline_MMXEXT_yuy2;
klass->scanline_uyvy = greedyh_scanline_MMXEXT_uyvy;
} else if (cpu_flags & OIL_IMPL_FLAG_3DNOW) {
} else if (cpu_flags & ORC_TARGET_MMX_3DNOW) {
klass->scanline_yuy2 = greedyh_scanline_3DNOW_yuy2;
klass->scanline_uyvy = greedyh_scanline_3DNOW_uyvy;
} else if (cpu_flags & OIL_IMPL_FLAG_MMX) {
} else if (cpu_flags & ORC_TARGET_MMX_MMX) {
klass->scanline_yuy2 = greedyh_scanline_MMX_yuy2;
klass->scanline_uyvy = greedyh_scanline_MMX_uyvy;
} else {
......
......@@ -29,6 +29,9 @@
#include "gstdeinterlacemethod.h"
#include <string.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#define GST_TYPE_DEINTERLACE_METHOD_LINEAR (gst_deinterlace_method_linear_get_type ())
#define GST_IS_DEINTERLACE_METHOD_LINEAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR))
......@@ -282,7 +285,8 @@ gst_deinterlace_method_linear_class_init (GstDeinterlaceMethodLinearClass *
GstDeinterlaceSimpleMethodClass *dism_class =
(GstDeinterlaceSimpleMethodClass *) klass;
#ifdef BUILD_X86_ASM
guint cpu_flags = oil_cpu_get_flags ();
guint cpu_flags =
orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
#endif
dim_class->fields_required = 1;
......@@ -308,7 +312,7 @@ gst_deinterlace_method_linear_class_init (GstDeinterlaceMethodLinearClass *
deinterlace_scanline_linear_planar_v_c;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) {
if (cpu_flags & ORC_TARGET_MMX_MMXEXT) {
dism_class->interpolate_scanline_ayuv =
deinterlace_scanline_linear_packed_mmxext;
dism_class->interpolate_scanline_yuy2 =
......@@ -335,7 +339,7 @@ gst_deinterlace_method_linear_class_init (GstDeinterlaceMethodLinearClass *
deinterlace_scanline_linear_planar_u_mmxext;
dism_class->interpolate_scanline_planar_v =
deinterlace_scanline_linear_planar_v_mmxext;
} else if (cpu_flags & OIL_IMPL_FLAG_MMX) {
} else if (cpu_flags & ORC_TARGET_MMX_MMX) {
dism_class->interpolate_scanline_ayuv =
deinterlace_scanline_linear_packed_mmx;
dism_class->interpolate_scanline_yuy2 =
......
......@@ -33,6 +33,9 @@
#include "gstdeinterlacemethod.h"
#include <string.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#define GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND (gst_deinterlace_method_linear_blend_get_type ())
#define GST_IS_DEINTERLACE_METHOD_LINEAR_BLEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND))
......@@ -314,7 +317,8 @@ static void
GstDeinterlaceSimpleMethodClass *dism_class =
(GstDeinterlaceSimpleMethodClass *) klass;
#ifdef BUILD_X86_ASM
guint cpu_flags = oil_cpu_get_flags ();
guint cpu_flags =
orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
#endif
dim_class->fields_required = 2;
......@@ -369,7 +373,7 @@ static void
deinterlace_scanline_linear_blend2_planar_v_c;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMX) {
if (cpu_flags & ORC_TARGET_MMX_MMX) {
dism_class->interpolate_scanline_yuy2 =
deinterlace_scanline_linear_blend_packed_mmx;
dism_class->interpolate_scanline_yvyu =
......
......@@ -42,28 +42,28 @@ static void
deinterlace_scanline_scaler_bob_packed (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->t0, self->parent.row_stride[0]);
memcpy (out, scanlines->t0, self->parent.row_stride[0]);
}
static void
deinterlace_scanline_scaler_bob_planar_y (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->t0, self->parent.row_stride[0]);
memcpy (out, scanlines->t0, self->parent.row_stride[0]);
}
static void
deinterlace_scanline_scaler_bob_planar_u (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->t0, self->parent.row_stride[1]);
memcpy (out, scanlines->t0, self->parent.row_stride[1]);
}
static void
deinterlace_scanline_scaler_bob_planar_v (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->t0, self->parent.row_stride[2]);
memcpy (out, scanlines->t0, self->parent.row_stride[2]);
}
G_DEFINE_TYPE (GstDeinterlaceMethodScalerBob, gst_deinterlace_method_scaler_bob,
......
......@@ -31,6 +31,9 @@
#include <string.h>
#include <gst/gst.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#include "gstdeinterlacemethod.h"
#include "plugins.h"
......@@ -59,7 +62,7 @@ Fieldcopy (guint8 * dest, const guint8 * src, gint count,
gint i;
for (i = 0; i < rows; i++) {
oil_memcpy (dest, src, count);
memcpy (dest, src, count);
src += src_pitch;
dest += dst_pitch;
}
......@@ -161,7 +164,8 @@ static void
GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass;
GObjectClass *gobject_class = (GObjectClass *) klass;
#ifdef BUILD_X86_ASM
guint cpu_flags = oil_cpu_get_flags ();
guint cpu_flags =
orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
#endif
gobject_class->set_property = gst_deinterlace_method_tomsmocomp_set_property;
......@@ -185,13 +189,13 @@ static void
dim_class->latency = 1;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) {
if (cpu_flags & ORC_TARGET_MMX_MMXEXT) {
dim_class->deinterlace_frame_yuy2 = tomsmocompDScaler_MMXEXT;
dim_class->deinterlace_frame_yvyu = tomsmocompDScaler_MMXEXT;
} else if (cpu_flags & OIL_IMPL_FLAG_3DNOW) {
} else if (cpu_flags & ORC_TARGET_MMX_3DNOW) {
dim_class->deinterlace_frame_yuy2 = tomsmocompDScaler_3DNOW;
dim_class->deinterlace_frame_yvyu = tomsmocompDScaler_3DNOW;
} else if (cpu_flags & OIL_IMPL_FLAG_MMX) {
} else if (cpu_flags & ORC_TARGET_MMX_MMX) {
dim_class->deinterlace_frame_yuy2 = tomsmocompDScaler_MMX;
dim_class->deinterlace_frame_yvyu = tomsmocompDScaler_MMX;
} else {
......
......@@ -35,6 +35,9 @@
#include "gstdeinterlacemethod.h"
#include <string.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#define GST_TYPE_DEINTERLACE_METHOD_VFIR (gst_deinterlace_method_vfir_get_type ())
#define GST_IS_DEINTERLACE_METHOD_VFIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_VFIR))
......@@ -255,7 +258,8 @@ gst_deinterlace_method_vfir_class_init (GstDeinterlaceMethodVFIRClass * klass)
GstDeinterlaceSimpleMethodClass *dism_class =
(GstDeinterlaceSimpleMethodClass *) klass;
#ifdef BUILD_X86_ASM
guint cpu_flags = oil_cpu_get_flags ();
guint cpu_flags =
orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
#endif
dim_class->fields_required = 2;
......@@ -264,7 +268,7 @@ gst_deinterlace_method_vfir_class_init (GstDeinterlaceMethodVFIRClass * klass)
dim_class->latency = 0;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMX) {
if (cpu_flags & ORC_TARGET_MMX_MMX) {
dism_class->interpolate_scanline_ayuv = deinterlace_line_packed_mmx;
dism_class->interpolate_scanline_yuy2 = deinterlace_line_packed_mmx;
dism_class->interpolate_scanline_yvyu = deinterlace_line_packed_mmx;
......
......@@ -48,56 +48,56 @@ static void
deinterlace_scanline_weave_packed (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[0]);
memcpy (out, scanlines->m1, self->parent.row_stride[0]);
}
static void
deinterlace_scanline_weave_planar_y (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[0]);
memcpy (out, scanlines->m1, self->parent.row_stride[0]);
}
static void
deinterlace_scanline_weave_planar_u (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[1]);
memcpy (out, scanlines->m1, self->parent.row_stride[1]);
}
static void
deinterlace_scanline_weave_planar_v (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[2]);
memcpy (out, scanlines->m1, self->parent.row_stride[2]);
}
static void
copy_scanline_packed (GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[0]);
memcpy (out, scanlines->m0, self->parent.row_stride[0]);
}
static void
copy_scanline_planar_y (GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[0]);
memcpy (out, scanlines->m0, self->parent.row_stride[0]);
}
static void
copy_scanline_planar_u (GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[1]);
memcpy (out, scanlines->m0, self->parent.row_stride[1]);
}
static void
copy_scanline_planar_v (GstDeinterlaceSimpleMethod * self, guint8 * out,
const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m0, self->parent.row_stride[2]);
memcpy (out, scanlines->m0, self->parent.row_stride[2]);
}
G_DEFINE_TYPE (GstDeinterlaceMethodWeave, gst_deinterlace_method_weave,
......
......@@ -48,28 +48,28 @@ static void
deinterlace_scanline_weave_packed (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[0]);
memcpy (out, scanlines->m1, self->parent.row_stride[0]);
}
static void
deinterlace_scanline_weave_planar_y (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[0]);
memcpy (out, scanlines->m1, self->parent.row_stride[0]);
}
static void
deinterlace_scanline_weave_planar_u (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[1]);
memcpy (out, scanlines->m1, self->parent.row_stride[1]);
}
static void
deinterlace_scanline_weave_planar_v (GstDeinterlaceSimpleMethod * self,
guint8 * out, const GstDeinterlaceScanlineData * scanlines)
{
oil_memcpy (out, scanlines->m1, self->parent.row_stride[2]);
memcpy (out, scanlines->m1, self->parent.row_stride[2]);
}
static void
......@@ -78,9 +78,9 @@ copy_scanline_packed (GstDeinterlaceSimpleMethod * self, guint8 * out,
{
/* FIXME: original code used m2 and m0 but this looks really bad */
if (scanlines->bottom_field) {
oil_memcpy (out, scanlines->bb2, self->parent.row_stride[0]);
memcpy (out, scanlines->bb2, self->parent.row_stride[0]);
} else {
oil_memcpy (out, scanlines->bb0, self->parent.row_stride[0]);
memcpy (out, scanlines->bb0, self->parent.row_stride[0]);
}
}
......@@ -90,9 +90,9 @@ copy_scanline_planar_y (GstDeinterlaceSimpleMethod * self, guint8 * out,
{
/* FIXME: original code used m2 and m0 but this looks really bad */
if (scanlines->bottom_field) {
oil_memcpy (out, scanlines->bb2, self->parent.row_stride[0]);
memcpy (out, scanlines->bb2, self->parent.row_stride[0]);
} else {
oil_memcpy (out, scanlines->bb0, self->parent.row_stride[0]);
memcpy (out, scanlines->bb0, self->parent.row_stride[0]);
}
}
......@@ -102,9 +102,9 @@ copy_scanline_planar_u (GstDeinterlaceSimpleMethod * self, guint8 * out,
{
/* FIXME: original code used m2 and m0 but this looks really bad */
if (scanlines->bottom_field) {
oil_memcpy (out, scanlines->bb2, self->parent.row_stride[1]);
memcpy (out, scanlines->bb2, self->parent.row_stride[1]);
} else {
oil_memcpy (out, scanlines->bb0, self->parent.row_stride[1]);