Skip to content

Commit

Permalink
avc: Cleanup and add color names etc
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Nov 28, 2021
1 parent 1f61704 commit 3bf1a57
Show file tree
Hide file tree
Showing 18 changed files with 403 additions and 329 deletions.
2 changes: 1 addition & 1 deletion format/av1/av1_ccr.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func ccrDecode(d *decode.D, in interface{}) interface{} {
d.FieldU3("reserved = 0")
initalPreDelay := d.FieldBool("initial_presentation_delay_present")
if initalPreDelay {
d.FieldU4("initial_presentation_delay_minus_one")
d.FieldU4("initial_presentation_delay", d.UAdd(1))
} else {
d.FieldU4("reserved")
}
Expand Down
5 changes: 5 additions & 0 deletions format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ type ProtoBufIn struct {
Message ProtoBufMessage
}

type MpegDecoderConfig struct {
ObjectType int
ASCObjectType int
}

type MpegEsOut struct {
DecoderConfigs []MpegDecoderConfig
}
Expand Down
26 changes: 13 additions & 13 deletions format/matroska/testdata/avc.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ $ fq -d matroska verbose /avc.mkv
0x0180| 00 | . | profile_compatibility: 0 0x183-0x183.7 (1)
0x0180| 0d | . | level_indication: "1.3" (13) 0x184-0x184.7 (1)
0x0180| ff | . | reserved0: 63 0x185-0x185.5 (0.6)
0x0180| ff | . | length_size_minus_one: 3 0x185.6-0x185.7 (0.2)
0x0180| ff | . | length_size: 4 0x185.6-0x185.7 (0.2)
0x0180| e1 | . | reserved1: 7 0x186-0x186.2 (0.3)
0x0180| e1 | . | num_of_sequence_parameter_sets: 1 0x186.3-0x186.7 (0.5)
| | | sequence_parameter_sets: [1] 0x187-0x1a1.7 (27)
Expand All @@ -265,24 +265,24 @@ $ fq -d matroska verbose /avc.mkv
0x000| 91 | . | seq_parameter_set_id: 0 0x3-0x3 (0.1)
0x000| 91 | . | chroma_format_idc: 3 0x3.1-0x3.5 (0.5)
0x000| 91 | . | separate_colour_plane_flag: false 0x3.6-0x3.6 (0.1)
0x000| 91 | . | bit_depth_luma_minus8: 0 0x3.7-0x3.7 (0.1)
0x000| 9b | . | bit_depth_chroma_minus8: 0 0x4-0x4 (0.1)
0x000| 91 | . | bit_depth_luma: 8 0x3.7-0x3.7 (0.1)
0x000| 9b | . | bit_depth_chroma: 8 0x4-0x4 (0.1)
0x000| 9b | . | qpprime_y_zero_transform_bypass_flag: false 0x4.1-0x4.1 (0.1)
0x000| 9b | . | seq_scaling_matrix_present_flag: false 0x4.2-0x4.2 (0.1)
0x000| 9b | . | log2_max_frame_num_minus4: 0 0x4.3-0x4.3 (0.1)
0x000| 9b | . | log2_max_frame_num: 4 0x4.3-0x4.3 (0.1)
0x000| 9b | . | pic_order_cnt_type: 0 0x4.4-0x4.4 (0.1)
0x000| 9b | . | log2_max_pic_order_cnt_lsb_minus4: 2 0x4.5-0x4.7 (0.3)
0x000| 9b | . | log2_max_pic_order_cnt_lsb: 6 0x4.5-0x4.7 (0.3)
0x000| 28 | ( | max_num_ref_frames: 4 0x5-0x5.4 (0.5)
0x000| 28 | ( | gaps_in_frame_num_value_allowed_flag: false 0x5.5-0x5.5 (0.1)
0x000| 28 28 | (( | pic_width_in_mbs_minus1: 19 0x5.6-0x6.6 (1.1)
0x000| 28 3f | (? | pic_height_in_map_units_minus1: 14 0x6.7-0x7.5 (0.7)
0x000| 28 28 | (( | pic_width_in_mbs: 20 0x5.6-0x6.6 (1.1)
0x000| 28 3f | (? | pic_height_in_map_units: 15 0x6.7-0x7.5 (0.7)
0x000| 3f | ? | frame_mbs_only_flag: true 0x7.6-0x7.6 (0.1)
0x000| 3f | ? | direct_8x8_inference_flag: true 0x7.7-0x7.7 (0.1)
0x000| 60 | ` | frame_cropping_flag: false 0x8-0x8 (0.1)
0x000| 60 | ` | vui_parameters_present_flag: true 0x8.1-0x8.1 (0.1)
| | | vui_parameters: {} 0x8.2-0x15.4 (13.3)
0x000| 60 | ` | aspect_ratio_info_present_flag: true 0x8.2-0x8.2 (0.1)
0x000| 60 22 | `" | aspect_ratio_idc: 1 0x8.3-0x9.2 (1)
0x000| 60 22 | `" | aspect_ratio_idc: "1:1" (1) 0x8.3-0x9.2 (1)
0x000| 22 | " | overscan_info_present_flag: false 0x9.3-0x9.3 (0.1)
0x000| 22 | " | video_signal_type_present_flag: false 0x9.4-0x9.4 (0.1)
0x000| 22 | " | chroma_loc_info_present_flag: false 0x9.5-0x9.5 (0.1)
Expand Down Expand Up @@ -319,13 +319,13 @@ $ fq -d matroska verbose /avc.mkv
0x000|eb |. | seq_parameter_set_id: 0 0x0.1-0x0.1 (0.1)
0x000|eb |. | entropy_coding_mode_flag: true 0x0.2-0x0.2 (0.1)
0x000|eb |. | bottom_field_pic_order_in_frame_present_flag: false 0x0.3-0x0.3 (0.1)
0x000|eb |. | num_slice_groups_minus1: 0 0x0.4-0x0.4 (0.1)
0x000|eb |. | num_ref_idx_l0_default_active_minus1: 2 0x0.5-0x0.7 (0.3)
0x000| e3 | . | num_ref_idx_l1_default_active_minus1: 0 0x1-0x1 (0.1)
0x000|eb |. | num_slice_groups: 1 0x0.4-0x0.4 (0.1)
0x000|eb |. | num_ref_idx_l0_default_active: 3 0x0.5-0x0.7 (0.3)
0x000| e3 | . | num_ref_idx_l1_default_active: 1 0x1-0x1 (0.1)
0x000| e3 | . | weighted_pred_flag: true 0x1.1-0x1.1 (0.1)
0x000| e3 | . | weighted_bipred_idc: 2 0x1.2-0x1.3 (0.2)
0x000| e3 c4 | .. | pic_init_qp_minus26: -3 0x1.4-0x2 (0.5)
0x000| c4 | . | pic_init_qs_minus26: 0 0x2.1-0x2.1 (0.1)
0x000| e3 c4 | .. | pic_init_qp: 23 0x1.4-0x2 (0.5)
0x000| c4 | . | pic_init_qs: 26 0x2.1-0x2.1 (0.1)
0x000| c4 48 | .H | chroma_qp_index_offset: 4 0x2.2-0x3 (0.7)
0x000| 48 | H | deblocking_filter_control_present_flag: true 0x3.1-0x3.1 (0.1)
0x000| 48 | H | constrained_intra_pred_flag: false 0x3.2-0x3.2 (0.1)
Expand Down
6 changes: 3 additions & 3 deletions format/matroska/testdata/hevc.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ $ fq -d matroska verbose /hevc.mkv
0x0190| ff | . | reserved2: 63 0x193-0x193.5 (0.6)
0x0190| ff | . | chroma_format_idc: 3 0x193.6-0x193.7 (0.2)
0x0190| f8 | . | reserved3: 31 0x194-0x194.4 (0.5)
0x0190| f8 | . | bit_depth_luma_minus8: 0 0x194.5-0x194.7 (0.3)
0x0190| f8 | . | bit_depth_luma: 8 0x194.5-0x194.7 (0.3)
0x0190| f8 | . | reserved4: 31 0x195-0x195.4 (0.5)
0x0190| f8 | . | bit_depth_chroma_minus8: 0 0x195.5-0x195.7 (0.3)
0x0190| f8 | . | bit_depth_chroma: 8 0x195.5-0x195.7 (0.3)
0x0190| 00 00 | .. | avg_frame_rate: 0 0x196-0x197.7 (2)
0x0190| 0f | . | constant_frame_rate: 0 0x198-0x198.1 (0.2)
0x0190| 0f | . | num_temporal_layers: 1 0x198.2-0x198.4 (0.3)
0x0190| 0f | . | temporal_id_nested: 1 0x198.5-0x198.5 (0.1)
0x0190| 0f | . | length_size_minus_one: 3 0x198.6-0x198.7 (0.2)
0x0190| 0f | . | length_size: 4 0x198.6-0x198.7 (0.2)
0x0190| 04 | . | num_of_arrays: 4 0x199-0x199.7 (1)
| | | arrays: [4] 0x19a-0xabd.7 (2340)
| | | [0]: array {} 0x19a-0x1b5.7 (28)
Expand Down

0 comments on commit 3bf1a57

Please sign in to comment.