Skip to content

Commit 27e56a6

Browse files
jwcullentdaede
authored andcommitted
Add addition test vectors based on edge-cases and extension points.
- `test_000119`: Uses a reserved `codec_id`. - `test_000120`: Uses a reserved `audio_element_type`. - `test_000121`: Uses a reserved `param_definition_type`. - `test_000122`: Uses a reserved `loudspeaker_layout` in the first layer. - `test_000123`: Uses 28 channels. - `test_000129`: Uses a reserved `loudspeaker_layout` in the second layer. - `test_000130`: Uses a reserved `ambisonics_mode`. - `test_000132`: Uses fourth-order ambisonics. - Generated files based on AOMediaCodec/iamf-tools@02d6318
1 parent 8476892 commit 27e56a6

51 files changed

Lines changed: 1881 additions & 33 deletions

Some content is hidden

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

tests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Title | Summary
5454
`sine_1000_16khz_512ms_s32le.wav` | Sine wave. | 1 | 16kHz | pcm_s32le | 512ms
5555
`sine_1000_48kHz_512ms.wav` | Sine wave. | 2 | 48kHz | pcm_s16le | 512ms
5656
`sine_1000_48kHz.wav` | Sine wave. | 2 | 48kHz | pcm_s16le | 500ms
57+
`sine_1000_4oa_48kHz.wav` | Sine wave using fourth-order ambisonics. | 25 | 48kHz | pcm_s16le | 5000ms
5758
`stereo_8_samples_48khz_s16le.wav` | Tiny test file. The first channel encodes 1, 2, ... 8. The second channel encodes 65535, 65534, ... 65528. | 2 | 48kHz | pcm_s16le | 8 samples
5859
`stereo_8_samples_48khz_s24le.wav` | Tiny test file. The first channel encodes 1, 2, ... 8. The second channel encodes 16777216, 16777215, ... 16777209. | 2 | 48kHz | pcm_s24le | 8 samples
5960
`Transport_TOA_5s.wav` | Short clip of vehicles driving by using third-order ambisonics. | 16 | 48kHz | pcm_s16le | 5s

tests/coverage.csv

Lines changed: 51 additions & 28 deletions
Large diffs are not rendered by default.

tests/sine_1000_4oa_48khz.wav

11.4 MB
Binary file not shown.

tests/test_000119.iamf

225 Bytes
Binary file not shown.

tests/test_000119.textproto

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# Copyright (c) 2024, 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+
"An invalid stereo stream. The first mix uses a single stereo audio "
17+
"element encoded with LPCM. The second mix uses a single stereo audio "
18+
"element encoded with an imaginary `codec_id`. For convenience, the "
19+
"imaginary `codec_id` uses the same syntax as LPCM."
20+
file_name_prefix: "test_000119"
21+
is_valid: false
22+
partition_mix_gain_parameter_blocks: false
23+
validate_user_loudness: true
24+
mp4_fixed_timestamp: "2024-07-17 00:00:00"
25+
primary_tested_spec_sections: [
26+
"3.5/codec_id",
27+
"4.1/Simple Profile"
28+
]
29+
base_test: "test_000002"
30+
}
31+
32+
ia_sequence_header_metadata {
33+
primary_profile: PROFILE_VERSION_SIMPLE
34+
additional_profile: PROFILE_VERSION_SIMPLE
35+
}
36+
37+
codec_config_metadata {
38+
codec_config_id: 200
39+
codec_config {
40+
codec_id: CODEC_ID_LPCM
41+
num_samples_per_frame: 8
42+
audio_roll_distance: 0
43+
decoder_config_lpcm {
44+
sample_format_flags: LPCM_LITTLE_ENDIAN
45+
sample_size: 16
46+
sample_rate: 48000
47+
}
48+
}
49+
}
50+
51+
audio_element_metadata {
52+
audio_element_id: 300
53+
audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED
54+
reserved: 0
55+
codec_config_id: 200
56+
num_substreams: 1
57+
audio_substream_ids: [0]
58+
num_parameters: 0
59+
scalable_channel_layout_config {
60+
num_layers: 1
61+
reserved: 0
62+
channel_audio_layer_configs: [
63+
{
64+
loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO
65+
output_gain_is_present_flag: 0
66+
recon_gain_is_present_flag: 0
67+
reserved_a: 0
68+
substream_count: 1
69+
coupled_substream_count: 1
70+
}
71+
]
72+
}
73+
}
74+
75+
mix_presentation_metadata {
76+
mix_presentation_id: 42
77+
count_label: 1
78+
language_labels: ["en-us"]
79+
mix_presentation_annotations_array: [
80+
{
81+
mix_presentation_friendly_label: "test_mix_pres"
82+
}
83+
]
84+
num_sub_mixes: 1
85+
sub_mixes {
86+
num_audio_elements: 1
87+
audio_elements {
88+
audio_element_id: 300
89+
mix_presentation_element_annotations_array: [
90+
{
91+
audio_element_friendly_label: "test_sub_mix_0_audio_element_0"
92+
}
93+
]
94+
rendering_config {
95+
headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO
96+
}
97+
element_mix_config {
98+
mix_gain {
99+
param_definition {
100+
parameter_id: 100
101+
parameter_rate: 48000
102+
param_definition_mode: 1
103+
reserved: 0
104+
}
105+
default_mix_gain: 0
106+
}
107+
}
108+
}
109+
output_mix_config {
110+
output_mix_gain {
111+
param_definition {
112+
parameter_id: 100
113+
parameter_rate: 48000
114+
param_definition_mode: 1
115+
reserved: 0
116+
}
117+
default_mix_gain: 0
118+
}
119+
}
120+
num_layouts: 1
121+
layouts {
122+
loudness_layout {
123+
layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
124+
ss_layout {
125+
sound_system: SOUND_SYSTEM_A_0_2_0
126+
reserved: 0
127+
}
128+
}
129+
loudness {
130+
info_type_bit_masks: []
131+
integrated_loudness: -32768
132+
digital_peak: -32768
133+
}
134+
}
135+
}
136+
}
137+
138+
audio_frame_metadata {
139+
wav_filename: "stereo_8_samples_48khz_s16le.wav"
140+
samples_to_trim_at_end: 6
141+
samples_to_trim_at_start: 0
142+
audio_element_id: 300
143+
channel_ids: [0, 1]
144+
channel_labels: ["L2", "R2"]
145+
}
146+
147+
arbitrary_obu_metadata: [
148+
{
149+
# Simple profile does not support `codec_id == fake`.
150+
invalidates_bitstream: true
151+
insertion_hook: INSERTION_HOOK_AFTER_CODEC_CONFIGS
152+
obu_type: OBU_IA_CODEC_CONFIG
153+
payload:
154+
"\x22" # codec_config_id.
155+
"fake" # codec_id.
156+
"\x08" # num_samples_per_frame.
157+
"\x00\x00" # audio_roll_distance.
158+
# Begin an imaginary `decoder_config`. For convenience it has the same
159+
# syntax as LPCM.
160+
"\x01" # sample_format_flags.
161+
"\x10" # sample_size.
162+
"\x00\x00\xbb\x80" # sample_rate.
163+
},
164+
{
165+
insertion_hook: INSERTION_HOOK_AFTER_AUDIO_ELEMENTS
166+
obu_type: OBU_IA_AUDIO_ELEMENT
167+
payload:
168+
"\x33" # audio_element_id.
169+
"\x00" # audio_element_type (3), reserved (5).
170+
"\x22" # codec_config_id.
171+
"\x01" # num_substreams.
172+
"\x01" # substream_id.
173+
"\x00" # num_parameters.
174+
"\x20" # num_layers (3), reserved (5)
175+
"\x10" # loudspeaker_layout (4), output_gain_is_present_flag (1), reserved (2).
176+
"\x01" # substream_count.
177+
"\x01" # coupled_substream_count.
178+
},
179+
{
180+
insertion_hook: INSERTION_HOOK_AFTER_MIX_PRESENTATIONS
181+
obu_type: OBU_IA_MIX_PRESENTATION
182+
payload:
183+
"\x44" # mix_presentation_id.
184+
"\x00" # count_label.
185+
"\x01" # num_sub_mixes.
186+
"\x01" # num_audio_elements.
187+
"\x33" # audio_element_id.
188+
"\x00" # headphones_rendering_mode (2), reserved (6).
189+
"\x00" # rendering_config_size.
190+
# Begin ElementMixGain.
191+
"\x66" # parameter_id.
192+
"\x80\xf7\x02" # parameter_rate (leb128).
193+
"\x80" # param_definition_mode (1), reserved (7).
194+
"\x00\00" # default_mix_gain.
195+
# Begin OutputMixGain.
196+
"\x66" # parameter_id.
197+
"\x80\xf7\x02" # parameter_rate (leb128).
198+
"\x80" # param_definition_mode (1), reserved (7).
199+
"\x00\00" # default_mix_gain.
200+
"\x01" # num_layouts.
201+
"\x80" # layout_type (2), sound_system (4), reserved (2).
202+
"\x00" # info_type.
203+
"\x00\x00" # integrated_loudness.
204+
"\x00\x00" # digital_peak.
205+
},
206+
{
207+
insertion_hook: INSERTION_HOOK_AFTER_AUDIO_FRAMES_AT_TICK
208+
insertion_tick: 0
209+
obu_type: OBU_IA_AUDIO_FRAME_ID_1
210+
obu_header: {
211+
num_samples_to_trim_at_end: 6
212+
}
213+
# A short payload which which represents an audio frame encoding using an
214+
# imaginary codec associated with the imaginary `codec_id`.
215+
payload: "fakedata"
216+
}
217+
]
218+
219+
temporal_delimiter_metadata {
220+
enable_temporal_delimiters: false
221+
}

tests/test_000119_f.mp4

991 Bytes
Binary file not shown.
52 Bytes
Binary file not shown.

tests/test_000119_s.mp4

839 Bytes
Binary file not shown.

tests/test_000120.iamf

204 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)