[Bug 722656] New: Scoring system within videoconvert ranks colour loss very low

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jan 20 13:17:32 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=722656
  GStreamer | gst-plugins-base | git

           Summary: Scoring system within videoconvert ranks colour loss
                    very low
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: mike at mikeasoft.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


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

Patch to adjust the weighting of videoconvert's scoring mechanism to preserve
colour information

Currently the scoring system used by videoconvert to decide the most
appropriate format conversion has a very low value for the loss of colour (a
weighting of just 2), whereas the weighting for loss of depth information is
considerably higher (a weighting of 32). This can result in the videoconvert
element discarding all colour information and using a grayscale format when
this format provides a higher bit depth per channel.

For example, when converting I422_10LE into something that videoscale can deal
with the current weightings result in GRAY16_BE being selected.

This can be seen in action by executing the following pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw,format=I422_10LE ! videoconvert !
videoscale ! videoconvert ! autovideosink

Here a videotestsrc creates a colour image using the I422_10LE format, however
this then gets converted to GRAY16_BE before being processed by the videoscale
element, finally it gets converted into YUY2 for display (this may vary
depending on chosen sink).

Attached is an example patch which increases the weighting of colour loss over
depth loss and so preserves colour information under these circumstances. I'm
not sure if a value quite so high as I've provided in the patch is strictly
necessary, I'm not especially familiar with the various factors being balanced
so it might be a good idea if someone with more experience of videoconvert's
scoring system could have a look into the issue.

Perhaps the scoring system should be reworked to look at depth loss over all
channels, rather than depth per channel. GRAY16 may have a higher depth per
channel than I422_10LE (16 bit vs 10 bit), but it only has one channel, so is
discarding far more information than I422_10LE holds overall (and discarding
more information than would be kept in a conversion to a 3 channel 8 bit
format).

Thanks,
 Mike Sheldon.

-- 
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