cinecert / asdcplib

AS-DCP and AS-02 File Access Library
Other
73 stars 55 forks source link

Photon validation errors #83

Open cmehay opened 3 years ago

cmehay commented 3 years ago

I'm working with asdcplib to create IMF packages and I'm facing errors when validating them with Photon.

06 May 2021 14:26:54,186 [ERROR] [IMPAnalyzer]:         ERROR-EssenceDescriptor with ID 9b78ce17-cafd-4347-8abf-75a1dd5b52fe is missing J2CLayout in JPEG2000SubDescriptor [Photon version: 4.8.0]
06 May 2021 14:26:54,186 [ERROR] [IMPAnalyzer]:         ERROR-EssenceDescriptor with ID 9b78ce17-cafd-4347-8abf-75a1dd5b52fe has invalid combination of ComponentMinRef/BlackRefLevel(64)-ComponentMaxRef/WhiteRefLevel(940)-PixelBitDepth(0) in Image Essence Descriptor [Photon version: 4.8.0]
06 May 2021 14:26:54,186 [ERROR] [IMPAnalyzer]:         ERROR-EssenceDescriptor with ID 9b78ce17-cafd-4347-8abf-75a1dd5b52fe invalid PixelBitDepth(0) for Color(Color3) as per APPLICATION_2E_COMPOSITION_TYPE [Photon version: 4.8.0]
06 May 2021 14:26:54,186 [ERROR] [IMPAnalyzer]:         ERROR-EssenceDescriptor with ID 9b78ce17-cafd-4347-8abf-75a1dd5b52fe has Invalid Quantization(Unknown) for ColorModel(YUV) as per APPLICATION_2E_COMPOSITION_TYPE [Photon version: 4.8.0]

The first one has an opened issue on #27

For the three others, it seems having an issue with pixel depth but I can't tell where it is because when I dump the MXF info with as-02-info, the ComponentDepth is well set to 10.

Is it due to missing J2CLayout descriptor ? If I dump header from a MXF created with DaVinci Resolve, I have this:

060e2b34.02530101.0d010101.01015a00  len:     194 (JPEG2000PictureSubDescriptor)
             InstanceUID = 3a7b2882-e19e-4d01-9911-f4434fc21704
                   Rsize = 1060
                   Xsize = 1920
                   Ysize = 1080
                  XOsize = 0
                  YOsize = 0
                  XTsize = 1920
                  YTsize = 1080
                 XTOsize = 0
                 YTOsize = 0
                   Csize = 3
  PictureComponentSizing = 0000000300000003090101090201090201
      CodingStyleDefault = 01040001000503030000778888888888
     QuantizationDefault = 22871e86ea86ea86bc7f007f007ee2774c774c776460036003604567d267d26761
               J2CLayout = Y(10) U(10) V(10)c7f007f007ee2774c774c776460036003604567d267d26761

MXF created with as-02-wrap (using the same tiles) doesn't have J2CLayout

060e2b34.02530101.0d010101.01015a00  len:     174 (JPEG2000PictureSubDescriptor)
             InstanceUID = a92ac74e-0346-4a88-97b5-440c7b871480
                   Rsize = 1060
                   Xsize = 1920
                   Ysize = 1080
                  XOsize = 0
                  YOsize = 0
                  XTsize = 1920
                  YTsize = 1080
                 XTOsize = 0
                 YTOsize = 0
                   Csize = 3
  PictureComponentSizing = 0000000300000003090101090201090201
      CodingStyleDefault = 01040001000503030000778888888888
     QuantizationDefault = 22871e86ea86ea86bc7f007f007ee2774c774c776460036003604567d267d26761

This is the command line used to wrap the MXF:

as-02-wrap -A "16/9" -r '24000/1001' -x 2 -X 1 -D 10 -Y -p 060e2b34.0401010d.04010202.0301020a -q 060e2b34.04010101.04010101.02020000 -n 060e2b34.04010101.04010101.01020000 j2k/ video.mxf

I can maybe try to write a patch for this if you can tell me where to look, thank you

msheby commented 3 years ago

This should be resolved by https://github.com/cinecert/asdcplib/commit/24c1a213b74792f7ab4a9b3241c303403b558f55.

dcbullock commented 2 years ago

@cmehay does this fix above fix this issue for you?

cmehay commented 2 years ago

@dcbullock Sorry I didn't have the opportunity to work with this tool again since I reported the issue, I will try to find the time to check this.