Skip to content

Commit 8476892

Browse files
jwcullentdaede
authored andcommitted
Add a variety of new tests including additional edge cases.
- As always some of these have `is_valid = false`. - `test_000013`: Uses non-required trimmed samples. - `test_000097`: Uses a mono audio element and 32 bit=depth LPCM. - `test_000098`: Uses two layers and 32 bit-depth LPCM - `test_000116`: Places reserved OBUs at various spots within the bitstream. - `test_000117`: Uses `obu_exension_header`. - `test_000118`: Has a mix presentation which is valid in the "additional" profile, but not the "primary" profile. - `test_000124`: Has two sub-mixes. - `test_000125`: Uses a reserved `headphones_rendering_mode`. - `test_000126`: Has a reserved loudness layout. - `test_000127`: Has a mix presentation with too many audio elements for simple profile. - `test_000128`: Has a mix presentation with too many audio elements for base profile. - `test_000131`: Contains a loudness layout reserved in simple profile, but not in base-enhanced profile. - `test_000500`: Mixed-first order ambisonics using FLAC. - `test_000501`: Uses a single reserved OBU. - `test_000502`: Has 0 sub-mixes - `test_000503`: Uses the reserved fields in `info_type`.
1 parent c34ba7f commit 8476892

85 files changed

Lines changed: 3213 additions & 0 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/test_000013.iamf

32.7 KB
Binary file not shown.

tests/test_000013.textproto

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Copyright (c) 2023, 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: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto
12+
# proto-message: UserMetadata
13+
14+
test_vector_metadata {
15+
human_readable_description:
16+
"A stereo IAMF stream. Additional samples are trimmed from the start of "
17+
"input wav file to make it shorter."
18+
file_name_prefix: "test_000013"
19+
is_valid: true
20+
validate_user_loudness: true
21+
mp4_fixed_timestamp: "2023-04-19 00:00:00"
22+
primary_tested_spec_sections: ["3.2/num_samples_to_trim_at_end"]
23+
base_test: "test_000005"
24+
}
25+
26+
ia_sequence_header_metadata {
27+
primary_profile: PROFILE_VERSION_SIMPLE
28+
additional_profile: PROFILE_VERSION_SIMPLE
29+
}
30+
31+
codec_config_metadata {
32+
codec_config_id: 200
33+
codec_config {
34+
codec_id: CODEC_ID_LPCM
35+
num_samples_per_frame: 64
36+
audio_roll_distance: 0
37+
decoder_config_lpcm {
38+
sample_format_flags: LPCM_LITTLE_ENDIAN
39+
sample_size: 16
40+
sample_rate: 16000
41+
}
42+
}
43+
}
44+
45+
audio_element_metadata {
46+
audio_element_id: 300
47+
audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED
48+
reserved: 0
49+
codec_config_id: 200
50+
num_substreams: 1
51+
audio_substream_ids: [0]
52+
num_parameters: 0
53+
scalable_channel_layout_config {
54+
num_layers: 1
55+
reserved: 0
56+
channel_audio_layer_configs: [
57+
{
58+
loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO
59+
output_gain_is_present_flag: 0
60+
recon_gain_is_present_flag: 0
61+
reserved_a: 0
62+
substream_count: 1
63+
coupled_substream_count: 1
64+
}
65+
]
66+
}
67+
}
68+
69+
mix_presentation_metadata {
70+
mix_presentation_id: 42
71+
count_label: 1
72+
language_labels: ["en-us"]
73+
mix_presentation_annotations_array: [
74+
{
75+
mix_presentation_friendly_label: "test_mix_pres"
76+
}
77+
]
78+
num_sub_mixes: 1
79+
sub_mixes {
80+
num_audio_elements: 1
81+
audio_elements {
82+
audio_element_id: 300
83+
mix_presentation_element_annotations_array: [
84+
{
85+
audio_element_friendly_label: "test_sub_mix_0_audio_element_0"
86+
}
87+
]
88+
rendering_config {
89+
headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO
90+
}
91+
element_mix_config {
92+
mix_gain {
93+
param_definition {
94+
parameter_id: 100
95+
parameter_rate: 16000
96+
param_definition_mode: 1
97+
reserved: 0
98+
}
99+
default_mix_gain: 0
100+
}
101+
}
102+
}
103+
output_mix_config {
104+
output_mix_gain {
105+
param_definition {
106+
parameter_id: 100
107+
parameter_rate: 16000
108+
param_definition_mode: 1
109+
reserved: 0
110+
}
111+
default_mix_gain: 0
112+
}
113+
}
114+
num_layouts: 1
115+
layouts {
116+
loudness_layout {
117+
layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
118+
ss_layout {
119+
sound_system: SOUND_SYSTEM_A_0_2_0
120+
reserved: 0
121+
}
122+
}
123+
loudness {
124+
info_type_bit_masks: []
125+
integrated_loudness: -13734
126+
digital_peak: -12879
127+
}
128+
}
129+
}
130+
}
131+
132+
audio_frame_metadata {
133+
wav_filename: "sawtooth_100_stereo.wav"
134+
samples_to_trim_at_end: 0
135+
samples_to_trim_at_start: 3
136+
audio_element_id: 300
137+
channel_ids: [0, 1]
138+
channel_labels: ["L2", "R2"]
139+
}
140+
141+
parameter_block_metadata {
142+
parameter_id: 100
143+
start_timestamp: 0
144+
duration: 8000
145+
num_subblocks: 1
146+
constant_subblock_duration: 8000
147+
subblocks: [
148+
{
149+
mix_gain_parameter_data {
150+
animation_type: ANIMATE_STEP
151+
param_data {
152+
step {
153+
start_point_value: 0
154+
}
155+
}
156+
}
157+
}
158+
]
159+
}
160+
161+
temporal_delimiter_metadata {
162+
enable_temporal_delimiters: false
163+
}

tests/test_000013_f.mp4

34 KB
Binary file not shown.
31.3 KB
Binary file not shown.

tests/test_000013_s.mp4

33.8 KB
Binary file not shown.

tests/test_000097.iamf

32.5 KB
Binary file not shown.

tests/test_000097.textproto

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# Copyright (c) 2023, 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: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto
12+
# proto-message: UserMetadata
13+
14+
test_vector_metadata {
15+
human_readable_description: "A mono IAMF stream with a bit-depth of 32."
16+
file_name_prefix: "test_000097"
17+
is_valid: true
18+
validate_user_loudness: true
19+
mp4_fixed_timestamp: "2023-05-05 00:00:00"
20+
primary_tested_spec_sections: [
21+
"3.6.2/loudspeaker_layout == Mono",
22+
"3.9/Audio Frame OBU Syntax and Semantics",
23+
"3.11.4/sample_size"
24+
]
25+
base_test: "test_000031"
26+
}
27+
28+
ia_sequence_header_metadata {
29+
primary_profile: PROFILE_VERSION_SIMPLE
30+
additional_profile: PROFILE_VERSION_SIMPLE
31+
}
32+
33+
codec_config_metadata {
34+
codec_config_id: 200
35+
codec_config {
36+
codec_id: CODEC_ID_LPCM
37+
num_samples_per_frame: 64
38+
audio_roll_distance: 0
39+
decoder_config_lpcm {
40+
sample_format_flags: LPCM_LITTLE_ENDIAN
41+
sample_size: 32
42+
sample_rate: 16000
43+
}
44+
}
45+
}
46+
47+
audio_element_metadata {
48+
audio_element_id: 300
49+
audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED
50+
reserved: 0
51+
codec_config_id: 200
52+
num_substreams: 1
53+
audio_substream_ids: [0]
54+
num_parameters: 0
55+
scalable_channel_layout_config {
56+
num_layers: 1
57+
reserved: 0
58+
channel_audio_layer_configs: [
59+
{
60+
loudspeaker_layout: LOUDSPEAKER_LAYOUT_MONO
61+
output_gain_is_present_flag: 0
62+
recon_gain_is_present_flag: 0
63+
reserved_a: 0
64+
substream_count: 1
65+
coupled_substream_count: 0
66+
}
67+
]
68+
}
69+
}
70+
71+
mix_presentation_metadata {
72+
mix_presentation_id: 42
73+
count_label: 1
74+
language_labels: ["en-us"]
75+
mix_presentation_annotations_array: [
76+
{
77+
mix_presentation_friendly_label: "test_mix_pres"
78+
}
79+
]
80+
num_sub_mixes: 1
81+
sub_mixes {
82+
num_audio_elements: 1
83+
audio_elements {
84+
audio_element_id: 300
85+
mix_presentation_element_annotations_array: [
86+
{
87+
audio_element_friendly_label: "test_sub_mix_0_audio_element_0"
88+
}
89+
]
90+
rendering_config {
91+
headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO
92+
}
93+
element_mix_config {
94+
mix_gain {
95+
param_definition {
96+
parameter_id: 998 # Non-existent; default will be used
97+
parameter_rate: 16000
98+
param_definition_mode: 1
99+
reserved: 0
100+
}
101+
default_mix_gain: 0
102+
}
103+
}
104+
}
105+
output_mix_config {
106+
output_mix_gain {
107+
param_definition {
108+
parameter_id: 998 # Non-existent; default will be used
109+
parameter_rate: 16000
110+
param_definition_mode: 1
111+
reserved: 0
112+
}
113+
default_mix_gain: 0
114+
}
115+
}
116+
num_layouts: 2
117+
layouts {
118+
loudness_layout {
119+
layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
120+
ss_layout {
121+
sound_system: SOUND_SYSTEM_12_0_1_0 # Mono
122+
reserved: 0
123+
}
124+
}
125+
loudness {
126+
info_type_bit_masks: []
127+
integrated_loudness: -5892
128+
digital_peak: -5120
129+
}
130+
}
131+
layouts {
132+
loudness_layout {
133+
layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
134+
ss_layout {
135+
sound_system: SOUND_SYSTEM_A_0_2_0
136+
reserved: 0
137+
}
138+
}
139+
loudness {
140+
info_type_bit_masks: []
141+
integrated_loudness: -5892
142+
digital_peak: -5890
143+
}
144+
}
145+
}
146+
}
147+
148+
audio_frame_metadata {
149+
wav_filename: "sine_1000_16khz_512ms_s32le.wav"
150+
samples_to_trim_at_end: 0
151+
samples_to_trim_at_start: 0
152+
audio_element_id: 300
153+
channel_ids: [0]
154+
channel_labels: ["M"]
155+
}
156+
157+
temporal_delimiter_metadata {
158+
enable_temporal_delimiters: false
159+
}

tests/test_000097_f.mp4

33.2 KB
Binary file not shown.
32.1 KB
Binary file not shown.
64.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)