diff options
author | Luc Trudeau <ltrudeau@twoorioles.com> | 2020-06-20 04:54:48 +0300 |
---|---|---|
committer | Luc Trudeau <ltrudeau@twoorioles.com> | 2020-06-20 04:54:48 +0300 |
commit | e97d5e77e2ec01ec78855e389535551b7c7514ce (patch) | |
tree | c68c2db0203df86f788374cac12a98a191b315a4 | |
parent | bf7adb75676f834ef279d79e7001ec6375619a38 (diff) |
Extract y related operations out of warp_affine inner loop
-rw-r--r-- | src/recon_tmpl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/recon_tmpl.c b/src/recon_tmpl.c index 457d971..8e96f8e 100644 --- a/src/recon_tmpl.c +++ b/src/recon_tmpl.c @@ -1071,15 +1071,15 @@ static int warp_affine(Dav1dTileContext *const t, const int height = (refp->p.p.h + ss_ver) >> ss_ver; for (int y = 0; y < b_dim[1] * v_mul; y += 8) { + const int src_y = t->by * 4 + ((y + 4) << ss_ver); + const int64_t mat3_y = (int64_t) mat[3] * src_y + mat[0]; + const int64_t mat5_y = (int64_t) mat[5] * src_y + mat[1]; for (int x = 0; x < b_dim[0] * h_mul; x += 8) { // calculate transformation relative to center of 8x8 block in // luma pixel units const int src_x = t->bx * 4 + ((x + 4) << ss_hor); - const int src_y = t->by * 4 + ((y + 4) << ss_ver); - const int64_t mvx = ((int64_t) mat[2] * src_x + - (int64_t) mat[3] * src_y + mat[0]) >> ss_hor; - const int64_t mvy = ((int64_t) mat[4] * src_x + - (int64_t) mat[5] * src_y + mat[1]) >> ss_ver; + const int64_t mvx = ((int64_t) mat[2] * src_x + mat3_y) >> ss_hor; + const int64_t mvy = ((int64_t) mat[4] * src_x + mat5_y) >> ss_ver; const int dx = (int) (mvx >> 16) - 4; const int mx = (((int) mvx & 0xffff) - wmp->alpha * 4 - |