[Bug 710392] New: [geometrictransform] fix setting black background for AYUV buffers

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Oct 17 15:38:42 CEST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=710392
  GStreamer | gst-plugins-bad | 1.2.0

           Summary: [geometrictransform] fix setting black background for
                    AYUV buffers
    Classification: Platform
           Product: GStreamer
           Version: 1.2.0
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: ospite at studenti.unina.it
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=257539)
 View: https://bugzilla.gnome.org/attachment.cgi?id=257539
 Review: https://bugzilla.gnome.org/review?bug=710392&attachment=257539

geometrictransform: fix setting black background for AYUV buffers

When the frame buffer is AYUV writing all zeros does not set it to black, in
YUV colorspace 0x80 is the black level for chrominance and 0x10 is the black
level for luminance.

The attached patch fixes setting the black background when the out_frame format
is AYUV; in all the other supported formats zeroing the data with memset is
still the right thing to do.

The issue can be reproduced with this command line:

gst-launch-1.0 videotestsrc ! video/x-raw,format="AYUV",width=640,height=480 !
rotate angle="0.79" ! autovideoconvert ! autovideosink

The background looks greenish while a black one is expected.

After the patch the same command line gives the expected result.

BTW, does GStreamer have a more general way to set colors depending on the
pixelformat?


A more complete test can be performed with a script like:

#!/bin/sh

set -e

FORMATS="ARGB BGR BGRA BGRx RGB RGBA RGBx AYUV xBGR xRGB GRAY8 GRAY16_BE
GRAY16_LE"
for format in $FORMATS;
do
  echo "Testing format: $format"
  GST_PLUGIN_PATH=$(pwd) \
  gst-launch-1.0 videotestsrc !
video/x-raw,format="$format",width=640,height=480 ! rotate angle="0.79" !
autovideoconvert ! autovideosink > /dev/null 2>&1
done

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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