[vlc-commits] includes: inline picture_SwapUV() in vlc_pictures.h

Steve Lhomme git at videolan.org
Tue Feb 20 14:31:23 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 20 13:52:24 2018 +0100| [350379929515311380bbd836c22469858ea44afd] | committer: Steve Lhomme

includes: inline picture_SwapUV() in vlc_pictures.h

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

 include/vlc_picture.h       | 16 ++++++++++++++++
 modules/video_chroma/copy.c |  9 ---------
 modules/video_chroma/copy.h |  7 -------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index 1ab8fef14f..1499715066 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -26,6 +26,8 @@
 #ifndef VLC_PICTURE_H
 #define VLC_PICTURE_H 1
 
+#include <assert.h>
+
 /**
  * \file
  * This file defines picture structures and functions in vlc
@@ -266,6 +268,20 @@ static inline void plane_SwapUV(plane_t p[PICTURE_PLANE_MAX])
     p[U_PLANE].p_pixels = buf;
 }
 
+/**
+ * Swap UV planes of a Tri Planars picture.
+ *
+ * It just swap the planes information without doing any copy.
+ */
+static inline void picture_SwapUV(picture_t *picture)
+{
+    assert(picture->i_planes == 3);
+
+    plane_t tmp_plane   = picture->p[U_PLANE];
+    picture->p[U_PLANE] = picture->p[V_PLANE];
+    picture->p[V_PLANE] = tmp_plane;
+}
+
 /**@}*/
 
 #endif /* VLC_PICTURE_H */
diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
index a60eaa944c..02da236e9b 100644
--- a/modules/video_chroma/copy.c
+++ b/modules/video_chroma/copy.c
@@ -777,15 +777,6 @@ void Copy420_P_to_P(picture_t *dst, const uint8_t *src[static 3],
                src[2], src_pitch[2], height / 2);
 }
 
-void picture_SwapUV(picture_t *picture)
-{
-    assert(picture->i_planes == 3);
-
-    plane_t tmp_plane   = picture->p[U_PLANE];
-    picture->p[U_PLANE] = picture->p[V_PLANE];
-    picture->p[V_PLANE] = tmp_plane;
-}
-
 int picture_UpdatePlanes(picture_t *picture, uint8_t *data, unsigned pitch)
 {
     /* fill in buffer info in first plane */
diff --git a/modules/video_chroma/copy.h b/modules/video_chroma/copy.h
index f332f6d429..296d1a6734 100644
--- a/modules/video_chroma/copy.h
+++ b/modules/video_chroma/copy.h
@@ -70,13 +70,6 @@ void CopyFromI420_10ToP010(picture_t *dst, const uint8_t *src[static 3],
                            unsigned height, const copy_cache_t *cache);
 
 /**
- * Swap UV planes of a Tri Planars picture.
- *
- * It just swap the planes information without doing any copy.
- */
-void picture_SwapUV(picture_t *picture);
-
-/**
  * This functions sets the internal plane pointers/dimensions for the given
  * buffer.
  * This is useful when mapping opaque surfaces into CPU planes.



More information about the vlc-commits mailing list