您的位置:首页 > 其它

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: