-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add support for AVC separate fields #94
Conversation
ff768c3
to
dd24bd6
Compare
Added ParseFrameSize2() and ParseFrameInfo2() essence parser methods that are given / return a ParsedFrameSize object that holds frame parse state and supports separate fields. These methods are called rather than the old (version 1) methods and if a parser does not implement them (which is all but the AVC parser) then the new method calls the old method. The previous AVCEssenceParser was renamed to AVCCodedPictureEssenceParser and it is limited to parsing a coded picture (frame coded or field coded). The AVCEssenceParser was changed to support frames or separate field pairs. The AVCWriteHelper was updated to handle the fields (access units / codec pictures) when calculating the index and AVC sub-descriptor properties.
Handle case where a B-frame is before a IDR frame in presentation order but after it in coded order. The B-frame can only have backward prediction and the key frame offset is to the IDR frame.
rather than at the end of the provided data which would result in both fields of separate fields being parsed.
The frame size may be determined outside the parser (e.g. if the remaining bytes are assumed to be part of the frame) and this method allows the state to be reset.
Signal access to parameter sets in every access unit over the other availability flags. Signal access to a parameter set in every GOP over only present in the first access unit if there is only 1 GOP.
dd24bd6
to
3ce05f2
Compare
People don't say it enough, but 'thank you' Phil for everything you're doing and you've been doing over the years for the open source community. This was the last piece of the puzzle to have a proper AVC Long GOP support. It's been a while since September 2022, but the puzzle is now complete and I'm sure a lot of people are gonna be happy about this. :) |
Thanks! It's important for us to promote standards and ensure everyone can benefit and participate. |
This PR adds support for separate field coded AVC that are stored as a pair of fields in MXF.
The
AVCEssenceParser
is renamed toAVCCodedPictureEssenceParser
, supporting parsing pictures. A new frame / separate field parser (AVCEssenceParser
) has been added. The newAVCEssenceParser
will identify frame or fields and combine field pairs. TheEssenceParser
and child classes now haveParseFrameSize2
andParseFrameInfo2
methods that return / use aParsedFrameSize
object that handles the info related to a frame or pair of fields.The
AVCWriteHelper
has been updated to process fields fromAVCEssenceParser
to calculate the AVC Sub-descriptor properties.The
bmxparser
has a--avc-picture
option to dump picture (frame or single field) info rather than frame or field pair info.The file and essence provided by #86 is now supported.