edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB552edc4Tahinli2 months ago2048 commits
| 1 | //! Sub-pel motion compensation, spec 7.11.3 ("Motion vector scaling process" |
| 2 | //! through "Block inter predictor process"), the REGULAR (`EIGHTTAP`) filter |
| 3 | //! only, 8-bit samples only. |
| 4 | //! |
| 5 | //! A block's inter prediction is separable: an 8-tap horizontal pass over the |
| 6 | //! reference, rounded down by `InterRound0`, feeds an 8-tap vertical pass |
| 7 | //! over that intermediate, rounded down by `InterRound1`. Both fractions run |
| 8 | //! in 1/16-pel steps -- luma motion vectors are stored at 1/8-pel and always |
| 9 | //! land on an even step; chroma vectors, once scaled for subsampling, can |
| 10 | //! land on any of the 16. |
| 11 | |
| 12 | /// `Round2` (spec 4.7): halves round up. |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | /// `InterRound0` (spec 7.11.3.2), 8-bit, non-compound: the shift the |
| 22 | /// horizontal pass's sum is brought down by before it is stored as the |
| 23 | /// intermediate. |
| 24 | const INTER_ROUND_0: u32 = 3; |
| 25 | /// `InterRound1` (spec 7.11.3.2), 8-bit, non-compound: the shift the vertical |
| 26 | /// pass's sum is brought down by to land back on an 8-bit sample. Composed |
| 27 | /// with `INTER_ROUND_0` the two shifts are the filter's own gain (each pass |
| 28 | /// sums to 128, `128 * 128 == 1 << 14 == 1 << (INTER_ROUND_0 + INTER_ROUND_1)`) |
| 29 | /// -- so an identity or DC input comes back exactly, by construction of the |
| 30 | /// table rather than by a fitted constant. |
| 31 | const INTER_ROUND_1: u32 = 11; |
| 32 | |
| 33 | /// `Subpel_Filters[EIGHTTAP]` (spec 7.11.3.3): 16 rows, one per 1/16-pel |
| 34 | /// fraction, each an 8-tap kernel centred so tap index 3 lands on the integer |
| 35 | /// sample (fraction 0 is the identity tap `[.., 128, ..]`). |
| 36 | const SUBPEL_FILTERS: = |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | ; |
| 54 | |
| 55 | /// `Subpel_Filters[EIGHTTAP]`'s narrow-block counterpart (spec 7.11.3.4's |
| 56 | /// filter selection is per-axis: a `predict` axis whose output block |
| 57 | /// dimension is 4 or less reads this table instead of [`SUBPEL_FILTERS`]), |
| 58 | /// mirroring `av1_sub_pel_filters_4` (`filter.h`): the same 8-slot shape but |
| 59 | /// zeroed at taps 0/1/6/7, so a 4-wide (or 4-tall) block's filter never |
| 60 | /// reaches a full 3 samples past its own edge. Every 4:2:0 chroma block |
| 61 | /// under an 8x8 (or smaller) luma leaf hits this on at least one axis -- |
| 62 | /// this is not an edge case, it is the common chroma shape. |
| 63 | const SUBPEL_FILTERS_4: = |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | ; |
| 81 | |
| 82 | /// `Subpel_Filters[EIGHTTAP_SMOOTH]` (`filter.h`'s `av1_sub_pel_filters_8smooth`). |
| 83 | const SUBPEL_FILTERS_SMOOTH: = |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | ; |
| 101 | |
| 102 | /// `SUBPEL_FILTERS_SMOOTH`'s narrow-block counterpart (`av1_sub_pel_filters_4smooth`). |
| 103 | const SUBPEL_FILTERS_SMOOTH_4: = |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | ; |
| 121 | |
| 122 | /// `Subpel_Filters[EIGHTTAP_SHARP]` (`av1_sub_pel_filters_8sharp`). A block |
| 123 | /// whose dimension is 4 or less does NOT read this table: spec 7.11.3.4's |
| 124 | /// `filterIdx` sends both EIGHTTAP and EIGHTTAP_SHARP to filter index 4, and |
| 125 | /// libaom agrees -- `av1_interp_4tap[MULTITAP_SHARP]` is `av1_sub_pel_filters_4`, |
| 126 | /// the REGULAR narrow kernel (`filter.h:243`), not a sharp one (lane-gmaffine r5). |
| 127 | const SUBPEL_FILTERS_SHARP: = |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | ; |
| 145 | |
| 146 | /// `Subpel_Filters[BILINEAR]` (`av1_bilinear_filters`) -- also never swapped |
| 147 | /// for a narrow-block table (it is already only 2 non-zero taps). |
| 148 | const SUBPEL_FILTERS_BILINEAR: = |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | ; |
| 166 | |
| 167 | /// Which of the spec's four `interpolation_filter` kernels a block's motion |
| 168 | /// compensation reads (spec 6.8.9 / `frame_header`'s `interpolation_filter`). |
| 169 | /// A frame codes exactly one of these when not `Switchable`; a `Switchable` |
| 170 | /// frame codes one per block per direction (spec 5.11.20's |
| 171 | /// `read_interp_filter`, see `decode::decode_inter_block`), so `predict`'s |
| 172 | /// callers resolve `Switchable` to a concrete pair of kinds themselves -- |
| 173 | /// this type only ever names the resolved kernel, never `Switchable` itself. |
| 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 | /// A reference sample at `(x, y)`, clamped to the frame's true (unpadded) |
| 227 | /// extent -- `true_width`/`true_height`, which can be narrower than |
| 228 | /// `stride` -- rather than read out of range (spec 7.11.3.4's `Clip3` |
| 229 | /// against the frame's edges): a motion vector that points past the true |
| 230 | /// edge repeats the true edge's sample instead of panicking or picking up |
| 231 | /// whatever this encoder's own uncoded padding columns/rows hold. |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | /// lane-perf5: which explicit-SIMD kernels this CPU can run. The scalar |
| 247 | /// functions below stay the reference implementation -- every SIMD kernel is |
| 248 | /// checked against them by `simd_matches_scalar_*` -- and every non-x86_64 |
| 249 | /// build, plus any x86_64 CPU without AVX2 or SSE4.1, decodes through them. |
| 250 | |
| 251 | // every variant is constructed only on x86_64 |
| 252 | pub |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | /// The level, detected once per process (spec-irrelevant: pure dispatch). |
| 261 | pub |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | /// The horizontal pass's inner loop over a contiguous window (`src` holds the |
| 278 | /// row's whole footprint, `out.len() + 7` samples): SIMD where available, |
| 279 | /// [`hpass_contig_scalar`] otherwise. Both produce the same `i32`s -- the |
| 280 | /// SIMD form multiplies the same `i16` pairs, sums them in `i32` and applies |
| 281 | /// the same `Round2(sum, InterRound0)`. |
| 282 | |
| 283 | |
| 284 | pub |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | /// The scalar reference for [`hpass_contig`] (lane-perf2's loop). |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | /// lane-perf5: explicit `std::arch::x86_64` kernels for the two motion |
| 321 | /// compensation passes -- the 18.7% of a 1080p decode that lane-perf4 left in |
| 322 | /// `hpass_row` + `vpass_row`. Nothing here is spec logic: each kernel is the |
| 323 | /// scalar function's arithmetic, lane-parallel, with identical rounding. |
| 324 | |
| 325 | |
| 326 | // each kernel's whole body is its contract |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | |
| 349 | |
| 350 | |
| 351 | |
| 352 | |
| 353 | |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | |
| 368 | |
| 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 | /// lane-perf2: one row of the separable filter's horizontal pass, dav1d |
| 506 | /// style. When the row's whole 8-tap footprint (`x0-3 .. x0+block_w+4`) lies |
| 507 | /// inside the reference's true extent -- the overwhelmingly common case -- |
| 508 | /// the row is one contiguous slice and the taps are a fixed `[i32; 8]`, so |
| 509 | /// the per-sample `Clip3` and the per-tap table load both leave the inner |
| 510 | /// loop and it auto-vectorises. The edge case keeps the exact spec form |
| 511 | /// (`sample`'s clamp per tap); both arms compute the same sums. |
| 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 | /// lane-perf2: the unscaled horizontal pass, `block_h + 7` rows of |
| 541 | /// [`hpass_row`] with the vertical clamp hoisted out of the row. |
| 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 | /// lane-perf2: one output row of the vertical pass, accumulated tap-major so |
| 583 | /// the inner loop walks two contiguous `i32` slices (vectorisable) instead of |
| 584 | /// striding the intermediate by `block_w` per tap. A zero tap is skipped -- |
| 585 | /// adding `0 * x` is exactly nothing, and the 4-tap kernels zero four of the |
| 586 | /// eight slots. `acc` is left holding the unrounded sums. |
| 587 | |
| 588 | |
| 589 | pub |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | /// The scalar reference for [`vpass_row`] (lane-perf2's tap-major loop). |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | thread_local! |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | /// Runs `f` on a scratch slice of `rows * block_w` intermediate elements plus |
| 636 | /// a `block_w` accumulator (see [`MC_SCRATCH`]). |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | /// Predicts one `block_w * block_h` block into `dst`, row-major, from |
| 650 | /// `reference` (row-major, stride `stride`, true content |
| 651 | /// `true_width` x `true_height` -- a reference frame's decoded picture |
| 652 | /// buffer can be wider/taller than the true frame it holds, when this |
| 653 | /// encoder pads a picture to a whole number of superblocks; a spec decoder |
| 654 | /// never codes syntax for those extra columns/rows, so motion compensation |
| 655 | /// must clamp to the true extent, not the buffer's own stride). |
| 656 | /// |
| 657 | /// `x_q4` / `y_q4` are the block's top-left position in the reference, in |
| 658 | /// 1/16-pel units (an integer MV has its low 4 bits zero); this function |
| 659 | /// splits each into its whole-sample part and its 0..16 fraction itself, so |
| 660 | /// the caller need not pre-split a motion vector. |
| 661 | /// |
| 662 | /// # Panics |
| 663 | /// Panics when `dst` is not `block_w * block_h` long, or the reference is |
| 664 | /// empty. |
| 665 | // one reference plane, one position, one block shape |
| 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 | /// [`predict`], selecting the interpolation filter kernel explicitly (spec |
| 692 | /// 6.8.9's `interpolation_filter`) instead of always `Regular` -- the same |
| 693 | /// kernel both directions. |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | /// [`predict_with_filter`], with the horizontal (`interp_filter[0]`) and |
| 723 | /// vertical (`interp_filter[1]`) kernels chosen independently -- spec |
| 724 | /// 5.11.20's per-block `SWITCHABLE` read is per-direction (`enable_dual_filter`), |
| 725 | /// so the two passes can genuinely differ. |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | /// [`predict_with_filters`] with the 4-tap decision taken from the block's |
| 747 | /// TRUE width/height (`kern_w`/`kern_h`) rather than the destination buffer's. |
| 748 | /// libaom's `av1_get_interp_filter_params_with_block_size` (reconinter.h, |
| 749 | /// called per axis from `inter_predictor` with `w` then `h`) picks the narrow |
| 750 | /// kernel from the PREDICTION block's own dimensions; our inter path predicts |
| 751 | /// a rectangular block over its enclosing square buffer, so a rect block whose |
| 752 | /// chroma is 4 wide or 4 tall (luma 8x16 / 16x8 and taller kin) must still ask |
| 753 | /// for the 4-tap kernel on that axis -- lane-rectchroma2 r1. |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | |
| 859 | |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | /// `REF_SCALE_SHIFT`'s "no scaling" value (spec 7.11.3.3, libaom `scale.h` |
| 868 | /// `REF_NO_SCALE`): `x_scale_fp == REF_NO_SCALE` means the stored reference's |
| 869 | /// luma width equals the current frame's, so [`predict_scaled`] reduces |
| 870 | /// exactly to [`predict_with_filters`] (verified in |
| 871 | /// `predict_scaled_at_no_scale_matches_predict_with_filters` below). |
| 872 | pub const REF_NO_SCALE: i64 = 1 << 14; |
| 873 | |
| 874 | /// The horizontal scale ratio spec 7.11.3.3 derives from luma widths only |
| 875 | /// (libaom `av1_setup_scale_factors_for_frame`, luma widths, `REF_SCALE_SHIFT |
| 876 | /// == 14`): `other_width` is the stored reference picture's own luma width, |
| 877 | /// `this_width` the current frame's coded luma width. AV1 superres never |
| 878 | /// scales height (r8's derivation), so there is no vertical counterpart. |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | thread_local! |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | /// Current value of [`PREDICT_SCALED_HITS`]. |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | thread_local! |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | /// Current value of [`RECT_NARROW_KERN_HITS`]. |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | /// Resets [`RECT_NARROW_KERN_HITS`] (per-attempt counting, class |
| 919 | /// `counter-from-refused-stream`). |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | /// Bumps [`RECT_NARROW_KERN_HITS`] when the block's true dims pick a kernel |
| 925 | /// the destination buffer's dims would not have. |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | /// Current value of [`INTER_PRED_HITS`]. |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | /// `ROUND_POWER_OF_TWO_SIGNED` (libaom `common/common.h`): halves round away |
| 946 | /// from zero's *magnitude* -- negative inputs are rounded like their |
| 947 | /// negation, not truncated toward zero the way a plain arithmetic shift |
| 948 | /// would. |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | /// Spec 7.11.3.3's horizontal pass on a (possibly) scaled reference, shared |
| 958 | /// by [`predict_scaled`] and [`predict_compound_intermediate`] -- the two |
| 959 | /// differ only in their VERTICAL rounding ([`INTER_ROUND_1`] vs |
| 960 | /// [`INTER_ROUND_1_COMPOUND`]), never here. Each output column walks the |
| 961 | /// reference by `x_step_qn` (the Q14 scale rounded down to the Q10 |
| 962 | /// `SCALE_SUBPEL_BITS` grid) and picks its own filter phase from the low |
| 963 | /// bits, so `x_scale_fp == REF_NO_SCALE` reduces to the ordinary stride-1 |
| 964 | /// whole-pel walk with one fixed phase (pinned by |
| 965 | /// `predict_scaled_at_no_scale_matches_predict_with_filters`). |
| 966 | |
| 967 | |
| 968 | |
| 969 | |
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 | |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | |
| 1006 | /// lane-perf2: the horizontal pass every two-pass entry point takes. |
| 1007 | /// `horizontal_scaled_pass` was carrying the UNSCALED work too (every |
| 1008 | /// compound prediction goes through it whatever the reference's scale), and |
| 1009 | /// its per-column walk re-derives an integer position and a filter phase |
| 1010 | /// that are constant at `REF_NO_SCALE`, reads the reference column-major, |
| 1011 | /// and clamps per tap -- 14% of decode self time. At `REF_NO_SCALE` the |
| 1012 | /// scaled walk reduces algebraically to `x0 = x_q4 / 16`, phase `x_q4 % 16` |
| 1013 | /// (`pos_x_q10 == x_q4 * 64 + 32`, so `int_pel == x0` and |
| 1014 | /// `(x_qn & 1023) >> 6 == xfrac` for every column), which is exactly |
| 1015 | /// [`horizontal_pass_unscaled`] -- and |
| 1016 | /// `predict_scaled_at_no_scale_matches_predict_with_filters` pins that |
| 1017 | /// equality end to end. A genuinely scaled reference (superres) still takes |
| 1018 | /// the general path. |
| 1019 | |
| 1020 | |
| 1021 | |
| 1022 | |
| 1023 | |
| 1024 | |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 | |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | |
| 1052 | |
| 1053 | |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | /// [`predict_with_filters`]'s scaled-reference counterpart (spec 7.11.3.3): |
| 1059 | /// used only when the stored reference's luma width differs from the current |
| 1060 | /// frame's (`use_superres` on a non-key frame). `x_scale_fp` is |
| 1061 | /// [`scale_factor`]'s ratio ([`REF_NO_SCALE`] reproduces |
| 1062 | /// `predict_with_filters` bit-exact, pinned by |
| 1063 | /// `predict_scaled_at_no_scale_matches_predict_with_filters`). Per r8's |
| 1064 | /// derivation AV1 superres never scales height, so `y_q4`'s whole-sample / |
| 1065 | /// fraction split and the vertical pass are untouched -- only the horizontal |
| 1066 | /// pass's per-column integer position and filter phase come from a scaled |
| 1067 | /// walk (`x_qn`) instead of a fixed stride-1 one. |
| 1068 | /// |
| 1069 | /// # Panics |
| 1070 | /// Panics when `dst` is not `block_w * block_h` long, or the reference is |
| 1071 | /// empty. |
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | |
| 1089 | |
| 1090 | |
| 1091 | |
| 1092 | |
| 1093 | /// [`predict_scaled`] with the 4-tap decision from the block's true dims |
| 1094 | /// (see [`predict_with_filters_kern`]). |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | |
| 1120 | |
| 1121 | |
| 1122 | |
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 | |
| 1144 | |
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | |
| 1152 | |
| 1153 | |
| 1154 | /// [`predict_with_filters`] or [`predict_scaled`], on this reference's own |
| 1155 | /// `x_scale_fp` -- the dispatch every inter path needs once a reference can be |
| 1156 | /// scaled (superres). `REF_NO_SCALE` takes the ordinary stride-1 path, which |
| 1157 | /// keeps [`predict_scaled_hits`] a true count of scaled predictions. |
| 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 | /// `InterRound1` for a compound ref (spec 7.11.3.2's `isCompound` branch, |
| 1187 | /// `COMPOUND_ROUND1_BITS` in libaom's `convolve.h`): 4 bits shallower than |
| 1188 | /// [`INTER_ROUND_1`] so the vertical pass lands in the `CONV_BUF` domain |
| 1189 | /// (still above 8-bit pixel range) instead of a finished sample -- |
| 1190 | /// `predict_compound_intermediate` below stops there and leaves the final |
| 1191 | /// clip to whichever combine step (simple/distance-weighted average, or a |
| 1192 | /// future masked blend) runs on the pair of intermediates. |
| 1193 | const INTER_ROUND_1_COMPOUND: u32 = 7; |
| 1194 | |
| 1195 | /// `InterPostRound` (spec 7.11.3.2): `2 * FILTER_BITS - (InterRound0 + |
| 1196 | /// InterRound1)` with the *compound* `InterRound1` above -- `2*7 - (3+7) == |
| 1197 | /// 4`. [`combine_compound`] folds this together with `DIST_PRECISION_BITS` |
| 1198 | /// (below) into one final shift. |
| 1199 | const INTER_POST_ROUND: u32 = 4; |
| 1200 | |
| 1201 | /// `DIST_PRECISION_BITS` (spec 7.11.3.15 / libaom `enums.h`): the two |
| 1202 | /// weights [`combine_compound`] takes always sum to `1 << 4 == 16`, whether |
| 1203 | /// they are the simple-average split (8/8) or a distance-weighted split |
| 1204 | /// from [`crate::compound::dist_wtd_comp_weight_assign`]. |
| 1205 | const DIST_PRECISION_BITS: u32 = 4; |
| 1206 | |
| 1207 | /// [`predict_with_filters`]'s compound counterpart: same two-pass separable |
| 1208 | /// filter, but the vertical pass rounds by [`INTER_ROUND_1_COMPOUND`] |
| 1209 | /// instead of [`INTER_ROUND_1`] and is never clipped to a pixel -- the |
| 1210 | /// `CONV_BUF` intermediate domain spec 7.11.3.2 keeps a compound block's two |
| 1211 | /// per-reference predictions in until [`combine_compound`] blends them. |
| 1212 | /// `dst` receives one `i32` per sample, row-major, same shape as |
| 1213 | /// [`predict_with_filters`]'s `u8` `dst`. |
| 1214 | /// |
| 1215 | /// # Panics |
| 1216 | /// Panics when `dst` is not `block_w * block_h` long, or the reference is |
| 1217 | /// empty. |
| 1218 | |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | |
| 1226 | |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | /// [`predict_compound_intermediate`] with the 4-tap decision from the block's |
| 1240 | /// true dims (see [`predict_with_filters_kern`]). |
| 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 | /// Blends two [`predict_compound_intermediate`] outputs into a finished |
| 1302 | /// 8-bit block (spec 7.11.3.15's weighted-average combine, the |
| 1303 | /// `comp_group_idx == 0` path -- `fwd_weight`/`bck_weight` are either the |
| 1304 | /// simple-average split `(8, 8)` or [`crate::compound::dist_wtd_comp_weight_assign`]'s |
| 1305 | /// output; both always sum to `1 << DIST_PRECISION_BITS`). Masked compound |
| 1306 | /// (`comp_group_idx == 1`, wedge/diffwtd) is a different combine this |
| 1307 | /// function does not cover -- decode.rs still refuses those by name. |
| 1308 | |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | |
| 1315 | |
| 1316 | |
| 1317 | |
| 1318 | |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | /// lane-maskcomp r2: `build_compound_diffwtd_mask` (reconinter.c) -- |
| 1332 | /// `DIFFWTD_38`/`DIFFWTD_38_INV` (`mask_type` bit: 0/1). Operates directly on |
| 1333 | /// the two [`predict_compound_intermediate`] outputs: libaom's own |
| 1334 | /// `av1_build_compound_diffwtd_mask_d16_c` runs on its CONV_BUF domain (which |
| 1335 | /// carries a constant `round_offset` bias baked into every sample by its |
| 1336 | /// convolve stage), but `abs(src0 - src1)` cancels an equal bias on both |
| 1337 | /// sides exactly, so the unbiased `i32` intermediates this crate already |
| 1338 | /// produces give the identical `diff` libaom computes. `round` is |
| 1339 | /// `2*FILTER_BITS - round_0 - round_1 + (bd-8)` == [`INTER_POST_ROUND`] for |
| 1340 | /// 8-bit content (`round_0=3`, compound `round_1=7`, `bd=8`). |
| 1341 | |
| 1342 | |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | |
| 1355 | |
| 1356 | |
| 1357 | /// lane-maskcomp r2: `aom_lowbd_blend_a64_d16_mask_c` (blend_a64_mask.c), |
| 1358 | /// algebraically simplified to this crate's unbiased `i32` intermediate |
| 1359 | /// domain the same way [`diffwtd_mask`]'s doc comment derives -- libaom's |
| 1360 | /// `res -= round_offset` step cancels exactly against the bias `m + (64-m) |
| 1361 | /// == 64` contributes equally from both inputs, leaving `(m*pred0 + |
| 1362 | /// (64-m)*pred1) >> 6` (a plain, unrounded shift, matching the C `>>` on |
| 1363 | /// `int32_t`) then one final [`round2`] by [`INTER_POST_ROUND`]. `mask` is |
| 1364 | /// always the LUMA-resolution mask (`mask_stride` == luma block width); |
| 1365 | /// `subsampled` selects the 2x2-average chroma read (spec 7.11.3.14 / |
| 1366 | /// libaom's `subw == 1 && subh == 1` branch) vs. the direct luma read. |
| 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 | /// Whole-pel identity case: [`predict_compound_intermediate`]'s two-pass |
| 1402 | /// filter reduces to `16 * source_sample` exactly (the fraction-0 row is a |
| 1403 | /// single `128` tap both passes, and `128*128 == 1 << 14`, `14 - 7 == 7 == |
| 1404 | /// INTER_ROUND_1_COMPOUND`, so the extra `2^4` of gain the compound path |
| 1405 | /// keeps over [`predict`]'s 11-bit round survives untouched) -- |
| 1406 | /// [`combine_compound`] then divides that back out exactly with an 8/8 |
| 1407 | /// simple-average weight split, so a compound block whose two references |
| 1408 | /// (and MVs) happen to coincide reproduces the plain source sample, not an |
| 1409 | /// off-by-one from double rounding. |
| 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 | |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | |
| 1471 | |
| 1472 | |
| 1473 | |
| 1474 | |
| 1475 | |
| 1476 | |
| 1477 | |
| 1478 | |
| 1479 | |
| 1480 | |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | |
| 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 | |
| 1547 | |
| 1548 | |
| 1549 | |
| 1550 | |
| 1551 | |
| 1552 | |
| 1553 | |
| 1554 | |
| 1555 | |
| 1556 | |
| 1557 | |
| 1558 | |
| 1559 | |
| 1560 | |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | |
| 1570 | |
| 1571 | |
| 1572 | |
| 1573 | |
| 1574 | |
| 1575 | |
| 1576 | |
| 1577 | |
| 1578 | |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | |
| 1583 | |
| 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 | |
| 1634 | |
| 1635 | |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | |
| 1641 | |
| 1642 | |
| 1643 | |
| 1644 | |
| 1645 | |
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | |
| 1653 | |
| 1654 | |
| 1655 | |
| 1656 | |
| 1657 | |
| 1658 | |
| 1659 | |
| 1660 | |
| 1661 | |
| 1662 | |
| 1663 | |
| 1664 | |
| 1665 | |
| 1666 | |
| 1667 | |
| 1668 | |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | |
| 1673 | |
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 | |
| 1686 | |
| 1687 | |
| 1688 | |
| 1689 | |
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 | |
| 1694 | |
| 1695 | |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | |
| 1701 | |
| 1702 | |
| 1703 | |
| 1704 | |
| 1705 | |
| 1706 | |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | |
| 1711 | |
| 1712 | |
| 1713 | |
| 1714 | |
| 1715 | |
| 1716 | |
| 1717 | |
| 1718 | |
| 1719 | |
| 1720 | |
| 1721 | |
| 1722 | |
| 1723 | |
| 1724 | |
| 1725 | |
| 1726 | |
| 1727 | |
| 1728 | |
| 1729 | |
| 1730 | |
| 1731 | |
| 1732 | |
| 1733 | |
| 1734 | |
| 1735 | |
| 1736 | |
| 1737 | |
| 1738 | |
| 1739 | |
| 1740 | |
| 1741 | |
| 1742 | |
| 1743 | |
| 1744 | |
| 1745 | |
| 1746 | |
| 1747 | |
| 1748 | |
| 1749 | |
| 1750 | |
| 1751 | |
| 1752 | |
| 1753 | |
| 1754 | |
| 1755 | |
| 1756 | |
| 1757 | |
| 1758 | |
| 1759 | |
| 1760 | |
| 1761 | |
| 1762 | |
| 1763 | |
| 1764 | |
| 1765 | |
| 1766 | |
| 1767 | |
| 1768 | |
| 1769 | |
| 1770 | |
| 1771 | |
| 1772 | |
| 1773 | |
| 1774 | |
| 1775 | |
| 1776 | |
| 1777 | |
| 1778 | |
| 1779 | |
| 1780 | |
| 1781 | |
| 1782 | |
| 1783 | |
| 1784 | |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 | |
| 1792 | |
| 1793 | |
| 1794 | |
| 1795 | |
| 1796 | |
| 1797 | |
| 1798 | |
| 1799 | |
| 1800 | |
| 1801 | |
| 1802 | |
| 1803 | |
| 1804 | |
| 1805 | |
| 1806 | |
| 1807 | |
| 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 | |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | |
| 1865 | |
| 1866 | |
| 1867 | |
| 1868 | |
| 1869 | |
| 1870 | |
| 1871 | |
| 1872 | |
| 1873 | |
| 1874 | |
| 1875 | |
| 1876 | |
| 1877 | |
| 1878 | |
| 1879 | |
| 1880 | |
| 1881 | |
| 1882 | |
| 1883 | |
| 1884 | |
| 1885 | |
| 1886 | |
| 1887 | |
| 1888 | |
| 1889 | |
| 1890 | |
| 1891 | |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | |
| 1899 | |
| 1900 | |
| 1901 | |
| 1902 | |
| 1903 | |
| 1904 | |
| 1905 | |
| 1906 | |
| 1907 | |
| 1908 | |
| 1909 | |
| 1910 | |
| 1911 | |
| 1912 | |
| 1913 | |
| 1914 | |
| 1915 | |
| 1916 | |
| 1917 | |
| 1918 | |
| 1919 | |
| 1920 | |
| 1921 | |
| 1922 | |
| 1923 | |
| 1924 | |
| 1925 | |
| 1926 |