1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avfilter/vf_convolution: use correct stride variable

This commit is contained in:
Paul B Mahol 2021-01-10 17:26:21 +01:00
parent 0fff6c039c
commit a0acc44106

View File

@ -523,11 +523,11 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
for (y = slice_start; y < slice_end; y++) { for (y = slice_start; y < slice_end; y++) {
const int xoff = mode == MATRIX_COLUMN ? (y - slice_start) * bpc : radius * bpc; const int xoff = mode == MATRIX_COLUMN ? (y - slice_start) * bpc : radius * bpc;
const int yoff = mode == MATRIX_COLUMN ? radius * stride : 0; const int yoff = mode == MATRIX_COLUMN ? radius * dstride : 0;
for (x = 0; x < radius; x++) { for (x = 0; x < radius; x++) {
const int xoff = mode == MATRIX_COLUMN ? (y - slice_start) * bpc : x * bpc; const int xoff = mode == MATRIX_COLUMN ? (y - slice_start) * bpc : x * bpc;
const int yoff = mode == MATRIX_COLUMN ? x * stride : 0; const int yoff = mode == MATRIX_COLUMN ? x * dstride : 0;
s->setup[plane](radius, c, src, stride, x, width, y, height, bpc); s->setup[plane](radius, c, src, stride, x, width, y, height, bpc);
s->filter[plane](dst + yoff + xoff, 1, rdiv, s->filter[plane](dst + yoff + xoff, 1, rdiv,
@ -540,7 +540,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
dstride, stride); dstride, stride);
for (x = sizew - radius; x < sizew; x++) { for (x = sizew - radius; x < sizew; x++) {
const int xoff = mode == MATRIX_COLUMN ? (y - slice_start) * bpc : x * bpc; const int xoff = mode == MATRIX_COLUMN ? (y - slice_start) * bpc : x * bpc;
const int yoff = mode == MATRIX_COLUMN ? x * stride : 0; const int yoff = mode == MATRIX_COLUMN ? x * dstride : 0;
s->setup[plane](radius, c, src, stride, x, width, y, height, bpc); s->setup[plane](radius, c, src, stride, x, width, y, height, bpc);
s->filter[plane](dst + yoff + xoff, 1, rdiv, s->filter[plane](dst + yoff + xoff, 1, rdiv,