sön 2020-08-16 klockan 11:43 +0100 skrev Harry Mallon: > > > > http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4328/01_Bad_Frame_2.24.mxf > > > > > > > > is not detected correctly for some reason. > > > > > > > > The MXF specs seems ambigous: > > > > > > > > Color Range is a Property, whose unsigned 32-bit integer value shall > > > > specify the number of distinct values allowed for color difference > > > > samples. > > > > > > > > So probably 2^depth color range should also be accepted as full range. > > > > > > This sounds correct. Do we have any sample using 2^depth-1? If not then > > > we should just go with 2^depth until such a sample emerges. > > > > > > /Tomas > > > > I based it on what mxfenc.c already did, I can try to find some other > > samples. > > > > Harry > > > > OK, I have checked back with the docs. > > * I agree that 2^depth is correct for mxf color_range > * 2^depth-1 has been used in FFMPEG since n4.1 (avformat/mxfenc: add > white/black ref /color range > 6d0339096e10f6753049f2a5cbfd7ba69e5f8bcd) so maybe we should keep the > off-by-one case, I don't mind either way.
Ah crap. Yeah, then we do need to accept off-by-one. We could limit that to files that have been produced by mxfenc.c if we like. Might be more effort than it's worth. mxfenc should be fixed either way. > I was checking some other MXF files I have here and one is full-range > RGB J2K, rather than YUV. There are separate range metadata in > RGBAEssenceDescriptor compared to CDCIEssenceDescriptor. Is there a > way to get the stream component depth from this area of code (as RGBA > only has component_max and component_min, no component_depth like > CDCI) or somehow to pass the min/max to the codec to parse? > > e.g in my file (RGB J2K with RGBAEssenceDesc) component_max is 4095 > and component_min is 0, but I don't think the pixel format has been > set to 12bit yet so it would seem premature to set the range to full. I don't know anything about J2K so I can't say /Tomas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".