const uint32_t *pixel = (const uint32_t *)bits + x;
const uint32_t *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, READ(pixel++) | 0xff000000);
+ *buffer++ = READ(pixel++) | 0xff000000;
}
}
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, ((READ(pixel) & 0xff00ff00) |
- ((READ(pixel) >> 16) & 0xff) |
- ((READ(pixel) & 0xff) << 16)));
- ++pixel;
+ uint32_t p = READ(pixel++);
+ *buffer++ = (p & 0xff00ff00) |
+ ((p >> 16) & 0xff) |
+ ((p & 0xff) << 16);
}
}
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, 0xff000000 |
- ((READ(pixel) & 0x0000ff00) |
- ((READ(pixel) >> 16) & 0xff) |
- ((READ(pixel) & 0xff) << 16)));
- ++pixel;
+ uint32_t p = READ(pixel++);
+ *buffer++ = 0xff000000 |
+ (p & 0x0000ff00) |
+ ((p >> 16) & 0xff) |
+ ((p & 0xff) << 16);
}
}
while (pixel < end) {
uint32_t b = Fetch24(pixel) | 0xff000000;
pixel += 3;
- WRITE(buffer++, b);
+ *buffer++ = b;
}
}
b |= (READ(pixel++) << 8);
b |= (READ(pixel++));
#endif
- WRITE(buffer++, b);
+ *buffer++ = b;
}
}
const uint16_t *pixel = (const uint16_t *)bits + x;
const uint16_t *end = pixel + width;
while (pixel < end) {
- uint32_t p = READ(pixel++);
+ uint32_t p = READ(pixel++);
uint32_t r = (((p) << 3) & 0xf8) |
(((p) << 5) & 0xfc00) |
(((p) << 8) & 0xf80000);
r |= (r >> 5) & 0x70007;
r |= (r >> 6) & 0x300;
- WRITE(buffer++, 0xff000000 | r);
+ *buffer++ = 0xff000000 | r;
}
}
b = ((p & 0xf800) | ((p & 0xe000) >> 5)) >> 8;
g = ((p & 0x07e0) | ((p & 0x0600) >> 6)) << 5;
r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2;
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = a | r | g | b;
}
}
r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = a | r | g | b;
}
}
b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
b = ((p & 0x000f) | ((p & 0x000f) << 4));
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = a | r | g | b;
}
}
r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
b = ((p & 0x000f) | ((p & 0x000f) << 4));
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16;
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = a | r | g | b;
}
}
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
const uint8_t *pixel = (const uint8_t *)bits + x;
const uint8_t *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, READ(pixel++) << 24);
+ *buffer++ = READ(pixel++) << 24;
}
}
((p & 0x03) << 2) |
((p & 0x03) << 4) |
((p & 0x03) << 6));
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
r = (((p & 0x07) ) |
((p & 0x07) << 3) |
((p & 0x06) << 6)) << 16;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = 0xff000000 | r | g | b;
}
}
r = ((p & 0x30) * 0x55) << 12;
g = ((p & 0x0c) * 0x55) << 6;
b = ((p & 0x03) * 0x55);
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
b = ((p & 0x30) * 0x55) >> 6;
g = ((p & 0x0c) * 0x55) << 6;
r = ((p & 0x03) * 0x55) << 16;
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
const uint8_t *end = pixel + width;
while (pixel < end) {
uint32_t p = READ(pixel++);
- WRITE(buffer++, indexed->rgba[p]);
+ *buffer++ = indexed->rgba[p];
}
}
const uint8_t *end = pixel + width;
while (pixel < end) {
uint8_t p = READ(pixel++) & 0xf;
- WRITE(buffer++, (p | (p << 4)) << 24);
+ *buffer++ = (p | (p << 4)) << 24;
}
}
-#define Fetch8(l,o) (((uint8_t *) (l))[(o) >> 2])
+#define Fetch8(l,o) (READ((uint8_t *)(l) + ((o) >> 2)))
#if IMAGE_BYTE_ORDER == MSBFirst
#define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
#else
uint32_t p = Fetch4(bits, i + x);
p |= p << 4;
- WRITE(buffer++, p << 24);
+ *buffer++ = p << 24;
}
}
r = ((p & 0x8) * 0xff) << 13;
g = ((p & 0x6) * 0x55) << 7;
b = ((p & 0x1) * 0xff);
- WRITE(buffer++, 0xff000000|r|g|b);
+ *buffer++ = 0xff000000|r|g|b;
}
}
b = ((p & 0x8) * 0xff) >> 3;
g = ((p & 0x6) * 0x55) << 7;
r = ((p & 0x1) * 0xff) << 16;
- WRITE(buffer++, 0xff000000|r|g|b);
+ *buffer++ = 0xff000000|r|g|b;
}
}
r = ((p & 0x4) * 0xff) << 14;
g = ((p & 0x2) * 0xff) << 7;
b = ((p & 0x1) * 0xff);
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
r = ((p & 0x4) * 0xff) >> 3;
g = ((p & 0x2) * 0xff) << 7;
b = ((p & 0x1) * 0xff) << 16;
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
for (i = 0; i < width; ++i) {
uint32_t p = Fetch4(bits, i + x);
- WRITE(buffer++, indexed->rgba[p]);
+ *buffer++ = indexed->rgba[p];
}
}
{
int i;
for (i = 0; i < width; ++i) {
- uint32_t p = ((uint32_t *)bits)[(i + x) >> 5];
+ uint32_t p = READ(bits + ((i + x) >> 5));
uint32_t a;
#if BITMAP_BIT_ORDER == MSBFirst
a = p >> (0x1f - ((i+x) & 0x1f));
a |= a << 1;
a |= a << 2;
a |= a << 4;
- WRITE(buffer++, a << 24);
+ *buffer++ = a << 24;
}
}
{
int i;
for (i = 0; i < width; ++i) {
- uint32_t p = ((uint32_t *)bits)[(i+x) >> 5];
+ uint32_t p = READ(bits + ((i+x) >> 5));
uint32_t a;
#if BITMAP_BIT_ORDER == MSBFirst
a = p >> (0x1f - ((i+x) & 0x1f));
a = p >> ((i+x) & 0x1f);
#endif
a = a & 1;
- WRITE(buffer++, indexed->rgba[a]);
+ *buffer++ = indexed->rgba[a];
}
}
return ((pixel & 0xf) | ((pixel & 0xf) << 4)) << 24;
}
-#define Fetch8(l,o) (((uint8_t *) (l))[(o) >> 2])
+#define Fetch8(l,o) (READ((uint8_t *)(l) + ((o) >> 2)))
#if IMAGE_BYTE_ORDER == MSBFirst
#define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
#else
int i;
uint32_t *pixel = (uint32_t *)bits + x;
for (i = 0; i < width; ++i)
- WRITE(pixel++, READ(values + i) & 0xffffff);
+ WRITE(pixel++, values[i] & 0xffffff);
}
static FASTCALL void
int i;
uint32_t *pixel = (uint32_t *)bits + x;
for (i = 0; i < width; ++i)
- WRITE(pixel++, (READ(values + i) & 0xff00ff00) | ((READ(values + i) >> 16) & 0xff) | ((READ(values + i) & 0xff) << 16));
+ WRITE(pixel++, (values[i] & 0xff00ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16));
}
static FASTCALL void
int i;
uint32_t *pixel = (uint32_t *)bits + x;
for (i = 0; i < width; ++i)
- WRITE(pixel++, (READ(values + i) & 0x0000ff00) | ((READ(values + i) >> 16) & 0xff) | ((READ(values + i) & 0xff) << 16));
+ WRITE(pixel++, (values[i] & 0x0000ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16));
}
static FASTCALL void
int i;
uint8_t *pixel = ((uint8_t *) bits) + 3*x;
for (i = 0; i < width; ++i) {
- Store24(pixel, READ(values + i));
+ Store24(pixel, values[i]);
pixel += 3;
}
}
int i;
uint8_t *pixel = ((uint8_t *) bits) + 3*x;
for (i = 0; i < width; ++i) {
- uint32_t val = READ(values + i);
+ uint32_t val = values[i];
#if IMAGE_BYTE_ORDER == MSBFirst
WRITE(pixel++, Blue(val));
WRITE(pixel++, Green(val));
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- uint32_t s = READ(values + i);
+ uint32_t s = values[i];
WRITE(pixel++, ((s >> 3) & 0x001f) |
((s >> 5) & 0x07e0) |
((s >> 8) & 0xf800));
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++, ((b << 8) & 0xf800) |
((g << 3) & 0x07e0) |
((r >> 3) ));
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
+ Splita(values[i]);
WRITE(pixel++, ((a << 8) & 0x8000) |
((r << 7) & 0x7c00) |
((g << 2) & 0x03e0) |
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++, ((r << 7) & 0x7c00) |
((g << 2) & 0x03e0) |
((b >> 3) ));
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
+ Splita(values[i]);
WRITE(pixel++, ((a << 8) & 0x8000) |
((b << 7) & 0x7c00) |
((g << 2) & 0x03e0) |
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++, ((b << 7) & 0x7c00) |
((g << 2) & 0x03e0) |
((r >> 3) ));
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
+ Splita(values[i]);
WRITE(pixel++, ((a << 8) & 0xf000) |
((r << 4) & 0x0f00) |
((g ) & 0x00f0) |
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++, ((r << 4) & 0x0f00) |
((g ) & 0x00f0) |
((b >> 4) ));
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
+ Splita(values[i]);
WRITE(pixel++, ((a << 8) & 0xf000) |
((b << 4) & 0x0f00) |
((g ) & 0x00f0) |
int i;
uint16_t *pixel = ((uint16_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++, ((b << 4) & 0x0f00) |
((g ) & 0x00f0) |
((r >> 4) ));
int i;
uint8_t *pixel = ((uint8_t *) bits) + x;
for (i = 0; i < width; ++i) {
- WRITE(pixel++, READ(values + i) >> 24);
+ WRITE(pixel++, values[i] >> 24);
}
}
int i;
uint8_t *pixel = ((uint8_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++,
((r ) & 0xe0) |
((g >> 3) & 0x1c) |
int i;
uint8_t *pixel = ((uint8_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
+ Split(values[i]);
WRITE(pixel++,
((b ) & 0xc0) |
((g >> 2) & 0x1c) |
int i;
uint8_t *pixel = ((uint8_t *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
+ Splita(values[i]);
WRITE(pixel++, ((a ) & 0xc0) |
((r >> 2) & 0x30) |
((g >> 4) & 0x0c) |
int i;
uint8_t *pixel = ((uint8_t *) bits) + x;
for (i = 0; i < width; ++i) {
- WRITE(pixel++, miIndexToEnt24(indexed,READ(values + i)));
+ WRITE(pixel++, miIndexToEnt24(indexed,values[i]));
}
}
int i;
uint8_t *pixel = ((uint8_t *) bits) + x;
for (i = 0; i < width; ++i) {
- WRITE(pixel++, READ(values + i) >> 28);
+ WRITE(pixel++, values[i] >> 28);
}
}
-#define Store8(l,o,v) (((uint8_t *) l)[(o) >> 3] = (v))
+#define Store8(l,o,v) (WRITE((uint8_t *)(l) + ((o) >> 3), (v)))
#if IMAGE_BYTE_ORDER == MSBFirst
#define Store4(l,o,v) Store8(l,o,((o) & 4 ? \
(Fetch8(l,o) & 0xf0) | (v) : \
{
int i;
for (i = 0; i < width; ++i) {
- Store4(bits, i + x, READ(values + i)>>28);
+ Store4(bits, i + x, values[i]>>28);
}
}
for (i = 0; i < width; ++i) {
uint32_t pixel;
- Split(READ(values + i));
+ Split(values[i]);
pixel = (((r >> 4) & 0x8) |
((g >> 5) & 0x6) |
((b >> 7) ));
for (i = 0; i < width; ++i) {
uint32_t pixel;
- Split(READ(values + i));
+ Split(values[i]);
pixel = (((b >> 4) & 0x8) |
((g >> 5) & 0x6) |
((r >> 7) ));
int i;
for (i = 0; i < width; ++i) {
uint32_t pixel;
- Splita(READ(values + i));
+ Splita(values[i]);
pixel = (((a >> 4) & 0x8) |
((r >> 5) & 0x4) |
((g >> 6) & 0x2) |
int i;
for (i = 0; i < width; ++i) {
uint32_t pixel;
- Splita(READ(values + i));
+ Splita(values[i]);
pixel = (((a >> 4) & 0x8) |
((b >> 5) & 0x4) |
((g >> 6) & 0x2) |
for (i = 0; i < width; ++i) {
uint32_t pixel;
- pixel = miIndexToEnt24(indexed, READ(values + i));
+ pixel = miIndexToEnt24(indexed, values[i]);
Store4(bits, i + x, pixel);
}
}
uint32_t *pixel = ((uint32_t *) bits) + ((i+x) >> 5);
uint32_t mask = FbStipMask((i+x) & 0x1f, 1);
- uint32_t v = READ(values + i) & 0x80000000 ? mask : 0;
+ uint32_t v = values[i] & 0x80000000 ? mask : 0;
WRITE(pixel, (READ(pixel) & ~mask) | v);
}
}
uint32_t *pixel = ((uint32_t *) bits) + ((i+x) >> 5);
uint32_t mask = FbStipMask((i+x) & 0x1f, 1);
- uint32_t v = miIndexToEntY24(indexed,READ(values + i)) ? mask : 0;
+ uint32_t v = miIndexToEntY24(indexed,values[i]) ? mask : 0;
WRITE(pixel, (READ(pixel) & ~mask) | v);
}
}