}
}
+/* Expects a uint64_t buffer */
static void
-fbFetch_a2b10g10r10 (bits_image_t *pict, int x, int y, int width, uint64_t *buffer)
+fbFetch_a2b10g10r10 (bits_image_t *pict, int x, int y, int width, uint32_t *b)
{
const uint32_t *bits = pict->bits + y*pict->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
+ uint64_t *buffer = (uint64_t *)b;
+
while (pixel < end) {
uint32_t p = READ(pict, pixel++);
uint64_t a = p >> 30;
}
}
+/* Expects a uint64_t buffer */
static void
-fbFetch_x2b10g10r10 (bits_image_t *pict, int x, int y, int width, uint64_t *buffer)
+fbFetch_x2b10g10r10 (bits_image_t *pict, int x, int y, int width, uint32_t *b)
{
const uint32_t *bits = pict->bits + y*pict->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
+ uint64_t *buffer = (uint64_t *)b;
+
while (pixel < end) {
uint32_t p = READ(pict, pixel++);
uint64_t b = (p >> 20) & 0x3ff;
/**************************** Pixel wise fetching *****************************/
+/* Despite the type, expects a uint64_t buffer */
static void
-fbFetchPixel_a2b10g10r10 (bits_image_t *pict, uint64_t *buffer, int n_pixels)
+fbFetchPixel_a2b10g10r10_64 (bits_image_t *pict, uint32_t *b, int n_pixels)
{
int i;
+ uint64_t *buffer = (uint64_t *)b;
for (i = 0; i < n_pixels; ++i)
{
}
}
+/* Despite the type, this function expects a uint64_t buffer */
static void
-fbFetchPixel_x2b10g10r10 (bits_image_t *pict, uint64_t *buffer, int n_pixels)
+fbFetchPixel_x2b10g10r10_64 (bits_image_t *pict, uint32_t *b, int n_pixels)
{
+ uint64_t *buffer = (uint64_t *)b;
int i;
for (i = 0; i < n_pixels; ++i)
free(argb8Pixels);
}
+/* Despite the type, this function expects a uint64_t buffer */
static void
-fbFetch64_generic (bits_image_t *pict, int x, int y, int width, uint64_t *buffer)
+fbFetch64_generic (bits_image_t *pict, int x, int y, int width, uint32_t *buffer)
{
/* Fetch the pixels into the first half of buffer and then expand them in
* place.
*/
- pict->fetch_scanline_raw_32 (pict, x, y, width, (uint32_t*)buffer);
+ pict->fetch_scanline_raw_32 (pict, x, y, width, buffer);
- pixman_expand (buffer, (uint32_t*)buffer, pict->format, width);
+ pixman_expand ((uint64_t *)buffer, buffer, pict->format, width);
}
+/* Despite the type, this function expects a uint64_t *buffer */
static void
-fbFetchPixel64_generic (bits_image_t *pict, uint64_t *buffer, int n_pixels)
+fbFetchPixel64_generic (bits_image_t *pict, uint32_t *buffer, int n_pixels)
{
- pict->fetch_pixels_raw_32 (pict, (uint32_t *)buffer, n_pixels);
+ pict->fetch_pixels_raw_32 (pict, buffer, n_pixels);
- pixman_expand (buffer, (uint32_t *)buffer, pict->format, n_pixels);
+ pixman_expand ((uint64_t *)buffer, buffer, pict->format, n_pixels);
}
/*
fbFetchPixel32_generic_lossy (bits_image_t *pict, uint32_t *buffer, int n_pixels)
{
/* Since buffer contains n_pixels coordinate pairs, it also has enough room for
- * n_pixels 64 bit pixels
+ * n_pixels 64 bit pixels.
*/
- pict->fetch_pixels_raw_64 (pict, (uint64_t *)buffer, n_pixels);
+ pict->fetch_pixels_raw_64 (pict, buffer, n_pixels);
pixman_contract (buffer, (uint64_t *)buffer, n_pixels);
}
{
pixman_format_code_t format;
fetchProc32 fetch_scanline_raw_32;
- fetchProc64 fetch_scanline_raw_64;
+ fetchProc32 fetch_scanline_raw_64;
fetch_pixels_32_t fetch_pixels_raw_32;
- fetch_pixels_64_t fetch_pixels_raw_64;
+ fetch_pixels_32_t fetch_pixels_raw_64;
store_scanline_t store_scanline_raw_32;
store_scanline_t store_scanline_raw_64;
} format_info_t;
{ PIXMAN_a2b10g10r10,
NULL, fbFetch_a2b10g10r10,
- fbFetchPixel32_generic_lossy, fbFetchPixel_a2b10g10r10,
+ fbFetchPixel32_generic_lossy, fbFetchPixel_a2b10g10r10_64,
NULL, fbStore_a2b10g10r10 },
{ PIXMAN_x2b10g10r10,
NULL, fbFetch_x2b10g10r10,
- fbFetchPixel32_generic_lossy, fbFetchPixel_x2b10g10r10,
+ fbFetchPixel32_generic_lossy, fbFetchPixel_x2b10g10r10_64,
NULL, fbStore_x2b10g10r10 },
/* YUV formats */
coords[0] = 0;
coords[1] = 1;
- image->bits.fetch_pixels_raw_64 (&image->bits, (uint64_t *)color, 1);
+ image->bits.fetch_pixels_raw_64 (&image->bits, color, 1);
end = buffer + width;
while (buffer < end)
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_raw_64 (image, x, y, w, (uint64_t *)buffer);
+ image->fetch_scanline_raw_64 (image, x, y, w, buffer);
else
image->fetch_scanline_raw_32 (image, x, y, w, buffer);
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_raw_64 (image, x, y, w, (uint64_t *)buffer);
+ image->fetch_scanline_raw_64 (image, x, y, w, buffer);
else
image->fetch_scanline_raw_32 (image, x, y, w, buffer);
typedef void (*fetchProc32) (bits_image_t *pict,
int x, int y, int width,
uint32_t *buffer);
-typedef void (*fetchProc64) (bits_image_t *pict,
- int x, int y, int width,
- uint64_t *buffer);
typedef void (*fetch_pixels_32_t) (bits_image_t *image,
uint32_t *buffer, int n_pixels);
-typedef void (*fetch_pixels_64_t) (bits_image_t *image,
- uint64_t *buffer, int n_pixels);
typedef void (*scanFetchProc) (pixman_image_t *,
int, int, int, uint32_t *,
uint32_t *, uint32_t);
/* Fetch raw pixels, with no regard for transformations, alpha map etc. */
fetch_pixels_32_t fetch_pixels_raw_32;
- fetch_pixels_64_t fetch_pixels_raw_64;
+ fetch_pixels_32_t fetch_pixels_raw_64;
/* Fetch raw scanlines, with no regard for transformations, alpha maps etc. */
fetchProc32 fetch_scanline_raw_32;
- fetchProc64 fetch_scanline_raw_64;
+ fetchProc32 fetch_scanline_raw_64;
/* Store scanlines with no regard for alpha maps */
store_scanline_t store_scanline_raw_32;