diff mbox series

[FFmpeg-devel,1/2] avfilter/vf_tiltandshift: fix buffer offset for yuv422p input

Message ID 20240704175819.6147-1-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/2] avfilter/vf_tiltandshift: fix buffer offset for yuv422p input | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer July 4, 2024, 5:58 p.m. UTC
Fixes ticket #10950.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavfilter/vf_tiltandshift.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

James Almer July 6, 2024, 1:51 p.m. UTC | #1
On 7/4/2024 2:58 PM, James Almer wrote:
> Fixes ticket #10950.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>   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 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);
>   }

Will apply set.
diff mbox series

Patch

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);
 }