[MPlayer-dev-eng] [PATCH]Do not use "64" to describe non 64bit image formats
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Feb 6 04:21:55 CET 2012
Hi!
Attached patch would allow simple 64 bit RGB support in a follow-up patch, but
I did not succeed testing the relevant code path in vo x11 and I don't know if
other parts in MPlayer relied on "64" for non-native image formats.
Please review, Carl Eugen
-------------- next part --------------
Index: libmpcodecs/img_format.h
===================================================================
--- libmpcodecs/img_format.h (revision 34653)
+++ libmpcodecs/img_format.h (working copy)
@@ -53,39 +53,39 @@
#if HAVE_BIGENDIAN
#define IMGFMT_ABGR IMGFMT_RGB32
-#define IMGFMT_BGRA (IMGFMT_RGB32|64)
+#define IMGFMT_BGRA (IMGFMT_RGB32|128)
#define IMGFMT_ARGB IMGFMT_BGR32
-#define IMGFMT_RGBA (IMGFMT_BGR32|64)
+#define IMGFMT_RGBA (IMGFMT_BGR32|128)
#define IMGFMT_RGB48NE IMGFMT_RGB48BE
#define IMGFMT_RGB12BE IMGFMT_RGB12
-#define IMGFMT_RGB12LE (IMGFMT_RGB12|64)
+#define IMGFMT_RGB12LE (IMGFMT_RGB12|128)
#define IMGFMT_RGB15BE IMGFMT_RGB15
-#define IMGFMT_RGB15LE (IMGFMT_RGB15|64)
+#define IMGFMT_RGB15LE (IMGFMT_RGB15|128)
#define IMGFMT_RGB16BE IMGFMT_RGB16
-#define IMGFMT_RGB16LE (IMGFMT_RGB16|64)
+#define IMGFMT_RGB16LE (IMGFMT_RGB16|128)
#define IMGFMT_BGR12BE IMGFMT_BGR12
-#define IMGFMT_BGR12LE (IMGFMT_BGR12|64)
+#define IMGFMT_BGR12LE (IMGFMT_BGR12|128)
#define IMGFMT_BGR15BE IMGFMT_BGR15
-#define IMGFMT_BGR15LE (IMGFMT_BGR15|64)
+#define IMGFMT_BGR15LE (IMGFMT_BGR15|128)
#define IMGFMT_BGR16BE IMGFMT_BGR16
-#define IMGFMT_BGR16LE (IMGFMT_BGR16|64)
+#define IMGFMT_BGR16LE (IMGFMT_BGR16|128)
#else
-#define IMGFMT_ABGR (IMGFMT_BGR32|64)
+#define IMGFMT_ABGR (IMGFMT_BGR32|128)
#define IMGFMT_BGRA IMGFMT_BGR32
-#define IMGFMT_ARGB (IMGFMT_RGB32|64)
+#define IMGFMT_ARGB (IMGFMT_RGB32|128)
#define IMGFMT_RGBA IMGFMT_RGB32
#define IMGFMT_RGB48NE IMGFMT_RGB48LE
-#define IMGFMT_RGB12BE (IMGFMT_RGB12|64)
+#define IMGFMT_RGB12BE (IMGFMT_RGB12|128)
#define IMGFMT_RGB12LE IMGFMT_RGB12
-#define IMGFMT_RGB15BE (IMGFMT_RGB15|64)
+#define IMGFMT_RGB15BE (IMGFMT_RGB15|128)
#define IMGFMT_RGB15LE IMGFMT_RGB15
-#define IMGFMT_RGB16BE (IMGFMT_RGB16|64)
+#define IMGFMT_RGB16BE (IMGFMT_RGB16|128)
#define IMGFMT_RGB16LE IMGFMT_RGB16
-#define IMGFMT_BGR12BE (IMGFMT_BGR12|64)
+#define IMGFMT_BGR12BE (IMGFMT_BGR12|128)
#define IMGFMT_BGR12LE IMGFMT_BGR12
-#define IMGFMT_BGR15BE (IMGFMT_BGR15|64)
+#define IMGFMT_BGR15BE (IMGFMT_BGR15|128)
#define IMGFMT_BGR15LE IMGFMT_BGR15
-#define IMGFMT_BGR16BE (IMGFMT_BGR16|64)
+#define IMGFMT_BGR16BE (IMGFMT_BGR16|128)
#define IMGFMT_BGR16LE IMGFMT_BGR16
#endif
Index: libvo/vo_x11.c
===================================================================
--- libvo/vo_x11.c (revision 34652)
+++ libvo/vo_x11.c (working copy)
@@ -427,8 +427,8 @@
out_offset = 0;
// for these formats conversion is currently not support and
// we can easily "emulate" them.
- if (out_format & 64 && (IMGFMT_IS_RGB(out_format) || IMGFMT_IS_BGR(out_format))) {
- out_format &= ~64;
+ if (out_format & 128 && (IMGFMT_IS_RGB(out_format) || IMGFMT_IS_BGR(out_format))) {
+ out_format &= ~128;
#if HAVE_BIGENDIAN
out_offset = 1;
#else
More information about the MPlayer-dev-eng
mailing list