[FFmpeg-devel] [PATCH] avcodec/mjpeg: don't override color information from demuxer

Steinar H. Gunderson steinar+ffmpeg at gunderson.no
Wed Dec 5 01:36:59 EET 2018

On Wed, Dec 05, 2018 at 12:31:10AM +0100, Steinar H. Gunderson wrote:
> Some demuxers, like Matroska, allow for sending colorspace information
> that override MJPEG defaults when it comes to Y'CbCr coefficients or
> chroma location. Don't override such data if the demuxer already has
> set it; this allows decoding such MJPEG streams correctly.
> Also document in avcodec.h that these fields are actually set first by
> libavformat, even if libavcodec is usually the one to set them. This is
> not new behavior; e.g., dnxhd already works this way.

Attaching the FATE test file used (created by myself; it's just a black
MJPEG frame, although with the special CS=ITU601 tag set to get TV range).

/* Steinar */
Homepage: https://www.sesse.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mjpeg-color-space.mkv
Type: video/x-matroska
Size: 37857 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181205/ea6ad2f0/attachment.mkv>

More information about the ffmpeg-devel mailing list