Correcting Video Levels

bishop-00median at icloud.com bishop-00median at icloud.com
Mon May 16 14:19:26 UTC 2022


Noted. Thank you.

> On May 16, 2022, at 1:21 AM, Marianna Smidth Buschle via gstreamer-devel <gstreamer-devel_at_lists_freedesktop_org_59mnm7srbr1196_2a6d20b7 at icloud.com> wrote:
> 
> I guess the main problem is that YUV generally defines the range as 16-235.
> And so most of the available colorspaces have limited range quantization.
> 
> As far as I can see only the JPEG colorspace defines full range quantization:
> https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/pixfmt-007.html#colorspace-jpeg-v4l2-colorspace-jpeg <https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/pixfmt-007.html#colorspace-jpeg-v4l2-colorspace-jpeg>
> Perhaps you can see if it could be used.
> 
> 
> 
> Though is not the same issue I have previously run into a related problem with videoconvert:
> https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/868 <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/868>
> Which might give some clues.
> 
> 
> 
> Otherwise you could make a simple contrast/intensity stretch filter to put the range back to 0-255 (and possibly fix the colorimetry CAPS as well).
> 
> 
> 
> On 14.05.2022 14.00, gstreamer-devel-request at lists.freedesktop.org <mailto:gstreamer-devel-request at lists.freedesktop.org> wrote:
>>> GStreamer team,
>>> 
>>> I am capturing video using a BlackMagic Video device, sending out using a VP9
>>> encoder, and then using a payloader for use with webRTC. When I view the
>>> stream, my blacks and whites are mapped 16-235 instead of 0-255. Is there a
>>> way to correct this? WIth ffmpeg, I can use a filter graph and and set the
>>> input and output scale ?scale=in_range=limited:out_range=limited?.
>> I don't think our converters current handle this, but the range is part of the
>> colorimetry= filed in caps. Would be nice to fix this of course, range
>> conversion seems pretty handy.
>> 
>>> Thanks,
>>> 
>>> Patrick
> -- 
> Best regards / Med venlig hilsen
> “Marianna Smidth Buschle”

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220516/e1180a42/attachment.htm>


More information about the gstreamer-devel mailing list