diff mbox series

[FFmpeg-devel,v6,2/5] libavformat/mxf: Add ULs for DNxUncompressed

Message ID 20240912055238.965068-3-ms+git@mur.at
State New
Headers show
Series [FFmpeg-devel,v6,1/5] libavcodec/: Add ID and desc entries for DNxUncompressed | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

martin schitter Sept. 12, 2024, 5:52 a.m. UTC
---
 libavformat/mxf.c    | 1 +
 libavformat/mxfdec.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Tomas Härdin Sept. 15, 2024, 6:26 p.m. UTC | #1
tor 2024-09-12 klockan 07:52 +0200 skrev Martin Schitter:
> +    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x01,0x02,0x02,0x03,0x07,0x01,0x00 }, 14,      AV_CODEC_ID_DNXUC }, /* DNxUncompressed/SMPTE RDD 50 */
> +    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x1e,0x01,0x00 }, 14,      AV_CODEC_ID_DNXUC, NULL, 14 }, /* DNxUncompressed / SMPTE RDD 50 */

Why are they different?

/Tomas
martin schitter Sept. 16, 2024, 5:02 a.m. UTC | #2
On 15.09.24 20:26, Tomas Härdin wrote:
> tor 2024-09-12 klockan 07:52 +0200 skrev Martin Schitter:
>> +    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x01,0x02,0x02,0x03,0x07,0x01,0x00 }, 14,      AV_CODEC_ID_DNXUC }, /* DNxUncompressed/SMPTE RDD 50 */
>> +    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x1e,0x01,0x00 }, 14,      AV_CODEC_ID_DNXUC, NULL, 14 }, /* DNxUncompressed / SMPTE RDD 50 */
> 
> Why are they different?

these are two different keys:

The first one from 'mxf.c' represents the "SMPTE Label for 
DNxUncompressed Picture Essence Coding" described in chapt. 9 / p. 30 of 
the standard, while the second one in 'mfxdec.c' stands for the "SMPTE 
Label for DNxPacked Essence Container Identification" from chapt. 8 / p. 29.

I can only find the second key in my sample files generated by DaVinci 
Resolve v19. The first key is just taken from the specification without 
any real world verification.

Nevertheless, there is en error in the 8th byte of the second one.
The correct entry should be:

   '06 0e 2b 34 04 01 01 0d 0d 01 03 01 02 1e 01 00'

I already fixed this error in an earlier version, but because of all 
this stupid patch rearrangements and code juggling it somehow reappeared 
again. :(

Hopefully no other changes are effected in the same way. I have just a 
very vague idea, how it could happen at all.

But thanks to your accurate review at least this line will be fixed 
again in my 7th patch set.

martin
diff mbox series

Patch

diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index a73e40e..b6c1f17 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -61,6 +61,7 @@  const MXFCodecUL ff_mxf_codec_uls[] = {
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13,      AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14,      AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0E,0x04,0x02,0x01,0x02,0x04,0x01,0x00 }, 16,      AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD Legacy Avid Media Composer MXF */
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x01,0x02,0x02,0x03,0x07,0x01,0x00 }, 14,      AV_CODEC_ID_DNXUC }, /* DNxUncompressed/SMPTE RDD 50 */
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14,       AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 }, 14,       AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC SPS/PPS in-band */
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x01 }, 16,       AV_CODEC_ID_V210 }, /* V210 */
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index ac63c0d..142b3e6 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1597,6 +1597,7 @@  static const MXFCodecUL mxf_picture_essence_container_uls[] = {
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0c,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000, NULL, 14, J2KWrap },
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x10,0x60,0x01 }, 14,       AV_CODEC_ID_H264, NULL, 15 }, /* H.264 */
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x11,0x01,0x00 }, 14,      AV_CODEC_ID_DNXHD, NULL, 14 }, /* VC-3 */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x1e,0x01,0x00 }, 14,      AV_CODEC_ID_DNXUC, NULL, 14 }, /* DNxUncompressed / SMPTE RDD 50 */
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x12,0x01,0x00 }, 14,        AV_CODEC_ID_VC1, NULL, 14 }, /* VC-1 */
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x14,0x01,0x00 }, 14,       AV_CODEC_ID_TIFF, NULL, 14 }, /* TIFF */
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x15,0x01,0x00 }, 14,      AV_CODEC_ID_DIRAC, NULL, 14 }, /* VC-2 */