Commit 90096dd0 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_feedback: fix artifacts with subsampled chroma

parent 21a0b6bc
......@@ -163,11 +163,11 @@ static int activate(AVFilterContext *ctx)
src->data[0] + y * src->linesize[0], src->width * s->max_step[0]);
}
for (int i = 1; i < 3; i ++) {
for (int i = 1; i < 3; i++) {
if (dst->data[i]) {
for (int y = 0; y < src->height; y++) {
memmove(dst->data[i] + ((s->y + y) >> s->vsub) * dst->linesize[i] + ((s->x * s->max_step[i]) >> s->hsub),
src->data[i] + (y >> s->vsub) * src->linesize[i], (src->width * s->max_step[i]) >> s->hsub);
memmove(dst->data[i] + ((s->y + y) >> s->vsub) * dst->linesize[i] + (s->x >> s->hsub) * s->max_step[i],
src->data[i] + (y >> s->vsub) * src->linesize[i], (src->width >> s->hsub) * s->max_step[i]);
}
}
}
......@@ -213,7 +213,7 @@ static int activate(AVFilterContext *ctx)
for (int i = 1; i < 3; i ++) {
if (frame->data[i]) {
frame->data[i] += (s->y >> s->vsub) * frame->linesize[i];
frame->data[i] += (s->x * s->max_step[i]) >> s->hsub;
frame->data[i] += (s->x >> s->hsub) * s->max_step[i];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment