Skip to content

Commit de4ca7e

Browse files
Googlerjwcullen
authored andcommitted
Add test vector for user-defined Metadata OBUs.
PiperOrigin-RevId: 860124615
1 parent a9f2c20 commit de4ca7e

File tree

1 file changed

+219
-0
lines changed

1 file changed

+219
-0
lines changed
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# Copyright (c) 2026, Alliance for Open Media. All rights reserved
2+
#
3+
# This source code is subject to the terms of the BSD 3-Clause Clear License
4+
# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear
5+
# License was not distributed with this source code in the LICENSE file, you
6+
# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the
7+
# Alliance for Open Media Patent License 1.0 was not distributed with this
8+
# source code in the PATENTS file, you can obtain it at
9+
# www.aomedia.org/license/patent.
10+
11+
# proto-file: iamf/cli/proto/user_metadata.proto
12+
# proto-message: UserMetadata
13+
14+
test_vector_metadata {
15+
human_readable_description: "An IA Sequence with two user-defined metadata OBUs."
16+
file_name_prefix: "test_000849"
17+
is_valid: true
18+
is_valid_to_decode: true
19+
validate_user_loudness: false
20+
mp4_fixed_timestamp: "2025-11-18 00:00:00"
21+
test_repository_tags: [
22+
"github/aomediacodec/libiamf/main"
23+
]
24+
primary_tested_spec_sections: ["3.11/Metadata OBUs"]
25+
base_test: "test_000845"
26+
partition_mix_gain_parameter_blocks: false
27+
}
28+
29+
encoder_control_metadata {
30+
add_build_information_tag: false
31+
output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC
32+
}
33+
34+
ia_sequence_header_metadata {
35+
primary_profile: PROFILE_VERSION_BASE_ADVANCED
36+
additional_profile: PROFILE_VERSION_BASE_ADVANCED
37+
}
38+
39+
metadata_obu_metadata {
40+
metadata_itu_t_t35 {
41+
itu_t_t35_country_code: 0xFF
42+
itu_t_t35_country_code_extension_byte: 112
43+
}
44+
}
45+
46+
metadata_obu_metadata {
47+
metadata_iamf_tags {
48+
tags {
49+
name: "test_key"
50+
value: "test_value"
51+
}
52+
}
53+
}
54+
55+
codec_config_metadata {
56+
codec_config_id: 200
57+
codec_config {
58+
codec_id: CODEC_ID_LPCM
59+
num_samples_per_frame: 1024
60+
audio_roll_distance: 0
61+
decoder_config_lpcm {
62+
sample_format_flags: LPCM_LITTLE_ENDIAN
63+
sample_size: 16
64+
sample_rate: 48000
65+
}
66+
}
67+
}
68+
69+
audio_element_metadata {
70+
audio_element_id: 300
71+
audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED
72+
reserved: 0
73+
codec_config_id: 200
74+
audio_substream_ids: [0]
75+
scalable_channel_layout_config {
76+
reserved: 0
77+
channel_audio_layer_configs: [
78+
{
79+
loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO
80+
output_gain_is_present_flag: 0
81+
recon_gain_is_present_flag: 0
82+
reserved_a: 0
83+
substream_count: 1
84+
coupled_substream_count: 1
85+
}
86+
]
87+
}
88+
}
89+
90+
audio_element_metadata {
91+
audio_element_id: 301
92+
audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED
93+
reserved: 0
94+
codec_config_id: 200
95+
audio_substream_ids: [1]
96+
scalable_channel_layout_config {
97+
reserved: 0
98+
channel_audio_layer_configs: [
99+
{
100+
loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO
101+
output_gain_is_present_flag: 0
102+
recon_gain_is_present_flag: 0
103+
reserved_a: 0
104+
substream_count: 1
105+
coupled_substream_count: 1
106+
}
107+
]
108+
}
109+
}
110+
111+
mix_presentation_metadata {
112+
mix_presentation_id: 42
113+
annotations_language: ["en-us"]
114+
localized_presentation_annotations: ["test_mix_pres"]
115+
sub_mixes {
116+
audio_elements {
117+
audio_element_id: 300
118+
localized_element_annotations: ["test_sub_mix_0_audio_element_0"]
119+
rendering_config {
120+
headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO
121+
}
122+
element_mix_gain {
123+
param_definition {
124+
parameter_id: 100
125+
parameter_rate: 48000
126+
param_definition_mode: 1
127+
reserved: 0
128+
}
129+
default_mix_gain: -768 # -3 dB.
130+
}
131+
}
132+
output_mix_gain {
133+
param_definition {
134+
parameter_id: 101
135+
parameter_rate: 48000
136+
param_definition_mode: 1
137+
reserved: 0
138+
}
139+
default_mix_gain: 0 # 0 dB.
140+
}
141+
layouts {
142+
loudness_layout {
143+
layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
144+
ss_layout {
145+
sound_system: SOUND_SYSTEM_A_0_2_0
146+
reserved: 0
147+
}
148+
}
149+
loudness {
150+
info_type_bit_masks: []
151+
}
152+
}
153+
}
154+
sub_mixes {
155+
audio_elements {
156+
audio_element_id: 301
157+
localized_element_annotations: ["test_sub_mix_1_audio_element_0"]
158+
rendering_config {
159+
headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO
160+
}
161+
element_mix_gain {
162+
param_definition {
163+
parameter_id: 100
164+
parameter_rate: 48000
165+
param_definition_mode: 1
166+
reserved: 0
167+
}
168+
default_mix_gain: -768 # -3 dB.
169+
}
170+
}
171+
output_mix_gain {
172+
param_definition {
173+
parameter_id: 101
174+
parameter_rate: 48000
175+
param_definition_mode: 1
176+
reserved: 0
177+
}
178+
default_mix_gain: 0 # 0 dB.
179+
}
180+
layouts {
181+
loudness_layout {
182+
layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
183+
ss_layout {
184+
sound_system: SOUND_SYSTEM_A_0_2_0
185+
reserved: 0
186+
}
187+
}
188+
loudness {
189+
info_type_bit_masks: []
190+
}
191+
}
192+
}
193+
}
194+
195+
audio_frame_metadata {
196+
samples_to_trim_at_end_includes_padding: false
197+
samples_to_trim_at_start_includes_codec_delay: false
198+
wav_filename: "dialog_clip_stereo.wav"
199+
audio_element_id: 300
200+
channel_metadatas: [
201+
{ channel_id: 0 channel_label: CHANNEL_LABEL_L_2 },
202+
{ channel_id: 1 channel_label: CHANNEL_LABEL_R_2 }
203+
]
204+
}
205+
206+
audio_frame_metadata {
207+
samples_to_trim_at_end_includes_padding: false
208+
samples_to_trim_at_start_includes_codec_delay: false
209+
wav_filename: "Mechanism_5s_24bit.wav"
210+
audio_element_id: 301
211+
channel_metadatas: [
212+
{ channel_id: 0 channel_label: CHANNEL_LABEL_L_2 },
213+
{ channel_id: 1 channel_label: CHANNEL_LABEL_R_2 }
214+
]
215+
}
216+
217+
temporal_delimiter_metadata {
218+
enable_temporal_delimiters: false
219+
}

0 commit comments

Comments
 (0)