From 0a3d4a1a20186d2eaa0d5cc1b7db47eb1e44be71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 9 Jun 2017 18:10:52 +0300 Subject: [PATCH] sna/video: Add FOURCC_NV12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ville Syrjälä --- src/sna/sna_video.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sna/sna_video.h b/src/sna/sna_video.h index 39cb725f..bb963e7f 100644 --- a/src/sna/sna_video.h +++ b/src/sna/sna_video.h @@ -38,6 +38,7 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define FOURCC_XVMC (('C' << 24) + ('M' << 16) + ('V' << 8) + 'X') #define FOURCC_RGB565 ((16 << 24) + ('B' << 16) + ('G' << 8) + 'R') #define FOURCC_RGB888 ((24 << 24) + ('B' << 16) + ('G' << 8) + 'R') +#define FOURCC_NV12 (('2' << 24) + ('1' << 16) + ('V' << 8) + 'N') /* * Below, a dummy picture type that is used in XvPutImage @@ -160,6 +161,17 @@ static inline int is_planar_fourcc(int id) case FOURCC_YV12: case FOURCC_I420: case FOURCC_XVMC: + case FOURCC_NV12: + return 1; + default: + return 0; + } +} + +static inline int is_nv12_fourcc(int id) +{ + switch (id) { + case FOURCC_NV12: return 1; default: return 0;