edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | #!/usr/bin/env bash |
| 2 | # gen-ac3dep-fixtures.sh: E-AC-3 dependent-substream fixtures for crates/ec-ac3 (root fixtures/audio). |
| 3 | # |
| 4 | # ffmpeg's E-AC-3 encoder stops at 5.1, so the 7.1 fixtures are spliced: an ffmpeg 5.1 encode |
| 5 | # as the independent substream, and an ffmpeg stereo encode whose frames become dependent |
| 6 | # substreams (scripts/splice-eac3-dependent.py). Outputs: |
| 7 | # ac3dep-src-5.1.eac3 independent source (ffmpeg decodes it: the 5.1 reference) |
| 8 | # ac3dep-src-2.0.eac3 dependent source (ffmpeg decodes it: the 2.0 reference) |
| 9 | # ac3dep-7.1-48000.eac3 5.1 + dependent Lrs/Rrs (chanmap 0x0200) -> 8 channels, "7.1": BL/BR appended |
| 10 | # ac3dep-7.1wide-48000.eac3 5.1 + dependent Lc/Rc (chanmap 0x0400) -> 8 channels, "7.1(wide-side)" |
| 11 | # ac3dep-repl-48000.eac3 5.1 + dependent Ls/Rs (chanmap 0x1800) -> 6 channels, "5.1(side)": the |
| 12 | # dependent replaces the core's Ls/Rs (ffmpeg's placement rule, see dependent.rs) |
| 13 | # Chanmaps are Table E2.5 as a 16-bit value, bit 15 first (see crates/ec-ac3/src/dependent.rs). |
| 14 | # The ac3dep-* names keep these out of decode_matrix's ac3-/eac3- sweep, which decodes one |
| 15 | # syncframe at a time and so cannot read packets that carry a dependent substream. |
| 16 | # |
| 17 | # Usage: scripts/gen-ac3dep-fixtures.sh [--force] |
| 18 | |
| 19 | |
| 20 | ROOT= |
| 21 | OUT="/fixtures/audio" |
| 22 | TMP=/ac3dep-gen |
| 23 | FORCE=0 |
| 24 | [ && FORCE=1 |
| 25 | || { ; ; } |
| 26 | |
| 27 | |
| 28 | # sine_inputs <freq...>: one lavfi sine input per frequency (3 s at 48 kHz), one argument per line. |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | if [ || [; then |
| 37 | # 5.1 order is FL FR FC LFE SL SR (ffmpeg labels AC-3 3/2 as side). The side pair (1100, 1500 Hz) is |
| 38 | # distinct from the dependent stereo pair (880, 1320 Hz), so a placement error shows up in the comparison. |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | fi |
| 44 | if [ || [; then |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | fi |
| 50 | CONVSNR="/scripts/ac3dep-src-2.0.convsnr.txt" |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 |