diff options
author | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:20 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:20 -0500 |
commit | 513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44 (patch) | |
tree | 249280ac94eb2b871de89cd1b166fff4ee00ab09 /src/warp_prediction.cc | |
parent | 3c21ceac2f6a5adfab07d3d458880561543d0a31 (diff) | |
parent | 320ef65362608ee1148c299d8d5d7618af34e470 (diff) | |
download | libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.tar.gz libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.tar.bz2 libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.zip |
Update upstream source from tag 'upstream/0.17.0'
Update to upstream version '0.17.0'
with Debian dir 5b612b6a2d67788b0c85bac59e50edc1545bfd7e
Diffstat (limited to 'src/warp_prediction.cc')
-rw-r--r-- | src/warp_prediction.cc | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/warp_prediction.cc b/src/warp_prediction.cc index dd06317..69b40e8 100644 --- a/src/warp_prediction.cc +++ b/src/warp_prediction.cc @@ -153,10 +153,8 @@ bool WarpEstimation(const int num_samples, const int block_width4x4, const int mid_x = MultiplyBy4(column4x4) + MultiplyBy2(block_width4x4) - 1; const int subpixel_mid_y = MultiplyBy8(mid_y); const int subpixel_mid_x = MultiplyBy8(mid_x); - const int reference_subpixel_mid_y = - subpixel_mid_y + mv.mv[MotionVector::kRow]; - const int reference_subpixel_mid_x = - subpixel_mid_x + mv.mv[MotionVector::kColumn]; + const int reference_subpixel_mid_y = subpixel_mid_y + mv.mv[0]; + const int reference_subpixel_mid_x = subpixel_mid_x + mv.mv[1]; for (int i = 0; i < num_samples; ++i) { // candidates[][0] and candidates[][1] are the row/column coordinates of the @@ -223,14 +221,12 @@ bool WarpEstimation(const int num_samples, const int block_width4x4, params[4] = NonDiagonalClamp(params[4]); params[5] = DiagonalClamp(params[5]); - const int vx = - mv.mv[MotionVector::kColumn] * (1 << (kWarpedModelPrecisionBits - 3)) - - (mid_x * (params[2] - (1 << kWarpedModelPrecisionBits)) + - mid_y * params[3]); - const int vy = - mv.mv[MotionVector::kRow] * (1 << (kWarpedModelPrecisionBits - 3)) - - (mid_x * params[4] + - mid_y * (params[5] - (1 << kWarpedModelPrecisionBits))); + const int vx = mv.mv[1] * (1 << (kWarpedModelPrecisionBits - 3)) - + (mid_x * (params[2] - (1 << kWarpedModelPrecisionBits)) + + mid_y * params[3]); + const int vy = mv.mv[0] * (1 << (kWarpedModelPrecisionBits - 3)) - + (mid_x * params[4] + + mid_y * (params[5] - (1 << kWarpedModelPrecisionBits))); params[0] = Clip3(vx, -kWarpModelTranslationClamp, kWarpModelTranslationClamp - 1); params[1] = |