[vlc-commits] Revert "deinterlace: Fix blending of pictures with offset"

Thomas Guillem git at videolan.org
Thu Sep 15 15:16:48 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Sep 15 15:14:57 2016 +0200| [bf141e7836a09c7a9a2d60394ed3cd8ef17b943e] | committer: Thomas Guillem

Revert "deinterlace: Fix blending of pictures with offset"

This broke 16-bytes align requirement needed by some archs.

This reverts commit ccb8f7239183480aba3219a3ef046b538aad697d.

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

 modules/video_filter/deinterlace/algo_basic.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/video_filter/deinterlace/algo_basic.c b/modules/video_filter/deinterlace/algo_basic.c
index 8511d89..858ae93 100644
--- a/modules/video_filter/deinterlace/algo_basic.c
+++ b/modules/video_filter/deinterlace/algo_basic.c
@@ -216,32 +216,27 @@ void RenderBlend( filter_t *p_filter,
                   picture_t *p_outpic, picture_t *p_pic )
 {
     int i_plane;
-    vlc_chroma_description_t* p_desc = p_filter->p_sys->chroma;
 
     /* Copy image and skip lines */
     for( i_plane = 0 ; i_plane < p_pic->i_planes ; i_plane++ )
     {
         uint8_t *p_in, *p_out_end, *p_out;
-        size_t i_x_offset = p_pic->format.i_x_offset * p_desc->p[i_plane].w.num /
-                p_desc->p[i_plane].w.den * p_pic->p[i_plane].i_pixel_pitch;
-        size_t i_y_offset = p_pic->format.i_y_offset * p_desc->p[i_plane].h.num /
-                p_desc->p[i_plane].h.den * p_pic->p[i_plane].i_pitch;
 
-        p_in = p_pic->p[i_plane].p_pixels + i_y_offset;
+        p_in = p_pic->p[i_plane].p_pixels;
 
-        p_out = p_outpic->p[i_plane].p_pixels + i_y_offset;
+        p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
                              * p_outpic->p[i_plane].i_visible_lines;
 
         /* First line: simple copy */
-        memcpy( p_out + i_x_offset, p_in + i_x_offset, p_pic->p[i_plane].i_visible_pitch );
+        memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
         p_out += p_outpic->p[i_plane].i_pitch;
 
         /* Remaining lines: mean value */
         for( ; p_out < p_out_end ; )
         {
-            Merge( p_out + i_x_offset, p_in + i_x_offset, p_in + p_pic->p[i_plane].i_pitch + i_x_offset,
-                   p_pic->p[i_plane].i_visible_pitch );
+            Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
+                   p_pic->p[i_plane].i_pitch );
 
             p_out += p_outpic->p[i_plane].i_pitch;
             p_in  += p_pic->p[i_plane].i_pitch;



More information about the vlc-commits mailing list