edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB123515aTahinli3 months ago1526 commits
| 1 | #!/usr/bin/env python3 |
| 2 | """Round-32: field-by-field bisection of `sbrchirp.stream()` (proven to |
| 3 | engage the reference's SBR dequant, env sweep moves power 2941x) against |
| 4 | `sbrpatchmap.stream_one_band()` (never engages -- flat env sweep, warning on |
| 5 | every probe), under the wrap_sbr explicit-ASC harness so implicit-signaling |
| 6 | detection (round-30/31's already-closed blocker) cannot confound the result. |
| 7 | |
| 8 | The two writers differ in exactly three respects (read side-by-side against |
| 9 | `sbr_bits_full`, `write_grid` -- FIL type/count/padding, header cadence, and |
| 10 | grid shape fields are IDENTICAL between them, so those charter-listed |
| 11 | candidates are refuted by inspection, not measurement): |
| 12 | (H) the header/table values: `stream()` uses `one_band_header()` (tiny, |
| 13 | n_low=1/n_q=1, so no delta slots are ever needed); `stream_one_band()` |
| 14 | uses a real multi-band header (A: kx=14/k2=43/n_q=3). |
| 15 | (C) the core content: `broadband_core_bits` (proven-clean comb) vs |
| 16 | `tone_core` (round-27/31 flagged, still-live suspicion). |
| 17 | (W) the envelope/noise delta-Huffman words: `[]` (fine for H's n_slots=0) |
| 18 | vs explicit `[zero_delta] * n_slots` (round-29's FILL-desync fix, |
| 19 | needed once H has real bands). |
| 20 | (W) is mechanically forced by (H) -- header A has n_slots > 0, so it MUST |
| 21 | carry real words or decode is bit-desynced regardless of anything else; it |
| 22 | is not an independent flip, it is included with H below. |
| 23 | |
| 24 | Builds each combination via `stream_one_band`'s own frame writer (broadband |
| 25 | core is swapped in unmodified for the (C=broadband) rows), wraps every env0 |
| 26 | value through `wrap_sbr` (explicit-SBR ASC, mp4/esds), decodes with the |
| 27 | reference, and reports whether power in the predicted in-band window moves |
| 28 | across an env0 sweep (engagement) or not. |
| 29 | """ |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | = |
| 37 | |
| 38 | |
| 39 | # noqa: E402 |
| 40 | # noqa: E402 |
| 41 | # noqa: E402 |
| 42 | # noqa: E402 |
| 43 | |
| 44 | = 7 |
| 45 | = 44100 |
| 46 | = |
| 47 | = |
| 48 | |
| 49 | |
| 50 | |
| 51 | """One stream, mirroring `stream_one_band`'s frame writer exactly, but |
| 52 | with (header_tables, use_words, core) as independent flips.""" |
| 53 | , = |
| 54 | = |
| 55 | |
| 56 | = * 32 + 16 |
| 57 | , = |
| 58 | = |
| 59 | = |
| 60 | = 2 * + 2 * |
| 61 | = |
| 62 | |
| 63 | = |
| 64 | |
| 65 | = |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | = |
| 71 | = |
| 72 | |
| 73 | = // 8 |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | = |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | return |
| 88 | |
| 89 | |
| 90 | |
| 91 | = f |
| 92 | = f |
| 93 | |
| 94 | |
| 95 | = |
| 96 | assert == 0, f |
| 97 | = |
| 98 | |
| 99 | |
| 100 | |
| 101 | = |
| 102 | = |
| 103 | |
| 104 | |
| 105 | return , |
| 106 | |
| 107 | |
| 108 | |
| 109 | , = * / 128, * / 128 |
| 110 | = * 1024 |
| 111 | = |
| 112 | |
| 113 | = |
| 114 | = |
| 115 | = |
| 116 | = & |
| 117 | return |
| 118 | |
| 119 | |
| 120 | |
| 121 | , = |
| 122 | , = , |
| 123 | , = , |
| 124 | |
| 125 | = |
| 126 | , = |
| 127 | |
| 128 | |
| 129 | = |
| 130 | = > 10.0 |
| 131 | |
| 132 | |
| 133 | |
| 134 | return |
| 135 | |
| 136 | |
| 137 | |
| 138 | assert , f |
| 139 | |
| 140 | = |
| 141 | = |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 |