Skip to content

Commit

Permalink
Split out is_valid_to_decode from is_valid.
Browse files Browse the repository at this point in the history
  - `is_valid_to_decode`: Implies at least one mix in the test vector can be decoded.
    - A compliant decoder should be able to find and decode a valid mix.
  - `is_valid`: Implies all mixes in the the test vector could be decoded.
    - The encoder will more strictly prevent encoding certain types of reserved fields which is not aware of.
    - This maintains the safety rails on the encoder which prevent it from using certain types of extension fields under normal circumstances.
    - May be used to prevent other types of reserved fields in the future.
    - May rename to `is_valid_to_encode` in the future.
  - `test_summary.csv`: Add a column for `is_valid_to_decode`.
  - The concepts are identical for test vectors with only one mix presentation (most of the test suite).
    - Hence, most existing test vectors have matching `is_valid` and `is_valid_to_decode`.
  - The concepts are distinguished when there is one valid mix and one invalid mix (i.e. `test_000120`, `test_000122`, `test_000129`, `test_000130`).
    - Typically we want safety rails and do not want to accidentally encode strange mixes that will never be decoded.
  • Loading branch information
jwcullen committed Jul 31, 2024
1 parent e348c8d commit 1fc6f77
Show file tree
Hide file tree
Showing 178 changed files with 410 additions and 185 deletions.
8 changes: 8 additions & 0 deletions proto/test_vector_metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ message TestVectorMetadata {
// Prefix of the output file names. Leave empty to skip writing to output
// files.
optional 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;
// `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;
repeated string primary_tested_spec_sections = 6;
Expand Down
12 changes: 9 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ several files associated with it.

## .textproto files

These file describe metadata about the test vector.
Theses file describe metadata about the test vector to encode an
[IA Sequence](https://aomediacodec.github.io/iamf/#standalone-ia-sequence).

- `is_valid`: True for conformant bitstreams ("should-pass"). False for
non-conformant bitstreams ("should-fail").
- `is_valid`: True when the encoder can produce an IA Sequence where all mixes
would be understood by a compliant decoder. False when one or more mixes
exercise fields or features which would cause mixes to be ignored.
- `is_valid_to_decode`: True when an IAMF-compliant decoder could decode at
least least one mix of the associated IA Sequence ("should-pass"). False
when all mixes are non-conformant and would fail to be decoded
("should-false").
- `human_readable_descriptions`: A short description of what is being tested
and why.
- `mp4_fixed_timestamp`: The timestamp within the MP4 file. Can be safely
Expand Down
1 change: 1 addition & 0 deletions tests/test_000000_3.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test_vector_metadata {
"not have sufficient `num_samples_to_trim_at_end`."
file_name_prefix: "test_000000_3"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-06 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000002.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"added."
file_name_prefix: "test_000002"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000003.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"parameter blocks."
file_name_prefix: "test_000003"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000005.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"trimming."
file_name_prefix: "test_000005"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.2/num_samples_to_trim_at_end"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000006.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"delimiters."
file_name_prefix: "test_000006"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000007.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"case-sensitive and should be lowercase."
file_name_prefix: "test_000007"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.4/ia_code"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000012.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"input wav file to make it shorter."
file_name_prefix: "test_000012"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.2/num_samples_to_trim_at_end"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000013.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"input wav file to make it shorter."
file_name_prefix: "test_000013"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.2/num_samples_to_trim_at_end"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000014.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"because `pre_skip` is incorrectly set to 0."
file_name_prefix: "test_000014"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000015.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"used by any audio element or mix presentation."
file_name_prefix: "test_000015"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.8/parameter_id"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000016.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ test_vector_metadata {
"parameter."
file_name_prefix: "test_000016"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000017.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"fully trimmed off the end."
file_name_prefix: "test_000017"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000018.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"requires the ID to be explicitly listed in the OBU."
file_name_prefix: "test_000018"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.1/obu_type", "3.9/explicit_audio_substream_id"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000019.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"occuring one after another."
file_name_prefix: "test_000019"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-04-19 00:00:00"
primary_tested_spec_sections: ["3.8/Parameter Block OBU Syntax and Semantics"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000020.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"500 ms sine wav with a frequency of 1000 Hz."
file_name_prefix: "test_000020"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000021.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"frames."
file_name_prefix: "test_000021"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000022.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"distance is incorrect."
file_name_prefix: "test_000022"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000023.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"trimmed frames at the start."
file_name_prefix: "test_000023"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000024.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"frames."
file_name_prefix: "test_000024"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000025.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"version."
file_name_prefix: "test_000025"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000026.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`output_channel_count`."
file_name_prefix: "test_000026"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000027.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`output_gain`."
file_name_prefix: "test_000027"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000028.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`channel_mapping_family`."
file_name_prefix: "test_000028"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000029.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"48 kHz."
file_name_prefix: "test_000029"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: ["3.11.4/sample_rate"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000030.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"44.1 kHz."
file_name_prefix: "test_000030"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: ["3.11.4/sample_rate"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000031.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test_vector_metadata {
human_readable_description: "A stereo IAMF stream with a bit-depth of 24."
file_name_prefix: "test_000031"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000032.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"libopus."
file_name_prefix: "test_000032"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000033.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"libopus."
file_name_prefix: "test_000033"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000034.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"libopus."
file_name_prefix: "test_000034"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000035.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"libopus."
file_name_prefix: "test_000035"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-05 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000036.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"5.1."
file_name_prefix: "test_000036"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000037.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"Opus."
file_name_prefix: "test_000037"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: ["6/ISOBMFF IAMF Encapsulation"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000038.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`ambisonics_mode` = `MONO` with `headphones_rendering_mode == 0`."
file_name_prefix: "test_000038"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000039.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`ambisonics_mode` = `MONO`."
file_name_prefix: "test_000039"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000040.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test_vector_metadata {
"ambisonic audio stream."
file_name_prefix: "test_000040"
is_valid: false
is_valid_to_decode: false
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: ["3.6.3/ambisonics_mono_config"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_000042.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ test_vector_metadata {
"matrix."
file_name_prefix: "test_000042"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
3 changes: 2 additions & 1 deletion tests/test_000043.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ test_vector_metadata {
"matrix."
file_name_prefix: "test_000043"
is_valid: true
validate_user_loudness: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
"3.6.3/ambisonics_projection_config",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_000044.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ test_vector_metadata {
"ambisonics by using a demixing matrix."
file_name_prefix: "test_000044"
is_valid: true
validate_user_loudness: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
"3.6.3/ambisonics_projection_config",
Expand Down
1 change: 1 addition & 0 deletions tests/test_000045.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`ambisonics_mode` = `MONO`."
file_name_prefix: "test_000045"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000046.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"`ambisonics_mode` = `MONO` with an (almost) identity demixing matrix."
file_name_prefix: "test_000046"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
3 changes: 2 additions & 1 deletion tests/test_000048.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ test_vector_metadata {
"`ambisonics_mode` = `PROJECTION` and Opus with coupled stereo channels."
file_name_prefix: "test_000048"
is_valid: true
validate_user_loudness: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
"3.6.3/ambisonics_projection_config",
Expand Down
1 change: 1 addition & 0 deletions tests/test_000049.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"being 5.1."
file_name_prefix: "test_000049"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000050.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"being 7.1.4 and `default_w == 0` with `headphones_rendering_mode == 0`."
file_name_prefix: "test_000050"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
1 change: 1 addition & 0 deletions tests/test_000051.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_vector_metadata {
"being 7.1.2."
file_name_prefix: "test_000051"
is_valid: true
is_valid_to_decode: true
validate_user_loudness: true
mp4_fixed_timestamp: "2023-05-12 00:00:00"
primary_tested_spec_sections: [
Expand Down
Loading

0 comments on commit 1fc6f77

Please sign in to comment.