AVCDecoderConfiguration语法
aligned(8) class AVCDecoderConfigurationRecord {
unsigned int(8) configurationVersion = 1;
unsigned int(8) AVCProfileIndication;
unsigned int(8) profile_compatibility;
unsigned int(8) AVCLevelIndication;
bit(6) reserved = ‘111111’b;
unsigned int(2) lengthSizeMinusOne;
bit(3) reserved = ‘111’b;
unsigned int(5) numOfSequenceParameterSets;
for (i=0; i< numOfSequenceParameterSets; i++) {
unsigned int(16) sequenceParameterSetLength ;
bit(8*sequenceParameterSetLength) sequenceParameterSetNALUnit;
}
unsigned int(8) numOfPictureParameterSets;
for (i=0; i< numOfPictureParameterSets; i++) {
unsigned int(16) pictureParameterSetLength;
bit(8*pictureParameterSetLength) pictureParameterSetNALUnit;
}
}
AVCDecoderConfiguration句意
sequenceParameterSetNALUnit:包含了SPS NAL Unit,第一个字节为0x67,然后即是seq_parameter_set_rbsp(),其语法如表1所示。
pictureParameterSetNALUnit:包含了PPS NAL Unit,第一个字节为0x68,然后即是pic_parameter_set_rbsp(),其语法如表2所示。
表1 序列参数集(SPS)RBSP语法
表2 图像参数集(PPS)RBSP语法