1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00

img_format.h, vo_gl: fix IMGFMT_IS_YUVP16() definition

Commit aba8a1838a which added 9- and 10-bit formats failed to change
the definition of the IMGFMT_IS_YUVP16() macro (which is misnamed btw,
it matches 9, 10 and 16 bits). This prevented vo_gl from accepting
input in supported 9 and 10 bit colorspaces. Fix.
This commit is contained in:
Uoti Urpala 2011-07-14 01:11:28 +03:00
parent df899f59be
commit e62fcc3a0e

View File

@ -146,6 +146,7 @@
#define IMGFMT_420P16 IMGFMT_420P16_BE
#define IMGFMT_420P10 IMGFMT_420P10_BE
#define IMGFMT_420P9 IMGFMT_420P9_BE
#define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_BE(fmt)
#else
#define IMGFMT_444P16 IMGFMT_444P16_LE
#define IMGFMT_444P10 IMGFMT_444P10_LE
@ -155,11 +156,12 @@
#define IMGFMT_420P16 IMGFMT_420P16_LE
#define IMGFMT_420P10 IMGFMT_420P10_LE
#define IMGFMT_420P9 IMGFMT_420P9_LE
#define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_LE(fmt)
#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_NE(fmt) (((fmt ^ IMGFMT_420P16 ) & 0xff0000ff) == 0)
#define IMGFMT_IS_YUVP16(fmt) (IMGFMT_IS_YUVP16_LE(fmt) || IMGFMT_IS_YUVP16_BE(fmt))
/* Packed YUV Formats */