From 452b57bee9c5d8c1a7ad9f89d4cdecdbd61495d4 Mon Sep 17 00:00:00 2001 From: Felicia Lim Date: Fri, 27 Jun 2025 12:28:09 -0700 Subject: [PATCH 1/2] Add dual position parameter definition and parameter blocks --- index.bs | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 04dca1f1..9ef2ca6f 100644 --- a/index.bs +++ b/index.bs @@ -687,7 +687,7 @@ class AudioElementOBU() { else if (param_definition_type == PARAMETER_DEFINITION_RECON_GAIN) { ReconGainParamDefinition recon_gain_info; } - else if (param_definition_type > 3) { + else if (param_definition_type > 4) { leb128() param_definition_size; unsigned int (8 x param_definition_size) param_definition_bytes; } @@ -776,18 +776,22 @@ NOTE: For a given [=audio_element_type=], a future version of the specification 3PARAMETER_DEFINITION_SINGLE_POSITION[=SinglePositionParamDefinition()=] + + 4PARAMETER_DEFINITION_DUAL_POSITION[=DualPositionParamDefinition()=] + - The following types SHALL NOT be present in an [=Audio Element OBU=]: - PARAMETER_DEFINITION_MIX_GAIN - PARAMETER_DEFINITION_SINGLE_POSITION + - PARAMETER_DEFINITION_DUAL_POSITION - The type SHALL NOT be duplicated in one [=Audio Element OBU=]. - When [=codec_id=] = fLaC or ipcm, the type PARAMETER_DEFINITION_RECON_GAIN SHALL NOT be present. - When [=num_layers=] > 1, the type PARAMETER_DEFINITION_RECON_GAIN SHALL be present. - When the [=loudspeaker_layout=] = 15 or the [=loudspeaker_layout=] of the (non-)scalable channel audio (i.e., [=num_layers=] = 1) is less than or equal to 3.1.2ch (i.e., Mono, Stereo, or 3.1.2ch), the type PARAMETER_DEFINITION_DEMIXING SHALL NOT be present. - When the highest [=loudspeaker_layout=] of the scalable channel audio (i.e., [=num_layers=] > 1) is greater than 3.1.2ch, both PARAMETER_DEFINITION_DEMIXING and PARAMETER_DEFINITION_RECON_GAIN types SHALL be present. - When [=num_layers=] = 1 and [=loudspeaker_layout=] is greater than 3.1.2ch (i.e., 5.1.2ch, 5.1.4ch, 7.1.2ch, or 7.1.4ch), the type PARAMETER_DEFINITION_DEMIXING MAY be present. -- An OBU parser SHALL be able to parse [=audio_element_obu/param_definition_type=] = P (where P > 3) and [=param_definition_size=]. The OBU parser SHOULD ignore the bytes indicated by [=param_definition_size=] that it does not recognize. +- An OBU parser SHALL be able to parse [=audio_element_obu/param_definition_type=] = P (where P > 4) and [=param_definition_size=]. The OBU parser SHOULD ignore the bytes indicated by [=param_definition_size=] that it does not recognize. demixing_info is an instance of the [=DemixingParamDefinition()=] class, which provides the parameter definition for the demixing information, which is used to reconstruct a scalable channel audio representation. The corresponding parameter data to be provided in [=Parameter Block OBU=]s with the same [=parameter_block_obu/parameter_id=] is specified in the [=DemixingInfoParameterData()=] class. @@ -1408,6 +1412,8 @@ class RenderingConfig() { leb128() param_definition_type; if (param_definition_type == PARAMETER_DEFINITION_SINGLE_POSITION) { SinglePositionParamDefinition single_position; + } else if (param_definition_type == PARAMETER_DEFINITION_DUAL_POSITION) { + DualPositionParamDefinition dual_position; } else { leb128() rendering_config_params_extension_size; @@ -1439,6 +1445,7 @@ Parsers encountering a reserved value of [=headphones_rendering_mode=] SHALL ign - The type SHALL NOT be duplicated in one [=RenderingConfig()=]. - The PARAMETER_DEFINITION_SINGLE_POSITION type SHALL be present only when the referenced [=Audio Element=] has [=audio_element_type=] = OBJECT_BASED and [=num_objects=] = 1. +- The PARAMETER_DEFINITION_DUAL_POSITION type SHALL be present only when the referenced [=Audio Element=] has [=audio_element_type=] = OBJECT_BASED and [=num_objects=] = 2. - The following types SHALL NOT be present in [=RenderingConfig()=]: - PARAMETER_DEFINITION_MIX_GAIN - PARAMETER_DEFINITION_DEMIXING @@ -1446,6 +1453,8 @@ Parsers encountering a reserved value of [=headphones_rendering_mode=] SHALL ign single_position is an instance of the [=SinglePositionParamDefinition()=] class. It provides the parameter definition for the position that is used when rendering an [=Audio Element=] with one object. The corresponding parameter data to be provided in [=Parameter Block OBU=]s with the same [=parameter_block_obu/parameter_id=] is specified in the [=SinglePositionParameterData()=] class. +dual_position is an instance of the [=DualPositionParamDefinition()=] class. It provides the parameter definition for the position that is used when rendering an [=Audio Element=] with two objects. The corresponding parameter data to be provided in [=Parameter Block OBU=]s with the same [=parameter_block_obu/parameter_id=] is specified in the [=DualPositionParameterData()=] class. + rendering_config_params_extension_size indicates the size in bytes of [=rendering_config_params_extension_bytes=]. rendering_config_params_extension_bytes represents reserved bytes for future use. Parsers that don't understand these bytes SHOULD ignore them. @@ -1485,6 +1494,40 @@ where 0 degrees is horizontally ahead and positive angles are going up, followin default_distance specifies the default distance, when there are no [=Parameter Block OBU=]s with the same [=parameter_block_obu/parameter_id=] provided. The value is expressed as a normalized distance from the origin in the range [0.0, 1.0], where 1.0 is on the surface of the unit sphere. +### Dual Position Parameter Definition Syntax and Semantics ### {#syntax-dual-position-parameter-definition} + +The DualPositionParamDefinition() class provides the parameter definition for two objects' positions. + +This section specifies the syntax structures of the [=DualPositionParamDefinition()=] class. + +Syntax + +``` +class DualPositionParamDefinition() extends ParamDefinition() { + signed int (9) default_first_azimuth; + signed int (8) default_first_elevation; + unsigned int (3) default_first_distance; + + signed int (9) default_second_azimuth; + signed int (8) default_second_elevation; + unsigned int (3) default_second_distance; +} +``` + +Semantics + +default_first_azimuth is the same as [=default_azimuth=] in [=SinglePositionParamDefinition()=] except that this applies to the first object in the referenced [=Audio Substream=]. + +default_first_elevation is the same as [=default_elevation=] in [=SinglePositionParamDefinition()=] except that this applies to the first object in the referenced [=Audio Substream=]. + +default_first_distance is the same as [=default_distance=] in [=SinglePositionParamDefinition()=] except that this applies to the first object in the referenced [=Audio Substream=]. + +default_second_azimuth is the same as [=default_azimuth=] in [=SinglePositionParamDefinition()=] except that this applies to the second object in the referenced [=Audio Substream=]. + +default_second_elevation is the same as [=default_elevation=] in [=SinglePositionParamDefinition()=] except that this applies to the second object in the referenced [=Audio Substream=]. + +default_second_distance is the same as [=default_distance=] in [=SinglePositionParamDefinition()=] except that this applies to the second object in the referenced [=Audio Substream=]. + ### Mix Gain Parameter Definition Syntax and Semantics ### {#syntax-mixgain-parameter-definition} @@ -1714,6 +1757,9 @@ class ParameterBlockOBU() { else if (param_definition_type == PARAMETER_DEFINITION_SINGLE_POSITION) { SinglePositionParameterData single_position_parameter_data; } + else if (param_definition_type == PARAMETER_DEFINITION_DUAL_POSITION) { + DualPositionParameterData dual_position_parameter_data; + } else { leb128() parameter_data_size; unsigned int (8 x parameter_data_size) parameter_data_bytes; @@ -1756,6 +1802,8 @@ The values of [=parameter_block_obu/duration=], [=parameter_block_obu/constant_s single_position_parameter_data is an instance of the [=SinglePositionParameterData()=] class, which provides the parameter values to apply in this parameter block. +dual_position_parameter_data is an instance of the [=DualPositionParameterData()=] class, which provides the parameter values to apply in this parameter block. + parameter_data_size indicates the size in bytes of [=parameter_data_bytes=]. parameter_data_bytes represents reserved bytes for future use when new syntaxes are defined. Parsers that don't understand these bytes SHOULD ignore them. @@ -1954,6 +2002,46 @@ where 0 degrees is horizontally ahead and positive angles are going up, followin +### Dual Position Parameter Data Syntax and Semantics ### {#syntax-dual-position-param} + +The DualPositionParameterData() class provides the position parameter data to be used when rendering an object-based [=Audio Element=] with two objects. This section specifies the syntax structure of the [=DualPositionParameterData()=] class. + +Syntax + +``` +class DualPositionParameterData() { + leb128() dual_position_parameter_data_size; + leb128() animation_type; + + AnimatedParameterData first_azimuth; + AnimatedParameterData first_elevation; + AnimatedParameterData first_distance; + + AnimatedParameterData second_azimuth; + AnimatedParameterData second_elevation; + AnimatedParameterData second_distance; +} +``` + +Semantics + +dual_position_parameter_data_size indicates the size in bytes of [=DualPositionParameterData()=] immediately following this field. Parsers SHOULD ignore bytes past the [=DualPositionParameterData()=] syntax that they recognize. + +animation_type specifies the type of animation applied to the parameter values. Supported values are defined in the [=Animation Types=] table. When an unknown value of [=dual_position_param_data/animation_type=] is used, parsers SHOULD ignore the [=Parameter Block OBU=] that contains this [=dual_position_parameter_data=]. + +first_azimuth is the same as [=azimuth=] in [=SinglePositionParameterData()=] except that this applies to the first object in the referenced [=Audio Substream=]. + +first_elevation is the same as [=elevation=] in [=SinglePositionParameterData()=] except that this applies to the first object in the referenced [=Audio Substream=]. + +first_distance is the same as [=distance=] in [=SinglePositionParameterData()=] except that this applies to the first object in the referenced [=Audio Substream=]. + +second_azimuth is the same as [=azimuth=] in [=SinglePositionParameterData()=] except that this applies to the second object in the referenced [=Audio Substream=]. + +second_elevation is the same as [=elevation=] in [=SinglePositionParameterData()=] except that this applies to the second object in the referenced [=Audio Substream=]. + +second_distance is the same as [=distance=] in [=SinglePositionParameterData()=] except that this applies to the second object in the referenced [=Audio Substream=]. + + ## Audio Frame OBU Syntax and Semantics ## {#obu-audioframe} The Audio Frame OBU provides the coded audio frame for an [=Audio Substream=]. This section specifies the payload format of the [=Audio Frame OBU=]. From a71c854f854b161769e1d81fe2cba308a1097b7b Mon Sep 17 00:00:00 2001 From: Felicia Lim Date: Mon, 30 Jun 2025 11:21:11 -0700 Subject: [PATCH 2/2] Refactor "Parameter Definitions Type, Syntax and Sematics" to its own section --- index.bs | 181 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 90 deletions(-) diff --git a/index.bs b/index.bs index 9ef2ca6f..efadd603 100644 --- a/index.bs +++ b/index.bs @@ -757,34 +757,9 @@ NOTE: For a given [=audio_element_type=], a future version of the specification param_definition_type specifies the type of the parameter definition. Supported values are defined in the [=Parameter Definition Types=] table along with their associated parameter definitions. - - - - - - - - - - - - - - - - - - - - - - -
Parameter Definition Types
param_definition_typeParameter definition typeParameter definition
0PARAMETER_DEFINITION_MIX_GAIN[=MixGainParamDefinition()=]
1PARAMETER_DEFINITION_DEMIXING[=DemixingParamDefinition()=]
2PARAMETER_DEFINITION_RECON_GAIN[=ReconGainParamDefinition()=]
3PARAMETER_DEFINITION_SINGLE_POSITION[=SinglePositionParamDefinition()=]
4PARAMETER_DEFINITION_DUAL_POSITION[=DualPositionParamDefinition()=]
- -- The following types SHALL NOT be present in an [=Audio Element OBU=]: - - PARAMETER_DEFINITION_MIX_GAIN - - PARAMETER_DEFINITION_SINGLE_POSITION - - PARAMETER_DEFINITION_DUAL_POSITION +- Only the following types from the [=Parameter Definition Types=] table MAY be present in an [=Audio Element OBU=]. Other types from that table SHALL NOT be present in an [=Audio Element OBU=]. + - PARAMETER_DEFINITION_DEMIXING + - PARAMETER_DEFINITION_RECON_GAIN - The type SHALL NOT be duplicated in one [=Audio Element OBU=]. - When [=codec_id=] = fLaC or ipcm, the type PARAMETER_DEFINITION_RECON_GAIN SHALL NOT be present. - When [=num_layers=] > 1, the type PARAMETER_DEFINITION_RECON_GAIN SHALL be present. @@ -852,64 +827,6 @@ The mapping of [=default_w=] to [=w(k)|\(w(k)\)=] SHOULD be as follows: A default recon gain value of 0 dB is implied when there are no [=Parameter Block OBU=]s (with the same [=ParamDefinition/parameter_id=] defined in this [=ReconGainParamDefinition()=]) provided. -### Parameter Definition Syntax and Semantics ### {#parameter-definition} - -Parameter definition classes inherit from the abstract ParamDefinition() class. - -Syntax - -``` -abstract class ParamDefinition() { - leb128() parameter_id; - leb128() parameter_rate; - unsigned int (1) param_definition_mode; - unsigned int (7) reserved_for_future_use; - if (param_definition_mode == 0) { - leb128() duration; - leb128() constant_subblock_duration; - if (constant_subblock_duration == 0) { - leb128() num_subblocks; - for (i = 0; i< num_subblocks; i++) { - leb128() subblock_duration; - } - } - } -} -``` - -Semantics - -parameter_id indicates the identifier for the [=Parameter Substream=] which this parameter definition refers to. There SHALL be one unique [=ParamDefinition/parameter_id=] per [=Parameter Substream=]. - -parameter_rate specifies the rate used by this [=Parameter Substream=], expressed as ticks per second. Time-related fields associated with this [=Parameter Substream=], such as durations, SHALL be expressed in the number of ticks. -- The parameter rate SHALL be a value such that the number of ticks per frame, computed as - \[\frac{\text{parameter_rate} \times \text{num_samples_per_frame}}{\text{Audio Element sample rate}},\] - is a non-zero integer. - -param_definition_mode indicates whether this parameter definition specifies the [=ParamDefinition/duration=], [=ParamDefinition/num_subblocks=], [=ParamDefinition/constant_subblock_duration=] and [=ParamDefinition/subblock_duration=] fields for the parameter blocks with the same [=parameter_block_obu/parameter_id=]. - -- When this field is set to 0, all of the [=ParamDefinition/duration=], [=ParamDefinition/num_subblocks=], [=ParamDefinition/constant_subblock_duration=], and [=ParamDefinition/subblock_duration=] fields SHALL be specified in this parameter definition. None of the parameter blocks with the same [=parameter_block_obu/parameter_id=] SHALL specify these same fields. - -- When this field is set to 1, none of the [=ParamDefinition/duration=], [=ParamDefinition/num_subblocks=], [=ParamDefinition/constant_subblock_duration=], and [=ParamDefinition/subblock_duration=] fields SHALL be specified in this parameter definition. Instead, each parameter block with the same [=parameter_block_obu/parameter_id=] SHALL specify these same fields. - -duration specifies the duration for which each parameter block with the same [=parameter_block_obu/parameter_id=] is valid and applicable. It SHALL NOT be set to 0. - -constant_subblock_duration specifies the duration of each subblock, in the case where all subblocks except the last subblock have equal durations. If all subblocks except the last subblock do not have equal durations, the value of [=ParamDefinition/constant_subblock_duration=] SHALL be set to 0. - -When [=ParamDefinition/constant_subblock_duration=] is not equal to 0, -- [=ParamDefinition/num_subblocks=] is implicitly calculated as - \[ \text{num_subblocks} = \left\lceil{ \frac{\text{duration}}{\text{constant_subblock_duration}}}\right\rceil. \] -- If \(\textrm{num_subblocks} \times \text{constant_subblock_duration} > \text{duration}\), the actual duration of the last subblock SHALL be - \[ \text{duration} - \left( \text{num_subblocks} - 1 \right) \times \text{constant_subblock_duration}. \] - -When [=ParamDefinition/constant_subblock_duration=] is equal to 0, the summation of all [=ParamDefinition/subblock_duration=] in this parameter block SHALL be equal to [=ParamDefinition/duration=]. - -num_subblocks specifies the number of different sets of parameter values specified in each parameter block with the same [=parameter_block_obu/parameter_id=], where each set describes a different subblock of the timeline, contiguously. - -subblock_duration specifies the duration for the given subblock. It SHALL NOT be set to 0. - -The values for [=ParamDefinition/duration=], [=ParamDefinition/constant_subblock_duration=], and [=ParamDefinition/subblock_duration=] SHALL be expressed as the number of ticks at the [=parameter_rate=] specified in the corresponding parameter definition. - ### Scalable Channel Layout Config Syntax and Semantics ### {#syntax-scalable-channel-layout-config} The ScalableChannelLayoutConfig() class provides the configuration for a given scalable channel audio representation. @@ -1443,13 +1360,12 @@ Parsers encountering a reserved value of [=headphones_rendering_mode=] SHALL ign param_definition_type specifies the type of the parameter definition. Supported types are defined in the [=Parameter Definition Types=] table along with their associated parameter definitions. +- Only the following types from the [=Parameter Definition Types=] table MAY be present in a [=RenderingConfig()=]. All other types from that table SHALL NOT be present in a [=RenderingConfig()=]. + - PARAMETER_DEFINITION_SINGLE_POSITION + - PARAMETER_DEFINITION_DUAL_POSITION - The type SHALL NOT be duplicated in one [=RenderingConfig()=]. - The PARAMETER_DEFINITION_SINGLE_POSITION type SHALL be present only when the referenced [=Audio Element=] has [=audio_element_type=] = OBJECT_BASED and [=num_objects=] = 1. - The PARAMETER_DEFINITION_DUAL_POSITION type SHALL be present only when the referenced [=Audio Element=] has [=audio_element_type=] = OBJECT_BASED and [=num_objects=] = 2. -- The following types SHALL NOT be present in [=RenderingConfig()=]: - - PARAMETER_DEFINITION_MIX_GAIN - - PARAMETER_DEFINITION_DEMIXING - - PARAMETER_DEFINITION_RECON_GAIN single_position is an instance of the [=SinglePositionParamDefinition()=] class. It provides the parameter definition for the position that is used when rendering an [=Audio Element=] with one object. The corresponding parameter data to be provided in [=Parameter Block OBU=]s with the same [=parameter_block_obu/parameter_id=] is specified in the [=SinglePositionParameterData()=] class. @@ -1713,6 +1629,91 @@ content_language : Language of the audio content in this Mix Presentation. NOTE: The language indicated by [=tag_name=] = "content_language" is different from [=annotations_language=]. The former indicates the language of the audio content in the associated [=Audio Element=]s, while the latter indicates the language of the [=Mix Presentation=] annotations. +## Parameter Definition Types, Syntax and Semantics ## {#parameter-definition} + +Parameter definition classes inherit from the abstract ParamDefinition() class, defined below. + +Supported parameter definition types are listed in the table below along with their associated parameter definition classes. + + + + + + + + + + + + + + + + + + + + + + + +
Parameter Definition Types
param_definition_typeParameter definition typeParameter definition
0PARAMETER_DEFINITION_MIX_GAIN[=MixGainParamDefinition()=]
1PARAMETER_DEFINITION_DEMIXING[=DemixingParamDefinition()=]
2PARAMETER_DEFINITION_RECON_GAIN[=ReconGainParamDefinition()=]
3PARAMETER_DEFINITION_SINGLE_POSITION[=SinglePositionParamDefinition()=]
4PARAMETER_DEFINITION_DUAL_POSITION[=DualPositionParamDefinition()=]
+ + +Syntax + +``` +abstract class ParamDefinition() { + leb128() parameter_id; + leb128() parameter_rate; + unsigned int (1) param_definition_mode; + unsigned int (7) reserved_for_future_use; + if (param_definition_mode == 0) { + leb128() duration; + leb128() constant_subblock_duration; + if (constant_subblock_duration == 0) { + leb128() num_subblocks; + for (i = 0; i< num_subblocks; i++) { + leb128() subblock_duration; + } + } + } +} +``` + +Semantics + +parameter_id indicates the identifier for the [=Parameter Substream=] which this parameter definition refers to. There SHALL be one unique [=ParamDefinition/parameter_id=] per [=Parameter Substream=]. + +parameter_rate specifies the rate used by this [=Parameter Substream=], expressed as ticks per second. Time-related fields associated with this [=Parameter Substream=], such as durations, SHALL be expressed in the number of ticks. +- The parameter rate SHALL be a value such that the number of ticks per frame, computed as + \[\frac{\text{parameter_rate} \times \text{num_samples_per_frame}}{\text{Audio Element sample rate}},\] + is a non-zero integer. + +param_definition_mode indicates whether this parameter definition specifies the [=ParamDefinition/duration=], [=ParamDefinition/num_subblocks=], [=ParamDefinition/constant_subblock_duration=] and [=ParamDefinition/subblock_duration=] fields for the parameter blocks with the same [=parameter_block_obu/parameter_id=]. + +- When this field is set to 0, all of the [=ParamDefinition/duration=], [=ParamDefinition/num_subblocks=], [=ParamDefinition/constant_subblock_duration=], and [=ParamDefinition/subblock_duration=] fields SHALL be specified in this parameter definition. None of the parameter blocks with the same [=parameter_block_obu/parameter_id=] SHALL specify these same fields. + +- When this field is set to 1, none of the [=ParamDefinition/duration=], [=ParamDefinition/num_subblocks=], [=ParamDefinition/constant_subblock_duration=], and [=ParamDefinition/subblock_duration=] fields SHALL be specified in this parameter definition. Instead, each parameter block with the same [=parameter_block_obu/parameter_id=] SHALL specify these same fields. + +duration specifies the duration for which each parameter block with the same [=parameter_block_obu/parameter_id=] is valid and applicable. It SHALL NOT be set to 0. + +constant_subblock_duration specifies the duration of each subblock, in the case where all subblocks except the last subblock have equal durations. If all subblocks except the last subblock do not have equal durations, the value of [=ParamDefinition/constant_subblock_duration=] SHALL be set to 0. + +When [=ParamDefinition/constant_subblock_duration=] is not equal to 0, +- [=ParamDefinition/num_subblocks=] is implicitly calculated as + \[ \text{num_subblocks} = \left\lceil{ \frac{\text{duration}}{\text{constant_subblock_duration}}}\right\rceil. \] +- If \(\textrm{num_subblocks} \times \text{constant_subblock_duration} > \text{duration}\), the actual duration of the last subblock SHALL be + \[ \text{duration} - \left( \text{num_subblocks} - 1 \right) \times \text{constant_subblock_duration}. \] + +When [=ParamDefinition/constant_subblock_duration=] is equal to 0, the summation of all [=ParamDefinition/subblock_duration=] in this parameter block SHALL be equal to [=ParamDefinition/duration=]. + +num_subblocks specifies the number of different sets of parameter values specified in each parameter block with the same [=parameter_block_obu/parameter_id=], where each set describes a different subblock of the timeline, contiguously. + +subblock_duration specifies the duration for the given subblock. It SHALL NOT be set to 0. + +The values for [=ParamDefinition/duration=], [=ParamDefinition/constant_subblock_duration=], and [=ParamDefinition/subblock_duration=] SHALL be expressed as the number of ticks at the [=parameter_rate=] specified in the corresponding parameter definition. + ## Parameter Block OBU Syntax and Semantics ## {#obu-parameterblock} The Parameter Block OBU provides the parameter values in [=Parameter Substream=]s and information on how they are animated over the indicated duration. This section specifies the payload format of the [=Parameter Block OBU=].