*/
+#include "util/u_debug.h"
#include "util/u_format_yuv.h"
float r, g0, g1, b;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
r = ubyte_to_float((value >> 0) & 0xff);
g0 = ubyte_to_float((value >> 8) & 0xff);
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
r = ubyte_to_float((value >> 0) & 0xff);
g0 = ubyte_to_float((value >> 8) & 0xff);
uint8_t r, g0, g1, b;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
r = (value >> 0) & 0xff;
g0 = (value >> 8) & 0xff;
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
r = (value >> 0) & 0xff;
g0 = (value >> 8) & 0xff;
value |= float_to_ubyte(b) << 16;
value |= float_to_ubyte(g1) << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= float_to_ubyte(b) << 16;
value |= float_to_ubyte(g1) << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
value |= b << 16;
value |= g1 << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= b << 16;
value |= g1 << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
float r, g0, g1, b;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
g0 = ubyte_to_float((value >> 0) & 0xff);
r = ubyte_to_float((value >> 8) & 0xff);
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
g0 = ubyte_to_float((value >> 0) & 0xff);
r = ubyte_to_float((value >> 8) & 0xff);
uint8_t r, g0, g1, b;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
g0 = (value >> 0) & 0xff;
r = (value >> 8) & 0xff;
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
g0 = (value >> 0) & 0xff;
r = (value >> 8) & 0xff;
value |= float_to_ubyte(g1) << 16;
value |= float_to_ubyte(b) << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= float_to_ubyte(g1) << 16;
value |= float_to_ubyte(b) << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
value |= g1 << 16;
value |= b << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= g1 << 16;
value |= b << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
uint8_t y0, y1, u, v;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
u = (value >> 0) & 0xff;
y0 = (value >> 8) & 0xff;
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
u = (value >> 0) & 0xff;
y0 = (value >> 8) & 0xff;
uint8_t y0, y1, u, v;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
u = (value >> 0) & 0xff;
y0 = (value >> 8) & 0xff;
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
u = (value >> 0) & 0xff;
y0 = (value >> 8) & 0xff;
value |= v << 16;
value |= y1 << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= v << 16;
value |= y1 << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
value |= v << 16;
value |= y1 << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= v << 16;
value |= y1 << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
uint8_t y0, y1, u, v;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
y0 = (value >> 0) & 0xff;
u = (value >> 8) & 0xff;
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
y0 = (value >> 0) & 0xff;
u = (value >> 8) & 0xff;
uint8_t y0, y1, u, v;
for (x = 0; x + 1 < width; x += 2) {
- value = *src++;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src++);
y0 = (value >> 0) & 0xff;
u = (value >> 8) & 0xff;
}
if (x < width) {
- value = *src;
-
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
+ value = util_cpu_to_le32(*src);
y0 = (value >> 0) & 0xff;
u = (value >> 8) & 0xff;
value |= y1 << 16;
value |= v << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= y1 << 16;
value |= v << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
value |= y1 << 16;
value |= v << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst++ = value;
+ *dst++ = util_le32_to_cpu(value);
src += 8;
}
value |= y1 << 16;
value |= v << 24;
-#ifdef PIPE_ARCH_BIG_ENDIAN
- value = util_bswap32(value);
-#endif
-
- *dst = value;
+ *dst = util_le32_to_cpu(value);
}
dst_row += dst_stride/sizeof(*dst_row);
util_format_nv21_fetch_rgba_float(float *dst, const uint8_t *src,
unsigned i, unsigned j) {}
void
-util_format_ia44_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+util_format_p016_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height) {}
void
-util_format_ia44_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+util_format_p016_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height) {}
void
-util_format_ia44_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+util_format_p016_unpack_rgba_float(float *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height) {}
void
-util_format_ia44_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+util_format_p016_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
const float *src_row, unsigned src_stride,
unsigned width, unsigned height) {}
void
-util_format_ia44_fetch_rgba_float(float *dst, const uint8_t *src,
+util_format_p016_fetch_rgba_float(float *dst, const uint8_t *src,
unsigned i, unsigned j) {}
+
void
-util_format_ai44_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
- const uint8_t *src_row, unsigned src_stride,
- unsigned width, unsigned height) {}
+util_format_r8g8_r8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
void
-util_format_ai44_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
- const uint8_t *src_row, unsigned src_stride,
- unsigned width, unsigned height) {}
+util_format_r8g8_r8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
void
-util_format_ai44_unpack_rgba_float(float *dst_row, unsigned dst_stride,
- const uint8_t *src_row, unsigned src_stride,
- unsigned width, unsigned height) {}
+util_format_r8g8_r8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
void
-util_format_ai44_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
- const float *src_row, unsigned src_stride,
- unsigned width, unsigned height) {}
+util_format_r8g8_r8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
void
-util_format_ai44_fetch_rgba_float(float *dst, const uint8_t *src,
- unsigned i, unsigned j) {}
+util_format_r8g8_r8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+
+void
+util_format_g8r8_b8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}