[vlc-devel] [PATCH v3 02/12] vlc_picture: remove unused plane initialization from picture_resource_t

Steve Lhomme robux4 at ycbcr.xyz
Tue Aug 18 08:24:43 CEST 2020


---
 include/vlc_picture.h | 11 -----------
 src/misc/picture.c    | 11 +----------
 2 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index 7bb9ee5083c..fdb3061f783 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -190,17 +190,6 @@ typedef struct
 {
     void *p_sys;
     void (*pf_destroy)(picture_t *);
-
-    /* Plane resources
-     * XXX all fields MUST be set to the right value.
-     */
-    struct
-    {
-        uint8_t *p_pixels;  /**< Start of the plane's data */
-        int i_lines;        /**< Number of lines, including margins */
-        int i_pitch;        /**< Number of bytes in a line, including margins */
-    } p[PICTURE_PLANE_MAX];
-
 } picture_resource_t;
 
 /**
diff --git a/src/misc/picture.c b/src/misc/picture.c
index f9af9148829..cc2173604a1 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -237,16 +237,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
         return NULL;
     }
 
-    picture_t *p_picture = &priv->picture;
-
-    for( int i = 0; i < p_picture->i_planes; i++ )
-    {
-        p_picture->p[i].p_pixels = p_resource->p[i].p_pixels;
-        p_picture->p[i].i_lines  = p_resource->p[i].i_lines;
-        p_picture->p[i].i_pitch  = p_resource->p[i].i_pitch;
-    }
-
-    return p_picture;
+    return &priv->picture;
 }
 
 #define PICTURE_SW_SIZE_MAX (UINT32_C(1) << 28) /* 256MB: 8K * 8K * 4*/
-- 
2.26.2



More information about the vlc-devel mailing list