diff --git a/tests/test_000013.iamf b/tests/test_000013.iamf new file mode 100644 index 00000000..2d784d55 Binary files /dev/null and b/tests/test_000013.iamf differ diff --git a/tests/test_000013.textproto b/tests/test_000013.textproto new file mode 100644 index 00000000..73614cfb --- /dev/null +++ b/tests/test_000013.textproto @@ -0,0 +1,163 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A stereo IAMF stream. Additional samples are trimmed from the start of " + "input wav file to make it shorter." + file_name_prefix: "test_000013" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2023-04-19 00:00:00" + primary_tested_spec_sections: ["3.2/num_samples_to_trim_at_end"] + base_test: "test_000005" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_LPCM + num_samples_per_frame: 64 + audio_roll_distance: 0 + decoder_config_lpcm { + sample_format_flags: LPCM_LITTLE_ENDIAN + sample_size: 16 + sample_rate: 16000 + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -13734 + digital_peak: -12879 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sawtooth_100_stereo.wav" + samples_to_trim_at_end: 0 + samples_to_trim_at_start: 3 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +parameter_block_metadata { + parameter_id: 100 + start_timestamp: 0 + duration: 8000 + num_subblocks: 1 + constant_subblock_duration: 8000 + subblocks: [ + { + mix_gain_parameter_data { + animation_type: ANIMATE_STEP + param_data { + step { + start_point_value: 0 + } + } + } + } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000013_f.mp4 b/tests/test_000013_f.mp4 new file mode 100644 index 00000000..c6d69c8b Binary files /dev/null and b/tests/test_000013_f.mp4 differ diff --git a/tests/test_000013_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000013_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..9139e5d5 Binary files /dev/null and b/tests/test_000013_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000013_s.mp4 b/tests/test_000013_s.mp4 new file mode 100644 index 00000000..96ec923a Binary files /dev/null and b/tests/test_000013_s.mp4 differ diff --git a/tests/test_000097.iamf b/tests/test_000097.iamf new file mode 100644 index 00000000..c1a32fa5 Binary files /dev/null and b/tests/test_000097.iamf differ diff --git a/tests/test_000097.textproto b/tests/test_000097.textproto new file mode 100644 index 00000000..f8f3adf8 --- /dev/null +++ b/tests/test_000097.textproto @@ -0,0 +1,159 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A mono IAMF stream with a bit-depth of 32." + file_name_prefix: "test_000097" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2023-05-05 00:00:00" + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Mono", + "3.9/Audio Frame OBU Syntax and Semantics", + "3.11.4/sample_size" + ] + base_test: "test_000031" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_LPCM + num_samples_per_frame: 64 + audio_roll_distance: 0 + decoder_config_lpcm { + sample_format_flags: LPCM_LITTLE_ENDIAN + sample_size: 32 + sample_rate: 16000 + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_MONO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 0 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 2 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_12_0_1_0 # Mono + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5892 + digital_peak: -5120 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5892 + digital_peak: -5890 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sine_1000_16khz_512ms_s32le.wav" + samples_to_trim_at_end: 0 + samples_to_trim_at_start: 0 + audio_element_id: 300 + channel_ids: [0] + channel_labels: ["M"] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000097_f.mp4 b/tests/test_000097_f.mp4 new file mode 100644 index 00000000..2abf27b8 Binary files /dev/null and b/tests/test_000097_f.mp4 differ diff --git a/tests/test_000097_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000097_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..11899fdc Binary files /dev/null and b/tests/test_000097_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000097_rendered_id_42_sub_mix_0_layout_1.wav b/tests/test_000097_rendered_id_42_sub_mix_0_layout_1.wav new file mode 100644 index 00000000..52a69bf7 Binary files /dev/null and b/tests/test_000097_rendered_id_42_sub_mix_0_layout_1.wav differ diff --git a/tests/test_000097_s.mp4 b/tests/test_000097_s.mp4 new file mode 100644 index 00000000..60f388b6 Binary files /dev/null and b/tests/test_000097_s.mp4 differ diff --git a/tests/test_000098.iamf b/tests/test_000098.iamf new file mode 100644 index 00000000..1d582220 Binary files /dev/null and b/tests/test_000098.iamf differ diff --git a/tests/test_000098.textproto b/tests/test_000098.textproto new file mode 100644 index 00000000..969541fa --- /dev/null +++ b/tests/test_000098.textproto @@ -0,0 +1,230 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A 2-layer IAMF stream encoded using Opus with the last layer " + "being 5.1 and a 32-bit input wav file." + file_name_prefix: "test_000098" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2023-11-14 00:00:00" + primary_tested_spec_sections: [ + "3.6/num_parameters", + "3.6.2/channel_audio_layer_config", + "3.6.2/loudspeaker_layout == Stereo", + "3.6.2/loudspeaker_layout == 5.1", + "3.6.2/num_layers", + "3.9/Audio Frame OBU Syntax and Semantics", + "3.11.1/OPUS Specific" + ] + base_test: "test_000049" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 2880 + audio_roll_distance: -2 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 4 + audio_substream_ids: [0, 1, 2, 3] + num_parameters: 2 + audio_element_params { + param_definition_type: PARAM_DEFINITION_TYPE_DEMIXING + demixing_param: { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 0 + reserved: 0 + duration: 2880 + num_subblocks: 1 + constant_subblock_duration: 2880 + } + default_demixing_info_parameter_data: { + dmixp_mode: DMIXP_MODE_2 + } + default_w: 0 + } + } + audio_element_params { + param_definition_type: PARAM_DEFINITION_TYPE_RECON_GAIN + recon_gain_param { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 0 + reserved: 0 + duration: 2880 + num_subblocks: 1 + constant_subblock_duration: 2880 + } + } + } + scalable_channel_layout_config { + num_layers: 2 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + }, + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 1 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 2 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -4618 + digital_peak: -630 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_B_0_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -4637 + digital_peak: -1009 + } + } + } +} + +audio_frame_metadata { + wav_filename: "Mechanism_5s_32bit.wav" + samples_to_trim_at_end: 1608 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1, 2, 3, 4, 5] + channel_labels: ["L5", "R5", "C", "LFE", "Ls5", "Rs5"] +} + +parameter_block_metadata { + parameter_id: 100 + start_timestamp: 0 + duration: 648000 + num_subblocks: 1 + constant_subblock_duration: 648000 + subblocks: [ + { + mix_gain_parameter_data { + animation_type: ANIMATE_STEP + param_data { + step { + start_point_value: 0 + } + } + } + } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000098_f.mp4 b/tests/test_000098_f.mp4 new file mode 100644 index 00000000..b7b403a2 Binary files /dev/null and b/tests/test_000098_f.mp4 differ diff --git a/tests/test_000098_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000098_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..e4d617b0 Binary files /dev/null and b/tests/test_000098_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000098_rendered_id_42_sub_mix_0_layout_1.wav b/tests/test_000098_rendered_id_42_sub_mix_0_layout_1.wav new file mode 100644 index 00000000..c140e2eb Binary files /dev/null and b/tests/test_000098_rendered_id_42_sub_mix_0_layout_1.wav differ diff --git a/tests/test_000098_s.mp4 b/tests/test_000098_s.mp4 new file mode 100644 index 00000000..09cecdba Binary files /dev/null and b/tests/test_000098_s.mp4 differ diff --git a/tests/test_000116.iamf b/tests/test_000116.iamf new file mode 100644 index 00000000..fd17e4e2 Binary files /dev/null and b/tests/test_000116.iamf differ diff --git a/tests/test_000116.textproto b/tests/test_000116.textproto new file mode 100644 index 00000000..6e2167ea --- /dev/null +++ b/tests/test_000116.textproto @@ -0,0 +1,226 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A stereo Opus IAMF stream which additionally contains several reserved " + "OBUs interlaced between the descriptor OBUs and in the first temporal " + "unit. The spec does not predetermine which reserved OBUs will be " + "descriptor OBUs and which will be temporal unit OBUs." + file_name_prefix: "test_000116" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2023-05-05 00:00:00" + primary_tested_spec_sections: [ + "3.2/obu_type", + "3.5/audio_roll_distance", + "3.9/Audio Frame OBU Syntax and Semantics", + "3.11.1/OPUS Specific", + "3.11.1/num_samples_per_frame", + "4/Reserved Descriptor OBU", + "4/Reserved Temporal Unit OBU", + "6.2.2/roll" + ] + base_test: "test_000020" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5393 + digital_peak: -5394 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sine_1000_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +parameter_block_metadata { + parameter_id: 100 + start_timestamp: 0 + duration: 24960 + num_subblocks: 1 + constant_subblock_duration: 24960 + subblocks: [ + { + mix_gain_parameter_data { + animation_type: ANIMATE_STEP + param_data { + step { + start_point_value: 0 + } + } + } + } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: true +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_IA_SEQUENCE_HEADER + obu_type: OBU_IA_RESERVED_24 + payload: "Imaginary descriptor OBU between the IA sequence header and codec config." +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_CODEC_CONFIGS + obu_type: OBU_IA_RESERVED_25 + payload: "Imaginary descriptor OBU between the codec config and audio element." +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_AUDIO_ELEMENTS + obu_type: OBU_IA_RESERVED_26 + payload: "Imaginary descriptor OBU between the audio element and mix presentation." +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_RESERVED_27 + payload: "Imaginary temporal unit OBU between the first temporal delimiter and the first parameter block." +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_RESERVED_28 + payload: "Imaginary temporal unit OBU between the first parameter block and the first audio frame." +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_AUDIO_FRAMES_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_RESERVED_29 + payload: "Imaginary temporal unit OBU between the first audio frame and the second temporal delimiter." +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_AUDIO_FRAMES_AT_TICK + insertion_tick: 960 + obu_type: OBU_IA_RESERVED_30 + payload: "Imaginary temporal unit OBU between the second audio frame the third temporal delimiter." +} diff --git a/tests/test_000116_f.mp4 b/tests/test_000116_f.mp4 new file mode 100644 index 00000000..7d7ad8f7 Binary files /dev/null and b/tests/test_000116_f.mp4 differ diff --git a/tests/test_000116_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000116_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..96534154 Binary files /dev/null and b/tests/test_000116_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000116_s.mp4 b/tests/test_000116_s.mp4 new file mode 100644 index 00000000..5831139c Binary files /dev/null and b/tests/test_000116_s.mp4 differ diff --git a/tests/test_000117.iamf b/tests/test_000117.iamf new file mode 100644 index 00000000..3164b3d0 Binary files /dev/null and b/tests/test_000117.iamf differ diff --git a/tests/test_000117.textproto b/tests/test_000117.textproto new file mode 100644 index 00000000..be84d29b --- /dev/null +++ b/tests/test_000117.textproto @@ -0,0 +1,162 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A stereo Opus IAMF stream which encodes a 500 ms sine wav with a " + "frequency of 1000 Hz, and where the Audio Element OBU has extension " + "header bytes." + file_name_prefix: "test_000117" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-08 00:00:00" + primary_tested_spec_sections: [ + "3.2/obu_extension_flag", + "3.5/audio_roll_distance", + "3.9/Audio Frame OBU Syntax and Semantics", + "3.11.1/OPUS Specific", + "3.11.1/num_samples_per_frame", + "6.2.2/roll" + ] + base_test: "test_000020" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + obu_header { + obu_extension_flag: true + extension_header_size: 5 + extension_header_bytes: "extra" + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5393 + digital_peak: -5394 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sine_1000_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000117_f.mp4 b/tests/test_000117_f.mp4 new file mode 100644 index 00000000..dd8f4a21 Binary files /dev/null and b/tests/test_000117_f.mp4 differ diff --git a/tests/test_000117_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000117_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..96534154 Binary files /dev/null and b/tests/test_000117_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000117_s.mp4 b/tests/test_000117_s.mp4 new file mode 100644 index 00000000..a0b27793 Binary files /dev/null and b/tests/test_000117_s.mp4 differ diff --git a/tests/test_000118.iamf b/tests/test_000118.iamf new file mode 100644 index 00000000..7e16981f Binary files /dev/null and b/tests/test_000118.iamf differ diff --git a/tests/test_000118.textproto b/tests/test_000118.textproto new file mode 100644 index 00000000..5d7222c2 --- /dev/null +++ b/tests/test_000118.textproto @@ -0,0 +1,338 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A two-layer 5.1 + stereo IAMF stream encoded using Opus and with two Mix " + "Presentations. The first Mix Presentation uses both Audio Elements. The " + "second Mix Presentation uses only the stereo Audio Element. The primary " + "profile is set to Simple and the additional profile is set to Base." + file_name_prefix: "test_000118" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-08 00:00:00" + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Stereo", + "3.6.2/loudspeaker_layout == 5.1", + "3.7/num_audio_elements", + "3.7.4/default_mix_gain", + "3.11.1/OPUS Specific", + "4.2/Simple Profile", + "4.2/Base Profile", + "8.5.1/Loudness Information" + ] + base_test: "test_000087" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_BASE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata: [ + { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 4 + audio_substream_ids: [0, 1, 2, 3] + num_parameters: 2 + audio_element_params { + param_definition_type: PARAM_DEFINITION_TYPE_DEMIXING + demixing_param: { + param_definition { + parameter_id: 996 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 0 + reserved: 0 + duration: 960 + num_subblocks: 1 + constant_subblock_duration: 960 + } + default_demixing_info_parameter_data: { + dmixp_mode: DMIXP_MODE_2 + } + default_w: 0 + } + } + audio_element_params { + param_definition_type: PARAM_DEFINITION_TYPE_RECON_GAIN + recon_gain_param { + param_definition { + parameter_id: 995 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 0 + reserved: 0 + duration: 960 + num_subblocks: 1 + constant_subblock_duration: 960 + } + } + } + scalable_channel_layout_config { + num_layers: 2 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + }, + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 1 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 1 + } + ] + } + }, + { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [4] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + } +] + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres_with_two_audio_elements" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 2 + audio_elements: [ + { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_mix_pres_0_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + }, + { + audio_element_id: 301 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_mix_pres_0_sub_mix_0_audio_element_1" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + } + ] + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 997 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 2 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5114 + digital_peak: -1416 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_B_0_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5119 + digital_peak: -1784 + } + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 43 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres_with_one_audio_element" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements: [ + { + audio_element_id: 301 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_mix_pres_1_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + } + ] + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 997 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -6481 + digital_peak: -2560 + } + } + } +} + +audio_frame_metadata: [ + { + wav_filename: "Mechanism_5s.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1, 2, 3, 4, 5] + channel_labels: ["L5", "R5", "C", "LFE", "Ls5", "Rs5"] + }, + { + wav_filename: "dialog_clip_stereo.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 301 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] + } +] + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000118_f.mp4 b/tests/test_000118_f.mp4 new file mode 100644 index 00000000..ae03b916 Binary files /dev/null and b/tests/test_000118_f.mp4 differ diff --git a/tests/test_000118_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000118_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..de30f3df Binary files /dev/null and b/tests/test_000118_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000118_rendered_id_42_sub_mix_0_layout_1.wav b/tests/test_000118_rendered_id_42_sub_mix_0_layout_1.wav new file mode 100644 index 00000000..450af5f8 Binary files /dev/null and b/tests/test_000118_rendered_id_42_sub_mix_0_layout_1.wav differ diff --git a/tests/test_000118_rendered_id_43_sub_mix_0_layout_0.wav b/tests/test_000118_rendered_id_43_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..2d092e84 Binary files /dev/null and b/tests/test_000118_rendered_id_43_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000118_s.mp4 b/tests/test_000118_s.mp4 new file mode 100644 index 00000000..02dcc699 Binary files /dev/null and b/tests/test_000118_s.mp4 differ diff --git a/tests/test_000124.iamf b/tests/test_000124.iamf new file mode 100644 index 00000000..3ca93e3b Binary files /dev/null and b/tests/test_000124.iamf differ diff --git a/tests/test_000124.textproto b/tests/test_000124.textproto new file mode 100644 index 00000000..53a6e4e9 --- /dev/null +++ b/tests/test_000124.textproto @@ -0,0 +1,235 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An invalid IAMF stream because it is base profile and the Mix " + "Presentation contains 2 sub-mixes." + file_name_prefix: "test_000124" + is_valid: false + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-08 00:00:00" + primary_tested_spec_sections: [ + "3.7/num_sub_mixes" + ] + base_test: "test_000020" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE + additional_profile: PROFILE_VERSION_BASE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [1] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 2 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used. + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used. + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5393 + digital_peak: -5394 + } + } + } + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 301 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_1_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used. + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used. + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5393 + digital_peak: -5394 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sine_1000_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +audio_frame_metadata { + wav_filename: "sine_1000_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 301 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000124_f.mp4 b/tests/test_000124_f.mp4 new file mode 100644 index 00000000..f6e44cb2 Binary files /dev/null and b/tests/test_000124_f.mp4 differ diff --git a/tests/test_000124_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000124_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..96534154 Binary files /dev/null and b/tests/test_000124_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000124_rendered_id_42_sub_mix_1_layout_0.wav b/tests/test_000124_rendered_id_42_sub_mix_1_layout_0.wav new file mode 100644 index 00000000..96534154 Binary files /dev/null and b/tests/test_000124_rendered_id_42_sub_mix_1_layout_0.wav differ diff --git a/tests/test_000124_s.mp4 b/tests/test_000124_s.mp4 new file mode 100644 index 00000000..e814d7f3 Binary files /dev/null and b/tests/test_000124_s.mp4 differ diff --git a/tests/test_000125.iamf b/tests/test_000125.iamf new file mode 100644 index 00000000..4a16d7c2 Binary files /dev/null and b/tests/test_000125.iamf differ diff --git a/tests/test_000125.textproto b/tests/test_000125.textproto new file mode 100644 index 00000000..f7e6beaf --- /dev/null +++ b/tests/test_000125.textproto @@ -0,0 +1,171 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An invalid IAMF stream because it is simple profile and contains a Mix " + "Presentation with a reserved headphones rendering mode." + file_name_prefix: "test_000125" + is_valid: false + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-09 00:00:00" + primary_tested_spec_sections: [ + "3.7.3/headphones_rendering_mode" + ] + base_test: "test_000020" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_RESERVED_2 + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5393 + digital_peak: -5394 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sine_1000_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +parameter_block_metadata { + parameter_id: 100 + start_timestamp: 0 + duration: 24960 + num_subblocks: 1 + constant_subblock_duration: 24960 + subblocks: [ + { + mix_gain_parameter_data { + animation_type: ANIMATE_STEP + param_data { + step { + start_point_value: 0 + } + } + } + } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000125_f.mp4 b/tests/test_000125_f.mp4 new file mode 100644 index 00000000..ba6b9ebd Binary files /dev/null and b/tests/test_000125_f.mp4 differ diff --git a/tests/test_000125_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000125_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..96534154 Binary files /dev/null and b/tests/test_000125_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000125_s.mp4 b/tests/test_000125_s.mp4 new file mode 100644 index 00000000..fea3e327 Binary files /dev/null and b/tests/test_000125_s.mp4 differ diff --git a/tests/test_000126.iamf b/tests/test_000126.iamf new file mode 100644 index 00000000..853994da Binary files /dev/null and b/tests/test_000126.iamf differ diff --git a/tests/test_000126.textproto b/tests/test_000126.textproto new file mode 100644 index 00000000..0ab18df0 --- /dev/null +++ b/tests/test_000126.textproto @@ -0,0 +1,169 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A stereo Opus IAMF stream with a Mix Presentation that contains two " + "loudness `layout_type` values: stereo and a reserved layout." + file_name_prefix: "test_000126" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-08 00:00:00" + primary_tested_spec_sections: [ + "3.7/loudness_layout", + "3.7.6/layout_type", + "3.9/Audio Frame OBU Syntax and Semantics", + "3.11.1/OPUS Specific", + "3.11.1/num_samples_per_frame", + "6.2.2/roll" + ] + base_test: "test_000020" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used. + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used. + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 2 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5393 + digital_peak: -5394 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_RESERVED_0 + reserved_or_binaural_layout { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: 0 + digital_peak: 0 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sine_1000_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000126_f.mp4 b/tests/test_000126_f.mp4 new file mode 100644 index 00000000..9cd5db8b Binary files /dev/null and b/tests/test_000126_f.mp4 differ diff --git a/tests/test_000126_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000126_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..96534154 Binary files /dev/null and b/tests/test_000126_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000126_s.mp4 b/tests/test_000126_s.mp4 new file mode 100644 index 00000000..27dc0df5 Binary files /dev/null and b/tests/test_000126_s.mp4 differ diff --git a/tests/test_000127.iamf b/tests/test_000127.iamf new file mode 100644 index 00000000..a82048d5 Binary files /dev/null and b/tests/test_000127.iamf differ diff --git a/tests/test_000127.textproto b/tests/test_000127.textproto new file mode 100644 index 00000000..65b79db5 --- /dev/null +++ b/tests/test_000127.textproto @@ -0,0 +1,210 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A first-order ambisonics + stereo base profile IAMF stream encoded using " + "Opus. Incorrectly sets primary/additional profiles to SIMPLE." + file_name_prefix: "test_000127" + is_valid: false + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-08 00:00:00" + primary_tested_spec_sections: [ + "3.6/num_parameters", + "3.6.2/loudspeaker_layout == Stereo", + "3.6.3/ambisonics_mono_config", + "3.7.4/default_mix_gain", + "3.11.1/OPUS Specific", + "4.2/Simple Profile", + "8.5.1/Loudness Information" + ] + base_test: "test_000303" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata: [ + { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 4 + audio_substream_ids: [0, 1, 2, 3] + num_parameters: 0 + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 4 + substream_count: 4 + channel_mapping: [0, 1, 2, 3] + } + } + }, + { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [4] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + } +] + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 2 + audio_elements: [ + { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + }, + { + audio_element_id: 301 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_1" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + } + ] + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 997 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -3488 + digital_peak: -750 + } + } + } +} + +audio_frame_metadata: [ + { + wav_filename: "Transport_TOA_5s.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1, 2, 3] + channel_labels: ["A0", "A1", "A2", "A3"] + }, + { + wav_filename: "dialog_clip_stereo.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 301 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] + } +] + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000127_f.mp4 b/tests/test_000127_f.mp4 new file mode 100644 index 00000000..2f422674 Binary files /dev/null and b/tests/test_000127_f.mp4 differ diff --git a/tests/test_000127_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000127_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..7f1667cb Binary files /dev/null and b/tests/test_000127_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000127_s.mp4 b/tests/test_000127_s.mp4 new file mode 100644 index 00000000..ee0c6a3f Binary files /dev/null and b/tests/test_000127_s.mp4 differ diff --git a/tests/test_000128.iamf b/tests/test_000128.iamf new file mode 100644 index 00000000..21ff89d9 Binary files /dev/null and b/tests/test_000128.iamf differ diff --git a/tests/test_000128.textproto b/tests/test_000128.textproto new file mode 100644 index 00000000..6dd7af1f --- /dev/null +++ b/tests/test_000128.textproto @@ -0,0 +1,264 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An invalid Base Profile IAMF stream with too many audio elements and " + "channels: first-order ambisonics + stereo + stereo IAMF stream encoded " + "using Opus." + file_name_prefix: "test_000128" + is_valid: false + validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-08 00:00:00" + primary_tested_spec_sections: [ + "3.6/num_parameters", + "3.6.2/loudspeaker_layout == Stereo", + "3.6.3/ambisonics_mono_config", + "3.7.4/default_mix_gain", + "3.11.1/OPUS Specific", + "4.2/Base Profile", + "8.5.1/Loudness Information" + ] + base_test: "test_000303" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE + additional_profile: PROFILE_VERSION_BASE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata: [ + { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 4 + audio_substream_ids: [0, 1, 2, 3] + num_parameters: 0 + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 4 + substream_count: 4 + channel_mapping: [0, 1, 2, 3] + } + } + }, + { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [4] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + }, + { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [5] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + } +] + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 3 + audio_elements: [ + { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + }, + { + audio_element_id: 301 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_1" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + }, + { + audio_element_id: 302 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_2" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + } + ] + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 997 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -3399 + digital_peak: -466 + } + } + } +} + +audio_frame_metadata: [ + { + wav_filename: "Transport_TOA_5s.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1, 2, 3] + channel_labels: ["A0", "A1", "A2", "A3"] + }, + { + wav_filename: "dialog_clip_stereo.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 301 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] + }, + { + wav_filename: "dialog_clip_stereo.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 302 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] + } +] + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000128_f.mp4 b/tests/test_000128_f.mp4 new file mode 100644 index 00000000..0d67a98e Binary files /dev/null and b/tests/test_000128_f.mp4 differ diff --git a/tests/test_000128_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000128_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..bd72946d Binary files /dev/null and b/tests/test_000128_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000128_s.mp4 b/tests/test_000128_s.mp4 new file mode 100644 index 00000000..f2f0cd73 Binary files /dev/null and b/tests/test_000128_s.mp4 differ diff --git a/tests/test_000131.iamf b/tests/test_000131.iamf new file mode 100644 index 00000000..0fef45a3 Binary files /dev/null and b/tests/test_000131.iamf differ diff --git a/tests/test_000131.textproto b/tests/test_000131.textproto new file mode 100644 index 00000000..46822f00 --- /dev/null +++ b/tests/test_000131.textproto @@ -0,0 +1,187 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata +# txtpbfmt: disable + +test_vector_metadata { + human_readable_description: + "A first-order ambisonics IAMF stream it contains a loudness layout which " + "is reserved in simple profile, but permitted in base-enhanced profile." + file_name_prefix: "test_000131" + is_valid: true +validate_user_loudness: true + mp4_fixed_timestamp: "2024-07-09 00:00:00" + primary_tested_spec_sections: [ + "3.6.3/ambisonics_projection_config", + "7/IAMF Processing", + "7.3.2/Rendering an Audio Element", + "7.3.2.2/Rendering a Scene-Based Audio Element to Loudspeakers" + ] + base_test: "test_000048" + output_wav_file_bit_depth_override: 16 +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_BASE_ENHANCED +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_OPUS + num_samples_per_frame: 960 + audio_roll_distance: -4 + decoder_config_opus { + version: 1 + pre_skip: 312 + input_sample_rate: 48000 + opus_encoder_metadata { + target_bitrate_per_channel: 48000 + application: APPLICATION_AUDIO + use_float_api: false + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 2 + audio_substream_ids: [0, 1] + num_parameters: 0 + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 4 + substream_count: 2 + coupled_substream_count: 2 + demixing_matrix: [ + 32767, 0, 0, 0, # col 0 + 0, 32767, 0, 0, # col 1 + 0, 0, 32767, 0, # col 2 + 0, 0, 0, 32767 # col 3 + ] + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [{ + mix_presentation_friendly_label: "test_mix_pres" + }] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 2 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5209 + digital_peak: -4110 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_13_6_9_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -32768 # Loudness value should be ignored. + digital_peak: -32768 # Loudness value should be ignored. + } + } + } +} + +audio_frame_metadata { + wav_filename: "sawtooth_10000_foa_48khz.wav" + samples_to_trim_at_end: 648 + samples_to_trim_at_start: 312 + audio_element_id: 300 + channel_ids: [0, 1, 2, 3] + channel_labels: ["A0", "A1", "A2", "A3"] +} + +parameter_block_metadata { + parameter_id: 100 + start_timestamp: 0 + duration: 24960 + num_subblocks: 1 + constant_subblock_duration: 24960 + subblocks: [ + { + mix_gain_parameter_data { + animation_type: ANIMATE_STEP + param_data { + step { + start_point_value: 0 + } + } + } + } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000131_f.mp4 b/tests/test_000131_f.mp4 new file mode 100644 index 00000000..2636cc18 Binary files /dev/null and b/tests/test_000131_f.mp4 differ diff --git a/tests/test_000131_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000131_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..911bd2bd Binary files /dev/null and b/tests/test_000131_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000131_s.mp4 b/tests/test_000131_s.mp4 new file mode 100644 index 00000000..18ff6371 Binary files /dev/null and b/tests/test_000131_s.mp4 differ diff --git a/tests/test_000500.iamf b/tests/test_000500.iamf new file mode 100644 index 00000000..30bd50be Binary files /dev/null and b/tests/test_000500.iamf differ diff --git a/tests/test_000500.textproto b/tests/test_000500.textproto new file mode 100644 index 00000000..7f4af950 --- /dev/null +++ b/tests/test_000500.textproto @@ -0,0 +1,156 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A mixed first-order ambisonics IAMF stream encoded using FLAC and " + "`ambisonics_mode` = `MONO`." + file_name_prefix: "test_000500" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2023-05-12 00:00:00" + primary_tested_spec_sections: [ + "3.6.3/ambisonics_mono_config", + "3.9/Audio Frame OBU Syntax and Semantics", + "3.11.3/FLAC Specific" + ] + base_test: "test_000074" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_FLAC + num_samples_per_frame: 64 + audio_roll_distance: 0 + decoder_config_flac: { + metadata_blocks: { + header: { + last_metadata_block_flag: true + block_type: FLAC_BLOCK_TYPE_STREAMINFO + metadata_data_block_length: 34 + } + stream_info { + minimum_block_size: 64 + maximum_block_size: 64 + sample_rate: 48000 + bits_per_sample: 15 # Flac interprets this as 16 bits. + total_samples_in_stream: 24000 + } + } + flac_encoder_metadata { + compression_level: 8 + } + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 3 + audio_substream_ids: [0, 1, 2] + num_parameters: 0 + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 4 + substream_count: 3 + # A2 is not present. + channel_mapping: [0, 1, 255, 2] + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5209 + digital_peak: -4109 + } + } + } +} + +audio_frame_metadata { + wav_filename: "sawtooth_10000_foa_48khz.wav" + samples_to_trim_at_end: 0 + samples_to_trim_at_start: 0 + audio_element_id: 300 + channel_ids: [0, 1, 3] + channel_labels: ["A0", "A1", "A3"] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000500_f.mp4 b/tests/test_000500_f.mp4 new file mode 100644 index 00000000..553796b8 Binary files /dev/null and b/tests/test_000500_f.mp4 differ diff --git a/tests/test_000500_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000500_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..1c12a8ce Binary files /dev/null and b/tests/test_000500_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000500_s.mp4 b/tests/test_000500_s.mp4 new file mode 100644 index 00000000..af03c916 Binary files /dev/null and b/tests/test_000500_s.mp4 differ diff --git a/tests/test_000501.iamf b/tests/test_000501.iamf new file mode 100644 index 00000000..c07b2187 Binary files /dev/null and b/tests/test_000501.iamf differ diff --git a/tests/test_000501.textproto b/tests/test_000501.textproto new file mode 100644 index 00000000..c3201ed4 --- /dev/null +++ b/tests/test_000501.textproto @@ -0,0 +1,158 @@ +# Copyright (c) 2024, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An IAMF stream which is backwards compatible with simple profile. It " + "contains a reserved OBU inserted after the IA Sequence Header OBU which " + "should be treated as a descriptor OBU." + file_name_prefix: "test_000501" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2024-01-09 00:00:00" + primary_tested_spec_sections: [ + "3.3/Reserved OBU Syntax and Semantics", + "4/Profiles" + ] + base_test: "test_000005" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_LPCM + num_samples_per_frame: 64 + audio_roll_distance: 0 + decoder_config_lpcm { + sample_format_flags: LPCM_LITTLE_ENDIAN + sample_size: 16 + sample_rate: 16000 + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -13733 + digital_peak: -12879 + } + } + } +} + +arbitrary_obu_metadata { + insertion_hook: INSERTION_HOOK_AFTER_IA_SEQUENCE_HEADER + obu_type: OBU_IA_RESERVED_24 + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: false + obu_extension_flag: false + } + payload: "FUTURE_DESCRIPTOR_OBU_24" +} + +audio_frame_metadata { + wav_filename: "sawtooth_100_stereo.wav" + samples_to_trim_at_end: 0 + samples_to_trim_at_start: 0 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000501_f.mp4 b/tests/test_000501_f.mp4 new file mode 100644 index 00000000..64c172fa Binary files /dev/null and b/tests/test_000501_f.mp4 differ diff --git a/tests/test_000501_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000501_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..08e71d1a Binary files /dev/null and b/tests/test_000501_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000501_s.mp4 b/tests/test_000501_s.mp4 new file mode 100644 index 00000000..1afab65e Binary files /dev/null and b/tests/test_000501_s.mp4 differ diff --git a/tests/test_000502.iamf b/tests/test_000502.iamf new file mode 100644 index 00000000..29f6e9ce Binary files /dev/null and b/tests/test_000502.iamf differ diff --git a/tests/test_000502.textproto b/tests/test_000502.textproto new file mode 100644 index 00000000..156bb953 --- /dev/null +++ b/tests/test_000502.textproto @@ -0,0 +1,216 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An invalid IAMF stream with two Mix Presentation OBUs. The stream is " + "invalid because one of the Mix Presentation OBUs has 0 sub-mixes." + file_name_prefix: "test_000502" + is_valid: false + validate_user_loudness: true + mp4_fixed_timestamp: "2023-08-07 00:00:00" + primary_tested_spec_sections: [ + "3.7/num_sub_mixes" + ] + base_test: "test_000409" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE + additional_profile: PROFILE_VERSION_BASE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_LPCM + num_samples_per_frame: 1024 + audio_roll_distance: 0 + decoder_config_lpcm { + sample_format_flags: LPCM_LITTLE_ENDIAN + sample_size: 16 + sample_rate: 48000 + } + } +} + +audio_element_metadata: [ + { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + }, + { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [1] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } + } +] + +mix_presentation_metadata: [ + { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres_0" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 2 + audio_elements: [ + { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 999 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + }, + { + audio_element_id: 301 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_1" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 998 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + } + ] + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 997 # Non-existent; default will be used + parameter_rate: 48000 + param_definition_mode: 1 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -5451 + digital_peak: -1784 + } + } + } + }, + { + mix_presentation_id: 43 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres_1" + } + ] + num_sub_mixes: 0 + } +] + +audio_frame_metadata: [ + { + wav_filename: "Mechanism_5s.wav" + samples_to_trim_at_end: 640 + samples_to_trim_at_start: 0 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] + }, + { + wav_filename: "dialog_clip_stereo.wav" + samples_to_trim_at_end: 640 + samples_to_trim_at_start: 0 + audio_element_id: 301 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] + } +] + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000502_f.mp4 b/tests/test_000502_f.mp4 new file mode 100644 index 00000000..1b9da7c4 Binary files /dev/null and b/tests/test_000502_f.mp4 differ diff --git a/tests/test_000502_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000502_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..c85628ae Binary files /dev/null and b/tests/test_000502_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000502_s.mp4 b/tests/test_000502_s.mp4 new file mode 100644 index 00000000..c69471e9 Binary files /dev/null and b/tests/test_000502_s.mp4 differ diff --git a/tests/test_000503.iamf b/tests/test_000503.iamf new file mode 100644 index 00000000..e8acff98 Binary files /dev/null and b/tests/test_000503.iamf differ diff --git a/tests/test_000503.textproto b/tests/test_000503.textproto new file mode 100644 index 00000000..5ba37df0 --- /dev/null +++ b/tests/test_000503.textproto @@ -0,0 +1,169 @@ +# Copyright (c) 2023, Alliance for Open Media. All rights reserved +# +# This source code is subject to the terms of the BSD 3-Clause Clear License +# and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear +# License was not distributed with this source code in the LICENSE file, you +# can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the +# Alliance for Open Media Patent License 1.0 was not distributed with this +# source code in the PATENTS file, you can obtain it at +# www.aomedia.org/license/patent. + +# proto-file: third_party/iamf_tools/iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An IAMF stream which uses a reserved bit in `info_type` which requires " + " the `info_type_size` and `info_type_bytes` fields to be used." + file_name_prefix: "test_000503" + is_valid: true + validate_user_loudness: true + mp4_fixed_timestamp: "2023-08-08 00:00:00" + primary_tested_spec_sections: [ + "3.7.7/info_type", + "3.7.7/info_type_size", + "3.7.7/info_type_bytes" + ] + base_test: "test_000005" +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_SIMPLE + additional_profile: PROFILE_VERSION_SIMPLE +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_LPCM + num_samples_per_frame: 64 + audio_roll_distance: 0 + decoder_config_lpcm { + sample_format_flags: LPCM_LITTLE_ENDIAN + sample_size: 16 + sample_rate: 16000 + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + num_substreams: 1 + audio_substream_ids: [0] + num_parameters: 0 + scalable_channel_layout_config { + num_layers: 1 + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_STEREO + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + count_label: 1 + language_labels: ["en-us"] + mix_presentation_annotations_array: [ + { + mix_presentation_friendly_label: "test_mix_pres" + } + ] + num_sub_mixes: 1 + sub_mixes { + num_audio_elements: 1 + audio_elements { + audio_element_id: 300 + mix_presentation_element_annotations_array: [ + { + audio_element_friendly_label: "test_sub_mix_0_audio_element_0" + } + ] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_config { + mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + } + output_mix_config { + output_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 16000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 + } + } + num_layouts: 1 + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_A_0_2_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [LOUDNESS_INFO_TYPE_RESERVED_4] + integrated_loudness: -13733 + digital_peak: -12879 + info_type_size: 5 + info_type_bytes: "extra" + } + } + } +} + +audio_frame_metadata { + wav_filename: "sawtooth_100_stereo.wav" + samples_to_trim_at_end: 0 + samples_to_trim_at_start: 0 + audio_element_id: 300 + channel_ids: [0, 1] + channel_labels: ["L2", "R2"] +} + +parameter_block_metadata { + parameter_id: 100 + start_timestamp: 0 + duration: 8000 + num_subblocks: 1 + constant_subblock_duration: 8000 + subblocks: [ + { + mix_gain_parameter_data { + animation_type: ANIMATE_STEP + param_data { + step { + start_point_value: 0 + } + } + } + } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000503_f.mp4 b/tests/test_000503_f.mp4 new file mode 100644 index 00000000..c6062d93 Binary files /dev/null and b/tests/test_000503_f.mp4 differ diff --git a/tests/test_000503_rendered_id_42_sub_mix_0_layout_0.wav b/tests/test_000503_rendered_id_42_sub_mix_0_layout_0.wav new file mode 100644 index 00000000..08e71d1a Binary files /dev/null and b/tests/test_000503_rendered_id_42_sub_mix_0_layout_0.wav differ diff --git a/tests/test_000503_s.mp4 b/tests/test_000503_s.mp4 new file mode 100644 index 00000000..a1e3b112 Binary files /dev/null and b/tests/test_000503_s.mp4 differ