mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Hybrid XFB: Fix lint errors
This commit is contained in:
parent
61541ab243
commit
8d1cbeb25e
@ -986,12 +986,14 @@ TextureCacheBase::GetTexture(u32 address, u32 width, u32 height, const TextureFo
|
||||
dst_buffer = temp;
|
||||
if (!(texformat == TextureFormat::RGBA8 && from_tmem))
|
||||
{
|
||||
TexDecoder_Decode(dst_buffer, src_data, expandedWidth, expandedHeight, texformat, tlut, tlutfmt);
|
||||
TexDecoder_Decode(dst_buffer, src_data, expandedWidth, expandedHeight, texformat, tlut,
|
||||
tlutfmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
u8* src_data_gb = &texMem[tmem_address_odd];
|
||||
TexDecoder_DecodeRGBA8FromTmem(dst_buffer, src_data, src_data_gb, expandedWidth, expandedHeight);
|
||||
TexDecoder_DecodeRGBA8FromTmem(dst_buffer, src_data, src_data_gb, expandedWidth,
|
||||
expandedHeight);
|
||||
}
|
||||
|
||||
entry->texture->Load(0, width, height, expandedWidth, dst_buffer, decoded_texture_size);
|
||||
@ -1148,8 +1150,7 @@ TextureCacheBase::GetXFBTexture(u32 address, u32 width, u32 height, TextureForma
|
||||
const std::string xfb_type = loaded_from_overlapping ? "combined" : "from_memory";
|
||||
entry->texture->Save(StringFromFormat("%sxfb_%s_%i.png",
|
||||
File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(),
|
||||
xfb_type.c_str(),
|
||||
xfb_count++),
|
||||
xfb_type.c_str(), xfb_count++),
|
||||
0);
|
||||
}
|
||||
|
||||
|
@ -1504,11 +1504,13 @@ void _TexDecoder_DecodeImpl(u32* dst, const u8* src, int width, int height, Text
|
||||
// We do the inverse BT.601 conversion for YCbCr to RGB
|
||||
// http://www.equasys.de/colorconversion.html#YCbCr-RGBColorFormatConversion
|
||||
u8 R1 = static_cast<u8>(MathUtil::Clamp(int(1.164f * Y1 + 1.596f * V), 0, 255));
|
||||
u8 G1 = static_cast<u8>(MathUtil::Clamp(int(1.164f * Y1 - 0.392f * U - 0.813f * V), 0, 255));
|
||||
u8 G1 =
|
||||
static_cast<u8>(MathUtil::Clamp(int(1.164f * Y1 - 0.392f * U - 0.813f * V), 0, 255));
|
||||
u8 B1 = static_cast<u8>(MathUtil::Clamp(int(1.164f * Y1 + 2.017f * U), 0, 255));
|
||||
|
||||
u8 R2 = static_cast<u8>(MathUtil::Clamp(int(1.164f * Y2 + 1.596f * V), 0, 255));
|
||||
u8 G2 = static_cast<u8>(MathUtil::Clamp(int(1.164f * Y2 - 0.392f * U - 0.813f * V), 0, 255));
|
||||
u8 G2 =
|
||||
static_cast<u8>(MathUtil::Clamp(int(1.164f * Y2 - 0.392f * U - 0.813f * V), 0, 255));
|
||||
u8 B2 = static_cast<u8>(MathUtil::Clamp(int(1.164f * Y2 + 2.017f * U), 0, 255));
|
||||
|
||||
dst[y * width + x] = 0xff000000 | B1 << 16 | G1 << 8 | R1;
|
||||
|
Loading…
Reference in New Issue
Block a user