diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-01-25 11:38:58 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-01-25 12:34:57 +0100 |
commit | 87598435aacdebccf42112ca498b52f96d1c1b79 (patch) | |
tree | ecd1f1895751226b9e5847b63621b7a733fc2601 | |
parent | e22108240b9ac0f67a7f8afb71501e03aab9770c (diff) | |
download | ffmpeg-87598435aacdebccf42112ca498b52f96d1c1b79.tar.gz |
avfilter/vf_lenscorrection: fix far edges with nearest interpolation
-rw-r--r-- | libavfilter/vf_lenscorrection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index 9df549d51b..8f2be9fefa 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -97,7 +97,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs) const int64_t radius_mult = td->correction[j + i*w]; const int x = xcenter + ((radius_mult * off_x + (1<<23))>>24); const int y = ycenter + ((radius_mult * off_y + (1<<23))>>24); - const char isvalid = x > 0 && x < w - 1 && y > 0 && y < h - 1; + const char isvalid = x >= 0 && x < w && y >= 0 && y < h; *out++ = isvalid ? indata[y * inlinesize + x] : 0; } } |