From e5f7976000af0fb8da5fd0c3a01cfd44e6e64516 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 14 Nov 2012 11:19:04 +0100 Subject: video: add IMGFMT_Y16/PIX_FMT_GRAY16 This pixel format is sometimes used with yuv4mpeg. vo_direct3d used its own IMGFMT_Y16 internally for some reason. vo_opengl, vo_opengl_old, and vo_direct3d should be able to display this pixel format natively. --- video/img_format.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'video/img_format.h') diff --git a/video/img_format.h b/video/img_format.h index c32600f519..f3611a5fab 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -102,7 +102,17 @@ #define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x3F) // AV_PIX_FMT_BGR0 -#define IMGFMT_BGR0 0x1DC70000 +#define IMGFMT_BGR0 0x1DC70000 +// AV_PIX_FMT_GRAY16LE +#define IMGFMT_Y16LE 0x1DC70001 +// AV_PIX_FMT_GRAY16BE +#define IMGFMT_Y16BE 0x1DC70002 + +#if BYTE_ORDER == BIG_ENDIAN +#define IMGFMT_Y16 IMGFMT_Y16BE +#else +#define IMGFMT_Y16 IMGFMT_Y16LE +#endif /* Planar YUV Formats */ @@ -170,8 +180,8 @@ #endif // These macros are misnamed - they actually match 9, 10 or 16 bits -#define IMGFMT_IS_YUVP16_LE(fmt) (((fmt - 0x51000034) & 0xfc0000ff) == 0) -#define IMGFMT_IS_YUVP16_BE(fmt) (((fmt - 0x34000051) & 0xff0000fc) == 0) +#define IMGFMT_IS_YUVP16_LE(fmt) (((fmt - 0x51000034) & 0xfc0000ff) == 0 || fmt == IMGFMT_Y16LE) +#define IMGFMT_IS_YUVP16_BE(fmt) (((fmt - 0x34000051) & 0xff0000fc) == 0 || fmt == IMGFMT_Y16BE) #define IMGFMT_IS_YUVP16(fmt) (IMGFMT_IS_YUVP16_LE(fmt) || IMGFMT_IS_YUVP16_BE(fmt)) /* Packed YUV Formats */ -- cgit v1.2.3