aboutsummaryrefslogtreecommitdiff
path: root/transfer.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-23 10:42:08 +0200
committerAnton Khirnov <anton@khirnov.net>2019-05-23 10:42:08 +0200
commitc353dd0befea615adf233afa33c47dd9be6b94a0 (patch)
tree34cec3a83e78759e9ef6d9c67522d3bf6bbf77c3 /transfer.c
parente1474028b17651bd9ad75c366ad1bb46aab63a8f (diff)
transfer: allow optional extrapolation
Diffstat (limited to 'transfer.c')
-rw-r--r--transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transfer.c b/transfer.c
index 6db1ad2..9c5e125 100644
--- a/transfer.c
+++ b/transfer.c
@@ -425,8 +425,8 @@ int mg2di_gt_init(GridTransferContext *ctx)
ctx->src.size[i] < 2 || ctx->dst.size[i] < 1)
return -EINVAL;
- src_start = ctx->src.start[i] * ctx->src.step[i];
- src_end = (ctx->src.start[i] + ctx->src.size[i] - 1) * ctx->src.step[i];
+ src_start = ctx->src.start[i] * ctx->src.step[i] - ctx->extrapolate_distance;
+ src_end = (ctx->src.start[i] + ctx->src.size[i] - 1 + ctx->extrapolate_distance) * ctx->src.step[i];
dst_start = ctx->dst.start[i] * ctx->dst.step[i];
dst_end = (ctx->dst.start[i] + ctx->dst.size[i] - 1) * ctx->dst.step[i];