vlc | branch: master | Steve Lhomme <[email protected]> | 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 <[email protected]> > 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 */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
