Skip to content

Commit 3ed2e26

Browse files
authored
Merge pull request #153 from jwcullen/iamf_v2_test_vectors
Upload V2 test vectors
2 parents dcf8667 + 501f5d7 commit 3ed2e26

477 files changed

Lines changed: 34364 additions & 286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/proto/arbitrary_obu.proto

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@
88
// source code in the PATENTS file, you can obtain it at
99
// www.aomedia.org/license/patent.
1010

11-
syntax = "proto2";
11+
edition = "2023";
1212

1313
package libiamf_proto;
1414

1515
import "obu_header.proto";
1616

17+
option features.enum_type = CLOSED;
18+
1719
enum ArbitraryObuType {
20+
option allow_alias = true;
21+
1822
OBU_IA_INVALID = 0;
1923
OBU_IA_CODEC_CONFIG = 1;
2024
OBU_IA_AUDIO_ELEMENT = 2;
@@ -40,7 +44,8 @@ enum ArbitraryObuType {
4044
OBU_IA_AUDIO_FRAME_ID_15 = 22;
4145
OBU_IA_AUDIO_FRAME_ID_16 = 23;
4246
OBU_IA_AUDIO_FRAME_ID_17 = 24;
43-
OBU_IA_RESERVED_24 = 25;
47+
OBU_IA_RESERVED_24 = 25 [deprecated = true];
48+
OBU_IA_METADATA = 25;
4449
OBU_IA_RESERVED_25 = 26;
4550
OBU_IA_RESERVED_26 = 27;
4651
OBU_IA_RESERVED_27 = 28;
@@ -52,7 +57,11 @@ enum ArbitraryObuType {
5257

5358
enum InsertionHook {
5459
INSERTION_HOOK_INVALID = 0;
60+
// Places this before the canonical descriptors. In an MP4 context, this would
61+
// be early in the "IACB" box.
5562
INSERTION_HOOK_BEFORE_DESCRIPTORS = 1;
63+
// Places this after the canonical descriptors. In an MP4 context, this would
64+
// be late in the "IACB" box.
5665
INSERTION_HOOK_AFTER_DESCRIPTORS = 2;
5766
INSERTION_HOOK_AFTER_IA_SEQUENCE_HEADER = 3;
5867
INSERTION_HOOK_AFTER_CODEC_CONFIGS = 4;
@@ -64,13 +73,15 @@ enum InsertionHook {
6473
}
6574

6675
message ArbitraryObuMetadata {
67-
optional InsertionHook insertion_hook = 1;
68-
optional ArbitraryObuType obu_type = 4;
69-
optional ObuHeaderMetadata obu_header = 2;
70-
optional bytes payload = 3;
76+
InsertionHook insertion_hook = 1;
77+
ArbitraryObuType obu_type = 4;
78+
ObuHeaderMetadata obu_header = 2;
79+
bytes payload = 3;
80+
7181
// Used to force the bitstream to be invalid when this OBU is inserted.
72-
optional bool invalidates_bitstream = 5;
82+
bool invalidates_bitstream = 5;
83+
7384
// Used to control the temporal unit when using the *_AT_TICK insertion hooks.
7485
// Ignored otherwise.
75-
optional int64 insertion_tick = 6;
86+
int64 insertion_tick = 6;
7687
}

tests/proto/audio_element.proto

Lines changed: 70 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,41 @@
88
// source code in the PATENTS file, you can obtain it at
99
// www.aomedia.org/license/patent.
1010

11-
syntax = "proto2";
11+
edition = "2023";
1212

1313
package libiamf_proto;
1414

1515
import "obu_header.proto";
1616
import "param_definitions.proto";
1717

18+
option features.enum_type = CLOSED;
19+
1820
enum AudioElementType {
1921
AUDIO_ELEMENT_INVALID = 0;
2022
AUDIO_ELEMENT_CHANNEL_BASED = 1;
2123
AUDIO_ELEMENT_SCENE_BASED = 2;
24+
AUDIO_ELEMENT_OBJECT_BASED = 3;
2225
}
2326

2427
message ParamDefinitionExtension {
25-
optional uint32 param_definition_size = 1;
26-
optional bytes param_definition_bytes = 2;
28+
// `param_definition_size` is ignored. The value in the bitstream is inferred
29+
// based on the size of `param_definition_bytes`.
30+
uint32 param_definition_size = 1 [deprecated = true];
31+
bytes param_definition_bytes = 2;
2732
}
2833

2934
message AudioElementParam {
30-
optional uint32 deprecated_param_definition_type = 1 [deprecated = true];
31-
optional ParamDefinitionType param_definition_type = 5;
35+
uint32 deprecated_param_definition_type = 1 [deprecated = true];
36+
37+
ParamDefinitionType param_definition_type = 5;
38+
3239
oneof param_definition {
3340
DemixingParamDefinition demixing_param = 2;
3441
ReconGainParamDefinition recon_gain_param = 3;
3542
ParamDefinitionExtension param_definition_extension = 4;
3643
}
44+
45+
// Next ID: 6
3746
}
3847

3948
// Valid proto enums start at index 1, which are different from the
@@ -70,27 +79,36 @@ enum ExpandedLoudspeakerLayout {
7079
EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_SI = 11;
7180
EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_TP_SI = 12;
7281
EXPANDED_LOUDSPEAKER_LAYOUT_TOP_6_CH = 13;
73-
EXPANDED_LOUDSPEAKER_LAYOUT_RESERVED_13 = 14;
82+
EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH = 14;
83+
EXPANDED_LOUDSPEAKER_LAYOUT_LFE_PAIR = 15;
84+
EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_3_CH = 16;
85+
EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH = 17;
86+
EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_4_CH = 18;
87+
EXPANDED_LOUDSPEAKER_LAYOUT_TOP_1_CH = 19;
88+
EXPANDED_LOUDSPEAKER_LAYOUT_TOP_5_CH = 20;
7489
EXPANDED_LOUDSPEAKER_LAYOUT_RESERVED_255 = 256;
7590
}
7691

7792
message ChannelAudioLayerConfig {
78-
optional uint32 deprecated_loudspeaker_layout = 1 [deprecated = true];
79-
optional LoudspeakerLayout loudspeaker_layout = 10;
80-
optional uint32 output_gain_is_present_flag = 2;
81-
optional uint32 recon_gain_is_present_flag = 3;
82-
optional uint32 reserved_a = 4;
83-
optional uint32 substream_count = 5;
84-
optional uint32 coupled_substream_count = 6;
85-
optional uint32 output_gain_flag = 7;
86-
optional uint32 reserved_b = 8;
87-
optional int32 output_gain = 9;
88-
optional ExpandedLoudspeakerLayout expanded_loudspeaker_layout = 11;
93+
uint32 deprecated_loudspeaker_layout = 1 [deprecated = true];
94+
95+
LoudspeakerLayout loudspeaker_layout = 10;
96+
uint32 output_gain_is_present_flag = 2;
97+
uint32 recon_gain_is_present_flag = 3;
98+
uint32 reserved_a = 4;
99+
uint32 substream_count = 5;
100+
uint32 coupled_substream_count = 6;
101+
uint32 output_gain_flag = 7;
102+
uint32 reserved_b = 8;
103+
int32 output_gain = 9;
104+
ExpandedLoudspeakerLayout expanded_loudspeaker_layout = 11;
89105
}
90106

91107
message ScalableChannelLayoutConfig {
92-
optional uint32 num_layers = 1;
93-
optional uint32 reserved = 2;
108+
// `num_layers` is ignored. The value in the bitstream is inferred based on
109+
// the number of `channel_audio_layer_configs`.
110+
uint32 num_layers = 1 [deprecated = true];
111+
uint32 reserved = 2;
94112
repeated ChannelAudioLayerConfig channel_audio_layer_configs = 3;
95113
}
96114

@@ -101,44 +119,59 @@ enum AmbisonicsMode {
101119
}
102120

103121
message AmbisonicsMonoConfig {
104-
optional uint32 output_channel_count = 1;
105-
optional uint32 substream_count = 2;
106-
repeated uint32 channel_mapping = 3 [packed = true];
122+
uint32 output_channel_count = 1;
123+
uint32 substream_count = 2;
124+
repeated uint32 channel_mapping = 3;
107125
}
108126

109127
message AmbisonicsProjectionConfig {
110-
optional uint32 output_channel_count = 1;
111-
optional uint32 substream_count = 2;
112-
optional uint32 coupled_substream_count = 3;
113-
repeated int32 demixing_matrix = 4 [packed = true];
128+
uint32 output_channel_count = 1;
129+
uint32 substream_count = 2;
130+
uint32 coupled_substream_count = 3;
131+
repeated int32 demixing_matrix = 4;
114132
}
115133

116134
message AmbisonicsConfig {
117-
optional AmbisonicsMode ambisonics_mode = 1;
135+
AmbisonicsMode ambisonics_mode = 1;
136+
118137
oneof ambisonics_config {
119138
AmbisonicsMonoConfig ambisonics_mono_config = 2;
120139
AmbisonicsProjectionConfig ambisonics_projection_config = 3;
121140
}
122141
}
123142

143+
message ObjectsConfig {
144+
uint32 num_objects = 1;
145+
bytes objects_config_extension_bytes = 2;
146+
}
147+
124148
message AudioElementConfigExtension {
125-
optional uint32 audio_element_config_size = 1;
126-
optional bytes audio_element_config_bytes = 2;
149+
// `audio_element_config_size` is ignored. The value in the bitstream is
150+
// inferred based on the size of `audio_element_config_bytes`.
151+
uint32 audio_element_config_size = 1 [deprecated = true];
152+
bytes audio_element_config_bytes = 2;
127153
}
128154

129155
message AudioElementObuMetadata {
130-
optional uint32 audio_element_id = 1;
131-
optional AudioElementType audio_element_type = 2;
132-
optional uint32 reserved = 3;
133-
optional uint32 codec_config_id = 4;
134-
optional uint32 num_substreams = 5;
135-
repeated uint32 audio_substream_ids = 6 [packed = true];
136-
optional uint32 num_parameters = 7;
156+
uint32 audio_element_id = 1;
157+
AudioElementType audio_element_type = 2;
158+
uint32 reserved = 3;
159+
uint32 codec_config_id = 4;
160+
// `num_substreams` is ignored. The value in the bitstream is inferred based
161+
// on the number of `audio_substream_ids`.
162+
uint32 num_substreams = 5 [deprecated = true];
163+
repeated uint32 audio_substream_ids = 6;
164+
// `num_parameters` is ignored. The value in the bitstream is inferred based
165+
// on the number of `audio_element_params`.
166+
uint32 num_parameters = 7 [deprecated = true];
137167
repeated AudioElementParam audio_element_params = 8;
168+
138169
oneof config {
139170
ScalableChannelLayoutConfig scalable_channel_layout_config = 9;
140171
AmbisonicsConfig ambisonics_config = 10;
141172
AudioElementConfigExtension audio_element_config_extension = 11;
173+
ObjectsConfig objects_config = 13;
142174
}
143-
optional ObuHeaderMetadata obu_header = 12;
175+
176+
ObuHeaderMetadata obu_header = 12;
144177
}

0 commit comments

Comments
 (0)