mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
deinterlace: greedyh: Stop adding 2 to cur_field_idx
Just a simplification. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1799>
This commit is contained in:
parent
53def214fa
commit
f843d3bee3
1 changed files with 7 additions and 11 deletions
|
@ -733,23 +733,23 @@ deinterlace_frame_di_greedyh_plane (GstDeinterlaceMethodGreedyH * self,
|
||||||
gint InfoIsOdd;
|
gint InfoIsOdd;
|
||||||
gint Line;
|
gint Line;
|
||||||
|
|
||||||
L1 = GST_VIDEO_FRAME_COMP_DATA (history[cur_field_idx - 2].frame, plane);
|
L1 = GST_VIDEO_FRAME_COMP_DATA (history[cur_field_idx].frame, plane);
|
||||||
if (history[cur_field_idx - 2].flags & PICTURE_INTERLACED_BOTTOM)
|
if (history[cur_field_idx].flags & PICTURE_INTERLACED_BOTTOM)
|
||||||
L1 += RowStride;
|
L1 += RowStride;
|
||||||
|
|
||||||
L2 = GST_VIDEO_FRAME_COMP_DATA (history[cur_field_idx - 1].frame, plane);
|
L2 = GST_VIDEO_FRAME_COMP_DATA (history[cur_field_idx + 1].frame, plane);
|
||||||
if (history[cur_field_idx - 1].flags & PICTURE_INTERLACED_BOTTOM)
|
if (history[cur_field_idx + 1].flags & PICTURE_INTERLACED_BOTTOM)
|
||||||
L2 += RowStride;
|
L2 += RowStride;
|
||||||
|
|
||||||
L3 = L1 + Pitch;
|
L3 = L1 + Pitch;
|
||||||
L2P = GST_VIDEO_FRAME_COMP_DATA (history[cur_field_idx - 3].frame, plane);
|
L2P = GST_VIDEO_FRAME_COMP_DATA (history[cur_field_idx - 1].frame, plane);
|
||||||
if (history[cur_field_idx - 3].flags & PICTURE_INTERLACED_BOTTOM)
|
if (history[cur_field_idx - 1].flags & PICTURE_INTERLACED_BOTTOM)
|
||||||
L2P += RowStride;
|
L2P += RowStride;
|
||||||
|
|
||||||
// copy first even line no matter what, and the first odd line if we're
|
// 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.)
|
// processing an EVEN field. (note diff from other deint rtns.)
|
||||||
|
|
||||||
InfoIsOdd = (history[cur_field_idx - 1].flags == PICTURE_INTERLACED_BOTTOM);
|
InfoIsOdd = (history[cur_field_idx + 1].flags == PICTURE_INTERLACED_BOTTOM);
|
||||||
if (InfoIsOdd) {
|
if (InfoIsOdd) {
|
||||||
// copy first even line
|
// copy first even line
|
||||||
memcpy (Dest, L1, RowStride);
|
memcpy (Dest, L1, RowStride);
|
||||||
|
@ -807,8 +807,6 @@ deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_field_idx += 2;
|
|
||||||
|
|
||||||
switch (GST_VIDEO_INFO_FORMAT (method->vinfo)) {
|
switch (GST_VIDEO_INFO_FORMAT (method->vinfo)) {
|
||||||
case GST_VIDEO_FORMAT_YUY2:
|
case GST_VIDEO_FORMAT_YUY2:
|
||||||
case GST_VIDEO_FORMAT_YVYU:
|
case GST_VIDEO_FORMAT_YVYU:
|
||||||
|
@ -852,8 +850,6 @@ deinterlace_frame_di_greedyh_planar (GstDeinterlaceMethod * method,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_field_idx += 2;
|
|
||||||
|
|
||||||
deinterlace_frame_di_greedyh_plane (self, history, history_count, outframe,
|
deinterlace_frame_di_greedyh_plane (self, history, history_count, outframe,
|
||||||
cur_field_idx, 0, klass->scanline_planar_y);
|
cur_field_idx, 0, klass->scanline_planar_y);
|
||||||
deinterlace_frame_di_greedyh_plane (self, history, history_count, outframe,
|
deinterlace_frame_di_greedyh_plane (self, history, history_count, outframe,
|
||||||
|
|
Loading…
Reference in a new issue