diff options
author | Mike Melanson <mike@multimedia.cx> | 2002-07-15 00:51:17 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2002-07-15 00:51:17 +0000 |
commit | 5a47aa47798718be5961dfcfae8d9c61fe93792e (patch) | |
tree | 83685c7cc669d511e6b7930d041ac4d575808660 /src/xine-utils/xineutils.h | |
parent | 53c5ec96b87ef2bb61c7d3188d549623495d4500 (diff) | |
download | xine-lib-5a47aa47798718be5961dfcfae8d9c61fe93792e.tar.gz xine-lib-5a47aa47798718be5961dfcfae8d9c61fe93792e.tar.bz2 |
added some pixel unpacking macros
CVS patchset: 2268
CVS date: 2002/07/15 00:51:17
Diffstat (limited to 'src/xine-utils/xineutils.h')
-rw-r--r-- | src/xine-utils/xineutils.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 65b9d02da..985961a88 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.16 2002/07/14 01:27:03 tmmm Exp $ + * $Id: xineutils.h,v 1.17 2002/07/15 00:51:17 tmmm Exp $ * */ #ifndef XINEUTILS_H @@ -753,6 +753,26 @@ extern void (*yuv444_to_yuy2) (unsigned char) \ ((v_r_table[r] + v_g_table[g] + v_b_table[b]) / SCALEFACTOR + CENTERSAMPLE) +#define UNPACK_BGR15(packed_pixel, r, g, b) \ + b = (packed_pixel & 0x7C00) >> 7; \ + g = (packed_pixel & 0x03E0) >> 2; \ + r = (packed_pixel & 0x001F) << 3; + +#define UNPACK_BGR16(packed_pixel, r, g, b) \ + b = (packed_pixel & 0xF800) >> 8; \ + g = (packed_pixel & 0x07E0) >> 3; \ + r = (packed_pixel & 0x001F) << 3; + +#define UNPACK_RGB15(packed_pixel, r, g, b) \ + r = (packed_pixel & 0x7C00) >> 7; \ + g = (packed_pixel & 0x03E0) >> 2; \ + b = (packed_pixel & 0x001F) << 3; + +#define UNPACK_RGB16(packed_pixel, r, g, b) \ + r = (packed_pixel & 0xF800) >> 8; \ + g = (packed_pixel & 0x07E0) >> 3; \ + b = (packed_pixel & 0x001F) << 3; + extern int y_r_table[256]; extern int y_g_table[256]; extern int y_b_table[256]; |