[FFmpeg-trac] #9407(ffmpeg:reopened): Broken Conversion: yuv444p10le to yuv444p
FFmpeg
trac at avcodec.org
Mon Sep 6 04:32:12 EEST 2021
#9407: Broken Conversion: yuv444p10le to yuv444p
-------------------------------------+-------------------------------------
Reporter: Michael | Owner: (none)
Witten |
Type: defect | Status: reopened
Priority: normal | Component: ffmpeg
Version: unspecified | Resolution:
Keywords: pix_fmt yuv | Blocked By:
yuv444p10le yuv444p 10-bit format |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by pdr0):
Apologies Michael, I read the ticket too quickly
1) A YUV to YUV conversion is a no-op in terms of range - when in_range
and out_range are the same. You can explicitly list full in and full out,
or limited in and limited out, or omit. The metadata does not carry though
as you observed, so is not even required - which leads to the next point:
2) What is important for current versions ffmpeg to work as expected , for
actual results - is specifying the in_range before any YUV to RGB
conversion (as you can see omitting produces wrong result), or out_range
for RGB to YUV conversion. ie. Always specify the range in the YUV
direction. If nothing is specified, limited range is assumed.
Maybe somewhere in the future when metadata works and passes correctly we
won't have to do it this way. But this is the way it works now.
3) The "multiple colors" is from dithering. Disable dithering
ffmpeg -f lavfi -i color=0x7FFFD4:size=480x270 -vf
scale=out_range=pc:out_color_matrix=bt709,format=yuv444p10le,scale=sws_flags=sws_dither=0=format=yuv444p,scale=in_range=pc:in_color_matrix=bt709,format=rgb24
-frames:v 1 output.png
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9407#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list