Commit 6b26017a authored by Robert Swain's avatar Robert Swain Committed by Tim-Philipp Müller

deinterlace: small clean-ups

Improve debug output by printing the buffer pointer when
popping a buffer and simplify code to use scanlines.bottom_field
as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=642691
parent 32f75778
......@@ -770,8 +770,8 @@ gst_deinterlace_pop_history (GstDeinterlace * self)
self->history_count--;
GST_DEBUG_OBJECT (self, "Returning buffer: %" GST_TIME_FORMAT
" with duration %" GST_TIME_FORMAT " and size %u",
GST_DEBUG_OBJECT (self, "Returning buffer: %p %" GST_TIME_FORMAT
" with duration %" GST_TIME_FORMAT " and size %u", buffer,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)), GST_BUFFER_SIZE (buffer));
......
......@@ -350,7 +350,7 @@ gst_deinterlace_simple_method_deinterlace_frame_packed (GstDeinterlaceMethod *
memset (&scanlines, 0, sizeof (scanlines));
scanlines.bottom_field = (cur_field_flags == PICTURE_INTERLACED_BOTTOM);
if (!((i & 1) ^ (cur_field_flags == PICTURE_INTERLACED_BOTTOM))) {
if (!((i & 1) ^ scanlines.bottom_field)) {
/* copying */
scanlines.tt0 = LINE2 (field0, (i - 2 >= 0) ? i - 2 : i);
scanlines.m0 = LINE2 (field0, i);
......@@ -453,7 +453,7 @@ static void
memset (&scanlines, 0, sizeof (scanlines));
scanlines.bottom_field = (cur_field_flags == PICTURE_INTERLACED_BOTTOM);
if (!((i & 1) ^ (cur_field_flags == PICTURE_INTERLACED_BOTTOM))) {
if (!((i & 1) ^ scanlines.bottom_field)) {
/* copying */
scanlines.tt0 = LINE2 (field0, (i - 2 >= 0) ? i - 2 : i);
scanlines.m0 = LINE2 (field0, i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment