[vlc-commits] picture: add a commonly used plane_SwapUV function
Steve Lhomme
git at videolan.org
Sun Dec 17 23:26:38 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Dec 15 13:09:56 2017 +0100| [c8f7552339f837cc1f1916179d7380a56726f46e] | committer: Jean-Baptiste Kempf
picture: add a commonly used plane_SwapUV function
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8f7552339f837cc1f1916179d7380a56726f46e
---
include/vlc_picture.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index 74f156fbbd..1ab8fef14f 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -254,6 +254,18 @@ enum
#define A_PIXELS p[A_PLANE].p_pixels
#define A_PITCH p[A_PLANE].i_pitch
+
+/*****************************************************************************
+ * plane helper funcions
+ *****************************************************************************/
+
+static inline void plane_SwapUV(plane_t p[PICTURE_PLANE_MAX])
+{
+ uint8_t *buf = p[V_PLANE].p_pixels;
+ p[V_PLANE].p_pixels = p[U_PLANE].p_pixels;
+ p[U_PLANE].p_pixels = buf;
+}
+
/**@}*/
#endif /* VLC_PICTURE_H */
More information about the vlc-commits
mailing list