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
This commit is contained in:
Robert Swain 2011-01-24 12:18:39 +01:00 committed by Tim-Philipp Müller
parent 32f757786b
commit 6b26017ae7
2 changed files with 4 additions and 4 deletions

View file

@ -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));

View file

@ -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);