[FFmpeg-cvslog] avfilter/vf_feedback: fix artifacts with subsampled chroma
Paul B Mahol
git at videolan.org
Tue May 9 01:43:37 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue May 9 00:40:32 2023 +0200| [90096dd04216b1bb398525631206172f07e382ca] | committer: Paul B Mahol
avfilter/vf_feedback: fix artifacts with subsampled chroma
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90096dd04216b1bb398525631206172f07e382ca
---
libavfilter/vf_feedback.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavfilter/vf_feedback.c b/libavfilter/vf_feedback.c
index 15cbf95c54..dc832c4671 100644
--- a/libavfilter/vf_feedback.c
+++ b/libavfilter/vf_feedback.c
@@ -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];
}
}
More information about the ffmpeg-cvslog
mailing list