00 00 00 01 67 42 00 28 E9 00
A0 0B 77 FE 00 02 00 03 C4 80
00 00 03 00 80 00 00 1A 4D 88
10 94 00 00 00 01
00 00 00 01为NALu头,其余码流由十六进制转为二进制
67 0110 0111
42 0100 0010
00 0000 0000
28 0010 1000
E9 1110 1001
00 0000 0000
A0 1010 0000
0B 0000 1011
77 0111 01/11
……
94 1001 01//00
说明:
"/"后的码流要对照标准中AnnexE的句法表,是VUI(VideoUsabilityInformation?)的内容,
不懂,不写了,只写SPS部分先。
"//"后面两个0是补齐用的。
NAL层句法:码,值
forbidden_zero_bit(f(1)):0,0
nal_ref_idc(u(2)):11, 3
nal_unit_type(u(5)): 0 0111, 7, SPS
SPS序列参数集的句法:码,值
profile_idc(u(8)) = 0100 0010,66 , baseline profile基础档次
constraint_set0_flag(u(1)):0,0
constraint_set1_flag(u(1)):0,0
constraint_set2_flag(u(1)):0,0
constraint_set3_flag(u(1)):0,0
reserved_zero_4bits(u(4)):0000,0
level_idc(u(8)) :00101000,40 ,级别
seq_parameter_set_id(ue(v)): 1, 0
log2_max_frame_num_minus4(ue(v): 1, 0
MaxFrameNum = 2^(0+4) = 16
pic_order_cnt_type(ue(v)):1, 0
log2_max_pic_order_cnt_lsb_minus4(ue(v)):010 ,1
MaxPicOrderCntLsb = 2^(1+4) = 32
num_ref_frames(ue(v)):010, 1
gaps_in_frame_num_value_allowed_flag(u(1)):0,0
pic_width_in_mbs_minus1(ue(v)): 0000001010000, 2^6-1+16 = 79
PicWidthInMbs = pic_width_in_mbs_minus1 + 1 = 80
pic_height_in_map_units_minus1(ue(v)): 00000101101 ,2^5-1+13 = 44
PicHeightInMapUnits = pic_height_in_map_units_minus1 + 1 =45
frame_mbs_only_flag(u(1)):1,1
direct_8x8_inference_flag(u(1)): 1,1
frame_cropping_flag(u(1)):0,0
vui_parameters_present_flag(u(1)):1 ,1
这个参数为1,说明下面的句法存在
vui_parameters( )
aspect_ratio_info_present_flag(u(1)):1
其中:
pic_width_in_mbs_minus1 : 79
pic_height_in_map_units_minus1 : 44
说的很清楚:
(79+1)x16=1280
(44+1)x16=720
果然是 1280x720 !