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 craterun_with_stdin; |
| 5 | use ; |
| 6 | |
| 7 | /// lane-sub8x4 r2, the gate that lifts BOTH sub-8x8 intra refusals ("an |
| 8 | /// intra 4x4 block inside an inter frame's sub-8x8 split" and "an intra |
| 9 | /// 8x4/4x8 block inside an inter frame's sub-8x8 HORZ/VERT partition"). |
| 10 | /// |
| 11 | /// Recipe (measured, `~/.cache/sub8intra-tmp/sweep3.sh`): a 24-row band of |
| 12 | /// per-frame-moving noise over a smooth sinusoid, `--min-partition-size=4 |
| 13 | /// --max-partition-size=8 --enable-1to4-partitions=0` -- at that maximum a |
| 14 | /// 16x4 shape cannot exist, so nothing here can be confused with the |
| 15 | /// still-refused intra 1:4 strip, and the noise band is what makes aomenc's |
| 16 | /// RD pick INTRA leaves inside an inter frame's 8x8 groups. 12 arms |
| 17 | /// (8/10-bit x cq 48/55/63 x 128x128/192x128) plus one `--tile-columns=1` |
| 18 | /// arm (COMMON's neighbour-map rule: these leaves publish per-mi side |
| 19 | /// bands), 6 frames each, every decode-order frame and all three planes |
| 20 | /// compared against ffmpeg. Continue-and-sweep: a NAMED refusal is |
| 21 | /// recorded and the arm skipped, any other decode error or any pixel |
| 22 | /// mismatch fails the gate on the spot. |
| 23 | /// |
| 24 | /// The end-of-sweep assert reads all five |
| 25 | /// [`decode::sub8_intra_rect_hits`] cells -- 8x4 leaves, 4x8 leaves, the |
| 26 | /// chroma-reference ones (which code the group's 4x4 chroma intra), |
| 27 | /// `is_sub8x8_inter`-false MIXED groups, and the `PARTITION_SPLIT` 4x4 |
| 28 | /// leaves (the second refusal's own arm) -- so neither lifted refusal |
| 29 | /// rests on a stream that never carried its shape. |
| 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 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 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 | /// lane-thread1: every per-frame/per-stream decode state now lives in |
| 244 | /// [`crate::decode::FrameCtx`], not in a `thread_local!`. A static that |
| 245 | /// comes back would silently re-break frame-parallel decoding (a worker |
| 246 | /// thread sees an empty copy) without failing any pixel gate, so pin the |
| 247 | /// 38 names by name against the sources themselves. |
| 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 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 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 | /// lane-d792: a frame whose height the superblock grid CUTS, decoded |
| 320 | /// against ffmpeg on every ladder point of BOTH reference encoders. |
| 321 | /// |
| 322 | /// WHY IT EXISTS: the reference encoders answer a straddling frame with |
| 323 | /// rectangular partitions in the cut superblock row -- the only place |
| 324 | /// these streams code a 16x8/8x4 transform unit at all -- and the rect |
| 325 | /// intra dequant path was reading the FRAME's quantizer index where every |
| 326 | /// square path reads the block's segment-adjusted one |
| 327 | /// (`SEG_LVL_ALT_Q`, class `parsed-then-discarded`). Every gate size |
| 328 | /// before this one was a whole number of superblocks, so no gate ever |
| 329 | /// decoded such a unit: the 1920x792 native BD arm's reference-decode |
| 330 | /// assertion was red on all four rav1e points and this is its small, |
| 331 | /// fast, encoder-independent form. |
| 332 | /// |
| 333 | /// 384x152 is 2 superblocks + 24 px (the 1920x792 straddle, film A's own |
| 334 | /// coded size) and 384x184 is 2 + 56 px (the 1920x1080 straddle), so both |
| 335 | /// the "less than half inside" and the "more than half inside" edge |
| 336 | /// superblock shapes are covered. |
| 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 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 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 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | /// lane-seg2: a SEGMENTED key frame that also codes sub-8x8 INTRA leaves. |
| 598 | /// |
| 599 | /// WHY IT EXISTS: `read_intra_mode_sub8` -- the reader every `BLOCK_4X4` |
| 600 | /// split leaf and every 8x4/4x8 leaf goes through -- never called spec |
| 601 | /// 5.11.6's `intra_segment_id` at all. On a stream with segmentation on |
| 602 | /// it therefore (a) left the block's `segment_id` symbol unread, so the |
| 603 | /// tile desynced from the frame's first sub-8x8 partition on, and (b) |
| 604 | /// dequantized the leaf with the PREVIOUS block's `SEG_LVL_ALT_Q`. |
| 605 | /// Reading it with a hardcoded 1x1 mi footprint was the second half of |
| 606 | /// the same defect: an 8x4 leaf left its second mi cell at segment 0, |
| 607 | /// which the next block read back as its spatial prediction and CDF row. |
| 608 | /// |
| 609 | /// RECIPE: flat gray + heavy `noise` (the contrast is what turns libaom's |
| 610 | /// activity segmentation on -- a `testsrc2`/bars source codes ONE segment |
| 611 | /// and passes with the defect in, ledger dead-end `gate film rows are |
| 612 | /// colour bars`), at `-crf 5 -cpu-used 2`, which is the measured corner |
| 613 | /// where libaom answers with sub-8x8 intra partitions. Measured on this |
| 614 | /// exact stream: red before either half of the fix (134k/134k samples |
| 615 | /// off), green with both. |
| 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 | /// lane-av1leftref: the left chroma reference's `+ss_y` ROW term |
| 719 | /// (libaom `av1_common_int.h:1400-1401`, `chroma_left_mi = |
| 720 | /// base_mi[ss_y * mi_stride - 1]` -- one mi row DOWN at 4:2:0 and 4:4:0, |
| 721 | /// on its own row at 4:2:2 and 4:4:4). This decoder read its own row at |
| 722 | /// every subsampling until this lane. |
| 723 | /// |
| 724 | /// The read is only observable when the two cells hold DIFFERENT blocks -- |
| 725 | /// a left neighbour at most 1 mi tall (1 mi = 4 luma px, so a 4x4/8x4/16x4 |
| 726 | /// /32x4/64x4 leaf). lane-av1leftwit measured that shape off a per-cell |
| 727 | /// owner stamp instead of the mode value: `uv_left_1mi_split_hits()` counts |
| 728 | /// decode-path reads whose two cells were written by DIFFERENT blocks, and |
| 729 | /// it is NOT zero -- five committed fixtures carry it (15 reads in all, |
| 730 | /// `lanes/av1leftwit.report.md`). What no committed fixture shows is the two |
| 731 | /// blocks DISAGREEING on `uv_mode`, which is what `mode_diff`/`smooth_diff` |
| 732 | /// below measure. So this gate pins both halves honestly: the arm runs |
| 733 | /// thousands of times, the shape it needs is genuinely reached, and the |
| 734 | /// term has not yet been seen to change an answer. Its exactness arms are |
| 735 | /// what would decide the shipped read if a DIFF bucket ever went non-zero. |
| 736 | /// |
| 737 | /// A non-zero DIFF bucket is not a failure here -- it is the first stream |
| 738 | /// that witnesses the term, and the exactness arms below are what then |
| 739 | /// decide whether the shipped read is the one that matches the oracle. |
| 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 | /// lane-av1leftwit: the `+ss_y` term's SHAPE is reachable on the decode |
| 784 | /// path, and this is the gate that says so. |
| 785 | /// |
| 786 | /// lane-av1leftref shipped the left read's `+ss_y` row term with the |
| 787 | /// argument that the shape it needs -- a left neighbour at most 1 mi tall, |
| 788 | /// so the cell this decoder read and the cell libaom reads belong to |
| 789 | /// different blocks -- is "structurally absent, because aomenc never starts |
| 790 | /// a block on an odd mi row". Both halves of that are wrong. libaom's |
| 791 | /// `PARTITION_HORZ_4` puts its `i == 0` child on the PARENT's own mi row |
| 792 | /// (`decode_partition`, `av1/decoder/decodeframe.c`: `mi_row + i * bw / 4`), |
| 793 | /// and a 16x16 parent sits on a 4-mi grid, so a 1-mi-tall leaf at an EVEN |
| 794 | /// row is what the syntax asks for, not forbids. And the shape is measured |
| 795 | /// in the corpus: these two fixtures each present it to a real decode-path |
| 796 | /// read. |
| 797 | /// |
| 798 | /// The counter is `decode::uv_left_1mi_split_hits()`, incremented only |
| 799 | /// where `decode_path` is true -- the snapping form every decode call site |
| 800 | /// uses -- so the 16x4/4x16 pair witness's counter-only mirror (which |
| 801 | /// reads an odd mi row and feeds `RECT4_16_UV_PAIR_FILT_HITS`) cannot |
| 802 | /// inflate it. `UV_LEFT_SS_Y_READS` alone would prove nothing: it counts |
| 803 | /// every read with a left neighbour, whether or not the two cells differ. |
| 804 | /// |
| 805 | /// NON-VACUITY: the `uv_owner` stamp the counter turns on was removed for |
| 806 | /// one build; both arms fell to 0 and this gate failed on the census |
| 807 | /// (report §5), so a decoder that stops recording which block owns a cell |
| 808 | /// fails here instead of passing vacuously. It is deliberately NOT a |
| 809 | /// mutation of the `+ss_y` term itself: the term's own mutation leaves |
| 810 | /// these reads untouched, which is the honest limit of what the fixture |
| 811 | /// set can decide (the kf900 gate above owns the exactness side). |
| 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 | |
| 862 | |
| 863 | |
| 864 | /// lane-av1formatsweep: the ODD CODED DIMENSION cell -- a frame whose |
| 865 | /// width or height is not a multiple of 8, so the last mode-info column |
| 866 | /// and the last chroma plane row/column are PARTIAL (`mi_cols * 8 > |
| 867 | /// width`, and at 4:2:0 the chroma plane is `ceil(w/2) x ceil(h/2)`). |
| 868 | /// |
| 869 | /// Nothing else in this file ever encoded one: every frame size in the |
| 870 | /// suite (the `tiny_frame_size_sweep` ladder included -- 8,16,24,32,48, |
| 871 | /// 64,72,136,192) is a multiple of 8, so the partial-chroma-plane walk |
| 872 | /// had no committed exactness evidence at any depth. The class matters |
| 873 | /// for a 4:2:2 lift too: at ss (1,0) the chroma plane is |
| 874 | /// `ceil(w/2) x h`, so the partial extent lands on the OTHER axis. |
| 875 | /// |
| 876 | /// NON-VACUITY: `decode::inter_edge_strip_hits()` (the frame-edge strip |
| 877 | /// walk) is asserted to fire, and the even-size control arm is asserted |
| 878 | /// to leave it at zero -- measured: 130x122 -> `[0,2,0,4,0,6]`, |
| 879 | /// 130x130 -> `[0,3,0,2,24,6]`, 128x96 -> all zero. Without that pair a |
| 880 | /// decoder that dropped the partial column entirely would still pass the |
| 881 | /// pixel compare (class `gate-blind-to-feature`). |
| 882 | /// |
| 883 | /// Recipe (deterministic: single pass, single thread, no row-mt): |
| 884 | /// `ffmpeg -f lavfi -i testsrc2=size=<W>x<H>:rate=25 -frames:v 4 |
| 885 | /// -pix_fmt <pix> -f yuv4mpegpipe -` piped to |
| 886 | /// `aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=20 |
| 887 | /// --cpu-used=2 --threads=1 --row-mt=0 --lag-in-frames=0 |
| 888 | /// --kf-max-dist=100 --limit=4 --obu -o - -`, plus |
| 889 | /// `--input-bit-depth=N --bit-depth=N` at 10 and 12 bits. The 12-bit arm |
| 890 | /// uses the smoothed `mandelbrot` source because a sharp-edged source |
| 891 | /// makes aomenc set `allow_screen_content_tools`, which this decoder |
| 892 | /// refuses BY NAME at 12 bits (see `a_12bit_screen_content_stream_is_ |
| 893 | /// refused_by_name`). |
| 894 | /// |
| 895 | /// NON-VACUITY, RED-BEFORE PROVEN: the mode-info grid's ceil is the |
| 896 | /// arithmetic this cell depends on, and mutating it turns every arm red |
| 897 | /// -- `ec-av1-syntax`'s `h.mi_cols = 2 * ((h.frame_width + 7) >> 3)` |
| 898 | /// floored to `2 * (h.frame_width >> 3)` makes the first arm fail at |
| 899 | /// decode-order frame 0, byte 128 (ours 74 vs oracle 170, 11538 bytes |
| 900 | /// differ); reverted, the gate is green again. A NEARER mutation, |
| 901 | /// flooring `decode::round_ss` from libaom's `ROUND_POWER_OF_TWO`, |
| 902 | /// leaves this gate GREEN and is not evidence either way: aomenc rounds |
| 903 | /// a 4:2:0 frame's coded size DOWN to even, so no stream this recipe can |
| 904 | /// produce codes an odd luma dimension, and the chroma-extent ceil only |
| 905 | /// differs from its floor when the luma dimension is itself odd. |
| 906 | /// |
| 907 | /// Also asserted, so a recipe that silently became even-dimensioned can |
| 908 | /// not pass as this cell: the header's `ss (1,1)` and bit depth, the |
| 909 | /// partial mode-info grid (`mi*8 > dim`), every frame's chroma plane |
| 910 | /// being `ceil(w/2)*ceil(h/2)`, and |
| 911 | /// `decode::inter_edge_strip_hits()` non-zero after a per-arm reset -- |
| 912 | /// measured per arm: `[0,6,0,4,48,12]`, `[0,0,0,4,0,6]`, |
| 913 | /// `[0,4,0,10,0,10]`, `[0,4,0,8,0,12]`, `[0,4,0,8,0,8]`, |
| 914 | /// `[0,0,0,12,0,14]`, where the even-size control (128x96) reads all |
| 915 | /// zeros. Without the counter a decoder that dropped the partial column |
| 916 | /// entirely would still pass the pixel compare (class |
| 917 | /// `gate-blind-to-feature`). |
| 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 | /// lane-av1formatsweep: the 4:4:4 x 10-BIT cell. Every committed 4:4:4 |
| 981 | /// exactness gate in this file is `--lossless=1` at 8 bits |
| 982 | /// (`a_real_aomenc_lossless_444_key_frame_decodes_sample_exact`, |
| 983 | /// `a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact`, |
| 984 | /// `a_lossless_444_defaultp_inter_strip_stream_decodes_byte_exact`, the |
| 985 | /// `ll444_*` pins), so the whole committed 4:4:4 evidence base is LOSSLESS |
| 986 | /// 8-bit: no 4:4:4 stream above 8 bits had a committed exactness gate. |
| 987 | /// |
| 988 | /// NON-VACUITY: `decode::rect_split_lossless_chroma444_hits()` -- the |
| 989 | /// per-4x4 chroma unit walk a lossless HORZ/VERT strip takes at |
| 990 | /// subsampling 0/0 -- is asserted to fire (measured 32 units on this |
| 991 | /// recipe), and the sequence header is asserted to say ss (0,0) at |
| 992 | /// 10-bit before any pixel is trusted. A 4:2:0 stream of the same |
| 993 | /// content leaves that counter at zero, so the pixel compare alone would |
| 994 | /// not prove the 4:4:4 chroma path ran (class `gate-blind-to-feature`). |
| 995 | /// |
| 996 | /// Recipe: `testsrc2 128x96` yuv444p10le 6 frames, `aomenc --codec=av1 |
| 997 | /// --profile=1 --input-bit-depth=10 --bit-depth=10 --lossless=1 |
| 998 | /// --enable-palette=0 --enable-intrabc=0 --cq-level=20 --cpu-used=2 |
| 999 | /// --passes=1 --end-usage=q --threads=1 --row-mt=0 --lag-in-frames=0 |
| 1000 | /// --kf-max-dist=100 --limit=6 --obu -o - -`. |
| 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 | /// lane-av1formatsweep: the 4:4:4 x 12-BIT cell -- the deepest chroma |
| 1047 | /// format the spec allows, and the one no committed gate reached. A |
| 1048 | /// sharp-edged source makes aomenc set `allow_screen_content_tools`, |
| 1049 | /// which this decoder refuses BY NAME at 12 bits (palette and intrabc |
| 1050 | /// have no 12-bit witness), so the arm encodes the SMOOTHED |
| 1051 | /// `mandelbrot` source -- the same trick `a_real_aomenc_12bit_stream_ |
| 1052 | /// decodes_pixel_exact`'s in-tree source exists for. |
| 1053 | /// |
| 1054 | /// NON-VACUITY: the header is asserted to say ss (0,0) at 12 bits, |
| 1055 | /// `mc::mc_subpel_hits()` (the 12-bit-sensitive subpel round pair) must |
| 1056 | /// fire -- a key-frame-only stream would pass the pixel compare without |
| 1057 | /// touching it -- and every decoded frame's chroma plane is asserted to |
| 1058 | /// be FULL resolution, which is the 4:4:4 extent itself. |
| 1059 | /// |
| 1060 | /// Recipe: `mandelbrot 128x96` + `-vf gblur=sigma=6` yuv444p12le 6 frames, |
| 1061 | /// `aomenc --codec=av1 --input-bit-depth=12 --bit-depth=12 --passes=1 |
| 1062 | /// --end-usage=q --cq-level=20 --cpu-used=2 --threads=1 --row-mt=0 |
| 1063 | /// --lag-in-frames=0 --kf-max-dist=100 --limit=6 --obu -o - -`. |
| 1064 | /// aomenc picks `seq_profile=2` here (12-bit forces it) with |
| 1065 | /// `subsampling_x/y = 0,0` -- still 4:4:4 planes. lane-av1422lift: 4:2:2 |
| 1066 | /// (1,0) is DECODED now, so the only subsampling the decoder still asserts |
| 1067 | /// against is the uncodable 4:4:0 (0,1) cell, closed by |
| 1068 | /// `the_440_cell_is_not_a_codable_chroma_shape`. |
| 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 | /// lane-av1tilemeasure: 12-BIT 4:2:0 with tile ROWS genuinely enabled, and |
| 1108 | /// with a 2x2 tile grid. `gate_coverage.rs` records that the multi-tile |
| 1109 | /// 2D grid is covered "at both bit depths" -- meaning 8 and 10; 12 was the |
| 1110 | /// gap, and the sweep's 12-bit "tile rows" cell (t420_12_row) never |
| 1111 | /// encoded an untiled control, so nobody could say which stream it had |
| 1112 | /// measured. |
| 1113 | /// |
| 1114 | /// Recipe (per arm): `mandelbrot 256x256` + `-vf gblur=sigma=6` |
| 1115 | /// yuv420p12le 6 frames (the 12-bit screen-tools refusal fires on a sharp |
| 1116 | /// source -- H6), `aomenc --codec=av1 --passes=1 --end-usage=q |
| 1117 | /// --cq-level=20 --cpu-used=2 --enable-palette=0 --enable-intrabc=0 |
| 1118 | /// --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 --limit=6 |
| 1119 | /// --input-bit-depth=12 --bit-depth=12 --obu -o - -` plus `--tile-rows=1` |
| 1120 | /// (arm 1) or `--tile-columns=1 --tile-rows=1` (arm 2). |
| 1121 | /// |
| 1122 | /// NON-VACUITY, in the order a reader should check it: |
| 1123 | /// 1. the sequence header is `ss (1,1)` at 12 bits |
| 1124 | /// (`odd_dim_header_mi_grid`); |
| 1125 | /// 2. EVERY frame header's parsed `tile_info` is 1x2 / 2x2 -- the trap-2 |
| 1126 | /// guard: an untiled stream fails here before a pixel is read; |
| 1127 | /// 3. `decode::tile_hits()` advances by at least one hit per tile per |
| 1128 | /// frame, so tile 1 (and the second ROW) really decoded rather than the |
| 1129 | /// first tile being decoded twice; |
| 1130 | /// 4. every decoded plane is 256*256 samples -- a truncated or |
| 1131 | /// quarter-extent decode fails the shape assert; |
| 1132 | /// 5. `decode_all_frames_vs_oracle` asserts the decode-order frame COUNT |
| 1133 | /// and each frame's byte LENGTH against the instrumented `aomdec` |
| 1134 | /// before any sample is compared (a prefix compare is not a compare -- |
| 1135 | /// the same report's trap 1). |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 | |
| 1144 | |
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 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 | /// lane-av1tilemeasure: 4:4:4 SUPERRES at 8, 10 and 12 bits. The sweep's |
| 1215 | /// superres row was `--superres-mode=1` alone, and measured that recipe |
| 1216 | /// at 4:4:4 8 bits: this lane re-encoded it and read `use_superres` on |
| 1217 | /// every frame header -- ZERO frames carried it, so that cell never |
| 1218 | /// exercised the upscaler at all (the same "an aomenc flag is not |
| 1219 | /// evidence" trap as tile rows, one axis over). libaom only signals |
| 1220 | /// `use_superres` when a DENOMINATOR is given, so the arms here spell |
| 1221 | /// `--superres-denominator=12 --superres-kf-denominator=12` and the |
| 1222 | /// header says `use_superres=1` on all four frames. |
| 1223 | /// |
| 1224 | /// Recipe: `testsrc2 128x128` yuv444p10le (12-bit: the gblur'd |
| 1225 | /// `mandelbrot`, H6) 4 frames, `aomenc --codec=av1 --passes=1 |
| 1226 | /// --end-usage=q --cq-level=20 --cpu-used=2 --enable-palette=0 |
| 1227 | /// --enable-intrabc=0 --superres-mode=1 --superres-denominator=12 |
| 1228 | /// --superres-kf-denominator=12 --threads=1 --row-mt=0 --lag-in-frames=0 |
| 1229 | /// --kf-max-dist=100 --limit=4 --input-bit-depth=N --bit-depth=N --obu |
| 1230 | /// -o - -`. Coded width comes out 85px, upscaled to 128. |
| 1231 | /// |
| 1232 | /// NON-VACUITY: `ss (0,0)` at the claimed depth; EVERY frame header has |
| 1233 | /// `use_superres` with a coded width strictly below the upscaled one (a |
| 1234 | /// stream without it fails here, not at the pixel compare); |
| 1235 | /// `superres::superres_hits()` advances once per frame (the upscaler |
| 1236 | /// really ran); every decoded plane is the UPSCALED 128x128 -- a decoder |
| 1237 | /// that forgot the upsample would hand back 85x128 and fail the shape |
| 1238 | /// assert, and at `ss (0,0)` the chroma planes must be full resolution |
| 1239 | /// too; then the length-asserting `aomdec` compare. |
| 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 | /// lane-av1tilemeasure: 4:4:4 at PARTIAL and ODD coded dimensions, |
| 1326 | /// 8/10/12 bits -- and a correction to what the sweep's "odd dims" cell |
| 1327 | /// was measuring. |
| 1328 | /// |
| 1329 | /// **The sweep's odd-dimension 4:4:4 cells were not odd.** 66x66, |
| 1330 | /// 130x122 and 194x130 are even in BOTH axes; what they are is "not a |
| 1331 | /// multiple of 8", the same class as the 4:2:0 row the sweep measured as |
| 1332 | /// "even, not a multiple of 8". This gate's own assert said so out loud |
| 1333 | /// on its first run: `the 66x66 arm is even in BOTH axes`. The genuinely |
| 1334 | /// odd arms are the two 12-bit ones, and they are producible only at 12 |
| 1335 | /// bits: at 8 and 10 bits aomenc rounds a 4:4:4 odd size DOWN to even |
| 1336 | /// (`67x67` -> coded 66x66, `131x131` -> coded 130x130, both measured), |
| 1337 | /// the same rounding the sweep proved for 4:2:0. 12-bit (seq_profile 2) |
| 1338 | /// keeps 67x67 and 65x67 odd, and both decode byte-exact. |
| 1339 | /// |
| 1340 | /// The sweep's 130x122 DIVERGENT verdict is also corrected here: this |
| 1341 | /// lane re-encoded the identical stream (the bytes reproduce the |
| 1342 | /// sweep's sha256 `c87ac65b…`) and it is byte-exact against `aomdec`. |
| 1343 | /// That published verdict came from the prefix compare the same report |
| 1344 | /// documents as its trap 1. |
| 1345 | /// |
| 1346 | /// Recipe per arm: `testsrc2 WxH` yuv444p[10le|12le] 4 frames (12-bit: |
| 1347 | /// the gblur'd `mandelbrot`, H6), `aomenc --codec=av1 --passes=1 |
| 1348 | /// --end-usage=q --cq-level=20 --cpu-used=2 --enable-palette=0 |
| 1349 | /// --enable-intrabc=0 --threads=1 --row-mt=0 --lag-in-frames=0 |
| 1350 | /// --kf-max-dist=100 --limit=4 --obu -o - -` (plus `--input-bit-depth` / |
| 1351 | /// `--bit-depth` above 8). |
| 1352 | /// |
| 1353 | /// NON-VACUITY: `ss (0,0)` at the claimed depth; the arm is not a |
| 1354 | /// multiple of 8 in some axis, and the `odd` flag says whether an axis is |
| 1355 | /// odd, so an arm cannot quietly become the cell next door; EVERY frame |
| 1356 | /// header's coded width and height are exactly the claimed sizes -- a |
| 1357 | ///omenc rounding would make the arm measure a different geometry and fails |
| 1358 | /// here rather than at the pixel compare; the mode-info grid is PARTIAL |
| 1359 | /// (`mi_cols*8 > width` or `mi_rows*8 > height`), the partial-plane walk |
| 1360 | /// the cell exists for; every decoded plane is exactly `width*height` (at |
| 1361 | /// `ss (0,0)` the chroma planes are full resolution, so a 4:2:0 extent or |
| 1362 | /// a truncated decode fails the shape assert); then the |
| 1363 | /// length-asserting `aomdec` compare. |
| 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 | |
| 1405 | |
| 1406 | |
| 1407 | |
| 1408 | |
| 1409 | |
| 1410 | |
| 1411 | |
| 1412 | |
| 1413 | |
| 1414 | |
| 1415 | |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | |
| 1422 | |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 | |
| 1431 | |
| 1432 | |
| 1433 | |
| 1434 | |
| 1435 | |
| 1436 | |
| 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 | /// lane-av1tilemeasure: the H3 CONTROL -- 4:4:4 LOSSLESS 8-bit with NO |
| 1464 | /// tiles -- beside its two-tile-column sibling at the same geometry. The |
| 1465 | /// sweep's H3 named a 90-chroma-sample divergence on a lossless 4:4:4 |
| 1466 | /// tile-column stream; the control it never encoded is the untiled stream |
| 1467 | /// at the same size, and without it "tiles cause it" and "4:4:4 lossless |
| 1468 | /// chroma causes it" are the same sentence. Measured here: BOTH arms are |
| 1469 | /// byte-exact against the oracle at 256x128, so at THIS geometry the |
| 1470 | /// defect does not reproduce with or without tiles; the first 4:4:4 |
| 1471 | /// lossless fork measured in this lane is at 192x192 (34 chroma samples, |
| 1472 | /// first U(90,25)), where the tiled and untiled streams diverge at the |
| 1473 | /// very same sample -- see `lanes/av1tilemeasure.report.md`. |
| 1474 | /// |
| 1475 | /// Recipe per arm: `testsrc2 256x128` yuv444p 6 frames, `aomenc |
| 1476 | /// --codec=av1 --lossless=1 --passes=1 --end-usage=q --threads=1 |
| 1477 | /// --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 --limit=6 |
| 1478 | /// --enable-palette=0 --enable-intrabc=0 --obu -o - -`, plus |
| 1479 | /// `--tile-columns=1` on the sibling. |
| 1480 | /// |
| 1481 | /// NON-VACUITY: `ss (0,0)` at 8 bits; every frame header's parsed |
| 1482 | /// `tile_info` is 1x1 for the control and 2x1 for the sibling (so the |
| 1483 | /// control cannot silently become a tiled stream, which is the whole |
| 1484 | /// point of the arm); `decode::rect_split_lossless_chroma444_hits()` |
| 1485 | /// advances, i.e. a lossless strip really walked its chroma as 4:4:4 4x4 |
| 1486 | /// units; then the length-asserting `aomdec` compare. |
| 1487 | |
| 1488 | |
| 1489 | |
| 1490 | |
| 1491 | |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | |
| 1499 | |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | |
| 1504 | |
| 1505 | |
| 1506 | |
| 1507 | |
| 1508 | |
| 1509 | |
| 1510 | |
| 1511 | |
| 1512 | |
| 1513 | |
| 1514 | |
| 1515 | |
| 1516 | |
| 1517 | |
| 1518 | |
| 1519 | |
| 1520 | |
| 1521 | |
| 1522 | |
| 1523 | |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | |
| 1534 | |
| 1535 | |
| 1536 | |
| 1537 | |
| 1538 | |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 | |
| 1546 | /// lane-av1loss444kf: the 4:4:4 lossless 256x256 key frame's 49-sample |
| 1547 | /// chroma damage, and the `Reach` a transform unit inside a sub-8x8 RECT |
| 1548 | /// leaf must be given. |
| 1549 | /// |
| 1550 | /// The cell: `testsrc2 256x256 rate=25` yuv444p, 6 frames, |
| 1551 | /// `aomenc --lossless=1 --enable-palette=0 --enable-intrabc=0` -- **109215 |
| 1552 | /// bytes, sha256 `4563a01f1778600020ffa9f15bc05f5559321cf5712b99a29ed7192675dee6a4`, |
| 1553 | /// fnv1a64 `0xbbb56442f393a9b2`**. Its key frame decodes with **21 U + 28 V |
| 1554 | /// samples wrong** (U over x 196..207 / y 200..203, V over x 196..206), |
| 1555 | /// luma exact, entropy bit-locked over all 81933 of its symbol reads and |
| 1556 | /// its 12288 transform units at identical absolute `(plane, x, y)`. |
| 1557 | /// |
| 1558 | /// The defect: libaom's `has_bottom_left` (`reconintra.c:381`) is asked |
| 1559 | /// with the **leaf's** `bsize`, the unit's `(row_off, col_off)` and |
| 1560 | /// `tx_size` -- and its first branch inside the left column is |
| 1561 | /// `if (row_off + bottom_left_count_unit < plane_bh_unit) return 1;`, the |
| 1562 | /// block's OWN next row, already reconstructed. A 4x8 leaf's first TX_4X4 |
| 1563 | /// unit therefore HAS four bottom-left samples. `sub8_leaf_chroma444` |
| 1564 | /// instead looked a standalone `BLOCK_4X4` up at the unit's own position |
| 1565 | /// (`Reach::of(4, upx, upy, ..)`), which answers false there, so |
| 1566 | /// [`PlaneBuf::edges`] replicated the last left sample out to the edge's |
| 1567 | /// full `bw + bh` reach and the unit predicted D203/CFL from a fabricated |
| 1568 | /// edge. The 4:2:2 twin of the same function was fixed this way already |
| 1569 | /// (lane-av1-422kf2, whose comment names the old lookup); this is its |
| 1570 | /// 4:4:4 twin, still carrying the stale copy. |
| 1571 | /// |
| 1572 | /// Non-vacuity, in order: |
| 1573 | /// 1. the live re-encode's length AND fnv1a64 -- a recipe or encoder drift |
| 1574 | /// fails here instead of passing as this cell; |
| 1575 | /// 2. [`assert_444_header`] -- at 4:2:0 the arm is unreachable (every |
| 1576 | /// caller of `sub8_leaf_chroma444` sits behind `chroma_444`) and every |
| 1577 | /// assert below would pass for free; |
| 1578 | /// 3. [`key_frame_diffs`] == 0 samples, with the first differing sample |
| 1579 | /// NAMED in the failure so a regression is a location, not a count; |
| 1580 | /// 4. [`crate::decode::sub8_chroma444_lossless_tu_reach_hits`] rose over |
| 1581 | /// the decode -- the units where the block-relative answer and the |
| 1582 | /// standalone one disagree, which is what makes this a witness of the |
| 1583 | /// FIXED path and not of a stream that merely has rect leaves. |
| 1584 | |
| 1585 | |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | |
| 1592 | |
| 1593 | |
| 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 | /// lane-av1distwtd: the gate that pays the `enable-dist-wtd-comp` entry in |
| 1634 | /// `gate_coverage.rs`'s [`NEVER_EXERCISED_8BIT`], and corrects its stated |
| 1635 | /// reason. The entry said "distance-weighted compound is unimplemented" -- |
| 1636 | /// it is NOT: [`crate::compound::dist_wtd_comp_weight_assign`] (lane-av1comp) |
| 1637 | /// and `mc::combine_compound`'s weighted path have been in the tree since. |
| 1638 | /// What was missing is a stream that CARRIES the tool. Proved producible |
| 1639 | /// against aom 3.13.3: the flag maps onto the sequence header's |
| 1640 | /// `enable_jnt_comp` bit (`av1_cx_iface.c:1062` -> |
| 1641 | /// `order_hint_info.enable_dist_wtd_comp` -> `bitstream.c:2681` writes it |
| 1642 | /// under `enable_order_hint`), and this recipe's parsed header prints |
| 1643 | /// `jnt_comp=true` with `=1` and `jnt_comp=false` with `=0` -- the parsed |
| 1644 | /// value is asserted, never the flag spelling, per the class |
| 1645 | /// `knob-never-reached-the-tool` trap that mislabelled a cell once already. |
| 1646 | /// |
| 1647 | /// Three hard asserts, all load-bearing: |
| 1648 | /// 1. the PARSED sequence header carries `enable_jnt_comp == true` (the |
| 1649 | /// off-arm asserts `false` from the same recipe, so the bit is proven to |
| 1650 | /// MOVE with the flag rather than to be set by something else); |
| 1651 | /// 2. `dist_wtd_comp_hits() > 0` -- the `compound_idx == 0` arm, the only |
| 1652 | /// branch whose blend weights are not the constant (8, 8). A stream |
| 1653 | /// carrying the header bit while coding every compound block with |
| 1654 | /// `compound_idx == 1` leaves this at 0 and decodes byte-identically |
| 1655 | /// without the whole distance-weight path, so the counter -- not the |
| 1656 | /// header bit -- is what makes this a witness of the TOOL; |
| 1657 | /// 3. every frame pixel-compared against the oracle through |
| 1658 | /// [`decode_all_frames_vs_oracle`], which length-asserts each |
| 1659 | /// decode-order frame before zipping. |
| 1660 | /// |
| 1661 | /// `--min-partition-size=32` is what makes the arm fire: at 16 the encoder |
| 1662 | /// emits 8x8 inter leaves this decoder refuses BY NAME, so a smaller |
| 1663 | /// min-partition refuses before the `compound_idx` read ever runs (measured: |
| 1664 | /// the `min=16` arm of the same recipe refuses with "an inter partition |
| 1665 | /// below 16x16" and dumps zero `compound_idx` lines). `--cq-level=30` is |
| 1666 | /// likewise load-bearing: at cq 45/55 the same arm encodes a single-ref |
| 1667 | /// stream (zero `compound_idx` reads) and the counter assert would be |
| 1668 | /// vacuous. |
| 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 | |
| 1808 | |
| 1809 | |
| 1810 | |
| 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 | |
| 1858 | |
| 1859 | |
| 1860 | /// lane-whtshape: a LOSSLESS 4:4:4 frame whose rect intra-BC blocks used |
| 1861 | /// to code their chroma plane block as ONE rect transform unit -- a shape |
| 1862 | /// libaom cannot code. `read_tx_mode` (`av1/decoder/decodeframe.c:140`) |
| 1863 | /// returns `ONLY_4X4` for a `coded_lossless` frame BEFORE it looks at the |
| 1864 | /// `tx_mode` symbol, `read_tx_size` (`:1117`) returns `TX_4X4` before it |
| 1865 | /// looks at a tree, `get_vartx_max_txsize` (`av1/common/blockd.h:1447`) |
| 1866 | /// returns `TX_4X4` for EVERY plane of a lossless block, and of |
| 1867 | /// `av1/common/idct.c`'s `highbd_inv_txfm_add_*_c` only the 4x4 one carries |
| 1868 | /// a `lossless` branch -- the rest fall through to the IDCT, because there |
| 1869 | /// is no non-4x4 lossless inverse transform to dispatch to. |
| 1870 | /// |
| 1871 | /// The 8x4 unit that resulted reached the lossless Walsh-Hadamard path, |
| 1872 | /// where a `debug_assert_eq!` named it in DEBUG and the RELEASE build died |
| 1873 | /// one frame later with an opaque `range end index 8 out of range for slice |
| 1874 | /// of length 0` (measured, not assumed -- see |
| 1875 | /// lanes/whtshape.report.md r1). |
| 1876 | /// |
| 1877 | /// The witness is `fixtures/ll444_sb64_1to4_lossless.obu` (51107 bytes, |
| 1878 | /// sha256 `fdb6467987095b99c8eb51b48743691d906b2d99d069f71f1d51b1abb6d2056e`), |
| 1879 | /// encoded with the instrumented oracle |
| 1880 | /// (`scripts/build-aom-oracle.sh`'s `aomenc`, 4:4:4 10-bit, `--lossless=1 |
| 1881 | /// --profile=1 --i444 --enable-rect-partitions=1 |
| 1882 | /// --enable-1to4-partitions=1 --min-partition-size=4 --max-partition-size=64 |
| 1883 | /// --sb-size=64 --tune-content=screen --enable-intrabc=1 --enable-palette=1 |
| 1884 | /// --cq-level=60 --enable-tx-size-search=0 --cpu-used=0 --limit=2`) over |
| 1885 | /// `ffmpeg -f lavfi -i testsrc2=size=256x256:rate=25:duration=1 -pix_fmt |
| 1886 | /// yuv444p10le -f rawvideo`. 4:2:0 cannot produce the shape at all -- its |
| 1887 | /// smallest lossless chroma plane block is already 4x4 -- which is why the |
| 1888 | /// 4:4:4 10-bit header is asserted. |
| 1889 | /// |
| 1890 | /// Four assertions, each with its own failure: |
| 1891 | /// |
| 1892 | /// 1. the route fired: `INTRABC_RECT_LOSSLESS_CHROMA4_HITS` is EXCLUSIVE to |
| 1893 | /// the per-4x4 chroma walk (no other caller walks a rect intra-BC |
| 1894 | /// block's chroma), so `>= 1` cannot be satisfied by the old |
| 1895 | /// single-unit read; |
| 1896 | /// 2. NO non-4x4 lossless transform unit was reconstructed |
| 1897 | /// (`LOSSLESS_WHT_SPLIT_UNITS` delta 0) -- the shape-total WHT entry is |
| 1898 | /// not quietly papering over a caller that is still wrong; |
| 1899 | /// 3. the stream DECODES both frames (before the fix the same bytes were a |
| 1900 | /// RELEASE panic and a Golomb-tail refusal in DEBUG); and |
| 1901 | /// 4. a PIXEL comparison against the instrumented oracle's own |
| 1902 | /// `EC_AV1_FINAL_DUMP`, in DECODE order. |
| 1903 | /// |
| 1904 | /// **(4) is a PREFIX floor, not an exactness claim, and it says so.** |
| 1905 | /// Measured against the oracle, decode-order frame 0 (the key frame) is |
| 1906 | /// byte-exact on all three planes for its first 32992 of 65536 samples -- |
| 1907 | /// the whole frame above row 128, plus row 128 out to column 224. The |
| 1908 | /// first differing sample there is (x=224, y=128) on Y, U and V alike: the |
| 1909 | /// first column PAST the 16x8 lossless intra-BC block at mi (32, 52), |
| 1910 | /// whose own 16x8 luma and chroma are byte-exact -- so the fork is at the |
| 1911 | /// block boundary, in the block that FOLLOWS it. Decode-order frame 1 (the |
| 1912 | /// inter frame) is exact to 55008 on luma and to 9378 on chroma. Both forks |
| 1913 | /// are a SEPARATE defect this lane does not own; each is named with its |
| 1914 | /// measurement in lanes/whtshape.report.md r3. Asserting "our output is |
| 1915 | /// wrong by exactly N" would encode those defects as expected behaviour; |
| 1916 | /// the per-frame, per-plane floor is the honest form, and it only grows. |
| 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 | /// lane-av1444edge: the two 4:4:4 lossy cells the chroma-format sweep |
| 2060 | /// (§6.2) left as "unassigned, neither reduces to a known class". They |
| 2061 | /// are one class, and it is the sibling gate's: a 1:4 (HORZ_4 / VERT_4) |
| 2062 | /// inter strip's chroma coefficient context gathered at the 4:2:0 PAIR |
| 2063 | /// extent at ss (0,0), where `is_chroma_reference` |
| 2064 | /// (av1_common_int.h:1454) makes every block its own chroma reference so |
| 2065 | /// no pair exists. What these two add is the geometry and the depth the |
| 2066 | /// sibling's 128x96 gate does not reach. |
| 2067 | /// |
| 2068 | /// **Arm A -- partial-frame right edge, 130x122.** Neither dimension is a |
| 2069 | /// multiple of 8 (the sweep's own odd-dimension gate covers 4:2:0 only, so |
| 2070 | /// the 4:4:4 partial-column walk had no exactness evidence), and 66x66 is |
| 2071 | /// EXACT at the same settings, so the walk is right at one odd geometry |
| 2072 | /// and wrong at another. Arm B -- 256x128, 4 frames, with CDEF and loop |
| 2073 | /// restoration both live on the last two frames. |
| 2074 | /// |
| 2075 | /// **The recipes** (the sweep's, byte-reproduced -- the truncated sha256 |
| 2076 | /// prefixes it recorded, `c87ac65b…` and `06621606…`, match): |
| 2077 | /// ```text |
| 2078 | /// ffmpeg -f lavfi -i "testsrc2=size=<W>x<H>:rate=25" -frames:v 4 \ |
| 2079 | /// -pix_fmt yuv444p -strict -1 -f yuv4mpegpipe - | \ |
| 2080 | /// aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=20 --cpu-used=2 \ |
| 2081 | /// --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 \ |
| 2082 | /// --limit=4 --obu -o - - |
| 2083 | /// ``` |
| 2084 | /// (`rate=25` is load-bearing for the same reason as the sibling gate: |
| 2085 | /// `testsrc2`'s pattern is time-parameterised.) |
| 2086 | /// |
| 2087 | /// Red before the fix, both arms: arm A frame 3, 11521 samples, first at |
| 2088 | /// Y(128,16) (ours 134, oracle 170); arm B frame 2, 25296 samples, first |
| 2089 | /// at Y(192,0) (ours 92, oracle 106), frame 3 51108 more. The |
| 2090 | /// pre-loop-filter reconstruction already carries the identical first |
| 2091 | /// wrong sample on both, so no filter is involved; in arm B the first |
| 2092 | /// wrong superblock in DECODE order is SBcol2/SBrow0 (first wrong pixel |
| 2093 | /// (128,48) = mi(12,32), whose mode/ref/mv are identical on both sides), |
| 2094 | /// and the arithmetic fork lands on the very next block, mi(13,32), where |
| 2095 | /// the oracle reads ref0 = LAST and we read GOLDEN. |
| 2096 | /// |
| 2097 | /// Non-vacuity, three ways per arm: the pinned bytes (length + FNV-1a); |
| 2098 | /// the decoded chroma planes are full resolution, which is the ss (0,0) |
| 2099 | /// shape claim; and `decode::rect4_inter_own_chroma444_hits()` must be |
| 2100 | /// non-zero AND `inter16_rect4_counters()` must report 1:4 inter strips, |
| 2101 | /// so the corrected route is known to have run rather than the gate |
| 2102 | /// passing on a stream that never reached it. |
| 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 | /// lane-av1444d10: the 10-bit 4:4:4 352x242 cell the 4:2:2 census |
| 2199 | /// (`lanes/av1422census.report.md` §4 class D) found diverging on chroma |
| 2200 | /// only -- 0 / 1166 / 1413 over 17 of 17 decode frames, first bad sample |
| 2201 | /// at decode frame 0 plane U row 224 col 64 -- and the fix for it, a byte |
| 2202 | /// exact gate. 4:4:4 is a format this decoder claims to support, so the |
| 2203 | /// cell is not probe-only evidence. |
| 2204 | /// |
| 2205 | /// **Why this cell and not its five same-depth controls.** `s444_*_10b` |
| 2206 | /// at 320x242, 320x250, 352x250, 416x242 and 416x250, same encoder recipe, |
| 2207 | /// same 10-bit depth, were all byte-exact before the fix and still are; only |
| 2208 | /// 352x242 diverged. What 352x242 has is the first block of the cell whose |
| 2209 | /// chroma is TALLER than the 32-pixel unit cap at ss (0,0): a 32x64 luma |
| 2210 | /// strip keeps its 32x64 chroma, and `decode_block_rect`'s tiled chroma |
| 2211 | /// walk splits it into `nh = 2` units of 32x32. Every other cell's chroma |
| 2212 | /// blocks are <= 32 on both axes, so `nw * nh == 1` and the whole-block |
| 2213 | /// buffer IS the unit's window -- the bug is invisible there. That is why |
| 2214 | /// the census could report "geometry-sensitive" without the mechanism: |
| 2215 | /// the sensitive axis is chroma UNIT COUNT, not frame width or height. |
| 2216 | /// |
| 2217 | /// **The defect.** Both tiled arms handed the unit the WHOLE block's |
| 2218 | /// palette prediction buffer, and `PlaneBuf::reconstruct` reads its first |
| 2219 | /// `side * side` entries, so unit (0,1) at pixel (64, 224) reconstructed |
| 2220 | /// the block's row-192 palette values (flat 209) where libaom writes |
| 2221 | /// row 224's (216). The neighbouring 32x32 `PAETH_PRED` block at |
| 2222 | /// (96, 224), whose left edge sample IS that pixel, then propagated 19 |
| 2223 | /// more wrong columns along its own top row -- which is why the census saw |
| 2224 | /// 53 wrong columns rather than 32. |
| 2225 | /// |
| 2226 | /// **Red before the fix, by this gate's own name:** with the two |
| 2227 | /// `palette_window` calls reverted the first wrong sample is decode frame |
| 2228 | /// 0 plane U row 224 col 64 (ours 209, oracle 216) and the totals are |
| 2229 | /// 0 / 1166 / 1413 over 17 decode frames. |
| 2230 | /// |
| 2231 | /// **Non-vacuity, four ways.** (1) The pinned bytes: length 24875 and |
| 2232 | /// FNV-1a64 `0x7fda_dbb4_3bbf_9af3`, sha256 |
| 2233 | /// `84df2f37cc7982f9a572443d85dfcc13bf366a64f3fb567391dcd5acd58a0ad2`. |
| 2234 | /// (2) 17 decode-order frames at 352x242 with FULL-RESOLUTION chroma, so |
| 2235 | /// a decoder that kept the 4:2:0 extent cannot pass the compare. |
| 2236 | /// (3) `decode::chroma_palette_window_hits()` read as a delta must be at |
| 2237 | /// least 1. After the refutation pass read the numbers back, that counter |
| 2238 | /// is guarded on `nw * nh > 1`, so it fires ONLY for units of a block the |
| 2239 | /// 32-cap actually tiled -- a hit is therefore proof that the tiled arm ran, |
| 2240 | /// not merely that some palette chroma block existed, and a gate that |
| 2241 | /// passed with the tiled arm removed would be gate-blind-to-feature. (4) The oracle comparator this gate leans on has |
| 2242 | /// its own per-plane one-byte-flip liveness control in the crate |
| 2243 | /// (`every_oracle_comparator_reds_on_a_one_byte_wrong_oracle`). |
| 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 | |
| 2296 | |
| 2297 | |
| 2298 | |
| 2299 | |
| 2300 | |
| 2301 | |
| 2302 | |
| 2303 | |
| 2304 | |
| 2305 | |
| 2306 | |
| 2307 | |
| 2308 | |
| 2309 | |
| 2310 | /// lane-av1444palw: the gate for the arm |
| 2311 | /// `a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit` |
| 2312 | /// could NOT reach -- the HORIZONTAL half of the same 32-capped chroma |
| 2313 | /// walk in `decode_block_rect64` (`palette_window(pbuf, chroma_w, |
| 2314 | /// cu_col * uw, cu_row * uh, uw, uh)`, the arms at decode.rs:20131 and |
| 2315 | /// :20199). Its `cu_col` term is the axis the corpus census never |
| 2316 | /// exercised: a 106-fixture trace of that walk found 16 windowed units and |
| 2317 | /// every one had `nw == 1`, i.e. only the `cu_row` term (`nh = 2`) was |
| 2318 | /// ever load-bearing. |
| 2319 | /// |
| 2320 | /// **What makes `nw >= 2` reachable.** At ss (0,0) the chroma plane block |
| 2321 | /// equals the luma one, so a 64-WIDE luma rect block keeps `cw = 64` and |
| 2322 | /// the 32-cap tiles it into `nw = 2` units. `decode_block_rect64` is the |
| 2323 | /// only function owning this walk at a 64-wide block, reached from |
| 2324 | /// `PARTITION_HORZ`/`HORZ_A`/`HORZ_B` (64x32) and `HORZ_4` (64x16). The |
| 2325 | /// cells here came from sweeping `--min-partition-size` x `--cq-level` over |
| 2326 | /// a 4:4:4 testsrc2 640x480 cell encoded with the lane-av1rect14 |
| 2327 | /// `ibc640` flag set (rect + 1:4 partitions, `--min-partition-size=8 |
| 2328 | /// --sb-size=64 --tune-content=screen --enable-palette=1 |
| 2329 | /// --enable-intrabc=1 --enable-tx-size-search=0 --cpu-used=0 |
| 2330 | /// --lag-in-frames=0 --kf-max-dist=1 --limit=1 --threads=1 |
| 2331 | /// --tile-columns=0 --passes=1 --end-usage=q --profile=1`): |
| 2332 | /// `--min-partition-size=8` is what yields the 64-wide strip, and |
| 2333 | /// `cq-level=45` is what makes the chroma palette win on it. Census read |
| 2334 | /// off `EC_PALWALK=1`, the diagnostic rung this lane added to |
| 2335 | /// `decode_block_rect64`: |
| 2336 | /// |
| 2337 | /// * 10-bit `cq 45`: `bw=64 bh=16 cw=64 ch=16 uw=32 uh=16 nw=2 nh=1 puv=1` |
| 2338 | /// -- the RECT-unit arm (`uw != uh`) carrying a chroma palette, `nw = 2`. |
| 2339 | /// * 12-bit `cq 45`: `bw=64 bh=32 cw=64 ch=32 uw=32 uh=32 nw=2 nh=1 puv=1` |
| 2340 | /// -- the SQUARE-unit arm carrying a chroma palette, `nw = 2`, on the |
| 2341 | /// 12-bit chroma plane no prior gate had built. |
| 2342 | /// |
| 2343 | /// **Both cells are byte-exact against the instrumented `aomdec`** per |
| 2344 | /// plane over the single decode-order frame (10-bit 0/0/0, 12-bit 0/0/0), |
| 2345 | /// and the comparator's liveness is proved by a one-byte oracle tamper |
| 2346 | /// moving the mismatch count 0 -> 1 at each depth. |
| 2347 | /// |
| 2348 | /// **Red without the per-unit window, by this gate's own numbers.** |
| 2349 | /// Reverting both `palette_window` calls to the whole-block buffer (the |
| 2350 | /// counter left armed) gives 0 / 25553 / 26139 on the 10-bit cell, first |
| 2351 | /// wrong sample decode frame 0 plane U row 96 col 448 (mutant 810, oracle |
| 2352 | /// 763; plane V the same sample 891 vs 767), and 0 / 6400 / 6400 on the |
| 2353 | /// 12-bit cell, first wrong sample plane U row 352 col 160 (866 vs 2004). |
| 2354 | /// Both are the `cu_col = 1` unit reading the block's column 0 -- this arm, |
| 2355 | /// not a cascade. |
| 2356 | /// |
| 2357 | /// **Non-vacuity.** (1) pinned bytes: 3301 / 2571 with FNV-1a64 and |
| 2358 | /// sha256 asserted. (2) the DERIVED condition: the counter is guarded on |
| 2359 | /// `nw * nh > 1`, so a hit proves the tiled arm ran, and the floors below |
| 2360 | /// are re-measured on these two streams (the pinned gate's floor of 4 was |
| 2361 | /// a floor from ONE stream, not a census). (3) 640x480 with |
| 2362 | /// FULL-RESOLUTION chroma, so a 4:2:0 extent cannot pass. (4) the crate's |
| 2363 | /// own one-byte oracle-comparator liveness control. |
| 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 | /// lane-av1cfl: the 4:4:4 CfL AC body is a DIFFERENT function from the |
| 2442 | /// 4:2:0 one, and this gate is the proof that the format-blind |
| 2443 | /// `cfl_ac_q3_at` (`bw / 2, bh / 2`, a 2x2 luma average per chroma |
| 2444 | /// sample) is reached only at 4:2:0. |
| 2445 | /// |
| 2446 | /// **The claim this closes.** `cfl_ac_q3_at` has no `fctx`/`ss` |
| 2447 | /// parameter, so at 4:4:4 it would be wrong twice over: the chroma |
| 2448 | /// extent equals the luma extent when `ss_x == ss_y == 0`, and libaom |
| 2449 | /// averages 2x2 luma per chroma sample at 4:2:0 but 1x1 at 4:4:4 |
| 2450 | /// (`cfl_luma_subsampling_420_lbd_c` vs `cfl_luma_subsampling_444_lbd_c`, |
| 2451 | /// `~/.cache/aom-oracle/src/av1/common/cfl.c:230` and `:257`). The |
| 2452 | /// inherited report claimed "188 rung hits on the 4:4:4 set" |
| 2453 | /// (`lanes/av1chromahalvings.report.md` r3.4). **It does not |
| 2454 | /// reproduce**: the env-gated rung `EC_HALVSWEEP` in `cfl_ac_q3_at`, |
| 2455 | /// swept over all 27 `*444*` pins, printed **0 hits on every one**, |
| 2456 | /// while the 4:4:4 arm of `cfl_ac_ss` fired 4..312 times on the same |
| 2457 | /// fixtures. The 4:4:4 CfL path is real and heavily exercised; it just |
| 2458 | /// does not go through this function. `cfl_ac_ss` dispatches 4:4:4 and |
| 2459 | /// 4:2:2 to their own transcriptions of libaom's 444/422 subsampling |
| 2460 | /// bodies BEFORE the 4:2:0 fallthrough, and the fallthrough is the only |
| 2461 | /// road to `cfl_ac_q3_at`. |
| 2462 | /// |
| 2463 | /// Two-sided on purpose. The 4:4:4 arm asserts `> 0` (the CfL path |
| 2464 | /// fired, so the `== 0` below is a routing fact and not an absence of |
| 2465 | /// CfL) and the 4:2:0 arm asserts `> 0` on the SAME counter (so the |
| 2466 | /// counter is live and the 4:4:4 zero is not a dead one). Both arms |
| 2467 | /// compare every decoded frame to the instrumented `aomdec` |
| 2468 | /// plane by plane, and the 4:2:0 arm is the "unchanged" quote: its |
| 2469 | /// per-plane mismatch counts must be 0/0/0. |
| 2470 | /// |
| 2471 | /// Provenance: both fixtures are aomenc-produced and already pinned |
| 2472 | /// with sha256 by the gates named beside them. 4:4:4 lossy |
| 2473 | /// `444_lossy_superres_mode2_256x128.obu` (16620 bytes, sha256 |
| 2474 | /// `c18496cf3b7db0feca9aa904024cec2115be80b5b94f87c848ac52f9b32ffd97`, |
| 2475 | /// `testsrc2=size=256x128:rate=25 -pix_fmt yuv444p`, `--passes=1 |
| 2476 | /// --end-usage=q --cq-level=20 --cpu-used=2 --superres-mode=2 |
| 2477 | /// --limit=4 --obu`, 4 frames); 4:2:0 lossy |
| 2478 | /// `420_intrabc_rect4_witness.obu` (890 bytes, sha256 |
| 2479 | /// `d01352af5059919cdce733abdcbae8e8240ac3c2a6190fa1bd96d3c6f945b979`). |
| 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 | |
| 2525 | |
| 2526 | |
| 2527 | |
| 2528 | |
| 2529 | |
| 2530 | |
| 2531 | |
| 2532 | |
| 2533 | |
| 2534 | |
| 2535 | |
| 2536 | |
| 2537 | |
| 2538 | |
| 2539 | |
| 2540 | |
| 2541 | |
| 2542 | |
| 2543 | |
| 2544 | |
| 2545 | |
| 2546 | |
| 2547 | |
| 2548 | |
| 2549 | |
| 2550 | |
| 2551 | |
| 2552 | |
| 2553 | |
| 2554 | |
| 2555 | |
| 2556 | |
| 2557 | |
| 2558 | |
| 2559 | |
| 2560 | |
| 2561 | |
| 2562 | |
| 2563 | |
| 2564 | |
| 2565 | |
| 2566 | |
| 2567 | |
| 2568 | |
| 2569 | |
| 2570 | |
| 2571 | |
| 2572 | |
| 2573 | |
| 2574 | |
| 2575 | |
| 2576 | |
| 2577 | |
| 2578 | |
| 2579 | |
| 2580 | |
| 2581 | |
| 2582 | |
| 2583 | |
| 2584 | |
| 2585 | |
| 2586 | |
| 2587 | |
| 2588 | |
| 2589 | |
| 2590 | |
| 2591 | |
| 2592 | |
| 2593 | |
| 2594 | |
| 2595 | |
| 2596 | |
| 2597 | |
| 2598 | |
| 2599 | |
| 2600 | |
| 2601 | |
| 2602 | |
| 2603 | |
| 2604 | |
| 2605 | |
| 2606 | |
| 2607 | |
| 2608 | |
| 2609 | |
| 2610 | |
| 2611 | |
| 2612 | /// lane-av1cfl: the STATIC half of the same claim -- `cfl_ac_q3_at`'s |
| 2613 | /// caller set, read out of the sources themselves, is what makes its |
| 2614 | /// `bw / 2, bh / 2` extent and 2x2 luma footprint correct rather than |
| 2615 | /// merely untested. The counter gate above measures that on two pinned |
| 2616 | /// streams; this one survives a change no fixture would catch. |
| 2617 | /// |
| 2618 | /// **What is asserted, and why each part is load-bearing.** |
| 2619 | /// |
| 2620 | /// 1. `cfl_ac_q3_at` has exactly **three** call sites -- the two 4:2:0 |
| 2621 | /// wrappers `cfl_ac_q3` / `cfl_ac_q3_rect` in `decode.rs` and the |
| 2622 | /// encoder's CfL candidate in `encode.rs`. A fourth would be a new |
| 2623 | /// road to a format-blind body. |
| 2624 | /// 2. Both `decode.rs` wrappers are called from **exactly one** function, |
| 2625 | /// `cfl_ac_ss`, and only from its LAST two arms -- the ones after the |
| 2626 | /// `ss_x == 0 && ss_y == 0` (4:4:4) and `ss_x == 1 && ss_y == 0` |
| 2627 | /// (4:2:2) tests. So every decode-side entry is 4:2:0 by |
| 2628 | /// construction, whatever a stream's header says. |
| 2629 | /// 3. The encoder's call site is 4:2:0 because `Colour::color_config` and |
| 2630 | /// `unspecified_color_config` both hardcode `subsampling_x: 1, |
| 2631 | /// subsampling_y: 1` -- there is no 4:4:4 encoder colour config in the |
| 2632 | /// crate. A future encoder that grows one must thread `ss` into this |
| 2633 | /// call, and the `subsampling_x: 0` count going above zero is what |
| 2634 | /// says so. |
| 2635 | /// |
| 2636 | /// (0, 1) needs no arm: `ec-av1-syntax` reads `subsampling_y` only when |
| 2637 | /// `subsampling_x == 1` (`crates/ec-av1-syntax/src/sequence.rs:483-485`), |
| 2638 | /// so the pair is structurally uncodable and the 4:2:0 fallthrough is the |
| 2639 | /// only residual. lane-av1422lift: this sentence used to end "4:2:2 is |
| 2640 | /// refused at the sequence header", which was the wrong reason -- the |
| 2641 | /// claim holds because `cfl_ac_ss` DISPATCHES `ss (1,0)` before the 4:2:0 |
| 2642 | /// fallthrough, not because the format could not arrive. The gate's |
| 2643 | /// mechanism is unchanged; only the reason was stale. |
| 2644 | |
| 2645 | |
| 2646 | |
| 2647 | |
| 2648 | |
| 2649 | |
| 2650 | |
| 2651 | |
| 2652 | |
| 2653 | |
| 2654 | |
| 2655 | |
| 2656 | |
| 2657 | |
| 2658 | |
| 2659 | |
| 2660 | |
| 2661 | |
| 2662 | |
| 2663 | |
| 2664 | |
| 2665 | |
| 2666 | |
| 2667 | |
| 2668 | |
| 2669 | |
| 2670 | |
| 2671 | |
| 2672 | |
| 2673 | |
| 2674 | |
| 2675 | |
| 2676 | |
| 2677 | |
| 2678 | |
| 2679 | |
| 2680 | |
| 2681 | |
| 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 | |
| 2742 | |
| 2743 | |
| 2744 | |
| 2745 | |
| 2746 | |
| 2747 | |
| 2748 | |
| 2749 | |
| 2750 | |
| 2751 | |
| 2752 | |
| 2753 | |
| 2754 | |
| 2755 | |
| 2756 | |
| 2757 | /// lane-av1444edge r3: the FIRST 4:4:4 superres cell in the crate, and |
| 2758 | /// the cell the chroma-format sweep's "4:4:4 superres" row was supposed |
| 2759 | /// to be. |
| 2760 | /// |
| 2761 | /// **Why this gate exists at all.** §6.2 of |
| 2762 | /// `lanes/av1formatsweep.report.md` recorded that cell as DIVERGENT from |
| 2763 | /// frame 2 with a first wrong sample of Y(192,0). It was never a superres |
| 2764 | /// cell: the recipe passed `--superres-mode=1` and no denominator, so |
| 2765 | /// libaom's `get_superres_denom_for_qindex` |
| 2766 | /// (`av1/encoder/superres_scale.c:143`) chose 8, and all four frame |
| 2767 | /// headers of that stream read `use_superres=false denom=8`. Nothing was |
| 2768 | /// ever scaled; it was a plain 4:4:4 lossy cq-20 stream, and its |
| 2769 | /// divergence was the same H1 class as the 130x122 cell beside it (see |
| 2770 | /// `lanes/av1444edge.report.md` §2). That is the trap this gate is built |
| 2771 | /// to make impossible to repeat: it asserts the scaled geometry from the |
| 2772 | /// PARSED HEADERS, so a future flag or heuristic change that silently |
| 2773 | /// unsizes the stream makes the gate red on a header assertion instead of |
| 2774 | /// turning into a differently-shaped exactness claim. |
| 2775 | /// |
| 2776 | /// **This is the only 4:4:4 superres coverage here.** All eight |
| 2777 | /// pre-existing superres gates are 4:2:0, checked rather than assumed: |
| 2778 | /// the two pinned fixtures parse `ss (1,1)` from their own sequence |
| 2779 | /// headers (`superres_kf_cdef_lr_64x64.obu` 8-bit, |
| 2780 | /// `superres_alltools_sb128_320x180.obu` 10-bit) and the six live-aomenc |
| 2781 | /// gates all feed a `yuv420p` / `yuv420p10le` source. So this cell's |
| 2782 | /// claim is scoped honestly: it is the FIRST 4:4:4 superres stream, not |
| 2783 | /// a broadening of an existing family. |
| 2784 | /// |
| 2785 | /// **The recipe** (sha256 |
| 2786 | /// `450caa3e31526a8973b9f64d5030a2f11b87bd60fac07aef121cb62af9bf85ff`, |
| 2787 | /// 14808 bytes, 4 frames, `testsrc2 256x128 rate=25` yuv444p): |
| 2788 | /// ```text |
| 2789 | /// ffmpeg -f lavfi -i "testsrc2=size=256x128:rate=25" -frames:v 4 \ |
| 2790 | /// -pix_fmt yuv444p -strict -1 -f yuv4mpegpipe - | \ |
| 2791 | /// aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=20 --cpu-used=2 \ |
| 2792 | /// --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 \ |
| 2793 | /// --limit=4 --superres-mode=1 --superres-denominator=12 \ |
| 2794 | /// --superres-kf-denominator=12 --obu -o - - |
| 2795 | /// ``` |
| 2796 | /// The two denominator flags are the whole point: without them the cell |
| 2797 | /// does not exist. Verified byte-reproducible — re-encoding this recipe |
| 2798 | /// reproduces the pinned 14808 bytes exactly. |
| 2799 | /// |
| 2800 | /// **What the cell exercises.** Coded 171x128 upscaled to 256x128 at |
| 2801 | /// `denom = 12`, so a 4:4:4 chroma plane is upscaled at FULL resolution |
| 2802 | /// (a 4:2:0 stream halves it first, and libaom's `av1_superres_upscale` |
| 2803 | /// takes a different path per chroma format). Measured `superres_hits` 4 |
| 2804 | /// and `mc::predict_scaled_hits` 2130 — the upscaler and scaled inter |
| 2805 | /// prediction both run, so the cell is not passing on an unscaled |
| 2806 | /// stream. |
| 2807 | /// |
| 2808 | /// Non-vacuity, four ways: the pinned bytes (length + FNV-1a); the parsed |
| 2809 | /// headers really are `use_superres` at `denom 12` with the SCALED coded |
| 2810 | /// size, and the coded width is re-derived from `UpscaledWidth` and the |
| 2811 | /// denominator rather than only compared to a literal, so a re-pinned |
| 2812 | /// fixture cannot drift past the assertion; both counters are asserted as |
| 2813 | /// DELTAS; and every decode-order frame is compared byte-for-byte |
| 2814 | /// through `decode_all_frames_vs_oracle`, which is what makes the |
| 2815 | /// upscaled width on both sides a real check. |
| 2816 | |
| 2817 | |
| 2818 | |
| 2819 | |
| 2820 | |
| 2821 | |
| 2822 | |
| 2823 | |
| 2824 | |
| 2825 | |
| 2826 | |
| 2827 | |
| 2828 | |
| 2829 | |
| 2830 | |
| 2831 | |
| 2832 | |
| 2833 | |
| 2834 | |
| 2835 | |
| 2836 | |
| 2837 | |
| 2838 | |
| 2839 | |
| 2840 | |
| 2841 | |
| 2842 | |
| 2843 | |
| 2844 | |
| 2845 | |
| 2846 | |
| 2847 | |
| 2848 | |
| 2849 | |
| 2850 | |
| 2851 | |
| 2852 | |
| 2853 | |
| 2854 | |
| 2855 | |
| 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 | |
| 2913 | |
| 2914 | |
| 2915 | |
| 2916 | |
| 2917 | |
| 2918 | |
| 2919 | |
| 2920 | |
| 2921 | |
| 2922 | |
| 2923 | |
| 2924 | |
| 2925 | |
| 2926 | |
| 2927 | |
| 2928 | |
| 2929 | |
| 2930 | |
| 2931 | |
| 2932 | |
| 2933 | |
| 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 | |
| 2979 | |
| 2980 | |
| 2981 | |
| 2982 | |
| 2983 | |
| 2984 | /// lane-av1superpin (a): `--superres-mode=1 --superres-denominator=9`, the |
| 2985 | /// WIDEST frame-edge margin this 256x128 geometry allows -- coded 228x128 |
| 2986 | /// upscaled to 256x128, `denom = 9`, on all four frames. |
| 2987 | /// |
| 2988 | /// **Why 9 and not 12.** The den=12 cell beside it (coded 171x128) is the |
| 2989 | /// one the chroma-format sweep's matrix row ended up pointing at, and |
| 2990 | /// denom 16 (coded 128x128) is the degenerate one where the coded width |
| 2991 | /// equals the superblock grid exactly. Nine is the largest denominator |
| 2992 | /// libaom's own `SUPERRES_NUM` ladder accepts here and still scales, and |
| 2993 | /// it is the member that leaves the most coded samples at the frame's |
| 2994 | /// right edge: `228 * 8 / 256` of the frame is a 28-column upscale margin, |
| 2995 | /// against 12's 85 columns. A wide margin is where a round-trip is most |
| 2996 | /// likely to read past the coded picture, so it is the member worth |
| 2997 | /// pinning next to the den=12 one. |
| 2998 | /// |
| 2999 | /// **The recipe** (sha256 |
| 3000 | /// `3d619ee0fda3d9bb9cf8ff0541ba00ea5d83ae38cd8eec1322f8dbbbe6a5ec96`, |
| 3001 | /// 17437 bytes, 4 frames, `testsrc2 256x128 rate=25` yuv444p): |
| 3002 | /// ```text |
| 3003 | /// ffmpeg -f lavfi -i "testsrc2=size=256x128:rate=25" -frames:v 4 \ |
| 3004 | /// -pix_fmt yuv444p -strict -1 -f yuv4mpegpipe - | \ |
| 3005 | /// aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=20 --cpu-used=2 \ |
| 3006 | /// --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 \ |
| 3007 | /// --limit=4 --superres-mode=1 --superres-denominator=9 \ |
| 3008 | /// --superres-kf-denominator=9 --obu -o - - |
| 3009 | /// ``` |
| 3010 | /// Byte-reproducible: re-encoding this recipe reproduces the pinned 17437 |
| 3011 | /// bytes exactly, and the PARSED headers of that re-encode were read |
| 3012 | /// (`frame=228x128 upscaled=256 use_superres=true denom=9` on all four) -- |
| 3013 | /// which is where the numbers below come from, not from the flags. |
| 3014 | |
| 3015 | |
| 3016 | |
| 3017 | |
| 3018 | |
| 3019 | |
| 3020 | |
| 3021 | |
| 3022 | |
| 3023 | |
| 3024 | |
| 3025 | |
| 3026 | |
| 3027 | /// lane-av1superpin (b): `--superres-mode=2` (random denominator), coded |
| 3028 | /// 186x128 on the first frame and a DIFFERENT denominator on each frame |
| 3029 | /// after it. |
| 3030 | /// |
| 3031 | /// **This is the cell that makes the flag-vs-header distinction |
| 3032 | /// unavoidable.** Measured on the pinned bytes by parsing every frame |
| 3033 | /// header, `--superres-mode=2` does not honour `--superres-denominator` |
| 3034 | /// at all -- encoding the recipe four times (no denominator, then 9, 12, |
| 3035 | /// 16) produced ONE stream, sha256 |
| 3036 | /// `c18496cf3b7db0feca9aa904024cec2115be80b5b94f87c848ac52f9b32ffd97` |
| 3037 | /// (16620 bytes), byte-identical every time -- and the parsed headers of |
| 3038 | /// that stream are: |
| 3039 | /// |
| 3040 | /// ```text |
| 3041 | /// FH0 frame=186x128 upscaled=256 use_superres=true denom=11 |
| 3042 | /// FH1 frame=146x128 upscaled=256 use_superres=true denom=14 |
| 3043 | /// FH2 frame=137x128 upscaled=256 use_superres=true denom=15 |
| 3044 | /// FH3 frame=228x128 upscaled=256 use_superres=true denom=9 |
| 3045 | /// ``` |
| 3046 | /// |
| 3047 | /// So a gate written against this cell that read the flag instead of the |
| 3048 | /// header would assert `denom == 9` (or 12, or 16) and be wrong on three |
| 3049 | /// of four frames -- or, worse, pass while printing numbers the stream does |
| 3050 | /// not carry. Three of the four parsed denominators (11, 14, 15) are values |
| 3051 | /// no flag on the command line ever named, which is the property the arm |
| 3052 | /// below asserts directly. |
| 3053 | /// |
| 3054 | /// **Why it is worth a gate of its own** beyond the flag-ignoring point: |
| 3055 | /// the den=12 and den=9 cells both scale every frame at one denominator, |
| 3056 | /// so `av1_superres_upscale` is only ever handed one coded-to-upscaled |
| 3057 | /// ratio. This stream hands it four (256->186, 256->146, 256->137, |
| 3058 | /// 256->228) in one decode, and libaom's upscaler picks its filter taps |
| 3059 | /// from `denom` per frame. That is the case a single-denominator gate |
| 3060 | /// cannot reach. |
| 3061 | /// |
| 3062 | /// **The recipe**: |
| 3063 | /// ```text |
| 3064 | /// ffmpeg -f lavfi -i "testsrc2=size=256x128:rate=25" -frames:v 4 \ |
| 3065 | /// -pix_fmt yuv444p -strict -1 -f yuv4mpegpipe - | \ |
| 3066 | /// aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=20 --cpu-used=2 \ |
| 3067 | /// --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 \ |
| 3068 | /// --limit=4 --superres-mode=2 --obu -o - - |
| 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 | |
| 3122 | |
| 3123 | |
| 3124 | |
| 3125 | |
| 3126 | |
| 3127 | |
| 3128 | |
| 3129 | |
| 3130 | |
| 3131 | |
| 3132 | |
| 3133 | |
| 3134 | |
| 3135 | |
| 3136 | |
| 3137 | |
| 3138 | |
| 3139 | |
| 3140 | |
| 3141 | |
| 3142 | |
| 3143 | |
| 3144 | |
| 3145 | |
| 3146 | |
| 3147 | |
| 3148 | |
| 3149 | |
| 3150 | |
| 3151 | |
| 3152 | |
| 3153 | |
| 3154 | |
| 3155 | |
| 3156 | |
| 3157 | |
| 3158 | |
| 3159 | |
| 3160 | |
| 3161 | |
| 3162 | |
| 3163 | |
| 3164 | |
| 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 | /// lane-av1lossy128x96: the 128x96 sibling of the pinned 128x128 witness |
| 3190 | /// `a_pinned_444_inter_stream_chroma_units_inherit_their_own_quadrants_tx_type` |
| 3191 | /// (commit 6c33f204). That fix closed the "4:4:4 lossy + TX size search" |
| 3192 | /// divergence (H2) for the 128x128 twin; the 128x96 geometry -- two whole |
| 3193 | /// 64x64 roots over a frame whose second block row is only 32 rows tall, |
| 3194 | /// which is why it exercises BOTH chroma planes and a partial block row -- |
| 3195 | /// was left ungated, and it is the geometry the sweep measured the |
| 3196 | /// U+V form of the defect on (608 wrong samples from decode-order frame 2). |
| 3197 | /// |
| 3198 | /// Measured for this lane on the fix's parent `4155c7c7`: decode-order |
| 3199 | /// frames 2 and 3 differ from the oracle in 608 and 692 samples (luma |
| 3200 | /// exact, U and V wrong), entropy bit-identical; at HEAD and at `6c33f204` |
| 3201 | /// all four frames are byte-exact. So the defect is FIXED and this gate is |
| 3202 | /// the pin that keeps it fixed. |
| 3203 | /// |
| 3204 | /// Recipe (encoded LIVE, no fixture): `testsrc2 128x96:rate=25` yuv444p |
| 3205 | /// 4 frames, `aomenc --profile=1 --codec=av1 --passes=1 --end-usage=q |
| 3206 | /// --cq-level=20 --cpu-used=2 --sb-size=64 --min-partition-size=64 |
| 3207 | /// --max-partition-size=64 --enable-tx-size-search=1 --threads=1 --row-mt=0 |
| 3208 | /// --lag-in-frames=0 --kf-max-dist=100 --limit=4 --obu -o - -`. |
| 3209 | /// Search ON: 21830 B, sha256 `7380bcbbfb791c6a369850357211223e20fab959423135951f6eb43ffbfcfebd`, |
| 3210 | /// fnv1a64 `0x1ba3fe9a4335bdbb`. Control arm, same recipe with |
| 3211 | /// `--enable-tx-size-search=0`: 21296 B, sha256 |
| 3212 | /// `347edcc9f4899fb05b15174b82d37f6562dcc6fe7691af0ed9ba4efd6cc878c6`, |
| 3213 | /// fnv1a64 `0x2f87d8e98c9db686`. |
| 3214 | /// |
| 3215 | /// NON-VACUITY, and the search flag is NOT the assert: the recipe SPELLS |
| 3216 | /// `--enable-tx-size-search=1` (aomenc keeps the FIRST occurrence, and a |
| 3217 | /// flag left defaulted is "unknown", not "on"), and then |
| 3218 | /// 1. every frame header's PARSED `tx_mode` is `TxMode::Select` |
| 3219 | /// (`TX_MODE_SELECT`) -- the searched transform mode is really in the |
| 3220 | /// bitstream, not merely requested. The control arm asserts the |
| 3221 | /// opposite (`TxMode::Largest`), so neither arm can pass on the other's |
| 3222 | /// stream; |
| 3223 | /// 2. the sequence header is `ss (0,0)` at 8 bits (`assert_444_header`), |
| 3224 | /// and the stream is byte-identical to the recorded encode (length + |
| 3225 | /// fnv1a64), so an aomenc that stopped producing this cell fails here |
| 3226 | /// rather than silently measuring something else; |
| 3227 | /// 3. `decode::chroma_quad_leaf_tx_diff_hits()` strictly increases on the |
| 3228 | /// search arm -- the number that says the per-quadrant resolve CHANGED |
| 3229 | /// an answer, which is the defect itself. It must be exactly 0 on the |
| 3230 | /// search-off control: with no var-tx there is no four-leaf luma tree, |
| 3231 | /// so the arm is unreachable and a counter that fired there would be |
| 3232 | /// counting something else; |
| 3233 | /// 4. every decoded plane is 128*96 (at `ss (0,0)` chroma is full |
| 3234 | /// resolution, so a subsampled extent fails the shape assert); |
| 3235 | /// 5. `decode_all_frames_vs_oracle` asserts the decode-order frame COUNT |
| 3236 | /// and each frame's byte LENGTH before any sample is compared. |
| 3237 | /// |
| 3238 | /// Red-before: reverting ONLY the per-quadrant resolve in |
| 3239 | /// `decode_inter_block`'s 64x64 four-unit chroma arm (the `covering_leaf_tx_type` |
| 3240 | /// call back to the block-level `first_tx_type`, counters and this gate |
| 3241 | /// untouched) turns this gate red on decode-order frame 2 with 608 bytes |
| 3242 | /// differing, and green again on restore. |
| 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 | |
| 3308 | |
| 3309 | |
| 3310 | |
| 3311 | |
| 3312 | |
| 3313 | |
| 3314 | |
| 3315 | |
| 3316 | |
| 3317 | |
| 3318 | |
| 3319 | |
| 3320 | |
| 3321 | |
| 3322 | |
| 3323 | |
| 3324 | |
| 3325 | |
| 3326 | |
| 3327 | |
| 3328 | |
| 3329 | |
| 3330 | |
| 3331 | |
| 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 | /// lane-ibc444c: the 4:4:4 intra-BC chroma cell. `decode_intrabc_rect` |
| 3378 | /// sized a rect intra-BC block's chroma plane block with a hardcoded 4:2:0 |
| 3379 | /// halving (`bw / 2`, `bh / 2`, origin `px / 2`). |
| 3380 | /// `av1_get_max_uv_txsize` (`av1/common/blockd.h`) is `ss_size_lookup[bsize]` |
| 3381 | /// and applies NO halving of its own, and `get_vartx_max_txsize` (`:1447`) |
| 3382 | /// then reads that plane block as `max_txsize_rect_lookup[plane_bsize]`. So |
| 3383 | /// at 4:4:4 an 8x16 luma block's chroma plane block is 8x16 and libaom |
| 3384 | /// codes it as ONE TX_8X16, while the halving read the same 8x16 footprint |
| 3385 | /// as ONE 4x8 rect unit. |
| 3386 | /// |
| 3387 | /// **Localised by trace, not by reading** (`EC_IBCTX`, this commit's rung |
| 3388 | /// on `read_coeffs_rect`, paired against the oracle's `EC_ECDUMP_IN` by |
| 3389 | /// STREAM BIT POSITION — never by the 16-bit `rng`, which collides at this |
| 3390 | /// scale, and never by a plane label, which is the ORACLE's side of the |
| 3391 | /// pairing): |
| 3392 | /// |
| 3393 | /// ```text |
| 3394 | /// oracle bit 6870 plane=0 mi=(92,104) tx=7 (TX_8X16) all_zero=0 |
| 3395 | /// ours bit 6885 8x16 skip_ctx=0 decode.rs (read_inter_plane_rect) |
| 3396 | /// oracle bit 6878 plane=1 mi=(92,104) tx=7 (TX_8X16) all_zero=1 |
| 3397 | /// ours bit 6893 4x8 skip_ctx=0 decode.rs <-- FORK |
| 3398 | /// oracle bit 6879 plane=2 mi=(92,104) tx=7 (TX_8X16) all_zero=1 |
| 3399 | /// ours bit 6902 4x8 skip_ctx=0 decode.rs |
| 3400 | /// ``` |
| 3401 | /// |
| 3402 | /// The `txb_skip` VALUE first disagrees one unit before the bit position |
| 3403 | /// does: the oracle skips the U unit, we do not, we burn 14 extra bits, and |
| 3404 | /// every later symbol decodes from the wrong place. Reverting the two |
| 3405 | /// arithmetic lines reproduces luma sample **205264** as the first wrong |
| 3406 | /// sample — the exact ceiling `lanes/av1444rect.report.md` rounds 3-4 |
| 3407 | /// documented — which is the red-before proof. |
| 3408 | /// |
| 3409 | /// **The 4:4:4 pixel arm is a PREFIX, not an exactness claim, and the |
| 3410 | /// residual is an ENTROPY fork — NOT a reconstruction one.** An earlier |
| 3411 | /// round of this lane claimed the coefficient ladder was "bit-exact for all |
| 3412 | /// 2359 oracle units" and inferred from that the tail was reconstruction. |
| 3413 | /// **That claim was wrong and is retracted** (see this branch's report r2): |
| 3414 | /// the walk compared entry bits at matching LIST INDICES across two traces |
| 3415 | /// of different lengths, and the square `read_coeffs` reader logs an |
| 3416 | /// `all_zero` step even for a read that consumes ZERO bits, so it paired |
| 3417 | /// 0-bit lines against real units. Measured on this branch, with the |
| 3418 | /// 0-bit filter applied to BOTH sides: |
| 3419 | /// |
| 3420 | /// ```text |
| 3421 | /// oracle all_zero reads 2395 (2359 with a real position) |
| 3422 | /// our all_zero lines 3999 |
| 3423 | /// our lines that consumed bits 1326 |
| 3424 | /// 1:1 entry-bit matches, monotone merge 71 |
| 3425 | /// ``` |
| 3426 | /// |
| 3427 | /// We perform ~1069 FEWER real symbol reads than the oracle. A |
| 3428 | /// reconstruction-only defect cannot make a symbol count come up short, so |
| 3429 | /// the tail is a second entropy fork, first visible in U and V at |
| 3430 | /// **(x=160, y=80) = mi (20, 40)**, spreading to the whole x[320,640) |
| 3431 | /// y[160,480) quadrant. (A figure of "1910 units matching 1:1 with 486 vs |
| 3432 | /// 486 non-zero-bit reads" was relayed to this lane and does NOT reproduce |
| 3433 | /// here — re-measure before quoting either number.) |
| 3434 | /// |
| 3435 | /// **The next reader must pair by BIT INTERVAL, not by index.** The oracle's |
| 3436 | /// `EC_ECDUMP_IN` prints only the ENTRY position; there is no post position, |
| 3437 | /// and entry bits alone drift the moment per-unit bit consumption differs. |
| 3438 | /// The unblock is one line of oracle instrumentation OUTSIDE the repo — |
| 3439 | /// print `aom_reader_tell(r)` after the `aom_read_symbol` at |
| 3440 | /// `~/.cache/aom-oracle/src/av1/decoder/decodetxb.c:158` — then pair on |
| 3441 | /// `(entry, post)`, which is exact and collision-free. Coordinate the |
| 3442 | /// rebuild with the main session; every lane's oracle binary moves. |
| 3443 | /// |
| 3444 | /// 4:2:0 identity is a first-class arm, not a claim: `ss_x = ss_y = 1` |
| 3445 | /// makes `bw >> ss_x` the same arithmetic as the halving, and the pinned |
| 3446 | /// 4:2:0 twin (`420_intrabc_rect4_witness.obu`) is asserted byte-exact |
| 3447 | /// against the oracle in the same run. |
| 3448 | /// lane-av1offtile: a lossless HORZ/VERT strip's PLANE-MAJOR 4x4 chroma |
| 3449 | /// walk is bounded by the CHROMA PLANE, not by the block's own footprint. |
| 3450 | /// |
| 3451 | /// libaom bounds every transform walk per PLANE -- `max_block_wide` / |
| 3452 | /// `max_block_high` (`av1_common_int.h:1565`) add `mb_to_right_edge >> |
| 3453 | /// (3 + pd->subsampling_x)` to the plane block's size before the |
| 3454 | /// `>> MI_SIZE_LOG2`, and `av1_foreach_transformed_block_in_plane` |
| 3455 | /// (`decodeframe.c:1124`) drops any unit whose `blk_col`/`blk_row` is past |
| 3456 | /// them. `decode_rect_split`'s luma walk carries that clip |
| 3457 | /// (`decode.rs`, the `tu_px >= y.true_width` guard lane-hgkf r1 added for |
| 3458 | /// the LUMA plane); its lossless chroma walk counted `chroma_w / 4` x |
| 3459 | /// `chroma_h / 4` off the block instead, so a block overhanging the bottom- |
| 3460 | /// right frame edge read chroma transform units that do not exist. |
| 3461 | /// |
| 3462 | /// MEASURED on `mix176_offtile_chroma_clip.obu`, whose bytes are frame 0 |
| 3463 | /// of the 4:2:0 8-bit `mix_176x144_6.obu` |
| 3464 | /// (`ffmpeg -f lavfi -i testsrc2=size=176x144:rate=25 -frames:v 6 |
| 3465 | /// -pix_fmt yuv420p`, then `aomenc --codec=av1 --obu --passes=1 |
| 3466 | /// --cpu-used=4 --limit=6 --end-usage=q --cq-level=0 --aq-mode=1`; the |
| 3467 | /// whole 6-frame stream is 20 069 B, sha256 |
| 3468 | /// `02b15d0d5b08aa5aebf139aee94c31b4f8363d14649c238cd7a19a9785ef124a`, |
| 3469 | /// and this fixture is its first 4 581 B -- the temporal delimiter, |
| 3470 | /// sequence header and frame-0 OBU, nothing else). The bottom-right |
| 3471 | /// superblock is the 48x16 sliver of a 176x144 frame, and its block at |
| 3472 | /// `mi=(32,32)` `px=(128,128)` is `bw=64 bh=32`, so the chroma plane |
| 3473 | /// block (`cpx=64 cpy=64`, plane 88x72) is 32x16 where only 24x8 is coded. |
| 3474 | /// That is `cw_n` 8 -> 6 and `ch_n` 4 -> 2: **20 phantom units per plane, |
| 3475 | /// 40 in total**, and 40 is exactly the extra-read count the paired |
| 3476 | /// `EC_SYMR` ladder measures (ours 25792..25831, the oracle doing a |
| 3477 | /// range-coder init for the next frame there). |
| 3478 | /// |
| 3479 | /// The unit count below is the load-bearing number, not the pixels: the |
| 3480 | /// 40 phantom reads all carry `all_zero` and consume no data (the bit |
| 3481 | /// position freezes at 36288), so frame 0's pixels are byte-exact EITHER |
| 3482 | /// WAY and a pixel compare alone would be blind to this defect. Frame 0's |
| 3483 | /// transform-unit count is 2413 without the clip and 2373 with it, and |
| 3484 | /// **2373 is the oracle's own count** -- the number of `EC_ECDUMP_IN` |
| 3485 | /// lines the shared `aomdec` prints for the same bytes. Reverting the |
| 3486 | /// clip restores 2413 and fails this assert; that is the mutation proof. |
| 3487 | /// |
| 3488 | /// What the 40 reads cost, on the FULL 6-frame stream rather than this |
| 3489 | /// prefix: the desync is 11 970 reads downstream of them, where the |
| 3490 | /// exhausted tile yields an unbounded `read_golomb` tail and the decoder |
| 3491 | /// refuses with `unsupported: AV1 tile (a Golomb tail longer than this |
| 3492 | /// decoder reads)` -- a supported 4:2:0 8-bit cell lost to a walk that ran |
| 3493 | /// off its own tile. Fixing the walk moves the first remaining divergence |
| 3494 | /// on the full stream from SYMR 25 792 to 29 411, a different block at a |
| 3495 | /// different geometry (the var-tx/`lossless` conjunct lane-av1mixllfork |
| 3496 | /// and lane-av1golomb320 own), and both this clip and that one applied |
| 3497 | /// together decode the cell and match the oracle byte for byte. That |
| 3498 | /// composition is measured, not claimed: this gate pins only the walk |
| 3499 | /// this commit fixes. |
| 3500 | |
| 3501 | |
| 3502 | |
| 3503 | |
| 3504 | |
| 3505 | |
| 3506 | |
| 3507 | |
| 3508 | |
| 3509 | |
| 3510 | |
| 3511 | |
| 3512 | |
| 3513 | |
| 3514 | |
| 3515 | |
| 3516 | |
| 3517 | |
| 3518 | |
| 3519 | |
| 3520 | |
| 3521 | |
| 3522 | |
| 3523 | |
| 3524 | |
| 3525 | |
| 3526 | |
| 3527 | |
| 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 | |
| 3631 | |
| 3632 | |
| 3633 | |
| 3634 | |
| 3635 | |
| 3636 | |
| 3637 | |
| 3638 | |
| 3639 | |
| 3640 | |
| 3641 | |
| 3642 | |
| 3643 | |
| 3644 | |
| 3645 | |
| 3646 | |
| 3647 | |
| 3648 | |
| 3649 | |
| 3650 | |
| 3651 | |
| 3652 | |
| 3653 | |
| 3654 | |
| 3655 | |
| 3656 | |
| 3657 | |
| 3658 | |
| 3659 | |
| 3660 | |
| 3661 | |
| 3662 | |
| 3663 | |
| 3664 | |
| 3665 | |
| 3666 | /// lane-av1chromarect: the 128-root intra-BC HORZ/VERT strip's chroma |
| 3667 | /// plane block, on the 4:4:4 LOSSY witness `fixtures/r512.obu` that |
| 3668 | /// reaches `decode_intrabc_owned_rect` five times. |
| 3669 | /// |
| 3670 | /// The extent is the ss-derived one (`bw >> ss_x` by `bh >> ss_y`; |
| 3671 | /// `av1_get_max_uv_txsize` = `ss_size_lookup[bsize]`, blockd.h:1372), and |
| 3672 | /// the plane block is walked by `get_vartx_max_txsize` steps -- a 4:4:4 |
| 3673 | /// 32x64 luma block's chroma plane block is 32x64, which libaom codes as |
| 3674 | /// TWO `TX_32X32` units, not as one 32x64 transform. |
| 3675 | /// |
| 3676 | /// This gate WAS the refusal assertion "a rectangular inter chroma |
| 3677 | /// transform unit whose shape has no coefficient table set here", put |
| 3678 | /// there one commit earlier so that the day the arm landed it would go |
| 3679 | /// RED and force this rewrite. The refusal string is GONE from the |
| 3680 | /// witness's decode because nothing reaches it any more, not because it |
| 3681 | /// was deleted: `rect_inter_chroma_set` still refuses (32, 64) and the |
| 3682 | /// string is still in the source, it is just not on this path any more. |
| 3683 | /// |
| 3684 | /// The floors were RAISED to full byte-exactness on all three planes of |
| 3685 | /// all three frames by lane-av1chromadc, which closed the "open chroma |
| 3686 | /// fork" this gate used to carry: a skipped 64x64 square block at 4:4:4 |
| 3687 | /// has a 64x64 chroma plane block, libaom walks it as a 2x2 grid of |
| 3688 | /// `TX_32X32` units, and the intra-BC chroma override was handed to every |
| 3689 | /// unit whole instead of windowed per unit (see |
| 3690 | /// `a_444_skipped_64x64_square_block_windows_its_chroma_override_per_unit` |
| 3691 | /// and lanes/av1chromadc.report.md). The history of these floors: |
| 3692 | /// |
| 3693 | /// * lane-av1chromarect, after the ss-derived extent and the multi-unit |
| 3694 | /// walk: `[[262144, 229728, 229728], [262144, 65704, 65704], |
| 3695 | /// [262144, 262144, 262144]]` -- luma exact on all three frames, frame 2 |
| 3696 | /// exact on all three planes, 79969 chroma samples still wrong. |
| 3697 | /// * lane-av1chromadc: `[[262144; 3]; 3]` -- every plane of every frame |
| 3698 | /// byte-exact against aomdec. Floors only ever grow. |
| 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 | |
| 3748 | |
| 3749 | |
| 3750 | |
| 3751 | |
| 3752 | |
| 3753 | |
| 3754 | |
| 3755 | |
| 3756 | |
| 3757 | |
| 3758 | |
| 3759 | |
| 3760 | |
| 3761 | |
| 3762 | |
| 3763 | |
| 3764 | |
| 3765 | |
| 3766 | |
| 3767 | |
| 3768 | |
| 3769 | |
| 3770 | |
| 3771 | |
| 3772 | |
| 3773 | |
| 3774 | |
| 3775 | |
| 3776 | |
| 3777 | |
| 3778 | |
| 3779 | |
| 3780 | |
| 3781 | |
| 3782 | |
| 3783 | |
| 3784 | |
| 3785 | |
| 3786 | |
| 3787 | |
| 3788 | |
| 3789 | |
| 3790 | |
| 3791 | |
| 3792 | |
| 3793 | |
| 3794 | |
| 3795 | |
| 3796 | |
| 3797 | |
| 3798 | |
| 3799 | |
| 3800 | |
| 3801 | /// lane-av1ibcfork: the SECOND 4:4:4 intra-BC witness, and the one the |
| 3802 | /// entropy investigation was chartered against. `444_intrabc_rect4_witness.obu` |
| 3803 | /// reaches `decode_intrabc_owned_rect`'s SKIP arm once -- the 64x32 block at |
| 3804 | /// mi (40,80) -- and is byte-exact on all three planes. |
| 3805 | /// |
| 3806 | /// Why a second witness and not a repeat of |
| 3807 | /// `a_444_intrabc_owned_rect_strip_sizes_its_chroma_plane_block_and_decodes` |
| 3808 | /// (which pins `r512.obu`): the skip arm's defect was a wrong PLACE, not a |
| 3809 | /// wrong size, and the two shapes produce DIFFERENT symptoms. `r512.obu`'s |
| 3810 | /// 128-root strips fail as a sizing error inside the coefficient walk; this |
| 3811 | /// witness's 64x32 skip block read no coefficient at all, so the only |
| 3812 | /// symptom was pixels -- a 32x16 window committed at (px/2, py/2) = |
| 3813 | /// (160,80) over a region another block had already reconstructed, and its |
| 3814 | /// own 64x32 footprint at (320,160) left unwritten. Measured before the |
| 3815 | /// ss correction: U 72945 / V 64865 of 307200 wrong, first at (160,80) on |
| 3816 | /// both planes, luma byte-exact; the two 8x8-cell difference components |
| 3817 | /// were 8 cells at x[160,192) y[80,96) and 1182 cells over the whole |
| 3818 | /// x[320,640) y[160,480) quadrant -- one wrong-place write, not two. |
| 3819 | /// |
| 3820 | /// Full byte-exactness, not a prefix. That is possible only because |
| 3821 | /// `lane-av1chromarect` (the ss-derived extent and origins, this function |
| 3822 | /// included -- the skip arm was where the defect was first reached) and |
| 3823 | /// `lane-av1chromadc` (the per-unit windowed chroma override) both landed; |
| 3824 | /// before them this witness carried the open tail |
| 3825 | /// `lanes/ibc444c.report.md` r2 recorded. The 4:2:0 twin is asserted |
| 3826 | /// byte-exact in the same run, where `>> ss_x` IS `/ 2`. |
| 3827 | |
| 3828 | |
| 3829 | |
| 3830 | |
| 3831 | |
| 3832 | |
| 3833 | |
| 3834 | |
| 3835 | |
| 3836 | |
| 3837 | |
| 3838 | |
| 3839 | |
| 3840 | |
| 3841 | |
| 3842 | |
| 3843 | |
| 3844 | |
| 3845 | |
| 3846 | |
| 3847 | |
| 3848 | |
| 3849 | |
| 3850 | |
| 3851 | |
| 3852 | |
| 3853 | |
| 3854 | |
| 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 | /// lane-av1chromadc: a SKIPPED 64x64 square block at 4:4:4 has a 64x64 |
| 3922 | /// chroma plane block, which libaom walks as a 2x2 grid of `TX_32X32` units |
| 3923 | /// (`get_vartx_max_txsize`: `av1_get_adjusted_tx_size(TX_64X64) = |
| 3924 | /// TX_32X32`). The intra-BC / UV-palette chroma override |
| 3925 | /// ([`decode_block`]'s `intrabc_bufs` / `palette_uv_bufs`, the |
| 3926 | /// `PALETTE_PRED` slot) is a whole-`chroma_side x chroma_height` buffer and |
| 3927 | /// must be WINDOWED per unit: `PlaneBuf::reconstruct` uses the buffer it |
| 3928 | /// takes as the unit's own `side x side` prediction. At 4:2:0 the chroma |
| 3929 | /// plane block is one 32x32 unit, so the whole buffer IS that unit's |
| 3930 | /// window and the bug is invisible -- which is why it survived every 4:2:0 |
| 3931 | /// gate. At 4:4:4 every unit was handed the buffer's FIRST 32x32, so the |
| 3932 | /// block's right and bottom chroma columns were a copy of its top-left |
| 3933 | /// unit. |
| 3934 | /// |
| 3935 | /// The witness: `fixtures/r512.obu`, 4:4:4 8-bit 512x512, three frames. The |
| 3936 | /// seed is frame 0, `mi=(112,80)`, `px=(320,448)`, `side=64`, `skip=1`, |
| 3937 | /// `mode=0`, `uv_mode=0` -- a skipped intra-BC block at the frame's bottom |
| 3938 | /// edge. Its chroma unit `cu=(1,0)` at `px=(352,448)` reconstructs a flat |
| 3939 | /// 241 (U) / 110 (V) where the oracle has 202 / 222, because it read the |
| 3940 | /// same override window as `cu=(0,0)`. |
| 3941 | /// |
| 3942 | /// This gate asserts FULL frame exactness on all three planes of all three |
| 3943 | /// frames. It is the red-before: on the unpatched tree it fails at |
| 3944 | /// `(352,448)` of frame 0, which is the seed's second chroma unit. |
| 3945 | |
| 3946 | |
| 3947 | |
| 3948 | |
| 3949 | |
| 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 | |
| 4010 | |
| 4011 | |
| 4012 | |
| 4013 | |
| 4014 | |
| 4015 | |
| 4016 | |
| 4017 | |
| 4018 | |
| 4019 | |
| 4020 | |
| 4021 | |
| 4022 | |
| 4023 | |
| 4024 | |
| 4025 | |
| 4026 | |
| 4027 | |
| 4028 | |
| 4029 | |
| 4030 | /// lane-av1rectreach, the 2x1 / 1x2 half of the class sweep |
| 4031 | /// `a_444_skipped_64x64_square_block_windows_its_chroma_override_per_unit` |
| 4032 | /// opened: `decode_rect_split`'s `chroma_tiled` walk is the THIRD site that |
| 4033 | /// walks a 4:4:4 chroma plane block as a grid of Chroma32 units, and the |
| 4034 | /// only one that handed every unit the BLOCK's reach. |
| 4035 | /// |
| 4036 | /// The other two are already per-unit and are not touched by this gate: |
| 4037 | /// `decode_block`'s skip arm (`chroma_window`, lane-av1chromadc) and |
| 4038 | /// `decode_block`'s coded arm (its own `tu_reach_rect`) both resolve |
| 4039 | /// `has_top_right` per transform unit, the way libaom's |
| 4040 | /// `av1_build_intra_predictors` does |
| 4041 | /// (`has_top_right`, defined reconintra.c:196, called from |
| 4042 | /// `av1_build_intra_predictors` at reconintra.c:1847), |
| 4043 | /// fed the chroma txb walk's own `blk_col`/`blk_row`). |
| 4044 | /// |
| 4045 | /// Witness `fixtures/r512_rect2x1_1x2_444.obu`, 2697 B, |
| 4046 | /// sha256 `a009ec580a1ff24250be53e11b8d09616da71e095cefd5eb621c941d40a8688b`: |
| 4047 | /// |
| 4048 | /// ```text |
| 4049 | /// ffmpeg -f lavfi -i testsrc2=size=256x256:rate=1:duration=1 -pix_fmt yuv444p \ |
| 4050 | /// -f rawvideo in.yuv |
| 4051 | /// aomenc --codec=av1 -w 256 -h 256 --i444 --sb-size=64 --enable-palette=1 \ |
| 4052 | /// --enable-rect-partitions=1 --enable-1to4-partitions=1 \ |
| 4053 | /// --min-partition-size=32 --cq-level=40 --profile=1 --obu --limit=1 \ |
| 4054 | /// -o r512_rect2x1_1x2_444.obu in.yuv |
| 4055 | /// ``` |
| 4056 | /// |
| 4057 | /// (aom-affine aomenc, one key frame, 4:4:4 8-bit 256x256.) It reaches |
| 4058 | /// BOTH grid shapes: a 64x32 chroma plane block as `nw=2 nh=1` of 32x32 |
| 4059 | /// and a 32x64 one as `nw=1 nh=2`. |
| 4060 | /// |
| 4061 | /// RED-BEFORE, on the unpatched tree, measured with `EC_AV1_FINAL_DUMP` |
| 4062 | /// (aomdec) against `set_final_dump_prefix` (ours), 786432 B per frame: |
| 4063 | /// frame 0 plane Y 0 wrong, plane U 130 wrong, plane V 30 wrong -- all of |
| 4064 | /// them in the right 6 columns of the `cu=(0,0)` unit at `mi=(48,48)` |
| 4065 | /// `px=(192,192)`, a 64x32 block whose right edge IS the frame's, so the |
| 4066 | /// block-level reach denied an above-right that libaom's per-unit |
| 4067 | /// `col_off + top_right_count_unit < plane_bw_unit` (0 + 8 < 16) grants. |
| 4068 | /// After: 0 wrong on all three planes. |
| 4069 | |
| 4070 | |
| 4071 | |
| 4072 | |
| 4073 | |
| 4074 | |
| 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 | |
| 4108 | |
| 4109 | |
| 4110 | |
| 4111 | |
| 4112 | |
| 4113 | |
| 4114 | |
| 4115 | |
| 4116 | |
| 4117 | |
| 4118 | |
| 4119 | |
| 4120 | |
| 4121 | |
| 4122 | |
| 4123 | |
| 4124 | |
| 4125 | |
| 4126 | |
| 4127 | |
| 4128 | |
| 4129 | |
| 4130 | |
| 4131 | |
| 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 | /// The UV-PALETTE half of the same class, and the cell |
| 4182 | /// `lanes/av1chromadc.report.md` §5 left explicitly UNMEASURED ("every |
| 4183 | /// multi-unit walk on this witness is `src=intrabc`; the UV-palette source |
| 4184 | /// never reaches a multi-unit chroma walk here, so its arm of the sweep is |
| 4185 | /// argued from the shared code path, not witnessed"). This witness is the |
| 4186 | /// measurement: it puts a UV-palette block on a 1x2 16x64 chroma grid |
| 4187 | /// (`mi=(32,12)`) as well as plenty of non-palette ones. |
| 4188 | /// |
| 4189 | /// Witness `fixtures/r512_rect1x2_444_palette.obu`, 2250 B, |
| 4190 | /// sha256 `fad03c69087f316c1a117e8d8a70769d161b332bce7b2998e646312bb78fb067`: |
| 4191 | /// |
| 4192 | /// ```text |
| 4193 | /// ffmpeg -f lavfi -i testsrc2=size=256x256:rate=1:duration=1 -pix_fmt yuv444p \ |
| 4194 | /// -f rawvideo in.yuv |
| 4195 | /// aomenc --codec=av1 -w 256 -h 256 --i444 --sb-size=64 --enable-palette=1 \ |
| 4196 | /// --enable-rect-partitions=1 --enable-1to4-partitions=1 \ |
| 4197 | /// --min-partition-size=16 --cq-level=40 --profile=1 --obu --limit=1 \ |
| 4198 | /// -o r512_rect1x2_444_palette.obu in.yuv |
| 4199 | /// ``` |
| 4200 | /// |
| 4201 | /// (`--min-partition-size=16` is what puts the 16x64 chroma grid on a |
| 4202 | /// strip at all; at 32 the encoder only ever picks 32x64 / 64x32.) The |
| 4203 | /// per-unit reach the fix installs is the same line for the palette and |
| 4204 | /// the non-palette unit -- the palette only supplies the PREDICTION |
| 4205 | /// (`palette_window`, decode.rs:12784), never the reach -- so this gate |
| 4206 | /// exists to pin the prediction source down, not to re-prove the reach. |
| 4207 | |
| 4208 | |
| 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 | |
| 4269 | |
| 4270 | |
| 4271 | |
| 4272 | |
| 4273 | |
| 4274 | |
| 4275 | |
| 4276 | |
| 4277 | |
| 4278 | |
| 4279 | |
| 4280 | |
| 4281 | |
| 4282 | |
| 4283 | |
| 4284 | |
| 4285 | |
| 4286 | |
| 4287 | |
| 4288 | |
| 4289 | |
| 4290 | |
| 4291 | |
| 4292 | |
| 4293 |