[vlc-devel] [PATCH] i420_yuy2: fix using buffer areas not visible

Steve Lhomme robux4 at videolabs.io
Tue Mar 8 11:24:47 CET 2016


fixes #16686
--
should be backported on 2.2 as well
---
 modules/video_chroma/i420_yuy2.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c
index 4584f9e..cdc16ea 100644
--- a/modules/video_chroma/i420_yuy2.c
+++ b/modules/video_chroma/i420_yuy2.c
@@ -307,7 +307,7 @@ static void I420_YUY2( filter_t *p_filter, picture_t *p_source,
         p_y2 += p_source->p[Y_PLANE].i_pitch;
 
 #if !defined (MODULE_NAME_IS_i420_yuy2_mmx)
-        for( i_x = p_filter->fmt_in.video.i_width / 8; i_x-- ; )
+        for( i_x = p_filter->fmt_in.video.i_visible_width / 8; i_x-- ; )
         {
             C_YUV420_YUYV( );
             C_YUV420_YUYV( );
@@ -315,12 +315,12 @@ static void I420_YUY2( filter_t *p_filter, picture_t *p_source,
             C_YUV420_YUYV( );
         }
 #else
-        for( i_x = p_filter->fmt_in.video.i_width / 8 ; i_x-- ; )
+        for( i_x = p_filter->fmt_in.video.i_visible_width / 8 ; i_x-- ; )
         {
             MMX_CALL( MMX_YUV420_YUYV );
         }
 #endif
-        for( i_x = ( p_filter->fmt_in.video.i_width % 8 ) / 2; i_x-- ; )
+        for( i_x = ( p_filter->fmt_in.video.i_visible_width % 8 ) / 2; i_x-- ; )
         {
             C_YUV420_YUYV( );
         }
@@ -360,11 +360,11 @@ static void I420_YUY2( filter_t *p_filter, picture_t *p_source,
             p_y1 = p_y2;
             p_y2 += p_source->p[Y_PLANE].i_pitch;
 
-            for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; )
+            for( i_x = p_filter->fmt_in.video.i_visible_width / 16 ; i_x-- ; )
             {
                 SSE2_CALL( SSE2_YUV420_YUYV_ALIGNED );
             }
-            for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; )
+            for( i_x = ( p_filter->fmt_in.video.i_visible_width % 16 ) / 2; i_x-- ; )
             {
                 C_YUV420_YUYV( );
             }
@@ -388,11 +388,11 @@ static void I420_YUY2( filter_t *p_filter, picture_t *p_source,
             p_y1 = p_y2;
             p_y2 += p_source->p[Y_PLANE].i_pitch;
 
-            for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; )
+            for( i_x = p_filter->fmt_in.video.i_visible_width / 16 ; i_x-- ; )
             {
                 SSE2_CALL( SSE2_YUV420_YUYV_UNALIGNED );
             }
-            for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; )
+            for( i_x = ( p_filter->fmt_in.video.i_visible_width % 16 ) / 2; i_x-- ; )
             {
                 C_YUV420_YUYV( );
             }
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list