[Bug 755392] New: video: possible bugs with gst_video_frame_copy and NV16/NV24 formats

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Sep 22 01:30:57 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=755392

            Bug ID: 755392
           Summary: video: possible bugs with gst_video_frame_copy and
                    NV16/NV24 formats
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: dv at pseudoterminal.org
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I noticed some odd artifacts when copying NV16 frames. The first half of the
columns are copied correctly, the second half is greenish. NV24 frames exhibit
similar problems.

Looking into this, it seems that the subsampling information in the
video-format.c table for NV16 and NV24 is wrong. It reuses the subsampling data
for Y42B/Y444, but does not seem to take into account the fact that there are
effectively *2* bytes per pixel in the chroma plane for NV* formats, not 1. As
a result, the row memcpy in gst_video_frame_copy() copies only the first half
of the row:

    for (j = 0; j < h; j++) {
      memcpy (dp, sp, w);
      dp += ds;
      sp += ss;
    }

For example, for NV16, w is width/2, even though it should equal width.

I'll try to create a test element that simply calls gst_video_frame_copy() to
do further tests.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list