navigatorkmfk.blogg.se

Ffmpeg scale
Ffmpeg scale












The following, despite being 601 coefficients, should yield perfect 1:1 with RGB values (RGB being a relative color space) but quantization issues again result. ffmpeg -loop 1 -i ~/Downloads/testchart.tif -t 3 -c:v h264 -vf "scale=in_range=full:in_color_matrix=bt601:out_range=full:out_color_matrix=bt601" out601-full.mp4 Sadly, this corrupts the values quite significantly. It would seem that all transformations are likely being performed at the relative bit depth for performance. However, these suffer from quantization issues where no such should occur. The are some transforms that yield vaguely close values. There appears to be breakage with regard to the application of the coefficients, as well as possibly misinterpretation of the full range settings. However, what we find with playback via the ffmpeg command set with proper values is: Given that 709 and sRGB share identical primaries, and broadcast scaling is set to full range, there should be a perfect 1:1 result with the values. When we sample the sRGB / 709 values using an image editor, the top row should result in RGB values as follows: ffplay -vf "scale=in_range=full:in_color_matrix=bt709:out_range=full:out_color_matrix=bt709" out709-full.mp4

ffmpeg scale

Should produce a perfect 1:1 when played back with ffmpeg -loop 1 -i ~/Downloads/testchart.tif -t 3 -c:v h264 -vf "scale=in_range=full:in_color_matrix=bt709:out_range=full:out_color_matrix=bt709" out709-full.mp4 Sampling the upper row of colors using the provided test chart, we can see some issues with the encoding / decoding step, when using FFPLAY with the corresponding scale commands. An sRGB image, encoded at full range using BT.709 primaries should decode to a perfect 1:1 regarding RGB values, compression notwithstanding.

ffmpeg scale

Test chart available from ​.īT.709 and sRGB share identical luminance coefficients. Disabled all ASM speedups to avoid code path issues, as were previously hard coded to 601 coefficents etc.Įncode a test chart and check values. Seems that swscale is still sadly mangling RGB to YCbCr and vice versa transforms.














Ffmpeg scale