Analysis of AAC-LC code stream in dvsdk (2): adts_variable_header ()

Source: Internet
Author: User

Happy shrimp

Http://blog.csdn.net/lights_joy/

Reprinted, but keep the author information

 

After adts_fixed_header (), this section is defined in the standard:

In FFMPEG, this section is processed with adts_fixed_header.CodeFFmpeg directly discards the three definitions copyright_identification_bit, copyright_identification_start, and adts_buffer_fullness.

This section consumes 28bit:

0 10 1f FC

The two headers consume a total of 56 bits and 7 bytes.

The obtained variable values are:

Here, frame_length specifies the data encoding length of this frame. The value of adts_buffer_fullness is 2047, that is, 0x7ff in hexadecimal notation. According to the standard:

A value of hexadecimal 7ff signals that the bitstream is a variable rate bitstream. In this case, buffer fullness is not applicable.

In FFMPEG, calculate the number of samples using the value of number_of_raw_data_blocks_in_frame:

HDR-> frame_length = size = get_bits (GBC, 13);/* aac_frame_length */
HDR-> number_of_raw_data_blocks_in_frame = RDB = get_bits (GBC, 2 );

HDR-> num_aac_frames = RDB + 1;

HDR-> samples = (RDB + 1) * 1024;

HDR-> bit_rate = size * 8 * HDR-> sample_rate/HDR-> samples;

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.