DVSDK中的AAC-LC码流分析(2):adts_variable_header()
2011-11-15 23:20
253 查看
快乐虾http://blog.csdn.net/lights_joy/欢迎转载,但请保留作者信息
在adts_fixed_header()之后就是这一小节了,标准中定义:
在ffmpeg中这一小节是和adts_fixed_header一起处理的,从代码中可以明显看到ffmpeg直接对copyright_identification_bit、copyright_identification_start、adts_buffer_fullness这三个定义做了丢弃处理。
这一节消耗了28bit:
0 10 1f fc
这两个头总共消耗了56bit,7个字节。
解出来的几个变量值为:
在这里frame_length指定了这一帧数据编码后的长度。而adts_buffer_fullness的值为2047,即十六进制的0x7ff,根据标准:
A value of hexadecimal 7FF signals that the bitstream is a variable rate bitstream. In this case, buffer fullness is not applicable.
在ffmpeg中,直接取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;
在adts_fixed_header()之后就是这一小节了,标准中定义:
在ffmpeg中这一小节是和adts_fixed_header一起处理的,从代码中可以明显看到ffmpeg直接对copyright_identification_bit、copyright_identification_start、adts_buffer_fullness这三个定义做了丢弃处理。
这一节消耗了28bit:
0 10 1f fc
这两个头总共消耗了56bit,7个字节。
解出来的几个变量值为:
在这里frame_length指定了这一帧数据编码后的长度。而adts_buffer_fullness的值为2047,即十六进制的0x7ff,根据标准:
A value of hexadecimal 7FF signals that the bitstream is a variable rate bitstream. In this case, buffer fullness is not applicable.
在ffmpeg中,直接取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;
相关文章推荐
- DVSDK中的AAC-LC码流分析(1):adts_fixed_header()
- DVSDK中的AAC-LC码流分析(3):raw_data_block()
- AAC_LC用LATM封装header信息解析 Audio Specific Config格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS格式分析
- AAC ADTS格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS格式分析
- AAC ADTS格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS格式分析
- AAC ADTS格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS LATM 格式分析
- (转)AAC ADTS LATM 格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS LATM 格式分析
- AAC ADTS LATM 格式分析