• 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
15enum Leb128GeneratorMode {
16  GENERATE_LEB_INVALID = 0;
17  // Generate values using the minimum number of bytes.
18  GENERATE_LEB_MINIMUM = 1;
19  // Generate values using the target of bytes.
20  GENERATE_LEB_FIXED_SIZE = 2;
21}
22
23message Leb128Generator {
24  optional Leb128GeneratorMode mode = 1 [default = GENERATE_LEB_MINIMUM];
25  // Configures the target number of bytes when using `GENERATE_LEB_FIXED_SIZE`
26  // mode.
27  optional int32 fixed_size = 2 [default = 5];
28}
29
30// Metadata to describe and annotate test vectors. For historical reasons, some
31// of the fields here are used to control encoder behavior.
32message TestVectorMetadata {
33  reserved 5;
34
35  optional string human_readable_description = 1;
36  // Prefix of the output file names. Leave empty to skip writing to output
37  // files.
38  optional string file_name_prefix = 2;
39
40  // TODO(b/269708630): Rename `is_valid` to `is_valid_to_encode`.
41  // `true` when all mixes are valid to encode. Mixes may be invalid if they
42  // contain any mixes that use certain reserved values, or if they exercise any
43  // features which are not supported by the encoder.
44  optional bool is_valid = 3;
45  // `true` when a compliant decoder would decode at least one valid mix. Some
46  // other mixes may be invalid or use reserved values which may be ignored.
47  optional bool is_valid_to_decode = 14 [default = true];
48
49  // Tags to identify the repository this test vector belongs to. A repository
50  // could be a git branch or it could refer to some other way to organize a
51  // test suite.
52  //
53  // Some canonical tags are used to identify which GitHub branch(es) the test
54  // vector should be synchronized with.
55  //
56  // `github/aomediacodec/libiamf/main`: Used on the `main` branch of
57  //     https://github.com/AOMediaCodec/libiamf
58  // `github/aomediacodec/libiamf/v1.0.0-errata`: Used on the `v1.0.0-errata`
59  //     branch of https://github.com/AOMediaCodec/libiamf
60  repeated string test_repository_tags = 15;
61  repeated string primary_tested_spec_sections = 6;
62  optional string base_test = 7;
63
64  // TODO(b/384960137): Migrate `mp4_fixed_timestamp`, `ms_per_fragment`,
65  //                    `override_computed_recon_gains`,
66  //                    `validate_user_loudness`,
67  //                    `output_wav_file_bit_depth_override`,
68  //                    `partition_mix_gain_parameter_blocks`, `leb_generator`
69  //                    to `EncoderControlMetadata`.
70
71  // MP4 controls.
72  optional string mp4_fixed_timestamp = 4;
73  optional int32 ms_per_fragment = 8 [default = 10000];
74
75  // TODO(b/309461674): Deprecate and add a mode in `EncoderControlMetadata` to
76  //                    use the computed gains, without checking the
77  //                    user-provided gains.
78  // `false` to check that user-provided recon gains match the computed gains.
79  // `true` to override the computed recon gains with the user-provided gains.
80  optional bool override_computed_recon_gains = 9 [default = false];
81
82  // Controls whether to validate the user-provided loudness against the
83  // computed loudness.
84  optional bool validate_user_loudness = 13 [default = false];
85
86  // TODO(b/390392510): Migrate to `EncoderControlMetadata` and update to limit
87  //                    the possible values.
88  // An override to control the output bit-depth of the output `rendered` wav
89  // file. Or 0, to use a default bit-depth depending on the bitstream. The
90  // value may be clamped to a supported-bit depth.
91  optional uint32 output_wav_file_bit_depth_override = 12;
92
93  // `true` partitions the input mix gain parameter blocks to be aligned with
94  // single frames. The `param_definition` in the descriptor OBUs must be
95  // accurate.
96  optional bool partition_mix_gain_parameter_blocks = 10 [default = true];
97
98  // Settings to configure how `Leb128`s are generated.
99  optional Leb128Generator leb_generator = 11;
100
101  // Next ID: 16
102}
103