edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | use *; |
| 2 | use *; |
| 3 | use *; |
| 4 | use *; |
| 5 | use craterun_with_stdin; |
| 6 | use ; |
| 7 | |
| 8 | /// lane-part32 r2: prints the exact mismatch geometry (block coords, |
| 9 | /// got/want pixels) of the pinned seed-42 stream captured off |
| 10 | /// `a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exact` |
| 11 | /// via `EC_AV1_GATE_DUMP`. Debug-only, `#[ignore]`d. |
| 12 | |
| 13 | // The geometry is HARD-CODED to the seed-42 pin (192x128, one frame): |
| 14 | // `ffmpeg_decode_sequence(&stream, 192, 128, 1)` plus the `width = 192` / |
| 15 | // `0..128` scan bounds below. Point it at any other pin and it does not |
| 16 | // say "wrong size" -- it dies inside the ffmpeg oracle with |
| 17 | // `expected 1 4:2:0 frames ... left 196162560 right 36864`. Measured |
| 18 | // against `fixtures/sbpart/seed42.obu` (the 192x128 pin it was written |
| 19 | // for): `total luma mismatches: 0`. |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | /// lane-rect64q r1, recipe rewritten by lane-av1recipehunt: the same |
| 69 | /// encoder-side situation as |
| 70 | /// [`a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exact`] |
| 71 | /// -- a real superblock-level HORZ/VERT partition, so |
| 72 | /// [`crate::decode::decode_block_rect64`] runs -- but with `delta_q` left |
| 73 | /// ON, so that block's dequant sees a running `CURRENT_Q_IDX` that has |
| 74 | /// drifted away from the frame-constant `base_q_idx`. Real aomenc's |
| 75 | /// non-realtime default is `DELTA_Q_OBJECTIVE` (`av1_cx_iface.c:271`); the |
| 76 | /// `--deltaq-mode=0` sibling is the same command line with that one flag |
| 77 | /// added back, and this gate ASSERTS the pair differs (the control arm). |
| 78 | /// |
| 79 | /// **Why r1's recipe could not fire, measured (lane-av1recipehunt).** r1 |
| 80 | /// swept 40 attempts of `gradients` at 192x128 with `frame_count = 1` -- a |
| 81 | /// single KEY frame, and that is the whole reason. A one-frame encode |
| 82 | /// carries no inter frame, and `delta_q_present` needs the temporal (TPL) |
| 83 | /// model to see a spatial complexity map at all. At `frame_count = 1` the |
| 84 | /// sweep read ZERO `delta_q` symbol groups on every attempt: 40/40 streams |
| 85 | /// had `delta_q_hits() == 0` AND `rect64_qidx_drift_hits() == 0` -- a |
| 86 | /// different failure from "the drift never reached a rect64 block", and the |
| 87 | /// reason r1 could not see the feature at all. The fix is a real inter |
| 88 | /// sequence: 4 frames at 512x384 (`8x6` superblocks, so there IS a spatial |
| 89 | /// map for the quantizer to vary over). |
| 90 | /// |
| 91 | /// **The recipe**, exactly (the recorded command line; `--deltaq-mode` is |
| 92 | /// ABSENT, i.e. aomenc's default): |
| 93 | /// ```text |
| 94 | /// ffmpeg -v error -y -f lavfi -i testsrc2=size=512x384:rate=25 \ |
| 95 | /// -pix_fmt yuv420p -frames:v 4 -f yuv4mpegpipe src512.y4m |
| 96 | /// aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=45 --cpu-used=0 \ |
| 97 | /// --threads=1 --row-mt=0 --sb-size=64 --enable-rect-partitions=1 \ |
| 98 | /// --enable-ab-partitions=0 --enable-1to4-partitions=0 \ |
| 99 | /// --min-partition-size=32 --max-partition-size=64 \ |
| 100 | /// --enable-restoration=0 --enable-palette=0 --enable-cdef=0 \ |
| 101 | /// --enable-filter-intra=0 --enable-cfl-intra=0 --enable-intrabc=0 \ |
| 102 | /// --enable-tx-size-search=0 --obu -o out.obu src512.y4m |
| 103 | /// ``` |
| 104 | /// Source `src512.y4m`: 1179730 bytes, sha256 |
| 105 | /// `f430d581497e4f6f7db07d0fc92476e92194e1f96c321988ec0739d475cbbe0c`. |
| 106 | /// Output `crates/ec-av1/fixtures/rect64_dq_drift.obu`: 8384 bytes, sha256 |
| 107 | /// `094e51bb21b6caccc905417e95a03f9131b448071567d0b14ec8850799ea2501` |
| 108 | /// (committed with `git add -f` past the `fixtures` gitignore, like every |
| 109 | /// sibling fixture). The gate re-encodes live and byte-compares against |
| 110 | /// that pin, so the pin is the expected output and not a second decode |
| 111 | /// path. MEASURED on the feature arm: 48 `delta_q` symbol groups read, 17 |
| 112 | /// `rect64_qidx_drift_hits`, `sb_rect_hits` firing (the `inter_rect` |
| 113 | /// census reads `64x32=2 32x64=2`), all 4 frames pixel-exact vs ffmpeg. |
| 114 | /// On the `--deltaq-mode=0` control: 0 groups, 0 drift, also pixel-exact -- |
| 115 | /// so the drift is the delta_q syntax, not some unrelated arm. |
| 116 | /// |
| 117 | /// `--cpu-used=0` is load-bearing, measured: the same source at |
| 118 | /// `--cpu-used=1` and `--cpu-used=3` reads the same 48 `delta_q` groups and |
| 119 | /// drifts ZERO times (the faster presets' RD never leaves a rect64 root in |
| 120 | /// a superblock whose quantizer moved). `--cq-level` is not: 45 and 55 |
| 121 | /// give the identical stream and the same drift count. |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | /// lane-sbpart r4: replays a pinned mismatch byte-for-byte off disk (no |
| 274 | /// aomenc/ffmpeg re-encode), same pattern as `pinned_golden3/4_stream_ |
| 275 | /// decodes_pixel_exact` -- fast red/green loop for the bisect, and lets |
| 276 | /// `EC_AV1_TRACE=1` be set for one run without re-driving the encoder. |
| 277 | /// |
| 278 | /// LIVE since lane-av1pinslive (it was `#[ignore]`d from lane-sbpart r4 |
| 279 | /// only because the bytes lived in a scratchpad). Bytes committed at |
| 280 | /// `crates/ec-av1/fixtures/sbpart-pin.obu` (238 bytes; sha256 |
| 281 | /// `62238fc077f45d89745d4d254b9c0465464003529da3b42d0a65631fbb7e16e9`), |
| 282 | /// re-encoded 2026-09-29 from the source gate's own recipe |
| 283 | /// (`a_real_aomenc_stream_with_rect_screen_content_decodes_pixel_exact`: |
| 284 | /// smptebars 192x128, single frame, `--sb-size=64 --enable-palette=1 |
| 285 | /// --min-partition-size=16 --max-partition-size=64`, cq=55). The command |
| 286 | /// is in `lanes/av1pins.report.md`. That gate's source list has no |
| 287 | /// 192x128 cell, so this pin is a 192x128 re-run of its recipe, not a |
| 288 | /// replay of the original mismatch bytes. |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | |
| 349 | |
| 350 | |
| 351 | |
| 352 | |
| 353 | |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | |
| 368 | /// lane-tx64x16 r1: a real `aomenc` stream whose superblock-level |
| 369 | /// partition decision is `PARTITION_HORZ_4`/`PARTITION_VERT_4` (four |
| 370 | /// 64x16 / 16x64 strips) must decode pixel-exact. Both arms are HARD |
| 371 | /// asserted, and only hits earned inside an attempt that then compared |
| 372 | /// pixel-exact against ffmpeg are counted -- a strip decoded by an |
| 373 | /// attempt that later refused proves nothing (class |
| 374 | /// gate-skips-on-its-own-failure). `--enable-1to4-partitions=1` is the |
| 375 | /// tool switch; `--min-partition-size=16` keeps the RD search from |
| 376 | /// recursing below 16x16, where several other unlanded partition shapes |
| 377 | /// live. |
| 378 | |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | |
| 399 | |
| 400 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | |
| 520 | |
| 521 | |
| 522 | |
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | /// lane-tx64x16 r3: the 32x32-LEVEL 1:4 pair -- `PARTITION_HORZ_4` / |
| 569 | /// `PARTITION_VERT_4` at 32x32, i.e. four 32x8 / 8x32 strips, the arm the |
| 570 | /// ReelB mid-film extract stops at ("a 32x32 partition type this |
| 571 | /// decoder does not code (value=8)"). `--min-partition-size=8` is what |
| 572 | /// lets aomenc's RD reach the 32-level 1:4 shapes; `--max-partition-size=32` |
| 573 | /// keeps the superblock-level pair (already gated by its own test above) |
| 574 | /// out of the counters. Both orientations HARD-asserted per bit depth -- |
| 575 | /// the luma scans and the two new chroma scans (`SCAN_16X4`/`SCAN_4X16`) |
| 576 | /// are transposed pairs, so a one-sided gate cannot catch a transposition |
| 577 | /// (class scan-weights-cross-axis). `rect4_coeff_hits` is asserted too: |
| 578 | /// an all-skip stream would exercise none of the new coefficient tables |
| 579 | /// (class gate-blind-to-feature). Only hits earned inside an attempt that |
| 580 | /// then compared pixel-exact are counted (class |
| 581 | /// gate-skips-on-its-own-failure); the 10-bit arm is what retires |
| 582 | /// `enable-1to4-partitions` from `NEVER_EXERCISED_10BIT`. |
| 583 | /// lane-r14: the 16x16-level 1:4 pair -- four 16x4 (`PARTITION_HORZ_4`) or |
| 584 | /// 4x16 (`PARTITION_VERT_4`) strips, the shape the wall |
| 585 | /// "a 1:4 partition below 16x16" refused. Fixture: 4-PIXEL bands (the |
| 586 | /// 8-pixel ones of the 32-level gate above, one size down -- a 16x4 strip |
| 587 | /// is flat where a 16x8 one is not), transposed per attempt so a |
| 588 | /// transposed scan or nz-map table cannot pass (class |
| 589 | /// scan-weights-cross-axis), plus an explicit-seed noise layer that keeps |
| 590 | /// aomenc out of screen-content mode. `--enable-filter-intra=1` and |
| 591 | /// is ON: this shape reads `use_filter_intra` off its own CDF rows |
| 592 | /// (classes 12/13). The `--enable-tx-size-search=1` half of the window |
| 593 | /// splits the strip's transform (depth 1 = TX_8X4/TX_4X8, depth 2 = |
| 594 | /// TX_4X4). |
| 595 | /// |
| 596 | /// Counters: 16x4 strips, 4x16 strips, chroma-reference strips (the odd |
| 597 | /// strip of each 4:2:0 pair, the only one that codes chroma) and strips |
| 598 | /// with a coded residual must all be nonzero over the compared attempts, |
| 599 | /// and only attempts that DECODED and were compared pixel-exact count |
| 600 | /// (class gate-skips-on-its-own-failure). |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | |
| 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | |
| 859 | |
| 860 | |
| 861 | // lane-tx64x16 r4: the fixture r3 could not find. `gradients` never wins |
| 862 | // a 32-level 1:4 shape; 8-pixel BANDS do -- each 32x8 strip is flat, so |
| 863 | // HORZ_4 beats both HORZ (two bands per 32x16) and SPLIT, while the noise |
| 864 | // layer keeps aomenc out of screen-content mode. Measured 16 HORZ_4 / 24 |
| 865 | // VERT_4 strips per frame, both bit depths (lanes/tx64x16-r4.report.md). |
| 866 | |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | |
| 962 | |
| 963 | |
| 964 | |
| 965 | |
| 966 | |
| 967 | |
| 968 | |
| 969 | |
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 | |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 | |
| 1017 | |
| 1018 | |
| 1019 | |
| 1020 | |
| 1021 | |
| 1022 | |
| 1023 | |
| 1024 | |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 | |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | |
| 1052 | |
| 1053 | |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | |
| 1070 | |
| 1071 | |
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | |
| 1089 | |
| 1090 | |
| 1091 | |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | |
| 1120 | |
| 1121 | |
| 1122 | |
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | /// lane-fi32x8 r1 (class symbol-consumption-gap): the 32x32-level 1:4 |
| 1130 | /// strips (32x8/8x32) are inside `av1_filter_intra_allowed_bsize`'s |
| 1131 | /// "both sides <= 32" bound, so libaom reads a `use_filter_intra` flag on |
| 1132 | /// every DC_PRED one of them -- and `--enable-filter-intra` is ON by |
| 1133 | /// aomenc default, so the sibling gate above (which spells it `=0`) could |
| 1134 | /// never see it. `filter_intra_size_class_rect` had no row for either |
| 1135 | /// shape, so the symbol was never read and the tile desynced silently |
| 1136 | /// from that strip on. Same band fixture as the sibling (8-px bands + |
| 1137 | /// seeded noise, both orientations), the ONLY recipe change being |
| 1138 | /// `--enable-filter-intra=1` appended AFTER the base recipe (aomenc keeps |
| 1139 | /// the LAST occurrence of a repeated `--enable-*` flag). The counter is |
| 1140 | /// this shape's OWN (`filter_intra_rect4_hits`), not the shared rect one, |
| 1141 | /// so a filter-intra 16x8 strip elsewhere in the frame cannot stand in |
| 1142 | /// for it; only hits earned inside an attempt that then compared |
| 1143 | /// pixel-exact are counted (class gate-skips-on-its-own-failure), and |
| 1144 | /// both bit depths are asserted independently. |
| 1145 | /// |
| 1146 | /// `--enable-tx-size-search=0` is kept from the sibling recipe: a 1:4 |
| 1147 | /// strip with `tx_depth != 0` is still refused by name ("a 32x32-level |
| 1148 | /// 1:4 strip with a split transform"), so a search-on arm would only |
| 1149 | /// harvest refusals, not coverage -- filter intra is proven at depth 0 |
| 1150 | /// here and the per-TU case belongs to the round that lifts that refusal. |
| 1151 | |
| 1152 | |
| 1153 | |
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | |
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | |
| 1177 | |
| 1178 | |
| 1179 | |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | |
| 1184 | |
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | |
| 1192 | |
| 1193 | |
| 1194 | |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | |
| 1199 | |
| 1200 | |
| 1201 | |
| 1202 | |
| 1203 | |
| 1204 | |
| 1205 | |
| 1206 | |
| 1207 | |
| 1208 | |
| 1209 | |
| 1210 | |
| 1211 | |
| 1212 | |
| 1213 | |
| 1214 | |
| 1215 | |
| 1216 | |
| 1217 | |
| 1218 | |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | |
| 1226 | |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 | |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | |
| 1245 | |
| 1246 | |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | |
| 1267 | |
| 1268 | |
| 1269 | |
| 1270 | |
| 1271 | |
| 1272 | |
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | |
| 1299 | |
| 1300 | |
| 1301 | |
| 1302 | |
| 1303 | |
| 1304 | |
| 1305 | |
| 1306 | |
| 1307 | |
| 1308 | |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | |
| 1315 | |
| 1316 | |
| 1317 | |
| 1318 | |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | |
| 1332 | |
| 1333 | |
| 1334 | |
| 1335 | |
| 1336 | |
| 1337 | |
| 1338 | |
| 1339 | |
| 1340 | |
| 1341 | |
| 1342 | |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | |
| 1355 | |
| 1356 | |
| 1357 | |
| 1358 | |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | |
| 1363 | |
| 1364 | |
| 1365 | |
| 1366 | |
| 1367 | |
| 1368 | |
| 1369 | |
| 1370 | |
| 1371 | |
| 1372 | |
| 1373 | |
| 1374 | |
| 1375 | |
| 1376 | |
| 1377 | |
| 1378 | |
| 1379 | |
| 1380 | |
| 1381 | |
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | |
| 1386 | |
| 1387 | |
| 1388 | |
| 1389 | |
| 1390 | |
| 1391 | |
| 1392 | |
| 1393 | |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | |
| 1398 | |
| 1399 | |
| 1400 | |
| 1401 | |
| 1402 | |
| 1403 | |
| 1404 | /// lane-kf900 r1: a SKIPPED 8x8 intra leaf whose `tx_depth` symbol |
| 1405 | /// resolved to TX_4X4 must publish 4 -- not its 8-px block side -- to the |
| 1406 | /// next block's `get_tx_size_context` (libaom `set_txfm_ctxs(mbmi->tx_size, |
| 1407 | /// ..., skip_txfm && is_inter_block(mbmi), xd)`; that skip term is always 0 |
| 1408 | /// for an intra block). `decode_leaf8`'s tail wrote the literal 8, so the |
| 1409 | /// rect strip below such a leaf read `tx_size_cat1` row 2 where libaom |
| 1410 | /// reads row 1 -- same alphabet, wrong CDF row, the msac range diverged |
| 1411 | /// mid-frame with NO refusal. `skip_split_tx_hits` was `pub` and asserted |
| 1412 | /// by no gate at all before this one (class `tool-disabled-in-every-gate`). |
| 1413 | |
| 1414 | |
| 1415 | |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | |
| 1422 | |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 | |
| 1431 | |
| 1432 | |
| 1433 | |
| 1434 | |
| 1435 | /// [`a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_pixel_exact`]'s |
| 1436 | /// 10-bit arm -- the film that exposed the defect is yuv420p10le. |
| 1437 | |
| 1438 | |
| 1439 | |
| 1440 | |
| 1441 | |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | |
| 1446 | |
| 1447 | |
| 1448 | |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | |
| 1453 | |
| 1454 | |
| 1455 | |
| 1456 | |
| 1457 | |
| 1458 | |
| 1459 | |
| 1460 | |
| 1461 | |
| 1462 | |
| 1463 | |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | |
| 1471 | |
| 1472 | |
| 1473 | /// lane-t900 r19, the defect this arm exists for, now FIXED: spec 5.11.2 |
| 1474 | /// `decode_tile` resets `RefLrWiener`/`RefSgrXqd` (the running |
| 1475 | /// loop-restoration coefficient reference) to the midpoint filter at the |
| 1476 | /// top of EVERY tile; `decode.rs` declared that state once per frame, so |
| 1477 | /// every tile after the first decoded its Wiener/Sgrproj coefficients off |
| 1478 | /// the previous tile's reference. The symbol COUNT is unchanged, so |
| 1479 | /// entropy and reconstruction stayed byte-exact and only the filtered |
| 1480 | /// pixels moved -- at seed 44 frame 0 (the key frame) the whole right tile |
| 1481 | /// column, luma x[128..255] y[0..91], 1330 samples off by at most 2, with |
| 1482 | /// chroma exact. Ladder that named it: `EC_AV1_PREFILT_DUMP` exact, |
| 1483 | /// `EC_AV1_POSTDEBLOCK_DUMP` exact, `EC_AV1_POSTCDEF_DUMP` exact (that |
| 1484 | /// last rung added to the oracle's `decodeframe.c` in this round), so the |
| 1485 | /// only remaining stage was loop restoration. |
| 1486 | |
| 1487 | |
| 1488 | |
| 1489 | |
| 1490 | |
| 1491 | |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | |
| 1499 | |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | |
| 1504 | |
| 1505 | |
| 1506 | /// lane-tiles r11, the defect this arm exists for: `palette_ctx_and_cache` |
| 1507 | /// / `palette_uv_cache` (`decode.rs`) read the LEFT palette neighbour with |
| 1508 | /// no availability guard at all, where libaom's `av1_get_palette_cache` |
| 1509 | /// takes `xd->left_mbmi`, which is NULL at the block's own TILE left |
| 1510 | /// column. A second tile column therefore inherited the previous tile's |
| 1511 | /// palette colours and `palette_y_mode` ctx. Screen content is what makes |
| 1512 | /// aomenc pick palette at all, so this arm drives `--tune-content=screen |
| 1513 | /// --enable-palette=1` over a 2-column grid and asserts a real palette |
| 1514 | /// block actually fired. |
| 1515 | /// `#[ignore]`d at r11 and NOT yet proof of the fix: with the broad tool |
| 1516 | /// set every seed refuses before a palette block reconstructs |
| 1517 | /// ("a HORZ_A/HORZ_B/VERT_A partition below 16x16"), and the per-arm |
| 1518 | /// `extra` overrides do not switch the base recipe's tools off -- aomenc |
| 1519 | /// keeps the FIRST occurrence of a repeated `--enable-*` flag (measured: |
| 1520 | /// appending `--enable-rect-partitions=0` after the base `=1` changed the |
| 1521 | /// refusal not at all). Next round: put `extra` BEFORE the base list in |
| 1522 | /// `run_multi_tile_gate`'s args, then this arm should reach a palette |
| 1523 | /// block on smptebars with rect/ab off. |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | |
| 1534 | |
| 1535 | |
| 1536 | |
| 1537 | |
| 1538 | |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | |
| 1549 | |
| 1550 | |
| 1551 | |
| 1552 | |
| 1553 | |
| 1554 | |
| 1555 | |
| 1556 | |
| 1557 | |
| 1558 | |
| 1559 | |
| 1560 | |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | |
| 1570 | |
| 1571 | |
| 1572 | |
| 1573 | |
| 1574 | |
| 1575 | |
| 1576 | |
| 1577 | |
| 1578 | |
| 1579 | /// lane-rectchroma r1: a real `aomenc` stream in which a HORZ/VERT strip |
| 1580 | /// splits its transform (`--enable-tx-size-search` left ON) and whose |
| 1581 | /// chroma half is one of the four rect shapes that had NO coefficient |
| 1582 | /// tables in [`crate::decode`] before this round -- 32x8 / 8x32 (the 1:4 |
| 1583 | /// superblock strips 64x16 / 16x64) and 8x4 / 4x8 (the 8x16 / 16x8 rect |
| 1584 | /// of a 16x16-level AB partition). Every such strip refused by name |
| 1585 | /// ("a coded HORZ/VERT strip whose chroma transform has no rect |
| 1586 | /// coefficient tables here"), which is where both ReelC extracts stopped. |
| 1587 | /// |
| 1588 | /// Per-shape counters, deltas taken only over attempts that then compared |
| 1589 | /// pixel-exact (class counter-from-refused-stream), on 8 AND 10 bit (his |
| 1590 | /// films are `yuv420p10le`). Odd seeds render the source transposed so |
| 1591 | /// the 32x8/8x32 and 8x4/4x8 pairs both fire -- a single-orientation |
| 1592 | /// sweep cannot catch a transposed scan table (class |
| 1593 | /// scan-weights-cross-axis). |
| 1594 | |
| 1595 | |
| 1596 | |
| 1597 | |
| 1598 | |
| 1599 | |
| 1600 | |
| 1601 | |
| 1602 | |
| 1603 | |
| 1604 | |
| 1605 | |
| 1606 | |
| 1607 | |
| 1608 | |
| 1609 | |
| 1610 | |
| 1611 | |
| 1612 | |
| 1613 | |
| 1614 | |
| 1615 | |
| 1616 | |
| 1617 | |
| 1618 | |
| 1619 | |
| 1620 | |
| 1621 | |
| 1622 | |
| 1623 | |
| 1624 | |
| 1625 | |
| 1626 | |
| 1627 | |
| 1628 | |
| 1629 | |
| 1630 | |
| 1631 | |
| 1632 | |
| 1633 | |
| 1634 | |
| 1635 | |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | |
| 1641 | |
| 1642 | |
| 1643 | |
| 1644 | |
| 1645 | |
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | |
| 1653 | |
| 1654 | |
| 1655 | |
| 1656 | |
| 1657 | |
| 1658 | |
| 1659 | |
| 1660 | |
| 1661 | |
| 1662 | |
| 1663 | |
| 1664 | |
| 1665 | |
| 1666 | |
| 1667 | |
| 1668 | |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | |
| 1673 | |
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 | |
| 1686 | |
| 1687 | |
| 1688 | |
| 1689 | |
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 | |
| 1694 | |
| 1695 | |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | |
| 1701 | |
| 1702 | |
| 1703 | |
| 1704 | |
| 1705 | |
| 1706 | |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | |
| 1711 | |
| 1712 | |
| 1713 | |
| 1714 | |
| 1715 | |
| 1716 | |
| 1717 | |
| 1718 | |
| 1719 | |
| 1720 | |
| 1721 | |
| 1722 | |
| 1723 | |
| 1724 | |
| 1725 | |
| 1726 | |
| 1727 | |
| 1728 | |
| 1729 | |
| 1730 | |
| 1731 | |
| 1732 | |
| 1733 | |
| 1734 | |
| 1735 | |
| 1736 | |
| 1737 | |
| 1738 | |
| 1739 | |
| 1740 | |
| 1741 | |
| 1742 | |
| 1743 | |
| 1744 | |
| 1745 | |
| 1746 | |
| 1747 | |
| 1748 | |
| 1749 | |
| 1750 | |
| 1751 | |
| 1752 | |
| 1753 | |
| 1754 | |
| 1755 | |
| 1756 | |
| 1757 | |
| 1758 | |
| 1759 | |
| 1760 | |
| 1761 | |
| 1762 | |
| 1763 | |
| 1764 | |
| 1765 | |
| 1766 | |
| 1767 | |
| 1768 | |
| 1769 | |
| 1770 | |
| 1771 | |
| 1772 | |
| 1773 | |
| 1774 | |
| 1775 | |
| 1776 | |
| 1777 | |
| 1778 | |
| 1779 | |
| 1780 | |
| 1781 | |
| 1782 | |
| 1783 | |
| 1784 | |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 | |
| 1792 | |
| 1793 | |
| 1794 | |
| 1795 | |
| 1796 | |
| 1797 | |
| 1798 | |
| 1799 | |
| 1800 | |
| 1801 | |
| 1802 | |
| 1803 | |
| 1804 | |
| 1805 | |
| 1806 | |
| 1807 | /// PIN for the stream the chroma-rect gate used to exclude: cq 32 seed 46 |
| 1808 | /// mismatched ffmpeg at BOTH bit depths while carrying zero 1:4 strips. |
| 1809 | /// The defect was the per-transform-unit intra reach (lane-band46 / |
| 1810 | /// palette2 r12); un-ignored 2026-09-02 once it decoded pixel-exact. |
| 1811 | |
| 1812 | |
| 1813 | |
| 1814 | |
| 1815 | |
| 1816 | |
| 1817 | |
| 1818 | |
| 1819 | |
| 1820 | |
| 1821 | |
| 1822 | |
| 1823 | |
| 1824 | |
| 1825 | |
| 1826 | |
| 1827 | |
| 1828 | |
| 1829 | |
| 1830 | |
| 1831 | |
| 1832 | |
| 1833 | |
| 1834 | |
| 1835 | |
| 1836 | |
| 1837 | |
| 1838 | |
| 1839 | |
| 1840 | |
| 1841 | |
| 1842 | |
| 1843 | |
| 1844 | |
| 1845 | |
| 1846 | |
| 1847 | |
| 1848 | |
| 1849 | |
| 1850 | |
| 1851 | |
| 1852 | |
| 1853 | |
| 1854 | |
| 1855 | |
| 1856 | |
| 1857 | /// lane-band46 r1: a real `aomenc` band stream whose 16x16 (and 8x8) |
| 1858 | /// intra blocks SPLIT their transform, so every unit but the first |
| 1859 | /// answers `has_top_right`/`has_bottom_left` from its `row_off`/`col_off` |
| 1860 | /// inside the parent block rather than from the standalone-block tables |
| 1861 | /// (libaom `reconintra.c`; class reach-is-per-transform-unit). |
| 1862 | /// |
| 1863 | /// Seed 46 of the sibling 1:4-strip recipe is the stream that found it: |
| 1864 | /// it carries ZERO 1:4 strips, so that gate skipped it as out of scope |
| 1865 | /// while frame 0 luma mismatched ffmpeg over 916 samples -- the first at |
| 1866 | /// (x 14, y 18), the second 8x8 transform unit of the D203_PRED block at |
| 1867 | /// mi (4, 0), whose bottom-left samples sit in a unit that is not |
| 1868 | /// reconstructed yet (`col_off > 0` => `has_bottom_left` is 0). The full |
| 1869 | /// mode-info range ladder matched aomdec element for element, so the |
| 1870 | /// defect was reconstruction, never entropy. |
| 1871 | /// |
| 1872 | /// The gate asserts the fix FIRED (`split_tu_reach_fix_hits`, transform |
| 1873 | /// units whose reach differs from the old standalone answer) on 8 AND 10 |
| 1874 | /// bit, and that seed 46 itself decodes pixel-exact. |
| 1875 | |
| 1876 | |
| 1877 | |
| 1878 | |
| 1879 | |
| 1880 | |
| 1881 | |
| 1882 | |
| 1883 | |
| 1884 | |
| 1885 | |
| 1886 | |
| 1887 | |
| 1888 | |
| 1889 | |
| 1890 | |
| 1891 | |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | |
| 1899 | |
| 1900 | |
| 1901 | |
| 1902 | |
| 1903 | |
| 1904 | |
| 1905 | |
| 1906 | |
| 1907 | |
| 1908 | |
| 1909 | |
| 1910 | |
| 1911 | |
| 1912 | |
| 1913 | |
| 1914 | |
| 1915 | |
| 1916 | |
| 1917 | |
| 1918 | |
| 1919 | |
| 1920 | |
| 1921 | |
| 1922 | |
| 1923 | |
| 1924 | |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | |
| 1929 | |
| 1930 | |
| 1931 | |
| 1932 | |
| 1933 | |
| 1934 | |
| 1935 | |
| 1936 | |
| 1937 | |
| 1938 | |
| 1939 | |
| 1940 | |
| 1941 | |
| 1942 | |
| 1943 | |
| 1944 | |
| 1945 | |
| 1946 | |
| 1947 | |
| 1948 | |
| 1949 | |
| 1950 | |
| 1951 | |
| 1952 | |
| 1953 | |
| 1954 | |
| 1955 | |
| 1956 | |
| 1957 | |
| 1958 | |
| 1959 | |
| 1960 | |
| 1961 | |
| 1962 | |
| 1963 | |
| 1964 | |
| 1965 | |
| 1966 | |
| 1967 | |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | |
| 1972 | |
| 1973 | |
| 1974 | |
| 1975 | |
| 1976 | |
| 1977 | |
| 1978 | |
| 1979 | |
| 1980 | |
| 1981 | |
| 1982 | |
| 1983 | |
| 1984 | |
| 1985 | |
| 1986 | |
| 1987 | |
| 1988 | |
| 1989 | |
| 1990 | |
| 1991 | |
| 1992 | |
| 1993 | |
| 1994 | |
| 1995 | |
| 1996 | |
| 1997 | |
| 1998 | |
| 1999 | |
| 2000 | |
| 2001 | |
| 2002 | |
| 2003 | |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | |
| 2009 | |
| 2010 | |
| 2011 | |
| 2012 | |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | |
| 2017 | |
| 2018 | |
| 2019 | |
| 2020 | |
| 2021 | |
| 2022 | |
| 2023 | |
| 2024 | |
| 2025 | |
| 2026 | |
| 2027 | |
| 2028 | |
| 2029 | |
| 2030 | |
| 2031 | |
| 2032 | |
| 2033 | |
| 2034 | |
| 2035 | |
| 2036 | |
| 2037 | |
| 2038 | |
| 2039 | |
| 2040 | |
| 2041 | |
| 2042 | |
| 2043 | |
| 2044 | |
| 2045 | |
| 2046 | |
| 2047 | |
| 2048 | |
| 2049 | |
| 2050 | |
| 2051 | |
| 2052 | |
| 2053 | |
| 2054 | |
| 2055 | |
| 2056 | |
| 2057 | |
| 2058 | |
| 2059 | |
| 2060 | |
| 2061 | |
| 2062 | |
| 2063 | |
| 2064 | |
| 2065 | /// lane-hgkf r1: a frame whose height (or width) is not a multiple of the |
| 2066 | /// block size makes the last superblock row (column) read a GATHERED |
| 2067 | /// partition bit instead of a full alphabet symbol -- and libaom's |
| 2068 | /// `ec_read_partition_impl` answers that bit with `PARTITION_HORZ` |
| 2069 | /// (resp. `VERT`) when it is 0, only `SPLIT` when it is 1. All three |
| 2070 | /// key-frame edge readers (64-, 32- and 16-level) read the bit and threw |
| 2071 | /// it away, forcing SPLIT; every such frame desynced at the first block |
| 2072 | /// of its partial row. 192x136 / 136x192 is the smallest shape that hits |
| 2073 | /// all three levels at once (136 = 2*64 + 8, so mi_rows = 34: the 64-, |
| 2074 | /// 32- and 16-level halves all fall outside), and it is the shape of a |
| 2075 | /// real 3840x1608 10-bit film key frame (1608 mod 64 == 8) that decoded |
| 2076 | /// 51768 samples wrong before this round. |
| 2077 | /// |
| 2078 | /// The counter is sampled per attempt and read only on an attempt that |
| 2079 | /// decoded AND is pixel-compared; slot 0/2 (the bit taken as HORZ/VERT) |
| 2080 | /// must be nonzero or the gate proves nothing -- before this round that |
| 2081 | /// arm was unreachable by construction. |
| 2082 | |
| 2083 | |
| 2084 | |
| 2085 | |
| 2086 | |
| 2087 | |
| 2088 | |
| 2089 | |
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | |
| 2094 | |
| 2095 | |
| 2096 | |
| 2097 | |
| 2098 | |
| 2099 | |
| 2100 | |
| 2101 | |
| 2102 | |
| 2103 | |
| 2104 | |
| 2105 | |
| 2106 | |
| 2107 | |
| 2108 | |
| 2109 | |
| 2110 | |
| 2111 | |
| 2112 | |
| 2113 | |
| 2114 | |
| 2115 | |
| 2116 | |
| 2117 | |
| 2118 | |
| 2119 | |
| 2120 | |
| 2121 | |
| 2122 | |
| 2123 | |
| 2124 | |
| 2125 | |
| 2126 | |
| 2127 | |
| 2128 | |
| 2129 | |
| 2130 | |
| 2131 | |
| 2132 | |
| 2133 | |
| 2134 | |
| 2135 | |
| 2136 | |
| 2137 | |
| 2138 | |
| 2139 | |
| 2140 | |
| 2141 | |
| 2142 | |
| 2143 | |
| 2144 | |
| 2145 | |
| 2146 | |
| 2147 | |
| 2148 | |
| 2149 | |
| 2150 | |
| 2151 | |
| 2152 | |
| 2153 | |
| 2154 | |
| 2155 | |
| 2156 | |
| 2157 | |
| 2158 | |
| 2159 | |
| 2160 | |
| 2161 | |
| 2162 | |
| 2163 | |
| 2164 | |
| 2165 | |
| 2166 | |
| 2167 | |
| 2168 | |
| 2169 | |
| 2170 | |
| 2171 | |
| 2172 | |
| 2173 | |
| 2174 | |
| 2175 | |
| 2176 | |
| 2177 | |
| 2178 | |
| 2179 | |
| 2180 | |
| 2181 | |
| 2182 | |
| 2183 | |
| 2184 | |
| 2185 | |
| 2186 | |
| 2187 | |
| 2188 | |
| 2189 | |
| 2190 | |
| 2191 | |
| 2192 | |
| 2193 | |
| 2194 | |
| 2195 | |
| 2196 | |
| 2197 | |
| 2198 | |
| 2199 | |
| 2200 | |
| 2201 | |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | |
| 2206 | |
| 2207 | |
| 2208 | |
| 2209 | |
| 2210 | |
| 2211 | |
| 2212 | |
| 2213 | |
| 2214 | |
| 2215 | |
| 2216 | |
| 2217 | |
| 2218 | |
| 2219 | |
| 2220 | |
| 2221 | |
| 2222 | |
| 2223 | |
| 2224 | |
| 2225 | |
| 2226 | |
| 2227 | |
| 2228 | |
| 2229 | |
| 2230 | |
| 2231 | |
| 2232 | |
| 2233 | |
| 2234 | |
| 2235 | |
| 2236 | |
| 2237 | |
| 2238 | |
| 2239 | |
| 2240 | |
| 2241 | |
| 2242 | |
| 2243 | |
| 2244 | |
| 2245 | |
| 2246 | |
| 2247 | |
| 2248 | |
| 2249 | |
| 2250 | |
| 2251 | |
| 2252 | |
| 2253 | |
| 2254 | |
| 2255 | |
| 2256 | |
| 2257 | |
| 2258 | |
| 2259 | |
| 2260 | |
| 2261 | |
| 2262 | |
| 2263 | |
| 2264 | |
| 2265 | |
| 2266 | |
| 2267 | |
| 2268 | |
| 2269 | |
| 2270 | |
| 2271 | |
| 2272 | |
| 2273 | |
| 2274 | |
| 2275 | |
| 2276 | |
| 2277 | |
| 2278 | |
| 2279 | |
| 2280 | |
| 2281 | |
| 2282 | |
| 2283 | |
| 2284 | |
| 2285 | |
| 2286 | |
| 2287 | |
| 2288 | |
| 2289 | |
| 2290 | |
| 2291 | |
| 2292 | |
| 2293 | |
| 2294 | |
| 2295 | /// lane-rectchroma2 r1, the defect this gate exists for: our inter path |
| 2296 | /// predicts a RECTANGULAR block over its enclosing SQUARE buffer |
| 2297 | /// (`side`x`side`, `chroma_side`x`chroma_side` -- see |
| 2298 | /// [`crate::decode`]'s `write_w`/`write_h` corner-cut), and |
| 2299 | /// [`crate::mc::predict_with_filters`] took libaom's narrow-block 4-tap |
| 2300 | /// decision from that buffer's dimensions. libaom |
| 2301 | /// (`av1_get_interp_filter_params_with_block_size`, called per axis from |
| 2302 | /// `inter_predictor` with `w` then `h`) takes it from the PREDICTION |
| 2303 | /// block's own dimensions, so an 8x16 / 16x8 inter block -- whose chroma |
| 2304 | /// is 4x8 / 8x4 -- must use the 4-tap kernel on the short axis. Luma is |
| 2305 | /// never <= 4 wide here, which is exactly why every such stream decoded |
| 2306 | /// LUMA EXACT and differed by +-1 on scattered chroma samples of those |
| 2307 | /// blocks (lane-interedge r1's 192x128 control, a size with no frame-edge |
| 2308 | /// node at all). |
| 2309 | /// |
| 2310 | /// Full-plane (Y+U+V) compare of EVERY decode-order frame |
| 2311 | /// (`--lag-in-frames=0`), both orientations (192x128 and its transposed |
| 2312 | /// twin, so the 4x8 and 8x4 chroma shapes both fire -- class |
| 2313 | /// `scan-weights-cross-axis`), 8 AND 10 bit (his films are yuv420p10le), |
| 2314 | /// cq 20/32/45, CDEF and loop restoration left ON. The counter is reset |
| 2315 | /// per attempt and read only on an attempt that decoded and compared |
| 2316 | /// (class `counter-from-refused-stream`); it counts predictions whose |
| 2317 | /// kernel choice DIFFERS from what the square buffer would have given, so |
| 2318 | /// a zero means the recipe lost the shape this gate pins. |
| 2319 | |
| 2320 | |
| 2321 | |
| 2322 | |
| 2323 | |
| 2324 | |
| 2325 | |
| 2326 | |
| 2327 | |
| 2328 | |
| 2329 | |
| 2330 | |
| 2331 | |
| 2332 | |
| 2333 | |
| 2334 | |
| 2335 | |
| 2336 | |
| 2337 | |
| 2338 | |
| 2339 | |
| 2340 | |
| 2341 | |
| 2342 | |
| 2343 | |
| 2344 | |
| 2345 | |
| 2346 | |
| 2347 | |
| 2348 | |
| 2349 | |
| 2350 | |
| 2351 | |
| 2352 | |
| 2353 | |
| 2354 | |
| 2355 | |
| 2356 | |
| 2357 | |
| 2358 | |
| 2359 | |
| 2360 | |
| 2361 | |
| 2362 | |
| 2363 | |
| 2364 | |
| 2365 | |
| 2366 | |
| 2367 | |
| 2368 | |
| 2369 | |
| 2370 | |
| 2371 | |
| 2372 | |
| 2373 | |
| 2374 | |
| 2375 | |
| 2376 | |
| 2377 | |
| 2378 | |
| 2379 | |
| 2380 | |
| 2381 | |
| 2382 | |
| 2383 | |
| 2384 | |
| 2385 | |
| 2386 | |
| 2387 | |
| 2388 | |
| 2389 | |
| 2390 | |
| 2391 | |
| 2392 | |
| 2393 | |
| 2394 | |
| 2395 | |
| 2396 | |
| 2397 | |
| 2398 | |
| 2399 | |
| 2400 | |
| 2401 | |
| 2402 | |
| 2403 | |
| 2404 | |
| 2405 | |
| 2406 | |
| 2407 | |
| 2408 | |
| 2409 | |
| 2410 | |
| 2411 | |
| 2412 | |
| 2413 | |
| 2414 | |
| 2415 | |
| 2416 | |
| 2417 | |
| 2418 | |
| 2419 | |
| 2420 | |
| 2421 | |
| 2422 | |
| 2423 | |
| 2424 | |
| 2425 | |
| 2426 | |
| 2427 | |
| 2428 | |
| 2429 | |
| 2430 | |
| 2431 | |
| 2432 | |
| 2433 | |
| 2434 | |
| 2435 | |
| 2436 | |
| 2437 | |
| 2438 | |
| 2439 | |
| 2440 | |
| 2441 | |
| 2442 | |
| 2443 | |
| 2444 | |
| 2445 | |
| 2446 | |
| 2447 | |
| 2448 | |
| 2449 | |
| 2450 | |
| 2451 | |
| 2452 | |
| 2453 | |
| 2454 | |
| 2455 | |
| 2456 | |
| 2457 | |
| 2458 | |
| 2459 | |
| 2460 | |
| 2461 | |
| 2462 | |
| 2463 | |
| 2464 | |
| 2465 | |
| 2466 | |
| 2467 | |
| 2468 | |
| 2469 | |
| 2470 | |
| 2471 | |
| 2472 | |
| 2473 | |
| 2474 | |
| 2475 | |
| 2476 | |
| 2477 | |
| 2478 | |
| 2479 | |
| 2480 | |
| 2481 | |
| 2482 | |
| 2483 | |
| 2484 | |
| 2485 | |
| 2486 | |
| 2487 | |
| 2488 | |
| 2489 | |
| 2490 | |
| 2491 | |
| 2492 | |
| 2493 | |
| 2494 | |
| 2495 | |
| 2496 | |
| 2497 | |
| 2498 | |
| 2499 | |
| 2500 | |
| 2501 | |
| 2502 | |
| 2503 | |
| 2504 | |
| 2505 | |
| 2506 | |
| 2507 | |
| 2508 | |
| 2509 | |
| 2510 | |
| 2511 | |
| 2512 | |
| 2513 | |
| 2514 | |
| 2515 | |
| 2516 | |
| 2517 | |
| 2518 | |
| 2519 | |
| 2520 | |
| 2521 | |
| 2522 | |
| 2523 | |
| 2524 | /// lane-intra14 r1's decisive gate: a real aomenc INTER sequence with |
| 2525 | /// `--enable-1to4-partitions=1`, whose fast-zooming content makes aomenc |
| 2526 | /// code INTRA blocks inside inter frames on 1:4 strip shapes (32x8/8x32 at |
| 2527 | /// the 32 level, 64x16/16x64 at the superblock level). Every such block |
| 2528 | /// was the named refusal "an intra-coded 1:4 (or other non-2:1) rect strip |
| 2529 | /// on the inter block path" until this round; they now decode through the |
| 2530 | /// same `decode_block_rect4` / `decode_block_rect64` readers the KEY FRAME |
| 2531 | /// 1:4 paths already prove, with only the mode-info read switched to |
| 2532 | /// `read_intra_block_mode_info` (libaom decodemv.c:1189). |
| 2533 | /// |
| 2534 | /// Hard-asserts `intra_rect4_strip_in_inter_hits` (0 = 64x16, 1 = 16x64, |
| 2535 | /// 2 = 32x8, 3 = 8x32) on the one pinned recipe below, and every |
| 2536 | /// decode-order frame is compared. A decode that succeeds is ALWAYS |
| 2537 | /// pixel-compared (class [[gate-skips-on-its-own-failure]]), and a recipe |
| 2538 | /// that decodes exact without a counted strip is a FAILURE, never a pass. |
| 2539 | /// The recipe, the pin and the `--enable-1to4-partitions=0` control arm |
| 2540 | /// are documented on [`intra_rect4_in_inter_gate`]. |
| 2541 | |
| 2542 | // CLOSED by lane-av1recipehunt r1 (un-ignored). Two independent runs agree |
| 2543 | // on why this gate was blind, and they are worth keeping side by side. |
| 2544 | // |
| 2545 | // lane-av1pins RE-RAN this gate in RELEASE on a21f3680 (the seven-lane |
| 2546 | // merged tree) and found BOTH halves of the r2 record stale: |
| 2547 | // * THE PIXEL BLOCKER IS GONE -- `counted-exact=0 uncounted-exact=40 |
| 2548 | // named-refusals=0 (attempts 40)` at both bit depths, and not one |
| 2549 | // mismatch line anywhere in the run log. 40/40 pixel-exact. |
| 2550 | // * THE RECIPE NEVER FIRES -- every counted attempt reads |
| 2551 | // `64x16=0 16x64=0 32x8=0 8x32=0`, so the assert trips on its |
| 2552 | // non-vacuity precondition, not on any pixel. |
| 2553 | // |
| 2554 | // lane-av1recipehunt then found WHY, and closed it. The blindness is not |
| 2555 | // the r2 "pre-existing INTER-frame pixel defect" (gone) and not the |
| 2556 | // mandelbrot source: the old recipe produced ZERO 1:4 strips of ANY shape |
| 2557 | // at ANY level, because `--min-partition-size=32` with an all-but-empty |
| 2558 | // intra mode set never puts a 1:4 partition on aomenc's RD menu. |
| 2559 | // MEASURED: the 32-level 1:4 counter is 0 in ALL 48 attempts at |
| 2560 | // `--min-partition-size=16` and fires in 40 of 48 at 8 with |
| 2561 | // `--enable-smooth-intra/paeth-intra/directional-intra/angle-delta=1` |
| 2562 | // (a 32x8/8x32 strip needs an intra mode WORTH CODING; with those four |
| 2563 | // off the only candidate is DC, and DC never wins a 1:4 strip against |
| 2564 | // inter). That also explains r2's "`--enable-1to4-partitions=0` is |
| 2565 | // byte-identical": with no 1:4 reachable at all, the flag had nothing to |
| 2566 | // turn off. The new recipe is 256x192x6, `--min-partition-size=8`, the |
| 2567 | // full intra mode set, `--cpu-used=2 --cq-level=63`; it fires 32x8=8 |
| 2568 | // 8x32=11 and is pixel-exact on all 6 frames. See |
| 2569 | // [`intra_rect4_in_inter_gate`] for the pin and the flag control arm. |
| 2570 | |
| 2571 | |
| 2572 | |
| 2573 | |
| 2574 | /// The 10-bit arm (both of the user's films are `yuv420p10le`). |
| 2575 | |
| 2576 | // CLOSED by lane-av1recipehunt r1 (un-ignored), same recipe and same two |
| 2577 | // reasons as the 8-bit arm above: lane-av1pins' RELEASE re-run showed the |
| 2578 | // pixel blocker gone and the recipe never firing, and the root cause is |
| 2579 | // `--min-partition-size=32` plus the pruned intra mode set, not the |
| 2580 | // mandelbrot source. The 10-bit cell fires 32x8=12 8x32=7 and is |
| 2581 | // pixel-exact on all 6 frames. |
| 2582 | |
| 2583 | |
| 2584 | |
| 2585 | |
| 2586 | /// lane-intrasplit r1's decisive gate: a real aomenc INTER sequence in |
| 2587 | /// which aomenc's RD picks an intra-coded HORZ/VERT *strip* (a 2:1 |
| 2588 | /// rectangular partition) inside an inter frame AND splits its luma |
| 2589 | /// transform (`tx_depth >= 1`). Until this round that block was the named |
| 2590 | /// refusal "a split (nonzero tx_depth) transform on an intra HORZ/VERT |
| 2591 | /// strip in an inter frame"; it now walks the key frame's own per-TU path |
| 2592 | /// ([`decode::decode_rect_split`]). Hard-asserts |
| 2593 | /// [`decode::intra_rect_in_inter_split_tx_hits`] per depth: an attempt |
| 2594 | /// that never produced such a block proves nothing, and exhausting every |
| 2595 | /// attempt is a FAILURE, not a SKIP. |
| 2596 | |
| 2597 | |
| 2598 | |
| 2599 | |
| 2600 | |
| 2601 | /// The 10-bit arm (both of the user's films are `yuv420p10le`). |
| 2602 | |
| 2603 | |
| 2604 | |
| 2605 | |
| 2606 | |
| 2607 | /// lane-t900 r21: the witness for the palette SYNTAX on a rect intra strip |
| 2608 | /// inside a screen-content INTER frame. |
| 2609 | /// |
| 2610 | /// `read_palette_mode_info` is gated by the frame's |
| 2611 | /// `allow_screen_content_tools` and by the block's own shape |
| 2612 | /// (`palette_bsize_ctx_wh`: `min(w,h) >= 8`, `max(w,h) <= 64`), |
| 2613 | /// with no square-only term -- so a `--tune-content=screen` inter frame |
| 2614 | /// writes `palette_y_mode` (and `palette_uv_mode`) for an 8x16 or 16x8 |
| 2615 | /// intra strip exactly as for a square block. This decoder's inter-path |
| 2616 | /// intra arm skipped both symbols and refused the whole case by name ("a |
| 2617 | /// HORZ/VERT intra strip in a screen-content frame (palette syntax is |
| 2618 | /// consumed for square blocks only)"), which a real stream reached: |
| 2619 | /// measured with `decode_probe`, `testsrc2` 256x192 at |
| 2620 | /// `--tune-content=screen --enable-palette=0 --enable-intrabc=0` stops on |
| 2621 | /// that refusal at an 8x16 strip (8-bit) / a 16x8 one (10-bit). |
| 2622 | /// |
| 2623 | /// Both arms now decode all ten frames pixel-exact against ffmpeg, and |
| 2624 | /// [`decode::intra_rect_in_inter_screen_hits`] counts the strips that read |
| 2625 | /// the syntax -- hard-asserted, because an attempt with no such strip |
| 2626 | /// proves nothing about the case the refusal named. |
| 2627 | /// |
| 2628 | /// Note `--enable-palette=0`: the encoder's palette SEARCH is what this |
| 2629 | /// gate must switch off, not the syntax. With it on, the key frame codes |
| 2630 | /// a block that really uses a palette and stops on the separate, |
| 2631 | /// still-live "a block that actually uses a palette (Y)" refusal before |
| 2632 | /// any inter frame is reached (class `refusal-hides-a-defect`, measured on |
| 2633 | /// six such encodes). |
| 2634 | |
| 2635 | |
| 2636 | |
| 2637 | |
| 2638 | |
| 2639 | /// The 10-bit arm (both of the user's films are `yuv420p10le`). |
| 2640 | |
| 2641 | |
| 2642 | |
| 2643 | |
| 2644 | |
| 2645 | /// lane-intra14 r4: the FILM witness for an intra block on a 1:4 partition |
| 2646 | /// inside an INTER frame -- `crates/ec-av1/fixtures/reelb_intra14_witness.obu`, |
| 2647 | /// 163057 bytes, sha256 |
| 2648 | /// `0eff603bf1608e47faf5e6729670c4c77cf5c674dbad3a1533ac6660151fd90e`, |
| 2649 | /// two decode-order frames (key + first inter) cut from two INDEPENDENT |
| 2650 | /// `ffmpeg -ss 90 -t 2 -i <3840x1608 10-bit AV1 HDR10 mkv> -c:v copy -f obu` |
| 2651 | /// runs that hashed identically. |
| 2652 | /// |
| 2653 | /// MEASURED (r4, 27 two-second segments of that film at ss 0..6000, probe |
| 2654 | /// logs in the report): no aomenc recipe reaches this shape and only ONE |
| 2655 | /// class of stream does -- the film's own inter frames. Decode-order frame |
| 2656 | /// 1 of this fixture codes 3 intra 16x64 strips (`intra_rect4_in_inter` |
| 2657 | /// 16x64=3, zero when the fixture is truncated to the key frame alone), so |
| 2658 | /// the counter attribution is pinned to that frame. |
| 2659 | /// |
| 2660 | /// It is `#[ignore]`d for exactly ONE reason, and not this lane's shape: |
| 2661 | /// that same frame stops at a SIBLING refusal, "a split intra strip whose |
| 2662 | /// transform unit is 64x32 (no luma coefficient tables for that shape |
| 2663 | /// here)". The moment TX_64X32/TX_32X64 luma coefficient tables land, drop |
| 2664 | /// the `#[ignore]` -- everything else this gate needs (the reader, the |
| 2665 | /// counter, the two-frame pixel compare) is in place and runs. |
| 2666 | /// |
| 2667 | /// lane-sub8x4 r3: un-`#[ignore]`d. The sibling refusal it waited on (the |
| 2668 | /// un-split TX_64X32/TX_32X64 corner unit) is lifted in this round, so the |
| 2669 | /// frame this gate exists for now finishes. |
| 2670 | /// |
| 2671 | /// lane-wit16x4 r1, MEASURED: this gate is blind to the frame it counts |
| 2672 | /// (class `gate-blind-to-hidden-frames`). The fixture has two frame OBUs |
| 2673 | /// and ONE shown frame, and `decode_probe` on the fixture truncated to its |
| 2674 | /// first frame OBU reads `intra_rect4_in_inter 0/0/0/0` and |
| 2675 | /// `intra16x4_in_inter 0/0/0` while matching ffmpeg exactly -- so all of |
| 2676 | /// 4/23/28/72 (and the 4 intra 16x4 strips with them) live in the SECOND, |
| 2677 | /// NO-SHOW frame, whose pixels ffmpeg never emits and this gate never |
| 2678 | /// compares. Since that hidden frame also carries the intra 16x4/4x16 |
| 2679 | /// strip whose refusal this round re-adds (no stream anywhere decodes |
| 2680 | /// pixel-exact while that arm fires -- lanes/wit16x4-r1.report.md), the |
| 2681 | /// decode now stops by name here. Un-ignored 2026-09-04: that re-added intra 16x4/4x16-in-inter refusal is gone and the gate passes. |
| 2682 | |
| 2683 | |
| 2684 | |
| 2685 | |
| 2686 | |
| 2687 | |
| 2688 | |
| 2689 | |
| 2690 | |
| 2691 | |
| 2692 | |
| 2693 | |
| 2694 | |
| 2695 | |
| 2696 | |
| 2697 | |
| 2698 | |
| 2699 | |
| 2700 | |
| 2701 | |
| 2702 | |
| 2703 | |
| 2704 | |
| 2705 | |
| 2706 | |
| 2707 | |
| 2708 | |
| 2709 | |
| 2710 | |
| 2711 | |
| 2712 | |
| 2713 | |
| 2714 | |
| 2715 | |
| 2716 | |
| 2717 | |
| 2718 | |
| 2719 | |
| 2720 | |
| 2721 | |
| 2722 | |
| 2723 | |
| 2724 | |
| 2725 | |
| 2726 | |
| 2727 | |
| 2728 | |
| 2729 | |
| 2730 | |
| 2731 | |
| 2732 | |
| 2733 | |
| 2734 | |
| 2735 | |
| 2736 | |
| 2737 | |
| 2738 | |
| 2739 | |
| 2740 | |
| 2741 | /// lane-sub8x4 r3 / lane-wit16x4 r1: the FILM witness for the un-split |
| 2742 | /// TX_64X32/TX_32X64 corner unit of a split intra strip. |
| 2743 | /// |
| 2744 | /// r3 wrote this gate as a witness for TWO arms; its intra 16x4/4x16 |
| 2745 | /// numbers were PHANTOMS (class `counter-from-refused-stream`), counted |
| 2746 | /// while decode-order frame 33 of this very prefix was desynced. On the |
| 2747 | /// merged tip (lane-frame36 r2 fixed that desync) the fixture decodes all |
| 2748 | /// 33 frames pixel-exact and `intra16x4_in_inter` reads 0/0/0, so the gate |
| 2749 | /// panicked "the intra 16x4/4x16 strip arm did not fire". lane-wit16x4 r1 |
| 2750 | /// re-measured every counter, split the claim, and re-added the |
| 2751 | /// 16x4/4x16-in-inter refusal (no stream on this tree decodes exactly |
| 2752 | /// while that arm fires -- see the note at `decode.rs`'s `strip16`). |
| 2753 | /// |
| 2754 | /// `crates/ec-av1/fixtures/reelb_rect64_intra16x4_witness.obu`, 23472 bytes, |
| 2755 | /// sha256 `c9e721088766163b9dbeb9fa8dd8b257ff0ec7f9157fc350de4d3c33cd9ec4e4`: |
| 2756 | /// the first 50 frame-carrying OBUs of `ffmpeg -ss 0 -t 2 -i <3840x1608 |
| 2757 | /// 10-bit AV1 HDR10 mkv> -c:v copy -f obu`, cut twice from independent |
| 2758 | /// ffmpeg runs that hashed identically. 33 decode-order frames. |
| 2759 | /// |
| 2760 | /// MEASURED on the merged tip (`decode_probe`, EC_PROBE_OUT16 vs |
| 2761 | /// `ffmpeg -pix_fmt yuv420p10le`): all 33 frames 0 differing bytes, and |
| 2762 | /// `rect64_corner_tu` fires 64x32=148 32x64=123 (r3's 90/5 came out of the |
| 2763 | /// desynced decode). `intra16x4_in_inter` reads 0/0/0 here and is asserted |
| 2764 | /// as such -- if a later change makes that arm fire on this stream, the |
| 2765 | /// refusal that now guards it moved and this gate says so. |
| 2766 | /// |
| 2767 | /// Refusal strings: "a split intra strip whose transform unit is |
| 2768 | /// {tx_w}x{tx_h}" stays NARROWED (every shape other than 64x32/32x64 -- |
| 2769 | /// that is what this gate lifts), and "an intra 16x4/4x16 strip inside an |
| 2770 | /// inter 16x16-level 1:4 partition" is back to its FULL width. |
| 2771 | |
| 2772 | |
| 2773 | |
| 2774 | |
| 2775 | |
| 2776 | |
| 2777 | |
| 2778 | |
| 2779 | |
| 2780 | |
| 2781 | |
| 2782 | |
| 2783 | |
| 2784 | |
| 2785 | |
| 2786 | |
| 2787 | |
| 2788 | |
| 2789 | |
| 2790 | |
| 2791 | |
| 2792 | |
| 2793 | |
| 2794 | |
| 2795 | |
| 2796 | |
| 2797 | |
| 2798 | |
| 2799 | |
| 2800 | |
| 2801 | |
| 2802 | |
| 2803 | |
| 2804 | |
| 2805 | |
| 2806 | |
| 2807 | |
| 2808 | |
| 2809 | |
| 2810 | |
| 2811 | |
| 2812 | |
| 2813 | |
| 2814 | |
| 2815 | |
| 2816 | |
| 2817 | |
| 2818 | |
| 2819 | |
| 2820 | |
| 2821 | |
| 2822 | |
| 2823 | |
| 2824 | |
| 2825 | |
| 2826 | |
| 2827 | |
| 2828 | |
| 2829 | |
| 2830 | |
| 2831 | |
| 2832 | |
| 2833 | |
| 2834 | |
| 2835 | |
| 2836 | |
| 2837 | |
| 2838 | |
| 2839 | /// lane-thread2 (iv): frame-parallel decoding changes nothing a caller |
| 2840 | /// can observe. Two real streams are decoded through |
| 2841 | /// [`decode_stream_with_threads`] at 1 and at 4 threads and every sink |
| 2842 | /// call is compared -- decode index, shown flag, and all three planes. |
| 2843 | /// |
| 2844 | /// `reelb_arf_witness.obu` is the one that proves the parallel path: it |
| 2845 | /// carries hidden alt-refs, which is exactly the case where "output in |
| 2846 | /// coded order" is not the same as "output in the order workers finish", |
| 2847 | /// and under lane-thread3's dependency-aware scheduling 39 of its 40 |
| 2848 | /// coded frames (all but the key frame) are decoded off the main thread |
| 2849 | /// -- MORE than its 37 shown frames, which is the point: lane-thread2's |
| 2850 | /// leaf rule dispatched 18. `palette_screen_witness.obu` is the |
| 2851 | /// complement, an 8-bit screen stream whose every coded frame refreshes a |
| 2852 | /// slot: lane-thread2 dispatched NOTHING for it, lane-thread3 dispatches |
| 2853 | /// all 14 of its non-key frames. Both counts are asserted exactly, plus |
| 2854 | /// the "more than half the shown frames really ran on a worker" bound, so |
| 2855 | /// neither arm can pass vacuously. |
| 2856 | |
| 2857 | |
| 2858 | |
| 2859 | |
| 2860 | |
| 2861 | |
| 2862 | |
| 2863 | |
| 2864 | |
| 2865 | |
| 2866 | |
| 2867 | |
| 2868 | |
| 2869 | |
| 2870 | |
| 2871 | |
| 2872 | |
| 2873 | |
| 2874 | |
| 2875 | |
| 2876 | |
| 2877 | |
| 2878 | |
| 2879 | |
| 2880 | |
| 2881 | |
| 2882 | |
| 2883 | |
| 2884 | |
| 2885 | |
| 2886 | |
| 2887 | |
| 2888 | |
| 2889 | |
| 2890 | |
| 2891 | |
| 2892 | |
| 2893 | |
| 2894 | |
| 2895 | |
| 2896 | |
| 2897 | |
| 2898 | |
| 2899 | |
| 2900 | |
| 2901 | |
| 2902 | |
| 2903 | |
| 2904 | |
| 2905 | |
| 2906 | |
| 2907 | |
| 2908 | |
| 2909 | |
| 2910 | |
| 2911 | |
| 2912 | /// lane-frame36 r2: the hidden-ARF witness. `crates/ec-av1/fixtures/ |
| 2913 | /// reelb_arf_witness.obu`, 32126 bytes, sha256 |
| 2914 | /// `7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37`: |
| 2915 | /// the first 58 frame-carrying OBUs of a 2 s head cut of the 10-bit |
| 2916 | /// 3840x1608 AV1 HDR10 stream, 40 decode-order frames, 37 shown. |
| 2917 | /// |
| 2918 | /// What it covers that no earlier fixture did: decode-order frame 33 is a |
| 2919 | /// HIDDEN alt-ref (`show_frame=0`, order_hint 64, `cdef_bits=1`, loop |
| 2920 | /// restoration `[Switchable, Sgrproj, Switchable]`, `skip_mode_frame` |
| 2921 | /// [1,6]) -- the first frame of the stream carrying a SPLIT |
| 2922 | /// superblock-level intra strip in an inter frame. Its 16x64 strip at |
| 2923 | /// mi(192,140) reads `tx_depth=1` (TX_16X32), and until this round |
| 2924 | /// [`decode_block_rect64`]'s split arm returned past the tail that |
| 2925 | /// publishes the `TXFM_CONTEXT` bands, so the 32x64 block at mi(192,144) |
| 2926 | /// read the row's init value 64 as its left transform height and took |
| 2927 | /// `tx_size_cat3` row 2 where aomdec takes row 1 -- a desync no shown |
| 2928 | /// frame exposed until the ARF was displayed (class |
| 2929 | /// `gate-blind-to-hidden-frames`). |
| 2930 | /// |
| 2931 | /// The counter assert is on `rect64_split_txfm_publish_hits`, the split |
| 2932 | /// arm that was silent, so a stream that stopped carrying the shape fails |
| 2933 | /// the gate instead of passing it vacuously. |
| 2934 | |
| 2935 | |
| 2936 | |
| 2937 | |
| 2938 | |
| 2939 | |
| 2940 | |
| 2941 | |
| 2942 | |
| 2943 | |
| 2944 | |
| 2945 | |
| 2946 | |
| 2947 | |
| 2948 | |
| 2949 | |
| 2950 | |
| 2951 | |
| 2952 | |
| 2953 | |
| 2954 | |
| 2955 | |
| 2956 | |
| 2957 | |
| 2958 | |
| 2959 | |
| 2960 | |
| 2961 | |
| 2962 | |
| 2963 | |
| 2964 | |
| 2965 | |
| 2966 | |
| 2967 | |
| 2968 | |
| 2969 | |
| 2970 | |
| 2971 | |
| 2972 | |
| 2973 | |
| 2974 | |
| 2975 | |
| 2976 | |
| 2977 | |
| 2978 | /// lane-unwritten-dep: the UNWRITTEN-SAMPLE census at the point the output is |
| 2979 | /// taken, over the real film fixtures that carry hidden alt-refs. |
| 2980 | /// |
| 2981 | /// SCOPE, stated rather than implied: the census is taken where |
| 2982 | /// `EC_AV1_FINAL_DUMP` writes, which is BEFORE `apply_grain`. The claim is |
| 2983 | /// therefore over the PRE-GRAIN planes -- which are also the bytes the |
| 2984 | /// reference bank stores and every later frame predicts from, the dependency |
| 2985 | /// that matters. Every filter writes IN PLACE into the buffer this scans, so |
| 2986 | /// none of them can open a hole outside its extent. `apply_grain` is the one |
| 2987 | /// stage after this scan that ALLOCATES a new picture, and this census never |
| 2988 | /// sees it: the claim is NOT "the caller's final grained picture has no hole". |
| 2989 | /// |
| 2990 | /// lane-av1graincensus: that paragraph is still true of THIS gate and is not |
| 2991 | /// weakened by the pointer below -- what changed is that the gap it names is |
| 2992 | /// no longer UNMEASURED. |
| 2993 | /// [`the_grained_picture_the_caller_receives_carries_no_unwritten_plane_sample`] |
| 2994 | /// measures the grained picture `apply_grain` returns, over its own counters, |
| 2995 | /// and is the gate that carries the post-grain claim. |
| 2996 | /// |
| 2997 | /// NON-VACUITY, the part that makes this gate worth having: a census is only a |
| 2998 | /// measurement if it CAN report non-zero. The control is a SYNTHETIC positive |
| 2999 | /// -- the census is handed planes with a known number of sentinel samples and |
| 3000 | /// must report exactly that number. It deliberately does NOT use a fixture: |
| 3001 | /// the corpus's one witness with a real hole (`440_request_is_422`) is REFUSED |
| 3002 | /// by lane/av1unwritten, so a fixture-carried control goes red on merge for a |
| 3003 | /// reason unrelated to this gate. A synthetic control cannot be refused and |
| 3004 | /// cannot change behaviour when a lane lands. It is proven by mutation in the |
| 3005 | /// same run: neutering `census_unwritten_final` reds it (lane report §5). |
| 3006 | /// |
| 3007 | /// WHAT THIS IS NOT, corrected from an earlier revision of this comment: it |
| 3008 | /// does NOT rest on a claim that the pre-deblock census is blind. That claim |
| 3009 | /// was wrong. It came from `dump_stage16` cropping chroma as `(fw/2, fh/2)` -- |
| 3010 | /// a 4:2:0 assumption -- so on a 64x64 4:2:2 frame 2048 chroma samples were in |
| 3011 | /// no stage dump at all, and an earlier revision read that blind spot as |
| 3012 | /// "identical pre-deblock, so deblock creates the dependence". With per-axis |
| 3013 | /// extents the corrected measurement is the opposite: the pre-deblock dump on |
| 3014 | /// `440_request_is_422` already DIFFERS by 2158 bytes and the exact u16 census |
| 3015 | /// finds 224 unwritten samples (U 112, V 112, rows 36..63, whole 4x4 groups) -- |
| 3016 | /// the same count `lanes/av1unwritten.report.md` reports. The hole is present |
| 3017 | /// before any filter runs and the pre-deblock census SEES it. This census is |
| 3018 | /// here because it is the measurement taken where the OUTPUT is taken, which |
| 3019 | /// spans the whole route from the tile walk to the caller. |
| 3020 | /// |
| 3021 | /// The four film fixtures are the corpus's real 10-bit streams with hidden |
| 3022 | /// alt-refs -- the shapes where a hidden frame's unwritten region would feed |
| 3023 | /// a later DISPLAYED frame through the reference bank, which is the only way |
| 3024 | /// an unwritten sample could reach output on a stream that decodes correctly. |
| 3025 | /// All four measure 0 here AND 0 on the pre-deblock census. |
| 3026 | /// |
| 3027 | /// Measured on `8d6998d7` with a provenance-verified probe (`strings` on the |
| 3028 | /// binary names only this worktree; reelb_arf sha256 `7f3b060da5aa9c53`, |
| 3029 | /// reelb_rect64 `c9e721088766163b`): |
| 3030 | /// |
| 3031 | /// ```text |
| 3032 | /// pre-deblock census (u16, whole plane, 0xDEAD counted per frame) |
| 3033 | /// 440_request_is_422 224 <- also lane/av1unwritten's own number |
| 3034 | /// reelb_arf_witness 0 |
| 3035 | /// reelb_rect64_intra16x4_witness 0 |
| 3036 | /// this gate (pre-grain, at the output point) |
| 3037 | /// reelb_arf_witness 0 |
| 3038 | /// reelb_rect64_intra16x4_witness 0 |
| 3039 | /// gm_small_side_witness 0 |
| 3040 | /// reelc_sb128_inter_witness 0 |
| 3041 | /// ``` |
| 3042 | |
| 3043 | |
| 3044 | |
| 3045 | |
| 3046 | |
| 3047 | |
| 3048 | |
| 3049 | |
| 3050 | |
| 3051 | |
| 3052 | |
| 3053 | |
| 3054 | |
| 3055 | |
| 3056 | |
| 3057 | |
| 3058 | |
| 3059 | |
| 3060 | |
| 3061 | |
| 3062 | |
| 3063 | |
| 3064 | |
| 3065 | |
| 3066 | |
| 3067 | |
| 3068 | |
| 3069 | |
| 3070 | |
| 3071 | |
| 3072 | |
| 3073 | |
| 3074 | |
| 3075 | |
| 3076 | |
| 3077 | |
| 3078 | |
| 3079 | |
| 3080 | |
| 3081 | |
| 3082 | |
| 3083 | |
| 3084 | |
| 3085 | |
| 3086 | |
| 3087 | |
| 3088 | |
| 3089 | |
| 3090 | |
| 3091 | |
| 3092 | |
| 3093 | |
| 3094 | |
| 3095 | |
| 3096 | |
| 3097 | |
| 3098 | |
| 3099 | |
| 3100 | |
| 3101 | |
| 3102 | |
| 3103 | |
| 3104 | |
| 3105 | |
| 3106 | |
| 3107 | |
| 3108 | |
| 3109 | |
| 3110 | |
| 3111 | |
| 3112 | |
| 3113 | |
| 3114 | |
| 3115 | |
| 3116 | |
| 3117 | |
| 3118 | |
| 3119 | |
| 3120 | |
| 3121 | /// lane-av1graincensus: the picture the caller RECEIVES -- including film |
| 3122 | /// grain -- carries no unwritten plane sample. |
| 3123 | /// |
| 3124 | /// # WHAT THIS GATE IS FOR, and the blind spot it closes |
| 3125 | /// |
| 3126 | /// [`the_frame_the_caller_receives_carries_no_unwritten_plane_sample`] scans |
| 3127 | /// at `stream.rs`'s `EC_AV1_FINAL_DUMP` site, which is BEFORE `apply_grain`. |
| 3128 | /// Every filter (deblock/CDEF/LR/superres) writes IN PLACE into the buffer it |
| 3129 | /// scans, so none of them can open a hole outside its extent -- but |
| 3130 | /// `apply_grain` is the one stage after that scan that ALLOCATES a fresh |
| 3131 | /// picture: `film_grain::uninit_plane`, `Vec::with_capacity` + `set_len`, no |
| 3132 | /// fill, with correctness resting on a band row partition rather than on the |
| 3133 | /// type system. `lanes/unwritten-dep.report.md` §6 and §8 declined to claim |
| 3134 | /// anything about that destination. This gate measures it. |
| 3135 | /// |
| 3136 | /// # WHY THE COUNT CAN BE NON-ZERO (the part that makes it a census) |
| 3137 | /// |
| 3138 | /// Counting `== plane_poison()` over an uninitialised buffer is a census that |
| 3139 | /// reports ~0 either way: a hole survives with probability ~1/65536, not |
| 3140 | /// always. `uninit_plane` therefore fills with the poison under the SAME |
| 3141 | /// predicate `fresh_plane` honours. With the sentinel off -- every shipped |
| 3142 | /// build -- `uninit_plane` is still `with_capacity` + `set_len`, so the |
| 3143 | /// corner-cut it documents is untouched. |
| 3144 | /// |
| 3145 | /// # SCOPE, stated not implied |
| 3146 | /// |
| 3147 | /// The claim is over the picture the caller receives ON A GRAINED FRAME, in |
| 3148 | /// its final form, after the noise. It is NOT a claim that the pre-grain |
| 3149 | /// census already covered this -- that census never sees this buffer -- and it |
| 3150 | /// is NOT a claim about a frame whose grain step does not run. |
| 3151 | /// |
| 3152 | /// # NON-VACUITY, two arms, both required |
| 3153 | /// |
| 3154 | /// 1. **synthetic, first, and with a DIFFERENT known count (5, not the |
| 3155 | /// pre-grain arm's 7)** so a gate reading the wrong counter goes red. No |
| 3156 | /// fixture involved, so no lane's refusal can redden it. |
| 3157 | /// 2. **per-fixture `scanned > 0`** -- `unwritten == 0` is also what a build |
| 3158 | /// with the census call deleted reports. `scanned > 0` is reachable only by |
| 3159 | /// `apply_grain` actually running, so it is at once the |
| 3160 | /// proof-that-grain-fired and the deletion control. |
| 3161 | /// |
| 3162 | /// Both mutations are in `lanes/av1graincensus.report.md`: deleting the |
| 3163 | /// `census_unwritten_grained` call at `apply_grain`'s return reds arm 2, and |
| 3164 | /// forcing ONE poison sample into a grained picture reds arm 2's count. |
| 3165 | |
| 3166 | |
| 3167 | |
| 3168 | |
| 3169 | |
| 3170 | |
| 3171 | |
| 3172 | |
| 3173 | |
| 3174 | |
| 3175 | |
| 3176 | |
| 3177 | |
| 3178 | |
| 3179 | |
| 3180 | |
| 3181 | |
| 3182 | |
| 3183 | |
| 3184 | |
| 3185 | |
| 3186 | |
| 3187 | |
| 3188 | |
| 3189 | |
| 3190 | |
| 3191 | |
| 3192 | |
| 3193 | |
| 3194 | |
| 3195 | |
| 3196 | |
| 3197 | |
| 3198 | |
| 3199 | |
| 3200 | |
| 3201 | |
| 3202 | |
| 3203 | |
| 3204 | |
| 3205 | |
| 3206 | |
| 3207 | |
| 3208 | |
| 3209 | |
| 3210 | /// The child half of |
| 3211 | /// [`the_frame_the_caller_receives_carries_no_unwritten_plane_sample`]: decodes |
| 3212 | /// the fixture named in `UWDEP_CENSUS_FIXTURE` with the sentinel fill live and |
| 3213 | /// prints `UWDEP_CENSUS <n> frames=<n>` plus a frame-count assertion. |
| 3214 | /// |
| 3215 | /// A `#[test]` rather than an example because it needs the crate's own |
| 3216 | /// in-process counter -- which no external binary could read. |
| 3217 | |
| 3218 | |
| 3219 | |
| 3220 | |
| 3221 | |
| 3222 | |
| 3223 | |
| 3224 | |
| 3225 | |
| 3226 | |
| 3227 | |
| 3228 | |
| 3229 | |
| 3230 | |
| 3231 | |
| 3232 | |
| 3233 | |
| 3234 | |
| 3235 | |
| 3236 | |
| 3237 | |
| 3238 | |
| 3239 | |
| 3240 | |
| 3241 | |
| 3242 | |
| 3243 | |
| 3244 | |
| 3245 | |
| 3246 | |
| 3247 | |
| 3248 | |
| 3249 | |
| 3250 | |
| 3251 | |
| 3252 | |
| 3253 | |
| 3254 | |
| 3255 | |
| 3256 | |
| 3257 | |
| 3258 | |
| 3259 | |
| 3260 | |
| 3261 | |
| 3262 | |
| 3263 | |
| 3264 | |
| 3265 | |
| 3266 | |
| 3267 | |
| 3268 | |
| 3269 | |
| 3270 | |
| 3271 | |
| 3272 | |
| 3273 | |
| 3274 | |
| 3275 | |
| 3276 | |
| 3277 | |
| 3278 | |
| 3279 | |
| 3280 | |
| 3281 | |
| 3282 | |
| 3283 | |
| 3284 | |
| 3285 | |
| 3286 | |
| 3287 | |
| 3288 | |
| 3289 | |
| 3290 | |
| 3291 | |
| 3292 | |
| 3293 | |
| 3294 | |
| 3295 | |
| 3296 | |
| 3297 | |
| 3298 | |
| 3299 | |
| 3300 | |
| 3301 | |
| 3302 | |
| 3303 | |
| 3304 | |
| 3305 | |
| 3306 | |
| 3307 | /// lane-av1uballoc: the frame the caller receives does not depend on what |
| 3308 | /// the plane buffer held before the decode wrote it. |
| 3309 | /// |
| 3310 | /// Four runs of the same fixtures, each in its own process (the fill and |
| 3311 | /// the alloc closure are both process-constant env reads -- see |
| 3312 | /// [`crate::envflags`] -- and this crate forbids `set_var`), must agree on |
| 3313 | /// one hash per fixture: |
| 3314 | /// |
| 3315 | /// * `EC_AV1_PLANE_SENTINEL=0xDEAD` and `=0xBEEF` -- two DIFFERENT |
| 3316 | /// impossible values for the same buffer. This is the arm that can |
| 3317 | /// actually FAIL: if any reader's value reaches the picture, changing the |
| 3318 | /// poison changes the output. Equal hashes are a statement about a READ, |
| 3319 | /// which is what the poisoned-read check in [`decode::fresh_plane`] needs and what no |
| 3320 | /// census in the crate measures. |
| 3321 | /// * the sentinel OFF (the shipped zeroed allocation), which must agree |
| 3322 | /// with the poisoned runs. This is the "same with the sentinel off" |
| 3323 | /// arm; on its own it is weak (the allocator may hand out the same |
| 3324 | /// ambient bytes twice) and is here as the join between the two worlds. |
| 3325 | /// |
| 3326 | /// NON-VACUITY, first and synthetic: [`allocdet_synthetic`] hashes two |
| 3327 | /// pictures that differ in ONE sample and asserts the hashes DIFFER. A hash |
| 3328 | /// that cannot see a one-sample difference would make every equality below |
| 3329 | /// vacuous, and it is the failure mode a "0 errors" style result has. |
| 3330 | /// Second: every arm must report `frames>0`, so a child that decoded |
| 3331 | /// nothing cannot agree with another child that decoded nothing. |
| 3332 | |
| 3333 | |
| 3334 | |
| 3335 | |
| 3336 | |
| 3337 | |
| 3338 | |
| 3339 | |
| 3340 | |
| 3341 | |
| 3342 | |
| 3343 | |
| 3344 | |
| 3345 | |
| 3346 | |
| 3347 | |
| 3348 | |
| 3349 | |
| 3350 | |
| 3351 | |
| 3352 | |
| 3353 | |
| 3354 | |
| 3355 | |
| 3356 | |
| 3357 | |
| 3358 | |
| 3359 | |
| 3360 | |
| 3361 | |
| 3362 | |
| 3363 | |
| 3364 | |
| 3365 | |
| 3366 | |
| 3367 | |
| 3368 | |
| 3369 | |
| 3370 | |
| 3371 | |
| 3372 | |
| 3373 | |
| 3374 | |
| 3375 | |
| 3376 | |
| 3377 | |
| 3378 | |
| 3379 | |
| 3380 | |
| 3381 | |
| 3382 | |
| 3383 | |
| 3384 | |
| 3385 | |
| 3386 | |
| 3387 | |
| 3388 | |
| 3389 | |
| 3390 | |
| 3391 | |
| 3392 | |
| 3393 | |
| 3394 | |
| 3395 | |
| 3396 | |
| 3397 | |
| 3398 | |
| 3399 | |
| 3400 | |
| 3401 | |
| 3402 | |
| 3403 | |
| 3404 | |
| 3405 | |
| 3406 | |
| 3407 | |
| 3408 | |
| 3409 | |
| 3410 | |
| 3411 | |
| 3412 | |
| 3413 | |
| 3414 | |
| 3415 | |
| 3416 | |
| 3417 | |
| 3418 | |
| 3419 | |
| 3420 | |
| 3421 | |
| 3422 | |
| 3423 | |
| 3424 | |
| 3425 | |
| 3426 | |
| 3427 | |
| 3428 | /// The child half of |
| 3429 | /// [`the_frame_does_not_depend_on_the_plane_buffers_initial_content`]: |
| 3430 | /// decodes every fixture named in `ALLOCDET_FIXTURES` and prints one |
| 3431 | /// `ALLOCDET` line each. |
| 3432 | /// |
| 3433 | /// With `ALLOCDET_SYNTHETIC` set it instead prints the two hashes the |
| 3434 | /// non-vacuity control compares -- two pictures differing in ONE sample -- |
| 3435 | /// and decodes nothing. |
| 3436 | |
| 3437 | |
| 3438 | |
| 3439 | |
| 3440 | |
| 3441 | |
| 3442 | |
| 3443 | |
| 3444 | |
| 3445 | |
| 3446 | |
| 3447 | |
| 3448 | |
| 3449 | |
| 3450 | |
| 3451 | |
| 3452 | |
| 3453 | |
| 3454 | |
| 3455 | |
| 3456 | |
| 3457 | |
| 3458 | |
| 3459 | |
| 3460 | |
| 3461 | |
| 3462 | |
| 3463 | |
| 3464 | |
| 3465 | |
| 3466 | |
| 3467 | |
| 3468 | |
| 3469 | |
| 3470 | |
| 3471 | |
| 3472 | |
| 3473 | |
| 3474 | |
| 3475 | |
| 3476 | |
| 3477 | |
| 3478 | |
| 3479 | |
| 3480 | |
| 3481 | /// lane-t900 r6: the 128-superblock INTER witness. |
| 3482 | /// `crates/ec-av1/fixtures/reelc_sb128_inter_witness.obu`, 177773 bytes, |
| 3483 | /// sha256 `09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc`: |
| 3484 | /// the first 23 frame-carrying OBUs of a 2 s cut taken 900 s into a 10-bit |
| 3485 | /// 1920x792 AV1 stream with `use_128x128_superblock=1`, 16 decode-order |
| 3486 | /// frames, 15 shown. Cut twice independently from the source (`-ss 900 -t 2 |
| 3487 | /// -c:v copy` then the OBU truncation) -- both cuts hash identically. |
| 3488 | /// lane-t900 r7 extended it from 19 OBUs / 14 frames: decode-order frame 14 |
| 3489 | /// is the ONLY frame in this repository's fixtures whose sub-8x8 inter |
| 3490 | /// chroma inherits a `tx_type` from a chroma-reference sub-block that |
| 3491 | /// differs from its group's first sub-block AND codes coefficients |
| 3492 | /// (`sub8_chroma_tx_from_ref_hits`), i.e. the only frame that can tell |
| 3493 | /// `av1_get_tx_type`'s two candidate rules apart. |
| 3494 | /// |
| 3495 | /// It is the first stream in this repository that decodes exactly while |
| 3496 | /// five separately-found defects' paths all fire, which is why the asserts |
| 3497 | /// below are on all of them: |
| 3498 | /// |
| 3499 | /// * `warp_plane_suppress_hits` (r5) -- `av1_init_warp_params` bails out at |
| 3500 | /// `block_width < 8 || block_height < 8` on the PLANE's own block, so the |
| 3501 | /// 4x8 chroma of an 8x16 luma block is predicted translationally while its |
| 3502 | /// luma warps. Gated on the square side before r5. |
| 3503 | /// * `inter_sb128_vert_hits` + `cdef_idx_hits` (r5) -- the second half of a |
| 3504 | /// 128-root HORZ/VERT inter block must read its OWN `cdef_idx` literal |
| 3505 | /// (libaom `cdef_transmitted[4]`, one flag per 64x64 CDEF unit). |
| 3506 | /// * `interintra_rect_hits` (r4) -- interintra on a RECTANGULAR block built |
| 3507 | /// a square intra predictor before. |
| 3508 | /// * `non_chroma_ref_ctx_skip_hits` (r3) -- a block that is not the chroma |
| 3509 | /// reference of its 4:2:0 pair leaves its neighbours' chroma coefficient |
| 3510 | /// contexts untouched (`nplanes = 1 + (num_planes - 1) * is_chroma_ref`). |
| 3511 | /// * `intra_in_inter_txctx_hits` (r2) -- an intra strip in an INTER frame |
| 3512 | /// takes its `tx_depth` row from the real `TXFM_CONTEXT` bands, not the |
| 3513 | /// key frame's deblock grid. |
| 3514 | /// * `edge_filter_mi_fix_hits` (r4) -- both halves of a split intra block |
| 3515 | /// read their OWN mi-exact intra-edge-filter neighbours. |
| 3516 | /// |
| 3517 | /// It is ALSO the witness that lifted the intra-16x4-in-inter opt-in -- that path decodes by default now, gated here: |
| 3518 | /// `intra16x4_in_inter` fires 78x 16x4 + 149x 4x16 (108 chroma-paired) |
| 3519 | /// inside frames that are decoded AND compared exact -- not counted out of |
| 3520 | /// a refused or desynced stream the way lane-sub8x4 r3's phantom was |
| 3521 | /// (class `counter-from-refused-stream`). The 128x64/64x128 intra-in-inter |
| 3522 | /// arm fires 0 times here, so THAT refusal is untouched. |
| 3523 | /// |
| 3524 | /// All 14 decode-order frames (including the 2 no-show frames ffmpeg never |
| 3525 | /// hands back) were compared byte-exact against instrumented aomdec with |
| 3526 | /// `EC_AV1_FINAL_DUMP` -- see the lane report's EVIDENCE line; the gate |
| 3527 | /// itself compares the 12 shown frames on every plane. |
| 3528 | |
| 3529 | |
| 3530 | |
| 3531 | |
| 3532 | |
| 3533 | |
| 3534 | |
| 3535 | |
| 3536 | |
| 3537 | |
| 3538 | |
| 3539 | |
| 3540 | |
| 3541 | |
| 3542 | |
| 3543 | |
| 3544 | |
| 3545 | |
| 3546 | |
| 3547 | |
| 3548 | |
| 3549 | |
| 3550 | |
| 3551 | |
| 3552 | |
| 3553 | |
| 3554 | |
| 3555 | |
| 3556 | |
| 3557 | |
| 3558 | |
| 3559 | |
| 3560 | |
| 3561 | |
| 3562 | |
| 3563 | |
| 3564 | |
| 3565 | |
| 3566 | |
| 3567 | |
| 3568 | |
| 3569 | |
| 3570 | |
| 3571 | |
| 3572 | |
| 3573 | |
| 3574 | |
| 3575 | |
| 3576 | |
| 3577 | |
| 3578 | |
| 3579 | |
| 3580 | |
| 3581 | |
| 3582 | |
| 3583 | |
| 3584 | |
| 3585 | |
| 3586 | |
| 3587 | |
| 3588 | |
| 3589 | |
| 3590 | |
| 3591 | |
| 3592 | |
| 3593 | |
| 3594 | |
| 3595 | |
| 3596 | |
| 3597 | |
| 3598 | |
| 3599 | |
| 3600 | |
| 3601 | |
| 3602 | |
| 3603 | |
| 3604 | |
| 3605 | |
| 3606 | |
| 3607 | |
| 3608 | |
| 3609 | |
| 3610 | |
| 3611 | |
| 3612 | |
| 3613 | |
| 3614 | |
| 3615 | |
| 3616 | |
| 3617 | |
| 3618 | |
| 3619 | |
| 3620 | |
| 3621 | |
| 3622 | |
| 3623 | |
| 3624 | |
| 3625 | |
| 3626 | |
| 3627 | |
| 3628 | |
| 3629 | |
| 3630 | /// lane-t900 r16/r17: a 10-bit 512x512 `--sb-size=128` stream in which |
| 3631 | /// every 128 root is a var-tx block, and the gate for the SKIPPED-128-block |
| 3632 | /// luma entropy reset (r17). It was BUILT as an intra-128-in-inter witness |
| 3633 | /// and r16 measured three hits of that arm in it -- every one of them an |
| 3634 | /// artifact of the desync fixed here (class `counter-from-refused-stream`). |
| 3635 | /// Decoding exactly, the arm fires ZERO times, so this stream does not |
| 3636 | /// carry that shape; the intra-128-in-inter path decodes by default now, gated by `an_intra_coded_128_half_inside_an_inter_frame_decodes_pixel_exact`. Renamed |
| 3637 | /// out of `an_intra_coded_128x64_block_inside_an_inter_frame_...` for that |
| 3638 | /// reason -- the fixture keeps the original intent in its own name. |
| 3639 | /// |
| 3640 | /// `crates/ec-av1/fixtures/intra128_in_inter_witness.obu`, 13066 bytes, |
| 3641 | /// sha256 `dd41fc39367a3d38bf8a8a8106dc30d91b716b2a9123fdfa4716930f4f98caf9`, |
| 3642 | /// produced by this repository's aomenc oracle: |
| 3643 | /// |
| 3644 | /// ```text |
| 3645 | /// aomenc --codec=av1 -w 512 -h 512 --input-bit-depth=10 --bit-depth=10 \ |
| 3646 | /// --sb-size=128 --min-partition-size=64 --max-partition-size=128 \ |
| 3647 | /// --enable-rect-partitions=1 --kf-max-dist=9999 --lag-in-frames=0 \ |
| 3648 | /// --cpu-used=1 --end-usage=q --cq-level=24 --threads=1 --obu -o s.obu src.y4m |
| 3649 | /// ``` |
| 3650 | /// |
| 3651 | /// The source is 10 frames of 10-bit 512x512 whose left two superblock |
| 3652 | /// columns carry 128-wide bands 64 rows apart (so the 128 root's cheapest |
| 3653 | /// split is `PARTITION_HORZ`) and whose right two carry 64-wide vertical |
| 3654 | /// bands (`PARTITION_VERT`), with two hard scene cuts at frames 4 and 7 and |
| 3655 | /// `--kf-max-dist=9999` so those cuts must be coded as INTER frames whose |
| 3656 | /// content no reference holds. It is the first stream found in this |
| 3657 | /// repository that makes the encoder code a 128-root HORZ/VERT half INTRA |
| 3658 | /// inside an inter frame at all: `intra128_in_inter` fires 1x 128x64 + |
| 3659 | /// 2x 64x128. Three recipes that do NOT fire it, so the shape matters: a |
| 3660 | /// small new patch on a static background (the frame costs 80 bytes, the |
| 3661 | /// encoder skips), unstructured texture (the 128 root always SPLITs), and |
| 3662 | /// cyclically repeating phases (GOLDEN holds an earlier phase, so the cut |
| 3663 | /// is predicted rather than coded intra). |
| 3664 | /// |
| 3665 | /// r16 could not lift the opt-in: the three hits landed in a frame this |
| 3666 | /// decoder did not decode exactly, and a counter read out of a desynced |
| 3667 | /// frame proves nothing (class `counter-from-refused-stream`). The blocker |
| 3668 | /// was a SEPARATE defect on the inter path, not this arm -- the same source |
| 3669 | /// re-encoded with every optional tool disabled fired the arm 0 times and |
| 3670 | /// desynced on exactly the same frames, and the same source at |
| 3671 | /// `--sb-size=64` decoded all 10 frames byte-exact. |
| 3672 | /// |
| 3673 | /// r17 root cause, and what this gate now pins (class |
| 3674 | /// `early-return-skips-tail`): a SKIPPED inter block |
| 3675 | /// whose `read_block_tx_size` still hands back var-tx leaves -- which every |
| 3676 | /// 128 root does under `TX_MODE_LARGEST` -- took `decode_inter_block`'s |
| 3677 | /// `if skip` arm, so the per-transform-unit luma publication loop never |
| 3678 | /// ran, and the block-level `record_split_luma_rect_mi` deliberately writes |
| 3679 | /// no plane 0. The skipped block therefore left the PREVIOUS block's luma |
| 3680 | /// coefficient levels standing where libaom's `av1_reset_entropy_context` |
| 3681 | /// zeroes all three planes over the block. First-bad before the fix |
| 3682 | /// (`EC_TRACE_COEFF` on both decoders, prefiltered to the |
| 3683 | /// `all_zero`/`eob`/`after_bases` tags, filtered index 426): frame 1, the |
| 3684 | /// 128x128 `is_inter=1 skip=0` block at mi(32,64), its first luma TU |
| 3685 | /// (`bc=0 br=0`, TX_64X64) -- aomdec `txb_skip` ctx 1 (`top == 0 && |
| 3686 | /// left == 0`), ours ctx 2, entry range equal on both, because the skipped |
| 3687 | /// 128x128 block at mi(32,32) never cleared `left[32..48]` (ours 1, |
| 3688 | /// aomdec 0). With the publication restored the whole 10-frame filtered |
| 3689 | /// ladder matches 1397/1397 steps. |
| 3690 | /// |
| 3691 | |
| 3692 | |
| 3693 | |
| 3694 | |
| 3695 | |
| 3696 | |
| 3697 | |
| 3698 | |
| 3699 | |
| 3700 | |
| 3701 | |
| 3702 | |
| 3703 | |
| 3704 | |
| 3705 | |
| 3706 | |
| 3707 | |
| 3708 | |
| 3709 | |
| 3710 | |
| 3711 | |
| 3712 | |
| 3713 | |
| 3714 | |
| 3715 | |
| 3716 | |
| 3717 | |
| 3718 | |
| 3719 | |
| 3720 | |
| 3721 | |
| 3722 | |
| 3723 | |
| 3724 | |
| 3725 | |
| 3726 | |
| 3727 | |
| 3728 | |
| 3729 | |
| 3730 | |
| 3731 | |
| 3732 | |
| 3733 | |
| 3734 | |
| 3735 | |
| 3736 | |
| 3737 | |
| 3738 | |
| 3739 | |
| 3740 | |
| 3741 | |
| 3742 | |
| 3743 | |
| 3744 | |
| 3745 | |
| 3746 | |
| 3747 | /// lane-t900 r18 GATE: a 128-root `PARTITION_HORZ`/`PARTITION_VERT` half |
| 3748 | /// coded INTRA inside an INTER frame -- the shape an opt-in guarded from |
| 3749 | /// lane-inter128intra r1 until this round; it decodes by default now, gated by this stream. |
| 3750 | /// |
| 3751 | /// What r16 and r17 could not find, and what this recipe exploits: libaom |
| 3752 | /// does not PICK a 128-root HORZ/VERT in the frame interior -- r16's |
| 3753 | /// 512x512 witness codes its 128 roots as NONE (96) or SPLIT (64) and |
| 3754 | /// nothing else, and a textured 640x384 sweep the same. The shape appears |
| 3755 | /// where the frame EDGE forces it: with a partial last superblock ROW |
| 3756 | /// `has_rows128 == false`, so `PARTITION_HORZ` is implied and only the |
| 3757 | /// 128x64 top half is decoded; a partial last COLUMN implies the 64x128 |
| 3758 | /// left half the same way (the arm the |
| 3759 | /// `..._sb128_gathered_edge_horz_partition_...` gate pins for INTER |
| 3760 | /// blocks). Put content no reference holds in exactly those two bands and |
| 3761 | /// the encoder codes those forced halves INTRA. |
| 3762 | /// |
| 3763 | /// `crates/ec-av1/fixtures/intra128_in_inter_witness2.obu`, 86516 bytes, |
| 3764 | /// sha256 `cace4cc3a5ba4dc5f8c7c219e87c9052351e832cad3d7f4c8ffe09288a6d7ccf`, |
| 3765 | /// produced by this repository's aomenc oracle: |
| 3766 | /// |
| 3767 | /// ```text |
| 3768 | /// aomenc --codec=av1 -w 704 -h 320 --input-bit-depth=10 --bit-depth=10 \ |
| 3769 | /// --sb-size=128 --max-partition-size=128 --enable-rect-partitions=1 \ |
| 3770 | /// --enable-ab-partitions=0 --enable-1to4-partitions=0 \ |
| 3771 | /// --enable-intrabc=0 --enable-palette=0 --tune=psnr \ |
| 3772 | /// --kf-max-dist=9999 --lag-in-frames=0 --cpu-used=1 --end-usage=q \ |
| 3773 | /// --cq-level=20 --threads=1 --passes=1 --obu -o s.obu src.y4m |
| 3774 | /// ``` |
| 3775 | /// |
| 3776 | /// The source is 15 frames of 10-bit 704x320 (704 = 5*128 + 64 and |
| 3777 | /// 320 = 2*128 + 64, so BOTH the last superblock column and the last |
| 3778 | /// superblock row are partial) whose interior is a low-passed noise |
| 3779 | /// texture panning 4 px per frame -- an exact integer translation, so |
| 3780 | /// inter predicts it and intra never would -- and whose bottom 64 rows and |
| 3781 | /// right 64 columns are replaced at frames 6, 9 and 12 by a fresh smooth |
| 3782 | /// diagonal ramp with a different angle and offset each time. No |
| 3783 | /// reference holds that content (`--lag-in-frames=0`, so there is no |
| 3784 | /// hidden alt-ref either), it is internally smooth, and it lands exactly |
| 3785 | /// in the edge-forced halves: `intra128_in_inter` fires 3x 128x64 and |
| 3786 | /// 6x 64x128, every one of them inside a frame this gate compares |
| 3787 | /// byte-exact against ffmpeg (class `counter-from-refused-stream`). |
| 3788 | |
| 3789 | |
| 3790 | |
| 3791 | |
| 3792 | |
| 3793 | |
| 3794 | |
| 3795 | |
| 3796 | |
| 3797 | |
| 3798 | |
| 3799 | |
| 3800 | |
| 3801 | |
| 3802 | |
| 3803 | |
| 3804 | |
| 3805 | |
| 3806 | |
| 3807 | |
| 3808 | |
| 3809 | |
| 3810 | |
| 3811 | |
| 3812 | |
| 3813 | |
| 3814 | |
| 3815 | |
| 3816 | |
| 3817 | |
| 3818 | |
| 3819 | |
| 3820 | |
| 3821 | |
| 3822 | |
| 3823 | |
| 3824 | |
| 3825 | |
| 3826 | |
| 3827 | |
| 3828 | |
| 3829 | |
| 3830 | |
| 3831 | |
| 3832 | |
| 3833 | |
| 3834 | /// lane-t900 r32 GATE for the LIFTED refusal "a HORZ/VERT intra strip in |
| 3835 | /// a screen-content frame (palette syntax is consumed for square blocks |
| 3836 | /// only)": the r18 edge-forced recipe re-encoded with |
| 3837 | /// `--tune-content=screen`, i.e. the exact case that refusal guarded. |
| 3838 | /// |
| 3839 | /// `crates/ec-av1/fixtures/intra128_in_inter_screen_witness.obu`, 119048 |
| 3840 | /// bytes, sha256 |
| 3841 | /// `c84a493f90327f5d2bea038a42e87cbfe56762b5c6a856d76b4bff9797c5ea09`, |
| 3842 | /// from this repository's aomenc oracle over r18's own 10-bit 704x320 |
| 3843 | /// source (`gen3.py`): the r18 flag set plus `--tune-content=screen |
| 3844 | /// --enable-palette=0 --enable-intrabc=0 --cq-level=20`. Three cq levels |
| 3845 | /// were swept (20/35/50); all three fire, and the `--enable-rect-\ |
| 3846 | /// partitions=0` twin of each codes ZERO 128-root halves, which is what |
| 3847 | /// says the shape here is the coded HORZ/VERT arm and not an artefact. |
| 3848 | /// |
| 3849 | /// The lift's proof is r31's enumeration |
| 3850 | /// (`no_block_footprint_with_a_128_pixel_side_can_carry_palette_syntax`): |
| 3851 | /// `av1_allow_palette`'s `bw > 64 || bh > 64` bound means a 128x64/64x128 |
| 3852 | /// half codes no palette syntax at all, so the screen flag changes nothing |
| 3853 | /// about its syntax. This is the WITNESS that the lifted arm is reachable |
| 3854 | /// and decodes, which r23's census could not produce. |
| 3855 | |
| 3856 | |
| 3857 | |
| 3858 | |
| 3859 | |
| 3860 | |
| 3861 | |
| 3862 | |
| 3863 | |
| 3864 | |
| 3865 | |
| 3866 | |
| 3867 | |
| 3868 | |
| 3869 | |
| 3870 | |
| 3871 | |
| 3872 | |
| 3873 | |
| 3874 | |
| 3875 | |
| 3876 | |
| 3877 | |
| 3878 | |
| 3879 | |
| 3880 | |
| 3881 | |
| 3882 | |
| 3883 | |
| 3884 | |
| 3885 | |
| 3886 | |
| 3887 | |
| 3888 | |
| 3889 | |
| 3890 | |
| 3891 | |
| 3892 | |
| 3893 | |
| 3894 | |
| 3895 | |
| 3896 | |
| 3897 | |
| 3898 | |
| 3899 | |
| 3900 | |
| 3901 | |
| 3902 | |
| 3903 | |
| 3904 | |
| 3905 | |
| 3906 | |
| 3907 | |
| 3908 | |
| 3909 | |
| 3910 | |
| 3911 | |
| 3912 | |
| 3913 | |
| 3914 | |
| 3915 | |
| 3916 | |
| 3917 | |
| 3918 | |
| 3919 | |
| 3920 | |
| 3921 | |
| 3922 | |
| 3923 | |
| 3924 | |
| 3925 | /// lane-t900 r22 GATE: a real `aomenc --tune-content=screen |
| 3926 | /// --enable-palette=1` stream whose INTER frames reconstruct palette |
| 3927 | /// blocks (Y and UV), at both bit depths. |
| 3928 | /// |
| 3929 | /// Recipe (both fixtures, 15 frames, key + 14 inter, 256x192, one tile): |
| 3930 | /// `aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=20 --cpu-used=1 |
| 3931 | /// --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=9999 |
| 3932 | /// --sb-size=64 --tune-content=screen --enable-palette=1 |
| 3933 | /// --enable-intrabc=0 --obu` (plus `--bit-depth=10 --profile=0` for the |
| 3934 | /// twin) over a synthetic screen-like source: two luma levels on a 16x16 |
| 3935 | /// grid, four chroma levels on an 8x8 one, both re-keyed per frame so the |
| 3936 | /// encoder cannot predict the new blocks and codes them INTRA inside the |
| 3937 | /// inter frames. `--enable-palette=0` on the same source is 13% larger, |
| 3938 | /// which is what says the tool is really used. |
| 3939 | /// |
| 3940 | /// What this pins that no key-frame palette gate can: the palette |
| 3941 | /// colour-index CDFs are this decoder's only VARIABLE-ALPHABET tables (the |
| 3942 | /// reader takes `[..=n]` of a `[u16; 9]` row, so `update_cdf`'s counter |
| 3943 | /// lives at index `n`), and `Cdfs::reset_counts` zeroed slot 8 instead -- |
| 3944 | /// so every colour-index row crossed a frame boundary with a SATURATED |
| 3945 | /// count and adapted at rate 6 where libaom, counting from 0, adapts at 4. |
| 3946 | /// The first inter-frame palette block's map desynced at its THIRD |
| 3947 | /// colour-index symbol (decode-order frame 3, mi(40,0), map cell (0,2): |
| 3948 | /// ours cdf0 = 32768-1071, aomdec's = 32768-971, same ctx, same value, |
| 3949 | /// different range). |
| 3950 | |
| 3951 | |
| 3952 | |
| 3953 | |
| 3954 | |
| 3955 | |
| 3956 | |
| 3957 | |
| 3958 | |
| 3959 | |
| 3960 | |
| 3961 | |
| 3962 | |
| 3963 | |
| 3964 | |
| 3965 | |
| 3966 | |
| 3967 | |
| 3968 | |
| 3969 | |
| 3970 | |
| 3971 | |
| 3972 | |
| 3973 | |
| 3974 | |
| 3975 | |
| 3976 | |
| 3977 | |
| 3978 | |
| 3979 | |
| 3980 | |
| 3981 | |
| 3982 | |
| 3983 | |
| 3984 | |
| 3985 | |
| 3986 | |
| 3987 | |
| 3988 | |
| 3989 | |
| 3990 | |
| 3991 | |
| 3992 | |
| 3993 | |
| 3994 | |
| 3995 | |
| 3996 | |
| 3997 | |
| 3998 | |
| 3999 | |
| 4000 | |
| 4001 | |
| 4002 | |
| 4003 | |
| 4004 | |
| 4005 | |
| 4006 | |
| 4007 | |
| 4008 | |
| 4009 | /// lane-t900 r23 GATE for the two LIFTED refusals `"a block that actually |
| 4010 | /// uses a palette (Y)/(UV) -- reconstruction is out of scope"` at their |
| 4011 | /// 8x8-LEAF site ([`crate::decode`]'s `decode_inter_block8` intra arm): |
| 4012 | /// a palette block on an 8x8 intra leaf inside an inter frame. |
| 4013 | /// |
| 4014 | /// Recipe (`fixtures/palette_screen_leaf8_witness.obu`): 256x192, 15 |
| 4015 | /// frames, a static two-level 16x16 screen background with a 96x96 patch |
| 4016 | /// of hashed 4x4 colour cells that moves non-periodically (so no |
| 4017 | /// reference holds it and the encoder codes it INTRA inside the inter |
| 4018 | /// frames), `aomenc --tune-content=screen --enable-palette=1 |
| 4019 | /// --enable-intrabc=0 --sb-size=64 --cq-level=20 --cpu-used=1 |
| 4020 | /// --lag-in-frames=0 --kf-max-dist=9999 --max-partition-size=8` -- the |
| 4021 | /// partition cap is what puts the palette on BLOCK_8X8 rather than on the |
| 4022 | /// 16x16/16x8 blocks r22's recipe produced. `EC_PALSYN=1` on aomdec |
| 4023 | /// counts 25 `bsize=BLOCK_8X8 palette_size>0` blocks past the key frame. |
| 4024 | /// |
| 4025 | /// What it caught beyond the refusal itself: a sub-8x8 group publishes no |
| 4026 | /// palette state, so it left the row's `left_palette_size` band holding an |
| 4027 | /// earlier 8x8 palette block's size and `av1_get_palette_mode_ctx` read 1 |
| 4028 | /// where libaom gathers 0 (decode-order frame 1, mi(30,30), palette size |
| 4029 | /// decoded as 8 instead of 2) -- class `new-map-ignores-tile-edge`, fixed |
| 4030 | /// at all three sub-8x8 tails. |
| 4031 | |
| 4032 | |
| 4033 | |
| 4034 | |
| 4035 | |
| 4036 | |
| 4037 | |
| 4038 | |
| 4039 | |
| 4040 | |
| 4041 | |
| 4042 | |
| 4043 | |
| 4044 | |
| 4045 | |
| 4046 | |
| 4047 | |
| 4048 | |
| 4049 | |
| 4050 | |
| 4051 | |
| 4052 | |
| 4053 | |
| 4054 | |
| 4055 | |
| 4056 | |
| 4057 | |
| 4058 | |
| 4059 | |
| 4060 | |
| 4061 | |
| 4062 | |
| 4063 | |
| 4064 | |
| 4065 | |
| 4066 | /// lane-t900 r22 GATE for the LIFTED refusal `"a HORZ/VERT intra strip in |
| 4067 | /// a screen-content frame (palette syntax is consumed for square blocks |
| 4068 | /// only)"` on its 16x4/4x16 arm: that arm routes through |
| 4069 | /// `decode_rect4_16_strip`, which takes `allow_screen_content_tools` and |
| 4070 | /// reads the whole palette syntax itself, so the refusal was a stale |
| 4071 | /// premise (the key-frame path proves that body). This 10-bit |
| 4072 | /// `--tune-content=screen` stream reached that exact refusal before the |
| 4073 | /// lift and now decodes all 15 frames pixel-exact while 8 inter-frame |
| 4074 | /// palette blocks reconstruct. |
| 4075 | |
| 4076 | |
| 4077 | |
| 4078 | |
| 4079 | |
| 4080 | |
| 4081 | |
| 4082 | |
| 4083 | |
| 4084 | |
| 4085 | |
| 4086 | |
| 4087 | |
| 4088 | |
| 4089 | |
| 4090 | |
| 4091 | |
| 4092 | |
| 4093 | |
| 4094 | |
| 4095 | |
| 4096 | |
| 4097 | |
| 4098 | |
| 4099 | |
| 4100 | |
| 4101 | |
| 4102 | |
| 4103 | |
| 4104 | |
| 4105 | |
| 4106 | |
| 4107 | /// lane-t900 r20 GATE, refusal A -- `"a non-skip rectangular |
| 4108 | /// (HORZ/VERT/HORZ_B) strip needs rectangular residual coding"`. |
| 4109 | /// |
| 4110 | /// That string is a claim about a SHAPE, so what proves it is the set of |
| 4111 | /// shapes the inter block path presents. `inter_piece!` sets |
| 4112 | /// `reject_residual` to `$ww != $side || $wh != $side`, i.e. only for a |
| 4113 | /// block whose true footprint is not its square CDF context, and the |
| 4114 | /// refusal then needs `!rect_inter_residual_supported(write_w, write_h)`. |
| 4115 | /// So it can fire only for a footprint that is BOTH rectangular (or a |
| 4116 | /// square smaller than its own context) AND missing from that table. |
| 4117 | /// |
| 4118 | /// This gate measures the domain instead of asserting it: |
| 4119 | /// [`crate::decode::inter_block_shape_mask`] records every |
| 4120 | /// `(side, write_w, write_h)` triple decoded on this thread, with bit 31 |
| 4121 | /// reserved for a triple [`crate::decode::INTER_BLOCK_SHAPES`] does not |
| 4122 | /// list. Three real streams -- a 10-bit 1920x792 128-superblock film cut, |
| 4123 | /// its 128-root intra witness and the 1920x792 small-side warp cut, |
| 4124 | /// together ~140k inter blocks -- decode without a refusal and present |
| 4125 | /// exactly 18 triples: the four square ones (`write == side`, where |
| 4126 | /// `reject_residual` is false) and the fourteen rectangular AV1 block |
| 4127 | /// shapes, every one of which `rect_inter_residual_supported` covers. No |
| 4128 | /// square-inside-a-larger-context triple appears at all. |
| 4129 | /// |
| 4130 | /// Measured 2026-09-04: mask covers 18/18 listed triples, bit 31 clear, |
| 4131 | /// 0 refusals. |
| 4132 | |
| 4133 | |
| 4134 | |
| 4135 | |
| 4136 | |
| 4137 | |
| 4138 | |
| 4139 | |
| 4140 | |
| 4141 | |
| 4142 | |
| 4143 | |
| 4144 | |
| 4145 | |
| 4146 | |
| 4147 | |
| 4148 | |
| 4149 | |
| 4150 | |
| 4151 | |
| 4152 | |
| 4153 | |
| 4154 | |
| 4155 | |
| 4156 | |
| 4157 | |
| 4158 | |
| 4159 | |
| 4160 | |
| 4161 | |
| 4162 | |
| 4163 | |
| 4164 | |
| 4165 | |
| 4166 | |
| 4167 | |
| 4168 | |
| 4169 | |
| 4170 | |
| 4171 | |
| 4172 | |
| 4173 | |
| 4174 | |
| 4175 | |
| 4176 | |
| 4177 | |
| 4178 | |
| 4179 | |
| 4180 | |
| 4181 | |
| 4182 | |
| 4183 | |
| 4184 | |
| 4185 | |
| 4186 | |
| 4187 | |
| 4188 | |
| 4189 | /// lane-t900 r20 GATE, refusal C -- `"an intra 16x4/4x16 strip inside an |
| 4190 | /// inter 16x16-level 1:4 partition (its 4:2:0 chroma pair is coded once |
| 4191 | /// for two strips; only the inter path implements that pairing)"`. |
| 4192 | /// |
| 4193 | /// The arm fires for an INTRA footprint with a side below 8 that carries |
| 4194 | /// no chroma-pair record (`strip16`). Two measurements make that a claim |
| 4195 | /// rather than a hope: |
| 4196 | /// |
| 4197 | /// * the block-shape census: the ONLY sub-8 footprints three real streams |
| 4198 | /// present are 16x4 and 4x16 at a 16-px context, i.e. the strips of a |
| 4199 | /// 16x16-level 1:4 partition -- and that caller sets |
| 4200 | /// `INTER_STRIP_CHROMA` for every one of its four strips before the |
| 4201 | /// block is decoded, so the record is never missing there; |
| 4202 | /// * the sibling counter: the SUPPORTED path |
| 4203 | /// ([`crate::decode::intra16x4_in_inter_hits`]) fires on both |
| 4204 | /// orientations, chroma-paired, inside streams that decode with no |
| 4205 | /// refusal at all. |
| 4206 | /// |
| 4207 | /// Measured 2026-09-04: 3 streams, 0 refusals, 78 16x4 + 149 4x16 (108 |
| 4208 | /// chroma-paired), and 2 of 2 sub-8 census triples are the 1:4 strips. |
| 4209 | |
| 4210 | |
| 4211 | |
| 4212 | |
| 4213 | |
| 4214 | |
| 4215 | |
| 4216 | |
| 4217 | |
| 4218 | |
| 4219 | |
| 4220 | |
| 4221 | |
| 4222 | |
| 4223 | |
| 4224 | |
| 4225 | |
| 4226 | |
| 4227 | |
| 4228 | |
| 4229 | |
| 4230 | |
| 4231 | |
| 4232 | |
| 4233 | |
| 4234 | |
| 4235 | |
| 4236 | |
| 4237 | |
| 4238 | |
| 4239 | |
| 4240 | |
| 4241 | |
| 4242 | |
| 4243 | |
| 4244 | |
| 4245 | |
| 4246 | |
| 4247 | |
| 4248 | |
| 4249 | |
| 4250 | |
| 4251 | |
| 4252 | |
| 4253 | |
| 4254 | |
| 4255 | |
| 4256 | |
| 4257 | |
| 4258 | |
| 4259 | |
| 4260 | |
| 4261 | |
| 4262 | |
| 4263 | |
| 4264 | |
| 4265 | |
| 4266 | |
| 4267 | |
| 4268 | /// lane-t900 r10: the small-side GLOBALMV / rect warp-reach witness. |
| 4269 | /// `crates/ec-av1/fixtures/gm_small_side_witness.obu`, 1158066 bytes, |
| 4270 | /// sha256 `f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca`: |
| 4271 | /// the first 50 frame-carrying OBUs of a 2 s cut taken 5400 s into a 10-bit |
| 4272 | /// 1920x792 AV1 stream with `use_128x128_superblock=1` -- 34 decode-order |
| 4273 | /// frames, 33 shown, every ARF in it coded with `allow_warped_motion=1`. |
| 4274 | /// Truncated twice independently from the same source, both cuts hash |
| 4275 | /// identically. All 34 DECODE-order frames (the hidden ARF included) were |
| 4276 | /// compared byte-exact against instrumented aomdec with `EC_AV1_FINAL_DUMP` |
| 4277 | /// -- see the lane report's EVIDENCE line; the gate itself compares the 33 |
| 4278 | /// shown frames on every plane, which is all ffmpeg hands back. |
| 4279 | /// |
| 4280 | /// It is the only stream in this repository that fires BOTH r9/r10 paths: |
| 4281 | /// |
| 4282 | /// * `gm_nontrans_small_side_hits` -- libaom `is_nontrans_global_motion` |
| 4283 | /// returns 0 at `AOMMIN(mi_size_wide, mi_size_high) < 2` BEFORE it looks |
| 4284 | /// at any warp model, so a GLOBALMV block with a 4-px side still reads |
| 4285 | /// its interp filter. We suppressed that symbol before r9. |
| 4286 | /// * `tr_reach_longer_side_hits` -- `av1_findSamples` probes the top-right |
| 4287 | /// warp sample at `AOMMAX(xd->width, xd->height)` (mvref_common.c:1235) |
| 4288 | /// with libaom's two rect shape refinements |
| 4289 | /// (`is_last_vertical_rect` / `is_first_horizontal_rect`, |
| 4290 | /// av1_common_int.h:1419-1428) applied; probing at the block's WIDTH |
| 4291 | /// instead picks the 3-symbol `motion_mode` alphabet where libaom reads |
| 4292 | /// the 2-symbol `obmc` one -- same value, different narrowing. |
| 4293 | |
| 4294 | |
| 4295 | |
| 4296 | |
| 4297 | |
| 4298 | |
| 4299 | |
| 4300 | |
| 4301 | |
| 4302 | |
| 4303 | |
| 4304 | |
| 4305 | |
| 4306 | |
| 4307 | |
| 4308 | |
| 4309 | |
| 4310 | |
| 4311 | |
| 4312 | |
| 4313 | |
| 4314 | |
| 4315 | |
| 4316 | |
| 4317 | |
| 4318 | |
| 4319 | |
| 4320 | |
| 4321 | |
| 4322 | |
| 4323 | |
| 4324 | |
| 4325 | |
| 4326 | |
| 4327 | |
| 4328 | |
| 4329 | |
| 4330 | |
| 4331 | |
| 4332 | |
| 4333 | |
| 4334 | |
| 4335 | |
| 4336 | |
| 4337 | |
| 4338 | |
| 4339 | |
| 4340 | |
| 4341 | |
| 4342 | |
| 4343 | |
| 4344 | |
| 4345 | |
| 4346 | |
| 4347 | |
| 4348 | |
| 4349 | |
| 4350 | |
| 4351 | |
| 4352 | |
| 4353 | |
| 4354 | /// lane-film10fix: the DECODE-ORDER half of the two charter-named 10-bit |
| 4355 | /// film gates, against the instrumented `aomdec` rather than ffmpeg. |
| 4356 | /// |
| 4357 | /// `a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_...` (15 shown |
| 4358 | /// frames) and `a_10bit_film_frames_with_small_side_globalmv_and_rect_warp_...` |
| 4359 | /// (33 shown) each hold exactly ONE hidden alt-ref frame, and both |
| 4360 | /// compare through `ffmpeg_decode_sequence_10bit`, which emits SHOWN |
| 4361 | /// frames only. So one frame in 16 and one in 34 of each stream is |
| 4362 | /// outside both gates' reach -- class `gate-blind-to-hidden-frames`: a |
| 4363 | /// defect in a hidden frame surfaces only as drift on some later shown |
| 4364 | /// frame, if at all. Their doc comments claim the hidden frames were |
| 4365 | /// compared byte-exact against aomdec, but that measurement lived in a |
| 4366 | /// lane report, not in a test, so nothing re-ran it. |
| 4367 | /// |
| 4368 | /// This gate is that measurement, committed. |
| 4369 | /// [`decode_all_frames_vs_oracle`] writes `EC_AV1_FINAL_DUMP` on both |
| 4370 | /// sides (ours in `decode_stream`, the oracle's in rung 12 of |
| 4371 | /// `scripts/instrument-aom-oracle.sh`) and byte-compares EVERY decode-order |
| 4372 | /// frame, hidden included. Both fixtures are the same 1920x792 10-bit |
| 4373 | /// films their own gates pin, at the sha256 those gates record. |
| 4374 | /// |
| 4375 | /// The frame counts are asserted, not just reported: 16 = 15 shown + 1 |
| 4376 | /// hidden, 34 = 33 shown + 1. A stream that quietly lost its hidden ARF |
| 4377 | /// would make this compare fewer frames and would otherwise read as a |
| 4378 | /// pass. |
| 4379 | |
| 4380 | |
| 4381 | |
| 4382 | |
| 4383 | |
| 4384 | |
| 4385 | |
| 4386 | |
| 4387 | |
| 4388 | |
| 4389 | |
| 4390 | |
| 4391 | |
| 4392 | |
| 4393 | |
| 4394 | |
| 4395 | |
| 4396 | |
| 4397 | |
| 4398 | |
| 4399 | |
| 4400 | |
| 4401 | |
| 4402 | |
| 4403 | |
| 4404 | |
| 4405 | |
| 4406 | |
| 4407 | |
| 4408 | |
| 4409 | |
| 4410 | |
| 4411 | |
| 4412 | |
| 4413 | |
| 4414 | |
| 4415 | |
| 4416 | |
| 4417 | |
| 4418 | |
| 4419 | |
| 4420 | |
| 4421 | |
| 4422 | |
| 4423 | /// lane-t900 r11: the frame-edge MV clamp witness. |
| 4424 | /// |
| 4425 | /// `crates/ec-av1/fixtures/reelb_head_mvclamp_witness.obu` (72158 bytes, |
| 4426 | /// sha256 451a9b138995e636f22308847a123b5c8621d4908cd93772cf5bbf2b37df39d7, |
| 4427 | /// truncated twice independently to identical hashes) is the first 80 |
| 4428 | /// frame-carrying OBUs of a 10-bit 3840x1608 HDR film head -- the SMALLEST |
| 4429 | /// such prefix that fires the clamp (N=79 fires 0, N=80 fires 5). 55 |
| 4430 | /// decode-order frames, 52 shown, every decode-order frame byte-identical |
| 4431 | /// to instrumented aomdec (`EC_AV1_FINAL_DUMP`, see the r11 report). |
| 4432 | /// |
| 4433 | /// The path it pins: libaom's `mb_to_right_edge` / `mb_to_bottom_edge` |
| 4434 | /// (`set_mi_row_col`, av1_common_int.h) are SIGNED, and a block that |
| 4435 | /// overhangs the frame's right/bottom edge keeps its full `bw4`/`bh4`, so |
| 4436 | /// `mi_cols - bw4 - mi_col` and `mi_rows - bh4 - mi_row` go NEGATIVE there |
| 4437 | /// and `clamp_mv_ref` (mvref_common.h) narrows the stack window by that |
| 4438 | /// much. This frame height is 1608 -> `mi_rows == 402`, so every 64x64 |
| 4439 | /// block on the bottom row overhangs by 14 mi units. Computing that |
| 4440 | /// difference in `usize` saturated it to 0 and left the window 448 subpel |
| 4441 | /// too wide, so an edge block's predictor was never clamped -- one 64x64 |
| 4442 | /// NEWMV block at mi(400,368) took `mv0=(224,568)` where libaom takes |
| 4443 | /// `(32,568)`, its MC then read the replicated bottom row instead of real |
| 4444 | /// reference rows, and the frame missed by 221 bytes. |
| 4445 | |
| 4446 | |
| 4447 | |
| 4448 | |
| 4449 | |
| 4450 | |
| 4451 | |
| 4452 | |
| 4453 | |
| 4454 | |
| 4455 | |
| 4456 | |
| 4457 | |
| 4458 | |
| 4459 | |
| 4460 | |
| 4461 | |
| 4462 | |
| 4463 | |
| 4464 | |
| 4465 | |
| 4466 | |
| 4467 | |
| 4468 | |
| 4469 | |
| 4470 | |
| 4471 | |
| 4472 | |
| 4473 | |
| 4474 | |
| 4475 | |
| 4476 | |
| 4477 | |
| 4478 | |
| 4479 | |
| 4480 | |
| 4481 | |
| 4482 | |
| 4483 | |
| 4484 | |
| 4485 | |
| 4486 |