diff options
Diffstat (limited to 'hw/pixel_ops.h')
-rw-r--r-- | hw/pixel_ops.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/pixel_ops.h b/hw/pixel_ops.h index 5334f1dbf4..d390adfd1b 100644 --- a/hw/pixel_ops.h +++ b/hw/pixel_ops.h @@ -28,6 +28,18 @@ static inline unsigned int rgb_to_pixel16bgr(unsigned int r, unsigned int g, return ((b >> 3) << 11) | ((g >> 2) << 5) | (r >> 3); } +static inline unsigned int rgb_to_pixel24(unsigned int r, unsigned int g, + unsigned int b) +{ + return (r << 16) | (g << 8) | b; +} + +static inline unsigned int rgb_to_pixel24bgr(unsigned int r, unsigned int g, + unsigned int b) +{ + return (b << 16) | (g << 8) | r; +} + static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, unsigned int b) { |