[FFmpeg-user] Issue with reading out correct Color Ranges (tv, pc) and color primaries (bt709, bt601) Info at AVCIntra- and MPEG2-MXFs

Christoph Gerstbauer christophgerstbauer at gmx.at
Wed May 7 13:06:08 CEST 2014


I am testing some MXFs probes with different codecs: AVC-Intra, DNxHD, 
XDCAMHD422 and IMX50.

When opening the mxfs with ffprobe or ffmpeg, the program shows me 
following Color Range and ITU-Recommendation Color Form in brackets at 
the end of the pixel_format information ( e.g. yuv422p10le(pc,bt709) ):

a) AVC-Intra: (pc,bt709)
b) DNxHD: no info
c) IMX50: (tv)
d) XDCAMHD422: (tv, bt709)

As I know it:
"tv" : 16-235 / 64-940 limited Video ranges
"pc" : Full Range 0-255 / 0-1023
"bt709": Standard HDTV YCbCr colorhandling / color primaries
"bt601": Standard SDTV YCbCr colorhandling / color primaries

Question(s) 1:
Where does ffmpeg get these information packet? From the container itself?
And why is at IMX50 no bt601 information?

I made some tests with MXF BMX -> mxf2raw and mxfdump.
With mxfdump I can check the set Color Ranges in the MXF container by 
dumping the file information into text file an searching for these KLVs:
BlackRefLevel 	WhiteReflevel 	ColorRange

And these KLVs are always the same in IMX50 and XDCAMHD422:
00 00 00 10 	00 00 00 eb 	00 00 00 e1

So the "tv" info in ffmpeg seems correct for me.

When I check the DNxHD file, there is no info in the mxf dump about 
BlackRefLevel, WhiteRefLevel and ColorRange -> ffmpeg does not show the 
info "tv" or "pc" -> seems correct.

When opening AVC INTRA files there are 2 groups:
1.) NO information in mxfdump about BlackRefLevel, WhiteRefLevel and 
2.) existing information in mxfdump: BlackRefLevel 64/ WhiteRefLevel 940 
/ ColorRange 897 -> that means for me "tv" in ffmpeg language.

But ffmpeg always show "pc" -> Full Range 0-255 / 0-1023

Question(s) 2:
Where does ffmpeg get the information packet from the MXF which is 
forcing to show "pc"?
Or is ffmpeg guessing the Color Range when it gets a specific codec 
(MPEG2 -> "tv" / AVCI -> "pc")?

I hope you can help, I am very confused about that.
For me it seems that the MPEG2 Codecs IMX50 and XDCAMHD are very well 
standardized for MXF.
But DNxHD and AVC-INTRA are not.

Best Regards

More information about the ffmpeg-user mailing list