[gstreamer-bugs] [Bug 569611] New: GStreamer videobox element draws thin green lines on edge of yuv video

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Jan 28 15:00:40 PST 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=569611

  GStreamer | gst-plugins-good | Ver: 0.10.21
           Summary: GStreamer videobox element draws thin green lines on
                    edge of yuv video
           Product: GStreamer
           Version: 0.10.21
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: ccooksey at mindspring.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Please describe the problem:
When the width of the bottom or right border is odd, videobox outputs video
with a thin green line on the bottom or right hand edge of the video stream.

Steps to reproduce:
1. I've only recreated it in a complicated system we have here. But you can
recreate it this way:
2. Size a test video to 299 x 480. Note that the video MUST be yuv format.
3. Use videobox to add a top border of 90 pixels and a bottom border of 91
pixels.
4. Pass the video into some kind of viewer.



Actual results:
A thin green line appears on the bottom edge of the output. If you look closely
there is a slightly green line above that also.

Expected results:
The border color (default black) should extend all the way down to the bottom
of the video.

Does this happen every time?
Yes.

Other information:
The bug occurs because the last plane fills for u and v, on the right or bottom
of the image, are not completed properly if the width is odd. This leaves 0's
in the last row and column which leaves us with the characteristic green
associated with yuv chrominance values of 0.

Adding these lines to videobox.c right after the first call to
gst_video_box_copy_plane_i420() will fix the problem:

  /* The right and bottom borders must be adjusted so that the the u and v
planes               */
  /* are filled completely. If we don't do this, little green stripes sneak in.
                */
  if( br / 2 < out_width / 2 - crop_width / 2 - bl / 2 )
      br++;
  if( bb / 2 < out_height / 2 - crop_height / 2 - bt / 2 )
      bb++;

There's probably a nice gstreamer way of doing this, but it works for me. Note
that you can't combine the divides otherwise you will just end up in a
different broken place.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=569611.




More information about the Gstreamer-bugs mailing list