• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: iamf/cli/proto/user_metadata.proto
12# proto-message: UserMetadata
13
14test_vector_metadata {
15  human_readable_description:
16    "A simple profile stereo IAMF stream with 1 substream. The final audio "
17    "frame incorrectly has fewer samples than all other frames because it does "
18    "not have sufficient `num_samples_to_trim_at_end`."
19  file_name_prefix: "test_000000_3"
20  # Typically the encoder would not produce partial frames. The correct way to
21  # signal an incomplete frame is to produce a full Audio Frame OBU, but with
22  # `num_samples_to_trim_at_end` signalled.
23  is_valid: false
24  # The decoder can reject the bitstream because the final frame is invalid.
25  is_valid_to_decode: false
26  validate_user_loudness: true
27  mp4_fixed_timestamp: "2023-04-06 00:00:00"
28  test_repository_tags: [
29    "github/aomediacodec/libiamf/main",
30    "github/aomediacodec/libiamf/v1.0.0-errata"
31  ]
32  primary_tested_spec_sections: [
33    "3.2/num_samples_to_trim_at_end",
34    "3.4/IA Sequence Header OBU Syntax and Semantics",
35    "3.5/num_samples_per_frame",
36    "6.2.2/ia_sample_duration"
37  ]
38  base_test: "None"
39}
40
41encoder_control_metadata {
42  add_build_information_tag: false
43}
44
45ia_sequence_header_metadata {
46  primary_profile: PROFILE_VERSION_SIMPLE
47  additional_profile: PROFILE_VERSION_SIMPLE
48}
49
50codec_config_metadata {
51  codec_config_id: 200
52  codec_config {
53    codec_id: CODEC_ID_LPCM
54    num_samples_per_frame: 64
55    audio_roll_distance: 0
56    decoder_config_lpcm {
57      sample_format_flags: LPCM_LITTLE_ENDIAN
58      sample_size: 16
59      sample_rate: 16000
60    }
61  }
62}
63
64audio_element_metadata {
65  audio_element_id: 300
66  audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED
67  reserved: 0
68  codec_config_id: 200
69  num_substreams: 1
70  audio_substream_ids: [0]
71  num_parameters: 0
72  scalable_channel_layout_config {
73    num_layers: 1
74    reserved: 0
75    channel_audio_layer_configs: [
76      {
77        loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO
78        output_gain_is_present_flag: 0
79        recon_gain_is_present_flag: 0
80        reserved_a: 0
81        substream_count: 1
82        coupled_substream_count: 1
83      }
84    ]
85  }
86}
87
88mix_presentation_metadata {
89  mix_presentation_id: 42
90  count_label: 1
91  annotations_language: ["en-us"]
92  localized_presentation_annotations: ["test_mix_pres"]
93  num_sub_mixes: 1
94  sub_mixes {
95    num_audio_elements: 1
96    audio_elements {
97      audio_element_id: 300
98      localized_element_annotations: ["test_sub_mix_0_audio_element_0"]
99      rendering_config {
100        headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO
101      }
102      element_mix_gain {
103        param_definition {
104          parameter_id: 100
105          parameter_rate: 16000
106          param_definition_mode: 1
107          reserved: 0
108        }
109        default_mix_gain: 0
110      }
111    }
112    output_mix_gain {
113      param_definition {
114        parameter_id: 100
115        parameter_rate: 16000
116        param_definition_mode: 1
117        reserved: 0
118      }
119      default_mix_gain: 0
120    }
121    num_layouts: 1
122    layouts {
123      loudness_layout {
124        layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION
125        ss_layout {
126          sound_system: SOUND_SYSTEM_A_0_2_0
127          reserved: 0
128        }
129      }
130      loudness {
131        info_type_bit_masks: []
132        integrated_loudness: -13733
133        digital_peak: -12879
134      }
135    }
136  }
137}
138
139# There are 8000 samples, with 64 samples per frame. The last frame does not
140# need padding.
141audio_frame_metadata {
142  wav_filename: "sawtooth_100_stereo.wav"
143  samples_to_trim_at_end: 0
144  samples_to_trim_at_start: 0
145  audio_element_id: 300
146  channel_metadatas: [
147    { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 },
148    { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 }
149  ]
150}
151
152arbitrary_obu_metadata {
153  invalidates_bitstream: true
154  insertion_hook: INSERTION_HOOK_AFTER_AUDIO_FRAMES_AT_TICK
155  # Insert a buggy audio frame after all of the real audio frames.
156  insertion_tick: 8000
157  obu_type: OBU_IA_AUDIO_FRAME_ID_0
158  # `CodecConfigObu::num_samples_per_frame` signals a real audio frame must have
159  # 64 samples (for each channel).
160  payload:
161    "in"  # 0th left sample.
162    "co"  # 0th right sample.
163    "mp"  # 1st left sample.
164    "le"  # 1st right sample.
165    "te"  # 2nd left sample.
166    "fr"  # 2nd right sample.
167    "am"  # 3rd left sample.
168    "e "  # 3rd right sample.
169}
170
171temporal_delimiter_metadata {
172  enable_temporal_delimiters: false
173}
174