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

fix upmix object number for AC4 level 4. #978

Merged

Conversation

XingzhaoYun
Copy link
Contributor

The calculation of n_umx_objects_minus1 has been updated due to AC4 level 4 with AJOC. n_umx_objects_minus1 may contains additional 3 bits of value.

@@ -664,11 +664,12 @@ AP4_Dac4Atom::Ac4Dsi::SubStream::ParseSubStreamInfoAjoc(AP4_BitReader &bits,
// oamd_common_data()
ParseOamdCommonData(bits);
}
n_umx_objects_minus1 = bits.ReadBits(4);
int nFullbandUpmixSignals = n_umx_objects_minus1 + 1;
int nFullbandUpmixSignalsMinus = bits.ReadBits(4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what the intent of this change is? It seems that it does exactly the same as before, just with a new local variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AC-4 level 4 supports up to 20.1 indicating the n_umx_objects_minus1 could be 21. the old calculation only read 4 bits, didn't add 3 variable bits to n_umx_objects_minus1, the max number of n_umx_objects_minus1 is 15. New calculation adds the additional 3 bits.

@barbibulle barbibulle merged commit 928e9ed into axiomatic-systems:master Sep 16, 2024
7 checks passed
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 this pull request may close these issues.

2 participants