Browse Source

avfilter/vf_lenscorrection: fix far edges with nearest interpolation

tags/n4.4
Paul B Mahol 5 years ago
parent
commit
87598435aa
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/vf_lenscorrection.c

+ 1
- 1
libavfilter/vf_lenscorrection.c View File

@@ -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;
}
}


Loading…
Cancel
Save