After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722255 - vaapisink: set csc render flags from sinkpad caps
vaapisink: set csc render flags from sinkpad caps
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 719412
 
 
Reported: 2014-01-15 11:15 UTC by Holger Kaelberer
Modified: 2014-01-15 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapisink: set csc render flags from sinkpad caps (1.51 KB, patch)
2014-01-15 11:15 UTC, Holger Kaelberer
none Details | Review

Description Holger Kaelberer 2014-01-15 11:15:53 UTC
Created attachment 266346 [details] [review]
vaapisink: set csc render flags from sinkpad caps

This maps GstVideoColorimetry information in vaapisink's sinkpad caps to GST_VAAPI_COLOR_STANDARD_* flags.
Comment 1 Gwenole Beauchesne 2014-01-15 12:09:17 UTC
Review of attachment 266346 [details] [review]:

::: gst/vaapi/gstvaapisink.c
@@ +1016,3 @@
+        flags |= GST_VAAPI_COLOR_STANDARD_ITUR_BT_709;
+#endif
+

I think it would be better to move that to the _set_caps() implementation and set a GstVaapiSink.color_standard flag instead. This would avoid string compares for each frame. This reminds me that I have an old patch to also add SMPTE definitions.
Comment 2 Gwenole Beauchesne 2014-01-15 13:27:45 UTC
Applied a modified version, as announced: moved up the coded, added support for SMPTE240M and applied the caps csc only if per-buffer flags were not present. Thanks.
Comment 3 Gwenole Beauchesne 2014-01-15 13:28:10 UTC
commit b1d3f7d4c0f3be8ec1f82aa00516596cafb7a0a2
Author: Holger Kaelberer <hk@getslash.de>
Date:   Wed Jan 15 12:09:14 2014 +0100

    vaapisink: set csc render flags from sinkpad caps.
    
    This maps GstVideoColorimetry information in vaapisink's sinkpad caps
    to GST_VAAPI_COLOR_STANDARD_* flags, if per-buffer information was not
    available.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722255
    
    [factored out code, added SMPTE240M, handle per-buffer flags]
    Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>

commit 751aa05937d736503fce22ba784820f7184f0b40
Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date:   Wed Mar 28 15:05:26 2012 +0200

    surface: rework render flags.
    
    Pack render flags per category and provide more flags into the color
    standard category. In particular, cover for SMPTE-240M.