Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify AVC Intra vs XAVC #2124

Closed
joe-sciame-wm opened this issue Oct 9, 2024 · 6 comments · Fixed by #2125
Closed

Identify AVC Intra vs XAVC #2124

joe-sciame-wm opened this issue Oct 9, 2024 · 6 comments · Fixed by #2125

Comments

@joe-sciame-wm
Copy link

We were looking at mapping MediaInfo data to our own internal data model. We have an issue where we need to identify AVC Intra vs XAVC. When looking at exports from one application (Adobe Media Encoder) for each codec, I could not readily tell the difference between the files in terms of identifying one as AVC Intra and the other as XAVC.

Do you know if there is a reliable way to differentiate? On our end, our downsteam encoder can process AVC Intra (Panasonic) correctly but has trouble with XAVC (Sony).

I'll send files over to you out of band.

@JeromeMartinez
Copy link
Member

For AVC-Intra, we try to detect that and we show "AVC-Intra xx" (xx = 50 or 100) in Format_Commercial_IfAny when we catch it.

About XAVC, I find only marketing blabla, no real technical limitations beside max level / max bitrate, so can be same as Panasonic AVC-Intra.

Checking https://en.wikipedia.org/wiki/AVC-Intra after few years, I see that there is an update in the Panasonic constraints:
"CAVLC entropy coding only." for AVC-Intra 100. We have it (Format_Settings_CABAC is "No") but not in the AVC-Intra check, we'll add it.
"Panasonic's implementation of AVC-Intra codec has following limitations: 8 × 8 transform only, 8 × 8 intra prediction only, 10 slices per picture, MBAFF for interlace material, custom quantization matrices for each class and each resolution"
Here we have Format_Settings_SliceCount in the output. We already parse transform_8x8_mode_flag & quantization matrices & MBAFF, we could add a check there and flag as Panasonic AVC-Intra only if quantization matrices are the Panasonic ones, small dev. 8 × 8 intra prediction hint seems deeper in the bitstream, more complicated (so more expensive).

@JeromeMartinez
Copy link
Member

From the files you provided, I currently see:

  • AVC-Intra files have room in SEI for VANC, not XAVC. I doubt that the presence or non presence is an issue for a decoder
  • AVC-Intra files have 10 slices per frame vs 8 for XAVC. I may be a problem if the memory model used by the decoder is limited (slices are maye too big for the decoder)

custom quantization matrices are same. I didn't check intra prediction (too far in the bitstream, I don't see it).

So for the moment the only diff which could impact is the slices count.

I will update MediaInfo for showing AVC-Intra in the commercial name field when there are 10 slices (it was expected to be the case already but current code works only with Clip MXF, not Frame MXF).

@JeromeMartinez
Copy link
Member

Snapshots have this PR.

@joe-sciame-wm
Copy link
Author

Thanks Jerome! Confirmed in latest snapshots. Do you have any cases where you display the commercial name as XAVC?

Commercial name : AVC-Intra 100
Commercial name : AVC-Intra 100
Format profile : High 4:2:2 [email protected]

@JeromeMartinez
Copy link
Member

Do you have any cases where you display the commercial name as XAVC?

There is currently no display of XAVC commercial name as we didn't find any technical limitation permitting to narrow to XAVC limitations.
But in the meantime with found SMPTE RDD 32 "XAVC MXF Mapping and Operating Points" which has some tips about AVC constraints in addition to the MXF ones.

For example:

  • exact Coded frame size per frame rate and width x height.
  • accepted profile_idc (110 only for XAVC High 10 Intra profile)
  • accepted levels e.g. L5.1 is not accepted for XAVC HD Intra Profile
  • constraint_setX_flag flags must be 0
  • MXF AVC Sequence Parameter Set Flag must be 0xA0 (or 0x50 for "old implementation", weird), I need to check the AVC related coding.

Questions:

  • Are you interested in us implementing the AVC related checks and show "XAVC" in the video track commercial name if it matches?
  • Are you interested in us implementing the MXF related checks and show "XAVC" in the general track commercial name if it matches?

@joe-sciame-wm
Copy link
Author

Hi Jerome,
Yes, we'd be interested in this. We want to be able to tag content with the appropriate tag internally so if you have a way to distinguish and show the correct commercial name then we'd be open to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants