Lane-b128 report -- the 128 root search, its gate tables and the default's blocker
Browse files at this commit7c5d65eb32f737801336abe9e128400ce991b4b9Parent: 664282a- docs
- lane-b128 report -- the 128 root search, its gate tables and the default's blocker
1 changed file +127 -0
- lanes/b128.report.md +127 -0
lanes/b128.report.mdmodified+127 -0
| @@ -77,3 +77,130 @@ open item names is entirely the SEARCH-time vs WRITE-time stack divergence | ||
| 77 | 77 | own reconstruction through `decode_stream` AND through ffmpeg. RED before |
| 78 | 78 | this lane by construction: `write_sb128_root` wrote `PARTITION_SPLIT` at |
| 79 | 79 | every root, so the count was 0 and no such block existed to decode. |
| 80 | + | |
| 81 | +### Census (`EC_AV1_B128_CENSUS=1`, plus a per-row count in the gate) | |
| 82 | + | |
| 83 | +Per row, over the four-quantizer ladder (search took / writer coded -- the | |
| 84 | +writer is higher because the filter search re-codes each tile): | |
| 85 | + | |
| 86 | +| row | 128 roots taken | writer-coded | | |
| 87 | +|---|---|---| | |
| 88 | +| bars 1080p | 3448 | 6013 | | |
| 89 | +| bars 2160p | 4144 | 5827 | | |
| 90 | +| film A | 505 | 1241 | | |
| 91 | +| film B | 1928 | 3189 | | |
| 92 | +| screen capture | 4736 | 4774 | | |
| 93 | + | |
| 94 | +Per frame on film B the census reads e.g. `100 whole 128x128 roots, 336 | |
| 95 | +coded blocks (83.3% of the frame's area at 128)` -- the lever cen3's L1 | |
| 96 | +asked for (38754 coded blocks vs libaom's 16178) is really being pulled. | |
| 97 | +All of them are on INTER frames: a key frame's 128 root still writes SPLIT. | |
| 98 | + | |
| 99 | +## 3. The gate | |
| 100 | + | |
| 101 | +`bd_rate_screen_native`, 12 frames, four quantizers, BD-rate vs libaom | |
| 102 | +`cpu-used 6` / rav1e `speed 6` (lower is better). Both arms from THIS tree, | |
| 103 | +both controls reproduced (not taken from the charter): | |
| 104 | + | |
| 105 | +| row | 64 superblocks (control) | 128 + the 128 root | | |
| 106 | +|---|---|---| | |
| 107 | +| bars 1080p | −2.6 / −18.3 | **−3.3 / −18.9** | | |
| 108 | +| bars 2160p | +8.8 / −13.2 | **+7.9 / −14.0** | | |
| 109 | +| film A (1080p) | +20.6 / −5.1 | **+20.4 / −5.2** | | |
| 110 | +| film B (2160p) | +24.8 / −2.1 | **+24.2 / −2.5** | | |
| 111 | +| screen capture | +14.6 / −33.2 | **+14.4 / −33.2** | | |
| 112 | + | |
| 113 | +Long GOP (`bd_rate_film_long_gop`, 48 frames): | |
| 114 | + | |
| 115 | +| row | 64 superblocks | 128 + the 128 root | | |
| 116 | +|---|---|---| | |
| 117 | +| film A | +24.7 / −7.5 | **+24.4 / −7.7** | | |
| 118 | +| film B | +86.8 / +7.4 | **+85.6 / +6.6** | | |
| 119 | + | |
| 120 | +The 2x2 the charter asked for (film B, 12 frames): | |
| 121 | + | |
| 122 | +| arm | vs libaom | vs rav1e | | |
| 123 | +|---|---|---| | |
| 124 | +| SB64, LR on (control) | +24.8% | −2.1% | | |
| 125 | +| SB128 + 128 root, LR on | **+24.2%** | **−2.5%** | | |
| 126 | +| SB128 + 128 root, LR off (`EC_AV1_LR=0`) | +24.6% | −2.3% | | |
| 127 | + | |
| 128 | +(The SB64 LR-off control was not re-run: the SB64 path is byte-identical to | |
| 129 | +the control tree -- the pins prove it -- and lane-sb128b measured it at | |
| 130 | ++25.4/−1.6. The forced ≥128 LR unit is no longer a loss: LR ON is the better | |
| 131 | +arm on both columns now, the reverse of lane-sb128b's reading.) | |
| 132 | + | |
| 133 | +Every row of both gates is down or flat on both columns. The keep rule | |
| 134 | +HOLDS -- and the default still does not flip. See below. | |
| 135 | + | |
| 136 | +## 4. Why the default stays OFF (the blocker, not this lane's) | |
| 137 | + | |
| 138 | +With `EC_AV1_SB128=1`, **eleven** of this crate's own round-trip tests fail, | |
| 139 | +and they fail with the 128x128 BLOCK switched off (`EC_AV1_B128=0`) too -- | |
| 140 | +i.e. they are lane-sb128's SPLIT-only plumbing, at sizes its own 256x128 | |
| 141 | +witness never covered: | |
| 142 | + | |
| 143 | + stream::tests::decode_stream_round_trips_a_gop | |
| 144 | + stream::tests::decode_stream_round_trips_an_odd_size_gop | |
| 145 | + stream::tests::decode_stream_agrees_with_ffmpeg_on_a_gop | |
| 146 | + stream::tests::decode_stream_matches_the_tile_path_on_a_key_frame | |
| 147 | + stream::tests::streaming_decode_matches_the_collecting_one | |
| 148 | + stream::tests::a_doubly_cut_superblock_root_round_trips_in_every_plane | |
| 149 | + stream::tests::a_sweep_of_doubly_straddling_sizes_round_trips_through_ffmpeg | |
| 150 | + encoder::tests::every_tile_layout_decodes_sample_exact_through_both_decoders | |
| 151 | + encoder::tests::tile_bytes_do_not_depend_on_the_thread_count | |
| 152 | + encoder::tests::a_moving_detail_clip_codes_two_delta_q_levels_both_decoders_read_exactly | |
| 153 | + encode::tests::a_repeated_pattern_key_frame_codes_intrabc_blocks_ffmpeg_decodes_exactly | |
| 154 | + | |
| 155 | +`decode_stream_round_trips_a_gop` fails with exactly the refusal lane-sb128b | |
| 156 | +root-caused ("a reference frame selected with no picture at this frame's own | |
| 157 | +ref_frame_idx slot"), so at least one writer/reader desync is still live in | |
| 158 | +the 128 path at odd sizes / multiple tiles. Two more | |
| 159 | +(`encode::tests::reach_matches_libaom_has_top_right_and_has_bottom_left`, | |
| 160 | +`every_rect_shape_reaches_what_libaom_says_over_the_whole_superblock`) are | |
| 161 | +TEST staleness: they assert libaom's 64-superblock reach tables against a | |
| 162 | +process whose superblock size is 128. | |
| 163 | + | |
| 164 | +A 0.6-point BD win does not buy shipping that, so `SB128_DEFAULT` stays | |
| 165 | +`false` and the whole feature stays behind `EC_AV1_SB128=1`. The next lane | |
| 166 | +is named by this list. | |
| 167 | + | |
| 168 | +## 5. A defect fixed on the way (class: stale header in the test harness) | |
| 169 | + | |
| 170 | +Ten decode round-trip tests encode with THIS process's encoder and then | |
| 171 | +decode the tile directly with a plain `FrameCtx`, whose superblock size is | |
| 172 | +the DECODER default (64) -- not the size the writer used. With 128 | |
| 173 | +superblocks on, the reader skipped the root's partition symbol and the tile | |
| 174 | +desynced at symbol 0 (found by `EC_AV1_SYMTRACE`: the reader's first symbol | |
| 175 | +was the writer's second). `FrameCtx::for_encoder` exists for exactly this | |
| 176 | +and is now used in all ten; the module was swept, and two of the ten were | |
| 177 | +not failing yet. Same shape as the `filter_intra_on()` argument beside them. | |
| 178 | + | |
| 179 | +## Disposition | |
| 180 | + | |
| 181 | +- `deferred`: **HORZ / VERT at the 128 root** (two 128x64 / 64x128 blocks) -- | |
| 182 | + the writer has no rect neighbour recording and the search no rect | |
| 183 | + prediction/SSE at this size; the square NONE arm needed neither. Unblocked | |
| 184 | + by a rect `record_inter`/`record` pair plus a rect trial in | |
| 185 | + `search_root_128`. The decoder already reads both (lane-sb128c r7). | |
| 186 | +- `deferred`: **the 128 block's residual and its compound arm** -- four | |
| 187 | + TX_64X64 luma units interleaved with a TX_32X32 chroma pair per mu chunk, | |
| 188 | + on the offset-10 `txb_skip` rows, plus one `txfm_partition` symbol per | |
| 189 | + chunk. Unblocked by that writer path; `write_inter_block_128` refuses a | |
| 190 | + non-skip block until then, so nothing can silently code one wrong. | |
| 191 | +- `deferred`: **the intra 128 root on key frames** -- the key-frame writer | |
| 192 | + codes SPLIT at every 128 root, as before. | |
| 193 | +- `open`: the eleven pre-existing 128-superblock desyncs above (the default's | |
| 194 | + blocker). | |
| 195 | +- `open`: search-time vs write-time mv stacks still differ (lane-sb128b's own | |
| 196 | + second open item); the writer's clamp makes it safe, not right. | |
| 197 | + | |
| 198 | +## Suite / checks (default OFF, the shipped state) | |
| 199 | + | |
| 200 | + s1 --skip stream:: 340 passed; 0 failed; 34 ignored (RC=0) | |
| 201 | + s2 stream:: --skip 10bit 200 passed; 0 failed; 15 ignored (RC=0) | |
| 202 | + s3 10bit 42 passed; 0 failed; 1 ignored (RC=0) | |
| 203 | + --ignored every_speed_preset_decodes_sample_exact_through_both_decoders ok | |
| 204 | + --ignored a_128_superblock_clip_whose_root_search... ok (406 blocks) | |
| 205 | + the_encoders_own_streams_are_byte_identical_to_their_pins ok, and ok at EC_AV1_SPEED=6 | |
| 206 | + cargo check --workspace --all-targets 0 errors, 0 ec-av1 warnings |