Skip to content

Conversation

petzeb
Copy link

@petzeb petzeb commented Oct 17, 2023

Adds support for reading and writing AAC audio specific info when profile (object type) is larger than 30.

Descriptions may require different amount of bytes to serialize
depending on content of fields. In preparation of supporing reading and
writing DecoderSpecificDescriptor::profiles (audio object type) values
larger than 30.
Adds support for reading and writing AAC audio specific info when
profile (object type) is larger than 30.
@petzeb petzeb force-pushed the support_writing_extended_aots branch from e1ec2f3 to 0a3973b Compare October 17, 2023 07:53
write_desc(writer, Self::desc_tag(), size)?;

writer.write_u8((self.profile << 3) + (self.freq_index >> 1))?;
writer.write_u8((self.freq_index << 7) + (self.chan_conf << 3))?;
if self.profile < 31 {
Copy link
Author

@petzeb petzeb Oct 17, 2023

Choose a reason for hiding this comment

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

A potential option could be to use some crate like:
https://docs.rs/bitstream-io/1.7.0/bitstream_io/
for this bit packing (and unpacking)

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.

1 participant