Commit 3dc72154 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

deinterlace: Refactor deinterlacing as preparation for supporting more color formats

parent e2eb012a
......@@ -2,10 +2,10 @@ plugin_LTLIBRARIES = libgstdeinterlace.la
libgstdeinterlace_la_SOURCES = \
gstdeinterlace.c \
tvtime/tomsmocomp.c \
tvtime/greedy.c \
tvtime/greedyh.c \
tvtime/vfir.c \
tvtime/tomsmocomp.c \
tvtime/weavetff.c \
tvtime/weavebff.c \
tvtime/weave.c \
......
This diff is collapsed.
/*
* GStreamer
* Copyright (C) 2005 Martin Eikermann <meiker@upb.de>
* Copyright (C) 2008-2009 Sebastian Dröge <slomo@collabora.co.uk>
* Copyright (C) 2008-2010 Sebastian Dröge <slomo@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -24,6 +24,7 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <liboil/liboil.h>
#include <liboil/liboilcpu.h>
#include <liboil/liboilfunction.h>
......@@ -61,12 +62,39 @@ typedef struct _GstDeinterlaceClass GstDeinterlaceClass;
typedef struct _GstDeinterlaceMethod GstDeinterlaceMethod;
typedef struct _GstDeinterlaceMethodClass GstDeinterlaceMethodClass;
#define PICTURE_PROGRESSIVE 0
#define PICTURE_INTERLACED_BOTTOM 1
#define PICTURE_INTERLACED_TOP 2
#define PICTURE_INTERLACED_MASK (PICTURE_INTERLACED_BOTTOM | PICTURE_INTERLACED_TOP)
typedef struct
{
/* pointer to the start of data for this field */
GstBuffer *buf;
/* see PICTURE_ flags in *.c */
guint flags;
} GstDeinterlaceField;
/*
* This structure defines the deinterlacer plugin.
*/
typedef void (*GstDeinterlaceMethodDeinterlaceFunction) (GstDeinterlaceMethod *self, const GstDeinterlaceField *history, guint history_count, GstBuffer *outbuf);
struct _GstDeinterlaceMethod {
GstObject parent;
GstVideoFormat format;
gint frame_width, frame_height;
gint width[4];
gint height[4];
gint offset[4];
gint row_stride[4];
gint pixel_stride[4];
GstDeinterlaceMethodDeinterlaceFunction deinterlace_frame;
};
struct _GstDeinterlaceMethodClass {
......@@ -74,7 +102,12 @@ struct _GstDeinterlaceMethodClass {
guint fields_required;
guint latency;
void (*deinterlace_frame) (GstDeinterlaceMethod *self, GstDeinterlace * parent, GstBuffer *outbuf);
gboolean (*supported) (GstDeinterlaceMethodClass *klass, GstVideoFormat format, gint width, gint height);
void (*setup) (GstDeinterlaceMethod *self, GstVideoFormat format, gint width, gint height);
GstDeinterlaceMethodDeinterlaceFunction deinterlace_frame_yuy2;
GstDeinterlaceMethodDeinterlaceFunction deinterlace_frame_yvyu;
const gchar *name;
const gchar *nick;
......@@ -99,10 +132,10 @@ typedef struct _GstDeinterlaceScanlineData GstDeinterlaceScanlineData;
*/
struct _GstDeinterlaceScanlineData {
guint8 *tt0, *t0, *m0, *b0, *bb0;
guint8 *tt1, *t1, *m1, *b1, *bb1;
guint8 *tt2, *t2, *m2, *b2, *bb2;
guint8 *tt3, *t3, *m3, *b3, *bb3;
const guint8 *tt0, *t0, *m0, *b0, *bb0;
const guint8 *tt1, *t1, *m1, *b1, *bb1;
const guint8 *tt2, *t2, *m2, *b2, *bb2;
const guint8 *tt3, *t3, *m3, *b3, *bb3;
gboolean bottom_field;
};
......@@ -130,35 +163,29 @@ struct _GstDeinterlaceScanlineData {
* All other values are NULL.
*/
typedef void (*GstDeinterlaceSimpleMethodPackedFunction) (GstDeinterlaceSimpleMethod *self, guint8 *out, const GstDeinterlaceScanlineData *scanlines);
struct _GstDeinterlaceSimpleMethod {
GstDeinterlaceMethod parent;
GstDeinterlaceSimpleMethodPackedFunction interpolate_scanline_packed;
GstDeinterlaceSimpleMethodPackedFunction copy_scanline_packed;
};
struct _GstDeinterlaceSimpleMethodClass {
GstDeinterlaceMethodClass parent_class;
void (*interpolate_scanline) (GstDeinterlaceMethod *self, GstDeinterlace * parent, guint8 *out, GstDeinterlaceScanlineData *scanlines, gint width);
void (*copy_scanline) (GstDeinterlaceMethod *self, GstDeinterlace * parent, guint8 *out, GstDeinterlaceScanlineData *scanlines, gint width);
/* Packed formats */
GstDeinterlaceSimpleMethodPackedFunction interpolate_scanline_yuy2;
GstDeinterlaceSimpleMethodPackedFunction copy_scanline_yuy2;
GstDeinterlaceSimpleMethodPackedFunction interpolate_scanline_yvyu;
GstDeinterlaceSimpleMethodPackedFunction copy_scanline_yvyu;
};
GType gst_deinterlace_simple_method_get_type (void);
#define GST_DEINTERLACE_MAX_FIELD_HISTORY 10
#define PICTURE_PROGRESSIVE 0
#define PICTURE_INTERLACED_BOTTOM 1
#define PICTURE_INTERLACED_TOP 2
#define PICTURE_INTERLACED_MASK (PICTURE_INTERLACED_BOTTOM | PICTURE_INTERLACED_TOP)
typedef struct
{
/* pointer to the start of data for this field */
GstBuffer *buf;
/* see PICTURE_ flags in *.c */
guint flags;
} GstPicture;
typedef enum
{
GST_DEINTERLACE_TOMSMOCOMP,
......@@ -210,42 +237,20 @@ struct _GstDeinterlace
GstDeinterlaceMethods method_id;
GstDeinterlaceMethod *method;
guint frame_size;
gint frame_rate_n, frame_rate_d;
gboolean interlaced;
gboolean src_interlaced;
/* Number of bytes of actual data in each scanline. May be less than
OverlayPitch since the overlay's scanlines might have alignment
requirements. Generally equal to FrameWidth * 2.
*/
guint row_stride;
/* Number of pixels in each scanline. */
gint frame_width;
GstVideoFormat format;
gint width, height; /* frame width & height */
guint frame_size; /* frame size in bytes */
gint fps_n, fps_d; /* frame rate */
gboolean interlaced; /* is input interlaced? */
/* Number of scanlines per frame. */
gint frame_height;
/* Number of scanlines per field. FrameHeight / 2, mostly for
cleanliness so we don't have to keep dividing FrameHeight by 2.
*/
gint field_height;
/* distance between lines in image
need not match the pixel width
*/
guint field_stride;
/* Duration of one field */
GstClockTime field_duration;
GstClockTime field_duration; /* Duration of one field */
/* The most recent pictures
PictureHistory[0] is always the most recent.
Pointers are NULL if the picture in question isn't valid, e.g. because
the program just started or a picture was skipped.
*/
GstPicture field_history[GST_DEINTERLACE_MAX_FIELD_HISTORY];
GstDeinterlaceField field_history[GST_DEINTERLACE_MAX_FIELD_HISTORY];
guint history_count;
/* Set to TRUE if we're in still frame mode,
......@@ -278,4 +283,5 @@ struct _GstDeinterlaceClass
GType gst_deinterlace_get_type (void);
G_END_DECLS
#endif /* __GST_DEINTERLACE_H__ */
......@@ -4,7 +4,7 @@
* Copyright (c) 2000 Tom Barry All rights reserved.
* mmx.h port copyright (c) 2002 Billy Biggs <vektor@dumbterm.net>.
*
* Copyright (C) 2008 Sebastian Dröge <slomo@collabora.co.uk>
* Copyright (C) 2008,2010 Sebastian Dröge <slomo@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -32,8 +32,6 @@
# include "config.h"
#endif
#include "_stdint.h"
#include "gstdeinterlace.h"
#include <string.h>
......@@ -57,8 +55,9 @@ typedef struct
typedef struct
{
GstDeinterlaceMethodClass parent_class;
void (*scanline) (GstDeinterlaceMethodGreedyL * self, uint8_t * L2,
uint8_t * L1, uint8_t * L3, uint8_t * L2P, uint8_t * Dest, int size);
void (*scanline) (GstDeinterlaceMethodGreedyL * self, const guint8 * L2,
const guint8 * L1, const guint8 * L3, const guint8 * L2P, guint8 * Dest,
gint width);
} GstDeinterlaceMethodGreedyLClass;
// This is a simple lightweight DeInterlace method that uses little CPU time
......@@ -74,11 +73,11 @@ typedef struct
// Blended Clip but this give too good results for the CPU to ignore here.
static inline void
deinterlace_greedy_packed422_scanline_c (GstDeinterlaceMethodGreedyL * self,
uint8_t * m0, uint8_t * t1,
uint8_t * b1, uint8_t * m2, uint8_t * output, int width)
deinterlace_greedy_scanline_c (GstDeinterlaceMethodGreedyL * self,
const guint8 * m0, const guint8 * t1,
const guint8 * b1, const guint8 * m2, guint8 * output, gint width)
{
int avg, l2_diff, lp2_diff, max, min, best;
gint avg, l2_diff, lp2_diff, max, min, best;
guint max_comb = self->max_comb;
// L2 == m0
......@@ -124,9 +123,9 @@ deinterlace_greedy_packed422_scanline_c (GstDeinterlaceMethodGreedyL * self,
#ifdef BUILD_X86_ASM
#include "mmx.h"
static void
deinterlace_greedy_packed422_scanline_mmx (GstDeinterlaceMethodGreedyL * self,
uint8_t * m0, uint8_t * t1,
uint8_t * b1, uint8_t * m2, uint8_t * output, int width)
deinterlace_greedy_scanline_mmx (GstDeinterlaceMethodGreedyL * self,
const guint8 * m0, const guint8 * t1,
const guint8 * b1, const guint8 * m2, guint8 * output, gint width)
{
mmx_t MaxComb;
mmx_t ShiftMask;
......@@ -233,16 +232,15 @@ deinterlace_greedy_packed422_scanline_mmx (GstDeinterlaceMethodGreedyL * self,
}
emms ();
if (width > 0)
deinterlace_greedy_packed422_scanline_c (self, m0, t1, b1, m2, output,
width);
deinterlace_greedy_scanline_c (self, m0, t1, b1, m2, output, width);
}
#include "sse.h"
static void
deinterlace_greedy_packed422_scanline_mmxext (GstDeinterlaceMethodGreedyL *
self, uint8_t * m0, uint8_t * t1, uint8_t * b1, uint8_t * m2,
uint8_t * output, int width)
deinterlace_greedy_scanline_mmxext (GstDeinterlaceMethodGreedyL *
self, const guint8 * m0, const guint8 * t1, const guint8 * b1,
const guint8 * m2, guint8 * output, gint width)
{
mmx_t MaxComb;
......@@ -327,70 +325,80 @@ deinterlace_greedy_packed422_scanline_mmxext (GstDeinterlaceMethodGreedyL *
emms ();
if (width > 0)
deinterlace_greedy_packed422_scanline_c (self, m0, t1, b1, m2, output,
width);
deinterlace_greedy_scanline_c (self, m0, t1, b1, m2, output, width);
}
#endif
static void
deinterlace_frame_di_greedy (GstDeinterlaceMethod * d_method,
GstDeinterlace * object, GstBuffer * outbuf)
deinterlace_frame_di_greedy_packed (GstDeinterlaceMethod * method,
const GstDeinterlaceField * history, guint history_count,
GstBuffer * outbuf)
{
GstDeinterlaceMethodGreedyL *self =
GST_DEINTERLACE_METHOD_GREEDY_L (d_method);
GstDeinterlaceMethodGreedyL *self = GST_DEINTERLACE_METHOD_GREEDY_L (method);
GstDeinterlaceMethodGreedyLClass *klass =
GST_DEINTERLACE_METHOD_GREEDY_L_GET_CLASS (self);
int InfoIsOdd = 0;
int Line;
unsigned int Pitch = object->field_stride;
unsigned char *L1; // ptr to Line1, of 3
unsigned char *L2; // ptr to Line2, the weave line
unsigned char *L3; // ptr to Line3
unsigned char *L2P; // ptr to prev Line2
unsigned char *Dest = GST_BUFFER_DATA (outbuf);
gint InfoIsOdd = 0;
gint Line;
gint RowStride = method->row_stride[0];
gint FieldHeight = method->frame_height / 2;
gint Pitch = method->row_stride[0] * 2;
const guint8 *L1; // ptr to Line1, of 3
const guint8 *L2; // ptr to Line2, the weave line
const guint8 *L3; // ptr to Line3
const guint8 *L2P; // ptr to prev Line2
guint8 *Dest = GST_BUFFER_DATA (outbuf);
// copy first even line no matter what, and the first odd line if we're
// processing an EVEN field. (note diff from other deint rtns.)
if (object->field_history[object->history_count - 1].flags ==
PICTURE_INTERLACED_BOTTOM) {
if (history[history_count - 1].flags == PICTURE_INTERLACED_BOTTOM) {
InfoIsOdd = 1;
L1 = GST_BUFFER_DATA (object->field_history[object->history_count - 2].buf);
L2 = GST_BUFFER_DATA (object->field_history[object->history_count - 1].buf);
L1 = GST_BUFFER_DATA (history[history_count - 2].buf);
if (history[history_count - 2].flags & PICTURE_INTERLACED_BOTTOM)
L1 += RowStride;
L2 = GST_BUFFER_DATA (history[history_count - 1].buf);
if (history[history_count - 1].flags & PICTURE_INTERLACED_BOTTOM)
L2 += RowStride;
L3 = L1 + Pitch;
L2P =
GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf);
L2P = GST_BUFFER_DATA (history[history_count - 3].buf);
if (history[history_count - 3].flags & PICTURE_INTERLACED_BOTTOM)
L2P += RowStride;
// copy first even line
oil_memcpy (Dest, L1, object->row_stride);
Dest += object->row_stride;
oil_memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
InfoIsOdd = 0;
L1 = GST_BUFFER_DATA (object->field_history[object->history_count - 2].buf);
L2 = GST_BUFFER_DATA (object->field_history[object->history_count -
1].buf) + Pitch;
L1 = GST_BUFFER_DATA (history[history_count - 2].buf);
if (history[history_count - 2].flags & PICTURE_INTERLACED_BOTTOM)
L1 += RowStride;
L2 = GST_BUFFER_DATA (history[history_count - 1].buf) + Pitch;
if (history[history_count - 1].flags & PICTURE_INTERLACED_BOTTOM)
L2 += RowStride;
L3 = L1 + Pitch;
L2P =
GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf) +
Pitch;
L2P = GST_BUFFER_DATA (history[history_count - 3].buf) + Pitch;
if (history[history_count - 3].flags & PICTURE_INTERLACED_BOTTOM)
L2P += RowStride;
// copy first even line
oil_memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf),
object->row_stride);
Dest += object->row_stride;
oil_memcpy (Dest, GST_BUFFER_DATA (history[0].buf), RowStride);
Dest += RowStride;
// then first odd line
oil_memcpy (Dest, L1, object->row_stride);
Dest += object->row_stride;
oil_memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (object->field_height - 1); ++Line) {
klass->scanline (self, L2, L1, L3, L2P, Dest, object->row_stride);
Dest += object->row_stride;
oil_memcpy (Dest, L3, object->row_stride);
Dest += object->row_stride;
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
klass->scanline (self, L2, L1, L3, L2P, Dest, RowStride);
Dest += RowStride;
oil_memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
L2 += Pitch;
......@@ -399,18 +407,17 @@ deinterlace_frame_di_greedy (GstDeinterlaceMethod * d_method,
}
if (InfoIsOdd) {
oil_memcpy (Dest, L2, object->row_stride);
oil_memcpy (Dest, L2, RowStride);
}
}
G_DEFINE_TYPE (GstDeinterlaceMethodGreedyL, gst_deinterlace_method_greedy_l,
GST_TYPE_DEINTERLACE_METHOD);
enum
{
ARG_0,
ARG_MAX_COMB
PROP_0,
PROP_MAX_COMB
};
static void
......@@ -420,7 +427,7 @@ gst_deinterlace_method_greedy_l_set_property (GObject * object, guint prop_id,
GstDeinterlaceMethodGreedyL *self = GST_DEINTERLACE_METHOD_GREEDY_L (object);
switch (prop_id) {
case ARG_MAX_COMB:
case PROP_MAX_COMB:
self->max_comb = g_value_get_uint (value);
break;
default:
......@@ -435,7 +442,7 @@ gst_deinterlace_method_greedy_l_get_property (GObject * object, guint prop_id,
GstDeinterlaceMethodGreedyL *self = GST_DEINTERLACE_METHOD_GREEDY_L (object);
switch (prop_id) {
case ARG_MAX_COMB:
case PROP_MAX_COMB:
g_value_set_uint (value, self->max_comb);
break;
default:
......@@ -456,28 +463,30 @@ gst_deinterlace_method_greedy_l_class_init (GstDeinterlaceMethodGreedyLClass *
gobject_class->set_property = gst_deinterlace_method_greedy_l_set_property;
gobject_class->get_property = gst_deinterlace_method_greedy_l_get_property;
g_object_class_install_property (gobject_class, ARG_MAX_COMB,
g_object_class_install_property (gobject_class, PROP_MAX_COMB,
g_param_spec_uint ("max-comb",
"Max comb",
"Max Comb", 0, 255, 15, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
dim_class->fields_required = 4;
dim_class->deinterlace_frame = deinterlace_frame_di_greedy;
dim_class->name = "Motion Adaptive: Simple Detection";
dim_class->nick = "greedyl";
dim_class->latency = 1;
dim_class->deinterlace_frame_yuy2 = deinterlace_frame_di_greedy_packed;
dim_class->deinterlace_frame_yvyu = deinterlace_frame_di_greedy_packed;
#ifdef BUILD_X86_ASM
if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) {
klass->scanline = deinterlace_greedy_packed422_scanline_mmxext;
klass->scanline = deinterlace_greedy_scanline_mmxext;
} else if (cpu_flags & OIL_IMPL_FLAG_MMX) {
klass->scanline = deinterlace_greedy_packed422_scanline_mmx;
klass->scanline = deinterlace_greedy_scanline_mmx;
} else {
klass->scanline = deinterlace_greedy_packed422_scanline_c;
klass->scanline = deinterlace_greedy_scanline_c;
}
#else
klass->scanline = deinterlace_greedy_packed422_scanline_c;
klass->scanline = deinterlace_greedy_scanline_c;
#endif
}
......
......@@ -2,7 +2,7 @@
*
* GStreamer
* Copyright (c) 2001 Tom Barry. All rights reserved.
* Copyright (C) 2008 Sebastian Dröge <slomo@collabora.co.uk>
* Copyright (C) 2008,2010 Sebastian Dröge <slomo@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -15,7 +15,7 @@
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* License aglong with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
......@@ -30,29 +30,28 @@
#include "x86-64_macros.inc"
static void
FUNCT_NAME (GstDeinterlaceMethodGreedyH *self, uint8_t * L1, uint8_t * L2, uint8_t * L3, uint8_t * L2P,
uint8_t * Dest, int size)
FUNCT_NAME (GstDeinterlaceMethodGreedyH *self, const guint8 * L1, const guint8 * L2, const guint8 * L3, const guint8 * L2P, guint8 * Dest, gint width)
{
// in tight loop some vars are accessed faster in local storage
int64_t YMask = 0x00ff00ff00ff00ffull; // to keep only luma
int64_t UVMask = 0xff00ff00ff00ff00ull; // to keep only chroma
int64_t ShiftMask = 0xfefefefefefefefeull; // to avoid shifting chroma to luma
int64_t QW256 = 0x0100010001000100ull; // 4 256's
int64_t MaxComb;
int64_t MotionThreshold;
int64_t MotionSense;
int64_t i;
long LoopCtr;
long oldbx;
int64_t QW256B;
int64_t LastAvg = 0; //interp value from left qword
gint64 YMask = 0x00ff00ff00ff00ffull; // to keep only luma
gint64 UVMask = 0xff00ff00ff00ff00ull; // to keep only chroma
gint64 ShiftMask = 0xfefefefefefefefeull; // to avoid shifting chroma to luma
gint64 QW256 = 0x0100010001000100ull; // 4 256's
gint64 MaxComb;
gint64 MotionThreshold;
gint64 MotionSense;
gint64 i;
glong LoopCtr;
glong oldbx;
gint64 QW256B;
gint64 LastAvg = 0; //interp value from left qword
// FIXME: Use C implementation if the width is not a multiple of 4
// Do something more optimal later
if (size % 8 != 0)
greedyDScaler_C (self, L1, L2, L3, L2P, Dest, size);
if (width % 4 != 0)
C_FUNCT (self, L1, L2, L3, L2P, Dest, width);
// Set up our two parms that are actually evaluated for each pixel
i = self->max_comb;
......@@ -68,7 +67,7 @@ FUNCT_NAME (GstDeinterlaceMethodGreedyH *self, uint8_t * L1, uint8_t * L2, uint8
i = 0xffffffff - 256;
QW256B = i << 48 | i << 32 | i << 16 | i; // save a couple instr on PMINSW instruct.
LoopCtr = size / 8 - 1; // there are LineLength / 8 qwords per line but do 1 less, adj at end of loop
LoopCtr = width / 4 - 1; // there are LineLength / 4 qwords per line but do 1 less, adj at end of loop
// For ease of reading, the comments below assume that we're operating on an odd
// field (i.e., that InfoIsOdd is true). Assume the obvious for even lines..
......
......@@ -2,7 +2,7 @@
*
* GStreamer
* Copyright (C) 2004 Billy Biggs <vektor@dumbterm.net>
* Copyright (C) 2008 Sebastian Dröge <slomo@collabora.co.uk>
* Copyright (C) 2008,2010 Sebastian Dröge <slomo@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -32,10 +32,9 @@
#include "greedyhmacros.h"
#include <stdlib.h>
#include "_stdint.h"
#include <string.h>
#include "gst/gst.h"
#include <gst/gst.h>
#include "plugins.h"
#include "gstdeinterlace.h"
......@@ -54,41 +53,45 @@ typedef struct
guint max_comb, motion_threshold, motion_sense;
} GstDeinterlaceMethodGreedyH;
typedef void (*ScanlineFunction) (GstDeinterlaceMethodGreedyH * self,
const guint8 * L2, const guint8 * L1, const guint8 * L3, const guint8 * L2P,
guint8 * Dest, gint width);
typedef struct
{
GstDeinterlaceMethodClass parent_class;
void (*scanline) (GstDeinterlaceMethodGreedyH * self, uint8_t * L2,
uint8_t * L1, uint8_t * L3, uint8_t * L2P, uint8_t * Dest, int size);
ScanlineFunction scanline_yuy2; /* This is for YVYU too */
} GstDeinterlaceMethodGreedyHClass;
static void
greedyDScaler_C (GstDeinterlaceMethodGreedyH * self, uint8_t * L1, uint8_t * L2,
uint8_t * L3, uint8_t * L2P, uint8_t * Dest, int size)
greedyh_scanline_yuy2_C (GstDeinterlaceMethodGreedyH * self, const guint8 * L1,
const guint8 * L2, const guint8 * L3, const guint8 * L2P, guint8 * Dest,
gint width)
{
int Pos;
uint8_t l1_l, l1_1_l, l3_l, l3_1_l;
uint8_t l1_c, l1_1_c, l3_c, l3_1_c;
uint8_t avg_l, avg_c, avg_l_1, avg_c_1;
uint8_t avg_l__1 = 0, avg_c__1 = 0;
uint8_t avg_s_l, avg_s_c;
uint8_t avg_sc_l, avg_sc_c;
uint8_t best_l, best_c;
uint16_t mov_l;
uint8_t out_l, out_c;
uint8_t l2_l, l2_c, lp2_l, lp2_c;
uint8_t l2_l_diff, l2_c_diff, lp2_l_diff, lp2_c_diff;
uint8_t min_l, min_c, max_l, max_c;
gint Pos;
guint8 l1_l, l1_1_l, l3_l, l3_1_l;
guint8 l1_c, l1_1_c, l3_c, l3_1_c;
guint8 avg_l, avg_c, avg_l_1, avg_c_1;
guint8 avg_l__1 = 0, avg_c__1 = 0;
guint8 avg_s_l, avg_s_c;
guint8 avg_sc_l, avg_sc_c;
guint8 best_l, best_c;
guint16 mov_l;
guint8 out_l, out_c;