X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fpixel_ops.h;h=d390adfd1b3ef401a3fcbce8b5e86bd14b26584e;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=5334f1dbf470892cb7e8d3b6e1db8bac029087be;hpb=ece096bbdc09f7cce3afc755e9d8030a119086f1;p=qemu diff --git a/hw/pixel_ops.h b/hw/pixel_ops.h index 5334f1d..d390adf 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) {