diff options
author | Sebastian Ramacher <sramacher@debian.org> | 2024-12-29 12:50:37 +0000 |
---|---|---|
committer | Sebastian Ramacher <sramacher@debian.org> | 2024-12-29 12:50:37 +0000 |
commit | 873c687c09e0a1a78a8f3601d31330ad1897e484 (patch) | |
tree | ff2fa2e2d27b55c002a6d46d50aab2c66e0bf21a /src/tile/tile.cc | |
parent | 395b1f6877fbc2666383f3428f17400c35aa52a4 (diff) | |
parent | b9ae809f200982119d16ec9613f3db95eca923b9 (diff) | |
download | libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.tar.gz libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.tar.bz2 libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.zip |
Merge branch 'master' into 'scrub-obsolete'
# Conflicts:
# debian/changelog
Diffstat (limited to 'src/tile/tile.cc')
-rw-r--r-- | src/tile/tile.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tile/tile.cc b/src/tile/tile.cc index 5070bb6..10ebbf2 100644 --- a/src/tile/tile.cc +++ b/src/tile/tile.cc @@ -2605,17 +2605,17 @@ void Tile::StoreMotionFieldMvsIntoCurrentFrame(const Block& block) { ReferenceInfo* reference_info = current_frame_.reference_info(); for (int i = 1; i >= 0; --i) { const ReferenceFrameType reference_frame_to_store = bp.reference_frame[i]; + if (reference_frame_to_store <= kReferenceFrameIntra) continue; // Must make a local copy so that StoreMotionFieldMvs() knows there is no // overlap between load and store. const MotionVector mv_to_store = bp.mv.mv[i]; const int mv_row = std::abs(mv_to_store.mv[0]); const int mv_column = std::abs(mv_to_store.mv[1]); - if (reference_frame_to_store > kReferenceFrameIntra && - // kRefMvsLimit equals 0x07FF, so we can first bitwise OR the two - // absolute values and then compare with kRefMvsLimit to save a branch. - // The next line is equivalent to: - // mv_row <= kRefMvsLimit && mv_column <= kRefMvsLimit - (mv_row | mv_column) <= kRefMvsLimit && + // kRefMvsLimit equals 0x07FF, so we can first bitwise OR the two absolute + // values and then compare with kRefMvsLimit to save a branch. + // The next line is equivalent to: + // mv_row <= kRefMvsLimit && mv_column <= kRefMvsLimit + if ((mv_row | mv_column) <= kRefMvsLimit && reference_info->relative_distance_from[reference_frame_to_store] < 0) { const int row_start8x8 = DivideBy2(row_start4x4); const int row_limit8x8 = DivideBy2(row_limit4x4); |