[vlc-devel] [PATCH 4/6] chroma:swscale: carry over the source offset when the visible area is unchanged

Steve Lhomme robux4 at videolabs.io
Thu May 12 12:17:17 CEST 2016


---
 modules/video_chroma/swscale.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c
index d0e3a9b..90494d2 100644
--- a/modules/video_chroma/swscale.c
+++ b/modules/video_chroma/swscale.c
@@ -652,6 +652,13 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         CopyPad( p_src, p_pic );
     }
 
+    if ( p_src->format.i_visible_width  == p_dst->format.i_visible_width &&
+         p_src->format.i_visible_height == p_dst->format.i_visible_height )
+    {
+        p_dst->format.i_x_offset = p_src->format.i_x_offset;
+        p_dst->format.i_y_offset = p_src->format.i_y_offset;
+    }
+
     if( p_sys->b_copy && p_sys->b_swap_uvi == p_sys->b_swap_uvo )
         picture_CopyPixels( p_dst, p_src );
     else if( p_sys->b_copy )
-- 
2.8.1



More information about the vlc-devel mailing list