[vlc-devel] [PATCH 05/12] video_filter:deinterlace: don't use the field parameter in RenderDiscard()

Steve Lhomme robux4 at videolabs.io
Tue Jun 27 16:11:07 CEST 2017


it's always 0

--
replaces https://patches.videolan.org/patch/17096/
- add an assert to ensure it's always the case
---
 modules/video_filter/deinterlace/algo_basic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_filter/deinterlace/algo_basic.c b/modules/video_filter/deinterlace/algo_basic.c
index 858ae93da8..e2cfdf63fc 100644
--- a/modules/video_filter/deinterlace/algo_basic.c
+++ b/modules/video_filter/deinterlace/algo_basic.c
@@ -28,6 +28,7 @@
 #endif
 
 #include <stdint.h>
+#include <assert.h>
 
 #include <vlc_common.h>
 #include <vlc_picture.h>
@@ -44,6 +45,7 @@
 
 void RenderDiscard( picture_t *p_outpic, picture_t *p_pic, int i_field )
 {
+    assert(i_field == 0);
     int i_plane;
 
     /* Copy image and skip lines */
@@ -51,8 +53,7 @@ void RenderDiscard( picture_t *p_outpic, picture_t *p_pic, int i_field )
     {
         uint8_t *p_in, *p_out_end, *p_out;
 
-        p_in = p_pic->p[i_plane].p_pixels
-                   + i_field * p_pic->p[i_plane].i_pitch;
+        p_in = p_pic->p[i_plane].p_pixels;
 
         p_out = p_outpic->p[i_plane].p_pixels;
         p_out_end = p_out + p_outpic->p[i_plane].i_pitch
-- 
2.12.1



More information about the vlc-devel mailing list