mirror of https://github.com/inolen/redream.git
added support for vq compressed YUV422 textures
This commit is contained in:
parent
223b3a5d9a
commit
414c290f80
|
@ -462,6 +462,7 @@ define_convert_pal8(ARGB8888, RGBA);
|
||||||
define_convert_vq(ARGB1555, RGBA);
|
define_convert_vq(ARGB1555, RGBA);
|
||||||
define_convert_vq(RGB565, RGBA);
|
define_convert_vq(RGB565, RGBA);
|
||||||
define_convert_vq(ARGB4444, RGBA);
|
define_convert_vq(ARGB4444, RGBA);
|
||||||
|
define_convert_vq(UYVY422, RGBA);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* texture loading
|
* texture loading
|
||||||
|
@ -640,10 +641,10 @@ void pvr_tex_decode(const uint8_t *src, int width, int height, int stride,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PVR_PXL_YUV422:
|
case PVR_PXL_YUV422:
|
||||||
CHECK(!compressed);
|
if (compressed) {
|
||||||
if (twiddled) {
|
convert_vq_UYVY422_RGBA(index, codebook, dst32, width, height);
|
||||||
|
} else if (twiddled) {
|
||||||
convert_twiddled_UYVY422_RGBA(src16, dst32, width, height);
|
convert_twiddled_UYVY422_RGBA(src16, dst32, width, height);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
convert_bitmap_UYVY422_RGBA(src16, dst32, width, height, stride);
|
convert_bitmap_UYVY422_RGBA(src16, dst32, width, height, stride);
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,10 +256,10 @@ EMITTER(FTOI, CONSTRAINTS(REG_I64, REG_F64)) {
|
||||||
|
|
||||||
switch (RES->type) {
|
switch (RES->type) {
|
||||||
case VALUE_I32: {
|
case VALUE_I32: {
|
||||||
/* cvttss2si saturates both underflows and overflows to INT32_MIN, where as
|
/* cvttss2si saturates both underflows and overflows to INT32_MIN, while
|
||||||
FTOI should saturate underflows to INT32_MIN and overflows to INT32_MAX
|
OP_FTOI should saturate underflows to INT32_MIN and overflows to
|
||||||
|
INT32_MAX. due to this difference, the value must be manually clamped
|
||||||
due to this difference, the value must be manually clamped beforehand */
|
beforehand */
|
||||||
Xbyak::Address min_int32 =
|
Xbyak::Address min_int32 =
|
||||||
x64_backend_xmm_constant(backend, XMM_CONST_PD_MIN_INT32);
|
x64_backend_xmm_constant(backend, XMM_CONST_PD_MIN_INT32);
|
||||||
Xbyak::Address max_int32 =
|
Xbyak::Address max_int32 =
|
||||||
|
|
Loading…
Reference in New Issue