[vlc-commits] yuy2_i420: only adjust the line ending when the line was actually used

Steve Lhomme git at videolan.org
Wed Mar 9 12:00:28 CET 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Mar  9 10:20:11 2016 +0100| [bcf448430b632ce7231624860f262ef8a9620be8] | committer: Jean-Baptiste Kempf

yuy2_i420: only adjust the line ending when the line was actually used

--
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

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcf448430b632ce7231624860f262ef8a9620be8
---

 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;
 



More information about the vlc-commits mailing list