gst/deinterlace2/: Use oil_memcpy() instead of memcpy() as it's faster for the sizes that are usually used here.

Original commit message from CVS:
* gst/deinterlace2/gstdeinterlace2.c:
(gst_deinterlace_simple_method_interpolate_scanline),
(gst_deinterlace_simple_method_copy_scanline),
(gst_deinterlace_simple_method_deinterlace_frame):
* gst/deinterlace2/tvtime/greedy.c: (deinterlace_frame_di_greedy):
* gst/deinterlace2/tvtime/greedyh.c:
(deinterlace_frame_di_greedyh):
* gst/deinterlace2/tvtime/scalerbob.c:
(deinterlace_scanline_scaler_bob):
* gst/deinterlace2/tvtime/tomsmocomp.c: (Fieldcopy):
* gst/deinterlace2/tvtime/weave.c: (deinterlace_scanline_weave),
(copy_scanline):
* gst/deinterlace2/tvtime/weavebff.c: (deinterlace_scanline_weave),
(copy_scanline):
* gst/deinterlace2/tvtime/weavetff.c: (deinterlace_scanline_weave),
(copy_scanline):
Use oil_memcpy() instead of memcpy() as it's faster for the sizes that
are usually used here.
This commit is contained in:
Sebastian Dröge 2008-08-02 18:48:17 +00:00
parent cedd09c9ff
commit 8a35b0101a
9 changed files with 46 additions and 25 deletions

View file

@ -1,3 +1,24 @@
2008-08-02 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/deinterlace2/gstdeinterlace2.c:
(gst_deinterlace_simple_method_interpolate_scanline),
(gst_deinterlace_simple_method_copy_scanline),
(gst_deinterlace_simple_method_deinterlace_frame):
* gst/deinterlace2/tvtime/greedy.c: (deinterlace_frame_di_greedy):
* gst/deinterlace2/tvtime/greedyh.c:
(deinterlace_frame_di_greedyh):
* gst/deinterlace2/tvtime/scalerbob.c:
(deinterlace_scanline_scaler_bob):
* gst/deinterlace2/tvtime/tomsmocomp.c: (Fieldcopy):
* gst/deinterlace2/tvtime/weave.c: (deinterlace_scanline_weave),
(copy_scanline):
* gst/deinterlace2/tvtime/weavebff.c: (deinterlace_scanline_weave),
(copy_scanline):
* gst/deinterlace2/tvtime/weavetff.c: (deinterlace_scanline_weave),
(copy_scanline):
Use oil_memcpy() instead of memcpy() as it's faster for the sizes that
are usually used here.
2008-08-02 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/deinterlace2/Makefile.am:

View file

@ -98,7 +98,7 @@ gst_deinterlace_simple_method_interpolate_scanline (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->m1, parent->line_length);
oil_memcpy (out, scanlines->m1, parent->line_length);
}
static void
@ -106,7 +106,7 @@ gst_deinterlace_simple_method_copy_scanline (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->m0, parent->line_length);
oil_memcpy (out, scanlines->m0, parent->line_length);
}
static void
@ -137,11 +137,11 @@ gst_deinterlace_simple_method_deinterlace_frame (GstDeinterlaceMethod * self,
if (cur_field_flags == PICTURE_INTERLACED_BOTTOM) {
/* double the first scanline of the bottom field */
memcpy (out, field0, parent->line_length);
oil_memcpy (out, field0, parent->line_length);
out += parent->output_stride;
}
memcpy (out, field0, parent->line_length);
oil_memcpy (out, field0, parent->line_length);
out += parent->output_stride;
for (line = 2; line <= parent->field_height; line++) {
@ -226,7 +226,7 @@ gst_deinterlace_simple_method_deinterlace_frame (GstDeinterlaceMethod * self,
if (cur_field_flags == PICTURE_INTERLACED_TOP) {
/* double the last scanline of the top field */
memcpy (out, field0, parent->line_length);
oil_memcpy (out, field0, parent->line_length);
}
}

View file

@ -365,7 +365,7 @@ deinterlace_frame_di_greedy (GstDeinterlaceMethod * d_method,
GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf);
// copy first even line
memcpy (Dest, L1, object->line_length);
oil_memcpy (Dest, L1, object->line_length);
Dest += object->output_stride;
} else {
InfoIsOdd = 0;
@ -378,18 +378,18 @@ deinterlace_frame_di_greedy (GstDeinterlaceMethod * d_method,
Pitch;
// copy first even line
memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf),
oil_memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf),
object->line_length);
Dest += object->output_stride;
// then first odd line
memcpy (Dest, L1, object->line_length);
oil_memcpy (Dest, L1, object->line_length);
Dest += object->output_stride;
}
for (Line = 0; Line < (object->field_height - 1); ++Line) {
klass->scanline (self, L2, L1, L3, L2P, Dest, object->line_length);
Dest += object->output_stride;
memcpy (Dest, L3, object->line_length);
oil_memcpy (Dest, L3, object->line_length);
Dest += object->output_stride;
L1 += Pitch;
@ -399,7 +399,7 @@ deinterlace_frame_di_greedy (GstDeinterlaceMethod * d_method,
}
if (InfoIsOdd) {
memcpy (Dest, L2, object->line_length);
oil_memcpy (Dest, L2, object->line_length);
}
}

View file

@ -266,7 +266,7 @@ deinterlace_frame_di_greedyh (GstDeinterlaceMethod * d_method,
GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf);
// copy first even line
memcpy (Dest, L1, object->line_length);
oil_memcpy (Dest, L1, object->line_length);
Dest += object->output_stride;
} else {
InfoIsOdd = 0;
@ -279,18 +279,18 @@ deinterlace_frame_di_greedyh (GstDeinterlaceMethod * d_method,
Pitch;
// copy first even line
memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf),
oil_memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf),
object->line_length);
Dest += object->output_stride;
// then first odd line
memcpy (Dest, L1, object->line_length);
oil_memcpy (Dest, L1, object->line_length);
Dest += object->output_stride;
}
for (Line = 0; Line < (object->field_height - 1); ++Line) {
klass->scanline (self, L1, L2, L3, L2P, Dest, object->line_length);
Dest += object->output_stride;
memcpy (Dest, L3, object->line_length);
oil_memcpy (Dest, L3, object->line_length);
Dest += object->output_stride;
L1 += Pitch;
@ -300,7 +300,7 @@ deinterlace_frame_di_greedyh (GstDeinterlaceMethod * d_method,
}
if (InfoIsOdd) {
memcpy (Dest, L2, object->line_length);
oil_memcpy (Dest, L2, object->line_length);
}
}

View file

@ -46,7 +46,7 @@ deinterlace_scanline_scaler_bob (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->t0, parent->line_length);
oil_memcpy (out, scanlines->t0, parent->line_length);
}
G_DEFINE_TYPE (GstDeinterlaceMethodScalerBob, gst_deinterlace_method_scaler_bob,

View file

@ -65,7 +65,7 @@ Fieldcopy (void *dest, const void *src, size_t count,
int i;
for (i = 0; i < rows; i++) {
memcpy (pDest, pSrc, count);
oil_memcpy (pDest, pSrc, count);
pSrc += src_pitch;
pDest += dst_pitch;
}

View file

@ -47,14 +47,14 @@ deinterlace_scanline_weave (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->m1, parent->line_length);
oil_memcpy (out, scanlines->m1, parent->line_length);
}
static void
copy_scanline (GstDeinterlaceMethod * self, GstDeinterlace2 * parent,
guint8 * out, GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->m0, parent->line_length);
oil_memcpy (out, scanlines->m0, parent->line_length);
}
G_DEFINE_TYPE (GstDeinterlaceMethodWeave, gst_deinterlace_method_weave,

View file

@ -47,7 +47,7 @@ deinterlace_scanline_weave (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->m1, parent->line_length);
oil_memcpy (out, scanlines->m1, parent->line_length);
}
static void
@ -56,9 +56,9 @@ copy_scanline (GstDeinterlaceMethod * self, GstDeinterlace2 * parent,
{
/* FIXME: original code used m2 and m0 but this looks really bad */
if (scanlines->bottom_field) {
memcpy (out, scanlines->bb2, parent->line_length);
oil_memcpy (out, scanlines->bb2, parent->line_length);
} else {
memcpy (out, scanlines->bb0, parent->line_length);
oil_memcpy (out, scanlines->bb0, parent->line_length);
}
}

View file

@ -47,7 +47,7 @@ deinterlace_scanline_weave (GstDeinterlaceMethod * self,
GstDeinterlace2 * parent, guint8 * out,
GstDeinterlaceScanlineData * scanlines, gint width)
{
memcpy (out, scanlines->m1, parent->line_length);
oil_memcpy (out, scanlines->m1, parent->line_length);
}
static void
@ -56,9 +56,9 @@ copy_scanline (GstDeinterlaceMethod * self, GstDeinterlace2 * parent,
{
/* FIXME: original code used m2 and m0 but this looks really bad */
if (scanlines->bottom_field) {
memcpy (out, scanlines->bb0, parent->line_length);
oil_memcpy (out, scanlines->bb0, parent->line_length);
} else {
memcpy (out, scanlines->bb2, parent->line_length);
oil_memcpy (out, scanlines->bb2, parent->line_length);
}
}