1// Copyright (c) 2023, Alliance for Open Media. All rights reserved 2// 3// This source code is subject to the terms of the BSD 3-Clause Clear License 4// and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear 5// License was not distributed with this source code in the LICENSE file, you 6// can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the 7// Alliance for Open Media Patent License 1.0 was not distributed with this 8// source code in the PATENTS file, you can obtain it at 9// www.aomedia.org/license/patent. 10 11syntax = "proto2"; 12 13package iamf_tools_cli_proto; 14 15import "iamf/cli/proto/obu_header.proto"; 16import "iamf/cli/proto/param_definitions.proto"; 17 18message MixPresentationAnnotations { 19 option deprecated = true; 20 21 optional string mix_presentation_friendly_label = 1; 22} 23 24message MixPresentationElementAnnotations { 25 option deprecated = true; 26 27 optional string audio_element_friendly_label = 1; 28} 29 30message ElementMixConfig { 31 option deprecated = true; 32 33 optional MixGainParamDefinition mix_gain = 1; 34} 35 36enum HeadPhonesRenderingMode { 37 HEADPHONES_RENDERING_MODE_INVALID = 0; 38 HEADPHONES_RENDERING_MODE_STEREO = 1; 39 HEADPHONES_RENDERING_MODE_BINAURAL = 2; 40 HEADPHONES_RENDERING_MODE_RESERVED_2 = 3; 41 HEADPHONES_RENDERING_MODE_RESERVED_3 = 4; 42} 43 44message RenderingConfig { 45 optional HeadPhonesRenderingMode headphones_rendering_mode = 1; 46 optional uint32 reserved = 2; 47 optional uint32 rendering_config_extension_size = 3; 48 optional bytes rendering_config_extension_bytes = 4; 49} 50 51message SubMixAudioElement { 52 reserved 2; 53 54 optional uint32 audio_element_id = 1; 55 // Superseded by `localized_element_annotations`. 56 repeated MixPresentationElementAnnotations 57 mix_presentation_element_annotations_array = 4 [deprecated = true]; 58 // Length should be equal to `count_label` in the OBU. 59 repeated string localized_element_annotations = 6; 60 61 optional RenderingConfig rendering_config = 5; 62 // Superseded by `element_mix_gain`. 63 optional ElementMixConfig element_mix_config = 3 [deprecated = true]; 64 optional MixGainParamDefinition element_mix_gain = 7; 65} 66 67message OutputMixConfig { 68 option deprecated = true; 69 70 optional MixGainParamDefinition output_mix_gain = 1; 71} 72 73enum SoundSystem { 74 SOUND_SYSTEM_INVALID = 0; 75 SOUND_SYSTEM_A_0_2_0 = 1; 76 SOUND_SYSTEM_B_0_5_0 = 2; 77 SOUND_SYSTEM_C_2_5_0 = 3; 78 SOUND_SYSTEM_D_4_5_0 = 4; 79 SOUND_SYSTEM_E_4_5_1 = 5; 80 SOUND_SYSTEM_F_3_7_0 = 6; 81 SOUND_SYSTEM_G_4_9_0 = 7; 82 SOUND_SYSTEM_H_9_10_3 = 8; 83 SOUND_SYSTEM_I_0_7_0 = 9; 84 SOUND_SYSTEM_J_4_7_0 = 10; 85 SOUND_SYSTEM_10_2_7_0 = 11; 86 SOUND_SYSTEM_11_2_3_0 = 12; 87 SOUND_SYSTEM_12_0_1_0 = 13; 88 SOUND_SYSTEM_13_6_9_0 = 14; 89} 90 91message LoudspeakersSsConventionLayout { 92 optional SoundSystem sound_system = 1; 93 optional uint32 reserved = 2; 94} 95 96message LoudspeakersReservedOrBinauralLayout { 97 optional uint32 reserved = 1; 98} 99 100enum LayoutType { 101 LAYOUT_TYPE_INVALID = 0; 102 LAYOUT_TYPE_RESERVED_0 = 1; 103 LAYOUT_TYPE_RESERVED_1 = 2; 104 LAYOUT_TYPE_LOUDSPEAKERS_SS_CONVENTION = 3; 105 LAYOUT_TYPE_BINAURAL = 4; 106} 107 108message Layout { 109 reserved 2; 110 111 optional LayoutType layout_type = 1; 112 oneof specific_layout { 113 LoudspeakersSsConventionLayout ss_layout = 3; 114 LoudspeakersReservedOrBinauralLayout reserved_or_binaural_layout = 4; 115 } 116} 117 118enum AnchorType { 119 ANCHOR_TYPE_INVALID = 0; 120 ANCHOR_TYPE_UNKNOWN = 1; 121 ANCHOR_TYPE_DIALOGUE = 2; 122 ANCHOR_TYPE_ALBUM = 3; 123} 124 125// Values are represented to align with the IAMF spec. 126// 127// See 128// https://aomediacodec.github.io/iamf/v1.1.0.html#obu-mixpresentation-loudness 129// for further details. 130// 131// See detailed examples on Q7.8 format below in `LoudnessInfo`. 132message AnchorElement { 133 optional AnchorType anchor_element = 1; 134 optional int32 anchored_loudness = 2; // Q7.8. 135} 136 137message AnchoredLoudness { 138 // `num_anchored_loudness` is ignored. The value in the bitstream is inferred 139 // based on the number of `anchor_elements`. 140 optional uint32 num_anchored_loudness = 1 [deprecated = true]; 141 repeated AnchorElement anchor_elements = 2; 142} 143 144enum LoudnessInfoTypeBitMask { 145 LOUDNESS_INFO_TYPE_INVALID = 0; 146 LOUDNESS_INFO_TYPE_TRUE_PEAK = 1; 147 LOUDNESS_INFO_TYPE_ANCHORED_LOUDNESS = 2; 148 LOUDNESS_INFO_TYPE_RESERVED_4 = 4; 149 LOUDNESS_INFO_TYPE_RESERVED_8 = 8; 150 LOUDNESS_INFO_TYPE_RESERVED_16 = 16; 151 LOUDNESS_INFO_TYPE_RESERVED_32 = 32; 152 LOUDNESS_INFO_TYPE_RESERVED_64 = 64; 153 LOUDNESS_INFO_TYPE_RESERVED_128 = 128; 154} 155 156// Values are represented to align with the IAMF spec. 157// 158// See 159// https://aomediacodec.github.io/iamf/v1.1.0.html#obu-mixpresentation-loudness 160// for further details. 161// 162// To convert from dB to Q7.8, multiply by 256. Example: 163// - For -3 dB, set the proto value to 256 * -3 = -768. 164// - For +6 dB, set the proto value to 256 * 6 = 1536. 165message LoudnessInfo { 166 optional uint32 deprecated_info_type = 1 [deprecated = true]; 167 repeated LoudnessInfoTypeBitMask info_type_bit_masks = 8 [packed = true]; 168 optional int32 integrated_loudness = 2; // Q7.8. 169 optional int32 digital_peak = 3; // Q7.8. 170 optional int32 true_peak = 4; // Q7.8. 171 optional AnchoredLoudness anchored_loudness = 5; 172 optional uint32 info_type_size = 6; 173 optional bytes info_type_bytes = 7; 174 175 // Next ID: 9 176} 177 178message MixPresentationLayout { 179 optional Layout loudness_layout = 1; 180 optional LoudnessInfo loudness = 2; 181} 182 183message MixPresentationSubMix { 184 // `num_audio_elements` is ignored. The value in the bitstream is inferred 185 // based on the number of `audio_elements`. 186 optional uint32 num_audio_elements = 1 [deprecated = true]; 187 repeated SubMixAudioElement audio_elements = 2; 188 189 // Superseded by `output_mix_gain`. 190 optional OutputMixConfig output_mix_config = 3 [deprecated = true]; 191 optional MixGainParamDefinition output_mix_gain = 6; 192 193 // `num_layouts` is ignored. The value in the bitstream is inferred 194 // based on the number of `layouts`. 195 optional uint32 num_layouts = 4 [deprecated = true]; 196 repeated MixPresentationLayout layouts = 5; 197 198 // Next ID: 7 199} 200 201message MixPresentationTag { 202 optional string tag_name = 1; 203 optional string tag_value = 2; 204} 205 206message MixPresentationTags { 207 // `num_tags` is ignored. The value in the bitstream is inferred based on the 208 // number of tags. 209 optional uint32 num_tags = 1 [deprecated = true]; 210 repeated MixPresentationTag tags = 2; 211} 212 213message MixPresentationObuMetadata { 214 reserved 2; 215 216 optional uint32 mix_presentation_id = 1; 217 optional uint32 count_label = 5; 218 219 // Superseded by `annotations_language`. 220 repeated string language_labels = 6 [deprecated = true]; 221 // Length should be equal to `count_label`. 222 repeated string annotations_language = 9; 223 224 // Superseded by `localized_presentation_annotations`. 225 repeated MixPresentationAnnotations mix_presentation_annotations_array = 7 226 [deprecated = true]; 227 // Length should be equal to `count_label`. 228 repeated string localized_presentation_annotations = 10; 229 230 // `num_sub_mixes` is ignored. The value in the bitstream is inferred 231 // based on the number of `sub_mixes`. 232 optional uint32 num_sub_mixes = 3 [deprecated = true]; 233 repeated MixPresentationSubMix sub_mixes = 4; 234 235 // When false [default]: The encoder will ignore the below 236 // `mix_presentation_tags`. Beware that other features 237 // may still result in additional non-user specified 238 // tags. To stricly encode a file without any tags, set 239 // both `include_mix_presentation_tags` and 240 // `EncoderControlMetadata.add_build_information_tag` 241 // fields to false. 242 // When true: The encoder will use the `mix_presentation_tags` field. 243 optional bool include_mix_presentation_tags = 11; 244 optional MixPresentationTags mix_presentation_tags = 12; 245 246 optional ObuHeaderMetadata obu_header = 8; 247 248 // Next ID: 13 249} 250