[FFmpeg-devel] Bug in YUV decoder
Ben Hutchinson
benhut1 at gmail.com
Fri Mar 15 08:35:41 EET 2019
When I decode rawvideo yuv444p in ffplay that was encoded in ffmpeg (using
the test source called "testsrc"), I notice there is blurring between
adjacent colors (both horizontally and vertically), which would typically
be present in yuv420p. I can avoid this by switching the decoder to use a
pixel format of yuvj444p instead of yuv444p, but that makes the brightness
levels incorrect if the image is encoded as yuv444p instead of yuvj444p (as
one would expect). This problem of blurring the color of the image
(equivalent to yuv420p) also happens in yuv422p (requiring me to switch the
decoder's pixel format to yuvj422p to get it to only have a yuv422
blurring, which is horizontally blurred only). It seems that when I use the
"j" version of yuv, it works fine, but when I use the "non-j" version of
yuv it adds an extra chroma blurring filter on the decoder.
Note that it does not matter what pixel format the encoder uses (j or
non-j). This bug is only present in the decoder, and only when I select the
non-j version of a yuv pixel format. This bug is present in the ffplay
decoder (possibly also in the ffmpeg decoder, but I've not yet tested that).
Here's some sample command lines that produce this bug:
ffmpeg -re -f lavfi -i testsrc=r=10:s=640x480 -f rawvideo -pix_fmt yuv444p
-frames 1 -|ffplay -f rawvideo -pix_fmt yuv444p -framerate 10 -s 640x480 -
ffmpeg -re -f lavfi -i testsrc=r=10:s=640x480 -f rawvideo -pix_fmt yuv422p
-frames 1 -|ffplay -f rawvideo -pix_fmt yuv422p -framerate 10 -s 640x480 -
Here's some sample command lines that avoid the bug by using the "j"
version of yuv in the decoder:
ffmpeg -re -f lavfi -i testsrc=r=10:s=640x480 -f rawvideo -pix_fmt yuv444p
-frames 1 -|ffplay -f rawvideo -pix_fmt yuvj444p -framerate 10 -s 640x480 -
ffmpeg -re -f lavfi -i testsrc=r=10:s=640x480 -f rawvideo -pix_fmt yuv444p
-frames 1 -|ffplay -f rawvideo -pix_fmt yuvj444p -framerate 10 -s 640x480 -
The version of FFMPEG (and FFPLAY) that I discovered this bug in is:
N-93298-g0ce759defd
More information about the ffmpeg-devel
mailing list