include/SDL_pixels.h
changeset 5264 7ace5f8f432f
parent 5262 b530ef003506
child 5288 d4381f3b0d1e
equal deleted inserted replaced
5263:e1122f31fec5 5264:7ace5f8f432f
   122 #define SDL_PIXELORDER(X)	(((X) >> 20) & 0x0F)
   122 #define SDL_PIXELORDER(X)	(((X) >> 20) & 0x0F)
   123 #define SDL_PIXELLAYOUT(X)	(((X) >> 16) & 0x0F)
   123 #define SDL_PIXELLAYOUT(X)	(((X) >> 16) & 0x0F)
   124 #define SDL_BITSPERPIXEL(X)	(((X) >> 8) & 0xFF)
   124 #define SDL_BITSPERPIXEL(X)	(((X) >> 8) & 0xFF)
   125 #define SDL_BYTESPERPIXEL(X) \
   125 #define SDL_BYTESPERPIXEL(X) \
   126     (SDL_ISPIXELFORMAT_FOURCC(X) ? \
   126     (SDL_ISPIXELFORMAT_FOURCC(X) ? \
   127         ((((X) == SDL_PIXELFORMAT_YV12) || \
   127         ((((X) == SDL_PIXELFORMAT_YUY2) || \
   128           ((X) == SDL_PIXELFORMAT_IYUV) || \
       
   129           ((X) == SDL_PIXELFORMAT_YUY2) || \
       
   130           ((X) == SDL_PIXELFORMAT_UYVY) || \
   128           ((X) == SDL_PIXELFORMAT_UYVY) || \
   131           ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
   129           ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
   132 
   130 
   133 #define SDL_ISPIXELFORMAT_INDEXED(format)   \
   131 #define SDL_ISPIXELFORMAT_INDEXED(format)   \
   134     (!SDL_ISPIXELFORMAT_FOURCC(format) && \
   132     (!SDL_ISPIXELFORMAT_FOURCC(format) && \