[FFmpeg-cvslog] avfilter/vf_tiltandshift: fix buffer offset for yuv422p input

James Almer git at videolan.org
Sat Jul 6 17:20:15 EEST 2024


ffmpeg | branch: release/7.0 | James Almer <jamrial at gmail.com> | Thu Jul  4 14:55:23 2024 -0300| [2df8aaa8c58d9372bd0e1472ea387c2be86d3e21] | committer: James Almer

avfilter/vf_tiltandshift: fix buffer offset for yuv422p input

Fixes ticket #10950.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2df8aaa8c58d9372bd0e1472ea387c2be86d3e21
---

 libavfilter/vf_tiltandshift.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
index dc30f4ff1b..b31d088d11 100644
--- a/libavfilter/vf_tiltandshift.c
+++ b/libavfilter/vf_tiltandshift.c
@@ -177,14 +177,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);
 }



More information about the ffmpeg-cvslog mailing list