aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-07-04 14:55:23 -0300
committerJames Almer <jamrial@gmail.com>2024-07-06 10:50:55 -0300
commita528a54ee119dcba47e7c9e30d3a56206fbad416 (patch)
treec74941754c84235a68f6b6560e98402d2452df27
parent9c357324f0425fc7e04ec5593cf92d133fda21a9 (diff)
downloadffmpeg-a528a54ee119dcba47e7c9e30d3a56206fbad416.tar.gz
avfilter/vf_tiltandshift: fix buffer offset for yuv422p input
Fixes ticket #10950. Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavfilter/vf_tiltandshift.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
index 85cce84fc3..b49a713339 100644
--- a/libavfilter/vf_tiltandshift.c
+++ b/libavfilter/vf_tiltandshift.c
@@ -175,14 +175,14 @@ static void copy_column(AVFilterLink *outlink,
const uint8_t *src[4];
dst[0] = dst_data[0] + ncol;
- dst[1] = dst_data[1] + (ncol >> s->desc->log2_chroma_h);
- dst[2] = dst_data[2] + (ncol >> s->desc->log2_chroma_h);
+ dst[1] = dst_data[1] + (ncol >> s->desc->log2_chroma_w);
+ dst[2] = dst_data[2] + (ncol >> s->desc->log2_chroma_w);
if (!tilt)
ncol = 0;
src[0] = src_data[0] + ncol;
- src[1] = src_data[1] + (ncol >> s->desc->log2_chroma_h);
- src[2] = src_data[2] + (ncol >> s->desc->log2_chroma_h);
+ src[1] = src_data[1] + (ncol >> s->desc->log2_chroma_w);
+ src[2] = src_data[2] + (ncol >> s->desc->log2_chroma_w);
av_image_copy(dst, dst_linesizes, src, src_linesizes, outlink->format, 1, outlink->h);
}