sRGB Encoded Content Still limited to 16-235 Through Pipeline

Nicolas Dufresne nicolas at ndufresne.ca
Wed Feb 5 19:07:42 UTC 2020


Le mercredi 05 février 2020 à 09:43 -0500, Thomas Bond a écrit :
> Hi All,
> 
>   Just want to confirm sRGB encoded videos will be in the their limited range
> of 16-235 through the gstreamer pipeline.

This is defined by the colorimetry= field in your caps. You can use
gst_video_colorimetry_from_string() to turn the colorimetry= field string into
GstVideoColorimetry and then read the range (a GstVideoColorRange).

What is supported will entirely depends on the encoder you have picked. In
GStreamer, if you have the colorimetry=sRGB, the range will be 0-255. This is
mostly used on buffers that are in the RGB color space. But most encoders will
only accept data in the YCbCr color space, and in that case, most colorimetry
will use 16-235 range, but most webcams are 0-255 by default.

regards,
Nicolas



More information about the gstreamer-devel mailing list