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

Steve Lhomme git at videolan.org
Wed Mar 9 13:23:27 CET 2016


vlc/vlc-2.2 | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Mar  9 10:20:11 2016 +0100| [79908393fc9979e998a885c1a46f9db878ae450c] | 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>
(cherry picked from commit bcf448430b632ce7231624860f262ef8a9620be8)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 134cfa5..a2012e6 100644
--- a/modules/video_chroma/yuy2_i420.c
+++ b/modules/video_chroma/yuy2_i420.c
@@ -176,11 +176,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;
     }
@@ -244,11 +244,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;
     }
@@ -312,9 +312,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