avcC box anlaysis - tonykwok/made-mistakes-again GitHub Wiki

-------
+ 4
10A0D38        AVC decode (49 bytes)
10A0D38         Header (8 bytes)
10A0D38          Size:                          49 (0x00000031)
-------
+ 4
10A0D3C          Name:                          avcC
-------
+ 1
10A0D40         Version:                        1 (0x01)
-------
+ 1
10A0D41         Specific (40 bytes)
10A0D41          AVCProfileIndication:          100 (0x64)
-------
+ 1
10A0D42          profile_compatibility:         0 (0x00)
-------
+ 1
10A0D43          AVCLevelIndication:            41 (0x29)
-------
+ 1
10A0D44          reserved:                      63 (0x3F) - (6 bits)
10A0D44          lengthSizeMinusOne:            3 (0x3) - (2 bits)
-------
+ 1
10A0D45          reserved:                      7 (0x7) - (3 bits)
10A0D45          numOfSequenceParameterSets:    1 (0x01) - (5 bits)
-------
+ 2
10A0D46          seq_parameter_set (23 bytes)
10A0D46           sequenceParameterSetLength:   21 (0x0015)
-------
+ 1
10A0D48           nal_ref_idc:                  3 (0x3) - (2 bits)
10A0D48           nal_unit_type:                7 (0x7) - (5 bits)
-------
+ 1
10A0D49           profile_idc:                  100 (0x64)
-------
+ 1
10A0D4A           constraints (1 bytes)
10A0D4A            constraint_set0_flag:        No
10A0D4A            constraint_set1_flag:        No
10A0D4A            constraint_set2_flag:        No
10A0D4A            constraint_set3_flag:        No
10A0D4A            constraint_set4_flag:        No
10A0D4A            constraint_set5_flag:        No
10A0D4A            reserved_zero_2bits:         0 (0x0) - (2 bits)
-------
+ 1
10A0D4B           level_idc:                    41 (0x29) - (8 bits)
-------
+ ?
10A0D4C           seq_parameter_set_id:         0 (0x0)
10A0D4C           high profile specific (1 bytes)
10A0D4C            chroma_format_idc:           1 (0x1) - 4:2:0
10A0D4C            bit_depth_luma_minus8:       0 (0x0)
10A0D4C            bit_depth_chroma_minus8:     0 (0x0)
10A0D4C            qpprime_y_zero_transform_bypass_flag: No
10A0D4C            seq_scaling_matrix_present_flag: No
10A0D4D           log2_max_frame_num_minus4:    4 (0x4)
10A0D4D           pic_order_cnt_type:           0 (0x0)
10A0D4D           log2_max_pic_order_cnt_lsb_minus4: 4 (0x4)
10A0D4E           max_num_ref_frames:           4 (0x4)
10A0D4F           gaps_in_frame_num_value_allowed_flag: Yes
10A0D4F           pic_width_in_mbs_minus1:      67 (0x043)
10A0D50           pic_height_in_map_units_minus1: 119 (0x077)
10A0D52           frame_mbs_only_flag:          Yes
10A0D52           direct_8x8_inference_flag:    Yes
10A0D52           frame_cropping_flag (1 bytes)
10A0D52            frame_cropping_flag:         Yes
10A0D52            frame_crop_left_offset:      0 (0x0)
10A0D53            frame_crop_right_offset:     4 (0x4)
10A0D53            frame_crop_top_offset:       0 (0x0)
10A0D53            frame_crop_bottom_offset:    0 (0x0)
10A0D53           vui_parameters_present_flag (9 bytes)
10A0D53            vui_parameters_present_flag: Yes
10A0D53            aspect_ratio_info_present_flag: No
-------
+ 4
10A0D54            overscan_info_present_flag:  No                                 // 01
10A0D54            video_signal_type_present_flag (3 bytes) 
10A0D54             video_signal_type_present_flag: Yes                            // 02
10A0D54             video_format:               5 (0x5) - (3 bits) -               // 03, 04, 05 
10A0D54             video_full_range_flag:      0 (0x0) - (1 bits) - Limited       // 06
10A0D54             colour_description_present_flag (3 bytes)
10A0D54              colour_description_present_flag: Yes                          // 07 
10A0D54              colour_primaries:          6 (0x06) - (8 bits) - BT.601 NTSC  // 08, 09, 10, 11, 12, 13, 14, 15
10A0D55              transfer_characteristics:  6 (0x06) - (8 bits) - BT.601       // 16, 17, 18, 19, 20, 21, 22, 23
10A0D56              matrix_coefficients:       6 (0x06) - (8 bits) - BT.601       // 24, 25, 26, 27, 28, 29, 30, 31
10A0D57            chroma_loc_info_present_flag: No                                // 32
-------

Example:

         video_full_range_flag   
                  |
10A0D54 6A  0110 101,0  // the last bit is 0
10A0D55 0C  0000 110,0  0000 0110 -> 6 BT.601 NTSC
10A0D56 0C  0000 110,0  0000 0110 -> 6 BT.601
10A0D57 0C  0000 110,0  0000 0110 -> 6 BT.601
⚠️ **GitHub.com Fallback** ⚠️