I am inspecting decoder configuration record contained in .mp4 video file recorded from Android devices. Some devices have strange or incorrect parameters written in decoder configuration record.
Here is sample from Galaxy Player 4.0 which is incorrect:
DecoderConfigurationRecord: 010283f2ffe100086742000de90283f201000568ce010f20
pictureParameterSetNALUnits : 68ce010f20
AVCLevelIndication : 242
AVCProfileIndication : 2
sequenceParameterSetNALUnits : 6742000de90283f2
lengthSizeMinusOne : 3
configurationVersion : 1
profile_compatibility : 131
profile_idc : 103
constraint_set : 16
level_idc : 0
AVCLevelIndication == 242 is wrong because standard states 51 is the highest value.
AVCProfileIndication should be in (66, 77, 88, 100, 120, ..)
profile_compatibility is called constraint_set?_flags and 2 least significant bits are reserved and seposed to be equal to 0
This is how it should look like:
DecoderConfigurationRecord: 0142000dffe100086742000de90283f201000568ce010f20
pictureParameterSetNALUnits : 68ce010f20
AVCLevelIndication : 13
AVCProfileIndication : 66
sequenceParameterSetNALUnits : 6742000de90283f2
lengthSizeMinusOne : 3
configurationVersion : 1
profile_compatibility : 0
profile_idc : 103
constraint_set : 16
level_idc : 0
How can AVCLevelIndication and AVCProfileIndication be deduced from profile_idc and level_idc ?
Is there a way to check or possibly fix wrong parameters by comparing them to SPS parameters ?
level_idcis10 * level. i.e. if you’re using level3.1, it will be31.profile_idcis specified in Annex A ofISO/IEC 14496-10. Baseline profile is66, Main Profile is77and Extended Profile is88for example.Additionally, you can see the syntax for the SPS RBSP and PPS RBSP in section 7.3.2.1 and 7.3.2.2 respectively. Note
ue(x)andse(x)indicate unsigned exponential golomb coding and signed exponential golomb coding.Edit: My apologies. The
AVCProfileIndicationandAVCLevelIndicationshould be the same asprofile_idcandlevel_idc