deinterlace: greedyh: Move _planar_plane upwards

In preparation of refactoring. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
This commit is contained in:
Jan Alexander Steffens (heftig) 2022-02-25 12:30:21 +01:00 committed by GStreamer Marge Bot
parent 1726361622
commit 19ca706fe8

View file

@ -716,6 +716,47 @@ greedyh_scanline_C_planar_uv (GstDeinterlaceMethodGreedyH * self,
#endif #endif
static void
deinterlace_frame_di_greedyh_planar_plane (GstDeinterlaceMethodGreedyH * self,
const guint8 * L1, const guint8 * L2, const guint8 * L3, const guint8 * L2P,
guint8 * Dest, gint RowStride, gint FieldHeight, gint Pitch, gint InfoIsOdd,
ScanlineFunction scanline)
{
gint Line;
// 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 (InfoIsOdd) {
// copy first even line
memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
// copy first even line
memcpy (Dest, L1, RowStride);
Dest += RowStride;
// then first odd line
memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
scanline (self, L1, L2, L3, L2P, Dest, RowStride);
Dest += RowStride;
memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
L2 += Pitch;
L3 += Pitch;
L2P += Pitch;
}
if (InfoIsOdd) {
memcpy (Dest, L2, RowStride);
}
}
static void static void
deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method, deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
const GstDeinterlaceField * history, guint history_count, const GstDeinterlaceField * history, guint history_count,
@ -833,47 +874,6 @@ deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
} }
} }
static void
deinterlace_frame_di_greedyh_planar_plane (GstDeinterlaceMethodGreedyH * self,
const guint8 * L1, const guint8 * L2, const guint8 * L3, const guint8 * L2P,
guint8 * Dest, gint RowStride, gint FieldHeight, gint Pitch, gint InfoIsOdd,
ScanlineFunction scanline)
{
gint Line;
// 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 (InfoIsOdd) {
// copy first even line
memcpy (Dest, L1, RowStride);
Dest += RowStride;
} else {
// copy first even line
memcpy (Dest, L1, RowStride);
Dest += RowStride;
// then first odd line
memcpy (Dest, L1, RowStride);
Dest += RowStride;
}
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
scanline (self, L1, L2, L3, L2P, Dest, RowStride);
Dest += RowStride;
memcpy (Dest, L3, RowStride);
Dest += RowStride;
L1 += Pitch;
L2 += Pitch;
L3 += Pitch;
L2P += Pitch;
}
if (InfoIsOdd) {
memcpy (Dest, L2, RowStride);
}
}
static void static void
deinterlace_frame_di_greedyh_planar (GstDeinterlaceMethod * method, deinterlace_frame_di_greedyh_planar (GstDeinterlaceMethod * method,
const GstDeinterlaceField * history, guint history_count, const GstDeinterlaceField * history, guint history_count,