mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_feedback: fix artifacts with subsampled chroma
This commit is contained in:
parent
21a0b6bca8
commit
90096dd042
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user