summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-14 01:11:28 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-14 01:19:07 +0300
commite62fcc3a0e38685b84526033bf80fca9062161c3 (patch)
treeb499a8fc10bb2284f1efde4c998cddc7411481b0 /libmpcodecs
parentdf899f59be6dce15125f6d69ac7d5529ea7ae913 (diff)
downloadmpv-e62fcc3a0e38685b84526033bf80fca9062161c3.tar.bz2
mpv-e62fcc3a0e38685b84526033bf80fca9062161c3.tar.xz
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.h4
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 */