diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-14 01:11:28 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-14 01:19:07 +0300 |
commit | e62fcc3a0e38685b84526033bf80fca9062161c3 (patch) | |
tree | b499a8fc10bb2284f1efde4c998cddc7411481b0 /libmpcodecs | |
parent | df899f59be6dce15125f6d69ac7d5529ea7ae913 (diff) |
img_format.h, vo_gl: fix IMGFMT_IS_YUVP16() definition
Commit aba8a1838aa 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.
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/img_format.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 60adc5c038..3056e29268 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -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 */ |