edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiBcfa93c0Tahinli3 months ago1659 commits
| 1 | //! Reference MV list construction (AV1 spec 7.10.2, `find_mv_stack`), |
| 2 | //! reduced to the single-reference, non-compound, `use_ref_frame_mvs = 0` |
| 3 | //! case a key/inter frame without temporal MV projection needs. |
| 4 | //! |
| 5 | //! Implemented from the spec: the row-above scan (7.10.2.2), the col-left |
| 6 | //! scan (7.10.2.3), a single top-right probe (the first of 7.10.2.4's extra |
| 7 | //! positions), weight-based dedupe (7.10.2.5's `add_ref_mv_candidate`), the |
| 8 | //! weight-descending sort (7.10.2.6), and the `NewMvContext`/`RefMvContext`/ |
| 9 | //! `ZeroMvContext`/`DrlCtx` derivations of 7.10.2.8, ported from libaom's |
| 10 | //! `av1_find_mv_stack` (`av1/common/mvref_common.c`, the `mode_context` |
| 11 | //! switch around its `nearest_match`/`ref_match_count` and the |
| 12 | //! `newmv_count > 0` tests) and `av1_drl_ctx` (`mvref_common.h`), plus MV |
| 13 | //! clamping (7.10.2.14, libaom's `clamp_mv_ref`). |
| 14 | //! |
| 15 | //! This module's immediate row/col/top-right scan alone is *not* enough to |
| 16 | //! get `RefMvContext` (`ref_mv_ctx`) right, *nor* `NewMvContext` at |
| 17 | //! `nearest_match == 0` (see below). Ported straight from libaom's |
| 18 | //! `av1_find_mv_stack` (`av1/common/mvref_common.c`, `setup_ref_mv_list`, |
| 19 | //! ~line 480 on): after the immediate row (-1), col (-1) and top-right |
| 20 | //! probes settle `nearest_match` (and `mode_context`'s `new_mv` bits, which |
| 21 | //! for `nearest_match >= 1` depend on `nearest_match` alone), libaom runs one |
| 22 | //! more probe *before* computing `ref_match_count` — `scan_blk_mbmi` at the |
| 23 | //! diagonal top-left corner `(-1, -1)` — whose match folds into |
| 24 | //! `row_match_count` (and hence can flip `ref_match_count`'s row term true) |
| 25 | //! without ever touching the already-captured `nearest_match`. So |
| 26 | //! `ref_match_count >= nearest_match` always, sometimes strictly greater, and |
| 27 | //! `ref_mv_ctx` (the `REFMV_OFFSET` half of libaom's `mode_context` switch, |
| 28 | //! mvref_common.c ~line 619-643) genuinely depends on both counts, not |
| 29 | //! `nearest_match` alone — that collapse was the bug this module shipped |
| 30 | //! with for several rounds (see the crate report). The `case 0` arm of that |
| 31 | //! same switch *also* sets `new_mv_ctx`'s own bit from `ref_match_count` |
| 32 | //! (`mode_context[ref_frame] |= 1` when `ref_match_count >= 1`) — a second |
| 33 | //! corner-probe dependency this module missed for several more rounds after |
| 34 | //! the first fix, until real-content inter streams (I8 CLASS B) caught it: |
| 35 | //! synthetic fixtures never produced a block with `nearest_match == 0` and a |
| 36 | //! genuine corner match. [`find_mv_stack`] now runs that corner probe and |
| 37 | //! computes both `ref_mv_ctx` and `new_mv_ctx` from the true |
| 38 | //! `(nearest_match, ref_match_count)` pair. |
| 39 | //! |
| 40 | //! The corner probe's own candidate is added to the stack too (matching |
| 41 | //! libaom: a genuinely new MV there becomes a real, if low-weight, entry), |
| 42 | //! at libaom's real `2 * mi_size_wide[BLOCK_8X8]` (`CORNER_WEIGHT`, 4) — |
| 43 | //! same as the top-right probe, which shares `scan_blk_mbmi`'s fixed weight |
| 44 | //! in libaom too. The row/col scans (`scan_row`/`scan_col`) carry libaom's |
| 45 | //! real per-block-run `len * weight` formula (`scan_row_mbmi`/ |
| 46 | //! `scan_col_mbmi`, mvref_common.c), not a flat per-cell weight: this |
| 47 | //! module shipped a flat `IMMEDIATE_WEIGHT = 2` for several rounds, exact |
| 48 | //! only for `tile.rs`'s own encoder (always a fixed `bw4 == bh4 == 8` query |
| 49 | //! against same-size-8 neighbours, where the real formula's `bw4 <= n4` |
| 50 | //! weight boost applies identically on every candidate and so never |
| 51 | //! reorders anything) — decode.rs's real variable partition sizes need the |
| 52 | //! real formula, since a same-or-wider neighbour against a *smaller* query |
| 53 | //! block gets a real, non-flat weight boost there libaom's DRL-index |
| 54 | //! selection depends on. |
| 55 | //! |
| 56 | //! The corner probe's own match does *not* count toward the real |
| 57 | //! `newmv_count` that feeds `new_mv_ctx` (libaom passes it a `dummy_newmv_count` |
| 58 | //! there) — only row/col/top-right do. |
| 59 | //! |
| 60 | //! Also ported (from `av1_drl_ctx`, `mvref_common.h`): the `REF_CAT_LEVEL` |
| 61 | //! (640) bonus applies only to the entries the row/col/top-right scan found |
| 62 | //! (`nearest_refmv_count`), added to their stored weight *before* the corner |
| 63 | //! probe can add a new, unboosted entry — so `drl_ctx` can now be non-zero |
| 64 | //! when the corner probe contributes a genuinely new candidate. |
| 65 | //! |
| 66 | //! The `GLOBALMV_OFFSET` bit of libaom's `mode_context` is set only inside |
| 67 | //! `cm->features.allow_ref_frame_mvs` (temporal MV projection), which this |
| 68 | //! module never has (`use_ref_frame_mvs = 0`), so `zero_mv_ctx` is always 0 |
| 69 | //! here — exact for the case this module covers, not a stand-in. |
| 70 | //! |
| 71 | //! Deliberately reduced away (see the crate report, not reproduced bit-exact |
| 72 | //! here): compound/multi-reference candidates, the temporal MV projection |
| 73 | //! scan, and the single-reference "extension" pass that re-walks the same |
| 74 | //! row/col |
| 75 | //! neighbours through `process_single_ref_mv_candidate` (a no-op here: with |
| 76 | //! only one reference frame ever in play, whatever it would add was already |
| 77 | //! added by the row/col scan), and the "extra search" that pads a short |
| 78 | //! stack to two entries (spec 7.10.2.12) — this module's stack can be |
| 79 | //! shorter than two candidates where libaom's never is. |
| 80 | |
| 81 | /// How many query blocks [`find_mv_stack_with_sign_bias`] has folded at |
| 82 | /// least one temporal MV candidate into (spec 7.9/7.10.2.8's |
| 83 | /// `add_tpl_ref_mv`) — the real-aomenc temporal-MV gate's own firing |
| 84 | /// counter (`crate::decode::tmv_hits`), proving the projection path in |
| 85 | /// [`crate::motion_field`] is actually reached, not just compiled. |
| 86 | static TMV_HITS: AtomicUsize = new; |
| 87 | |
| 88 | /// The number of query blocks that received at least one temporal MV |
| 89 | /// candidate so far, across every [`find_mv_stack_with_sign_bias`] call in |
| 90 | /// this process. |
| 91 | pub |
| 92 | |
| 93 | |
| 94 | |
| 95 | /// lane-mvtwin r1 firing counters, one per divergence this round closed. |
| 96 | /// `COMP_GM_FILL_HITS`: compound extension candidates whose `comp_list` slot |
| 97 | /// came from `gm_mv_candidates[side]` rather than a scanned neighbour, and |
| 98 | /// where that global mv was NOT `(0, 0)` (the only case the old zero fill |
| 99 | /// could not fake). `STACK_FULL_DROPS`: distinct candidates libaom drops at |
| 100 | /// `MAX_REF_MV_STACK_SIZE` on insertion. `TILE_REACH_CLIPS`: row/col reaches |
| 101 | /// shortened by a tile origin past mi 0, which the old frame-edge clamp |
| 102 | /// missed entirely. |
| 103 | static COMP_GM_FILL_HITS: AtomicUsize = |
| 104 | new; |
| 105 | static STACK_FULL_DROPS: AtomicUsize = |
| 106 | new; |
| 107 | static TILE_REACH_CLIPS: AtomicUsize = |
| 108 | new; |
| 109 | |
| 110 | /// [`COMP_GM_FILL_HITS`]. |
| 111 | pub |
| 112 | |
| 113 | |
| 114 | |
| 115 | /// [`STACK_FULL_DROPS`]. |
| 116 | pub |
| 117 | |
| 118 | |
| 119 | |
| 120 | /// [`TILE_REACH_CLIPS`]. |
| 121 | pub |
| 122 | |
| 123 | |
| 124 | |
| 125 | /// Everything [`find_mv_stack_with_sign_bias`] needs to fold temporal MV |
| 126 | /// candidates into a block's stack (spec 7.10.2.8, only reached when the |
| 127 | /// frame header's own `use_ref_frame_mvs` is set): the current frame's own |
| 128 | /// projected motion field, the distance (in `get_relative_dist` units) from |
| 129 | /// the current frame to *this query's* single reference frame's own |
| 130 | /// `OrderHint` (`cur_offset_0`, spec 7.9.3 — computed by the caller, since |
| 131 | /// this module has no reason to carry `order_hint_bits`/`OrderHints[]` |
| 132 | /// itself), and `allow_high_precision_mv` (`lower_mv_precision`, spec |
| 133 | /// 7.10.2.8). |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | /// One 4x4 `mi` unit's motion state, as the encode loop will have filled it |
| 146 | /// in by the time it asks for a block's MV stack. |
| 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 | /// The whole frame's `mi` grid, one [`MiInfo`] per 4x4 unit, in raster order. |
| 203 | /// A unit an encode pass hasn't visited yet (or that sits outside the tile) |
| 204 | /// reads as `None` and contributes nothing to any block's MV stack. |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | /// One entry of the reference MV stack: a candidate motion vector and the |
| 280 | /// total weight the neighbours that agreed on it contributed. |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | /// The result of [`find_mv_stack`]: the sorted candidate list, the two |
| 290 | /// predictors a `NEARESTMV`/`NEARMV` block reads from it, the predictor a |
| 291 | /// `NEWMV` residual is coded against, and the symbol contexts the block's |
| 292 | /// mode and DRL-index syntax elements are coded with. |
| 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 | /// Spec 7.10.2.8's threshold a candidate's weight is compared against to |
| 318 | /// pick its DRL context. |
| 319 | const REF_CAT_LEVEL: u32 = 640; |
| 320 | |
| 321 | /// The most candidates a stack keeps (spec `MAX_REF_MV_STACK_SIZE`). |
| 322 | const MAX_STACK_SIZE: usize = 8; |
| 323 | |
| 324 | /// The single-reference extension's own, *smaller* cap (spec's |
| 325 | /// `MAX_MV_REF_CANDIDATES`, `av1/common/enums.h`): that pass only ever tops |
| 326 | /// the stack up to two entries — enough to guarantee `NEARESTMV`/`NEARMV` |
| 327 | /// predictors — never all the way to [`MAX_STACK_SIZE`]. libaom gates its |
| 328 | /// two extension loops on `*refmv_count < MAX_MV_REF_CANDIDATES`, not the |
| 329 | /// 8-entry stack cap; this module's prior hand-written pass used |
| 330 | /// `MAX_STACK_SIZE` here, which is the wrong bound. |
| 331 | const MAX_MV_REF_CANDIDATES: usize = 2; |
| 332 | |
| 333 | /// The floor libaom's `scan_row_mbmi`/`scan_col_mbmi` weight starts at |
| 334 | /// before a same-or-wider candidate block can raise it (`uint16_t weight = |
| 335 | /// 2;`, mvref_common.c). |
| 336 | const ROW_COL_WEIGHT_FLOOR: u32 = 2; |
| 337 | |
| 338 | /// Fixed weight libaom's `scan_blk_mbmi` uses for both single-cell probes |
| 339 | /// (`2 * mi_size_wide[BLOCK_8X8]` = `2 * 2`): the diagonal corner and the |
| 340 | /// top-right, neither of which ever runs the row/col scans' real per-block |
| 341 | /// weight below. |
| 342 | const CORNER_WEIGHT: u32 = 4; |
| 343 | |
| 344 | /// Spec `MVREF_ROW_COLS`: the extended row/col scan runs at offsets `-3` and |
| 345 | /// `-5` (`idx = 2..=3`), one past the immediate scan's own `-1`. |
| 346 | const MVREF_ROW_COLS: usize = 3; |
| 347 | |
| 348 | /// Adds one candidate MV with `weight` to `candidates`, merging it into an |
| 349 | /// existing entry with the same MV rather than duplicating it (spec |
| 350 | /// `add_ref_mv_candidate`, 7.10.2.5). |
| 351 | |
| 352 | |
| 353 | |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | /// `cm->ref_frame_sign_bias[ref_frame]`, looked up from the frame header's |
| 368 | /// own `ref_frame_sign_bias` (spec 5.9.2's `get_relative_dist(ref_order_hint, |
| 369 | /// OrderHint) > 0` per active reference, already computed by |
| 370 | /// `ec_av1_syntax::frame::read_uncompressed_header` and indexed exactly like |
| 371 | /// `ref_frame_idx`: `table[ref_frame - LAST_FRAME]`). `find_mv_stack`'s |
| 372 | /// no-sign-bias callers (this crate's own encoder, which only ever writes |
| 373 | /// `LAST_FRAME`) pass an all-`false` table, matching this stub's old |
| 374 | /// always-`false` behaviour exactly. |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | /// One `bool` per `MV_REFERENCE_FRAME` past `INTRA_FRAME`/`NONE` |
| 387 | /// (`LAST_FRAME`..=`ALTREF_FRAME`), indexed `[ref_frame - LAST_FRAME]` -- |
| 388 | /// spec `ec_av1_syntax::frame::FrameHeader::ref_frame_sign_bias`'s own |
| 389 | /// shape, threaded straight through. |
| 390 | pub type SignBiasTable = ; |
| 391 | |
| 392 | /// The all-`false` table every no-sign-bias caller (this crate's own |
| 393 | /// encoder, and every test below) passes: correct as long as no candidate |
| 394 | /// or query ever names a backward reference, exactly this module's old |
| 395 | /// hardcoded `sign_bias` stub. |
| 396 | pub const NO_SIGN_BIAS: SignBiasTable = ; |
| 397 | |
| 398 | /// One derived global-motion `(row, col)` mv per reference frame |
| 399 | /// (`table[ref_frame - LAST_FRAME]`, same shape/indexing as |
| 400 | /// [`SignBiasTable`]), all computed at the *querying* block's own position |
| 401 | /// -- lane-gm: a neighbour donating a candidate under `MiInfo::is_global_mv0`/ |
| 402 | /// `MiInfo::is_global_mv1` contributes this table's entry for the matched |
| 403 | /// ref frame, not its own stored `mv`/`mv1` (mvref_common.c:88-92/116-117). |
| 404 | pub type GmMvTable = ; |
| 405 | |
| 406 | /// The all-zero table every IDENTITY/no-gm caller passes: exact whenever no |
| 407 | /// unit in the grid is ever `is_global_mv0`/`is_global_mv1` (the 14-pin |
| 408 | /// list's own streams), since a substitution that never triggers reads as |
| 409 | /// this reduction's old hardcoded-zero behaviour. |
| 410 | pub const NO_GM_MV: GmMvTable = ; |
| 411 | |
| 412 | /// `table[ref_frame - LAST_FRAME]`, [`sign_bias`]'s shape for a |
| 413 | /// [`GmMvTable`]. |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | /// libaom's `process_single_ref_mv_candidate` (mvref_common.c): folds one |
| 424 | /// already-coded neighbour into the stack as a low-weight (`2`, unboosted) |
| 425 | /// filler entry, used only by the single-reference extension pass below. |
| 426 | /// Unlike every scan above, this runs over *any* inter neighbour regardless |
| 427 | /// of which reference frame it coded — that is the whole point of the |
| 428 | /// pass (topping the stack up when the real scans found too few same-ref |
| 429 | /// candidates) — and dedupes by MV value against the *whole* stack so far, |
| 430 | /// silently dropping the candidate (no weight bump, unlike |
| 431 | /// [`add_candidate`]) when a match is already there. |
| 432 | /// |
| 433 | /// libaom's real signature loops `rf_idx` over the candidate's up to two |
| 434 | /// coded reference-frame slots (a compound-coded neighbour donates two |
| 435 | /// candidates, one per slot) -- now ported in full: a compound `candidate` |
| 436 | /// (`ref_frame1`/`mv1` both `Some`) donates a second entry from its second |
| 437 | /// slot too, each sign-flipped against its own reference frame independently. |
| 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 | /// The row scan (spec 7.10.2.2, libaom `scan_row_mbmi`): walks candidate |
| 472 | /// *blocks* — not individual 4x4 cells — along the row `row_offset` mi units |
| 473 | /// above the block's own row, in run-length steps sized by each candidate's |
| 474 | /// own block width. Handles both the immediate probe (`row_offset == -1`) |
| 475 | /// and the extended ones (`-3`, `-5`) libaom threads through the same |
| 476 | /// function: `max_row_offset` is the immediate scan's own reach (spec |
| 477 | /// 7.10.2.4's `find_valid_row_offset`, clamped to the tile's top edge), used |
| 478 | /// only to size the weight boost below, not to gate whether this call runs |
| 479 | /// at all (the caller does that via `processed_rows`/the tile edge). |
| 480 | /// |
| 481 | /// Each matching candidate's vote is weighted `len * weight`: `len` is how |
| 482 | /// many mi columns the run covers (the candidate's own width, floored to |
| 483 | /// the query block's `bw4` and — at the wide/extended-scan geometries |
| 484 | /// libaom's own `use_step_16`/`abs(row_offset) > 1` branches cover — raised |
| 485 | /// to a block-size floor); `weight` starts at 2 and, only when the candidate |
| 486 | /// is at least as wide as the query block (`bw4 <= n4`), rises to how much |
| 487 | /// of `max_row_offset`'s remaining reach the candidate's own height can |
| 488 | /// still cover. That `bw4 <= n4` condition is why this module's old flat |
| 489 | /// `IMMEDIATE_WEIGHT = 2` was exact for every real caller before decode.rs |
| 490 | /// existed: `tile.rs`'s own encoder only ever asks with `bw4 == 8` against |
| 491 | /// neighbours it also always wrote at `size == 8`, and every synthetic test |
| 492 | /// neighbour here uses `size: 1` (which the `n4 < weight`-floor condition |
| 493 | /// keeps at the `2` floor regardless of `bw4`) — this real formula only |
| 494 | /// diverges from that flat weight when a *bigger* candidate meets a |
| 495 | /// *smaller* query block, which only decode.rs's variable partition sizes |
| 496 | /// ever produce. |
| 497 | /// |
| 498 | /// Threads `processed_rows` (`*mut` in libaom, `&mut` here) across every row |
| 499 | /// call — immediate, then the two extended offsets — the way libaom's |
| 500 | /// single stack `int` does: only the `bw4 <= n4` branch above updates it, |
| 501 | /// same as libaom only updating `*processed_rows` there. |
| 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 | /// libaom's `add_ref_mv_candidate` (mvref_common.c) for a single-reference |
| 553 | /// query: a compound-coded neighbour still votes when *either* of its two |
| 554 | /// coded reference frames matches `ref_frame`, contributing that side's own |
| 555 | /// MV -- checked first slot then second, matching libaom's `for (ref = 0; |
| 556 | /// ref < 1 + is_compound; ++ref)` loop order. The row/col/corner scans below |
| 557 | /// used to check `info.ref_frame == ref_frame` alone, silently dropping a |
| 558 | /// compound neighbour's vote whenever the match sat in its *second* slot |
| 559 | /// (the class this crate's own compound-stack scan already had to close for |
| 560 | /// [`find_mv_stack_compound`] -- see the module doc). |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | /// The col scan (spec 7.10.2.3, libaom `scan_col_mbmi`): `scan_row`, |
| 583 | /// transposed. |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | /// libaom `has_top_right` (mvref_common.c:264): whether the unit diagonally |
| 635 | /// above-right of this block has been decoded *by the superblock's own |
| 636 | /// recursion order*. The mask is `sb_size`-relative, so at a 128x128 |
| 637 | /// superblock the `while` loop runs one level further than at 64x64 and |
| 638 | /// strips the top-right neighbour off blocks that DO sit in already-decoded |
| 639 | /// memory -- an availability rule a plain "is the grid cell populated" probe |
| 640 | /// (what this module did before lane-sb128 r2) cannot see. It cost frame 6 of |
| 641 | /// the 128 inter gate 380 wrong luma bytes with the entropy stream in sync. |
| 642 | /// |
| 643 | /// corner-cut: libaom's three shape refinements (`is_last_vertical_rect`, |
| 644 | /// `is_first_horizontal_rect`, the `PARTITION_VERT_A` bottom-left square) are |
| 645 | /// not ported -- the ceiling is rectangular and AB-partitioned INTER leaves, |
| 646 | /// which this decoder refuses by name today; port them with the rect inter |
| 647 | /// leaf. |
| 648 | pub |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | /// The single top-right probe this reduction keeps of spec 7.10.2.4's extra |
| 672 | /// scan positions, at the unit diagonally above-right of the block. Its |
| 673 | /// vote is folded into the row scan's candidates (it sits on the same row |
| 674 | /// as the block's neighbours above), which is what makes the row and column |
| 675 | /// scans asymmetric under transposing a grid — spec has no matching |
| 676 | /// bottom-left probe. |
| 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 | /// The diagonal top-left corner probe (libaom `scan_blk_mbmi` at |
| 702 | /// `row_offset = col_offset = -1`, mvref_common.c's "second outer area", |
| 703 | /// called *after* `nearest_match` is already captured): the single unit |
| 704 | /// diagonally above-left of the block. Its match folds into the row bucket |
| 705 | /// too (see module doc) but must never move `nearest_match` itself or the |
| 706 | /// real `newmv_count` — callers pass a throwaway counter for the latter. |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | |
| 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | /// `MV_BORDER` (spec 7.10.2.14): 16 pixels of slack in 1/8-pel units, added |
| 730 | /// on top of the block's own span before a candidate is clamped to the |
| 731 | /// frame. |
| 732 | const MV_BORDER: i32 = 16 << 3; |
| 733 | |
| 734 | /// Clamps one candidate MV to the range spec 7.10.2.14 (libaom's |
| 735 | /// `clamp_mv_ref`) allows for a `bw4`-by-`bh4` block at `(mi_row, mi_col)` in |
| 736 | /// a `mi_cols`-by-`mi_rows` frame: the distance from the block's own edge to |
| 737 | /// the matching frame edge, plus the block's own span and [`MV_BORDER`] of |
| 738 | /// slack, in every direction. |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | /// Builds the reference MV stack for the `bw4`-by-`bh4` (in 4x4 units) |
| 764 | /// block at `(mi_row, mi_col)`, predicting against `ref_frame`, in a frame |
| 765 | /// that is `mi_cols`-by-`mi_rows` 4x4 units (used only to clamp the |
| 766 | /// predictors to the frame, spec 7.10.2.14). |
| 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 | /// [`find_mv_stack`], with the frame header's real `ref_frame_sign_bias` |
| 793 | /// (lane-av1refs: `BWDREF_FRAME`/`ALTREF2_FRAME`/`ALTREF_FRAME` are forward |
| 794 | /// in display order, so the single-reference extension pass's borrowed-MV |
| 795 | /// flip is no longer always inert once one of them is live next to a |
| 796 | /// backward-biased neighbour). |
| 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 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | |
| 962 | |
| 963 | |
| 964 | |
| 965 | |
| 966 | |
| 967 | |
| 968 | |
| 969 | |
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 | |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 | |
| 1017 | |
| 1018 | |
| 1019 | |
| 1020 | |
| 1021 | |
| 1022 | |
| 1023 | |
| 1024 | |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 | |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | |
| 1052 | |
| 1053 | |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | |
| 1070 | |
| 1071 | |
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | |
| 1089 | |
| 1090 | |
| 1091 | |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | |
| 1120 | |
| 1121 | |
| 1122 | |
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | |
| 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 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | |
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | |
| 1177 | |
| 1178 | |
| 1179 | |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | |
| 1184 | |
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | |
| 1192 | |
| 1193 | |
| 1194 | |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | |
| 1199 | |
| 1200 | |
| 1201 | |
| 1202 | |
| 1203 | |
| 1204 | |
| 1205 | |
| 1206 | |
| 1207 | |
| 1208 | |
| 1209 | |
| 1210 | |
| 1211 | |
| 1212 | |
| 1213 | |
| 1214 | |
| 1215 | |
| 1216 | |
| 1217 | |
| 1218 | |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | |
| 1226 | |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 | /// One neighbour's vote for a compound-reference (spec `RefFrame[0]` *and* |
| 1241 | /// `RefFrame[1]` both active) candidate: two full motion vectors and the |
| 1242 | /// combined weight — spec 7.10.2's compound half of `add_ref_mv_candidate` |
| 1243 | /// (libaom `mvref_common.c`, the `is_compound` branch of `scan_row_mbmi`/ |
| 1244 | /// `scan_col_mbmi`/`scan_blk_mbmi`). |
| 1245 | |
| 1246 | |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | /// [`find_mv_stack_compound`]'s result — [`MvStack`]'s shape, doubled for |
| 1256 | /// the reference pair. |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | |
| 1267 | |
| 1268 | |
| 1269 | |
| 1270 | |
| 1271 | |
| 1272 | |
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | /// [`add_candidate`], doubled: dedupes on the whole `(mv0, mv1)` pair. |
| 1281 | |
| 1282 | |
| 1283 | |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | |
| 1299 | /// The compound row scan (spec 7.10.2.2's compound branch, libaom |
| 1300 | /// `scan_row_mbmi`'s `is_compound` path): [`scan_row`]'s weight/run-length |
| 1301 | /// math unchanged, but a candidate only votes when *both* its `ref_frame` |
| 1302 | /// and `ref_frame1` equal the query's pair exactly, in that order — a |
| 1303 | /// compound pair is always encoded forward-then-backward |
| 1304 | /// (`RefFrame[0]`/`RefFrame[1]`), so unlike [`process_single_ref_mv_candidate`]'s |
| 1305 | /// extension pass, no sign-bias flip ever applies to an exact-pair scan |
| 1306 | /// match (libaom's own `scan_row_mbmi` compound branch doesn't flip either). |
| 1307 | |
| 1308 | |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | |
| 1315 | |
| 1316 | |
| 1317 | |
| 1318 | |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | |
| 1332 | |
| 1333 | |
| 1334 | |
| 1335 | |
| 1336 | |
| 1337 | |
| 1338 | |
| 1339 | |
| 1340 | |
| 1341 | |
| 1342 | |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | |
| 1355 | |
| 1356 | |
| 1357 | |
| 1358 | |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | /// The compound col scan (spec 7.10.2.3's compound branch): [`scan_row_compound`], |
| 1363 | /// transposed — mirrors [`scan_col`]/[`scan_row`]'s own relationship. |
| 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 | /// The compound top-right probe ([`scan_top_right`]'s pair-matched twin). |
| 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 | /// The compound diagonal corner probe ([`scan_corner`]'s pair-matched twin). |
| 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 | /// Per-side unresolved-MV accumulator [`process_compound_ref_mv_candidate`] |
| 1483 | /// fills across every candidate the compound extension pass walks: up to two |
| 1484 | /// motion vectors that matched `ref_frame.0`/`.1` exactly (`ref_id`), and up |
| 1485 | /// to two more borrowed from a differently-referenced but still-inter |
| 1486 | /// neighbour under the sign-bias flip [`process_single_ref_mv_candidate`] |
| 1487 | /// also applies (`ref_diff`). Ported from libaom's `setup_ref_mv_list` |
| 1488 | /// (`mvref_common.c`, `process_compound_ref_mv_candidate` ~line 380-430 plus |
| 1489 | /// the combine step at ~696-762): the extension walk fills this once across |
| 1490 | /// the whole row-then-col scan, and [`combine_compound_candidates`] below |
| 1491 | /// zips the two independently-filled sides back into full pair candidates. |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | /// libaom's `process_compound_ref_mv_candidate`: folds one already-coded |
| 1499 | /// neighbour's up to two reference slots into `lists`, split by which side |
| 1500 | /// of `ref_frame` (the query block's own compound pair) each slot's own |
| 1501 | /// reference frame matches — an exact match goes to that side's `ref_id` |
| 1502 | /// list, anything else (still inter, wrong reference) goes to `ref_diff` |
| 1503 | /// under the usual sign-bias flip. |
| 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 | /// libaom's combine step (`setup_ref_mv_list`, `mvref_common.c` ~696-720): |
| 1542 | /// zips each side's `ref_id` (exact matches) then `ref_diff` (borrowed, |
| 1543 | /// sign-flipped) entries, position-wise and independently per side, into up |
| 1544 | /// to two full `(mv0, mv1)` pair candidates. r1 (lane-mvtwin): slots past |
| 1545 | /// both lists are filled with THAT SIDE's own global motion vector |
| 1546 | /// (`gm_mv_candidates[idx]`, mvref_common.c:718-719), never `(0, 0)` — the |
| 1547 | /// exact gap the single-reference twin closed in r6 for its own |
| 1548 | /// `mv_ref_list` tail, still open on this side. Invisible while every live |
| 1549 | /// reference's global motion is IDENTITY (an unclamped gm mv of exactly |
| 1550 | /// `(0,0)`), wrong the moment a compound pair names a ROTZOOM/AFFINE |
| 1551 | /// reference and the scans leave the stack short. |
| 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 | /// [`find_mv_stack_with_sign_bias`]'s compound-reference twin (spec |
| 1578 | /// 7.10.2's `is_compound` path throughout): builds the reference MV stack |
| 1579 | /// for a block predicted against *two* simultaneously-active reference |
| 1580 | /// frames (`ref_frame.0`, `ref_frame.1`), keeping every existing |
| 1581 | /// single-reference caller of [`find_mv_stack`]/[`find_mv_stack_with_sign_bias`] |
| 1582 | /// untouched — this is a new, parallel entry point, not an extension of the |
| 1583 | /// single-ref one. Same reduction scope as the single-ref module doc |
| 1584 | /// (single tile, square blocks, `IDENTITY` global motion only); the |
| 1585 | /// mode-context switch below reuses the identical `(nearest_match, |
| 1586 | /// ref_match_count)` derivation the single-ref path uses, since libaom's own |
| 1587 | /// switch statement (`mvref_common.c` ~619-643) is ref-count-agnostic — it |
| 1588 | /// only ever reads those two counts, regardless of which `MODE_CTX_REF_FRAMES` |
| 1589 | /// slot `mode_context` it's indexing. |
| 1590 | /// |
| 1591 | /// The compound extension combine step (`setup_ref_mv_list`, ~line 700-754) |
| 1592 | /// and the temporal `add_tpl_ref_mv` fold-in (~line 341-433) are both exact |
| 1593 | /// ports of libaom's real behaviour as of r5 — see the inline comments at |
| 1594 | /// each site. |
| 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 | |
| 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 | /// [`find_mv_stack_compound`]'s temporal-MV inputs — [`TplArgs`], doubled: |
| 2001 | /// one `cur_offset` per side of the pair (`get_relative_dist(OrderHint, |
| 2002 | /// OrderHints[ref_frame.N - LAST_FRAME])`, spec 7.9.3), since a compound |
| 2003 | /// query projects the same stored field twice, once per reference. |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | |
| 2009 | |
| 2010 | |
| 2011 | |
| 2012 | |
| 2013 | |
| 2014 | |
| 2015 | /// The single-reference context shared by the `single_ref_p1`/`p3`/`p4` |
| 2016 | /// binary decisions this crate's LAST-only reference chain codes (spec |
| 2017 | /// 5.11.25; libaom's `av1_get_pred_context_single_ref_p1/p3/p4`, |
| 2018 | /// `pred_common.c`). Each of those three functions compares a forward-ref |
| 2019 | /// neighbour count against a same-direction count that is always zero in a |
| 2020 | /// LAST-only world (no LAST2/LAST3/GOLDEN/backward candidate ever exists |
| 2021 | /// here), which collapses all three of libaom's formulas to the same |
| 2022 | /// two-valued test: "is there an inter neighbour at all". `has_inter` |
| 2023 | /// gathers that over the block's whole span, the way spec 5.11.39 reads any |
| 2024 | /// neighbour-derived context. |
| 2025 | pub |
| 2026 | |
| 2027 | |
| 2028 | |
| 2029 | /// `MV_REFERENCE_FRAME` values a single (non-compound) reference can name |
| 2030 | /// (spec 6.10.24's `ref_frame` alphabet; libaom `av1/common/enums.h`). |
| 2031 | pub const LAST_FRAME: i8 = 1; |
| 2032 | pub const LAST2_FRAME: i8 = 2; |
| 2033 | pub const LAST3_FRAME: i8 = 3; |
| 2034 | pub const GOLDEN_FRAME: i8 = 4; |
| 2035 | pub const BWDREF_FRAME: i8 = 5; |
| 2036 | pub const ALTREF2_FRAME: i8 = 6; |
| 2037 | pub const ALTREF_FRAME: i8 = 7; |
| 2038 | |
| 2039 | /// libaom `pred_common.c`'s shared shape behind every `single_ref_p*`/ |
| 2040 | /// `comp_ref*` context function once compound prediction (a second ref per |
| 2041 | /// neighbour) is out of scope: count how many of the immediate above/left |
| 2042 | /// neighbours (spec 5.11.25's own single-neighbour read, not a whole-span |
| 2043 | /// scan -- `av1_collect_neighbors_ref_counts`, `MACROBLOCKD::above_mbmi`/ |
| 2044 | /// `left_mbmi`) coded a reference in `a_set` vs. `b_set`, and compare: fewer |
| 2045 | /// `a`s than `b`s is context 0, equal is 1 (also every unavailable-neighbour |
| 2046 | /// case, both counts zero), more `a`s is 2. |
| 2047 | // libaom `av1_collect_neighbors_ref_counts` (mvref_common.h): a neighbour |
| 2048 | // contributes ONE count per reference frame it actually names, which for a |
| 2049 | // compound neighbour is BOTH `ref_frame[0]` and `ref_frame[1]` -- not just |
| 2050 | // its first. Every one of these vote functions takes each side's pair |
| 2051 | // (`ref0` always, `ref1` only for a compound neighbour) so a compound |
| 2052 | // neighbour is not undercounted the way a single scalar per side would. |
| 2053 | |
| 2054 | |
| 2055 | |
| 2056 | |
| 2057 | |
| 2058 | |
| 2059 | |
| 2060 | |
| 2061 | |
| 2062 | |
| 2063 | |
| 2064 | |
| 2065 | |
| 2066 | |
| 2067 | |
| 2068 | |
| 2069 | |
| 2070 | |
| 2071 | |
| 2072 | const FORWARD_REFS: = ; |
| 2073 | const BACKWARD_REFS: = ; |
| 2074 | |
| 2075 | /// `av1_get_pred_context_single_ref_p1`: forward vs. backward reference. |
| 2076 | pub |
| 2077 | |
| 2078 | |
| 2079 | |
| 2080 | |
| 2081 | |
| 2082 | |
| 2083 | |
| 2084 | |
| 2085 | /// `av1_get_pred_context_single_ref_p2` |
| 2086 | /// (`get_pred_context_brfarf2_or_arf`): `BWDREF`/`ALTREF2` vs. `ALTREF`. |
| 2087 | pub |
| 2088 | |
| 2089 | |
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | |
| 2094 | |
| 2095 | |
| 2096 | |
| 2097 | |
| 2098 | |
| 2099 | |
| 2100 | |
| 2101 | |
| 2102 | |
| 2103 | /// `av1_get_pred_context_single_ref_p3` |
| 2104 | /// (`get_pred_context_ll2_or_l3gld`): `LAST`/`LAST2` vs. `LAST3`/`GOLDEN`. |
| 2105 | pub |
| 2106 | |
| 2107 | |
| 2108 | |
| 2109 | |
| 2110 | |
| 2111 | |
| 2112 | |
| 2113 | |
| 2114 | |
| 2115 | |
| 2116 | |
| 2117 | |
| 2118 | |
| 2119 | |
| 2120 | |
| 2121 | /// `av1_get_pred_context_single_ref_p4` |
| 2122 | /// (`get_pred_context_last_or_last2`): `LAST` vs. `LAST2`. |
| 2123 | pub |
| 2124 | |
| 2125 | |
| 2126 | |
| 2127 | |
| 2128 | |
| 2129 | |
| 2130 | |
| 2131 | |
| 2132 | /// `av1_get_pred_context_single_ref_p5` |
| 2133 | /// (`get_pred_context_last3_or_gld`): `LAST3` vs. `GOLDEN`. |
| 2134 | pub |
| 2135 | |
| 2136 | |
| 2137 | |
| 2138 | |
| 2139 | |
| 2140 | |
| 2141 | |
| 2142 | |
| 2143 | /// `av1_get_pred_context_single_ref_p6` |
| 2144 | /// (`get_pred_context_brf_or_arf2`): `BWDREF` vs. `ALTREF2`. |
| 2145 | pub |
| 2146 | |
| 2147 | |
| 2148 | |
| 2149 | |
| 2150 | |
| 2151 | |
| 2152 | |
| 2153 | |
| 2154 | /// `av1_get_pred_context_uni_comp_ref_p1`: `LAST2` vs. `LAST3`/`GOLDEN`, |
| 2155 | /// conditioned on a unidirectional pair known to be one of the three |
| 2156 | /// `LAST`-anchored ones (lane-av1comp). |
| 2157 | pub |
| 2158 | |
| 2159 | |
| 2160 | |
| 2161 | |
| 2162 | |
| 2163 | |
| 2164 | |
| 2165 | |
| 2166 | |
| 2167 | |
| 2168 | |
| 2169 | |
| 2170 | |
| 2171 | |
| 2172 | |
| 2173 | /// One neighbouring block's reference-frame shape, as |
| 2174 | /// [`reference_mode_ctx`]/[`comp_reference_type_ctx`] need it: `None` for an |
| 2175 | /// out-of-frame neighbour, `Some(ref0, None)` for an intra or single-ref |
| 2176 | /// inter block, `Some(ref0, Some(ref1))` for a compound one. `uni` is |
| 2177 | /// `ref1`'s meaning only when compound: whether the pair libaom's |
| 2178 | /// `has_uni_comp_refs` would call unidirectional (both refs on the same |
| 2179 | /// side of the current frame). |
| 2180 | |
| 2181 | pub |
| 2182 | |
| 2183 | |
| 2184 | |
| 2185 | |
| 2186 | |
| 2187 | |
| 2188 | |
| 2189 | |
| 2190 | |
| 2191 | |
| 2192 | /// `av1_get_reference_mode_context` (spec 5.11.25's `comp_mode` context, |
| 2193 | /// libaom `pred_common.c`): 5 contexts from how many of the above/left |
| 2194 | /// neighbours are themselves compound-predicted, and (when neither/one is) |
| 2195 | /// whether their single reference is a backward one. |
| 2196 | pub |
| 2197 | |
| 2198 | |
| 2199 | |
| 2200 | |
| 2201 | |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | |
| 2206 | |
| 2207 | |
| 2208 | |
| 2209 | |
| 2210 | |
| 2211 | |
| 2212 | |
| 2213 | |
| 2214 | |
| 2215 | /// `av1_get_comp_reference_type_context` (spec 5.11.25's |
| 2216 | /// `comp_reference_type` context, libaom `pred_common.c`): 5 contexts from |
| 2217 | /// whether the above/left neighbours are intra, single-ref, unidirectional |
| 2218 | /// compound, or bidirectional compound. |
| 2219 | pub |
| 2220 | |
| 2221 | |
| 2222 | |
| 2223 | |
| 2224 | |
| 2225 | |
| 2226 | |
| 2227 | |
| 2228 | |
| 2229 | |
| 2230 | |
| 2231 | |
| 2232 | |
| 2233 | |
| 2234 | |
| 2235 | |
| 2236 | |
| 2237 | |
| 2238 | |
| 2239 | |
| 2240 | |
| 2241 | |
| 2242 | |
| 2243 | |
| 2244 | |
| 2245 | |
| 2246 | |
| 2247 | |
| 2248 | |
| 2249 | |
| 2250 | |
| 2251 | |
| 2252 | |
| 2253 | |
| 2254 | |
| 2255 | |
| 2256 | |
| 2257 | |
| 2258 | |
| 2259 | |
| 2260 | |
| 2261 | |
| 2262 | |
| 2263 | |
| 2264 | |
| 2265 | |
| 2266 | |
| 2267 | |
| 2268 | |
| 2269 | |
| 2270 | |
| 2271 | |
| 2272 | |
| 2273 | |
| 2274 | |
| 2275 | |
| 2276 | |
| 2277 | |
| 2278 | |
| 2279 | |
| 2280 | |
| 2281 | |
| 2282 | |
| 2283 | |
| 2284 | |
| 2285 | |
| 2286 | |
| 2287 | |
| 2288 | |
| 2289 | |
| 2290 | |
| 2291 | |
| 2292 | |
| 2293 | |
| 2294 | |
| 2295 | |
| 2296 | |
| 2297 | |
| 2298 | |
| 2299 | |
| 2300 | |
| 2301 | |
| 2302 | |
| 2303 | |
| 2304 | |
| 2305 | |
| 2306 | |
| 2307 | |
| 2308 | |
| 2309 | |
| 2310 | |
| 2311 | |
| 2312 | |
| 2313 | |
| 2314 | |
| 2315 | |
| 2316 | |
| 2317 | |
| 2318 | |
| 2319 | |
| 2320 | |
| 2321 | |
| 2322 | |
| 2323 | |
| 2324 | |
| 2325 | |
| 2326 | |
| 2327 | |
| 2328 | |
| 2329 | |
| 2330 | |
| 2331 | |
| 2332 | |
| 2333 | |
| 2334 | |
| 2335 | |
| 2336 | |
| 2337 | |
| 2338 | |
| 2339 | |
| 2340 | |
| 2341 | |
| 2342 | |
| 2343 | |
| 2344 | |
| 2345 | |
| 2346 | |
| 2347 | |
| 2348 | |
| 2349 | |
| 2350 | |
| 2351 | |
| 2352 | |
| 2353 | |
| 2354 | |
| 2355 | |
| 2356 | |
| 2357 | |
| 2358 | |
| 2359 | |
| 2360 | |
| 2361 | |
| 2362 | |
| 2363 | |
| 2364 | |
| 2365 | |
| 2366 | |
| 2367 | |
| 2368 | |
| 2369 | |
| 2370 | |
| 2371 | |
| 2372 | |
| 2373 | |
| 2374 | |
| 2375 | |
| 2376 | |
| 2377 | |
| 2378 | |
| 2379 | |
| 2380 | |
| 2381 | |
| 2382 | |
| 2383 | |
| 2384 | |
| 2385 | |
| 2386 | |
| 2387 | |
| 2388 | |
| 2389 | |
| 2390 | |
| 2391 | |
| 2392 | |
| 2393 | |
| 2394 | |
| 2395 | |
| 2396 | |
| 2397 | |
| 2398 | |
| 2399 | |
| 2400 | |
| 2401 | |
| 2402 | |
| 2403 | |
| 2404 | |
| 2405 | |
| 2406 | |
| 2407 | |
| 2408 | |
| 2409 | |
| 2410 | |
| 2411 | |
| 2412 | |
| 2413 | |
| 2414 | |
| 2415 | |
| 2416 | |
| 2417 | |
| 2418 | |
| 2419 | |
| 2420 | |
| 2421 | |
| 2422 | |
| 2423 | |
| 2424 | |
| 2425 | |
| 2426 | |
| 2427 | |
| 2428 | |
| 2429 | |
| 2430 | |
| 2431 | |
| 2432 | |
| 2433 | |
| 2434 | |
| 2435 | |
| 2436 | |
| 2437 | |
| 2438 | |
| 2439 | |
| 2440 | |
| 2441 | |
| 2442 | |
| 2443 | |
| 2444 | |
| 2445 | |
| 2446 | |
| 2447 | |
| 2448 | |
| 2449 | |
| 2450 | |
| 2451 | |
| 2452 | |
| 2453 | |
| 2454 | |
| 2455 | |
| 2456 | |
| 2457 | |
| 2458 | |
| 2459 | |
| 2460 | |
| 2461 | |
| 2462 | |
| 2463 | |
| 2464 | |
| 2465 | |
| 2466 | |
| 2467 | |
| 2468 | |
| 2469 | |
| 2470 | |
| 2471 | |
| 2472 | |
| 2473 | |
| 2474 | |
| 2475 | |
| 2476 | |
| 2477 | |
| 2478 | |
| 2479 | |
| 2480 | |
| 2481 | |
| 2482 | |
| 2483 | |
| 2484 | |
| 2485 | |
| 2486 | |
| 2487 | |
| 2488 | |
| 2489 | |
| 2490 | |
| 2491 | |
| 2492 | |
| 2493 | |
| 2494 | |
| 2495 | |
| 2496 | |
| 2497 | |
| 2498 | |
| 2499 | |
| 2500 | |
| 2501 | |
| 2502 | |
| 2503 | |
| 2504 | |
| 2505 | |
| 2506 | |
| 2507 | |
| 2508 | |
| 2509 | |
| 2510 | |
| 2511 | |
| 2512 | |
| 2513 | |
| 2514 | |
| 2515 | |
| 2516 | |
| 2517 | |
| 2518 | |
| 2519 | |
| 2520 | |
| 2521 | |
| 2522 | |
| 2523 | |
| 2524 | |
| 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 | |
| 2613 | |
| 2614 | |
| 2615 | |
| 2616 | |
| 2617 | |
| 2618 | |
| 2619 | |
| 2620 | |
| 2621 | |
| 2622 | |
| 2623 | |
| 2624 | |
| 2625 | |
| 2626 | |
| 2627 | |
| 2628 | |
| 2629 | |
| 2630 | |
| 2631 | |
| 2632 | |
| 2633 | |
| 2634 | |
| 2635 | |
| 2636 | |
| 2637 | |
| 2638 | |
| 2639 | |
| 2640 | |
| 2641 | |
| 2642 | |
| 2643 | |
| 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 | |
| 2758 | |
| 2759 | |
| 2760 | |
| 2761 | |
| 2762 | |
| 2763 | |
| 2764 | |
| 2765 | |
| 2766 | |
| 2767 | |
| 2768 | |
| 2769 | |
| 2770 | |
| 2771 | |
| 2772 | |
| 2773 | |
| 2774 | |
| 2775 | |
| 2776 | |
| 2777 | |
| 2778 | |
| 2779 | |
| 2780 | |
| 2781 | |
| 2782 | |
| 2783 | |
| 2784 | |
| 2785 | |
| 2786 | |
| 2787 | |
| 2788 | |
| 2789 | |
| 2790 | |
| 2791 | |
| 2792 | |
| 2793 | |
| 2794 | |
| 2795 | |
| 2796 | |
| 2797 | |
| 2798 | |
| 2799 | |
| 2800 | |
| 2801 | |
| 2802 | |
| 2803 | |
| 2804 | |
| 2805 | |
| 2806 | |
| 2807 | |
| 2808 | |
| 2809 | |
| 2810 | |
| 2811 | |
| 2812 | |
| 2813 | |
| 2814 | |
| 2815 | |
| 2816 | |
| 2817 | |
| 2818 | |
| 2819 | |
| 2820 | |
| 2821 | |
| 2822 | |
| 2823 | |
| 2824 | |
| 2825 | |
| 2826 | |
| 2827 | |
| 2828 | |
| 2829 | |
| 2830 | |
| 2831 | |
| 2832 | |
| 2833 | |
| 2834 | |
| 2835 | |
| 2836 | |
| 2837 | |
| 2838 | |
| 2839 | |
| 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 | |
| 2985 | |
| 2986 | |
| 2987 | |
| 2988 | |
| 2989 | |
| 2990 | |
| 2991 | |
| 2992 | |
| 2993 | |
| 2994 | |
| 2995 | |
| 2996 | |
| 2997 | |
| 2998 | |
| 2999 | |
| 3000 | |
| 3001 | |
| 3002 | |
| 3003 | |
| 3004 | |
| 3005 | |
| 3006 | |
| 3007 | |
| 3008 | |
| 3009 | |
| 3010 | |
| 3011 | |
| 3012 | |
| 3013 | |
| 3014 | |
| 3015 | |
| 3016 | |
| 3017 | |
| 3018 | |
| 3019 | |
| 3020 | |
| 3021 | |
| 3022 | |
| 3023 | |
| 3024 | |
| 3025 | |
| 3026 | |
| 3027 | |
| 3028 | |
| 3029 | |
| 3030 | |
| 3031 | |
| 3032 | |
| 3033 | |
| 3034 | |
| 3035 | |
| 3036 | |
| 3037 | |
| 3038 | |
| 3039 | |
| 3040 | |
| 3041 | |
| 3042 | |
| 3043 | |
| 3044 | |
| 3045 | |
| 3046 | |
| 3047 | |
| 3048 | |
| 3049 | |
| 3050 | |
| 3051 | |
| 3052 | |
| 3053 | |
| 3054 | |
| 3055 | |
| 3056 | |
| 3057 | |
| 3058 | |
| 3059 | |
| 3060 | |
| 3061 | |
| 3062 | |
| 3063 | |
| 3064 | |
| 3065 | |
| 3066 | |
| 3067 | |
| 3068 | |
| 3069 | |
| 3070 | |
| 3071 | |
| 3072 | |
| 3073 | |
| 3074 | |
| 3075 | |
| 3076 | |
| 3077 | |
| 3078 | |
| 3079 | |
| 3080 | |
| 3081 | |
| 3082 | |
| 3083 | |
| 3084 | |
| 3085 | |
| 3086 | |
| 3087 | |
| 3088 | |
| 3089 | |
| 3090 | |
| 3091 | |
| 3092 | |
| 3093 | |
| 3094 | |
| 3095 |