diff --git a/tests/proto/arbitrary_obu.proto b/tests/proto/arbitrary_obu.proto index 8eadc0e2..05981d45 100644 --- a/tests/proto/arbitrary_obu.proto +++ b/tests/proto/arbitrary_obu.proto @@ -8,13 +8,17 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; import "obu_header.proto"; +option features.enum_type = CLOSED; + enum ArbitraryObuType { + option allow_alias = true; + OBU_IA_INVALID = 0; OBU_IA_CODEC_CONFIG = 1; OBU_IA_AUDIO_ELEMENT = 2; @@ -40,7 +44,8 @@ enum ArbitraryObuType { OBU_IA_AUDIO_FRAME_ID_15 = 22; OBU_IA_AUDIO_FRAME_ID_16 = 23; OBU_IA_AUDIO_FRAME_ID_17 = 24; - OBU_IA_RESERVED_24 = 25; + OBU_IA_RESERVED_24 = 25 [deprecated = true]; + OBU_IA_METADATA = 25; OBU_IA_RESERVED_25 = 26; OBU_IA_RESERVED_26 = 27; OBU_IA_RESERVED_27 = 28; @@ -52,7 +57,11 @@ enum ArbitraryObuType { enum InsertionHook { INSERTION_HOOK_INVALID = 0; + // Places this before the canonical descriptors. In an MP4 context, this would + // be early in the "IACB" box. INSERTION_HOOK_BEFORE_DESCRIPTORS = 1; + // Places this after the canonical descriptors. In an MP4 context, this would + // be late in the "IACB" box. INSERTION_HOOK_AFTER_DESCRIPTORS = 2; INSERTION_HOOK_AFTER_IA_SEQUENCE_HEADER = 3; INSERTION_HOOK_AFTER_CODEC_CONFIGS = 4; @@ -64,13 +73,15 @@ enum InsertionHook { } message ArbitraryObuMetadata { - optional InsertionHook insertion_hook = 1; - optional ArbitraryObuType obu_type = 4; - optional ObuHeaderMetadata obu_header = 2; - optional bytes payload = 3; + InsertionHook insertion_hook = 1; + ArbitraryObuType obu_type = 4; + ObuHeaderMetadata obu_header = 2; + bytes payload = 3; + // Used to force the bitstream to be invalid when this OBU is inserted. - optional bool invalidates_bitstream = 5; + bool invalidates_bitstream = 5; + // Used to control the temporal unit when using the *_AT_TICK insertion hooks. // Ignored otherwise. - optional int64 insertion_tick = 6; + int64 insertion_tick = 6; } diff --git a/tests/proto/audio_element.proto b/tests/proto/audio_element.proto index 2c91ff95..b8a78c69 100644 --- a/tests/proto/audio_element.proto +++ b/tests/proto/audio_element.proto @@ -8,32 +8,41 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; import "obu_header.proto"; import "param_definitions.proto"; +option features.enum_type = CLOSED; + enum AudioElementType { AUDIO_ELEMENT_INVALID = 0; AUDIO_ELEMENT_CHANNEL_BASED = 1; AUDIO_ELEMENT_SCENE_BASED = 2; + AUDIO_ELEMENT_OBJECT_BASED = 3; } message ParamDefinitionExtension { - optional uint32 param_definition_size = 1; - optional bytes param_definition_bytes = 2; + // `param_definition_size` is ignored. The value in the bitstream is inferred + // based on the size of `param_definition_bytes`. + uint32 param_definition_size = 1 [deprecated = true]; + bytes param_definition_bytes = 2; } message AudioElementParam { - optional uint32 deprecated_param_definition_type = 1 [deprecated = true]; - optional ParamDefinitionType param_definition_type = 5; + uint32 deprecated_param_definition_type = 1 [deprecated = true]; + + ParamDefinitionType param_definition_type = 5; + oneof param_definition { DemixingParamDefinition demixing_param = 2; ReconGainParamDefinition recon_gain_param = 3; ParamDefinitionExtension param_definition_extension = 4; } + + // Next ID: 6 } // Valid proto enums start at index 1, which are different from the @@ -70,27 +79,36 @@ enum ExpandedLoudspeakerLayout { EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_SI = 11; EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_TP_SI = 12; EXPANDED_LOUDSPEAKER_LAYOUT_TOP_6_CH = 13; - EXPANDED_LOUDSPEAKER_LAYOUT_RESERVED_13 = 14; + EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH = 14; + EXPANDED_LOUDSPEAKER_LAYOUT_LFE_PAIR = 15; + EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_3_CH = 16; + EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH = 17; + EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_4_CH = 18; + EXPANDED_LOUDSPEAKER_LAYOUT_TOP_1_CH = 19; + EXPANDED_LOUDSPEAKER_LAYOUT_TOP_5_CH = 20; EXPANDED_LOUDSPEAKER_LAYOUT_RESERVED_255 = 256; } message ChannelAudioLayerConfig { - optional uint32 deprecated_loudspeaker_layout = 1 [deprecated = true]; - optional LoudspeakerLayout loudspeaker_layout = 10; - optional uint32 output_gain_is_present_flag = 2; - optional uint32 recon_gain_is_present_flag = 3; - optional uint32 reserved_a = 4; - optional uint32 substream_count = 5; - optional uint32 coupled_substream_count = 6; - optional uint32 output_gain_flag = 7; - optional uint32 reserved_b = 8; - optional int32 output_gain = 9; - optional ExpandedLoudspeakerLayout expanded_loudspeaker_layout = 11; + uint32 deprecated_loudspeaker_layout = 1 [deprecated = true]; + + LoudspeakerLayout loudspeaker_layout = 10; + uint32 output_gain_is_present_flag = 2; + uint32 recon_gain_is_present_flag = 3; + uint32 reserved_a = 4; + uint32 substream_count = 5; + uint32 coupled_substream_count = 6; + uint32 output_gain_flag = 7; + uint32 reserved_b = 8; + int32 output_gain = 9; + ExpandedLoudspeakerLayout expanded_loudspeaker_layout = 11; } message ScalableChannelLayoutConfig { - optional uint32 num_layers = 1; - optional uint32 reserved = 2; + // `num_layers` is ignored. The value in the bitstream is inferred based on + // the number of `channel_audio_layer_configs`. + uint32 num_layers = 1 [deprecated = true]; + uint32 reserved = 2; repeated ChannelAudioLayerConfig channel_audio_layer_configs = 3; } @@ -101,44 +119,59 @@ enum AmbisonicsMode { } message AmbisonicsMonoConfig { - optional uint32 output_channel_count = 1; - optional uint32 substream_count = 2; - repeated uint32 channel_mapping = 3 [packed = true]; + uint32 output_channel_count = 1; + uint32 substream_count = 2; + repeated uint32 channel_mapping = 3; } message AmbisonicsProjectionConfig { - optional uint32 output_channel_count = 1; - optional uint32 substream_count = 2; - optional uint32 coupled_substream_count = 3; - repeated int32 demixing_matrix = 4 [packed = true]; + uint32 output_channel_count = 1; + uint32 substream_count = 2; + uint32 coupled_substream_count = 3; + repeated int32 demixing_matrix = 4; } message AmbisonicsConfig { - optional AmbisonicsMode ambisonics_mode = 1; + AmbisonicsMode ambisonics_mode = 1; + oneof ambisonics_config { AmbisonicsMonoConfig ambisonics_mono_config = 2; AmbisonicsProjectionConfig ambisonics_projection_config = 3; } } +message ObjectsConfig { + uint32 num_objects = 1; + bytes objects_config_extension_bytes = 2; +} + message AudioElementConfigExtension { - optional uint32 audio_element_config_size = 1; - optional bytes audio_element_config_bytes = 2; + // `audio_element_config_size` is ignored. The value in the bitstream is + // inferred based on the size of `audio_element_config_bytes`. + uint32 audio_element_config_size = 1 [deprecated = true]; + bytes audio_element_config_bytes = 2; } message AudioElementObuMetadata { - optional uint32 audio_element_id = 1; - optional AudioElementType audio_element_type = 2; - optional uint32 reserved = 3; - optional uint32 codec_config_id = 4; - optional uint32 num_substreams = 5; - repeated uint32 audio_substream_ids = 6 [packed = true]; - optional uint32 num_parameters = 7; + uint32 audio_element_id = 1; + AudioElementType audio_element_type = 2; + uint32 reserved = 3; + uint32 codec_config_id = 4; + // `num_substreams` is ignored. The value in the bitstream is inferred based + // on the number of `audio_substream_ids`. + uint32 num_substreams = 5 [deprecated = true]; + repeated uint32 audio_substream_ids = 6; + // `num_parameters` is ignored. The value in the bitstream is inferred based + // on the number of `audio_element_params`. + uint32 num_parameters = 7 [deprecated = true]; repeated AudioElementParam audio_element_params = 8; + oneof config { ScalableChannelLayoutConfig scalable_channel_layout_config = 9; AmbisonicsConfig ambisonics_config = 10; AudioElementConfigExtension audio_element_config_extension = 11; + ObjectsConfig objects_config = 13; } - optional ObuHeaderMetadata obu_header = 12; + + ObuHeaderMetadata obu_header = 12; } diff --git a/tests/proto/audio_frame.proto b/tests/proto/audio_frame.proto index a0186e6c..f8e31c25 100644 --- a/tests/proto/audio_frame.proto +++ b/tests/proto/audio_frame.proto @@ -8,30 +8,207 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; +option features.utf8_validation = NONE; + +enum ChannelLabel { + option features.enum_type = CLOSED; + + CHANNEL_LABEL_INVALID = 0; + + reserved 1; // Reserved for potential "omitted" label. + + // Mono channels. + CHANNEL_LABEL_MONO = 2; + + // Stereo or binaural channels. + CHANNEL_LABEL_L_2 = 3; + CHANNEL_LABEL_R_2 = 4; + + // Channels for objects. + CHANNEL_LABEL_OBJECT_CHANNEL0 = 67; + CHANNEL_LABEL_OBJECT_CHANNEL1 = 68; + + // Centre channel common to several layouts (e.g. 3.1.2, 5.x.y, 7.x.y). + CHANNEL_LABEL_CENTRE = 6; + + // LFE channel common to several layouts (e.g. 3.1.2, 5.1.y, 7.1.y, 9.1.6). + CHANNEL_LABEL_LFE = 7; + + // 3.1.2 surround channels. + CHANNEL_LABEL_L_3 = 8; + CHANNEL_LABEL_R_3 = 9; + CHANNEL_LABEL_LTF_3 = 10; + CHANNEL_LABEL_RTF_3 = 11; + + // 5.x.y surround channels. + CHANNEL_LABEL_L_5 = 14; + CHANNEL_LABEL_R_5 = 15; + CHANNEL_LABEL_LS_5 = 16; + CHANNEL_LABEL_RS_5 = 17; + + // Common channels between 5.1.2 and 7.1.2. + CHANNEL_LABEL_LTF_2 = 22; + CHANNEL_LABEL_RTF_2 = 23; + + // Common channels between 5.1.4 and 7.1.4. + CHANNEL_LABEL_LTF_4 = 26; + CHANNEL_LABEL_RTF_4 = 27; + CHANNEL_LABEL_LTB_4 = 28; + CHANNEL_LABEL_RTB_4 = 29; + + // 7.x.y surround channels. + CHANNEL_LABEL_L_7 = 32; + CHANNEL_LABEL_R_7 = 33; + CHANNEL_LABEL_LSS_7 = 34; + CHANNEL_LABEL_RSS_7 = 35; + CHANNEL_LABEL_LRS_7 = 36; + CHANNEL_LABEL_RRS_7 = 37; + + // 9.1.6 surround channels. + CHANNEL_LABEL_FLC = 42; + CHANNEL_LABEL_FC = 43; + CHANNEL_LABEL_FRC = 44; + CHANNEL_LABEL_FL = 45; + CHANNEL_LABEL_FR = 46; + CHANNEL_LABEL_SI_L = 47; + CHANNEL_LABEL_SI_R = 48; + CHANNEL_LABEL_BL = 49; + CHANNEL_LABEL_BR = 50; + CHANNEL_LABEL_TP_FL = 51; + CHANNEL_LABEL_TP_FR = 52; + CHANNEL_LABEL_TP_SI_L = 53; + CHANNEL_LABEL_TP_SI_R = 54; + CHANNEL_LABEL_TP_BL = 55; + CHANNEL_LABEL_TP_BR = 56; + + // Additional channels for 10.2.9.3. + CHANNEL_LABEL_BC = 57; + CHANNEL_LABEL_LFE2 = 58; + CHANNEL_LABEL_TP_FC = 59; + CHANNEL_LABEL_TP_C = 60; + CHANNEL_LABEL_TP_BC = 61; + CHANNEL_LABEL_BT_FC = 62; + CHANNEL_LABEL_BT_FL = 63; + CHANNEL_LABEL_BT_FR = 64; + + // Reserved for possible use of demixed labels. + reserved 5, 12, 13, 18 to 21, 24, 25, 30, 31, 38 to 41; + + // Additional channels for 7.1.5.4. + CHANNEL_LABEL_BT_BL = 65; + CHANNEL_LABEL_BT_BR = 66; + + // Reserved for channel-based labels. + reserved 69 to 999; + + CHANNEL_LABEL_A_0 = 1000; + CHANNEL_LABEL_A_1 = 1001; + CHANNEL_LABEL_A_2 = 1002; + CHANNEL_LABEL_A_3 = 1003; + CHANNEL_LABEL_A_4 = 1004; + CHANNEL_LABEL_A_5 = 1005; + CHANNEL_LABEL_A_6 = 1006; + CHANNEL_LABEL_A_7 = 1007; + CHANNEL_LABEL_A_8 = 1008; + CHANNEL_LABEL_A_9 = 1009; + CHANNEL_LABEL_A_10 = 1010; + CHANNEL_LABEL_A_11 = 1011; + CHANNEL_LABEL_A_12 = 1012; + CHANNEL_LABEL_A_13 = 1013; + CHANNEL_LABEL_A_14 = 1014; + CHANNEL_LABEL_A_15 = 1015; + CHANNEL_LABEL_A_16 = 1016; + CHANNEL_LABEL_A_17 = 1017; + CHANNEL_LABEL_A_18 = 1018; + CHANNEL_LABEL_A_19 = 1019; + CHANNEL_LABEL_A_20 = 1020; + CHANNEL_LABEL_A_21 = 1021; + CHANNEL_LABEL_A_22 = 1022; + CHANNEL_LABEL_A_23 = 1023; + CHANNEL_LABEL_A_24 = 1024; + + reserved 1025 to 1224; // Reserved for future ambisonics channels. + + // Next ID: 69 (channel-based) or 1025 (ambisonics). +} + +// Wrapper around the `ChannelLabel` enum to allow for serialization to the +// protocol buffer wire format. +message ChannelLabelMessage { + ChannelLabel channel_label = 1; +} + +message ChannelMetadata { + // Used to map the index of the channel in an ADM or WAV file. Ignored when + // data comes from other sources. + uint32 channel_id = 1; + + // The IAMF-based channel label. + ChannelLabel channel_label = 2; +} + message AudioFrameObuMetadata { - optional string wav_filename = 1; - reserved 2; - reserved 3; + reserved 2, 3, 7, 8; + reserved channel_ids, channel_labels; + + string wav_filename = 1; + + // Controls whether the number of samples required to pad the final frame are + // automatically added to the `samples_to_trim_at_end` value. + // + // When `true` `samples_to_trim_at_end` matches `num_samples_to_trim_at_end` + // in the OBU header. If the actual value is too small to account for padding, + // then encoding will fail. This is useful to closely represent the value in + // the OBU (rarely needed). + // + // When `false` `num_samples_to_trim_at_end` will be incremented by the + // amount of required padding and may not match the OBU header value. This is + // useful to closely represent the trimming applied to the original audio + // content (typically recommended). + // + // Typically the recommended settings are: + // - samples_to_trim_at_end_includes_padding: false + // - samples_to_trim_at_end: 0 + // These settings will automatically insert the correct padding to create a + // valid final frame and avoid trimming the original audio content. + bool samples_to_trim_at_end_includes_padding = 9 [default = true]; + + uint32 samples_to_trim_at_end = 4; + + // Controls whether the number of samples required by codec delay for the + // initial first frames are automatically added to the + // `samples_to_trim_at_start` value. + // + // When `true` `samples_to_trim_at_start` relates directly to + // `samples_to_trim_at_start`s in the initial OBU header. If the actual + // value is too small to account for codec delay, then encoding will fail. + // This is useful to closely represent the values in the initial OBUs (rarely + // needed). + // + // When `false` `samples_to_trim_at_start` will be incremented by the + // amount of required for the codec delay and may not match the OBU header + // value. This is useful to closely represent the trimming applied to the + // original audio content (typically recommended). + // + // Typically the recommended settings are: + // - samples_to_trim_at_start_includes_codec_delay: false + // - samples_to_trim_at_start: 0 + // These settings will automatically insert the correct codec delay to create + // a valid final frame and avoid trimming the original audio content. + bool samples_to_trim_at_start_includes_codec_delay = 10 [default = true]; - // Trimming information. - optional uint32 samples_to_trim_at_end = 4; - optional uint32 samples_to_trim_at_start = 5; + uint32 samples_to_trim_at_start = 5; // ID of the audio element whose substreams will be provided/mixed // from the channels in this WAV file. - optional uint32 audio_element_id = 6; + uint32 audio_element_id = 6; - // Channels used in this WAV file, in the order as described in [ITU2051-3] - // for loudspeaker layouts or ACN order for ambisonics. May be fewer than - // the total number of channels in the WAV file if only a subset is to be - // used. - repeated uint32 channel_ids = 7 [packed = true]; + // Metadata for each channel. + repeated ChannelMetadata channel_metadatas = 11; - // Channel Labels, e.g. "L2", "Ls5". For ambisonics, use "A{ACN number}", - // e.g. "A0", "A13". Must be of the same length as `channel_ids`. - repeated string channel_labels = 8; + // Next ID: 12 } diff --git a/tests/proto/codec_config.proto b/tests/proto/codec_config.proto index b36fb696..83456359 100644 --- a/tests/proto/codec_config.proto +++ b/tests/proto/codec_config.proto @@ -8,12 +8,14 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; import "obu_header.proto"; +option features.enum_type = CLOSED; + // Valid proto enums start at index 1, which are different from the // corresponding enums in C++, e.g. kLpcmBigEndian = 0. enum LpcmFormatFlags { @@ -23,9 +25,9 @@ enum LpcmFormatFlags { } message LpcmDecoderConfig { - optional LpcmFormatFlags sample_format_flags = 1; - optional uint32 sample_size = 2; - optional uint32 sample_rate = 3; + LpcmFormatFlags sample_format_flags = 1; + uint32 sample_size = 2; + uint32 sample_rate = 3; } enum OpusApplicationFlag { @@ -37,8 +39,8 @@ enum OpusApplicationFlag { // Settings to configure `libopus`. message OpusEncoderMetadata { - optional OpusApplicationFlag application = 2; - optional bool use_float_api = 3 [default = true]; + OpusApplicationFlag application = 2; + bool use_float_api = 3 [default = true]; // Fields to control the bitrate. // @@ -48,19 +50,28 @@ message OpusEncoderMetadata { // - One channel: `target_bitrate_per_channel`. // - Two channels: `target_bitrate_per_channel * 2 * // coupling_rate_adjustment`. - optional int32 target_bitrate_per_channel = 1; - optional float coupling_rate_adjustment = 4 [default = 1.0]; + int32 target_bitrate_per_channel = 1; + // The coupling rate adjustment should be in the range [0.5, 1.0]. + // At the lower bound, the effective bitrate for coupled channels would be + // the same as a mono channel, for highly correlated signals. + // At the upper bound, the effective bitrate for a coupled channel would be + // two times the rate for a mono channel, for highly disparate signals. + float coupling_rate_adjustment = 4 [default = 1.0]; + map substream_id_to_bitrate_override = 5; } message OpusDecoderConfig { - optional uint32 version = 1; - optional uint32 output_channel_count = 2 [default = 2]; - optional uint32 pre_skip = 3; - optional uint32 input_sample_rate = 4; - optional int32 output_gain = 5 [default = 0]; - optional uint32 mapping_family = 6 [default = 0]; - optional OpusEncoderMetadata opus_encoder_metadata = 7; + uint32 version = 1; + uint32 output_channel_count = 2 [default = 2]; + + uint32 pre_skip = 3; + uint32 input_sample_rate = 4; + int32 output_gain = 5 [default = 0]; + + uint32 mapping_family = 6 [default = 0]; + + OpusEncoderMetadata opus_encoder_metadata = 7; } enum SampleFrequencyIndex { @@ -71,7 +82,7 @@ enum SampleFrequencyIndex { AAC_SAMPLE_FREQUENCY_INDEX_48000 = 4; AAC_SAMPLE_FREQUENCY_INDEX_44100 = 5; AAC_SAMPLE_FREQUENCY_INDEX_32000 = 6; - AAC_SAMPLE_FREQUENCY_INDEX_23000 = 7; + AAC_SAMPLE_FREQUENCY_INDEX_24000 = 7; AAC_SAMPLE_FREQUENCY_INDEX_22050 = 8; AAC_SAMPLE_FREQUENCY_INDEX_16000 = 9; AAC_SAMPLE_FREQUENCY_INDEX_12000 = 10; @@ -80,42 +91,54 @@ enum SampleFrequencyIndex { AAC_SAMPLE_FREQUENCY_INDEX_7350 = 13; AAC_SAMPLE_FREQUENCY_INDEX_RESERVED_A = 14; AAC_SAMPLE_FREQUENCY_INDEX_RESERVED_B = 15; - AAC_SAMPLE_FREQUENCY_INDEX_ESCAPE_VALUE = 16; + AAC_SAMPLE_FREQUENCY_INDEX_ESCAPE_VALUE = 16 [deprecated = true]; } // Settings to configure `fdk_aac`. message AacEncoderMetadata { - optional int32 bitrate_mode = 1; - optional bool enable_afterburner = 2 [default = true]; - optional int32 signaling_mode = 3 [default = 2]; + int32 bitrate_mode = 1; + bool enable_afterburner = 2 [default = true]; + + int32 signaling_mode = 3 [default = 2]; } message AacDecoderSpecificInfo { - optional uint32 decoder_specific_info_descriptor_tag = 5 [default = 0x05]; - optional uint32 audio_object_type = 1 [default = 2]; - optional SampleFrequencyIndex sample_frequency_index = 2; - optional uint32 sampling_frequency = 3; - optional uint32 channel_configuration = 4 [default = 2]; + uint32 decoder_specific_info_descriptor_tag = 5 [default = 0x05]; + + uint32 audio_object_type = 1 [default = 2]; + + SampleFrequencyIndex sample_frequency_index = 2; + uint32 sampling_frequency = 3 [deprecated = true]; + uint32 channel_configuration = 4 [default = 2]; + + // Next ID: 6 } message AacGaSpecificConfig { - optional bool frame_length_flag = 1 [default = false]; - optional bool depends_on_core_coder = 2 [default = false]; - optional bool extension_flag = 3 [default = false]; + bool frame_length_flag = 1 [default = false]; + + bool depends_on_core_coder = 2 [default = false]; + + bool extension_flag = 3 [default = false]; } message AacDecoderConfig { - optional uint32 decoder_config_descriptor_tag = 11 [default = 0x04]; - optional uint32 object_type_indication = 1 [default = 0x40]; - optional uint32 stream_type = 2 [default = 5]; - optional bool upstream = 3 [default = false]; - optional bool reserved = 4 [default = true]; // As per ISO 14496-1:2010. - optional uint32 buffer_size_db = 5; - optional uint32 max_bitrate = 6; - optional uint32 average_bit_rate = 7; - optional AacDecoderSpecificInfo decoder_specific_info = 8; - optional AacGaSpecificConfig ga_specific_config = 9; - optional AacEncoderMetadata aac_encoder_metadata = 10; + uint32 decoder_config_descriptor_tag = 11 [default = 0x04]; + + uint32 object_type_indication = 1 [default = 0x40]; + + uint32 stream_type = 2 [default = 5]; + + bool upstream = 3 [default = false]; + + bool reserved = 4 [default = true]; // As per ISO 14496-1:2010. + + uint32 buffer_size_db = 5; + uint32 max_bitrate = 6; + uint32 average_bit_rate = 7; + AacDecoderSpecificInfo decoder_specific_info = 8; + AacGaSpecificConfig ga_specific_config = 9; + AacEncoderMetadata aac_encoder_metadata = 10; } enum FlacBlockType { @@ -130,32 +153,38 @@ enum FlacBlockType { } message FlacMetaBlockHeader { - optional bool last_metadata_block_flag = 1; - optional FlacBlockType block_type = 2; - optional uint32 metadata_data_block_length = 3; + // Ignored, inferred by the order of repeated fields. + bool last_metadata_block_flag = 1 [deprecated = true]; + FlacBlockType block_type = 2; + // Ignored, inferred from the block type and payload size. + uint32 metadata_data_block_length = 3 [deprecated = true]; } message FlacMetaBlockStreamInfo { - optional uint32 minimum_block_size = 1; - optional uint32 maximum_block_size = 2; - optional uint32 minimum_frame_size = 3 [default = 0]; - optional uint32 maximum_frame_size = 4 [default = 0]; - optional uint32 sample_rate = 5; - optional uint32 number_of_channels = 6 [default = 1]; - optional uint32 bits_per_sample = 7; - optional uint64 total_samples_in_stream = 8; - optional bytes md5_signature = 9 + uint32 minimum_block_size = 1; + uint32 maximum_block_size = 2; + uint32 minimum_frame_size = 3 [default = 0]; + + uint32 maximum_frame_size = 4 [default = 0]; + + uint32 sample_rate = 5; + uint32 number_of_channels = 6 [default = 1]; + + uint32 bits_per_sample = 7; + uint64 total_samples_in_stream = 8; + bytes md5_signature = 9 [default = - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"]; + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"]; } // Settings to configure `libflac`. message FlacEncoderMetadata { - optional uint32 compression_level = 1; + uint32 compression_level = 1; } message FlacMetaBlock { - optional FlacMetaBlockHeader header = 1; + FlacMetaBlockHeader header = 1; + oneof data { FlacMetaBlockStreamInfo stream_info = 2; bytes generic_block = 3; @@ -163,8 +192,10 @@ message FlacMetaBlock { } message FlacDecoderConfig { + reserved 1, 2; + repeated FlacMetaBlock metadata_blocks = 3; - optional FlacEncoderMetadata flac_encoder_metadata = 4; + FlacEncoderMetadata flac_encoder_metadata = 4; } enum CodecId { @@ -176,21 +207,36 @@ enum CodecId { } message CodecConfig { - optional uint32 deprecated_codec_id = 1 [deprecated = true]; - optional CodecId codec_id = 10; - optional uint32 num_samples_per_frame = 2; reserved 3, 4; - optional int32 audio_roll_distance = 9; + + uint32 deprecated_codec_id = 1 [deprecated = true]; + + CodecId codec_id = 10; + uint32 num_samples_per_frame = 2; + int32 audio_roll_distance = 9; + oneof decoder_config { LpcmDecoderConfig decoder_config_lpcm = 5; OpusDecoderConfig decoder_config_opus = 6; AacDecoderConfig decoder_config_aac = 7; FlacDecoderConfig decoder_config_flac = 8; } + + // If true, the codec-delay related fields will be ignored and automatically + // determined. For example, the OpusDecoderConfig.pre_skip field will be + // ignored and set to the number of samples reported by the underlying encoder + // library. + bool automatically_override_codec_delay = 11 [default = true]; + + // If true, the `audio_roll_distance` will be ignored and automatically be set + // to the correct value. + bool automatically_override_audio_roll_distance = 12 [default = true]; + + // Next ID: 13 } message CodecConfigObuMetadata { - optional uint32 codec_config_id = 1; - optional CodecConfig codec_config = 2; - optional ObuHeaderMetadata obu_header = 3; + uint32 codec_config_id = 1; + CodecConfig codec_config = 2; + ObuHeaderMetadata obu_header = 3; } diff --git a/tests/proto/element_gain_offset_config.proto b/tests/proto/element_gain_offset_config.proto new file mode 100644 index 00000000..3a273b0c --- /dev/null +++ b/tests/proto/element_gain_offset_config.proto @@ -0,0 +1,35 @@ +// Copyright (c) 2026, 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. + +edition = "2023"; + +package libiamf_proto; + +import "types.proto"; + +option java_outer_classname = "ElementGainOffsetConfig"; +option java_multiple_files = true; + +message ElementGainOffsetConfig { + message ValueType { + QFormatOrFloatingPoint element_gain_offset = 1; + } + + message RangeType { + QFormatOrFloatingPoint default_element_gain_offset = 1; + QFormatOrFloatingPoint min_element_gain_offset = 2; + QFormatOrFloatingPoint max_element_gain_offset = 3; + } + + oneof element_gain_offset_config_type { + ValueType value_type = 1; + RangeType range_type = 2; + } +} diff --git a/tests/proto/encoder_control_metadata.proto b/tests/proto/encoder_control_metadata.proto new file mode 100644 index 00000000..8788f6f0 --- /dev/null +++ b/tests/proto/encoder_control_metadata.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2025, 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. + +edition = "2023"; + +package libiamf_proto; + +import "output_audio_format.proto"; + +// Controls for the encoder behavior. +message EncoderControlMetadata { + // If true [default]: Each Mix Presentation OBU will get an extra + // `MixPresentationTag` with metadata describing the build + // information. + // If false: The encoder omit adding an extra build information tag. + bool add_build_information_tag = 1 [default = true]; + + // Controls the output audio format for any rendered files. The encoder may + // produce rendered files as a side effect of the encoding process. The files + // are useful for debugging and as an approximation of what a decoder would + // generate when playing back the IAMF file. + OutputAudioFormat output_rendered_file_format = 2 + [default = OUTPUT_FORMAT_NONE]; +} diff --git a/tests/proto/ia_sequence_header.proto b/tests/proto/ia_sequence_header.proto index e26d2ec8..5a72c9ac 100644 --- a/tests/proto/ia_sequence_header.proto +++ b/tests/proto/ia_sequence_header.proto @@ -8,23 +8,29 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; import "obu_header.proto"; enum ProfileVersion { + option features.enum_type = CLOSED; + PROFILE_VERSION_INVALID = 0; PROFILE_VERSION_SIMPLE = 1; PROFILE_VERSION_BASE = 2; PROFILE_VERSION_BASE_ENHANCED = 3; + PROFILE_VERSION_BASE_ADVANCED = 4; + PROFILE_VERSION_ADVANCED1 = 5; + PROFILE_VERSION_ADVANCED2 = 6; PROFILE_VERSION_RESERVED_255 = 256; } message IASequenceHeaderObuMetadata { - optional uint32 ia_code = 1 [default = 0x69616d66 /* "iamf" */]; - optional ProfileVersion primary_profile = 2; - optional ProfileVersion additional_profile = 3; - optional ObuHeaderMetadata obu_header = 4; + uint32 ia_code = 1 [default = 0x69616d66 /* "iamf" */, deprecated = true]; + + ProfileVersion primary_profile = 2; + ProfileVersion additional_profile = 3; + ObuHeaderMetadata obu_header = 4; } diff --git a/tests/proto/metadata_obu.proto b/tests/proto/metadata_obu.proto new file mode 100644 index 00000000..79bcd766 --- /dev/null +++ b/tests/proto/metadata_obu.proto @@ -0,0 +1,39 @@ +// Copyright (c) 2026, 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. + +edition = "2023"; + +package libiamf_proto; + +option java_multiple_files = true; +option java_outer_classname = "MetadataObu"; + +message MetadataITUTT35 { + uint32 itu_t_t35_country_code = 1; + // Only present if `itu_t_t35_country_code` is 0xFF. + uint32 itu_t_t35_country_code_extension_byte = 2; + bytes itu_t_t35_payload_bytes = 3; +} + +message Tag { + string name = 1; + string value = 2; +} + +message MetadataIamfTags { + repeated Tag tags = 1; +} + +message MetadataObuMetadata { + oneof metadata { + MetadataITUTT35 metadata_itu_t_t35 = 2; + MetadataIamfTags metadata_iamf_tags = 3; + } +} diff --git a/tests/proto/mix_presentation.proto b/tests/proto/mix_presentation.proto index a3973948..377b7b9a 100644 --- a/tests/proto/mix_presentation.proto +++ b/tests/proto/mix_presentation.proto @@ -8,67 +8,96 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; +import "element_gain_offset_config.proto"; import "obu_header.proto"; import "param_definitions.proto"; -message MixPresentationAnnotations { - option deprecated = true; +option features.enum_type = CLOSED; +option features.utf8_validation = NONE; - optional string mix_presentation_friendly_label = 1; -} - -message MixPresentationElementAnnotations { - option deprecated = true; +enum HeadPhonesRenderingMode { + option allow_alias = true; - optional string audio_element_friendly_label = 1; + HEADPHONES_RENDERING_MODE_INVALID = 0; + HEADPHONES_RENDERING_MODE_STEREO = 1; + // Spelling out `HEADPHONES_RENDERING_MODE_BINAURAL` or + // `HEADPHONES_RENDERING_MODE_RESERVED_2` is deprecated. Prefer the enums that + // explicitly state whether it is world-locked or head-locked. Historical uses + // will be automatically translated accordingly: + // + // - `HEADPHONES_RENDERING_MODE_BINAURAL` to + // `HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED`. + // - `HEADPHONES_RENDERING_MODE_RESERVED_2` to + // `HEADPHONES_RENDERING_MODE_BINAURAL_HEAD_LOCKED`. + HEADPHONES_RENDERING_MODE_BINAURAL = 2 [deprecated = true]; + HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED = 2; + HEADPHONES_RENDERING_MODE_RESERVED_2 = 3 [deprecated = true]; + HEADPHONES_RENDERING_MODE_BINAURAL_HEAD_LOCKED = 3; + HEADPHONES_RENDERING_MODE_RESERVED_3 = 4; } -message ElementMixConfig { - option deprecated = true; - - optional MixGainParamDefinition mix_gain = 1; +enum BinauralFilterProfile { + BINAURAL_FILTER_PROFILE_INVALID = 0; + BINAURAL_FILTER_PROFILE_AMBIENT = 1; + BINAURAL_FILTER_PROFILE_DIRECT = 2; + BINAURAL_FILTER_PROFILE_REVERBERANT = 3; + BINAURAL_FILTER_PROFILE_RESERVED3 = 4; } -enum HeadPhonesRenderingMode { - HEADPHONES_RENDERING_MODE_INVALID = 0; - HEADPHONES_RENDERING_MODE_STEREO = 1; - HEADPHONES_RENDERING_MODE_BINAURAL = 2; - HEADPHONES_RENDERING_MODE_RESERVED_2 = 3; - HEADPHONES_RENDERING_MODE_RESERVED_3 = 4; +message RenderingConfigParamDefinition { + ParamDefinitionType param_definition_type = 1; + oneof param_definition { + PolarParamDefinition polar_param_definition = 2; + Cart8ParamDefinition cart8_param_definition = 4; + Cart16ParamDefinition cart16_param_definition = 5; + DualPolarParamDefinition dual_polar_param_definition = 6; + DualCart8ParamDefinition dual_cart8_param_definition = 7; + DualCart16ParamDefinition dual_cart16_param_definition = 8; + bytes param_definition_bytes = 3; + } } message RenderingConfig { - optional HeadPhonesRenderingMode headphones_rendering_mode = 1; - optional uint32 reserved = 2; - optional uint32 rendering_config_extension_size = 3; - optional bytes rendering_config_extension_bytes = 4; + HeadPhonesRenderingMode headphones_rendering_mode = 1; + BinauralFilterProfile binaural_filter_profile = 7 + [default = BINAURAL_FILTER_PROFILE_AMBIENT]; + uint32 reserved = 2; + uint32 rendering_config_extension_size = 3 [deprecated = true]; + repeated RenderingConfigParamDefinition rendering_config_param_definitions = + 5; + ElementGainOffsetConfig element_gain_offset_config = 6; + bytes rendering_config_extension_bytes = 4; + + // Next ID: 8 } message SubMixAudioElement { - optional uint32 audio_element_id = 1; - reserved 2; - // Superseded by `localized_element_annotations`. - repeated MixPresentationElementAnnotations - mix_presentation_element_annotations_array = 4 [deprecated = true]; - // Length should be equal to `count_label` in the OBU. - repeated string localized_element_annotations = 6; + reserved 2, 3, 4; + reserved element_mix_config, mix_presentation_element_annotations_array; - optional RenderingConfig rendering_config = 5; - // Superseded by `element_mix_gain`. - optional ElementMixConfig element_mix_config = 3 [deprecated = true]; - optional MixGainParamDefinition element_mix_gain = 7; -} + uint32 audio_element_id = 1; -message OutputMixConfig { - option deprecated = true; + // Annotations, for this audio element. The length should be `count_label`. + repeated string localized_element_annotations = 6; + RenderingConfig rendering_config = 5; - optional MixGainParamDefinition output_mix_gain = 1; + MixGainParamDefinition element_mix_gain = 7; } +// See section 3.7.5 of the IAMF spec. +// +// IAMF pulls from various conventions. +// +// Sound systems A through J refer to ITU2051-3. Sound systems 10 through 14 +// refer to IAMF's own systems. +// +// Typically named in "A+B+C" convention, where A is the number of height +// speakers, B is the number of surround speakers, and C is the number of +// bottom speakers. enum SoundSystem { SOUND_SYSTEM_INVALID = 0; SOUND_SYSTEM_A_0_2_0 = 1; @@ -81,19 +110,20 @@ enum SoundSystem { SOUND_SYSTEM_H_9_10_3 = 8; SOUND_SYSTEM_I_0_7_0 = 9; SOUND_SYSTEM_J_4_7_0 = 10; - SOUND_SYSTEM_10_2_7_0 = 11; - SOUND_SYSTEM_11_2_3_0 = 12; - SOUND_SYSTEM_12_0_1_0 = 13; - SOUND_SYSTEM_13_6_9_0 = 14; + SOUND_SYSTEM_10_2_7_0 = 11; // IAMF's 7.1.2. + SOUND_SYSTEM_11_2_3_0 = 12; // IAMF's 3.1.2. + SOUND_SYSTEM_12_0_1_0 = 13; // Mono. + SOUND_SYSTEM_13_6_9_0 = 14; // IAMF's 9.1.6. + SOUND_SYSTEM_14_5_7_4 = 15; // IAMF's 7.1.5.4. } message LoudspeakersSsConventionLayout { - optional SoundSystem sound_system = 1; - optional uint32 reserved = 2; + SoundSystem sound_system = 1; + uint32 reserved = 2; } message LoudspeakersReservedOrBinauralLayout { - optional uint32 reserved = 1; + uint32 reserved = 1; } enum LayoutType { @@ -105,8 +135,10 @@ enum LayoutType { } message Layout { - optional LayoutType layout_type = 1; reserved 2; + + LayoutType layout_type = 1; + oneof specific_layout { LoudspeakersSsConventionLayout ss_layout = 3; LoudspeakersReservedOrBinauralLayout reserved_or_binaural_layout = 4; @@ -120,21 +152,34 @@ enum AnchorType { ANCHOR_TYPE_ALBUM = 3; } +// Values are represented to align with the IAMF spec. +// +// See +// https://aomediacodec.github.io/iamf/v1.1.0.html#obu-mixpresentation-loudness +// for further details. +// +// See detailed examples on Q7.8 format below in `LoudnessInfo`. message AnchorElement { - optional AnchorType anchor_element = 1; - optional int32 anchored_loudness = 2; + AnchorType anchor_element = 1; + int32 anchored_loudness = 2; // Q7.8. } message AnchoredLoudness { - optional uint32 num_anchored_loudness = 1; + // `num_anchored_loudness` is ignored. The value in the bitstream is inferred + // based on the number of `anchor_elements`. + uint32 num_anchored_loudness = 1 [deprecated = true]; + repeated AnchorElement anchor_elements = 2; } enum LoudnessInfoTypeBitMask { + option allow_alias = true; + LOUDNESS_INFO_TYPE_INVALID = 0; LOUDNESS_INFO_TYPE_TRUE_PEAK = 1; LOUDNESS_INFO_TYPE_ANCHORED_LOUDNESS = 2; - LOUDNESS_INFO_TYPE_RESERVED_4 = 4; + LOUDNESS_INFO_TYPE_RESERVED_4 = 4 [deprecated = true]; + LOUDNESS_INFO_TYPE_LIVE = 4; LOUDNESS_INFO_TYPE_RESERVED_8 = 8; LOUDNESS_INFO_TYPE_RESERVED_16 = 16; LOUDNESS_INFO_TYPE_RESERVED_32 = 32; @@ -142,66 +187,120 @@ enum LoudnessInfoTypeBitMask { LOUDNESS_INFO_TYPE_RESERVED_128 = 128; } +// Values are represented to align with the IAMF spec. +// +// See +// https://aomediacodec.github.io/iamf/v1.1.0.html#obu-mixpresentation-loudness +// for further details. +// +// To convert from dB to Q7.8, multiply by 256. Example: +// - For -3 dB, set the proto value to 256 * -3 = -768. +// - For +6 dB, set the proto value to 256 * 6 = 1536. message LoudnessInfo { - optional uint32 deprecated_info_type = 1 [deprecated = true]; - repeated LoudnessInfoTypeBitMask info_type_bit_masks = 8 [packed = true]; - optional int32 integrated_loudness = 2; - optional int32 digital_peak = 3; - optional int32 true_peak = 4; - optional AnchoredLoudness anchored_loudness = 5; - optional uint32 info_type_size = 6; - optional bytes info_type_bytes = 7; + uint32 deprecated_info_type = 1 [deprecated = true]; + + repeated LoudnessInfoTypeBitMask info_type_bit_masks = 8; + int32 integrated_loudness = 2; // Q7.8. + int32 digital_peak = 3; // Q7.8. + int32 true_peak = 4; // Q7.8. + AnchoredLoudness anchored_loudness = 5; + uint32 info_type_size = 6 [deprecated = true]; + bytes info_type_bytes = 7; + + // Next ID: 9 } message MixPresentationLayout { - optional Layout loudness_layout = 1; - optional LoudnessInfo loudness = 2; + Layout loudness_layout = 1; + LoudnessInfo loudness = 2; } message MixPresentationSubMix { - optional uint32 num_audio_elements = 1; + reserved 3; + reserved output_mix_config; + + // `num_audio_elements` is ignored. The value in the bitstream is inferred + // based on the number of `audio_elements`. + uint32 num_audio_elements = 1 [deprecated = true]; + repeated SubMixAudioElement audio_elements = 2; - // Superseded by `output_mix_gain`. - optional OutputMixConfig output_mix_config = 3 [deprecated = true]; - optional MixGainParamDefinition output_mix_gain = 6; + MixGainParamDefinition output_mix_gain = 6; + + // `num_layouts` is ignored. The value in the bitstream is inferred + // based on the number of `layouts`. + uint32 num_layouts = 4 [deprecated = true]; - optional uint32 num_layouts = 4; repeated MixPresentationLayout layouts = 5; + + // Next ID: 7 } message MixPresentationTag { - optional string tag_name = 1; - optional string tag_value = 2; + string tag_name = 1; + string tag_value = 2; } message MixPresentationTags { - optional uint32 num_tags = 1; + // `num_tags` is ignored. The value in the bitstream is inferred based on the + // number of tags. + uint32 num_tags = 1 [deprecated = true]; + repeated MixPresentationTag tags = 2; } +enum PreferredLoudspeakerRenderer { + PREFERRED_LOUDSPEAKER_RENDERER_INVALID = 0; + PREFERRED_LOUDSPEAKER_RENDERER_NONE = 1; + PREFERRED_LOUDSPEAKER_RENDERER_RESERVED_255 = 256; +} + +enum PreferredBinauralRenderer { + PREFERRED_BINAURAL_RENDERER_INVALID = 0; + PREFERRED_BINAURAL_RENDERER_NONE = 1; + PREFERRED_BINAURAL_RENDERER_RESERVED_255 = 256; +} + +message MixPresentationOptionalFields { + // `optional_fields_size` is ignored. The value in the bitstream is inferred + // based on the size of `optional_fields_remaining_bytes`. + PreferredLoudspeakerRenderer preferred_loudspeaker_renderer = 1; + PreferredBinauralRenderer preferred_binaural_renderer = 2; + bytes optional_fields_remaining_bytes = 3; +} + message MixPresentationObuMetadata { - reserved 2; - optional uint32 mix_presentation_id = 1; - optional uint32 count_label = 5; + reserved 2, 6, 7; + reserved language_labels, mix_presentation_annotations_array; + + uint32 mix_presentation_id = 1; + uint32 count_label = 5 [deprecated = true]; - // Superseded by `annotations_language`. - repeated string language_labels = 6 [deprecated = true]; - // Length should be equal to `count_label`. + // Language codes of the annotations themselves, infer the spec `count_label` + // from the length of this field. repeated string annotations_language = 9; - // Superseded by `localized_presentation_annotations`. - repeated MixPresentationAnnotations mix_presentation_annotations_array = 7 - [deprecated = true]; - // Length should be equal to `count_label`. + // Annotations, for this mix. The length should be `count_label`. repeated string localized_presentation_annotations = 10; - optional uint32 num_sub_mixes = 3; - repeated MixPresentationSubMix sub_mixes = 4; + // `num_sub_mixes` is ignored. The value in the bitstream is inferred + // based on the number of `sub_mixes`. + uint32 num_sub_mixes = 3 [deprecated = true]; - // When true, `mix_presentation_tags` will be examined. - optional bool include_mix_presentation_tags = 11; - optional MixPresentationTags mix_presentation_tags = 12; + repeated MixPresentationSubMix sub_mixes = 4; - optional ObuHeaderMetadata obu_header = 8; + // When false [default]: The encoder will ignore the below + // `mix_presentation_tags`. Beware that other features + // may still result in additional non-user specified + // tags. To stricly encode a file without any tags, set + // both `include_mix_presentation_tags` and + // `EncoderControlMetadata.add_build_information_tag` + // fields to false. + // When true: The encoder will use the `mix_presentation_tags` field. + bool include_mix_presentation_tags = 11; + MixPresentationTags mix_presentation_tags = 12; + MixPresentationOptionalFields optional_fields = 13; + ObuHeaderMetadata obu_header = 8; + + // Next ID: 14 } diff --git a/tests/proto/obu_header.proto b/tests/proto/obu_header.proto index 47f9aefa..ee9bc73e 100644 --- a/tests/proto/obu_header.proto +++ b/tests/proto/obu_header.proto @@ -8,18 +8,32 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; message ObuHeaderMetadata { - reserved 1; - optional bool obu_redundant_copy = 2 [default = false]; - optional bool obu_trimming_status_flag = 3 [default = false]; - optional bool obu_extension_flag = 4 [default = false]; - reserved 5; - optional uint32 num_samples_to_trim_at_end = 6 [default = 0]; - optional uint32 num_samples_to_trim_at_start = 7 [default = 0]; - optional uint32 extension_header_size = 8 [default = 0]; - optional bytes extension_header_bytes = 9 [default = ""]; + reserved 1, 5; + + bool obu_redundant_copy = 2 [default = false]; + + // TODO(b/475594651): Rename this flag to be more clear that it depends on the + // OBU type. + // Depending on the OBU type, this represents one of + // `obu_trimming_status_flag`, `is_not_key_frame`, `optional_fields_flag`, or + // `reserved`. + bool obu_trimming_status_flag = 3 [default = false]; + + bool obu_extension_flag = 4 [default = false]; + + uint32 num_samples_to_trim_at_end = 6 [default = 0]; + + uint32 num_samples_to_trim_at_start = 7 [default = 0]; + + // `extension_header_size` is ignored. The presence in the bitstream is + // determined by `obu_extension_flag`. The value in the bitstream is inferred + // based on the size of `extension_header_bytes`. + uint32 extension_header_size = 8 [default = 0, deprecated = true]; + + bytes extension_header_bytes = 9 [default = ""]; } diff --git a/tests/proto/output_audio_format.proto b/tests/proto/output_audio_format.proto new file mode 100644 index 00000000..1ef69f05 --- /dev/null +++ b/tests/proto/output_audio_format.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2025, 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. + +edition = "2023"; + +package libiamf_proto; + +enum OutputAudioFormat { + option features.enum_type = CLOSED; + + OUTPUT_FORMAT_INVALID = 0; + + // Omit output files. + OUTPUT_FORMAT_NONE = 1; + + // Wav file output. Bit depth is automatically determined based on the + // underlying codec. + OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC = 2; + + // Wav file output, with explicit bit depths. + OUTPUT_FORMAT_WAV_BIT_DEPTH_SIXTEEN = 3; + OUTPUT_FORMAT_WAV_BIT_DEPTH_TWENTY_FOUR = 4; + OUTPUT_FORMAT_WAV_BIT_DEPTH_THIRTY_TWO = 5; +} diff --git a/tests/proto/param_definitions.proto b/tests/proto/param_definitions.proto index f8aa7dbc..e21e887b 100644 --- a/tests/proto/param_definitions.proto +++ b/tests/proto/param_definitions.proto @@ -8,7 +8,7 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; @@ -17,36 +17,112 @@ import "parameter_data.proto"; // Valid proto enums start at index 1, which are different from the // corresponding enums in C++, e.g. kParameterDefinitionMixGain = 0. enum ParamDefinitionType { + option features.enum_type = CLOSED; + PARAM_DEFINITION_TYPE_INVALID = 0; PARAM_DEFINITION_TYPE_MIX_GAIN = 1; PARAM_DEFINITION_TYPE_DEMIXING = 2; PARAM_DEFINITION_TYPE_RECON_GAIN = 3; - PARAM_DEFINITION_TYPE_RESERVED_3 = 4; + PARAM_DEFINITION_TYPE_POLAR = 4; + PARAM_DEFINITION_TYPE_CART_8 = 5; + PARAM_DEFINITION_TYPE_CART_16 = 6; + PARAM_DEFINITION_TYPE_DUAL_POLAR = 7; + PARAM_DEFINITION_TYPE_DUAL_CART_8 = 8; + PARAM_DEFINITION_TYPE_DUAL_CART_16 = 9; + PARAM_DEFINITION_TYPE_RESERVED_255 = 256; } message ParamDefinition { - optional uint32 parameter_id = 1; - optional uint32 parameter_rate = 2; - optional bool param_definition_mode = 3; - optional uint32 reserved = 4; - optional uint32 duration = 5; - optional uint32 constant_subblock_duration = 7; - optional uint32 num_subblocks = 6; - repeated uint32 subblock_durations = 8 [packed = true]; + uint32 parameter_id = 1; + uint32 parameter_rate = 2; + bool param_definition_mode = 3; + uint32 reserved = 4; + uint32 duration = 5; + uint32 constant_subblock_duration = 7; + // `num_subblocks` is ignored. The value in the bitstream is inferred based on + // the number of `subblock_durations`. + uint32 num_subblocks = 6 [deprecated = true]; + repeated uint32 subblock_durations = 8; } +// Values are represented to align with the IAMF spec. +// +// See +// https://aomediacodec.github.io/iamf/v1.1.0.html#syntax-mixgain-parameter-definition +// for further details. +// +// To convert from dB to Q7.8, multiply by 256. Example: +// - For -3 dB, set the proto value to 256 * -3 = -768. +// - For +6 dB, set the proto value to 256 * 6 = 1536. message MixGainParamDefinition { - optional ParamDefinition param_definition = 1; - optional int32 default_mix_gain = 2; + ParamDefinition param_definition = 1; + int32 default_mix_gain = 2; // Q7.8. } message DemixingParamDefinition { - optional ParamDefinition param_definition = 1; - optional DemixingInfoParameterData default_demixing_info_parameter_data = 2; - optional uint32 default_w = 3; - optional uint32 reserved = 4; + ParamDefinition param_definition = 1; + DemixingInfoParameterData default_demixing_info_parameter_data = 2; + uint32 default_w = 3; + uint32 reserved = 4; } message ReconGainParamDefinition { - optional ParamDefinition param_definition = 1; + ParamDefinition param_definition = 1; +} + +message PolarParamDefinition { + ParamDefinition param_definition = 1; + int32 default_azimuth = 2; // 9 bits. + // `default_azimuth` is clipped to [-180, 180]. + int32 default_elevation = 3; // 8 bits. + // `default_elevation` is clipped to [-90, 90]. + int32 default_distance = 4; // 7 bits. +} + +message Cart8ParamDefinition { + ParamDefinition param_definition = 1; + int32 default_x = 2; // 8 bits. + int32 default_y = 3; // 8 bits. + int32 default_z = 4; // 8 bits. +} + +message Cart16ParamDefinition { + ParamDefinition param_definition = 1; + int32 default_x = 2; // 16 bits. + int32 default_y = 3; // 16 bits. + int32 default_z = 4; // 16 bits. +} + +message DualPolarParamDefinition { + ParamDefinition param_definition = 1; + int32 default_first_azimuth = 2; // 9 bits. + // `default_first_azimuth` is clipped to [-180, 180]. + int32 default_first_elevation = 3; // 8 bits. + // `default_first_elevation` is clipped to [-90, 90]. + int32 default_first_distance = 4; // 7 bits. + int32 default_second_azimuth = 5; // 9 bits. + // `default_second_azimuth` is clipped to [-180, 180]. + int32 default_second_elevation = 6; // 8 bits. + // `default_second_elevation` is clipped to [-90, 90]. + int32 default_second_distance = 7; // 7 bits. +} + +message DualCart8ParamDefinition { + ParamDefinition param_definition = 1; + int32 default_first_x = 2; // 8 bits. + int32 default_first_y = 3; // 8 bits. + int32 default_first_z = 4; // 8 bits. + int32 default_second_x = 5; // 8 bits. + int32 default_second_y = 6; // 8 bits. + int32 default_second_z = 7; // 8 bits. +} + +message DualCart16ParamDefinition { + ParamDefinition param_definition = 1; + int32 default_first_x = 2; // 16 bits. + int32 default_first_y = 3; // 16 bits. + int32 default_first_z = 4; // 16 bits. + int32 default_second_x = 5; // 16 bits. + int32 default_second_y = 6; // 16 bits. + int32 default_second_z = 7; // 16 bits. } diff --git a/tests/proto/parameter_block.proto b/tests/proto/parameter_block.proto index f85aeb28..3fb4f00e 100644 --- a/tests/proto/parameter_block.proto +++ b/tests/proto/parameter_block.proto @@ -8,7 +8,7 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; @@ -16,12 +16,15 @@ import "obu_header.proto"; import "parameter_data.proto"; message ParameterDataExtension { - optional uint32 parameter_data_size = 1; - optional bytes parameter_data_bytes = 2; + // `parameter_data_size` is ignored. The value in the bitstream is inferred + // based on the size of `parameter_data_bytes`. + uint32 parameter_data_size = 1 [deprecated = true]; + bytes parameter_data_bytes = 2; } message ParameterSubblock { - optional uint32 subblock_duration = 1; + uint32 subblock_duration = 1; + oneof parameter_data { MixGainParameterData mix_gain_parameter_data = 2; DemixingInfoParameterData demixing_info_parameter_data = 3; @@ -31,11 +34,13 @@ message ParameterSubblock { } message ParameterBlockObuMetadata { - optional uint32 parameter_id = 1; - optional uint32 duration = 2; - optional uint32 num_subblocks = 3; - optional uint32 constant_subblock_duration = 4; + uint32 parameter_id = 1; + uint32 duration = 2; + // `num_subblocks` is ignored. The value in the bitstream is inferred based on + // the number of `subblocks`. + uint32 num_subblocks = 3 [deprecated = true]; + uint32 constant_subblock_duration = 4; repeated ParameterSubblock subblocks = 5; - optional int32 start_timestamp = 6; - optional ObuHeaderMetadata obu_header = 7; + int64 start_timestamp = 6; + ObuHeaderMetadata obu_header = 7; } diff --git a/tests/proto/parameter_data.proto b/tests/proto/parameter_data.proto index 763ce867..b6df7007 100644 --- a/tests/proto/parameter_data.proto +++ b/tests/proto/parameter_data.proto @@ -8,10 +8,12 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; +option features.enum_type = CLOSED; + enum AnimationType { ANIMATE_INVALID = 0; ANIMATE_STEP = 1; @@ -19,20 +21,47 @@ enum AnimationType { ANIMATE_BEZIER = 3; } +// Values are represented to align with the IAMF spec. +// +// See https://aomediacodec.github.io/iamf/v1.1.0.html#syntax-mix-gain-param for +// further details. +// +// See detailed examples on Q7.8 format below in `AnimationLinearInt16`. message AnimationStepInt16 { - optional int32 start_point_value = 1; + int32 start_point_value = 1; // Q7.8. } +// Values are represented to align with the IAMF spec. +// +// See https://aomediacodec.github.io/iamf/v1.1.0.html#syntax-mix-gain-param for +// further details. +// +// See detailed examples on Q7.8 format below in `AnimationLinearInt16`. message AnimationLinearInt16 { - optional int32 start_point_value = 1; - optional int32 end_point_value = 2; + int32 start_point_value = 1; // Q7.8. + int32 end_point_value = 2; // Q7.8. } +// Values are represented to align with the IAMF spec. +// +// See https://aomediacodec.github.io/iamf/v1.1.0.html#syntax-mix-gain-param for +// further details. +// +// To convert from dB to Q7.8, multiply by 256. Example: +// - For -3 dB, set the proto value to 256 * -3 = -768. +// - For +6 dB, set the proto value to 256 * 6 = 1536. +// +// To convert from a float in the range [0.0, 1.0] to Q0.8. Multiply by 256 and +// clamp to the range [0, 255]. Examples: +// - For a control point relative time of 0.5, set the proto value to +// clam(0.5 * 256, 0, 255) = 128. +// - For a control point relative time of 1.0, set the proto value to +// clamp(1.0 * 256, 0, 255) = 255. message AnimationBezierInt16 { - optional int32 start_point_value = 1; - optional int32 end_point_value = 2; - optional int32 control_point_value = 3; - optional uint32 control_point_relative_time = 4; + int32 start_point_value = 1; // Q7.8. + int32 end_point_value = 2; // Q7.8. + int32 control_point_value = 3; // Q7.8. + uint32 control_point_relative_time = 4; // Q0.8. } message AnimatedParameterDataInt16 { @@ -44,12 +73,13 @@ message AnimatedParameterDataInt16 { } message MixGainParameterData { - optional AnimationType animation_type = 1; - optional AnimatedParameterDataInt16 param_data = 2; + AnimationType animation_type = 1; + AnimatedParameterDataInt16 param_data = 2; } enum DMixPMode { DMIXP_MODE_INVALID = 0; + // (alpha, beta, gamma, delta, w_idx_offset) DMIXP_MODE_1 = 1; // ( 1, 1, 0.707, 0.707, -1) DMIXP_MODE_2 = 2; // (0.707, 0.707, 0.707, 0.707, -1) @@ -62,11 +92,13 @@ enum DMixPMode { } message DemixingInfoParameterData { - optional DMixPMode dmixp_mode = 1; - optional uint32 reserved = 2; + DMixPMode dmixp_mode = 1; + uint32 reserved = 2; } message ReconGains { + reserved 1; + // Mapping from a bit position to a recon gain value. // If recon_gain[j] is defined, then the j-th bit of recon_gain_flags[i] // (for the i-th layer) will be set. @@ -74,6 +106,8 @@ message ReconGains { } message ReconGainInfoParameterData { + reserved 1; + // Length = `num_layers`. repeated ReconGains recon_gains_for_layer = 2; } diff --git a/tests/proto/temporal_delimiter.proto b/tests/proto/temporal_delimiter.proto index ab95ea5c..7ea30677 100644 --- a/tests/proto/temporal_delimiter.proto +++ b/tests/proto/temporal_delimiter.proto @@ -8,10 +8,10 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; message TemporalDelimiterObuMetadata { - optional bool enable_temporal_delimiters = 1; + bool enable_temporal_delimiters = 1; } diff --git a/tests/proto/test_vector_metadata.proto b/tests/proto/test_vector_metadata.proto index 096c1abe..430ec9e6 100644 --- a/tests/proto/test_vector_metadata.proto +++ b/tests/proto/test_vector_metadata.proto @@ -8,41 +8,53 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; +option features.utf8_validation = NONE; + enum Leb128GeneratorMode { + option features.enum_type = CLOSED; + GENERATE_LEB_INVALID = 0; + // Generate values using the minimum number of bytes. GENERATE_LEB_MINIMUM = 1; + // Generate values using the target of bytes. GENERATE_LEB_FIXED_SIZE = 2; } message Leb128Generator { - optional Leb128GeneratorMode mode = 1 [default = GENERATE_LEB_MINIMUM]; + Leb128GeneratorMode mode = 1 [default = GENERATE_LEB_MINIMUM]; + // Configures the target number of bytes when using `GENERATE_LEB_FIXED_SIZE` // mode. - optional int32 fixed_size = 2 [default = 5]; + int32 fixed_size = 2 [default = 5]; } +// Metadata to describe and annotate test vectors. For historical reasons, some +// of the fields here are used to control encoder behavior. message TestVectorMetadata { - optional string human_readable_description = 1; + reserved 5; + + string human_readable_description = 1; + // Prefix of the output file names. Leave empty to skip writing to output // files. - optional string file_name_prefix = 2; + string file_name_prefix = 2; // TODO(b/269708630): Rename `is_valid` to `is_valid_to_encode`. // `true` when all mixes are valid to encode. Mixes may be invalid if they // contain any mixes that use certain reserved values, or if they exercise any // features which are not supported by the encoder. - optional bool is_valid = 3; + bool is_valid = 3; + // `true` when a compliant decoder would decode at least one valid mix. Some // other mixes may be invalid or use reserved values which may be ignored. - optional bool is_valid_to_decode = 14 [default = true]; - optional string mp4_fixed_timestamp = 4; - reserved 5; + bool is_valid_to_decode = 14 [default = true]; + // Tags to identify the repository this test vector belongs to. A repository // could be a git branch or it could refer to some other way to organize a // test suite. @@ -56,23 +68,40 @@ message TestVectorMetadata { // branch of https://github.com/AOMediaCodec/libiamf repeated string test_repository_tags = 15; repeated string primary_tested_spec_sections = 6; - optional string base_test = 7; - optional int32 ms_per_fragment = 8 [default = 10000]; - optional bool override_computed_recon_gains = 9 [default = false]; + string base_test = 7; + + // TODO(b/384960137): Migrate `mp4_fixed_timestamp`, `ms_per_fragment`, + // `override_computed_recon_gains`, + // `validate_user_loudness`, + // `partition_mix_gain_parameter_blocks`, `leb_generator` + // to `EncoderControlMetadata`. + + // MP4 controls. + string mp4_fixed_timestamp = 4; + int32 ms_per_fragment = 8 [default = 10000]; + + // TODO(b/309461674): Deprecate and add a mode in `EncoderControlMetadata` to + // use the computed gains, without checking the + // user-provided gains. + // `false` to check that user-provided recon gains match the computed gains. + // `true` to override the computed recon gains with the user-provided gains. + bool override_computed_recon_gains = 9 [default = false]; // Controls whether to validate the user-provided loudness against the // computed loudness. - optional bool validate_user_loudness = 13 [default = false]; + bool validate_user_loudness = 13 [default = false]; - // An override to control the output bit-depth of the output `rendered` wav - // file. - optional uint32 output_wav_file_bit_depth_override = 12; + // Deprecated: This field should not be set and has been superseded by + // `EncoderControlMetadata.output_audio_format`. + uint32 output_wav_file_bit_depth_override = 12 [deprecated = true]; // `true` partitions the input mix gain parameter blocks to be aligned with // single frames. The `param_definition` in the descriptor OBUs must be // accurate. - optional bool partition_mix_gain_parameter_blocks = 10 [default = true]; + bool partition_mix_gain_parameter_blocks = 10 [default = true]; // Settings to configure how `Leb128`s are generated. - optional Leb128Generator leb_generator = 11; + Leb128Generator leb_generator = 11; + + // Next ID: 16 } diff --git a/tests/proto/types.proto b/tests/proto/types.proto new file mode 100644 index 00000000..3479e8c9 --- /dev/null +++ b/tests/proto/types.proto @@ -0,0 +1,27 @@ + +// Copyright (c) 2026, 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. + +edition = "2023"; + +package libiamf_proto; + +option java_outer_classname = "Types"; +option java_multiple_files = true; + +// For use when it could be convenient to represent the same logical field as +// either floating point or Q-format in different contexts. +message QFormatOrFloatingPoint { + oneof value { + float floating_point = 1; + int32 q7_dot8 = 2; + // TODO: b/391851526 - Add Q8.0 format. + } +} diff --git a/tests/proto/user_metadata.proto b/tests/proto/user_metadata.proto index 0dfa19f5..18133336 100644 --- a/tests/proto/user_metadata.proto +++ b/tests/proto/user_metadata.proto @@ -8,7 +8,7 @@ // source code in the PATENTS file, you can obtain it at // www.aomedia.org/license/patent. -syntax = "proto2"; +edition = "2023"; package libiamf_proto; @@ -16,25 +16,40 @@ import "arbitrary_obu.proto"; import "audio_element.proto"; import "audio_frame.proto"; import "codec_config.proto"; +import "encoder_control_metadata.proto"; import "ia_sequence_header.proto"; +import "metadata_obu.proto"; import "mix_presentation.proto"; import "parameter_block.proto"; import "temporal_delimiter.proto"; import "test_vector_metadata.proto"; message UserMetadata { - reserved 1; + reserved 1, 5; + + // Top-level metadata about the file. + TestVectorMetadata test_vector_metadata = 9; + + // Knobs to control the encoder behavior. + EncoderControlMetadata encoder_control_metadata = 12; + + // Descriptor OBUs. repeated IASequenceHeaderObuMetadata ia_sequence_header_metadata = 10; repeated CodecConfigObuMetadata codec_config_metadata = 2; repeated AudioElementObuMetadata audio_element_metadata = 3; repeated MixPresentationObuMetadata mix_presentation_metadata = 4; - reserved 5; + + // Temporal Unit OBUs. repeated AudioFrameObuMetadata audio_frame_metadata = 6; repeated ParameterBlockObuMetadata parameter_block_metadata = 7; - optional TemporalDelimiterObuMetadata temporal_delimiter_metadata = 8; - optional TestVectorMetadata test_vector_metadata = 9; + TemporalDelimiterObuMetadata temporal_delimiter_metadata = 8; // A list of arbitrary OBUs to insert blindly into the stream. There is no // attempt to validate or process any side effects of adding the OBUs. repeated ArbitraryObuMetadata arbitrary_obu_metadata = 11; + + // Metadata OBUs. + repeated MetadataObuMetadata metadata_obu_metadata = 13; + + // Next ID: 14 } diff --git a/tests/test_000800.iamf b/tests/test_000800.iamf new file mode 100644 index 00000000..da02c0a0 Binary files /dev/null and b/tests/test_000800.iamf differ diff --git a/tests/test_000800.textproto b/tests/test_000800.textproto new file mode 100644 index 00000000..1534aab8 --- /dev/null +++ b/tests/test_000800.textproto @@ -0,0 +1,212 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Objects and a PolarParameterDefinition" + file_name_prefix: "test_000800" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.1/rendering_config_ with param_definition_polar" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 0 + duration: 1024 + constant_subblock_duration: 1024 + } + default_azimuth: 0 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_12_0_1_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +arbitrary_obu_metadata { + # A step parameter block in front of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `STEP`. + "\x00" + # Azimuth: 0, Elevation: 0, Distance: 127. + "\x00\x00\x7f" +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the left of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 1024 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + # Azimuth: +90, Elevation: 0, Distance: 127. + "\x2d\x00\x7f" +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the rear of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 2048 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + # Azimuth: +180, Elevation: 0, Distance: 127. + "\x5a\x00\x7f" +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the right of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 3072 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + # Azimuth: -90, Elevation: 0, Distance: 127. + "\xd3\x00\x7f" +} + +# Note that remaining frames exercise "parameter block gaps". They default based +# on the parameter definition. In this case, this is to the front of the +# listener. + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000800_f.mp4 b/tests/test_000800_f.mp4 new file mode 100644 index 00000000..2aa3f1ca Binary files /dev/null and b/tests/test_000800_f.mp4 differ diff --git a/tests/test_000800_s.mp4 b/tests/test_000800_s.mp4 new file mode 100644 index 00000000..ff14b895 Binary files /dev/null and b/tests/test_000800_s.mp4 differ diff --git a/tests/test_000801.iamf b/tests/test_000801.iamf new file mode 100644 index 00000000..1fd93581 Binary files /dev/null and b/tests/test_000801.iamf differ diff --git a/tests/test_000801.textproto b/tests/test_000801.textproto new file mode 100644 index 00000000..184a8124 --- /dev/null +++ b/tests/test_000801.textproto @@ -0,0 +1,204 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Cartesian 8 Object" + file_name_prefix: "test_000801" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cartesian_8_param_definition" + ] + base_test: "test_000800" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 0 + duration: 1024 + constant_subblock_duration: 1024 + } + default_x: 0 + default_y: 127 + default_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + } + +} + +arbitrary_obu_metadata { + # A step parameter block in front of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `STEP`. + "\x00" + "\x00" # x: 0 + "\x7f" # y: 127 + "\x00" # z: 0 +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the left of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 1024 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + "\x81" # x: -127 + "\x00" # y: 0 + "\x00" # z: 0 +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the rear of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 2048 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + "\x00" # x: 0 + "\x81" # y: -127 + "\x00" # z: 0 +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the right of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 3072 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + "\x7f" # x: 127 + "\x00" # y: 0 + "\x00" # z: 0 +} + +# Note that remaining frames exercise "parameter block gaps". They default based +# on the parameter definition. In this case, this is to the front of the +# listener. + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000801_f.mp4 b/tests/test_000801_f.mp4 new file mode 100644 index 00000000..b3c3b53e Binary files /dev/null and b/tests/test_000801_f.mp4 differ diff --git a/tests/test_000801_s.mp4 b/tests/test_000801_s.mp4 new file mode 100644 index 00000000..f4b0ff69 Binary files /dev/null and b/tests/test_000801_s.mp4 differ diff --git a/tests/test_000802.iamf b/tests/test_000802.iamf new file mode 100644 index 00000000..af1e616c Binary files /dev/null and b/tests/test_000802.iamf differ diff --git a/tests/test_000802.textproto b/tests/test_000802.textproto new file mode 100644 index 00000000..2a3393ee --- /dev/null +++ b/tests/test_000802.textproto @@ -0,0 +1,215 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Cartesian 16 Object" + file_name_prefix: "test_000802" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cartesian_16_param_definition" + ] + base_test: "test_000800" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 0 + duration: 1024 + constant_subblock_duration: 1024 + } + default_x: 0 + default_y: 32767 + default_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_11_2_3_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } +} + +arbitrary_obu_metadata { + # A step parameter block in front of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `STEP`. + "\x00" + "\x00\x00" # x: 0 + "\x7f\xff" # y: 32767 + "\x00\x00" # z: 0 +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the left of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 1024 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + "\x80\x01" # x: -32767 + "\x00\x00" # y: 0 + "\x00\x00" # z: 0 +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the rear of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 2048 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + "\x00\x00" # x: 0 + "\x80\x01" # y: -32767 + "\x00\x00" # z: 0 +} + +arbitrary_obu_metadata { + # An inter-linear parameter block in to the right of the listener. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 3072 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (1)`. + "\x01" + # `animation_type` = `INTER_LINEAR`. + "\x03" + "\x7f\xff" # x: 32767 + "\x00\x00" # y: 0 + "\x00\x00" # z: 0 +} + +# Note that remaining frames exercise "parameter block gaps". They default based +# on the parameter definition. In this case, this is to the front of the +# listener. + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000802_f.mp4 b/tests/test_000802_f.mp4 new file mode 100644 index 00000000..4954caa2 Binary files /dev/null and b/tests/test_000802_f.mp4 differ diff --git a/tests/test_000802_s.mp4 b/tests/test_000802_s.mp4 new file mode 100644 index 00000000..f1cbbcd8 Binary files /dev/null and b/tests/test_000802_s.mp4 differ diff --git a/tests/test_000803.iamf b/tests/test_000803.iamf new file mode 100644 index 00000000..3d5deaf6 Binary files /dev/null and b/tests/test_000803.iamf differ diff --git a/tests/test_000803.textproto b/tests/test_000803.textproto new file mode 100644 index 00000000..a7a3b694 --- /dev/null +++ b/tests/test_000803.textproto @@ -0,0 +1,1017 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Objects and a PolarParameterDefinition" + file_name_prefix: "test_000803" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.1/rendering_config_ with param_definition_polar" + ] + base_test: "test_000800" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 309 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [9] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 310 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [10] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 311 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [11] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 312 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [12] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 313 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [13] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 314 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [14] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 315 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [15] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 316 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 317 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [17] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 9 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 110 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 309 + localized_element_annotations: ["test_sub_mix_0_audio_element_9"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 10 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 111 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 310 + localized_element_annotations: ["test_sub_mix_0_audio_element_10"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 11 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 112 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 311 + localized_element_annotations: ["test_sub_mix_0_audio_element_11"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 12 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 113 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 312 + localized_element_annotations: ["test_sub_mix_0_audio_element_12"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 13 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 114 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 313 + localized_element_annotations: ["test_sub_mix_0_audio_element_13"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 14 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 115 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 314 + localized_element_annotations: ["test_sub_mix_0_audio_element_14"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 15 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 116 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 315 + localized_element_annotations: ["test_sub_mix_0_audio_element_15"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 16 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 117 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 316 + localized_element_annotations: ["test_sub_mix_0_audio_element_16"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 17 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 118 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 317 + localized_element_annotations: ["test_sub_mix_0_audio_element_17"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 18 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 119 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 309 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 310 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 311 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 312 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 313 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 314 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 315 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 316 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 317 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000803_f.mp4 b/tests/test_000803_f.mp4 new file mode 100644 index 00000000..3f4ee109 Binary files /dev/null and b/tests/test_000803_f.mp4 differ diff --git a/tests/test_000803_s.mp4 b/tests/test_000803_s.mp4 new file mode 100644 index 00000000..80e68f0f Binary files /dev/null and b/tests/test_000803_s.mp4 differ diff --git a/tests/test_000804.iamf b/tests/test_000804.iamf new file mode 100644 index 00000000..f28f1a10 Binary files /dev/null and b/tests/test_000804.iamf differ diff --git a/tests/test_000804.textproto b/tests/test_000804.textproto new file mode 100644 index 00000000..ac022cd2 --- /dev/null +++ b/tests/test_000804.textproto @@ -0,0 +1,1017 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Cartesian 8 Object" + file_name_prefix: "test_000804" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cartesian_8_param_definition" + ] + base_test: "test_000801" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 309 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [9] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 310 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [10] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 311 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [11] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 312 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [12] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 313 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [13] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 314 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [14] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 315 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [15] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 316 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 317 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [17] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 9 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 110 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 309 + localized_element_annotations: ["test_sub_mix_0_audio_element_9"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 10 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 111 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 310 + localized_element_annotations: ["test_sub_mix_0_audio_element_10"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 11 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 112 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 311 + localized_element_annotations: ["test_sub_mix_0_audio_element_11"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 12 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 113 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 312 + localized_element_annotations: ["test_sub_mix_0_audio_element_12"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 13 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 114 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 313 + localized_element_annotations: ["test_sub_mix_0_audio_element_13"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 14 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 115 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 314 + localized_element_annotations: ["test_sub_mix_0_audio_element_14"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 15 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 116 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 315 + localized_element_annotations: ["test_sub_mix_0_audio_element_15"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 16 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 117 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 316 + localized_element_annotations: ["test_sub_mix_0_audio_element_16"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 17 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 118 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 317 + localized_element_annotations: ["test_sub_mix_0_audio_element_17"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 18 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 119 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_C_2_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 309 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 310 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 311 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 312 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 313 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 314 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 315 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 316 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 317 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000804_f.mp4 b/tests/test_000804_f.mp4 new file mode 100644 index 00000000..54adde50 Binary files /dev/null and b/tests/test_000804_f.mp4 differ diff --git a/tests/test_000804_s.mp4 b/tests/test_000804_s.mp4 new file mode 100644 index 00000000..30c726a7 Binary files /dev/null and b/tests/test_000804_s.mp4 differ diff --git a/tests/test_000805.iamf b/tests/test_000805.iamf new file mode 100644 index 00000000..5eb07ba6 Binary files /dev/null and b/tests/test_000805.iamf differ diff --git a/tests/test_000805.textproto b/tests/test_000805.textproto new file mode 100644 index 00000000..6459fb3d --- /dev/null +++ b/tests/test_000805.textproto @@ -0,0 +1,1017 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Cartesian 16 Object" + file_name_prefix: "test_000805" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cartesian_16_param_definition" + ] + base_test: "test_000802" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 309 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [9] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 310 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [10] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 311 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [11] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 312 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [12] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 313 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [13] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 314 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [14] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 315 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [15] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 316 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 317 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [17] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 9 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 110 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 309 + localized_element_annotations: ["test_sub_mix_0_audio_element_9"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 10 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 111 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 310 + localized_element_annotations: ["test_sub_mix_0_audio_element_10"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 11 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 112 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 311 + localized_element_annotations: ["test_sub_mix_0_audio_element_11"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 12 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 113 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 312 + localized_element_annotations: ["test_sub_mix_0_audio_element_12"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 13 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 114 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 313 + localized_element_annotations: ["test_sub_mix_0_audio_element_13"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 14 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 115 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 314 + localized_element_annotations: ["test_sub_mix_0_audio_element_14"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 15 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 116 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 315 + localized_element_annotations: ["test_sub_mix_0_audio_element_15"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 16 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 117 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 316 + localized_element_annotations: ["test_sub_mix_0_audio_element_16"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 17 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 118 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 317 + localized_element_annotations: ["test_sub_mix_0_audio_element_17"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 18 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 119 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 309 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 310 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 311 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 312 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 313 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 314 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 315 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 316 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 317 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000805_f.mp4 b/tests/test_000805_f.mp4 new file mode 100644 index 00000000..0caf3bde Binary files /dev/null and b/tests/test_000805_f.mp4 differ diff --git a/tests/test_000805_s.mp4 b/tests/test_000805_s.mp4 new file mode 100644 index 00000000..3ef3fdec Binary files /dev/null and b/tests/test_000805_s.mp4 differ diff --git a/tests/test_000806.iamf b/tests/test_000806.iamf new file mode 100644 index 00000000..b989ac10 Binary files /dev/null and b/tests/test_000806.iamf differ diff --git a/tests/test_000806.textproto b/tests/test_000806.textproto new file mode 100644 index 00000000..2c16a6da --- /dev/null +++ b/tests/test_000806.textproto @@ -0,0 +1,154 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Dual Polar Object" + file_name_prefix: "test_000806" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config with two objects", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_I_0_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000806_f.mp4 b/tests/test_000806_f.mp4 new file mode 100644 index 00000000..22bb9fd4 Binary files /dev/null and b/tests/test_000806_f.mp4 differ diff --git a/tests/test_000806_s.mp4 b/tests/test_000806_s.mp4 new file mode 100644 index 00000000..82cac8ad Binary files /dev/null and b/tests/test_000806_s.mp4 differ diff --git a/tests/test_000807.iamf b/tests/test_000807.iamf new file mode 100644 index 00000000..c226ec7f Binary files /dev/null and b/tests/test_000807.iamf differ diff --git a/tests/test_000807.textproto b/tests/test_000807.textproto new file mode 100644 index 00000000..5964e6ca --- /dev/null +++ b/tests/test_000807.textproto @@ -0,0 +1,154 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Dual Cartesian 8 Object" + file_name_prefix: "test_000807" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config with two objects", + "3.7.3.3/rendering_config with dual_caretsian_8_param_definition" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000807_f.mp4 b/tests/test_000807_f.mp4 new file mode 100644 index 00000000..4f6fc449 Binary files /dev/null and b/tests/test_000807_f.mp4 differ diff --git a/tests/test_000807_s.mp4 b/tests/test_000807_s.mp4 new file mode 100644 index 00000000..945abe1e Binary files /dev/null and b/tests/test_000807_s.mp4 differ diff --git a/tests/test_000808.iamf b/tests/test_000808.iamf new file mode 100644 index 00000000..90c529f2 Binary files /dev/null and b/tests/test_000808.iamf differ diff --git a/tests/test_000808.textproto b/tests/test_000808.textproto new file mode 100644 index 00000000..d6a04c39 --- /dev/null +++ b/tests/test_000808.textproto @@ -0,0 +1,154 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Dual Cartesian 16 Object" + file_name_prefix: "test_000808" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config with two objects", + "3.7.3.4/rendering_config with dual_cartesian_16_param_definition" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000808_f.mp4 b/tests/test_000808_f.mp4 new file mode 100644 index 00000000..8b9a7c2c Binary files /dev/null and b/tests/test_000808_f.mp4 differ diff --git a/tests/test_000808_s.mp4 b/tests/test_000808_s.mp4 new file mode 100644 index 00000000..9efd2782 Binary files /dev/null and b/tests/test_000808_s.mp4 differ diff --git a/tests/test_000809.iamf b/tests/test_000809.iamf new file mode 100644 index 00000000..90fb6fb2 Binary files /dev/null and b/tests/test_000809.iamf differ diff --git a/tests/test_000809.textproto b/tests/test_000809.textproto new file mode 100644 index 00000000..56e4ae38 --- /dev/null +++ b/tests/test_000809.textproto @@ -0,0 +1,594 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Many Dual Polar Objects" + file_name_prefix: "test_000809" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual param_definition_polar" + ] + base_test: "test_000803" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 2 + } +} + + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 9 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 110 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000809_f.mp4 b/tests/test_000809_f.mp4 new file mode 100644 index 00000000..488d7940 Binary files /dev/null and b/tests/test_000809_f.mp4 differ diff --git a/tests/test_000809_s.mp4 b/tests/test_000809_s.mp4 new file mode 100644 index 00000000..c6459125 Binary files /dev/null and b/tests/test_000809_s.mp4 differ diff --git a/tests/test_000810.iamf b/tests/test_000810.iamf new file mode 100644 index 00000000..404ca8e2 Binary files /dev/null and b/tests/test_000810.iamf differ diff --git a/tests/test_000810.textproto b/tests/test_000810.textproto new file mode 100644 index 00000000..00271708 --- /dev/null +++ b/tests/test_000810.textproto @@ -0,0 +1,594 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Many Dual Cart8 Objects" + file_name_prefix: "test_000810" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.3/rendering_config_ with dual param_definition_polar" + ] + base_test: "test_000803" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000810_f.mp4 b/tests/test_000810_f.mp4 new file mode 100644 index 00000000..34a7e753 Binary files /dev/null and b/tests/test_000810_f.mp4 differ diff --git a/tests/test_000810_s.mp4 b/tests/test_000810_s.mp4 new file mode 100644 index 00000000..856492c0 Binary files /dev/null and b/tests/test_000810_s.mp4 differ diff --git a/tests/test_000811.iamf b/tests/test_000811.iamf new file mode 100644 index 00000000..9dcc3355 Binary files /dev/null and b/tests/test_000811.iamf differ diff --git a/tests/test_000811.textproto b/tests/test_000811.textproto new file mode 100644 index 00000000..d42294b9 --- /dev/null +++ b/tests/test_000811.textproto @@ -0,0 +1,594 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Many Dual Cart16 Objects" + file_name_prefix: "test_000811" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.3/rendering_config_ with dual param_definition_polar" + ] + base_test: "test_000810" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 9 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 110 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000811_f.mp4 b/tests/test_000811_f.mp4 new file mode 100644 index 00000000..b7587dad Binary files /dev/null and b/tests/test_000811_f.mp4 differ diff --git a/tests/test_000811_s.mp4 b/tests/test_000811_s.mp4 new file mode 100644 index 00000000..05a7572b Binary files /dev/null and b/tests/test_000811_s.mp4 differ diff --git a/tests/test_000812.iamf b/tests/test_000812.iamf new file mode 100644 index 00000000..ca54fcb7 Binary files /dev/null and b/tests/test_000812.iamf differ diff --git a/tests/test_000812.textproto b/tests/test_000812.textproto new file mode 100644 index 00000000..d55d4538 --- /dev/null +++ b/tests/test_000812.textproto @@ -0,0 +1,200 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Mono Polar and Mono Cartesian 8 Object" + file_name_prefix: "test_000812" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition", + "3.7.3.1/rendering_config with cartesian_8_param_definition" + ] + base_test: "test_000802" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 30 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 127 + default_y: 0 + default_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000812_f.mp4 b/tests/test_000812_f.mp4 new file mode 100644 index 00000000..c246e7e3 Binary files /dev/null and b/tests/test_000812_f.mp4 differ diff --git a/tests/test_000812_rendered_binaural.wav b/tests/test_000812_rendered_binaural.wav new file mode 100644 index 00000000..9fa81ae4 Binary files /dev/null and b/tests/test_000812_rendered_binaural.wav differ diff --git a/tests/test_000812_s.mp4 b/tests/test_000812_s.mp4 new file mode 100644 index 00000000..fdcd25bc Binary files /dev/null and b/tests/test_000812_s.mp4 differ diff --git a/tests/test_000813.iamf b/tests/test_000813.iamf new file mode 100644 index 00000000..9ba90d0f Binary files /dev/null and b/tests/test_000813.iamf differ diff --git a/tests/test_000813.textproto b/tests/test_000813.textproto new file mode 100644 index 00000000..c77e04e9 --- /dev/null +++ b/tests/test_000813.textproto @@ -0,0 +1,201 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Mono Polar and Mono Cartesian 16 Object" + file_name_prefix: "test_000813" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.3.1/rendering_config_ with cartesian_16_param_definition" + ] + base_test: "test_000802" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_12_0_1_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000813_f.mp4 b/tests/test_000813_f.mp4 new file mode 100644 index 00000000..9055876d Binary files /dev/null and b/tests/test_000813_f.mp4 differ diff --git a/tests/test_000813_s.mp4 b/tests/test_000813_s.mp4 new file mode 100644 index 00000000..0eae6806 Binary files /dev/null and b/tests/test_000813_s.mp4 differ diff --git a/tests/test_000814.iamf b/tests/test_000814.iamf new file mode 100644 index 00000000..310f63db Binary files /dev/null and b/tests/test_000814.iamf differ diff --git a/tests/test_000814.textproto b/tests/test_000814.textproto new file mode 100644 index 00000000..39f0d68d --- /dev/null +++ b/tests/test_000814.textproto @@ -0,0 +1,188 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with a Mono Cartesian 8 and Mono Cartesian 16 Object" + file_name_prefix: "test_000814" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cartesian_8_param_definition", + "3.7.3.2/rendering_config_ with cartesian_16_param_definition" + ] + base_test: "test_000813" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000814_f.mp4 b/tests/test_000814_f.mp4 new file mode 100644 index 00000000..629647bd Binary files /dev/null and b/tests/test_000814_f.mp4 differ diff --git a/tests/test_000814_s.mp4 b/tests/test_000814_s.mp4 new file mode 100644 index 00000000..81a52c83 Binary files /dev/null and b/tests/test_000814_s.mp4 differ diff --git a/tests/test_000815.iamf b/tests/test_000815.iamf new file mode 100644 index 00000000..c9978a41 Binary files /dev/null and b/tests/test_000815.iamf differ diff --git a/tests/test_000815.textproto b/tests/test_000815.textproto new file mode 100644 index 00000000..8494f6e9 --- /dev/null +++ b/tests/test_000815.textproto @@ -0,0 +1,209 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Dual Polar and Dual Cartesian 8 Objects" + file_name_prefix: "test_000815" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.3.1/rendering_config_ with cartesian_8_param_definition" + ] + base_test: "test_000802" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_11_2_3_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000815_f.mp4 b/tests/test_000815_f.mp4 new file mode 100644 index 00000000..e628af2e Binary files /dev/null and b/tests/test_000815_f.mp4 differ diff --git a/tests/test_000815_s.mp4 b/tests/test_000815_s.mp4 new file mode 100644 index 00000000..d35b1bb4 Binary files /dev/null and b/tests/test_000815_s.mp4 differ diff --git a/tests/test_000816.iamf b/tests/test_000816.iamf new file mode 100644 index 00000000..fd38a7f7 Binary files /dev/null and b/tests/test_000816.iamf differ diff --git a/tests/test_000816.textproto b/tests/test_000816.textproto new file mode 100644 index 00000000..0eac5887 --- /dev/null +++ b/tests/test_000816.textproto @@ -0,0 +1,209 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Dual Polar and Dual Cartesian 16 Objects" + file_name_prefix: "test_000816" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.3.2/rendering_config_ with cartesian_16_param_definition" + ] + base_test: "test_000815" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000816_f.mp4 b/tests/test_000816_f.mp4 new file mode 100644 index 00000000..938d75a4 Binary files /dev/null and b/tests/test_000816_f.mp4 differ diff --git a/tests/test_000816_s.mp4 b/tests/test_000816_s.mp4 new file mode 100644 index 00000000..bc8692ca Binary files /dev/null and b/tests/test_000816_s.mp4 differ diff --git a/tests/test_000817.iamf b/tests/test_000817.iamf new file mode 100644 index 00000000..1dbfd7b0 Binary files /dev/null and b/tests/test_000817.iamf differ diff --git a/tests/test_000817.textproto b/tests/test_000817.textproto new file mode 100644 index 00000000..4c16c19d --- /dev/null +++ b/tests/test_000817.textproto @@ -0,0 +1,209 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Dual Cartesian 8 and Dual Cartesian 16 Objects" + file_name_prefix: "test_000817" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with dual_cart8_param_definition", + "3.7.3.2/rendering_config_ with dual_cart16_param_definition" + ] + base_test: "test_000815" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_C_2_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000817_f.mp4 b/tests/test_000817_f.mp4 new file mode 100644 index 00000000..2993446f Binary files /dev/null and b/tests/test_000817_f.mp4 differ diff --git a/tests/test_000817_s.mp4 b/tests/test_000817_s.mp4 new file mode 100644 index 00000000..0e47ba03 Binary files /dev/null and b/tests/test_000817_s.mp4 differ diff --git a/tests/test_000818.iamf b/tests/test_000818.iamf new file mode 100644 index 00000000..4ae90246 Binary files /dev/null and b/tests/test_000818.iamf differ diff --git a/tests/test_000818.textproto b/tests/test_000818.textproto new file mode 100644 index 00000000..207c1de5 --- /dev/null +++ b/tests/test_000818.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Polar and Dual Polar Objects" + file_name_prefix: "test_000818" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000815" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000818_f.mp4 b/tests/test_000818_f.mp4 new file mode 100644 index 00000000..e3250e45 Binary files /dev/null and b/tests/test_000818_f.mp4 differ diff --git a/tests/test_000818_s.mp4 b/tests/test_000818_s.mp4 new file mode 100644 index 00000000..36c80268 Binary files /dev/null and b/tests/test_000818_s.mp4 differ diff --git a/tests/test_000819.iamf b/tests/test_000819.iamf new file mode 100644 index 00000000..622a06d1 Binary files /dev/null and b/tests/test_000819.iamf differ diff --git a/tests/test_000819.textproto b/tests/test_000819.textproto new file mode 100644 index 00000000..c6e136ae --- /dev/null +++ b/tests/test_000819.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Polar and Dual Cart8 Objects" + file_name_prefix: "test_000819" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.3.2/rendering_config_ with dual_cart8_param_definition" + ] + base_test: "test_000818" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_I_0_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000819_f.mp4 b/tests/test_000819_f.mp4 new file mode 100644 index 00000000..ca86cbf7 Binary files /dev/null and b/tests/test_000819_f.mp4 differ diff --git a/tests/test_000819_s.mp4 b/tests/test_000819_s.mp4 new file mode 100644 index 00000000..6d976e79 Binary files /dev/null and b/tests/test_000819_s.mp4 differ diff --git a/tests/test_000820.iamf b/tests/test_000820.iamf new file mode 100644 index 00000000..c9872791 Binary files /dev/null and b/tests/test_000820.iamf differ diff --git a/tests/test_000820.textproto b/tests/test_000820.textproto new file mode 100644 index 00000000..afe98237 --- /dev/null +++ b/tests/test_000820.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Polar and Dual Cart16 Objects" + file_name_prefix: "test_000820" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.3.4/rendering_config_ with dual_cart16_param_definition" + ] + base_test: "test_000819" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000820_f.mp4 b/tests/test_000820_f.mp4 new file mode 100644 index 00000000..1e65cc62 Binary files /dev/null and b/tests/test_000820_f.mp4 differ diff --git a/tests/test_000820_s.mp4 b/tests/test_000820_s.mp4 new file mode 100644 index 00000000..9654b4a0 Binary files /dev/null and b/tests/test_000820_s.mp4 differ diff --git a/tests/test_000821.iamf b/tests/test_000821.iamf new file mode 100644 index 00000000..1777d53b Binary files /dev/null and b/tests/test_000821.iamf differ diff --git a/tests/test_000821.textproto b/tests/test_000821.textproto new file mode 100644 index 00000000..093dfede --- /dev/null +++ b/tests/test_000821.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Cart8 and Dual Polar Objects" + file_name_prefix: "test_000821" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cart8_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000815" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000821_f.mp4 b/tests/test_000821_f.mp4 new file mode 100644 index 00000000..7acc3dc5 Binary files /dev/null and b/tests/test_000821_f.mp4 differ diff --git a/tests/test_000821_s.mp4 b/tests/test_000821_s.mp4 new file mode 100644 index 00000000..88b6db1d Binary files /dev/null and b/tests/test_000821_s.mp4 differ diff --git a/tests/test_000822.iamf b/tests/test_000822.iamf new file mode 100644 index 00000000..4bb9befa Binary files /dev/null and b/tests/test_000822.iamf differ diff --git a/tests/test_000822.textproto b/tests/test_000822.textproto new file mode 100644 index 00000000..ed198ba2 --- /dev/null +++ b/tests/test_000822.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Cart8 and Dual Cart8 Objects" + file_name_prefix: "test_000822" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cart8_param_definition", + "3.7.3.2/rendering_config_ with dual_cart8_param_definition" + ] + base_test: "test_000821" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000822_f.mp4 b/tests/test_000822_f.mp4 new file mode 100644 index 00000000..ee5185f5 Binary files /dev/null and b/tests/test_000822_f.mp4 differ diff --git a/tests/test_000822_s.mp4 b/tests/test_000822_s.mp4 new file mode 100644 index 00000000..80b9c035 Binary files /dev/null and b/tests/test_000822_s.mp4 differ diff --git a/tests/test_000823.iamf b/tests/test_000823.iamf new file mode 100644 index 00000000..cfe59bdd Binary files /dev/null and b/tests/test_000823.iamf differ diff --git a/tests/test_000823.textproto b/tests/test_000823.textproto new file mode 100644 index 00000000..40fa0047 --- /dev/null +++ b/tests/test_000823.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Cart8 and Dual Cart16 Objects" + file_name_prefix: "test_000823" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.1/rendering_config_ with cart8_param_definition", + "3.7.3.4/rendering_config_ with dual_cart16_param_definition" + ] + base_test: "test_000822" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_8 + cart8_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: 1 + default_first_y: 2 + default_first_z: 3 + default_second_x: 4 + default_second_y: 5 + default_second_z: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000823_f.mp4 b/tests/test_000823_f.mp4 new file mode 100644 index 00000000..562326c3 Binary files /dev/null and b/tests/test_000823_f.mp4 differ diff --git a/tests/test_000823_s.mp4 b/tests/test_000823_s.mp4 new file mode 100644 index 00000000..f43a794d Binary files /dev/null and b/tests/test_000823_s.mp4 differ diff --git a/tests/test_000824.iamf b/tests/test_000824.iamf new file mode 100644 index 00000000..2fa226ac Binary files /dev/null and b/tests/test_000824.iamf differ diff --git a/tests/test_000824.textproto b/tests/test_000824.textproto new file mode 100644 index 00000000..d5264f40 --- /dev/null +++ b/tests/test_000824.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Cart16 and Dual Polar Objects" + file_name_prefix: "test_000824" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.2/rendering_config_ with cart16_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000821" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 1 + default_y: 2 + default_z: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000824_f.mp4 b/tests/test_000824_f.mp4 new file mode 100644 index 00000000..678bea0a Binary files /dev/null and b/tests/test_000824_f.mp4 differ diff --git a/tests/test_000824_s.mp4 b/tests/test_000824_s.mp4 new file mode 100644 index 00000000..16dd23bb Binary files /dev/null and b/tests/test_000824_s.mp4 differ diff --git a/tests/test_000825.iamf b/tests/test_000825.iamf new file mode 100644 index 00000000..c2cd4deb Binary files /dev/null and b/tests/test_000825.iamf differ diff --git a/tests/test_000825.textproto b/tests/test_000825.textproto new file mode 100644 index 00000000..122be028 --- /dev/null +++ b/tests/test_000825.textproto @@ -0,0 +1,204 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Cart16 and Dual Cart8 Objects" + file_name_prefix: "test_000825" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.2/rendering_config with cart16_param_definition", + "3.7.3.3/rendering_config with dual_cart8_param_definition" + ] + base_test: "test_000824" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 32767 + default_y: 0 + default_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_8 + dual_cart8_param_definition: { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: -127 + default_first_y: 0 + default_first_z: 0 + default_second_x: 0 + default_second_y: 127 + default_second_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000825_f.mp4 b/tests/test_000825_f.mp4 new file mode 100644 index 00000000..c4cdf04c Binary files /dev/null and b/tests/test_000825_f.mp4 differ diff --git a/tests/test_000825_rendered_binaural.wav b/tests/test_000825_rendered_binaural.wav new file mode 100644 index 00000000..516d9be6 Binary files /dev/null and b/tests/test_000825_rendered_binaural.wav differ diff --git a/tests/test_000825_s.mp4 b/tests/test_000825_s.mp4 new file mode 100644 index 00000000..f25e2a01 Binary files /dev/null and b/tests/test_000825_s.mp4 differ diff --git a/tests/test_000826.iamf b/tests/test_000826.iamf new file mode 100644 index 00000000..2de03bc9 Binary files /dev/null and b/tests/test_000826.iamf differ diff --git a/tests/test_000826.textproto b/tests/test_000826.textproto new file mode 100644 index 00000000..c49e2181 --- /dev/null +++ b/tests/test_000826.textproto @@ -0,0 +1,204 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream with Mono Cart16 and Dual Cart16 Objects" + file_name_prefix: "test_000826" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.3.2/rendering_config with cart16_param_definition", + "3.7.3.4/rendering_config with dual_cart16_param_definition" + ] + base_test: "test_000824" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_CART_16 + cart16_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_x: 32767 + default_y: 0 + default_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_CART_16 + dual_cart16_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_x: -32767 + default_first_y: 0 + default_first_z: 0 + default_second_x: 0 + default_second_y: -32767 + default_second_z: 0 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000826_f.mp4 b/tests/test_000826_f.mp4 new file mode 100644 index 00000000..3a0172e7 Binary files /dev/null and b/tests/test_000826_f.mp4 differ diff --git a/tests/test_000826_rendered_binaural.wav b/tests/test_000826_rendered_binaural.wav new file mode 100644 index 00000000..b56c1be4 Binary files /dev/null and b/tests/test_000826_rendered_binaural.wav differ diff --git a/tests/test_000826_s.mp4 b/tests/test_000826_s.mp4 new file mode 100644 index 00000000..2e01518e Binary files /dev/null and b/tests/test_000826_s.mp4 differ diff --git a/tests/test_000827.iamf b/tests/test_000827.iamf new file mode 100644 index 00000000..efc229bc Binary files /dev/null and b/tests/test_000827.iamf differ diff --git a/tests/test_000827.textproto b/tests/test_000827.textproto new file mode 100644 index 00000000..1c731411 --- /dev/null +++ b/tests/test_000827.textproto @@ -0,0 +1,170 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a 7.1.5.4ch Expanded " + "Layout." + file_name_prefix: "test_000827" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 7.1.5.4ch" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 10 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -79 + digital_peak: -80 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -3023 + digital_peak: -5392 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 13 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 14 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 15 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 16 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000827_f.mp4 b/tests/test_000827_f.mp4 new file mode 100644 index 00000000..2eafcb0c Binary files /dev/null and b/tests/test_000827_f.mp4 differ diff --git a/tests/test_000827_s.mp4 b/tests/test_000827_s.mp4 new file mode 100644 index 00000000..2a0bd6fe Binary files /dev/null and b/tests/test_000827_s.mp4 differ diff --git a/tests/test_000828.iamf b/tests/test_000828.iamf new file mode 100644 index 00000000..269115e5 Binary files /dev/null and b/tests/test_000828.iamf differ diff --git a/tests/test_000828.textproto b/tests/test_000828.textproto new file mode 100644 index 00000000..a1388a8a --- /dev/null +++ b/tests/test_000828.textproto @@ -0,0 +1,153 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using an LFE-Pair Expanded Layout." + file_name_prefix: "test_000828" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == LFE-Pair" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_LFE_PAIR + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -32768 + digital_peak: -32768 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -32768 + digital_peak: -5392 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 1 channel_label: CHANNEL_LABEL_LFE2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000828_f.mp4 b/tests/test_000828_f.mp4 new file mode 100644 index 00000000..b930032f Binary files /dev/null and b/tests/test_000828_f.mp4 differ diff --git a/tests/test_000828_s.mp4 b/tests/test_000828_s.mp4 new file mode 100644 index 00000000..ee2fe54a Binary files /dev/null and b/tests/test_000828_s.mp4 differ diff --git a/tests/test_000829.iamf b/tests/test_000829.iamf new file mode 100644 index 00000000..a73a24a4 Binary files /dev/null and b/tests/test_000829.iamf differ diff --git a/tests/test_000829.textproto b/tests/test_000829.textproto new file mode 100644 index 00000000..10b2f857 --- /dev/null +++ b/tests/test_000829.textproto @@ -0,0 +1,156 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Bottom-3ch Expanded " + "Layout." + file_name_prefix: "test_000829" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Bottom-3ch" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_3_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -4201 + digital_peak: -4203 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -4939 + digital_peak: -5392 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000829_f.mp4 b/tests/test_000829_f.mp4 new file mode 100644 index 00000000..75c81745 Binary files /dev/null and b/tests/test_000829_f.mp4 differ diff --git a/tests/test_000829_s.mp4 b/tests/test_000829_s.mp4 new file mode 100644 index 00000000..a50ac8de Binary files /dev/null and b/tests/test_000829_s.mp4 differ diff --git a/tests/test_000830.iamf b/tests/test_000830.iamf new file mode 100644 index 00000000..8bbd4acc Binary files /dev/null and b/tests/test_000830.iamf differ diff --git a/tests/test_000830.textproto b/tests/test_000830.textproto new file mode 100644 index 00000000..44f101c8 --- /dev/null +++ b/tests/test_000830.textproto @@ -0,0 +1,157 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Bottom-4ch Expanded " + "Layout." + file_name_prefix: "test_000830" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Bottom-4ch" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_4_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -3078 + digital_peak: -3080 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -4619 + digital_peak: -5392 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 3 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000830_f.mp4 b/tests/test_000830_f.mp4 new file mode 100644 index 00000000..fe9e8a3e Binary files /dev/null and b/tests/test_000830_f.mp4 differ diff --git a/tests/test_000830_s.mp4 b/tests/test_000830_s.mp4 new file mode 100644 index 00000000..9a495734 Binary files /dev/null and b/tests/test_000830_s.mp4 differ diff --git a/tests/test_000831.iamf b/tests/test_000831.iamf new file mode 100644 index 00000000..00f4f265 Binary files /dev/null and b/tests/test_000831.iamf differ diff --git a/tests/test_000831.textproto b/tests/test_000831.textproto new file mode 100644 index 00000000..d84e1c03 --- /dev/null +++ b/tests/test_000831.textproto @@ -0,0 +1,152 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a Top-1ch Expanded Layout." + file_name_prefix: "test_000831" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Top-1ch" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_1_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -6161 + digital_peak: -6163 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -6161 + digital_peak: -5392 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_TP_C } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000831_f.mp4 b/tests/test_000831_f.mp4 new file mode 100644 index 00000000..1bda633d Binary files /dev/null and b/tests/test_000831_f.mp4 differ diff --git a/tests/test_000831_s.mp4 b/tests/test_000831_s.mp4 new file mode 100644 index 00000000..8c532d1e Binary files /dev/null and b/tests/test_000831_s.mp4 differ diff --git a/tests/test_000832.iamf b/tests/test_000832.iamf new file mode 100644 index 00000000..d8377e8d Binary files /dev/null and b/tests/test_000832.iamf differ diff --git a/tests/test_000832.textproto b/tests/test_000832.textproto new file mode 100644 index 00000000..589d1859 --- /dev/null +++ b/tests/test_000832.textproto @@ -0,0 +1,158 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Top-5ch Expanded " + "Layout." + file_name_prefix: "test_000832" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Top-5ch" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1, 2] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_5_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -2582 + digital_peak: -2584 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -4371 + digital_peak: -5392 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000832_f.mp4 b/tests/test_000832_f.mp4 new file mode 100644 index 00000000..d84a6ef1 Binary files /dev/null and b/tests/test_000832_f.mp4 differ diff --git a/tests/test_000832_s.mp4 b/tests/test_000832_s.mp4 new file mode 100644 index 00000000..4257a7da Binary files /dev/null and b/tests/test_000832_s.mp4 differ diff --git a/tests/test_000833.iamf b/tests/test_000833.iamf new file mode 100644 index 00000000..819d01cc Binary files /dev/null and b/tests/test_000833.iamf differ diff --git a/tests/test_000833.textproto b/tests/test_000833.textproto new file mode 100644 index 00000000..13f5b175 --- /dev/null +++ b/tests/test_000833.textproto @@ -0,0 +1,218 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a 7.1.5.4ch Expanded " + "Layout." + file_name_prefix: "test_000833" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 7.1.5.4ch" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 10 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [10] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: 116 + digital_peak: 114 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -1750 + digital_peak: -1408 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 13 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 14 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 15 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 16 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000833_f.mp4 b/tests/test_000833_f.mp4 new file mode 100644 index 00000000..5e558157 Binary files /dev/null and b/tests/test_000833_f.mp4 differ diff --git a/tests/test_000833_s.mp4 b/tests/test_000833_s.mp4 new file mode 100644 index 00000000..6e570209 Binary files /dev/null and b/tests/test_000833_s.mp4 differ diff --git a/tests/test_000834.iamf b/tests/test_000834.iamf new file mode 100644 index 00000000..33505509 Binary files /dev/null and b/tests/test_000834.iamf differ diff --git a/tests/test_000834.textproto b/tests/test_000834.textproto new file mode 100644 index 00000000..fc895032 --- /dev/null +++ b/tests/test_000834.textproto @@ -0,0 +1,205 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using an LFE-Pair Expanded Layout." + file_name_prefix: "test_000834" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == LFE-Pair" + ] + base_test: "test_000833" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_LFE_PAIR + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2, 3, 4, 5] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_3_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 4 + coupled_substream_count: 2 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -3176 + digital_peak: -3177 + } + } + 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: -4371 + digital_peak: -3177 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 1 channel_label: CHANNEL_LABEL_LFE2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_3 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_3 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LTF_3 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RTF_3 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000834_f.mp4 b/tests/test_000834_f.mp4 new file mode 100644 index 00000000..4ec0142b Binary files /dev/null and b/tests/test_000834_f.mp4 differ diff --git a/tests/test_000834_s.mp4 b/tests/test_000834_s.mp4 new file mode 100644 index 00000000..a2e673bc Binary files /dev/null and b/tests/test_000834_s.mp4 differ diff --git a/tests/test_000835.iamf b/tests/test_000835.iamf new file mode 100644 index 00000000..23bd38ca Binary files /dev/null and b/tests/test_000835.iamf differ diff --git a/tests/test_000835.textproto b/tests/test_000835.textproto new file mode 100644 index 00000000..ec5b0660 --- /dev/null +++ b/tests/test_000835.textproto @@ -0,0 +1,208 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Bottom-3ch Expanded " + "Layout." + file_name_prefix: "test_000835" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Bottom-3ch" + ] + base_test: "test_000833" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2, 3, 4, 5] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 4 + coupled_substream_count: 2 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -2241 + digital_peak: -2243 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -3163 + digital_peak: -3851 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000835_f.mp4 b/tests/test_000835_f.mp4 new file mode 100644 index 00000000..6bb95ef8 Binary files /dev/null and b/tests/test_000835_f.mp4 differ diff --git a/tests/test_000835_s.mp4 b/tests/test_000835_s.mp4 new file mode 100644 index 00000000..0fedcbb4 Binary files /dev/null and b/tests/test_000835_s.mp4 differ diff --git a/tests/test_000836.iamf b/tests/test_000836.iamf new file mode 100644 index 00000000..5355a3e2 Binary files /dev/null and b/tests/test_000836.iamf differ diff --git a/tests/test_000836.textproto b/tests/test_000836.textproto new file mode 100644 index 00000000..86a508ce --- /dev/null +++ b/tests/test_000836.textproto @@ -0,0 +1,211 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Bottom-4ch Expanded " + "Layout." + file_name_prefix: "test_000836" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Bottom-4ch" + ] + base_test: "test_000833" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2, 3, 4, 5, 6] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 5 + coupled_substream_count: 3 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -1318 + digital_peak: -1320 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -2343 + digital_peak: -1813 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 3 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LTF_2 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RTF_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000836_f.mp4 b/tests/test_000836_f.mp4 new file mode 100644 index 00000000..1d8f7183 Binary files /dev/null and b/tests/test_000836_f.mp4 differ diff --git a/tests/test_000836_s.mp4 b/tests/test_000836_s.mp4 new file mode 100644 index 00000000..8309bdc1 Binary files /dev/null and b/tests/test_000836_s.mp4 differ diff --git a/tests/test_000837.iamf b/tests/test_000837.iamf new file mode 100644 index 00000000..2ee206ee Binary files /dev/null and b/tests/test_000837.iamf differ diff --git a/tests/test_000837.textproto b/tests/test_000837.textproto new file mode 100644 index 00000000..6ca1d313 --- /dev/null +++ b/tests/test_000837.textproto @@ -0,0 +1,215 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a Top-1ch Expanded Layout." + file_name_prefix: "test_000837" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Top-1ch" + ] + base_test: "test_000833" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_1_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2, 3, 4, 5, 6, 7, 8, 9, 10] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 9 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_9_1_6_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -987 + digital_peak: -989 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -2318 + digital_peak: -3851 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_TP_C } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 7 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 8 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 10 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 11 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_SI_R } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000837_f.mp4 b/tests/test_000837_f.mp4 new file mode 100644 index 00000000..0264ec21 Binary files /dev/null and b/tests/test_000837_f.mp4 differ diff --git a/tests/test_000837_s.mp4 b/tests/test_000837_s.mp4 new file mode 100644 index 00000000..9a9c4179 Binary files /dev/null and b/tests/test_000837_s.mp4 differ diff --git a/tests/test_000838.iamf b/tests/test_000838.iamf new file mode 100644 index 00000000..81ce5c88 Binary files /dev/null and b/tests/test_000838.iamf differ diff --git a/tests/test_000838.textproto b/tests/test_000838.textproto new file mode 100644 index 00000000..ea983625 --- /dev/null +++ b/tests/test_000838.textproto @@ -0,0 +1,216 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Top-5ch Expanded " + "Layout." + file_name_prefix: "test_000838" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Top-5ch" + ] + base_test: "test_000833" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1, 2] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_5_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3, 4, 5, 6, 7, 8, 9] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_7_1_4_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 7 + coupled_substream_count: 5 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -667 + digital_peak: -669 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -2504 + digital_peak: -3851 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000838_f.mp4 b/tests/test_000838_f.mp4 new file mode 100644 index 00000000..ab83f19d Binary files /dev/null and b/tests/test_000838_f.mp4 differ diff --git a/tests/test_000838_s.mp4 b/tests/test_000838_s.mp4 new file mode 100644 index 00000000..0d6daa1f Binary files /dev/null and b/tests/test_000838_s.mp4 differ diff --git a/tests/test_000839.iamf b/tests/test_000839.iamf new file mode 100644 index 00000000..9fa2c44e Binary files /dev/null and b/tests/test_000839.iamf differ diff --git a/tests/test_000839.textproto b/tests/test_000839.textproto new file mode 100644 index 00000000..73c79530 --- /dev/null +++ b/tests/test_000839.textproto @@ -0,0 +1,213 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a 7.1.5.4ch Expanded Layout and 0OA." + file_name_prefix: "test_000839" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 7.1.5.4ch", + "3.6.3/ambisonics_mono_config" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 10 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -36 + digital_peak: 848 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -217 + digital_peak: 684 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 13 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 14 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 15 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 16 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000839_f.mp4 b/tests/test_000839_f.mp4 new file mode 100644 index 00000000..9830e602 Binary files /dev/null and b/tests/test_000839_f.mp4 differ diff --git a/tests/test_000839_s.mp4 b/tests/test_000839_s.mp4 new file mode 100644 index 00000000..4c0569d0 Binary files /dev/null and b/tests/test_000839_s.mp4 differ diff --git a/tests/test_000840.iamf b/tests/test_000840.iamf new file mode 100644 index 00000000..2f05bc07 Binary files /dev/null and b/tests/test_000840.iamf differ diff --git a/tests/test_000840.textproto b/tests/test_000840.textproto new file mode 100644 index 00000000..be8ff2f2 --- /dev/null +++ b/tests/test_000840.textproto @@ -0,0 +1,201 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a LFE-Pair Expanded Layout and 1OA." + file_name_prefix: "test_000840" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == LFE-Pair", + "3.6.3/ambisonics_mono_config" + ] + base_test: "test_000839" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_LFE_PAIR + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 4 + substream_count: 4 + channel_mapping: [0, 1, 2, 3] + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -564 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -3938 + digital_peak: -2275 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000840_f.mp4 b/tests/test_000840_f.mp4 new file mode 100644 index 00000000..02e9636b Binary files /dev/null and b/tests/test_000840_f.mp4 differ diff --git a/tests/test_000840_s.mp4 b/tests/test_000840_s.mp4 new file mode 100644 index 00000000..dbfcaf16 Binary files /dev/null and b/tests/test_000840_s.mp4 differ diff --git a/tests/test_000841.iamf b/tests/test_000841.iamf new file mode 100644 index 00000000..38d28b0f Binary files /dev/null and b/tests/test_000841.iamf differ diff --git a/tests/test_000841.textproto b/tests/test_000841.textproto new file mode 100644 index 00000000..7bbfc0b4 --- /dev/null +++ b/tests/test_000841.textproto @@ -0,0 +1,207 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a Bottom-3ch Expanded Layout and 2OA." + file_name_prefix: "test_000841" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Bottom-3ch", + "3.6.3/ambisonics_mono_config" + ] + base_test: "test_000839" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 9 + substream_count: 9 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -3308 + digital_peak: -526 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_C_2_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -3765 + digital_peak: -1077 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000841_f.mp4 b/tests/test_000841_f.mp4 new file mode 100644 index 00000000..e98710c5 Binary files /dev/null and b/tests/test_000841_f.mp4 differ diff --git a/tests/test_000841_s.mp4 b/tests/test_000841_s.mp4 new file mode 100644 index 00000000..c70cf005 Binary files /dev/null and b/tests/test_000841_s.mp4 differ diff --git a/tests/test_000842.iamf b/tests/test_000842.iamf new file mode 100644 index 00000000..859d2aed Binary files /dev/null and b/tests/test_000842.iamf differ diff --git a/tests/test_000842.textproto b/tests/test_000842.textproto new file mode 100644 index 00000000..82e97b6e --- /dev/null +++ b/tests/test_000842.textproto @@ -0,0 +1,221 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a Bottom-4ch Expanded Layout and 2OA." + file_name_prefix: "test_000842" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Bottom-4ch", + "3.6.3/ambisonics_projection_config" + ] + base_test: "test_000839" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 9 + substream_count: 9 + coupled_substream_count: 0 +# txtpbfmt: off + demixing_matrix: [ + 32767, 0, 0, 0, 0, 0, 0, 0, 0, # col 0 + 0, 32767, 0, 0, 0, 0, 0, 0, 0, # col 1 + 0, 0, 32767, 0, 0, 0, 0, 0, 0, # col 2 + 0, 0, 0, 32767, 0, 0, 0, 0, 0, # col 3 + 0, 0, 0, 0, 32767, 0, 0, 0, 0, # col 4 + 0, 0, 0, 0, 0, 32767, 0, 0, 0, # col 5 + 0, 0, 0, 0, 0, 0, 32767, 0, 0, # col 6 + 0, 0, 0, 0, 0, 0, 0, 32767, 0, # col 7 + 0, 0, 0, 0, 0, 0, 0, 0, 32767 # col 8 + ] +# txtpbfmt: on + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -2666 + digital_peak: -265 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -2809 + digital_peak: -1628 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 13 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 14 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 15 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 16 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000842_f.mp4 b/tests/test_000842_f.mp4 new file mode 100644 index 00000000..02354239 Binary files /dev/null and b/tests/test_000842_f.mp4 differ diff --git a/tests/test_000842_s.mp4 b/tests/test_000842_s.mp4 new file mode 100644 index 00000000..6d2c3c16 Binary files /dev/null and b/tests/test_000842_s.mp4 differ diff --git a/tests/test_000843.iamf b/tests/test_000843.iamf new file mode 100644 index 00000000..f396e528 Binary files /dev/null and b/tests/test_000843.iamf differ diff --git a/tests/test_000843.textproto b/tests/test_000843.textproto new file mode 100644 index 00000000..e72c84cb --- /dev/null +++ b/tests/test_000843.textproto @@ -0,0 +1,249 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a Top-1ch Expanded Layout and 3OA." + file_name_prefix: "test_000843" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Top-1ch", + "3.6.3/ambisonics_projection_config" + ] + base_test: "test_000839" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_1_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [ + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115 + ] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 16 + substream_count: 16 + coupled_substream_count: 0 +# txtpbfmt: off + demixing_matrix: [ + 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 0 + 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 1 + 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 2 + 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 3 + 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 4 + 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 5 + 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 6 + 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, # col 7 + 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, # col 8 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, # col 9 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, # col 10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, # col 11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, # col 12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, # col 13 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, # col 14 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767 # col 15 + ] +# txtpbfmt: on + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -3806 + digital_peak: -686 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -4218 + digital_peak: -1472 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_TP_C } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000843_f.mp4 b/tests/test_000843_f.mp4 new file mode 100644 index 00000000..525bc657 Binary files /dev/null and b/tests/test_000843_f.mp4 differ diff --git a/tests/test_000843_s.mp4 b/tests/test_000843_s.mp4 new file mode 100644 index 00000000..f877314c Binary files /dev/null and b/tests/test_000843_s.mp4 differ diff --git a/tests/test_000844.iamf b/tests/test_000844.iamf new file mode 100644 index 00000000..f442b7ea Binary files /dev/null and b/tests/test_000844.iamf differ diff --git a/tests/test_000844.textproto b/tests/test_000844.textproto new file mode 100644 index 00000000..690727f9 --- /dev/null +++ b/tests/test_000844.textproto @@ -0,0 +1,222 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "A Base-Advanced Profile Stream using a Top-5ch Expanded Layout and 2OA." + file_name_prefix: "test_000844" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == Top-5ch", + "3.6.3/ambisonics_projection_config" + ] + base_test: "test_000839" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0, 1, 2] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_5_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 9 + substream_count: 9 + coupled_substream_count: 0 +# txtpbfmt: off + demixing_matrix: [ + 32767, 0, 0, 0, 0, 0, 0, 0, 0, # col 0 + 0, 32767, 0, 0, 0, 0, 0, 0, 0, # col 1 + 0, 0, 32767, 0, 0, 0, 0, 0, 0, # col 2 + 0, 0, 0, 32767, 0, 0, 0, 0, 0, # col 3 + 0, 0, 0, 0, 32767, 0, 0, 0, 0, # col 4 + 0, 0, 0, 0, 0, 32767, 0, 0, 0, # col 5 + 0, 0, 0, 0, 0, 0, 32767, 0, 0, # col 6 + 0, 0, 0, 0, 0, 0, 0, 32767, 0, # col 7 + 0, 0, 0, 0, 0, 0, 0, 0, 32767 # col 8 + ] +# txtpbfmt: on + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -2301 + digital_peak: -113 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -2402 + digital_peak: -1252 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000844_f.mp4 b/tests/test_000844_f.mp4 new file mode 100644 index 00000000..2b1eb111 Binary files /dev/null and b/tests/test_000844_f.mp4 differ diff --git a/tests/test_000844_s.mp4 b/tests/test_000844_s.mp4 new file mode 100644 index 00000000..acd6a842 Binary files /dev/null and b/tests/test_000844_s.mp4 differ diff --git a/tests/test_000845.iamf b/tests/test_000845.iamf new file mode 100644 index 00000000..2908ca97 Binary files /dev/null and b/tests/test_000845.iamf differ diff --git a/tests/test_000845.textproto b/tests/test_000845.textproto new file mode 100644 index 00000000..c4c203ef --- /dev/null +++ b/tests/test_000845.textproto @@ -0,0 +1,221 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An IA Sequence with two LPCM Codec Config OBUs." + file_name_prefix: "test_000845" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-11-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: ["4/Multiple Codec Configs"] + base_test: "test_000005" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + } + } +} + +codec_config_metadata { + codec_config_id: 201 + 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: 24 + sample_rate: 48000 + } + } +} + +audio_element_metadata { + audio_element_id: 300 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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: 201 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + } + sub_mixes { + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_1_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -5897 + digital_peak: -1777 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s_24bit.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000845_f.mp4 b/tests/test_000845_f.mp4 new file mode 100644 index 00000000..5a091dc2 Binary files /dev/null and b/tests/test_000845_f.mp4 differ diff --git a/tests/test_000845_s.mp4 b/tests/test_000845_s.mp4 new file mode 100644 index 00000000..90ffd210 Binary files /dev/null and b/tests/test_000845_s.mp4 differ diff --git a/tests/test_000846.iamf b/tests/test_000846.iamf new file mode 100644 index 00000000..434bba42 Binary files /dev/null and b/tests/test_000846.iamf differ diff --git a/tests/test_000846.textproto b/tests/test_000846.textproto new file mode 100644 index 00000000..08ac145c --- /dev/null +++ b/tests/test_000846.textproto @@ -0,0 +1,232 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An IA Sequence with an LPCM and Opus Codec Config ." + file_name_prefix: "test_000846" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-11-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: ["4/Multiple Codec Configs"] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + automatically_override_codec_delay: false + automatically_override_audio_roll_distance: false + 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: 64000 + application: APPLICATION_AUDIO + use_float_api: true + } + } + } +} + +codec_config_metadata { + codec_config_id: 201 + codec_config { + codec_id: CODEC_ID_LPCM + num_samples_per_frame: 960 + 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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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: 201 + audio_substream_ids: [1, 2, 3, 4] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_3_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 4 + coupled_substream_count: 2 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + } + sub_mixes { + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_1_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -5478 + digital_peak: -1455 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_3 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_3 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_3 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_3 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000846_f.mp4 b/tests/test_000846_f.mp4 new file mode 100644 index 00000000..d79dabb8 Binary files /dev/null and b/tests/test_000846_f.mp4 differ diff --git a/tests/test_000846_s.mp4 b/tests/test_000846_s.mp4 new file mode 100644 index 00000000..9a8b02e5 Binary files /dev/null and b/tests/test_000846_s.mp4 differ diff --git a/tests/test_000847.iamf b/tests/test_000847.iamf new file mode 100644 index 00000000..cb283bc0 Binary files /dev/null and b/tests/test_000847.iamf differ diff --git a/tests/test_000847.textproto b/tests/test_000847.textproto new file mode 100644 index 00000000..5fa24a1c --- /dev/null +++ b/tests/test_000847.textproto @@ -0,0 +1,237 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An IA Sequence with an LPCM and FLAC Codec Config ." + file_name_prefix: "test_000847" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-11-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: ["4/Multiple Codec Configs"] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + codec_id: CODEC_ID_FLAC + num_samples_per_frame: 1024 + audio_roll_distance: 0 + decoder_config_flac: { + metadata_blocks: { + header: { + block_type: FLAC_BLOCK_TYPE_STREAMINFO + } + stream_info { + minimum_block_size: 1024 + maximum_block_size: 1024 + sample_rate: 48000 + bits_per_sample: 15 # Flac interprets this as 16 bits. + total_samples_in_stream: 24000 + } + } + flac_encoder_metadata { + compression_level: 5 + } + } + } +} + +codec_config_metadata { + codec_config_id: 201 + 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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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: 201 + audio_substream_ids: [1, 2, 3, 4] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 4 + coupled_substream_count: 2 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + } + sub_mixes { + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_1_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -5386 + digital_peak: -1398 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000847_f.mp4 b/tests/test_000847_f.mp4 new file mode 100644 index 00000000..d2a5f355 Binary files /dev/null and b/tests/test_000847_f.mp4 differ diff --git a/tests/test_000847_s.mp4 b/tests/test_000847_s.mp4 new file mode 100644 index 00000000..0c6b3a2e Binary files /dev/null and b/tests/test_000847_s.mp4 differ diff --git a/tests/test_000848.iamf b/tests/test_000848.iamf new file mode 100644 index 00000000..00c864b4 Binary files /dev/null and b/tests/test_000848.iamf differ diff --git a/tests/test_000848.textproto b/tests/test_000848.textproto new file mode 100644 index 00000000..bf3088e5 --- /dev/null +++ b/tests/test_000848.textproto @@ -0,0 +1,237 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An IA Sequence with an LPCM and AAC Codec Config." + file_name_prefix: "test_000848" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-11-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: ["4/Multiple Codec Configs"] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +codec_config_metadata { + codec_config_id: 200 + codec_config { + automatically_override_codec_delay: false + automatically_override_audio_roll_distance: false + codec_id: CODEC_ID_AAC_LC + num_samples_per_frame: 1024 + audio_roll_distance: -1 + decoder_config_aac: { + buffer_size_db: 0 + max_bitrate: 0 + average_bit_rate: 0 + decoder_specific_info { + sample_frequency_index: AAC_SAMPLE_FREQUENCY_INDEX_48000 + } + aac_encoder_metadata { + bitrate_mode: 0 # Constant bit rate mode. + enable_afterburner: true + signaling_mode: 2 # Explicit hierarchical signaling. + } + } + } +} + +codec_config_metadata { + codec_config_id: 201 + 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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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: 201 + audio_substream_ids: [1, 2, 3, 4, 5] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 5 + coupled_substream_count: 3 + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + } + sub_mixes { + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_1_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -5279 + digital_peak: -1398 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_2 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000848_f.mp4 b/tests/test_000848_f.mp4 new file mode 100644 index 00000000..6160cf80 Binary files /dev/null and b/tests/test_000848_f.mp4 differ diff --git a/tests/test_000848_s.mp4 b/tests/test_000848_s.mp4 new file mode 100644 index 00000000..df380329 Binary files /dev/null and b/tests/test_000848_s.mp4 differ diff --git a/tests/test_000849.iamf b/tests/test_000849.iamf new file mode 100644 index 00000000..003e6616 Binary files /dev/null and b/tests/test_000849.iamf differ diff --git a/tests/test_000849.textproto b/tests/test_000849.textproto new file mode 100644 index 00000000..a6c69859 --- /dev/null +++ b/tests/test_000849.textproto @@ -0,0 +1,223 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An IA Sequence with two user-defined metadata OBUs." + file_name_prefix: "test_000849" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-11-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: ["3.11/Metadata OBUs"] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +metadata_obu_metadata { + metadata_itu_t_t35 { + itu_t_t35_country_code: 0xFF + itu_t_t35_country_code_extension_byte: 112 + } +} + +metadata_obu_metadata { + metadata_iamf_tags { + tags { + name: "test_key" + value: "test_value" + } + } +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + } + sub_mixes { + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_1_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -5897 + digital_peak: -1777 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000849_f.mp4 b/tests/test_000849_f.mp4 new file mode 100644 index 00000000..6858a106 Binary files /dev/null and b/tests/test_000849_f.mp4 differ diff --git a/tests/test_000849_s.mp4 b/tests/test_000849_s.mp4 new file mode 100644 index 00000000..fab3a322 Binary files /dev/null and b/tests/test_000849_s.mp4 differ diff --git a/tests/test_000850.iamf b/tests/test_000850.iamf new file mode 100644 index 00000000..43b65ac3 Binary files /dev/null and b/tests/test_000850.iamf differ diff --git a/tests/test_000850.textproto b/tests/test_000850.textproto new file mode 100644 index 00000000..082c1f4f --- /dev/null +++ b/tests/test_000850.textproto @@ -0,0 +1,536 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +# TODO(b/477258421): Port the "Arbitrary OBU"s to normal parameter blocks when +# this feature is implemented. Also, enable writing the +# output wav file. +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream with parameter blocks spanning multiple " + "frames." + "There are twenty four temporal units." + " - The first six are covered by a single parameter block." + " - The next six represent a parameter block gap." + " - The next six are covered by a six-frame parameter block." + " - The last six are covered by a six-frame parameter block." + file_name_prefix: "test_000850" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-13 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/element_gain_offset_config value_type" + ] + base_test: "test_000800" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_NONE +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 127 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -4619 + digital_peak: -4621 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_48khz_512ms.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_48khz_512ms.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} + +arbitrary_obu_metadata { + # A key frame temporal delimiter. + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: false # Key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A six-frame parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (127)`. + "\x7f" + # `duration = six 1024-sample frames (leb128)`. + "\x80\x30" + # `constant_subblock_duration == duration`. + "\x80\x30" + # `animation_type` = `ANIMATE_STEP`. + "\x00" + "\xbb\xcc" +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 1024 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 2048 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 3072 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 4096 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 5120 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 6144 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: false # Key frame. + obu_extension_flag: false + } +} + +# Tick 6144 has a key frame temporal delimiter, but we omit a parameter block, +# to exercise gaps in parameter blocks. + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 7168 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 8192 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 9216 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 10240 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 11264 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 12288 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: false # Key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A six-frame parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 12288 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (127)`. + "\x7f" + # `duration = six 1024-sample frames (leb128)`. + "\x80\x30" + # `constant_subblock_duration == duration`. + "\x80\x30" + # `animation_type` = `ANIMATE_STEP`. + "\x00" + "\xbb\xcc" +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 13312 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 14336 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 15360 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 16384 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 17408 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 18432 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: false # Key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A six-frame parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 18432 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` (127)`. + "\x7f" + # `duration = six 1024-sample frames (leb128)`. + "\x80\x30" + # `constant_subblock_duration == duration`. + "\x80\x30" + # `animation_type` = `ANIMATE_STEP`. + "\x00" + "\xbb\xcc" +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 19456 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 20480 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 21504 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 22528 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} + +arbitrary_obu_metadata { + # A non-key frame temporal delimiter + insertion_hook: INSERTION_HOOK_BEFORE_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 23552 + obu_type: OBU_IA_TEMPORAL_DELIMITER + obu_header { + obu_redundant_copy: false + obu_trimming_status_flag: true # Not a key frame. + obu_extension_flag: false + } +} diff --git a/tests/test_000850_f.mp4 b/tests/test_000850_f.mp4 new file mode 100644 index 00000000..34a0ce69 Binary files /dev/null and b/tests/test_000850_f.mp4 differ diff --git a/tests/test_000850_s.mp4 b/tests/test_000850_s.mp4 new file mode 100644 index 00000000..1c4fbf56 Binary files /dev/null and b/tests/test_000850_s.mp4 differ diff --git a/tests/test_000851.iamf b/tests/test_000851.iamf new file mode 100644 index 00000000..cc6f91e3 Binary files /dev/null and b/tests/test_000851.iamf differ diff --git a/tests/test_000851.textproto b/tests/test_000851.textproto new file mode 100644 index 00000000..79658551 --- /dev/null +++ b/tests/test_000851.textproto @@ -0,0 +1,198 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream with mix presentation optional fields " + "specifying a (reserved) preferred binaural renderer" + file_name_prefix: "test_000851" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-23 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.2/optional_fields_flag", + "3.7/preferred_binaural_renderer" + ] + base_test: "test_000854" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -4940 + digital_peak: -1018 + } + } + } + include_mix_presentation_tags: true + mix_presentation_tags { + tags: [] + } + optional_fields { + preferred_loudspeaker_renderer: PREFERRED_LOUDSPEAKER_RENDERER_NONE + preferred_binaural_renderer: PREFERRED_BINAURAL_RENDERER_RESERVED_255 + } + obu_header { + obu_trimming_status_flag: true # Optional fields flag. + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000851_f.mp4 b/tests/test_000851_f.mp4 new file mode 100644 index 00000000..84243279 Binary files /dev/null and b/tests/test_000851_f.mp4 differ diff --git a/tests/test_000851_s.mp4 b/tests/test_000851_s.mp4 new file mode 100644 index 00000000..e663e7a3 Binary files /dev/null and b/tests/test_000851_s.mp4 differ diff --git a/tests/test_000852.iamf b/tests/test_000852.iamf new file mode 100644 index 00000000..02a56399 Binary files /dev/null and b/tests/test_000852.iamf differ diff --git a/tests/test_000852.textproto b/tests/test_000852.textproto new file mode 100644 index 00000000..15264767 --- /dev/null +++ b/tests/test_000852.textproto @@ -0,0 +1,198 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream with mix presentation optional fields " + "specifying a (reserved) preferred loudspeaker renderer" + file_name_prefix: "test_000852" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-23 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.2/optional_fields_flag", + "3.7/preferred_loudspeaker_renderer" + ] + base_test: "test_000854" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -4940 + digital_peak: -1018 + } + } + } + include_mix_presentation_tags: true + mix_presentation_tags { + tags: [] + } + optional_fields { + preferred_loudspeaker_renderer: PREFERRED_LOUDSPEAKER_RENDERER_RESERVED_255 + preferred_binaural_renderer: PREFERRED_BINAURAL_RENDERER_NONE + } + obu_header { + obu_trimming_status_flag: true # Optional fields flag. + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000852_f.mp4 b/tests/test_000852_f.mp4 new file mode 100644 index 00000000..b7ec6673 Binary files /dev/null and b/tests/test_000852_f.mp4 differ diff --git a/tests/test_000852_s.mp4 b/tests/test_000852_s.mp4 new file mode 100644 index 00000000..32e3c362 Binary files /dev/null and b/tests/test_000852_s.mp4 differ diff --git a/tests/test_000853.iamf b/tests/test_000853.iamf new file mode 100644 index 00000000..4ad765bf Binary files /dev/null and b/tests/test_000853.iamf differ diff --git a/tests/test_000853.textproto b/tests/test_000853.textproto new file mode 100644 index 00000000..5a2edd9d --- /dev/null +++ b/tests/test_000853.textproto @@ -0,0 +1,194 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream with a value-type " + "ElementGainOffsetConfig" + file_name_prefix: "test_000853" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-13 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/element_gain_offset_config value_type" + ] + base_test: "test_000800" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + element_gain_offset_config { + value_type { + element_gain_offset { + q7_dot8: -768 # -3 dB. + } + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -4940 + digital_peak: -1018 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000853_f.mp4 b/tests/test_000853_f.mp4 new file mode 100644 index 00000000..6ea3b254 Binary files /dev/null and b/tests/test_000853_f.mp4 differ diff --git a/tests/test_000853_s.mp4 b/tests/test_000853_s.mp4 new file mode 100644 index 00000000..56085207 Binary files /dev/null and b/tests/test_000853_s.mp4 differ diff --git a/tests/test_000854.iamf b/tests/test_000854.iamf new file mode 100644 index 00000000..e196aca0 Binary files /dev/null and b/tests/test_000854.iamf differ diff --git a/tests/test_000854.textproto b/tests/test_000854.textproto new file mode 100644 index 00000000..bf5399df --- /dev/null +++ b/tests/test_000854.textproto @@ -0,0 +1,199 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream with a range-type " + "ElementGainOffsetConfig" + file_name_prefix: "test_000854" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-13 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/element_gain_offset_config range_type" + ] + base_test: "test_000800" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + element_gain_offset_config { + range_type { + default_element_gain_offset { + q7_dot8: -768 # -3 dB. + } + min_element_gain_offset { + q7_dot8: -1536 # -6 dB. + } + max_element_gain_offset { + q7_dot8: 0 # 0 dB. + } + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -4940 + digital_peak: -1018 + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000854_f.mp4 b/tests/test_000854_f.mp4 new file mode 100644 index 00000000..8abee868 Binary files /dev/null and b/tests/test_000854_f.mp4 differ diff --git a/tests/test_000854_s.mp4 b/tests/test_000854_s.mp4 new file mode 100644 index 00000000..dd11f950 Binary files /dev/null and b/tests/test_000854_s.mp4 differ diff --git a/tests/test_000855.iamf b/tests/test_000855.iamf new file mode 100644 index 00000000..aad23dbe Binary files /dev/null and b/tests/test_000855.iamf differ diff --git a/tests/test_000855.textproto b/tests/test_000855.textproto new file mode 100644 index 00000000..00c1ab08 --- /dev/null +++ b/tests/test_000855.textproto @@ -0,0 +1,471 @@ +# Copyright (c) 2026, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +# TODO(b/479171358): Update this to use syntax for momentary loudness and +# loudness range once it is available in the implementation. + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream with live, momentary, and range loudness " + "information provided." + file_name_prefix: "test_000855" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-21 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.6/info_type == LIVE", + "3.7.6/info_type == MOMENTARY_LOUDNESS", + "3.7.6/info_type == LOUDNESS_RANGE" + ] + base_test: "test_000854" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + audio_substream_ids: [1] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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_LIVE, + LOUDNESS_INFO_TYPE_RESERVED_8, # Momentary Loudness. + LOUDNESS_INFO_TYPE_RESERVED_16 # Loudness Range. + ] + integrated_loudness: -4619 + digital_peak: -4621 + info_type_bytes: + # MomentaryLoudnessParamDefinition + "\x7f" # `parameter_id` + "\x80\xf7\x02" # `parameter_rate` = 48000 + "\x00" # `param_definition_mode` (1), reserved (7) + "\x80\x08" # `duration` = 1024 + "\x80\x08" # `constant_subblock_duration` = 1024 + "\x1f\xc0" # `num_bin_pairs_minus_one` (3) = 0, bin_width_minus_one (6) = 63, first_bin_center (6) = 32, reserved_momentary_loudness (1) + "\x18" # `bin[0]` = 24 + "\x00" # `bin[1]` + # Loudness range fields: + "\x00" # `loudness_range` (6), `reserved_loudness_range` (2) + } + } + } +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 0 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 1024 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 2048 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 3072 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 4096 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 5120 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 6144 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 7168 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 8192 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 9216 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 10240 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 11264 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 12288 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 13312 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 14336 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 15360 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 16384 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 17408 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 18432 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 19456 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 20480 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 21504 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 22528 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +arbitrary_obu_metadata { + # A momentary loudness parameter block. + insertion_hook: INSERTION_HOOK_AFTER_PARAMETER_BLOCKS_AT_TICK + insertion_tick: 23552 + obu_type: OBU_IA_PARAMETER_BLOCK + payload: + # `parameter_id` = 127. + "\x7f" + "\x48" # momentary loudness (6), reserved (2) +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_48khz_512ms.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_48khz_512ms.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000855_f.mp4 b/tests/test_000855_f.mp4 new file mode 100644 index 00000000..8cc659f3 Binary files /dev/null and b/tests/test_000855_f.mp4 differ diff --git a/tests/test_000855_s.mp4 b/tests/test_000855_s.mp4 new file mode 100644 index 00000000..4fd5f161 Binary files /dev/null and b/tests/test_000855_s.mp4 differ diff --git a/tests/test_000900.iamf b/tests/test_000900.iamf new file mode 100644 index 00000000..e555cbb7 Binary files /dev/null and b/tests/test_000900.iamf differ diff --git a/tests/test_000900.textproto b/tests/test_000900.textproto new file mode 100644 index 00000000..d6555c67 --- /dev/null +++ b/tests/test_000900.textproto @@ -0,0 +1,349 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Mono Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000900" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000839" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_12_0_1_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_MONO } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000900_f.mp4 b/tests/test_000900_f.mp4 new file mode 100644 index 00000000..1c068677 Binary files /dev/null and b/tests/test_000900_f.mp4 differ diff --git a/tests/test_000900_s.mp4 b/tests/test_000900_s.mp4 new file mode 100644 index 00000000..e089f892 Binary files /dev/null and b/tests/test_000900_s.mp4 differ diff --git a/tests/test_000901.iamf b/tests/test_000901.iamf new file mode 100644 index 00000000..e90be84e Binary files /dev/null and b/tests/test_000901.iamf differ diff --git a/tests/test_000901.textproto b/tests/test_000901.textproto new file mode 100644 index 00000000..04fe928a --- /dev/null +++ b/tests/test_000901.textproto @@ -0,0 +1,338 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000901" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000901" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000901_f.mp4 b/tests/test_000901_f.mp4 new file mode 100644 index 00000000..1d348fc4 Binary files /dev/null and b/tests/test_000901_f.mp4 differ diff --git a/tests/test_000901_s.mp4 b/tests/test_000901_s.mp4 new file mode 100644 index 00000000..b915a2c9 Binary files /dev/null and b/tests/test_000901_s.mp4 differ diff --git a/tests/test_000902.iamf b/tests/test_000902.iamf new file mode 100644 index 00000000..5ba31340 Binary files /dev/null and b/tests/test_000902.iamf differ diff --git a/tests/test_000902.textproto b/tests/test_000902.textproto new file mode 100644 index 00000000..8fcd7b06 --- /dev/null +++ b/tests/test_000902.textproto @@ -0,0 +1,354 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 3_1_2 Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000902" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_3_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 4 + coupled_substream_count: 2 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_11_2_3_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_3 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_3 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LTF_3 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RTF_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000902_f.mp4 b/tests/test_000902_f.mp4 new file mode 100644 index 00000000..4576b3db Binary files /dev/null and b/tests/test_000902_f.mp4 differ diff --git a/tests/test_000902_s.mp4 b/tests/test_000902_s.mp4 new file mode 100644 index 00000000..f6351d63 Binary files /dev/null and b/tests/test_000902_s.mp4 differ diff --git a/tests/test_000903.iamf b/tests/test_000903.iamf new file mode 100644 index 00000000..b9e3f67d Binary files /dev/null and b/tests/test_000903.iamf differ diff --git a/tests/test_000903.textproto b/tests/test_000903.textproto new file mode 100644 index 00000000..0ea0ffbf --- /dev/null +++ b/tests/test_000903.textproto @@ -0,0 +1,354 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 5.1 Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000903" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 4 + coupled_substream_count: 2 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000903_f.mp4 b/tests/test_000903_f.mp4 new file mode 100644 index 00000000..e5bf36bc Binary files /dev/null and b/tests/test_000903_f.mp4 differ diff --git a/tests/test_000903_s.mp4 b/tests/test_000903_s.mp4 new file mode 100644 index 00000000..0cccc070 Binary files /dev/null and b/tests/test_000903_s.mp4 differ diff --git a/tests/test_000904.iamf b/tests/test_000904.iamf new file mode 100644 index 00000000..0947328d Binary files /dev/null and b/tests/test_000904.iamf differ diff --git a/tests/test_000904.textproto b/tests/test_000904.textproto new file mode 100644 index 00000000..965bcf20 --- /dev/null +++ b/tests/test_000904.textproto @@ -0,0 +1,356 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 5.1.2 Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000904" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 5 + coupled_substream_count: 3 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_C_2_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LTF_2 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RTF_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000904_f.mp4 b/tests/test_000904_f.mp4 new file mode 100644 index 00000000..c21e38d0 Binary files /dev/null and b/tests/test_000904_f.mp4 differ diff --git a/tests/test_000904_s.mp4 b/tests/test_000904_s.mp4 new file mode 100644 index 00000000..7b119b6b Binary files /dev/null and b/tests/test_000904_s.mp4 differ diff --git a/tests/test_000905.iamf b/tests/test_000905.iamf new file mode 100644 index 00000000..c31577dc Binary files /dev/null and b/tests/test_000905.iamf differ diff --git a/tests/test_000905.textproto b/tests/test_000905.textproto new file mode 100644 index 00000000..05f6f9f8 --- /dev/null +++ b/tests/test_000905.textproto @@ -0,0 +1,358 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 5.1.4 Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000905" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_5_1_4_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 6 + coupled_substream_count: 4 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_5 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RS_5 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000905_f.mp4 b/tests/test_000905_f.mp4 new file mode 100644 index 00000000..d071a8a7 Binary files /dev/null and b/tests/test_000905_f.mp4 differ diff --git a/tests/test_000905_s.mp4 b/tests/test_000905_s.mp4 new file mode 100644 index 00000000..c34e6678 Binary files /dev/null and b/tests/test_000905_s.mp4 differ diff --git a/tests/test_000906.iamf b/tests/test_000906.iamf new file mode 100644 index 00000000..dec1b5cf Binary files /dev/null and b/tests/test_000906.iamf differ diff --git a/tests/test_000906.textproto b/tests/test_000906.textproto new file mode 100644 index 00000000..a00bcbc6 --- /dev/null +++ b/tests/test_000906.textproto @@ -0,0 +1,356 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 7.1 Layout and 4 Mono Polar Objects." + file_name_prefix: "test_000906" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_7_1_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 5 + coupled_substream_count: 3 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_I_0_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000906_f.mp4 b/tests/test_000906_f.mp4 new file mode 100644 index 00000000..546d5d35 Binary files /dev/null and b/tests/test_000906_f.mp4 differ diff --git a/tests/test_000906_s.mp4 b/tests/test_000906_s.mp4 new file mode 100644 index 00000000..7bcc84b4 Binary files /dev/null and b/tests/test_000906_s.mp4 differ diff --git a/tests/test_000907.iamf b/tests/test_000907.iamf new file mode 100644 index 00000000..6b807c55 Binary files /dev/null and b/tests/test_000907.iamf differ diff --git a/tests/test_000907.textproto b/tests/test_000907.textproto new file mode 100644 index 00000000..ba3e88ea --- /dev/null +++ b/tests/test_000907.textproto @@ -0,0 +1,266 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 7.1.2 Layout and 2 Dual Polar Objects." + file_name_prefix: "test_000907" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_7_1_2_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 6 + coupled_substream_count: 4 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_2 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000907_f.mp4 b/tests/test_000907_f.mp4 new file mode 100644 index 00000000..3a1f7800 Binary files /dev/null and b/tests/test_000907_f.mp4 differ diff --git a/tests/test_000907_s.mp4 b/tests/test_000907_s.mp4 new file mode 100644 index 00000000..c6d9b699 Binary files /dev/null and b/tests/test_000907_s.mp4 differ diff --git a/tests/test_000908.iamf b/tests/test_000908.iamf new file mode 100644 index 00000000..fe50fcfe Binary files /dev/null and b/tests/test_000908.iamf differ diff --git a/tests/test_000908.textproto b/tests/test_000908.textproto new file mode 100644 index 00000000..00288461 --- /dev/null +++ b/tests/test_000908.textproto @@ -0,0 +1,268 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 7.1.4 Layout and 2 Dual Polar Objects." + file_name_prefix: "test_000908" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000907" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_7_1_4_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 7 + coupled_substream_count: 5 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000908_f.mp4 b/tests/test_000908_f.mp4 new file mode 100644 index 00000000..4927e1a3 Binary files /dev/null and b/tests/test_000908_f.mp4 differ diff --git a/tests/test_000908_s.mp4 b/tests/test_000908_s.mp4 new file mode 100644 index 00000000..c9abf10b Binary files /dev/null and b/tests/test_000908_s.mp4 differ diff --git a/tests/test_000909.iamf b/tests/test_000909.iamf new file mode 100644 index 00000000..288d7dd1 Binary files /dev/null and b/tests/test_000909.iamf differ diff --git a/tests/test_000909.textproto b/tests/test_000909.textproto new file mode 100644 index 00000000..2e1babe3 --- /dev/null +++ b/tests/test_000909.textproto @@ -0,0 +1,261 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a 3ch Layout and 2 Dual Polar Objects." + file_name_prefix: "test_000909" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout 3.0", + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000907" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_3_0_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000909_f.mp4 b/tests/test_000909_f.mp4 new file mode 100644 index 00000000..61515871 Binary files /dev/null and b/tests/test_000909_f.mp4 differ diff --git a/tests/test_000909_s.mp4 b/tests/test_000909_s.mp4 new file mode 100644 index 00000000..327f7eb1 Binary files /dev/null and b/tests/test_000909_s.mp4 differ diff --git a/tests/test_000910.iamf b/tests/test_000910.iamf new file mode 100644 index 00000000..3508334a Binary files /dev/null and b/tests/test_000910.iamf differ diff --git a/tests/test_000910.textproto b/tests/test_000910.textproto new file mode 100644 index 00000000..d992bc48 --- /dev/null +++ b/tests/test_000910.textproto @@ -0,0 +1,262 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Top4ch Layout and 2 Dual Polar Objects." + file_name_prefix: "test_000910" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Top4ch", + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000907" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000910_f.mp4 b/tests/test_000910_f.mp4 new file mode 100644 index 00000000..f5563190 Binary files /dev/null and b/tests/test_000910_f.mp4 differ diff --git a/tests/test_000910_s.mp4 b/tests/test_000910_s.mp4 new file mode 100644 index 00000000..27e73394 Binary files /dev/null and b/tests/test_000910_s.mp4 differ diff --git a/tests/test_000911.iamf b/tests/test_000911.iamf new file mode 100644 index 00000000..7c02602d Binary files /dev/null and b/tests/test_000911.iamf differ diff --git a/tests/test_000911.textproto b/tests/test_000911.textproto new file mode 100644 index 00000000..708f3869 --- /dev/null +++ b/tests/test_000911.textproto @@ -0,0 +1,264 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Top6ch Layout and 2 Dual Polar Objects." + file_name_prefix: "test_000911" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Top6ch", + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000909" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 3 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_6_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 10 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 11 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_SI_R } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000911_f.mp4 b/tests/test_000911_f.mp4 new file mode 100644 index 00000000..c9b57c36 Binary files /dev/null and b/tests/test_000911_f.mp4 differ diff --git a/tests/test_000911_s.mp4 b/tests/test_000911_s.mp4 new file mode 100644 index 00000000..6a2282cc Binary files /dev/null and b/tests/test_000911_s.mp4 differ diff --git a/tests/test_000912.iamf b/tests/test_000912.iamf new file mode 100644 index 00000000..b12f1c86 Binary files /dev/null and b/tests/test_000912.iamf differ diff --git a/tests/test_000912.textproto b/tests/test_000912.textproto new file mode 100644 index 00000000..20fde111 --- /dev/null +++ b/tests/test_000912.textproto @@ -0,0 +1,258 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using LFE and 2 Dual Polar Objects." + file_name_prefix: "test_000912" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout LFE", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000911" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_LFE + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 30 + default_first_elevation: 45 + default_first_distance: 127 + default_second_azimuth: -30 + default_second_elevation: 45 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 15 + default_first_elevation: 45 + default_first_distance: 127 + default_second_azimuth: -15 + default_second_elevation: 45 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000912_f.mp4 b/tests/test_000912_f.mp4 new file mode 100644 index 00000000..1055b0ba Binary files /dev/null and b/tests/test_000912_f.mp4 differ diff --git a/tests/test_000912_rendered_binaural.wav b/tests/test_000912_rendered_binaural.wav new file mode 100644 index 00000000..fd9235c1 Binary files /dev/null and b/tests/test_000912_rendered_binaural.wav differ diff --git a/tests/test_000912_s.mp4 b/tests/test_000912_s.mp4 new file mode 100644 index 00000000..537a8b02 Binary files /dev/null and b/tests/test_000912_s.mp4 differ diff --git a/tests/test_000913.iamf b/tests/test_000913.iamf new file mode 100644 index 00000000..7a081299 Binary files /dev/null and b/tests/test_000913.iamf differ diff --git a/tests/test_000913.textproto b/tests/test_000913.textproto new file mode 100644 index 00000000..39c4ad2e --- /dev/null +++ b/tests/test_000913.textproto @@ -0,0 +1,260 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo S Layout and 2 Dual Polar Objects." + file_name_prefix: "test_000913" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo S", + "3.6.4/objects_config", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000909" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_S + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_12_0_1_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LS_5 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_RS_5 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000913_f.mp4 b/tests/test_000913_f.mp4 new file mode 100644 index 00000000..4177f692 Binary files /dev/null and b/tests/test_000913_f.mp4 differ diff --git a/tests/test_000913_s.mp4 b/tests/test_000913_s.mp4 new file mode 100644 index 00000000..ca5a14b3 Binary files /dev/null and b/tests/test_000913_s.mp4 differ diff --git a/tests/test_000914.iamf b/tests/test_000914.iamf new file mode 100644 index 00000000..a0c2b7e1 Binary files /dev/null and b/tests/test_000914.iamf differ diff --git a/tests/test_000914.textproto b/tests/test_000914.textproto new file mode 100644 index 00000000..b9ad50be --- /dev/null +++ b/tests/test_000914.textproto @@ -0,0 +1,295 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo SS Layout, one Dual Polar and two Mono Polar Objects." + file_name_prefix: "test_000914" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo SS", + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000913" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_SS + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000914_f.mp4 b/tests/test_000914_f.mp4 new file mode 100644 index 00000000..798f5cf8 Binary files /dev/null and b/tests/test_000914_f.mp4 differ diff --git a/tests/test_000914_s.mp4 b/tests/test_000914_s.mp4 new file mode 100644 index 00000000..31cf73b4 Binary files /dev/null and b/tests/test_000914_s.mp4 differ diff --git a/tests/test_000915.iamf b/tests/test_000915.iamf new file mode 100644 index 00000000..eeef5acf Binary files /dev/null and b/tests/test_000915.iamf differ diff --git a/tests/test_000915.textproto b/tests/test_000915.textproto new file mode 100644 index 00000000..4ece99ea --- /dev/null +++ b/tests/test_000915.textproto @@ -0,0 +1,307 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo RS Layout, one Dual Polar and two Mono Polar Objects." + file_name_prefix: "test_000915" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo RS", + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000914" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_RS + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_11_2_3_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 4 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RRS_7 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000915_f.mp4 b/tests/test_000915_f.mp4 new file mode 100644 index 00000000..c5c7da52 Binary files /dev/null and b/tests/test_000915_f.mp4 differ diff --git a/tests/test_000915_s.mp4 b/tests/test_000915_s.mp4 new file mode 100644 index 00000000..9960a5e0 Binary files /dev/null and b/tests/test_000915_s.mp4 differ diff --git a/tests/test_000916.iamf b/tests/test_000916.iamf new file mode 100644 index 00000000..bfa0c9e6 Binary files /dev/null and b/tests/test_000916.iamf differ diff --git a/tests/test_000916.textproto b/tests/test_000916.textproto new file mode 100644 index 00000000..d035e83b --- /dev/null +++ b/tests/test_000916.textproto @@ -0,0 +1,306 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo TF Layout, one Dual Polar and two Mono Polar Objects." + file_name_prefix: "test_000916" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo TF", + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000913" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_TF + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 10 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTF_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000916_f.mp4 b/tests/test_000916_f.mp4 new file mode 100644 index 00000000..d99ca749 Binary files /dev/null and b/tests/test_000916_f.mp4 differ diff --git a/tests/test_000916_s.mp4 b/tests/test_000916_s.mp4 new file mode 100644 index 00000000..9ffb3f82 Binary files /dev/null and b/tests/test_000916_s.mp4 differ diff --git a/tests/test_000917.iamf b/tests/test_000917.iamf new file mode 100644 index 00000000..e0d9667f Binary files /dev/null and b/tests/test_000917.iamf differ diff --git a/tests/test_000917.textproto b/tests/test_000917.textproto new file mode 100644 index 00000000..6fae1dfb --- /dev/null +++ b/tests/test_000917.textproto @@ -0,0 +1,307 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo TB Layout, one Dual Polar and two Mono Polar Objects." + file_name_prefix: "test_000917" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo TB", + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000914" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_TB + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_C_2_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 12 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000917_f.mp4 b/tests/test_000917_f.mp4 new file mode 100644 index 00000000..b211f6d8 Binary files /dev/null and b/tests/test_000917_f.mp4 differ diff --git a/tests/test_000917_s.mp4 b/tests/test_000917_s.mp4 new file mode 100644 index 00000000..f36a649f Binary files /dev/null and b/tests/test_000917_s.mp4 differ diff --git a/tests/test_000918.iamf b/tests/test_000918.iamf new file mode 100644 index 00000000..d4b05926 Binary files /dev/null and b/tests/test_000918.iamf differ diff --git a/tests/test_000918.textproto b/tests/test_000918.textproto new file mode 100644 index 00000000..ee34a988 --- /dev/null +++ b/tests/test_000918.textproto @@ -0,0 +1,307 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo F Layout, one Dual Polar and two Mono Polar Objects." + file_name_prefix: "test_000918" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo F", + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000915" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_F + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000918_f.mp4 b/tests/test_000918_f.mp4 new file mode 100644 index 00000000..6e09e64e Binary files /dev/null and b/tests/test_000918_f.mp4 differ diff --git a/tests/test_000918_s.mp4 b/tests/test_000918_s.mp4 new file mode 100644 index 00000000..5fd7925a Binary files /dev/null and b/tests/test_000918_s.mp4 differ diff --git a/tests/test_000919.iamf b/tests/test_000919.iamf new file mode 100644 index 00000000..0efe15fe Binary files /dev/null and b/tests/test_000919.iamf differ diff --git a/tests/test_000919.textproto b/tests/test_000919.textproto new file mode 100644 index 00000000..c63a9455 --- /dev/null +++ b/tests/test_000919.textproto @@ -0,0 +1,307 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo Si Layout, one Dual Polar and two Mono Polar Objects." + file_name_prefix: "test_000919" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo Si", + "3.6.4/objects_config", + "3.7.2.1/rendering_config_ with polar_param_definition", + "3.7.2.2/rendering_config_ with dual_polar_param_definition" + ] + base_test: "test_000915" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_SI + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 3 + default_second_azimuth: 4 + default_second_elevation: 5 + default_second_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_I_0_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 8 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 9 channel_label: CHANNEL_LABEL_SI_R } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000919_f.mp4 b/tests/test_000919_f.mp4 new file mode 100644 index 00000000..b4fa787c Binary files /dev/null and b/tests/test_000919_f.mp4 differ diff --git a/tests/test_000919_s.mp4 b/tests/test_000919_s.mp4 new file mode 100644 index 00000000..bf8d189d Binary files /dev/null and b/tests/test_000919_s.mp4 differ diff --git a/tests/test_000920.iamf b/tests/test_000920.iamf new file mode 100644 index 00000000..23573acf Binary files /dev/null and b/tests/test_000920.iamf differ diff --git a/tests/test_000920.textproto b/tests/test_000920.textproto new file mode 100644 index 00000000..9c1e542a --- /dev/null +++ b/tests/test_000920.textproto @@ -0,0 +1,347 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-1 Profile Stream using 0th Order Ambisonics and " + "4 Mono Polar Objects." + file_name_prefix: "test_000920" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition" + ] + base_test: "test_000900" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000920_f.mp4 b/tests/test_000920_f.mp4 new file mode 100644 index 00000000..393408dd Binary files /dev/null and b/tests/test_000920_f.mp4 differ diff --git a/tests/test_000920_s.mp4 b/tests/test_000920_s.mp4 new file mode 100644 index 00000000..942c39f8 Binary files /dev/null and b/tests/test_000920_s.mp4 differ diff --git a/tests/test_000921.iamf b/tests/test_000921.iamf new file mode 100644 index 00000000..4839b05b Binary files /dev/null and b/tests/test_000921.iamf differ diff --git a/tests/test_000921.textproto b/tests/test_000921.textproto new file mode 100644 index 00000000..ac0b108e --- /dev/null +++ b/tests/test_000921.textproto @@ -0,0 +1,350 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-1 Profile Stream using 1st Order Ambisonics and " + "4 Mono Polar Objects." + file_name_prefix: "test_000921" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition" + ] + base_test: "test_000920" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0, 1, 2, 3] + 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_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -90 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000921_f.mp4 b/tests/test_000921_f.mp4 new file mode 100644 index 00000000..6367e963 Binary files /dev/null and b/tests/test_000921_f.mp4 differ diff --git a/tests/test_000921_s.mp4 b/tests/test_000921_s.mp4 new file mode 100644 index 00000000..9f8bb22e Binary files /dev/null and b/tests/test_000921_s.mp4 differ diff --git a/tests/test_000922.iamf b/tests/test_000922.iamf new file mode 100644 index 00000000..5dd502de Binary files /dev/null and b/tests/test_000922.iamf differ diff --git a/tests/test_000922.textproto b/tests/test_000922.textproto new file mode 100644 index 00000000..db02a54d --- /dev/null +++ b/tests/test_000922.textproto @@ -0,0 +1,256 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-1 Profile Stream using 0th Order Ambisonics and " + "2 Dual Polar Objects." + file_name_prefix: "test_000922" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_projection_config", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000920" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 1 + substream_count: 1 + coupled_substream_count: 0 + demixing_matrix: [32767] + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 90 + default_first_elevation: 2 + default_first_distance: 127 + default_second_azimuth: 135 + default_second_elevation: 2 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: -90 + default_first_elevation: 2 + default_first_distance: 127 + default_second_azimuth: -135 + default_second_elevation: 2 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000922_f.mp4 b/tests/test_000922_f.mp4 new file mode 100644 index 00000000..fc8e2ec3 Binary files /dev/null and b/tests/test_000922_f.mp4 differ diff --git a/tests/test_000922_s.mp4 b/tests/test_000922_s.mp4 new file mode 100644 index 00000000..564060ab Binary files /dev/null and b/tests/test_000922_s.mp4 differ diff --git a/tests/test_000923.iamf b/tests/test_000923.iamf new file mode 100644 index 00000000..2dafa182 Binary files /dev/null and b/tests/test_000923.iamf differ diff --git a/tests/test_000923.textproto b/tests/test_000923.textproto new file mode 100644 index 00000000..3c636eae --- /dev/null +++ b/tests/test_000923.textproto @@ -0,0 +1,265 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-1 Profile Stream using 1st Order Ambisonics and " + "2 Dual Polar Objects." + file_name_prefix: "test_000923" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-18 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_projection_config", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000920" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0, 1] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 4 + substream_count: 2 + coupled_substream_count: 2 +# txtpbfmt: off + 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 + ] +# txtpbfmt: on + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 90 + default_first_elevation: 2 + default_first_distance: 64 + default_second_azimuth: 135 + default_second_elevation: 2 + default_second_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: -90 + default_first_elevation: 2 + default_first_distance: 64 + default_second_azimuth: -135 + default_second_elevation: 2 + default_second_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000923_f.mp4 b/tests/test_000923_f.mp4 new file mode 100644 index 00000000..f491e69a Binary files /dev/null and b/tests/test_000923_f.mp4 differ diff --git a/tests/test_000923_s.mp4 b/tests/test_000923_s.mp4 new file mode 100644 index 00000000..c89513f2 Binary files /dev/null and b/tests/test_000923_s.mp4 differ diff --git a/tests/test_000924.iamf b/tests/test_000924.iamf new file mode 100644 index 00000000..457dd596 Binary files /dev/null and b/tests/test_000924.iamf differ diff --git a/tests/test_000924.textproto b/tests/test_000924.textproto new file mode 100644 index 00000000..6ad8692b --- /dev/null +++ b/tests/test_000924.textproto @@ -0,0 +1,395 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo TpSi Layout, one 0th Order Ambisonics and four Mono Polar Objects." + file_name_prefix: "test_000924" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Stereo TpSi", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition" + ] + base_test: "test_000919" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_STEREO_TP_SI + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [104] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 10 channel_label: CHANNEL_LABEL_TP_SI_L }, # Ltb4 in the original file. + { channel_id: 11 channel_label: CHANNEL_LABEL_TP_SI_R } # Rtb4 in the original file. + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000924_f.mp4 b/tests/test_000924_f.mp4 new file mode 100644 index 00000000..a323af20 Binary files /dev/null and b/tests/test_000924_f.mp4 differ diff --git a/tests/test_000924_s.mp4 b/tests/test_000924_s.mp4 new file mode 100644 index 00000000..a02ecbed Binary files /dev/null and b/tests/test_000924_s.mp4 differ diff --git a/tests/test_000925.iamf b/tests/test_000925.iamf new file mode 100644 index 00000000..afd6a672 Binary files /dev/null and b/tests/test_000925.iamf differ diff --git a/tests/test_000925.textproto b/tests/test_000925.textproto new file mode 100644 index 00000000..bec66dd3 --- /dev/null +++ b/tests/test_000925.textproto @@ -0,0 +1,394 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a LFE Pair Layout, one 0th Order Ambisonics and four Mono Polar Objects." + file_name_prefix: "test_000925" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout LFE-Pair", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_LFE_PAIR + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [104] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -1536 # -6 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout: { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000925_f.mp4 b/tests/test_000925_f.mp4 new file mode 100644 index 00000000..cbf1c03b Binary files /dev/null and b/tests/test_000925_f.mp4 differ diff --git a/tests/test_000925_rendered_binaural.wav b/tests/test_000925_rendered_binaural.wav new file mode 100644 index 00000000..07e4d5a8 Binary files /dev/null and b/tests/test_000925_rendered_binaural.wav differ diff --git a/tests/test_000925_s.mp4 b/tests/test_000925_s.mp4 new file mode 100644 index 00000000..ddbee1db Binary files /dev/null and b/tests/test_000925_s.mp4 differ diff --git a/tests/test_000926.iamf b/tests/test_000926.iamf new file mode 100644 index 00000000..51e6486a Binary files /dev/null and b/tests/test_000926.iamf differ diff --git a/tests/test_000926.textproto b/tests/test_000926.textproto new file mode 100644 index 00000000..13a4b8ee --- /dev/null +++ b/tests/test_000926.textproto @@ -0,0 +1,396 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Bottom-3ch Layout, one 0th Order Ambisonics and four Mono Polar Objects." + file_name_prefix: "test_000926" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Bottom-3ch", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 1 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [101] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [102] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [103] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [104] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000926_f.mp4 b/tests/test_000926_f.mp4 new file mode 100644 index 00000000..a54f8543 Binary files /dev/null and b/tests/test_000926_f.mp4 differ diff --git a/tests/test_000926_s.mp4 b/tests/test_000926_s.mp4 new file mode 100644 index 00000000..71fa7424 Binary files /dev/null and b/tests/test_000926_s.mp4 differ diff --git a/tests/test_000927.iamf b/tests/test_000927.iamf new file mode 100644 index 00000000..5052f58c Binary files /dev/null and b/tests/test_000927.iamf differ diff --git a/tests/test_000927.textproto b/tests/test_000927.textproto new file mode 100644 index 00000000..bda3c4a5 --- /dev/null +++ b/tests/test_000927.textproto @@ -0,0 +1,400 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Bottom 4ch Layout, one 1st Order Ambisonics and four Mono Polar Objects." + file_name_prefix: "test_000927" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Bottom 4ch", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.1/rendering_config with polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_BOTTOM_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103] + 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_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [400] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [500] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -30 + default_elevation: 0 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: -120 + default_elevation: 0 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 3 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000927_f.mp4 b/tests/test_000927_f.mp4 new file mode 100644 index 00000000..5316608c Binary files /dev/null and b/tests/test_000927_f.mp4 differ diff --git a/tests/test_000927_s.mp4 b/tests/test_000927_s.mp4 new file mode 100644 index 00000000..689bb5ff Binary files /dev/null and b/tests/test_000927_s.mp4 differ diff --git a/tests/test_000928.iamf b/tests/test_000928.iamf new file mode 100644 index 00000000..675ae4e3 Binary files /dev/null and b/tests/test_000928.iamf differ diff --git a/tests/test_000928.textproto b/tests/test_000928.textproto new file mode 100644 index 00000000..ab0d41b6 --- /dev/null +++ b/tests/test_000928.textproto @@ -0,0 +1,305 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Top-1ch Layout, one 1st Order Ambisonics and two Dual Polar Objects." + file_name_prefix: "test_000928" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Top-1ch", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 1 + coupled_substream_count: 0 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_1_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103] + 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_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 30 + default_first_elevation: 0 + default_first_distance: 127 + default_second_azimuth: -30 + default_second_elevation: 0 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 120 + default_first_elevation: 0 + default_first_distance: 64 + default_second_azimuth: -120 + default_second_elevation: 0 + default_second_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_TP_C } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000928_f.mp4 b/tests/test_000928_f.mp4 new file mode 100644 index 00000000..6d65c6bd Binary files /dev/null and b/tests/test_000928_f.mp4 differ diff --git a/tests/test_000928_s.mp4 b/tests/test_000928_s.mp4 new file mode 100644 index 00000000..89b4cbef Binary files /dev/null and b/tests/test_000928_s.mp4 differ diff --git a/tests/test_000929.iamf b/tests/test_000929.iamf new file mode 100644 index 00000000..6497b387 Binary files /dev/null and b/tests/test_000929.iamf differ diff --git a/tests/test_000929.textproto b/tests/test_000929.textproto new file mode 100644 index 00000000..990ba231 --- /dev/null +++ b/tests/test_000929.textproto @@ -0,0 +1,309 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Top-5ch Layout, one 1st Order Ambisonics and two Dual Polar Objects." + file_name_prefix: "test_000929" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/expanded_loudspeaker_layout Top-5ch", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0, 1, 2] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 3 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_5_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103] + 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_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 30 + default_first_elevation: 0 + default_first_distance: 127 + default_second_azimuth: -30 + default_second_elevation: 0 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 120 + default_first_elevation: 0 + default_first_distance: 64 + default_second_azimuth: -120 + default_second_elevation: 0 + default_second_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000929_f.mp4 b/tests/test_000929_f.mp4 new file mode 100644 index 00000000..6362d761 Binary files /dev/null and b/tests/test_000929_f.mp4 differ diff --git a/tests/test_000929_s.mp4 b/tests/test_000929_s.mp4 new file mode 100644 index 00000000..d4b2a581 Binary files /dev/null and b/tests/test_000929_s.mp4 differ diff --git a/tests/test_000930.iamf b/tests/test_000930.iamf new file mode 100644 index 00000000..9f14f717 Binary files /dev/null and b/tests/test_000930.iamf differ diff --git a/tests/test_000930.textproto b/tests/test_000930.textproto new file mode 100644 index 00000000..a67fa469 --- /dev/null +++ b/tests/test_000930.textproto @@ -0,0 +1,310 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo Layout, one 2nd Order Ambisonics and two Dual Polar Objects." + file_name_prefix: "test_000930" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/loudspeaker_layout Stereo", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 9 + substream_count: 9 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 30 + default_first_elevation: 0 + default_first_distance: 127 + default_second_azimuth: -30 + default_second_elevation: 0 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 120 + default_first_elevation: 0 + default_first_distance: 64 + default_second_azimuth: -120 + default_second_elevation: 0 + default_second_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000930_f.mp4 b/tests/test_000930_f.mp4 new file mode 100644 index 00000000..0be57345 Binary files /dev/null and b/tests/test_000930_f.mp4 differ diff --git a/tests/test_000930_s.mp4 b/tests/test_000930_s.mp4 new file mode 100644 index 00000000..50a4317c Binary files /dev/null and b/tests/test_000930_s.mp4 differ diff --git a/tests/test_000931.iamf b/tests/test_000931.iamf new file mode 100644 index 00000000..67c52a48 Binary files /dev/null and b/tests/test_000931.iamf differ diff --git a/tests/test_000931.textproto b/tests/test_000931.textproto new file mode 100644 index 00000000..5e3fe0c6 --- /dev/null +++ b/tests/test_000931.textproto @@ -0,0 +1,309 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: "An Advanced-1 Profile Stream using a Stereo Layout, one 2nd Order Ambisonics and two Dual Polar Objects." + file_name_prefix: "test_000931" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-12 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.1/loudspeaker_layout Stereo", + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config", + "3.7.2.2/rendering_config with dual_polar_param_definition" + ] + base_test: "test_000924" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED1 + additional_profile: PROFILE_VERSION_ADVANCED1 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 9 + substream_count: 9 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements: [ + { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 30 + default_first_elevation: 0 + default_first_distance: 127 + default_second_azimuth: -30 + default_second_elevation: 0 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + }, + { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 120 + default_first_elevation: 0 + default_first_distance: 64 + default_second_azimuth: -120 + default_second_elevation: 0 + default_second_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + ] + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_000931_f.mp4 b/tests/test_000931_f.mp4 new file mode 100644 index 00000000..1306aa32 Binary files /dev/null and b/tests/test_000931_f.mp4 differ diff --git a/tests/test_000931_rendered_binaural.wav b/tests/test_000931_rendered_binaural.wav new file mode 100644 index 00000000..cedc31c1 Binary files /dev/null and b/tests/test_000931_rendered_binaural.wav differ diff --git a/tests/test_000931_s.mp4 b/tests/test_000931_s.mp4 new file mode 100644 index 00000000..ce089b05 Binary files /dev/null and b/tests/test_000931_s.mp4 differ diff --git a/tests/test_001000.iamf b/tests/test_001000.iamf new file mode 100644 index 00000000..e6191af0 Binary files /dev/null and b/tests/test_001000.iamf differ diff --git a/tests/test_001000.textproto b/tests/test_001000.textproto new file mode 100644 index 00000000..c80f5179 --- /dev/null +++ b/tests/test_001000.textproto @@ -0,0 +1,366 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 9.1.6 Expanded Layout with " + "several Mono Polar Objects." + file_name_prefix: "test_001000" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 9.1.6ch" + ] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 9 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_9_1_6_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [400] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 126 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_12_0_1_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_9.1.6_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 9 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 10 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 11 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_SI_R } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001000_f.mp4 b/tests/test_001000_f.mp4 new file mode 100644 index 00000000..6a6ef89d Binary files /dev/null and b/tests/test_001000_f.mp4 differ diff --git a/tests/test_001000_s.mp4 b/tests/test_001000_s.mp4 new file mode 100644 index 00000000..07bde016 Binary files /dev/null and b/tests/test_001000_s.mp4 differ diff --git a/tests/test_001001.iamf b/tests/test_001001.iamf new file mode 100644 index 00000000..594de10c Binary files /dev/null and b/tests/test_001001.iamf differ diff --git a/tests/test_001001.textproto b/tests/test_001001.textproto new file mode 100644 index 00000000..bf11fb1f --- /dev/null +++ b/tests/test_001001.textproto @@ -0,0 +1,263 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 7.1.5.4 Expanded Layout with " + "several Polar Objects." + file_name_prefix: "test_001001" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 7.1.5.4ch" + ] + base_test: "test_001000" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 10 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 127 + default_second_azimuth: 180 + default_second_elevation: 3 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 180 + default_first_elevation: 3 + default_first_distance: 127 + default_second_azimuth: 1 + default_second_elevation: 2 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 13 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 14 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 15 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 16 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001001_f.mp4 b/tests/test_001001_f.mp4 new file mode 100644 index 00000000..0e501fa8 Binary files /dev/null and b/tests/test_001001_f.mp4 differ diff --git a/tests/test_001001_s.mp4 b/tests/test_001001_s.mp4 new file mode 100644 index 00000000..008613dd Binary files /dev/null and b/tests/test_001001_s.mp4 differ diff --git a/tests/test_001002.iamf b/tests/test_001002.iamf new file mode 100644 index 00000000..06b5a731 Binary files /dev/null and b/tests/test_001002.iamf differ diff --git a/tests/test_001002.textproto b/tests/test_001002.textproto new file mode 100644 index 00000000..576adf2c --- /dev/null +++ b/tests/test_001002.textproto @@ -0,0 +1,328 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3 Expanded Layout with " + "several Polar Objects." + file_name_prefix: "test_001002" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_001000" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 127 + default_second_azimuth: 180 + default_second_elevation: 3 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_11_2_3_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001002_f.mp4 b/tests/test_001002_f.mp4 new file mode 100644 index 00000000..723123fa Binary files /dev/null and b/tests/test_001002_f.mp4 differ diff --git a/tests/test_001002_s.mp4 b/tests/test_001002_s.mp4 new file mode 100644 index 00000000..ab280f02 Binary files /dev/null and b/tests/test_001002_s.mp4 differ diff --git a/tests/test_001003.iamf b/tests/test_001003.iamf new file mode 100644 index 00000000..2fb7aa7b Binary files /dev/null and b/tests/test_001003.iamf differ diff --git a/tests/test_001003.textproto b/tests/test_001003.textproto new file mode 100644 index 00000000..12ea211b --- /dev/null +++ b/tests/test_001003.textproto @@ -0,0 +1,359 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a third-order ambisonics with several " + "Mono Polar Objects." + file_name_prefix: "test_001003" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config" + ] + base_test: "test_001000" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 16 + substream_count: 16 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [400] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 3 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 4 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 9 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 6 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001003_f.mp4 b/tests/test_001003_f.mp4 new file mode 100644 index 00000000..06d007b2 Binary files /dev/null and b/tests/test_001003_f.mp4 differ diff --git a/tests/test_001003_s.mp4 b/tests/test_001003_s.mp4 new file mode 100644 index 00000000..e3234611 Binary files /dev/null and b/tests/test_001003_s.mp4 differ diff --git a/tests/test_001004.iamf b/tests/test_001004.iamf new file mode 100644 index 00000000..681e829b Binary files /dev/null and b/tests/test_001004.iamf differ diff --git a/tests/test_001004.textproto b/tests/test_001004.textproto new file mode 100644 index 00000000..6105488b --- /dev/null +++ b/tests/test_001004.textproto @@ -0,0 +1,318 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a fourth-order ambisonics with " + "several Mono Polar Objects to reach the 28-channel limit." + file_name_prefix: "test_001004" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_mono_config", + "3.6.4/objects_config" + ] + base_test: "test_001003" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 25 + substream_count: 25 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_C_2_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 }, + { channel_id: 16 channel_label: CHANNEL_LABEL_A_16 }, + { channel_id: 17 channel_label: CHANNEL_LABEL_A_17 }, + { channel_id: 18 channel_label: CHANNEL_LABEL_A_18 }, + { channel_id: 19 channel_label: CHANNEL_LABEL_A_19 }, + { channel_id: 20 channel_label: CHANNEL_LABEL_A_20 }, + { channel_id: 21 channel_label: CHANNEL_LABEL_A_21 }, + { channel_id: 22 channel_label: CHANNEL_LABEL_A_22 }, + { channel_id: 23 channel_label: CHANNEL_LABEL_A_23 }, + { channel_id: 24 channel_label: CHANNEL_LABEL_A_24 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001004_f.mp4 b/tests/test_001004_f.mp4 new file mode 100644 index 00000000..d0017d05 Binary files /dev/null and b/tests/test_001004_f.mp4 differ diff --git a/tests/test_001004_s.mp4 b/tests/test_001004_s.mp4 new file mode 100644 index 00000000..4408a179 Binary files /dev/null and b/tests/test_001004_s.mp4 differ diff --git a/tests/test_001005.iamf b/tests/test_001005.iamf new file mode 100644 index 00000000..fcbf0fa4 Binary files /dev/null and b/tests/test_001005.iamf differ diff --git a/tests/test_001005.textproto b/tests/test_001005.textproto new file mode 100644 index 00000000..6ed014a1 --- /dev/null +++ b/tests/test_001005.textproto @@ -0,0 +1,287 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a third-order ambisonics with several " + "Dual Polar Objects." + file_name_prefix: "test_001005" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-17 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_projection_config", + "3.6.4/objects_config" + ] + base_test: "test_001003" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 16 + substream_count: 16 + coupled_substream_count: 0 +# txtpbfmt: off + demixing_matrix: [ + 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 0 + 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 1 + 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 2 + 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 3 + 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 4 + 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 5 + 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 6 + 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, # col 7 + 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, # col 8 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, # col 9 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, # col 10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, # col 11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, # col 12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, # col 13 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, # col 14 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767 # col 15 + ] +# txtpbfmt: on + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 45 + default_first_elevation: 30 + default_first_distance: 127 + default_second_azimuth: -45 + default_second_elevation: 30 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 30 + default_first_elevation: 30 + default_first_distance: 127 + default_second_azimuth: -30 + default_second_elevation: 30 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_D_4_5_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001005_f.mp4 b/tests/test_001005_f.mp4 new file mode 100644 index 00000000..93bf0ada Binary files /dev/null and b/tests/test_001005_f.mp4 differ diff --git a/tests/test_001005_s.mp4 b/tests/test_001005_s.mp4 new file mode 100644 index 00000000..8566086b Binary files /dev/null and b/tests/test_001005_s.mp4 differ diff --git a/tests/test_001006.iamf b/tests/test_001006.iamf new file mode 100644 index 00000000..49247e66 Binary files /dev/null and b/tests/test_001006.iamf differ diff --git a/tests/test_001006.textproto b/tests/test_001006.textproto new file mode 100644 index 00000000..60b0181b --- /dev/null +++ b/tests/test_001006.textproto @@ -0,0 +1,300 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 4th-order ambisonics with Mono and " + "Dual Polar Objects." + file_name_prefix: "test_001006" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-17 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.3/ambisonics_projection_config", + "3.6.4/objects_config" + ] + base_test: "test_001005" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 25 + substream_count: 25 + coupled_substream_count: 0 +# txtpbfmt: off + demixing_matrix: [ + 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 0 + 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 1 + 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 2 + 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 3 + 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 4 + 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 5 + 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 6 + 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 7 + 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 8 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 9 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 13 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 14 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, # col 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, 0, # col 16 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, 0, # col 17 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, 0, # col 18 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, 0, # col 19 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, 0, # col 20 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, 0, # col 21 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 0, # col 22 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, # col 23 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767 # col 24 + ] +# txtpbfmt: on + } + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 45 + default_first_elevation: 30 + default_first_distance: 127 + default_second_azimuth: -45 + default_second_elevation: 30 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 30 + default_elevation: 30 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_I_0_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 }, + { channel_id: 16 channel_label: CHANNEL_LABEL_A_16 }, + { channel_id: 17 channel_label: CHANNEL_LABEL_A_17 }, + { channel_id: 18 channel_label: CHANNEL_LABEL_A_18 }, + { channel_id: 19 channel_label: CHANNEL_LABEL_A_19 }, + { channel_id: 20 channel_label: CHANNEL_LABEL_A_20 }, + { channel_id: 21 channel_label: CHANNEL_LABEL_A_21 }, + { channel_id: 22 channel_label: CHANNEL_LABEL_A_22 }, + { channel_id: 23 channel_label: CHANNEL_LABEL_A_23 }, + { channel_id: 24 channel_label: CHANNEL_LABEL_A_24 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001006_f.mp4 b/tests/test_001006_f.mp4 new file mode 100644 index 00000000..05c38013 Binary files /dev/null and b/tests/test_001006_f.mp4 differ diff --git a/tests/test_001006_s.mp4 b/tests/test_001006_s.mp4 new file mode 100644 index 00000000..55db5393 Binary files /dev/null and b/tests/test_001006_s.mp4 differ diff --git a/tests/test_001007.iamf b/tests/test_001007.iamf new file mode 100644 index 00000000..5ab79a7c Binary files /dev/null and b/tests/test_001007.iamf differ diff --git a/tests/test_001007.textproto b/tests/test_001007.textproto new file mode 100644 index 00000000..f88265a8 --- /dev/null +++ b/tests/test_001007.textproto @@ -0,0 +1,408 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 9.1.6 Expanded Layout mixed with " + "zeroth-order ambisonics and several Mono Polar Objects." + file_name_prefix: "test_001007" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 9.1.6ch" + ] + base_test: "test_001000" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 9 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_9_1_6_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [400] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [500] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 126 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_9.1.6_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 9 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 10 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 11 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_SI_R } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001007_f.mp4 b/tests/test_001007_f.mp4 new file mode 100644 index 00000000..c256f275 Binary files /dev/null and b/tests/test_001007_f.mp4 differ diff --git a/tests/test_001007_s.mp4 b/tests/test_001007_s.mp4 new file mode 100644 index 00000000..e76bde1a Binary files /dev/null and b/tests/test_001007_s.mp4 differ diff --git a/tests/test_001008.iamf b/tests/test_001008.iamf new file mode 100644 index 00000000..0d8eb2f3 Binary files /dev/null and b/tests/test_001008.iamf differ diff --git a/tests/test_001008.textproto b/tests/test_001008.textproto new file mode 100644 index 00000000..7670fd07 --- /dev/null +++ b/tests/test_001008.textproto @@ -0,0 +1,412 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 7.1.5.4 Expanded Layout with " + "first-order ambisonics and several Mono Polar Objects." + file_name_prefix: "test_001008" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 7.1.5.4ch" + ] + base_test: "test_001001" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 10 + coupled_substream_count: 7 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_7_1_5_4_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103] + 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_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [304] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [305] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition: { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 13 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 14 channel_label: CHANNEL_LABEL_BT_FR }, + { channel_id: 15 channel_label: CHANNEL_LABEL_BT_BL }, + { channel_id: 16 channel_label: CHANNEL_LABEL_BT_BR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001008_f.mp4 b/tests/test_001008_f.mp4 new file mode 100644 index 00000000..7d72d0d5 Binary files /dev/null and b/tests/test_001008_f.mp4 differ diff --git a/tests/test_001008_s.mp4 b/tests/test_001008_s.mp4 new file mode 100644 index 00000000..95b53272 Binary files /dev/null and b/tests/test_001008_s.mp4 differ diff --git a/tests/test_001009.iamf b/tests/test_001009.iamf new file mode 100644 index 00000000..3c066241 Binary files /dev/null and b/tests/test_001009.iamf differ diff --git a/tests/test_001009.textproto b/tests/test_001009.textproto new file mode 100644 index 00000000..862ae050 --- /dev/null +++ b/tests/test_001009.textproto @@ -0,0 +1,410 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 7.1.4 Expanded Layout mixed with " + "second-order ambisonics and several Mono Polar Objects." + file_name_prefix: "test_001009" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == 7.1.4ch" + ] + base_test: "test_001000" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_7_1_4_CH + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 7 + coupled_substream_count: 5 + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 9 + substream_count: 9 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [400] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [500] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_azimuth: 180 + default_elevation: 3 + default_distance: 126 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 90 + default_elevation: 8 + default_distance: 64 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_azimuth: 75 + default_elevation: 45 + default_distance: 127 + } + } + } + element_mix_gain { + param_definition: { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition: { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_7 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_7 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_CENTRE }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_LSS_7 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_RSS_7 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_LRS_7 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_RRS_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001009_f.mp4 b/tests/test_001009_f.mp4 new file mode 100644 index 00000000..c1150c1d Binary files /dev/null and b/tests/test_001009_f.mp4 differ diff --git a/tests/test_001009_s.mp4 b/tests/test_001009_s.mp4 new file mode 100644 index 00000000..0a798c17 Binary files /dev/null and b/tests/test_001009_s.mp4 differ diff --git a/tests/test_001010.iamf b/tests/test_001010.iamf new file mode 100644 index 00000000..ff072cc5 Binary files /dev/null and b/tests/test_001010.iamf differ diff --git a/tests/test_001010.textproto b/tests/test_001010.textproto new file mode 100644 index 00000000..9720a894 --- /dev/null +++ b/tests/test_001010.textproto @@ -0,0 +1,315 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a stereo layout mixed with " + "third-order ambisonics and several Dual Polar Objects." + file_name_prefix: "test_001010" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == stereo" + ] + base_test: "test_001000" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 16 + substream_count: 16 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 127 + default_second_azimuth: 180 + default_second_elevation: 3 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 180 + default_first_elevation: 3 + default_first_distance: 127 + default_second_azimuth: 1 + default_second_elevation: 2 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001010_f.mp4 b/tests/test_001010_f.mp4 new file mode 100644 index 00000000..56a8d760 Binary files /dev/null and b/tests/test_001010_f.mp4 differ diff --git a/tests/test_001010_s.mp4 b/tests/test_001010_s.mp4 new file mode 100644 index 00000000..2140f234 Binary files /dev/null and b/tests/test_001010_s.mp4 differ diff --git a/tests/test_001011.iamf b/tests/test_001011.iamf new file mode 100644 index 00000000..6a239ab6 Binary files /dev/null and b/tests/test_001011.iamf differ diff --git a/tests/test_001011.textproto b/tests/test_001011.textproto new file mode 100644 index 00000000..03af1d4e --- /dev/null +++ b/tests/test_001011.textproto @@ -0,0 +1,315 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a stereo layout mixed with " + "third-order ambisonics and several Dual Polar Objects." + file_name_prefix: "test_001011" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.6.2/loudspeaker_layout == stereo" + ] + base_test: "test_001010" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 16 + substream_count: 16 + channel_mapping: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + } + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [200] + objects_config { + num_objects: 2 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [300] + objects_config { + num_objects: 2 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 1 + default_first_elevation: 2 + default_first_distance: 127 + default_second_azimuth: 180 + default_second_elevation: 3 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_DUAL_POLAR + dual_polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_first_azimuth: 180 + default_first_elevation: 3 + default_first_distance: 127 + default_second_azimuth: 1 + default_second_elevation: 2 + default_second_distance: 127 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 }, + { channel_id: 4 channel_label: CHANNEL_LABEL_A_4 }, + { channel_id: 5 channel_label: CHANNEL_LABEL_A_5 }, + { channel_id: 6 channel_label: CHANNEL_LABEL_A_6 }, + { channel_id: 7 channel_label: CHANNEL_LABEL_A_7 }, + { channel_id: 8 channel_label: CHANNEL_LABEL_A_8 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_A_9 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_A_10 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_A_11 }, + { channel_id: 12 channel_label: CHANNEL_LABEL_A_12 }, + { channel_id: 13 channel_label: CHANNEL_LABEL_A_13 }, + { channel_id: 14 channel_label: CHANNEL_LABEL_A_14 }, + { channel_id: 15 channel_label: CHANNEL_LABEL_A_15 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL1 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001011_f.mp4 b/tests/test_001011_f.mp4 new file mode 100644 index 00000000..e6a8f2ac Binary files /dev/null and b/tests/test_001011_f.mp4 differ diff --git a/tests/test_001011_s.mp4 b/tests/test_001011_s.mp4 new file mode 100644 index 00000000..acf8dce0 Binary files /dev/null and b/tests/test_001011_s.mp4 differ diff --git a/tests/test_001012.iamf b/tests/test_001012.iamf new file mode 100644 index 00000000..51c86e68 Binary files /dev/null and b/tests/test_001012.iamf differ diff --git a/tests/test_001012.textproto b/tests/test_001012.textproto new file mode 100644 index 00000000..c3a6cc10 --- /dev/null +++ b/tests/test_001012.textproto @@ -0,0 +1,1517 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream with twenty-eight Mono Polar " + "Objects." + file_name_prefix: "test_001012" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.4/objects_config", + "3.7.1/rendering_config_ with param_definition_polar" + ] + base_test: "test_000803" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [0] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [1] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 302 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [2] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 303 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [3] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 304 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [4] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 305 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [5] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 306 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [6] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 307 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [7] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 308 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [8] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 309 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [9] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 310 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [10] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 311 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [11] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 312 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [12] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 313 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [13] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 314 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [14] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 315 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [15] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 316 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 317 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [17] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 318 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [18] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 319 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [19] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 320 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [20] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 321 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [21] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 322 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [22] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 323 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [23] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 324 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [24] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 325 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [25] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 326 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [26] + objects_config { + num_objects: 1 + } +} + +audio_element_metadata { + audio_element_id: 327 + audio_element_type: AUDIO_ELEMENT_OBJECT_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [27] + objects_config { + num_objects: 1 + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 1 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 2 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 102 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + + audio_elements { + audio_element_id: 302 + localized_element_annotations: ["test_sub_mix_0_audio_element_2"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 3 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 104 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 303 + localized_element_annotations: ["test_sub_mix_0_audio_element_3"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 4 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 105 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 304 + localized_element_annotations: ["test_sub_mix_0_audio_element_4"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 5 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 106 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 305 + localized_element_annotations: ["test_sub_mix_0_audio_element_5"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 6 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 107 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 306 + localized_element_annotations: ["test_sub_mix_0_audio_element_6"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 7 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 108 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 307 + localized_element_annotations: ["test_sub_mix_0_audio_element_7"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 8 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 109 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 308 + localized_element_annotations: ["test_sub_mix_0_audio_element_8"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 9 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 110 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 309 + localized_element_annotations: ["test_sub_mix_0_audio_element_9"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 10 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 111 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 310 + localized_element_annotations: ["test_sub_mix_0_audio_element_10"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 11 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 112 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 311 + localized_element_annotations: ["test_sub_mix_0_audio_element_11"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 12 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 113 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 312 + localized_element_annotations: ["test_sub_mix_0_audio_element_12"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 13 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 114 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 313 + localized_element_annotations: ["test_sub_mix_0_audio_element_13"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 14 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 115 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 314 + localized_element_annotations: ["test_sub_mix_0_audio_element_14"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 15 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 116 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 315 + localized_element_annotations: ["test_sub_mix_0_audio_element_15"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 16 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 117 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 316 + localized_element_annotations: ["test_sub_mix_0_audio_element_16"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 17 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 118 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 317 + localized_element_annotations: ["test_sub_mix_0_audio_element_17"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 18 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 119 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 318 + localized_element_annotations: ["test_sub_mix_0_audio_element_18"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 19 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 120 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 319 + localized_element_annotations: ["test_sub_mix_0_audio_element_19"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 20 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 121 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 320 + localized_element_annotations: ["test_sub_mix_0_audio_element_20"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 21 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 122 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 321 + localized_element_annotations: ["test_sub_mix_0_audio_element_21"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 22 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 123 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 322 + localized_element_annotations: ["test_sub_mix_0_audio_element_22"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 23 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 124 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 323 + localized_element_annotations: ["test_sub_mix_0_audio_element_23"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 24 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 125 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 324 + localized_element_annotations: ["test_sub_mix_0_audio_element_24"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 25 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 126 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 325 + localized_element_annotations: ["test_sub_mix_0_audio_element_25"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 26 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 127 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 326 + localized_element_annotations: ["test_sub_mix_0_audio_element_26"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 27 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 128 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + audio_elements { + audio_element_id: 327 + localized_element_annotations: ["test_sub_mix_0_audio_element_27"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + rendering_config_param_definitions { + param_definition_type: PARAM_DEFINITION_TYPE_POLAR + polar_param_definition { + param_definition { + parameter_id: 28 + parameter_rate: 48000 + param_definition_mode: 1 + } + default_azimuth: 1 + default_elevation: 2 + default_distance: 125 + } + } + } + element_mix_gain { + param_definition { + parameter_id: 129 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 + } + } + + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 302 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 303 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 304 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 305 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 306 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 307 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 308 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 309 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 310 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 311 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 312 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 313 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 314 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 315 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 316 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 317 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 318 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 319 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 320 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 321 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 322 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 323 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 324 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 325 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 326 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 327 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_OBJECT_CHANNEL0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001012_f.mp4 b/tests/test_001012_f.mp4 new file mode 100644 index 00000000..6a1d4b15 Binary files /dev/null and b/tests/test_001012_f.mp4 differ diff --git a/tests/test_001012_s.mp4 b/tests/test_001012_s.mp4 new file mode 100644 index 00000000..ef207f5b Binary files /dev/null and b/tests/test_001012_s.mp4 differ diff --git a/tests/test_001013.iamf b/tests/test_001013.iamf new file mode 100644 index 00000000..7fb97be1 Binary files /dev/null and b/tests/test_001013.iamf differ diff --git a/tests/test_001013.textproto b/tests/test_001013.textproto new file mode 100644 index 00000000..3ab27ae1 --- /dev/null +++ b/tests/test_001013.textproto @@ -0,0 +1,174 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout and a Binaural output layout." + file_name_prefix: "test_001013" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-06 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -3072 # -12 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -2476 + digital_peak: -2478 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout: { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001013_f.mp4 b/tests/test_001013_f.mp4 new file mode 100644 index 00000000..707002e7 Binary files /dev/null and b/tests/test_001013_f.mp4 differ diff --git a/tests/test_001013_rendered_binaural.wav b/tests/test_001013_rendered_binaural.wav new file mode 100644 index 00000000..64ce98cd Binary files /dev/null and b/tests/test_001013_rendered_binaural.wav differ diff --git a/tests/test_001013_s.mp4 b/tests/test_001013_s.mp4 new file mode 100644 index 00000000..4deed424 Binary files /dev/null and b/tests/test_001013_s.mp4 differ diff --git a/tests/test_001014.iamf b/tests/test_001014.iamf new file mode 100644 index 00000000..0e46f77e Binary files /dev/null and b/tests/test_001014.iamf differ diff --git a/tests/test_001014.textproto b/tests/test_001014.textproto new file mode 100644 index 00000000..bcb47f22 --- /dev/null +++ b/tests/test_001014.textproto @@ -0,0 +1,224 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout mixed with a Mono layout." + file_name_prefix: "test_001014" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-06 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -169 + digital_peak: 410 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_I_0_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -1082 + digital_peak: -897 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_MONO } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001014_f.mp4 b/tests/test_001014_f.mp4 new file mode 100644 index 00000000..97d97b12 Binary files /dev/null and b/tests/test_001014_f.mp4 differ diff --git a/tests/test_001014_s.mp4 b/tests/test_001014_s.mp4 new file mode 100644 index 00000000..2335ebaf Binary files /dev/null and b/tests/test_001014_s.mp4 differ diff --git a/tests/test_001015.iamf b/tests/test_001015.iamf new file mode 100644 index 00000000..35a87810 Binary files /dev/null and b/tests/test_001015.iamf differ diff --git a/tests/test_001015.textproto b/tests/test_001015.textproto new file mode 100644 index 00000000..1ad39aee --- /dev/null +++ b/tests/test_001015.textproto @@ -0,0 +1,225 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout mixed with a Stereo layout." + file_name_prefix: "test_001015" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-06 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -167 + digital_peak: 619 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_10_2_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -1243 + digital_peak: -985 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001015_f.mp4 b/tests/test_001015_f.mp4 new file mode 100644 index 00000000..34d8d13d Binary files /dev/null and b/tests/test_001015_f.mp4 differ diff --git a/tests/test_001015_s.mp4 b/tests/test_001015_s.mp4 new file mode 100644 index 00000000..3f1064a2 Binary files /dev/null and b/tests/test_001015_s.mp4 differ diff --git a/tests/test_001016.iamf b/tests/test_001016.iamf new file mode 100644 index 00000000..6f8b5836 Binary files /dev/null and b/tests/test_001016.iamf differ diff --git a/tests/test_001016.textproto b/tests/test_001016.textproto new file mode 100644 index 00000000..73047911 --- /dev/null +++ b/tests/test_001016.textproto @@ -0,0 +1,228 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout." + file_name_prefix: "test_001016" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-05 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_CHANNEL_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16, 17] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 2 + coupled_substream_count: 2 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_TOP_4_CH + } + ] + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -168 + digital_peak: 980 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_J_4_7_0 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -1478 + digital_peak: -836 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Mechanism_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 8 channel_label: CHANNEL_LABEL_LTF_4 }, + { channel_id: 9 channel_label: CHANNEL_LABEL_RTF_4 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_LTB_4 }, + { channel_id: 11 channel_label: CHANNEL_LABEL_RTB_4 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001016_f.mp4 b/tests/test_001016_f.mp4 new file mode 100644 index 00000000..2022dd46 Binary files /dev/null and b/tests/test_001016_f.mp4 differ diff --git a/tests/test_001016_s.mp4 b/tests/test_001016_s.mp4 new file mode 100644 index 00000000..f488a12a Binary files /dev/null and b/tests/test_001016_s.mp4 differ diff --git a/tests/test_001017.iamf b/tests/test_001017.iamf new file mode 100644 index 00000000..8040d2f7 Binary files /dev/null and b/tests/test_001017.iamf differ diff --git a/tests/test_001017.textproto b/tests/test_001017.textproto new file mode 100644 index 00000000..f0b0b94c --- /dev/null +++ b/tests/test_001017.textproto @@ -0,0 +1,219 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout mixed with a zeroth order Ambisonics." + file_name_prefix: "test_001017" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-06 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 1 + substream_count: 1 + channel_mapping: [0] + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -126 + digital_peak: 787 + } + } + 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: -1523 + digital_peak: -1267 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001017_f.mp4 b/tests/test_001017_f.mp4 new file mode 100644 index 00000000..85edda7e Binary files /dev/null and b/tests/test_001017_f.mp4 differ diff --git a/tests/test_001017_s.mp4 b/tests/test_001017_s.mp4 new file mode 100644 index 00000000..0857feb7 Binary files /dev/null and b/tests/test_001017_s.mp4 differ diff --git a/tests/test_001018.iamf b/tests/test_001018.iamf new file mode 100644 index 00000000..13063673 Binary files /dev/null and b/tests/test_001018.iamf differ diff --git a/tests/test_001018.textproto b/tests/test_001018.textproto new file mode 100644 index 00000000..da3dda90 --- /dev/null +++ b/tests/test_001018.textproto @@ -0,0 +1,222 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout." + file_name_prefix: "test_001018" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2025-12-09 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch", + "4.2/Advanced-2 Profile" + ] + base_test: "test_001016" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16, 17, 18, 19] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_MONO + ambisonics_mono_config { + output_channel_count: 4 + substream_count: 4 + channel_mapping: [0, 1, 2, 3] + } + } +} +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -130 + digital_peak: 1107 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_14_5_7_4 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -1702 + digital_peak: -1499 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + wav_filename: "Transport_TOA_5s.wav" + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001018_f.mp4 b/tests/test_001018_f.mp4 new file mode 100644 index 00000000..a5f01165 Binary files /dev/null and b/tests/test_001018_f.mp4 differ diff --git a/tests/test_001018_s.mp4 b/tests/test_001018_s.mp4 new file mode 100644 index 00000000..496e8e7a Binary files /dev/null and b/tests/test_001018_s.mp4 differ diff --git a/tests/test_001019.iamf b/tests/test_001019.iamf new file mode 100644 index 00000000..3bd5b3e0 Binary files /dev/null and b/tests/test_001019.iamf differ diff --git a/tests/test_001019.textproto b/tests/test_001019.textproto new file mode 100644 index 00000000..caec32cf --- /dev/null +++ b/tests/test_001019.textproto @@ -0,0 +1,230 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "An Advanced-2 Profile Stream using a 10.2.9.3ch Expanded " + "Layout mixed with a first order Ambisonics." + file_name_prefix: "test_001019" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-06 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.6.2/loudspeaker_layout == Expanded", + "3.6.2/expanded_loudspeaker_layout == 10.2.9.3ch" + ] + base_test: "test_000845" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_ADVANCED2 + additional_profile: PROFILE_VERSION_ADVANCED2 +} + +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 + audio_substream_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + scalable_channel_layout_config { + reserved: 0 + channel_audio_layer_configs: [ + { + loudspeaker_layout: LOUDSPEAKER_LAYOUT_EXPANDED + output_gain_is_present_flag: 0 + recon_gain_is_present_flag: 0 + reserved_a: 0 + substream_count: 16 + coupled_substream_count: 8 + expanded_loudspeaker_layout: EXPANDED_LOUDSPEAKER_LAYOUT_10_2_9_3_CH + } + ] + } +} + +audio_element_metadata { + audio_element_id: 301 + audio_element_type: AUDIO_ELEMENT_SCENE_BASED + reserved: 0 + codec_config_id: 200 + audio_substream_ids: [16, 17] + ambisonics_config { + ambisonics_mode: AMBISONICS_MODE_PROJECTION + ambisonics_projection_config { + output_channel_count: 4 + substream_count: 2 + coupled_substream_count: 2 +# txtpbfmt: off + 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 + ] +# txtpbfmt: on + } + } +} + +mix_presentation_metadata { + mix_presentation_id: 42 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + audio_elements { + audio_element_id: 301 + localized_element_annotations: ["test_sub_mix_0_audio_element_1"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_STEREO + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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: -130 + digital_peak: 1107 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION + ss_layout { + sound_system: SOUND_SYSTEM_H_9_10_3 + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -2453 + digital_peak: -1829 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "sine_1000_4oa_48khz.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_FL }, + { channel_id: 1 channel_label: CHANNEL_LABEL_FR }, + { channel_id: 2 channel_label: CHANNEL_LABEL_FC }, + { channel_id: 3 channel_label: CHANNEL_LABEL_LFE }, + { channel_id: 4 channel_label: CHANNEL_LABEL_BL }, + { channel_id: 5 channel_label: CHANNEL_LABEL_BR }, + { channel_id: 6 channel_label: CHANNEL_LABEL_FLC }, + { channel_id: 7 channel_label: CHANNEL_LABEL_FRC }, + { channel_id: 8 channel_label: CHANNEL_LABEL_BC }, + { channel_id: 9 channel_label: CHANNEL_LABEL_LFE2 }, + { channel_id: 10 channel_label: CHANNEL_LABEL_SI_L }, + { channel_id: 11 channel_label: CHANNEL_LABEL_SI_R }, + { channel_id: 12 channel_label: CHANNEL_LABEL_TP_FL }, + { channel_id: 13 channel_label: CHANNEL_LABEL_TP_FR }, + { channel_id: 14 channel_label: CHANNEL_LABEL_TP_FC }, + { channel_id: 15 channel_label: CHANNEL_LABEL_TP_C }, + { channel_id: 16 channel_label: CHANNEL_LABEL_TP_BL }, + { channel_id: 17 channel_label: CHANNEL_LABEL_TP_BR }, + { channel_id: 18 channel_label: CHANNEL_LABEL_TP_SI_L }, + { channel_id: 19 channel_label: CHANNEL_LABEL_TP_SI_R }, + { channel_id: 20 channel_label: CHANNEL_LABEL_TP_BC }, + { channel_id: 21 channel_label: CHANNEL_LABEL_BT_FC }, + { channel_id: 22 channel_label: CHANNEL_LABEL_BT_FL }, + { channel_id: 23 channel_label: CHANNEL_LABEL_BT_FR } + ] +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "Transport_TOA_5s.wav" + audio_element_id: 301 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_A_0 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_A_1 }, + { channel_id: 2 channel_label: CHANNEL_LABEL_A_2 }, + { channel_id: 3 channel_label: CHANNEL_LABEL_A_3 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001019_f.mp4 b/tests/test_001019_f.mp4 new file mode 100644 index 00000000..df83196e Binary files /dev/null and b/tests/test_001019_f.mp4 differ diff --git a/tests/test_001019_s.mp4 b/tests/test_001019_s.mp4 new file mode 100644 index 00000000..0dd0f990 Binary files /dev/null and b/tests/test_001019_s.mp4 differ diff --git a/tests/test_001100.iamf b/tests/test_001100.iamf new file mode 100644 index 00000000..f84b68d4 Binary files /dev/null and b/tests/test_001100.iamf differ diff --git a/tests/test_001100.textproto b/tests/test_001100.textproto new file mode 100644 index 00000000..31268564 --- /dev/null +++ b/tests/test_001100.textproto @@ -0,0 +1,153 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Stereo layout and " + "a Binaural output layout." + file_name_prefix: "test_001100" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-13 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/headphones_rendering_mode == 2", + "3.7.5/layout_type == BINAURAL" + ] + base_test: "test_000827" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_HEAD_LOCKED + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout: { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -6481 + digital_peak: -2560 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001100_f.mp4 b/tests/test_001100_f.mp4 new file mode 100644 index 00000000..e7d655a2 Binary files /dev/null and b/tests/test_001100_f.mp4 differ diff --git a/tests/test_001100_rendered_binaural.wav b/tests/test_001100_rendered_binaural.wav new file mode 100644 index 00000000..29f4b500 Binary files /dev/null and b/tests/test_001100_rendered_binaural.wav differ diff --git a/tests/test_001100_s.mp4 b/tests/test_001100_s.mp4 new file mode 100644 index 00000000..48d2738d Binary files /dev/null and b/tests/test_001100_s.mp4 differ diff --git a/tests/test_001101.iamf b/tests/test_001101.iamf new file mode 100644 index 00000000..4c873e90 Binary files /dev/null and b/tests/test_001101.iamf differ diff --git a/tests/test_001101.textproto b/tests/test_001101.textproto new file mode 100644 index 00000000..a6cdde23 --- /dev/null +++ b/tests/test_001101.textproto @@ -0,0 +1,155 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Stereo layout and " + "a Binaural output layout." + file_name_prefix: "test_001101" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-19 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/headphones_rendering_mode == 1", + "3.7.1/binaural_filter_profile == DIRECT", + "3.7.5/layout_type == BINAURAL" + ] + base_test: "test_001100" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + binaural_filter_profile: BINAURAL_FILTER_PROFILE_DIRECT + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout: { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -6609 + digital_peak: -2819 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001101_f.mp4 b/tests/test_001101_f.mp4 new file mode 100644 index 00000000..033302b0 Binary files /dev/null and b/tests/test_001101_f.mp4 differ diff --git a/tests/test_001101_rendered_binaural.wav b/tests/test_001101_rendered_binaural.wav new file mode 100644 index 00000000..0100d958 Binary files /dev/null and b/tests/test_001101_rendered_binaural.wav differ diff --git a/tests/test_001101_s.mp4 b/tests/test_001101_s.mp4 new file mode 100644 index 00000000..ee2914ab Binary files /dev/null and b/tests/test_001101_s.mp4 differ diff --git a/tests/test_001102.iamf b/tests/test_001102.iamf new file mode 100644 index 00000000..3a48d3c4 Binary files /dev/null and b/tests/test_001102.iamf differ diff --git a/tests/test_001102.textproto b/tests/test_001102.textproto new file mode 100644 index 00000000..63d7de5a --- /dev/null +++ b/tests/test_001102.textproto @@ -0,0 +1,155 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Stereo layout and " + "a Binaural output layout." + file_name_prefix: "test_001102" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-19 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/headphones_rendering_mode == 1", + "3.7.1/binaural_filter_profile == AMBIENT", + "3.7.5/layout_type == BINAURAL" + ] + base_test: "test_001100" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + binaural_filter_profile: BINAURAL_FILTER_PROFILE_AMBIENT + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout: { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -6609 + digital_peak: -2819 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001102_f.mp4 b/tests/test_001102_f.mp4 new file mode 100644 index 00000000..5ede1ea6 Binary files /dev/null and b/tests/test_001102_f.mp4 differ diff --git a/tests/test_001102_rendered_binaural.wav b/tests/test_001102_rendered_binaural.wav new file mode 100644 index 00000000..29f4b500 Binary files /dev/null and b/tests/test_001102_rendered_binaural.wav differ diff --git a/tests/test_001102_s.mp4 b/tests/test_001102_s.mp4 new file mode 100644 index 00000000..eed95b0f Binary files /dev/null and b/tests/test_001102_s.mp4 differ diff --git a/tests/test_001103.iamf b/tests/test_001103.iamf new file mode 100644 index 00000000..2395e69d Binary files /dev/null and b/tests/test_001103.iamf differ diff --git a/tests/test_001103.textproto b/tests/test_001103.textproto new file mode 100644 index 00000000..8f223046 --- /dev/null +++ b/tests/test_001103.textproto @@ -0,0 +1,155 @@ +# Copyright (c) 2025, 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: iamf/cli/proto/user_metadata.proto +# proto-message: UserMetadata + +test_vector_metadata { + human_readable_description: + "A Base-Advanced Profile Stream using a Stereo layout and " + "a Binaural output layout." + file_name_prefix: "test_001103" + is_valid: true + is_valid_to_decode: true + validate_user_loudness: false + mp4_fixed_timestamp: "2026-01-19 00:00:00" + test_repository_tags: [ + "github/aomediacodec/libiamf/main" + ] + primary_tested_spec_sections: [ + "3.7.1/headphones_rendering_mode == 1", + "3.7.1/binaural_filter_profile == REVERBERANT", + "3.7.5/layout_type == BINAURAL" + ] + base_test: "test_001100" + partition_mix_gain_parameter_blocks: false +} + +encoder_control_metadata { + add_build_information_tag: false + output_rendered_file_format: OUTPUT_FORMAT_WAV_BIT_DEPTH_AUTOMATIC +} + +ia_sequence_header_metadata { + primary_profile: PROFILE_VERSION_BASE_ADVANCED + additional_profile: PROFILE_VERSION_BASE_ADVANCED +} + +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 + audio_substream_ids: [0] + scalable_channel_layout_config { + 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 + annotations_language: ["en-us"] + localized_presentation_annotations: ["test_mix_pres"] + sub_mixes { + audio_elements { + audio_element_id: 300 + localized_element_annotations: ["test_sub_mix_0_audio_element_0"] + rendering_config { + headphones_rendering_mode: HEADPHONES_RENDERING_MODE_BINAURAL_WORLD_LOCKED + binaural_filter_profile: BINAURAL_FILTER_PROFILE_REVERBERANT + } + element_mix_gain { + param_definition { + parameter_id: 100 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: -768 # -3 dB. + } + } + output_mix_gain { + param_definition { + parameter_id: 101 + parameter_rate: 48000 + param_definition_mode: 1 + reserved: 0 + } + default_mix_gain: 0 # 0 dB. + } + 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 + } + } + layouts { + loudness_layout { + layout_type: LAYOUT_TYPE_BINAURAL + reserved_or_binaural_layout: { + reserved: 0 + } + } + loudness { + info_type_bit_masks: [] + integrated_loudness: -6609 + digital_peak: -2819 + } + } + } + +} + +audio_frame_metadata { + samples_to_trim_at_end_includes_padding: false + samples_to_trim_at_start_includes_codec_delay: false + wav_filename: "dialog_clip_stereo.wav" + audio_element_id: 300 + channel_metadatas: [ + { channel_id: 0 channel_label: CHANNEL_LABEL_L_2 }, + { channel_id: 1 channel_label: CHANNEL_LABEL_R_2 } + ] +} + +temporal_delimiter_metadata { + enable_temporal_delimiters: false +} diff --git a/tests/test_001103_f.mp4 b/tests/test_001103_f.mp4 new file mode 100644 index 00000000..3f4966a6 Binary files /dev/null and b/tests/test_001103_f.mp4 differ diff --git a/tests/test_001103_rendered_binaural.wav b/tests/test_001103_rendered_binaural.wav new file mode 100644 index 00000000..b16fdb59 Binary files /dev/null and b/tests/test_001103_rendered_binaural.wav differ diff --git a/tests/test_001103_s.mp4 b/tests/test_001103_s.mp4 new file mode 100644 index 00000000..61671043 Binary files /dev/null and b/tests/test_001103_s.mp4 differ