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

ScanType for AVC stream set to 'MBAFF' instead of 'Interlaced' #2100

Open
pkrae opened this issue Aug 1, 2024 · 2 comments
Open

ScanType for AVC stream set to 'MBAFF' instead of 'Interlaced' #2100

pkrae opened this issue Aug 1, 2024 · 2 comments

Comments

@pkrae
Copy link

pkrae commented Aug 1, 2024

My understanding is that ScanType is allowed to have one of two values, Progressive or Interlaced. Other details about the field arrangement or field order are in ScanOrder, ScanType_StoreMethod and Interlacement. However, if an AVC stream contains frames coded with MBAFF, the ScanType is set to MBAFF (in File_Avc::Streams_Fill()). My expectation in this case would be that ScanType is set to Interlaced and Interlacement to MBAFF.

@JeromeMartinez
Copy link
Member

Interlacement is deprecated, out of topic.

We have ScanType (Way in which lines of video are displayed) and ScanOrder (Order in which lines are encoded).
MBAFF was not planned when the fields were defined.
MBAFF is something in between, partly progressive and partly interlaced. I agree that "Interlaced" could be a way to show that because in practice progressive parts are for compression optimization. Thinking more about it, maybe MBAFF should be in "Format settings" as a feature rather than scan type.

That said, I am reluctant to change that now for avoiding to break app which expect MBAFF at this place (bit is there any app expecting that and breaking if I change? I don't know), on another side it would be good to have something coherent...

I'll give myself a week to think about it.

@pkrae
Copy link
Author

pkrae commented Aug 2, 2024

Thanks for the quick reply and the explanation.
From a technical perspective, I'd probably prefer to have ScanType representing the nature of the video which is either full frames (progressive) or field (half-)pictures (interlaced). MBAFF is just a coding tool specific to H.264 and also a strong indicator that the video is interlaced (although in theory even progressive content could be coded with MBAFF when POCs for both field pictures are the same).
On the other hand, I understand if some people rely on MBAFF as legacy. Actually for my purpose, either solution is fine. If MBAFF remains an optional value for ScanType, I would adapt my application and translate it to 'Interlaced'. Let me know once you've decided. Thanks

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

No branches or pull requests

2 participants