Skip to content

Commit

Permalink
Merge pull request #918 from saisrirammortha/master
Browse files Browse the repository at this point in the history
Fix Level and BitDepth in AV1 Codec String
  • Loading branch information
barbibulle authored Jun 17, 2024
2 parents 7493cd2 + 3c67a8e commit 874c264
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/C++/Core/Ap4SampleDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ AP4_Av1SampleDescription::AP4_Av1SampleDescription(AP4_UI32 format,
+---------------------------------------------------------------------*/
AP4_Result
AP4_Av1SampleDescription::GetCodecString(AP4_String& codec) {
AP4_UI08 bit_depth = 10;
AP4_UI08 bit_depth = (this->GetHighBitDepth() == 0) ? 8: (this->GetTwelveBit() == 0 ? 10 : 12);
AP4_UI08 color_primaries = 1;
AP4_UI08 transfer_characteristics = 1;
AP4_UI08 matrix_coefficients = 1;
Expand All @@ -838,7 +838,7 @@ AP4_Av1SampleDescription::GetCodecString(AP4_String& codec) {
"%s.%d.%02d%c.%02d.%d.%d%d%d.%02d.%02d.%02d.%d",
coding,
this->GetSeqProfile(),
this->GetSeqLevelIdx0() >> 4,
this->GetSeqLevelIdx0(),
this->GetSeqTier0() == 0 ? 'M' : 'H',
bit_depth,
this->GetMonochrome(),
Expand Down

0 comments on commit 874c264

Please sign in to comment.