• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2023, Alliance for Open Media. All rights reserved
2//
3// This source code is subject to the terms of the BSD 3-Clause Clear License
4// and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear
5// License was not distributed with this source code in the LICENSE file, you
6// can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the
7// Alliance for Open Media Patent License 1.0 was not distributed with this
8// source code in the PATENTS file, you can obtain it at
9// www.aomedia.org/license/patent.
10
11syntax = "proto2";
12
13package iamf_tools_cli_proto;
14
15import "iamf/cli/proto/parameter_data.proto";
16
17// Valid proto enums start at index 1, which are different from the
18// corresponding enums in C++, e.g. kParameterDefinitionMixGain = 0.
19enum ParamDefinitionType {
20  PARAM_DEFINITION_TYPE_INVALID = 0;
21  PARAM_DEFINITION_TYPE_MIX_GAIN = 1;
22  PARAM_DEFINITION_TYPE_DEMIXING = 2;
23  PARAM_DEFINITION_TYPE_RECON_GAIN = 3;
24  PARAM_DEFINITION_TYPE_RESERVED_3 = 4;
25}
26
27message ParamDefinition {
28  optional uint32 parameter_id = 1;
29  optional uint32 parameter_rate = 2;
30  optional bool param_definition_mode = 3;
31  optional uint32 reserved = 4;
32  optional uint32 duration = 5;
33  optional uint32 constant_subblock_duration = 7;
34  optional uint32 num_subblocks = 6;
35  repeated uint32 subblock_durations = 8 [packed = true];
36}
37
38// Values are represented to align with the IAMF spec.
39//
40// See
41// https://aomediacodec.github.io/iamf/v1.1.0.html#syntax-mixgain-parameter-definition
42// for further details.
43//
44// To convert from dB to Q7.8, multiply by 256. Example:
45//  - For -3 dB, set the proto value to 256 * -3 = -768.
46//  - For +6 dB, set the proto value to 256 * 6 = 1536.
47message MixGainParamDefinition {
48  optional ParamDefinition param_definition = 1;
49  optional int32 default_mix_gain = 2;  // Q7.8.
50}
51
52message DemixingParamDefinition {
53  optional ParamDefinition param_definition = 1;
54  optional DemixingInfoParameterData default_demixing_info_parameter_data = 2;
55  optional uint32 default_w = 3;
56  optional uint32 reserved = 4;
57}
58
59message ReconGainParamDefinition {
60  optional ParamDefinition param_definition = 1;
61}
62