Fix Level and BitDepth in AV1 Codec String #918
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#917
The logic of generating codec string for AV1 had a bug. It is giving same Codec String for all the generated manifests. Bitdepth is added as a constant value
For Bitdepth
![image](https://private-user-images.githubusercontent.com/34328635/295937758-c93056b4-4b66-4ccb-a1a9-244a6eaf9736.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDkwMzEsIm5iZiI6MTczOTI0ODczMSwicGF0aCI6Ii8zNDMyODYzNS8yOTU5Mzc3NTgtYzkzMDU2YjQtNGI2Ni00Y2NiLWExYTktMjQ0YTZlYWY5NzM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA0Mzg1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4YjhmNTg3MDU2MTc0YzM0NzY3NGUzYzM3YjMwNDNjY2RkOGNjYmMyZDQ2OTI4NDBlMGFmY2NiNzJjYTMyZWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.CEUOpFS1-ZaFe58ugLE5NPTrHfEEqM61OU_MhhSGVAw)
From AV1 Spec (https://aomediacodec.github.io/av1-spec/av1-spec.pdf), Section 5.5.2. Color config syntax
We can derive this statements for Bitdepth
If high_bitdepth is 0, then the value for bitdepth is 08.
If high_bitdepth is 1 and twelve_bit is 0, then the value for bitdepth is 10.
If high_bitdepth is 1 and twelve_bit is 1, then the value for bitdepth is 12.
For Level
From AV1 Spec (https://aomediacodec.github.io/av1-spec/av1-spec.pdf), Section Annex A: Profiles and levels, A.3. Levels
Seq Level Index value can be stored for the Level. We need not right shift Seq Level Index by 4 bits
This 2 digit Seq Level Index can be converted to the X.Y format level format, where X = 2 + (seq_level_index >> 2) and Y = seq_level_index & 3