[PATCH] substituted unit for bpp in xy cases of get_pixel and put_pixel; substituted max for min in conversion unit computation
Bart Massey
bart at cs.pdx.edu
Sun Jul 27 00:58:02 PDT 2008
---
image/xcb_image.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/image/xcb_image.c b/image/xcb_image.c
index ee374cc..66142ca 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -550,7 +550,7 @@ xcb_image_put_pixel (xcb_image_t *image,
int p;
uint32_t plane_mask = image->plane_mask;
uint8_t * plane = row;
- uint32_t ulog = image->bpp >> 4;
+ uint32_t ulog = image->unit >> 4;
uint32_t unit = (x >> 3) & ~xcb_mask(ulog);
uint32_t byte = (x >> 3) & xcb_mask(ulog);
uint32_t bit = x & 7;
@@ -664,7 +664,7 @@ xcb_image_get_pixel (xcb_image_t *image,
int p;
uint32_t plane_mask = image->plane_mask;
uint8_t * plane = row;
- uint32_t ulog = image->bpp >> 4;
+ uint32_t ulog = image->unit >> 4;
uint32_t unit = (x >> 3) & ~xcb_mask(ulog);
uint32_t byte = (x >> 3) & xcb_mask(ulog);
uint32_t bit = x & 7;
@@ -971,7 +971,7 @@ xcb_image_convert (xcb_image_t * src,
int bitswap = src->bit_order != dst->bit_order;
uint8_t unit = src->unit;
- if (dst->unit < unit)
+ if (dst->unit > unit)
unit = dst->unit;
swap_image(src->data, src->stride,
dst->data, dst->stride,
--
1.5.6
------- =_aaaaaaaaaa0--
More information about the Xcb
mailing list