[Bug 748141] New: videoconvert, glcolorconvert: keep colorimetry/chroma-site fields if passthrough

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Apr 19 05:04:51 PDT 2015


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

            Bug ID: 748141
           Summary: videoconvert, glcolorconvert: keep
                    colorimetry/chroma-site fields if passthrough
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: matthieu.bouron at collabora.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 301927
  --> https://bugzilla.gnome.org/attachment.cgi?id=301927&action=edit
glcolorconvert: Keep colorimetry/chroma-site fields if passthrough

Hello,

Here is a proposal to improve the way glcolorconvert and videoconvert deal with
caps and caps negotiation. What currently happens is that both elements
currently drop the colorimetry/chroma-site fields in all cases. It prevents
them to operate in passthrough mode if upstream caps contains those fields (the
basetransform class checks if incaps == outcaps).

My proposal would be to:

1) the transform_caps method should not just drop those fields and replace the
format field with the supported formats but keep the input caps which contains
the colorimetry/chroma-site fields and which have compatible formats + input
caps with the colorimetry/chroma-site fields dropped and format replaced by the
supported format. Example:

video/x-raw,format={RGBA, DUMMY},colorimetry=sRGB,width=1920
would become 
video/x-raw,format=RGBA,colorimetry=sRGB,width=1920;video/x-raw,format={ RGB,
RGBx, RGBA, BGR, BGRx, ...},width=1920

2) As the caps can contains those fields on both side, we need to make sure
that if a conversion happens the fields are removed. Example:

We can't have
incaps = video/x-raw,format=RGBA,colorimetry=sRGB and outcaps =
video/x-raw,format=NV12,colorimetry=sRGB

After the caps are fixed in fixate_caps and in the GST_PAD_SINK direction, if
incaps != outcaps, we remove the fields.

I've attached a patch that implement this behaviour in glcolorconvert (I think
the "passthrough" caps computation might be improved or simplified somehow).

If this improvements is judged correct I will also send a patch for the
videoconvert element.

Comments welcome :)

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