[vlc-devel] [PATCH 1/2] yuy2_i420: only adjust the line ending when the line was actually used

Steve Lhomme robux4 at videolabs.io
Wed Mar 9 10:20:11 CET 2016


--
must have been tested with samples where the shift was 0
this fixes http://streams.videolan.org/samples/V-codecs/V422.AVI playing on a I420 surface
---
 modules/video_chroma/yuy2_i420.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/video_chroma/yuy2_i420.c b/modules/video_chroma/yuy2_i420.c
index 4adff8b..9d852ad 100644
--- a/modules/video_chroma/yuy2_i420.c
+++ b/modules/video_chroma/yuy2_i420.c
@@ -169,11 +169,11 @@ static void YUY2_I420( filter_t *p_filter, picture_t *p_source,
             {
                 C_YUYV_YUV422( p_line, p_y, p_u, p_v );
             }
+            p_u += i_dest_margin_c;
+            p_v += i_dest_margin_c;
         }
         p_line += i_source_margin;
         p_y += i_dest_margin;
-        p_u += i_dest_margin_c;
-        p_v += i_dest_margin_c;
 
         b_skip = !b_skip;
     }
@@ -237,11 +237,11 @@ static void YVYU_I420( filter_t *p_filter, picture_t *p_source,
             {
                 C_YVYU_YUV422( p_line, p_y, p_u, p_v );
             }
+            p_u += i_dest_margin_c;
+            p_v += i_dest_margin_c;
         }
         p_line += i_source_margin;
         p_y += i_dest_margin;
-        p_u += i_dest_margin_c;
-        p_v += i_dest_margin_c;
 
         b_skip = !b_skip;
     }
@@ -305,9 +305,9 @@ static void UYVY_I420( filter_t *p_filter, picture_t *p_source,
             {
                 C_UYVY_YUV422( p_line, p_y, p_u, p_v );
             }
+            p_y += i_dest_margin;
         }
         p_line += i_source_margin;
-        p_y += i_dest_margin;
         p_u += i_dest_margin_c;
         p_v += i_dest_margin_c;
 
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list