From 5687b0852a422b3e09a76830643fc4b6fa106fbe Mon Sep 17 00:00:00 2001 From: Johnny Marnell Date: Mon, 28 Oct 2024 09:45:53 -0400 Subject: [PATCH] Try to fix docs, add latest, add failing test --- doc/dev.md | 9 +- format/riff/adm.md | 22 +++ format/riff/common.go | 6 +- format/riff/dolby.go | 20 +-- format/riff/dolby_metadata.md | 2 +- format/riff/testdata/dolby_metadata.fqtest | 192 +++++++++++++++++++++ format/riff/testdata/dolby_metadata.wav | Bin 0 -> 10988 bytes 7 files changed, 234 insertions(+), 17 deletions(-) create mode 100644 format/riff/adm.md create mode 100644 format/riff/testdata/dolby_metadata.fqtest create mode 100644 format/riff/testdata/dolby_metadata.wav diff --git a/doc/dev.md b/doc/dev.md index 5159056a2..508583c1d 100644 --- a/doc/dev.md +++ b/doc/dev.md @@ -38,16 +38,19 @@ Flags can be struct with bit-fields. - Use commit messages with a context prefix to make it easier to find and understand, ex:
`mp3: Validate sync correctly` - Tests: - - If possible use a pair of `testdata/file` and `testdata/file.fqtest` where `file.fqtest` is `$ fq dv file` or `$ fq 'dv,torepr' file` if there is `torepr` support. + - If possible, add one or more pairs of example input file and expected CLI output, with naming like: + - `./format//testdata/.`, e.g. [`./format/mp4/testdata/aac.mp4`](../format/mp4/testdata/aac.mp4) + - and `./format//testdata/.fqtest`, e.g. [`./format/mp4/testdata/aac.fqtest`](../format/mp4/testdata/aac.fqtest) + - The latter contents should be `$ go run . dv ` or `$ go run . 'dv,torepr' ` if there is `torepr` support. - If `dv` produces a lof of output maybe use `dv({array_truncate: 50})` etc - Run `go test ./format -run TestFormats/` to test expected output. - Run `go test ./format -run TestFormats/ -update` to update current output as expected output. - If you have format specific documentation: - Put it in `format/*/.md` and use `//go:embed .md`/`interp.RegisterFS(..)` to embed/register it. - Use simple markdown, just sections (depth starts at 3, `### Section`), paragraphs, lists and links. - - No heading section is needs with format name, will be added by `make doc` and fq cli help system. + - No heading section is needed with format name, will be added by `make doc` and fq cli help system. - Add a `testdata/_help.fqtest` with just `$ fq -h ` to test CLI help. - - If in doubt look at `mp4.md`/`mp4.go` etc. + - If in doubt look at [`mp4.md`](../format/mp4/mp4.md)/[`mp4.go`](../format/mp4/mp4.go) etc. - Run `make README.md doc/formats.md` to update md files. - Run linter `make lint` - Run fuzzer `make fuzz GROUP=`, see usage in Makefile diff --git a/format/riff/adm.md b/format/riff/adm.md new file mode 100644 index 000000000..1ae565e20 --- /dev/null +++ b/format/riff/adm.md @@ -0,0 +1,22 @@ +[Audio Definition Model](https://adm.ebu.io/background/what_is_the_adm.html) including 3D Audio. + +RIFF / WAV / Broadcast Wave Format (BWF) chunks: +- `` Chunk, Track UIDs of Audio Definition Model +- `` Chunk, BWF XML Metadata, e.g. for Audio Definition Model ambisonics and elements + +### Examples +Decode ADM configuration from `` and `` chunks: +```bash +$ fq -d wav '.chunks[] | select(.id | IN("chna", "axml")) | tovalue' amd-bwf.wav + +# Extract ADM chunk objects definitions xml content +$ fq -r -d wav '.chunks[] | select(.id | IN("axml")) | .xml | tovalue' amd-bwf.wav | tee axml-content.xml +``` + +### Authors +- [@johnnymarnell](https://johnnymarnell.github.io), original author + +### References +- https://adm.ebu.io/background/what_is_the_adm.html +- https://tech.ebu.ch/publications/tech3285s7 +- https://tech.ebu.ch/publications/tech3285s5 \ No newline at end of file diff --git a/format/riff/common.go b/format/riff/common.go index 5415390a3..bfea3a850 100644 --- a/format/riff/common.go +++ b/format/riff/common.go @@ -36,9 +36,9 @@ func riffDecode(d *decode.D, path path, headFn func(d *decode.D, path path) (str } }) - wordAlgin := d.AlignBits(16) - if wordAlgin != 0 { - d.FieldRawLen("align", int64(wordAlgin)) + wordAlign := d.AlignBits(16) + if wordAlign != 0 { + d.FieldRawLen("align", int64(wordAlign)) } } diff --git a/format/riff/dolby.go b/format/riff/dolby.go index 5ec16f95c..ce4d90cb7 100644 --- a/format/riff/dolby.go +++ b/format/riff/dolby.go @@ -12,7 +12,7 @@ import ( "github.com/wader/fq/pkg/scalar" ) -func dbmdDecode(d *decode.D, size int64) any { +func tmp_dbmdDecode(d *decode.D, size int64) any { version := d.U32() major := (version >> 24) & 0xFF minor := (version >> 16) & 0xFF @@ -47,9 +47,9 @@ func dbmdDecode(d *decode.D, size int64) any { case 8: parseAudioInfo(d) case 9: - parseDolbyAtmos(d, segmentSize) + parseDolbyAtmos(d) case 10: - parseDolbyAtmosSupplemental(d, segmentSize) + parseDolbyAtmosSupplemental(d) default: d.FieldRawLen("unknown_segment_raw", int64(segmentSize*8)) } @@ -117,7 +117,7 @@ var warpMode = scalar.UintMapDescription{ 4: "not indicated (Default warping will be applied.)", } -var trimConfigName = scalar.UintMapDescription{ +var tmp_trimConfigName = scalar.UintMapDescription{ 0: "2.0", 1: "5.1", 2: "7.1", @@ -134,7 +134,7 @@ var trimType = scalar.UintMapDescription{ 1: "automatic", } -func parseDolbyE(d *decode.D) { +func tmp_parseDolbyE(d *decode.D) { d.FieldValueStr("metadata_segment_type", "dolby_e") d.FieldU8("program_config") @@ -145,7 +145,7 @@ func parseDolbyE(d *decode.D) { d.FieldRawLen("reserved_for_future_use", 80*8) } -func parseDolbyDigital(d *decode.D) { +func tmp_parseDolbyDigital(d *decode.D) { d.FieldValueStr("metadata_segment_type", "dolby_digital") d.FieldU8("ac3_program_id") @@ -166,7 +166,7 @@ func parseDolbyDigital(d *decode.D) { d.FieldRawLen("program_description_text", 32*8) } -func parseDolbyDigitalPlus(d *decode.D) { +func tmp_parseDolbyDigitalPlus(d *decode.D) { d.FieldValueStr("metadata_segment_type", "dolby_digital_plus") d.FieldU8("program_id") @@ -205,7 +205,7 @@ func parseDolbyDigitalPlus(d *decode.D) { d.FieldRawLen("reserved_for_future_use", 69*8) } -func parseAudioInfo(d *decode.D) { +func tmp_parseAudioInfo(d *decode.D) { d.FieldValueStr("metadata_segment_type", "audio_info") d.FieldU8("program_id") @@ -224,7 +224,7 @@ func parseAudioInfo(d *decode.D) { d.FieldUTF8("segment_modified_date", 32) } -func parseDolbyAtmos(d *decode.D, size uint64) { +func tmp_parseDolbyAtmos(d *decode.D, size uint64) { d.FieldValueStr("metadata_segment_type", "dolby_atmos") // d.SeekRel(32 * 8) @@ -248,7 +248,7 @@ func parseDolbyAtmos(d *decode.D, size uint64) { d.SeekRel(80 * 8) } -func parseDolbyAtmosSupplemental(d *decode.D, size uint64) { +func tmp_parseDolbyAtmosSupplemental(d *decode.D, size uint64) { d.FieldValueStr("metadata_segment_type", "dolby_atmos_supplemental") sync := d.FieldU32LE("dasms_sync") diff --git a/format/riff/dolby_metadata.md b/format/riff/dolby_metadata.md index 61fea4242..f3e952e5f 100644 --- a/format/riff/dolby_metadata.md +++ b/format/riff/dolby_metadata.md @@ -4,7 +4,7 @@ including Dolby Atmos, AC3, Dolby Digital \[Plus\], and Dolby Audio Info (e.g. L ### Examples Decode Dolby metadata from `` chunk: ``` -$ fq -d wav '.chunks[] | select(.id | IN("dbmd")) | tovalue' bwf.wav +$ fq -d wav '.chunks[] | select(.id | IN("dbmd")) | tovalue' adm-bwf.wav ``` RIFF / WAV / Broadcast Wave Format (BWF) chunks: diff --git a/format/riff/testdata/dolby_metadata.fqtest b/format/riff/testdata/dolby_metadata.fqtest new file mode 100644 index 000000000..cc9bc6436 --- /dev/null +++ b/format/riff/testdata/dolby_metadata.fqtest @@ -0,0 +1,192 @@ + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: ./format/riff/testdata/dolby_metadata.wav (wav) 0x0-0x2aec (10988) +0x0000|52 49 46 46 |RIFF | id: "RIFF" 0x0-0x4 (4) +0x0000| e4 2a 00 00 | .*.. | size: 10980 0x4-0x8 (4) +0x0000| 57 41 56 45 | WAVE | format: "WAVE" (valid) 0x8-0xc (4) + | | | chunks[0:6]: 0xc-0x2aeb (10975) + | | | [0]{}: chunk 0xc-0x54 (72) +0x0000| 4a 55 4e 4b| JUNK| id: "JUNK" (Alignment) 0xc-0x10 (4) +0x0010|40 00 00 00 |@... | size: 64 0x10-0x14 (4) +0x0010| 00 00 00 00 00 00 00 00 00 00 00 00| ............| data: raw bits 0x14-0x54 (64) +0x0020|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| +* |until 0x53.7 (64) | | + | | | [1]{}: chunk 0x54-0x6c (24) +0x0050| 66 6d 74 20 | fmt | id: "fmt" 0x54-0x58 (4) +0x0050| 10 00 00 00 | .... | size: 16 0x58-0x5c (4) +0x0050| 01 00 | .. | audio_format: "pcm_s16le" (1) 0x5c-0x5e (2) +0x0050| 03 00| ..| num_channels: 3 0x5e-0x60 (2) +0x0060|80 bb 00 00 |.... | sample_rate: 48000 0x60-0x64 (4) +0x0060| 80 97 06 00 | .... | byte_rate: 432000 0x64-0x68 (4) +0x0060| 09 00 | .. | block_align: 9 0x68-0x6a (2) +0x0060| 18 00 | .. | bits_per_sample: 24 0x6a-0x6c (2) + | | | [2]{}: chunk 0x6c-0x1154 (4328) +0x0060| 64 61 74 61| data| id: "data" 0x6c-0x70 (4) +0x0070|e0 10 00 00 |.... | size: 4320 0x70-0x74 (4) +0x0070| 00 00 00 00 00 00 00 00 00 00 00 00| ............| samples: raw bits 0x74-0x1154 (4320) +0x0080|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| +* |until 0x1153.7 (4320) | | + | | | [3]{}: chunk 0x1154-0x2862 (5902) +0x1150| 61 78 6d 6c | axml | id: "axml" (Audio Definition Model ambisonics and elements) 0x1154-0x1158 (4) +0x1150| 06 17 00 00 | .... | size: 5894 0x1158-0x115c (4) +0x1150| 3c 3f 78 6d| \n\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tACO_1001\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAO_1001\n\t\t\t\t\tAO_100b\n\t\t\t\t\t2\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAP_00011001\n\t\t\t\t\tATU_00000001\n\t\t\t\t\tATU_00000002\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAP_00031001\n\t\t\t\t\tATU_00000003\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAC_00011001\n\t\t\t\t\tAC_00011002\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAC_00031001\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tRC_L\n\t\t\t\t\t\t1\n\t\t\t\t\t\t-1.0000000000\n\t\t\t\t\t\t1.0000000000\n\t\t\t\t\t\t0.0000000000\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tRC_R\n\t\t\t\t\t\t1\n\t\t\t\t\t\t1.0000000000\n\t\t\t\t\t\t1.0000000000\n\t\t\t\t\t\t0.0000000000\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t1\n\t\t\t\t\t\t0.0000000000\n\t\t\t\t\t\t1.0000000000\n\t\t\t\t\t\t1\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAC_00011001\n\t\t\t\t\tAP_00011001\n\t\t\t\t\tAT_00011001_01\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAC_00011002\n\t\t\t\t\tAP_00011001\n\t\t\t\t\tAT_00011002_01\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAC_00031001\n\t\t\t\t\tAP_00031001\n\t\t\t\t\tAT_00031001_01\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAS_00011001\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAS_00011002\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAS_00031001\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAT_00011001_01\n\t\t\t\t\tAP_00011001\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAT_00011002_01\n\t\t\t\t\tAP_00011001\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tAT_00031001_01\n\t\t\t\t\tAP_00031001\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\n" 0x115c-0x2862 (5894) +0x1160|6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20|l version="1.0" | +* |until 0x2861.7 (5894) | | + | | | [4]{}: chunk 0x2862-0x28e6 (132) +0x2860| 63 68 6e 61 | chna | id: "chna" (Track UIDs of Audio Definition Model) 0x2862-0x2866 (4) +0x2860| 7c 00 00 00 | |... | size: 124 0x2866-0x286a (4) +0x2860| 03 00 | .. | num_tracks: 3 0x286a-0x286c (2) +0x2860| 03 00 | .. | num_uids: 3 0x286c-0x286e (2) + | | | audio_ids[0:3]: 0x286e-0x28e6 (120) + | | | [0]{}: audio_id 0x286e-0x2896 (40) +0x2860| 01 00| ..| track_index: 1 0x286e-0x2870 (2) +0x2870|41 54 55 5f 30 30 30 30 30 30 30 31 |ATU_00000001 | uid: "ATU_00000001" 0x2870-0x287c (12) +0x2870| 41 54 5f 30| AT_0| track_format_id_reference: "AT_00011001_01" 0x287c-0x288a (14) +0x2880|30 30 31 31 30 30 31 5f 30 31 |0011001_01 | +0x2880| 41 50 5f 30 30 30| AP_000| pack_format_id_reference: "AP_00011001" 0x288a-0x2895 (11) +0x2890|31 31 30 30 31 |11001 | +0x2890| 00 | . | padding: raw bits 0x2895-0x2896 (1) + | | | [1]{}: audio_id 0x2896-0x28be (40) +0x2890| 02 00 | .. | track_index: 2 0x2896-0x2898 (2) +0x2890| 41 54 55 5f 30 30 30 30| ATU_0000| uid: "ATU_00000002" 0x2898-0x28a4 (12) +0x28a0|30 30 30 32 |0002 | +0x28a0| 41 54 5f 30 30 30 31 31 30 30 32 5f| AT_00011002_| track_format_id_reference: "AT_00011002_01" 0x28a4-0x28b2 (14) +0x28b0|30 31 |01 | +0x28b0| 41 50 5f 30 30 30 31 31 30 30 31 | AP_00011001 | pack_format_id_reference: "AP_00011001" 0x28b2-0x28bd (11) +0x28b0| 00 | . | padding: raw bits 0x28bd-0x28be (1) + | | | [2]{}: audio_id 0x28be-0x28e6 (40) +0x28b0| 03 00| ..| track_index: 3 0x28be-0x28c0 (2) +0x28c0|41 54 55 5f 30 30 30 30 30 30 30 33 |ATU_00000003 | uid: "ATU_00000003" 0x28c0-0x28cc (12) +0x28c0| 41 54 5f 30| AT_0| track_format_id_reference: "AT_00031001_01" 0x28cc-0x28da (14) +0x28d0|30 30 33 31 30 30 31 5f 30 31 |0031001_01 | +0x28d0| 41 50 5f 30 30 30| AP_000| pack_format_id_reference: "AP_00031001" 0x28da-0x28e5 (11) +0x28e0|33 31 30 30 31 |31001 | +0x28e0| 00 | . | padding: raw bits 0x28e5-0x28e6 (1) + | | | [5]{}: chunk 0x28e6-0x2aeb (517) +0x28e0| 64 62 6d 64 | dbmd | id: "dbmd" (Dolby Metadata, e.g. Atmos, AC3, Dolby Digital [Plus]) 0x28e6-0x28ea (4) +0x28e0| fe 01 00 00 | .... | size: 510 0x28ea-0x28ee (4) + | | | version{}: 0x28ee-0x28f2 (4) +0x28e0| 06 | . | major: 6 0x28ee-0x28ef (1) +0x28e0| 00| .| minor: 0 0x28ef-0x28f0 (1) +0x28f0|00 |. | patch: 0 0x28f0-0x28f1 (1) +0x28f0| 01 | . | build: 1 0x28f1-0x28f2 (1) + | | | metadata_segments[0:4]: 0x28f2-0x2aeb (505) + | | | [0]{}: metadata_segment 0x28f2-0x2956 (100) +0x28f0| 07 | . | id: "dolby_digital_plus_metadata" (7) 0x28f2-0x28f3 (1) +0x28f0| 60 00 | `. | size: 96 0x28f3-0x28f5 (2) +0x28f0| 00 | . | program_id: 0 0x28f5-0x28f6 (1) +0x28f0| 47 | G | program_info: 71 0x28f6-0x28f7 (1) + | | | lfe_on: true + | | | bitstream_mode: "main audio service: complete main (CM)" +0x28f0| 00 00 | .. | ddplus_reserved_a: 0 0x28f7-0x28f9 (2) +0x28f0| 00 | . | surround_config: 0 0x28f9-0x28fa (1) +0x28f0| 60 | ` | dialnorm_info: 96 0x28fa-0x28fb (1) +0x28f0| 00 | . | langcod: 0 0x28fb-0x28fc (1) +0x28f0| 00 | . | audio_prod_info: 0 0x28fc-0x28fd (1) +0x28f0| 24 | $ | ext_bsi1_word1: 36 0x28fd-0x28fe (1) +0x28f0| 24 | $ | ext_bsi1_word2: 36 0x28fe-0x28ff (1) +0x28f0| 00| .| ext_bsi2_word1: 0 0x28ff-0x2900 (1) +0x2900|00 00 00 |... | ddplus_reserved_b: 0 0x2900-0x2903 (3) +0x2900| 02 | . | compr1: "film_light" (2) 0x2903-0x2904 (1) +0x2900| 02 | . | dynrng1: "film_light" (2) 0x2904-0x2905 (1) +0x2900| 00 00 00 | ... | ddplus_reserved_c: 0 0x2905-0x2908 (3) +0x2900| 00 | . | ddplus_info1: 0 0x2908-0x2909 (1) +0x2900| 00 00 00 00 00 | ..... | ddplus_reserved_d: 0 0x2909-0x290e (5) +0x2900| 00 00| ..| datarate: 0 0x290e-0x2910 (2) +0x2910|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| reserved_for_future_use: raw bits 0x2910-0x2955 (69) +* |until 0x2954.7 (69) | | +0x2950| ad | . | checksum: 0xad 0x2955-0x2956 (1) + | | | [1]{}: metadata_segment 0x2956-0x2a52 (252) +0x2950| 09 | . | id: "dolby_atmos" (9) 0x2956-0x2957 (1) +0x2950| f8 00 | .. | size: 248 0x2957-0x2959 (2) +0x2950| 43 72 65 61 74 65 64| Created| atmos_dbmd_content_creation_preamble: "Created using Dolby equipment" 0x2959-0x2979 (32) +0x2960|20 75 73 69 6e 67 20 44 6f 6c 62 79 20 65 71 75| using Dolby equ| +0x2970|69 70 6d 65 6e 74 00 00 00 |ipment... | +0x2970| 44 6f 6c 62 79 20 41| Dolby A| atmos_dbmd_content_creation_tool: "Dolby Atmos Composer Essential (fiedler audio)" 0x2979-0x29b9 (64) +0x2980|74 6d 6f 73 20 43 6f 6d 70 6f 73 65 72 20 45 73|tmos Composer Es| +* |until 0x29b8.7 (64) | | + | | | version{}: 0x29b9-0x29bc (3) +0x29b0| 01 | . | major: 1 0x29b9-0x29ba (1) +0x29b0| 00 | . | minor: 0 0x29ba-0x29bb (1) +0x29b0| 01 | . | micro: 1 0x29bb-0x29bc (1) +0x29b0| 00 00 00 00| ....| unknown0: raw bits 0x29bc-0x29f1 (53) +0x29c0|03 00 00 00 00 00 00 00 22 ff 00 00 00 00 00 03|........".......| +* |until 0x29f0.7 (53) | | +0x29f0| 83 | . | warp_mode: 131 0x29f1-0x29f2 (1) +0x29f0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ..............| unknown1: raw bits 0x29f2-0x2a01 (15) +0x2a00|00 |. | +0x2a00| f0 00 08 00 00 00 00 00 00 00 00 00 00 00 00| ...............| unknown2: raw bits 0x2a01-0x2a51 (80) +0x2a10|00 f0 00 08 00 00 00 00 00 00 00 00 00 00 00 00|................| +* |until 0x2a50.7 (80) | | +0x2a50| 90 | . | checksum: 0x90 0x2a51-0x2a52 (1) + | | | [2]{}: metadata_segment 0x2a52-0x2aea (152) +0x2a50| 0a | . | id: "dolby_atmos_supplemental" (10) 0x2a52-0x2a53 (1) +0x2a50| 94 00 | .. | size: 148 0x2a53-0x2a55 (2) +0x2a50| bd 6f 72 f8 | .or. | dasms_sync: 0xf8726fbd (valid) 0x2a55-0x2a59 (4) +0x2a50| 03 00 | .. | object_count: 3 0x2a59-0x2a5b (2) +0x2a50| 00 | . | reserved: 0 0x2a5b-0x2a5c (1) + | | | trim_configs[0:9]: 0x2a5c-0x2ae3 (135) + | | | [0]{}: trim_config 0x2a5c-0x2a6b (15) +0x2a50| 01 | . | reserved: raw bits 0x2a5c-0x2a5c.7 (0.7) +0x2a50| 01 | . | type: "automatic" (1) 0x2a5c.7-0x2a5d (0.1) + | | | config_name: "2.0" +0x2a50| 00 00 00| ...| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2a5d-0x2a6b (14) +0x2a60|00 00 00 00 00 00 00 00 00 00 00 |........... | + | | | [1]{}: trim_config 0x2a6b-0x2a7a (15) +0x2a60| 01 | . | reserved: raw bits 0x2a6b-0x2a6b.7 (0.7) +0x2a60| 01 | . | type: "automatic" (1) 0x2a6b.7-0x2a6c (0.1) + | | | config_name: "5.1" +0x2a60| 00 00 00 00| ....| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2a6c-0x2a7a (14) +0x2a70|00 00 00 00 00 00 00 00 00 00 |.......... | + | | | [2]{}: trim_config 0x2a7a-0x2a89 (15) +0x2a70| 01 | . | reserved: raw bits 0x2a7a-0x2a7a.7 (0.7) +0x2a70| 01 | . | type: "automatic" (1) 0x2a7a.7-0x2a7b (0.1) + | | | config_name: "7.1" +0x2a70| 00 00 00 00 00| .....| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2a7b-0x2a89 (14) +0x2a80|00 00 00 00 00 00 00 00 00 |......... | + | | | [3]{}: trim_config 0x2a89-0x2a98 (15) +0x2a80| 01 | . | reserved: raw bits 0x2a89-0x2a89.7 (0.7) +0x2a80| 01 | . | type: "automatic" (1) 0x2a89.7-0x2a8a (0.1) + | | | config_name: "2.1.2" +0x2a80| 00 00 00 00 00 00| ......| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2a8a-0x2a98 (14) +0x2a90|00 00 00 00 00 00 00 00 |........ | + | | | [4]{}: trim_config 0x2a98-0x2aa7 (15) +0x2a90| 01 | . | reserved: raw bits 0x2a98-0x2a98.7 (0.7) +0x2a90| 01 | . | type: "automatic" (1) 0x2a98.7-0x2a99 (0.1) + | | | config_name: "5.1.2" +0x2a90| 00 00 00 00 00 00 00| .......| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2a99-0x2aa7 (14) +0x2aa0|00 00 00 00 00 00 00 |....... | + | | | [5]{}: trim_config 0x2aa7-0x2ab6 (15) +0x2aa0| 01 | . | reserved: raw bits 0x2aa7-0x2aa7.7 (0.7) +0x2aa0| 01 | . | type: "automatic" (1) 0x2aa7.7-0x2aa8 (0.1) + | | | config_name: "7.1.2" +0x2aa0| 00 00 00 00 00 00 00 00| ........| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2aa8-0x2ab6 (14) +0x2ab0|00 00 00 00 00 00 |...... | + | | | [6]{}: trim_config 0x2ab6-0x2ac5 (15) +0x2ab0| 01 | . | reserved: raw bits 0x2ab6-0x2ab6.7 (0.7) +0x2ab0| 01 | . | type: "automatic" (1) 0x2ab6.7-0x2ab7 (0.1) + | | | config_name: "2.1.4" +0x2ab0| 00 00 00 00 00 00 00 00 00| .........| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2ab7-0x2ac5 (14) +0x2ac0|00 00 00 00 00 |..... | + | | | [7]{}: trim_config 0x2ac5-0x2ad4 (15) +0x2ac0| 01 | . | reserved: raw bits 0x2ac5-0x2ac5.7 (0.7) +0x2ac0| 01 | . | type: "automatic" (1) 0x2ac5.7-0x2ac6 (0.1) + | | | config_name: "5.1.4" +0x2ac0| 00 00 00 00 00 00 00 00 00 00| ..........| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2ac6-0x2ad4 (14) +0x2ad0|00 00 00 00 |.... | + | | | [8]{}: trim_config 0x2ad4-0x2ae3 (15) +0x2ad0| 01 | . | reserved: raw bits 0x2ad4-0x2ad4.7 (0.7) +0x2ad0| 01 | . | type: "automatic" (1) 0x2ad4.7-0x2ad5 (0.1) + | | | config_name: "7.1.4" +0x2ad0| 00 00 00 00 00 00 00 00 00 00 00| ...........| raw: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 0x2ad5-0x2ae3 (14) +0x2ae0|00 00 00 |... | + | | | objects[0:3]: 0x2ae3-0x2ae6 (3) +0x2ae0| 00 | . | [0]: 0 object_value 0x2ae3-0x2ae4 (1) +0x2ae0| 00 | . | [1]: 0 object_value 0x2ae4-0x2ae5 (1) +0x2ae0| 00 | . | [2]: 0 object_value 0x2ae5-0x2ae6 (1) + | | | binaural_render_modes[0:3]: 0x2ae6-0x2ae9 (3) +0x2ae0| 84 | . | [0]: "not_indicated" (4) render_mode 0x2ae6-0x2ae7 (1) +0x2ae0| 84 | . | [1]: "not_indicated" (4) render_mode 0x2ae7-0x2ae8 (1) +0x2ae0| 84 | . | [2]: "not_indicated" (4) render_mode 0x2ae8-0x2ae9 (1) +0x2ae0| 3e | > | checksum: 0x3e 0x2ae9-0x2aea (1) + | | | [3]{}: metadata_segment 0x2aea-0x2aeb (1) +0x2ae0| 00 | . | id: "end" (0) 0x2aea-0x2aeb (1) +0x2ae0| 00| | .| | gap0: raw bits 0x2aeb-0x2aec (1) diff --git a/format/riff/testdata/dolby_metadata.wav b/format/riff/testdata/dolby_metadata.wav new file mode 100644 index 0000000000000000000000000000000000000000..9e489453abbf4a2e414c38c2639dea342baa9bf9 GIT binary patch literal 10988 zcmeHN&2HO95MIZCTlv&mdnAY)+5)y@DJTMgRw_$&;YLmb*>2Nb)RnlhnTVuHQnds0 z5TJg59t!j+`UFMarH4L1jybiR{Ue8>EUA*5A^X33rm}l0u3lGusdnC29x$ zML=Db8A3CDJ#Oxs^>(Mb2hNxivM1DKAdOr=)@=Ev-ixE9#HkPOnwnK;h#h4kcbIojJ!DC0DX4cA9Q7b4*Y5#>JmL#SM_WBit&h;a2(203_j4yBr0Jr+_$^ zIt#>dM5M+zjC?nl3OE(L9I+-FIG!UDUDF9*Bb|;IeF1q{%3HL@hCDw&j*&spS>cj; z9vh};)rc)oJ~pySm?Bfe^>_|VlqpJL4z)z$5#~(Ndpl$zj9VCjz3xNpqbGQ++#Yo%GMDdr-06m`|nfn$kDor>VxxR)1-d&jxBe0zZ} zFA(_7dIP^q0N>fT&$rVaGipxt_+! zRqcDMA;aHpoOClOe;__Qa2Wtqb3xRqx=e&e~kn^qJ-A8n#c?1L-9ue^zHvFX0lxfPe6H zgRUV=qvu3THsa@R`2pONPukRj-jD`Vvk}~Kk3+caH=6#i_tIeB zkDZYVml3d->=Eh6X!tICo3p?;3`3B@Wvub>z+v_fy2OV5Bx~IUfC+6=Nz8x5gML-L z