edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB64c4983Tahinli3 months ago1858 commits
| 1 | #!/usr/bin/env python3 |
| 2 | """One-shot probe: does the real decoder read a `bs_pointer` field in |
| 3 | FIXVAR sbr_grid(), and is bs_freq_res transmitted in reverse time order for |
| 4 | that class? Reuses the already-oracle-proven `sbr_bits_full`/`oracle_check` |
| 5 | machinery from sbrpayload_fixtures.py, swapping in a grid writer with a |
| 6 | non-uniform freq_res list and an EXPLICIT (not FILL) codeword for the one |
| 7 | Huffman slot the high-res envelope needs -- FILL's length is book-dependent |
| 8 | and not what we wrote, so byte prediction is only exact with an explicit |
| 9 | word (learned the hard way: FILL made every naive attempt here mismatch by |
| 10 | several bytes even for the untouched baseline). Not part of the pytest/cargo |
| 11 | run -- throwaway measurement, output pasted into the ledger. |
| 12 | """ |
| 13 | |
| 14 | |
| 15 | |
| 16 | = |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | , = |
| 23 | assert == 1 and == 2 and == 1, |
| 24 | |
| 25 | = # (length=2, code=0b00, delta=0) |
| 26 | |
| 27 | |
| 28 | |
| 29 | = 1 |
| 30 | |
| 31 | += 1 |
| 32 | return |
| 33 | |
| 34 | |
| 35 | |
| 36 | = |
| 37 | = - 1 |
| 38 | |
| 39 | |
| 40 | # frame_class = FIXVAR |
| 41 | # var_bord |
| 42 | |
| 43 | |
| 44 | # rel_bord = 2*1+2 = 4 |
| 45 | |
| 46 | |
| 47 | = |
| 48 | |
| 49 | |
| 50 | return , |
| 51 | |
| 52 | return |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | = |
| 58 | = |
| 59 | , = |
| 60 | return , |
| 61 | |
| 62 | |
| 63 | |
| 64 | = |
| 65 | = # env0 high-res (needs the one Huffman slot) |
| 66 | |
| 67 | |
| 68 | = f |
| 69 | |
| 70 |