Skip to content

Commit

Permalink
picture: add a commonly used plane_SwapUV function
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
robUx4 authored and jbkempf committed Dec 17, 2017
1 parent 7cbdd3b commit c8f7552
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/vlc_picture.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit c8f7552

Please sign in to comment.