From eaa68fad9e5d201d42fde51665f2d137ae96baf0 Mon Sep 17 00:00:00 2001
From: Anton Mitrofanov <BugMaster@narod.ru>
Date: Sat, 28 Jan 2023 23:03:35 +0300
Subject: [PATCH] Fix high bit depth deinterleave of YUYV or UYVY

---
 common/frame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/frame.c b/common/frame.c
index 716876be..e282c8f5 100644
--- a/common/frame.c
+++ b/common/frame.c
@@ -413,7 +413,7 @@ int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
     {
         int p = i_csp == X264_CSP_UYVY;
         h->mc.plane_copy_deinterleave_yuyv( dst->plane[p], dst->i_stride[p], dst->plane[p^1], dst->i_stride[p^1],
-                                            (pixel*)src->img.plane[0], src->img.i_stride[0], h->param.i_width, h->param.i_height );
+                                            (pixel*)src->img.plane[0], src->img.i_stride[0]/SIZEOF_PIXEL, h->param.i_width, h->param.i_height );
     }
     else if( i_csp == X264_CSP_V210 )
     {
-- 
GitLab