2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
|
|
#include "Common.h"
|
2009-01-16 16:28:33 +00:00
|
|
|
//#include "VideoCommon.h" // to get debug logs
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-01-14 11:28:48 +00:00
|
|
|
#include "CPUDetect.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
#include "TextureDecoder.h"
|
2009-10-07 21:30:36 +00:00
|
|
|
#include "OpenCL.h"
|
2009-09-30 12:58:02 +00:00
|
|
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
2009-10-07 21:30:36 +00:00
|
|
|
#include "OpenCL/OCLTextureDecoder.h"
|
2010-06-22 13:17:01 +00:00
|
|
|
#include "VideoConfig.h"
|
2009-09-30 00:28:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
#include "LookUpTables.h"
|
2009-02-19 01:24:33 +00:00
|
|
|
|
2010-07-31 14:40:01 +00:00
|
|
|
#include <cmath>
|
|
|
|
|
|
|
|
|
|
#if _M_SSE >= 0x401
|
|
|
|
|
#include <smmintrin.h>
|
2010-12-30 19:17:08 +00:00
|
|
|
#include <emmintrin.h>
|
2010-07-31 15:26:46 +00:00
|
|
|
#elif _M_SSE >= 0x301 && !(defined __GNUC__ && !defined __SSSE3__)
|
2010-07-31 14:40:01 +00:00
|
|
|
#include <tmmintrin.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
bool TexFmt_Overlay_Enable=false;
|
|
|
|
|
bool TexFmt_Overlay_Center=false;
|
2009-02-23 19:47:58 +00:00
|
|
|
|
|
|
|
|
extern const char* texfmt[];
|
|
|
|
|
extern const unsigned char sfont_map[];
|
|
|
|
|
extern const unsigned char sfont_raw[][9*10];
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
// TRAM
|
|
|
|
|
// STATE_TO_SAVE
|
|
|
|
|
u8 texMem[TMEM_SIZE];
|
|
|
|
|
|
2009-09-02 21:00:45 +00:00
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
// Gamecube/Wii texture decoder
|
2009-09-02 21:00:45 +00:00
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
// Decodes all known Gamecube/Wii texture formats.
|
|
|
|
|
// by ector
|
2009-09-02 21:00:45 +00:00
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
int TexDecoder_GetTexelSizeInNibbles(int format)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (format & 0x3f) {
|
|
|
|
|
case GX_TF_I4: return 1;
|
|
|
|
|
case GX_TF_I8: return 2;
|
|
|
|
|
case GX_TF_IA4: return 2;
|
|
|
|
|
case GX_TF_IA8: return 4;
|
|
|
|
|
case GX_TF_RGB565: return 4;
|
|
|
|
|
case GX_TF_RGB5A3: return 4;
|
|
|
|
|
case GX_TF_RGBA8: return 8;
|
|
|
|
|
case GX_TF_C4: return 1;
|
|
|
|
|
case GX_TF_C8: return 2;
|
|
|
|
|
case GX_TF_C14X2: return 4;
|
|
|
|
|
case GX_TF_CMPR: return 1;
|
2009-11-14 17:50:51 +00:00
|
|
|
case GX_CTF_R4: return 1;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_CTF_RA4: return 2;
|
|
|
|
|
case GX_CTF_RA8: return 4;
|
|
|
|
|
case GX_CTF_YUVA8: return 8;
|
|
|
|
|
case GX_CTF_A8: return 2;
|
|
|
|
|
case GX_CTF_R8: return 2;
|
|
|
|
|
case GX_CTF_G8: return 2;
|
|
|
|
|
case GX_CTF_B8: return 2;
|
|
|
|
|
case GX_CTF_RG8: return 4;
|
|
|
|
|
case GX_CTF_GB8: return 4;
|
2009-11-14 17:50:51 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_Z8: return 2;
|
|
|
|
|
case GX_TF_Z16: return 4;
|
2009-11-14 17:50:51 +00:00
|
|
|
case GX_TF_Z24X8: return 8;
|
|
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_CTF_Z4: return 1;
|
|
|
|
|
case GX_CTF_Z8M: return 2;
|
|
|
|
|
case GX_CTF_Z8L: return 2;
|
|
|
|
|
case GX_CTF_Z16L: return 4;
|
|
|
|
|
default: return 1;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int TexDecoder_GetTextureSizeInBytes(int width, int height, int format)
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
return (width * height * TexDecoder_GetTexelSizeInNibbles(format)) / 2;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-11 20:36:13 +00:00
|
|
|
int TexDecoder_GetBlockWidthInTexels(u32 format)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (format)
|
2009-07-26 09:52:35 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_I4: return 8;
|
|
|
|
|
case GX_TF_I8: return 8;
|
|
|
|
|
case GX_TF_IA4: return 8;
|
|
|
|
|
case GX_TF_IA8: return 4;
|
|
|
|
|
case GX_TF_RGB565: return 4;
|
|
|
|
|
case GX_TF_RGB5A3: return 4;
|
|
|
|
|
case GX_TF_RGBA8: return 4;
|
|
|
|
|
case GX_TF_C4: return 8;
|
|
|
|
|
case GX_TF_C8: return 8;
|
|
|
|
|
case GX_TF_C14X2: return 4;
|
|
|
|
|
case GX_TF_CMPR: return 8;
|
2009-08-11 20:36:13 +00:00
|
|
|
case GX_CTF_R4: return 8;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_CTF_RA4: return 8;
|
|
|
|
|
case GX_CTF_RA8: return 4;
|
|
|
|
|
case GX_CTF_A8: return 8;
|
|
|
|
|
case GX_CTF_R8: return 8;
|
|
|
|
|
case GX_CTF_G8: return 8;
|
|
|
|
|
case GX_CTF_B8: return 8;
|
|
|
|
|
case GX_CTF_RG8: return 4;
|
|
|
|
|
case GX_CTF_GB8: return 4;
|
2009-08-11 20:36:13 +00:00
|
|
|
case GX_TF_Z8: return 8;
|
|
|
|
|
case GX_TF_Z16: return 4;
|
|
|
|
|
case GX_TF_Z24X8: return 4;
|
|
|
|
|
case GX_CTF_Z4: return 8;
|
|
|
|
|
case GX_CTF_Z8M: return 8;
|
|
|
|
|
case GX_CTF_Z8L: return 8;
|
|
|
|
|
case GX_CTF_Z16L: return 4;
|
2011-01-01 03:52:32 +00:00
|
|
|
default:
|
2009-08-11 13:58:35 +00:00
|
|
|
ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockWidthInTexels)", format);
|
|
|
|
|
return 8;
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-11 20:36:13 +00:00
|
|
|
int TexDecoder_GetBlockHeightInTexels(u32 format)
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (format)
|
2009-07-26 09:52:35 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_I4: return 8;
|
|
|
|
|
case GX_TF_I8: return 4;
|
|
|
|
|
case GX_TF_IA4: return 4;
|
|
|
|
|
case GX_TF_IA8: return 4;
|
|
|
|
|
case GX_TF_RGB565: return 4;
|
|
|
|
|
case GX_TF_RGB5A3: return 4;
|
|
|
|
|
case GX_TF_RGBA8: return 4;
|
|
|
|
|
case GX_TF_C4: return 8;
|
|
|
|
|
case GX_TF_C8: return 4;
|
|
|
|
|
case GX_TF_C14X2: return 4;
|
|
|
|
|
case GX_TF_CMPR: return 8;
|
2009-08-11 20:36:13 +00:00
|
|
|
case GX_CTF_R4: return 8;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_CTF_RA4: return 4;
|
|
|
|
|
case GX_CTF_RA8: return 4;
|
|
|
|
|
case GX_CTF_A8: return 4;
|
|
|
|
|
case GX_CTF_R8: return 4;
|
|
|
|
|
case GX_CTF_G8: return 4;
|
|
|
|
|
case GX_CTF_B8: return 4;
|
|
|
|
|
case GX_CTF_RG8: return 4;
|
|
|
|
|
case GX_CTF_GB8: return 4;
|
2009-08-11 20:36:13 +00:00
|
|
|
case GX_TF_Z8: return 4;
|
2009-11-15 20:14:03 +00:00
|
|
|
case GX_TF_Z16: return 4;
|
2009-12-02 04:17:18 +00:00
|
|
|
case GX_TF_Z24X8: return 4;
|
2009-08-11 20:36:13 +00:00
|
|
|
case GX_CTF_Z4: return 8;
|
|
|
|
|
case GX_CTF_Z8M: return 4;
|
|
|
|
|
case GX_CTF_Z8L: return 4;
|
2009-11-15 20:14:03 +00:00
|
|
|
case GX_CTF_Z16L: return 4;
|
2011-01-01 03:52:32 +00:00
|
|
|
default:
|
2009-08-11 13:58:35 +00:00
|
|
|
ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockHeightInTexels)", format);
|
|
|
|
|
return 4;
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2009-05-09 07:55:30 +00:00
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
//returns bytes
|
|
|
|
|
int TexDecoder_GetPaletteSize(int format)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (format)
|
2009-07-26 09:52:35 +00:00
|
|
|
{
|
|
|
|
|
case GX_TF_C4: return 16 * 2;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C8: return 256 * 2;
|
|
|
|
|
case GX_TF_C14X2: return 16384 * 2;
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline u32 decodeIA8(u16 val)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
int a = val >> 8;
|
|
|
|
|
int i = val & 0xFF;
|
|
|
|
|
return (a << 24) | (i << 16) | (i << 8) | i;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline u32 decode5A3(u16 val)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
int r,g,b,a;
|
|
|
|
|
if ((val & 0x8000))
|
|
|
|
|
{
|
|
|
|
|
a = 0xFF;
|
2009-07-30 20:29:52 +00:00
|
|
|
r = Convert5To8((val >> 10) & 0x1F);
|
|
|
|
|
g = Convert5To8((val >> 5) & 0x1F);
|
|
|
|
|
b = Convert5To8(val & 0x1F);
|
2009-05-09 07:55:30 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
else
|
|
|
|
|
{
|
2009-07-30 20:29:52 +00:00
|
|
|
a = Convert3To8((val >> 12) & 0x7);
|
|
|
|
|
r = Convert4To8((val >> 8) & 0xF);
|
|
|
|
|
g = Convert4To8((val >> 4) & 0xF);
|
|
|
|
|
b = Convert4To8(val & 0xF);
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
return (a << 24) | (r << 16) | (g << 8) | b;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline u32 decode5A3RGBA(u16 val)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
int r,g,b,a;
|
|
|
|
|
if ((val&0x8000))
|
|
|
|
|
{
|
|
|
|
|
r=Convert5To8((val>>10) & 0x1f);
|
|
|
|
|
g=Convert5To8((val>>5 ) & 0x1f);
|
|
|
|
|
b=Convert5To8((val ) & 0x1f);
|
|
|
|
|
a=0xFF;
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
a=Convert3To8((val>>12) & 0x7);
|
|
|
|
|
r=Convert4To8((val>>8 ) & 0xf);
|
|
|
|
|
g=Convert4To8((val>>4 ) & 0xf);
|
|
|
|
|
b=Convert4To8((val ) & 0xf);
|
|
|
|
|
}
|
|
|
|
|
return r | (g<<8) | (b << 16) | (a << 24);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2010-12-30 19:17:08 +00:00
|
|
|
inline u32 decode565RGBA(u16 val)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
int r,g,b,a;
|
|
|
|
|
r=Convert5To8((val>>11) & 0x1f);
|
|
|
|
|
g=Convert6To8((val>>5 ) & 0x3f);
|
|
|
|
|
b=Convert5To8((val ) & 0x1f);
|
|
|
|
|
a=0xFF;
|
|
|
|
|
return r | (g<<8) | (b << 16) | (a << 24);
|
2010-12-30 19:17:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline u32 decodeIA8Swapped(u16 val)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
int a = val & 0xFF;
|
|
|
|
|
int i = val >> 8;
|
|
|
|
|
return i | (i<<8) | (i<<16) | (a<<24);
|
2010-12-30 19:17:08 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
struct DXTBlock
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 color1;
|
|
|
|
|
u16 color2;
|
|
|
|
|
u8 lines[4];
|
2008-12-08 05:30:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//inline void decodebytesC4(u32 *dst, const u8 *src, int numbytes, int tlutaddr, int tlutfmt)
|
2009-05-13 02:06:02 +00:00
|
|
|
inline void decodebytesC4_5A3_To_BGRA32(u32 *dst, const u8 *src, int tlutaddr)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = decode5A3(Common::swap16(tlut[val >> 4]));
|
|
|
|
|
*dst++ = decode5A3(Common::swap16(tlut[val & 0xF]));
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesC4_5A3_To_rgba32(u32 *dst, const u8 *src, int tlutaddr)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = decode5A3RGBA(Common::swap16(tlut[val >> 4]));
|
|
|
|
|
*dst++ = decode5A3RGBA(Common::swap16(tlut[val & 0xF]));
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2009-05-13 02:06:02 +00:00
|
|
|
inline void decodebytesC4_To_Raw16(u16* dst, const u8* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem+tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = Common::swap16(tlut[val >> 4]);
|
|
|
|
|
*dst++ = Common::swap16(tlut[val & 0xF]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesC4IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem+tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = decodeIA8Swapped(tlut[val >> 4]);
|
|
|
|
|
*dst++ = decodeIA8Swapped(tlut[val & 0xF]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline void decodebytesC4RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem+tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = decode565RGBA(Common::swap16(tlut[val >> 4]));
|
|
|
|
|
*dst++ = decode565RGBA(Common::swap16(tlut[val & 0xF]));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
//inline void decodebytesC8(u32 *dst, const u8 *src, int numbytes, int tlutaddr, int tlutfmt)
|
2009-05-13 02:06:02 +00:00
|
|
|
inline void decodebytesC8_5A3_To_BGRA32(u32 *dst, const u8 *src, int tlutaddr)
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = decode5A3(Common::swap16(tlut[val]));
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesC8_5A3_To_RGBA32(u32 *dst, const u8 *src, int tlutaddr)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = decode5A3RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-24 23:58:48 +00:00
|
|
|
inline void decodebytesC8_To_Raw16(u16* dst, const u8* src, int tlutaddr)
|
2009-05-13 02:06:02 +00:00
|
|
|
{
|
2009-07-26 09:52:35 +00:00
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
2010-04-09 15:13:42 +00:00
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
|
|
|
|
u8 val = src[x];
|
|
|
|
|
*dst++ = Common::swap16(tlut[val]);
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-04-09 03:02:12 +00:00
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesC8IA8_To_RGBA(u32* dst, const u8* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
|
|
|
|
*dst++ = decodeIA8Swapped(tlut[src[x]]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline void decodebytesC8RGB565_To_RGBA(u32* dst, const u8* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
|
|
|
|
*dst++ = decode565RGBA(Common::swap16(tlut[src[x]]));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-09 03:02:12 +00:00
|
|
|
#if _M_SSE >= 0x301
|
2010-04-09 15:13:42 +00:00
|
|
|
static const __m128i kMaskSwap16 = _mm_set_epi32(0x0E0F0C0DL, 0x0A0B0809L, 0x06070405L, 0x02030001L);
|
|
|
|
|
|
|
|
|
|
inline void decodebytesC8_To_Raw16_SSSE3(u16* dst, const u8* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
2010-04-09 03:02:12 +00:00
|
|
|
|
|
|
|
|
// Make 8 16-bits unsigned integer values
|
2010-04-09 15:13:42 +00:00
|
|
|
__m128i a = _mm_setzero_si128();
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[0]], 0);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[1]], 1);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[2]], 2);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[3]], 3);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[4]], 4);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[5]], 5);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[6]], 6);
|
|
|
|
|
a = _mm_insert_epi16(a, tlut[src[7]], 7);
|
2010-04-09 03:02:12 +00:00
|
|
|
|
|
|
|
|
// Apply Common::swap16() to 16-bits unsigned integers at once
|
|
|
|
|
const __m128i b = _mm_shuffle_epi8(a, kMaskSwap16);
|
|
|
|
|
|
|
|
|
|
// Store values to dst without polluting the caches
|
|
|
|
|
_mm_stream_si128((__m128i*)dst, b);
|
2009-05-13 02:06:02 +00:00
|
|
|
}
|
2010-04-09 15:13:42 +00:00
|
|
|
#endif
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-05-13 02:06:02 +00:00
|
|
|
inline void decodebytesC14X2_5A3_To_BGRA32(u32 *dst, const u16 *src, int tlutaddr)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u16 val = Common::swap16(src[x]);
|
2009-07-26 09:52:35 +00:00
|
|
|
*dst++ = decode5A3(Common::swap16(tlut[(val & 0x3FFF)]));
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesC14X2_5A3_To_RGBA(u32 *dst, const u16 *src, int tlutaddr)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u16 val = Common::swap16(src[x]);
|
2010-12-30 19:17:08 +00:00
|
|
|
*dst++ = decode5A3RGBA(Common::swap16(tlut[(val & 0x3FFF)]));
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2009-05-13 02:06:02 +00:00
|
|
|
inline void decodebytesC14X2_To_Raw16(u16* dst, const u16* src, int tlutaddr)
|
|
|
|
|
{
|
2009-07-26 09:52:35 +00:00
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
2009-05-13 02:06:02 +00:00
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u16 val = Common::swap16(src[x]);
|
2009-07-26 09:52:35 +00:00
|
|
|
*dst++ = Common::swap16(tlut[(val & 0x3FFF)]);
|
2009-05-13 02:06:02 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesC14X2IA8_To_RGBA(u32* dst, const u16* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u16 val = Common::swap16(src[x]);
|
|
|
|
|
*dst++ = decodeIA8Swapped(tlut[(val & 0x3FFF)]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline void decodebytesC14X2rgb565_To_RGBA(u32* dst, const u16* src, int tlutaddr)
|
|
|
|
|
{
|
|
|
|
|
u16* tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
u16 val = Common::swap16(src[x]);
|
|
|
|
|
*dst++ = decode565RGBA(Common::swap16(tlut[(val & 0x3FFF)]));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-01-19 19:28:27 +00:00
|
|
|
// Needs more speed.
|
2009-02-14 09:04:40 +00:00
|
|
|
inline void decodebytesIA4(u16 *dst, const u8 *src)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2009-07-30 20:29:52 +00:00
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
const u8 val = src[x];
|
2009-07-30 20:29:52 +00:00
|
|
|
u8 a = Convert4To8(val >> 4);
|
|
|
|
|
u8 l = Convert4To8(val & 0xF);
|
|
|
|
|
dst[x] = (a << 8) | l;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesIA4RGBA(u32 *dst, const u8 *src)
|
|
|
|
|
{
|
|
|
|
|
for (int x = 0; x < 8; x++)
|
|
|
|
|
{
|
|
|
|
|
const u8 val = src[x];
|
|
|
|
|
u8 a = Convert4To8(val >> 4);
|
|
|
|
|
u8 l = Convert4To8(val & 0xF);
|
|
|
|
|
dst[x] = (a << 24) | l << 16 | l << 8 | l;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
inline void decodebytesRGB5A3(u32 *dst, const u16 *src)
|
|
|
|
|
{
|
2010-12-30 19:17:08 +00:00
|
|
|
#if 0
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
dst[x] = decode5A3(Common::swap16(src[x]));
|
2010-12-30 19:17:08 +00:00
|
|
|
#else
|
2011-01-01 03:52:32 +00:00
|
|
|
dst[0] = decode5A3(Common::swap16(src[0]));
|
|
|
|
|
dst[1] = decode5A3(Common::swap16(src[1]));
|
|
|
|
|
dst[2] = decode5A3(Common::swap16(src[2]));
|
|
|
|
|
dst[3] = decode5A3(Common::swap16(src[3]));
|
2010-12-30 19:17:08 +00:00
|
|
|
#endif
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
inline void decodebytesRGB5A3rgba(u32 *dst, const u16 *src)
|
|
|
|
|
{
|
2010-12-30 19:17:08 +00:00
|
|
|
#if 0
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
dst[x] = decode5A3RGBA(Common::swap16(src[x]));
|
2010-12-30 19:17:08 +00:00
|
|
|
#else
|
2011-01-01 03:52:32 +00:00
|
|
|
dst[0] = decode5A3RGBA(Common::swap16(src[0]));
|
|
|
|
|
dst[1] = decode5A3RGBA(Common::swap16(src[1]));
|
|
|
|
|
dst[2] = decode5A3RGBA(Common::swap16(src[2]));
|
|
|
|
|
dst[3] = decode5A3RGBA(Common::swap16(src[3]));
|
2010-12-30 19:17:08 +00:00
|
|
|
#endif
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
// This one is used by many video formats. It'd therefore be good if it was fast.
|
2010-01-19 19:28:27 +00:00
|
|
|
// Needs more speed.
|
2008-12-08 05:30:24 +00:00
|
|
|
inline void decodebytesARGB8_4(u32 *dst, const u16 *src, const u16 *src2)
|
|
|
|
|
{
|
2010-12-30 19:17:08 +00:00
|
|
|
#if 0
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
dst[x] = Common::swap32((src2[x] << 16) | src[x]);
|
2010-12-30 19:17:08 +00:00
|
|
|
#else
|
2011-01-01 03:52:32 +00:00
|
|
|
dst[0] = Common::swap32((src2[0] << 16) | src[0]);
|
|
|
|
|
dst[1] = Common::swap32((src2[1] << 16) | src[1]);
|
|
|
|
|
dst[2] = Common::swap32((src2[2] << 16) | src[2]);
|
|
|
|
|
dst[3] = Common::swap32((src2[3] << 16) | src[3]);
|
2010-12-30 19:17:08 +00:00
|
|
|
#endif
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-05-09 07:55:30 +00:00
|
|
|
// This can probably be done in a few SSE pack/unpack instructions + pshufb
|
|
|
|
|
// some unpack instruction x2:
|
|
|
|
|
// ABABABABABABABAB 1212121212121212 ->
|
|
|
|
|
// AB12AB12AB12AB12 AB12AB12AB12AB12
|
|
|
|
|
// 2x pshufb->
|
|
|
|
|
// 21BA21BA21BA21BA 21BA21BA21BA21BA
|
|
|
|
|
// and we are done.
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-12-30 19:17:08 +00:00
|
|
|
inline void decodebytesARGB8_4ToRgba(u32 *dst, const u16 *src, const u16 * src2)
|
2010-06-19 13:31:40 +00:00
|
|
|
{
|
2010-12-30 19:17:08 +00:00
|
|
|
#if 0
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < 4; x++) {
|
2010-06-19 21:12:09 +00:00
|
|
|
dst[x] = ((src[x] & 0xFF) << 24) | ((src[x] & 0xFF00)>>8) | (src2[x] << 8);
|
2010-12-30 19:17:08 +00:00
|
|
|
}
|
|
|
|
|
#else
|
2011-01-01 03:52:32 +00:00
|
|
|
dst[0] = ((src[0] & 0xFF) << 24) | ((src[0] & 0xFF00)>>8) | (src2[0] << 8);
|
|
|
|
|
dst[1] = ((src[1] & 0xFF) << 24) | ((src[1] & 0xFF00)>>8) | (src2[1] << 8);
|
|
|
|
|
dst[2] = ((src[2] & 0xFF) << 24) | ((src[2] & 0xFF00)>>8) | (src2[2] << 8);
|
|
|
|
|
dst[3] = ((src[3] & 0xFF) << 24) | ((src[3] & 0xFF00)>>8) | (src2[3] << 8);
|
2010-12-30 19:17:08 +00:00
|
|
|
#endif
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
inline u32 makecol(int r, int g, int b, int a)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
return (a << 24)|(r << 16)|(g << 8)|b;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2009-10-10 21:19:39 +00:00
|
|
|
inline u32 makeRGBA(int r, int g, int b, int a)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
return (a<<24)|(b<<16)|(g<<8)|r;
|
2009-10-10 21:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
|
|
|
|
|
{
|
2009-09-02 18:55:36 +00:00
|
|
|
// S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support)
|
2010-01-19 19:28:27 +00:00
|
|
|
// Needs more speed.
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 c1 = Common::swap16(src->color1);
|
|
|
|
|
u16 c2 = Common::swap16(src->color2);
|
2009-09-02 21:30:54 +00:00
|
|
|
int blue1 = Convert5To8(c1 & 0x1F);
|
|
|
|
|
int blue2 = Convert5To8(c2 & 0x1F);
|
|
|
|
|
int green1 = Convert6To8((c1 >> 5) & 0x3F);
|
|
|
|
|
int green2 = Convert6To8((c2 >> 5) & 0x3F);
|
|
|
|
|
int red1 = Convert5To8((c1 >> 11) & 0x1F);
|
|
|
|
|
int red2 = Convert5To8((c2 >> 11) & 0x1F);
|
2011-01-01 03:52:32 +00:00
|
|
|
int colors[4];
|
2010-02-03 03:52:50 +00:00
|
|
|
colors[0] = makecol(red1, green1, blue1, 255);
|
2011-01-01 03:52:32 +00:00
|
|
|
colors[1] = makecol(red2, green2, blue2, 255);
|
|
|
|
|
if (c1 > c2)
|
|
|
|
|
{
|
|
|
|
|
int blue3 = ((blue2 - blue1) >> 1) - ((blue2 - blue1) >> 3);
|
|
|
|
|
int green3 = ((green2 - green1) >> 1) - ((green2 - green1) >> 3);
|
|
|
|
|
int red3 = ((red2 - red1) >> 1) - ((red2 - red1) >> 3);
|
|
|
|
|
colors[2] = makecol(red1 + red3, green1 + green3, blue1 + blue3, 255);
|
|
|
|
|
colors[3] = makecol(red2 - red3, green2 - green3, blue2 - blue3, 255);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
colors[2] = makecol((red1 + red2 + 1) / 2, // Average
|
|
|
|
|
(green1 + green2 + 1) / 2,
|
|
|
|
|
(blue1 + blue2 + 1) / 2, 255);
|
|
|
|
|
colors[3] = makecol(red2, green2, blue2, 0); // Color2 but transparent
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < 4; y++)
|
|
|
|
|
{
|
|
|
|
|
int val = src->lines[y];
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
dst[x] = colors[(val >> 6) & 3];
|
|
|
|
|
val <<= 2;
|
|
|
|
|
}
|
|
|
|
|
dst += pitch;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch)
|
|
|
|
|
{
|
|
|
|
|
// S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support)
|
|
|
|
|
// Needs more speed.
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 c1 = Common::swap16(src->color1);
|
|
|
|
|
u16 c2 = Common::swap16(src->color2);
|
2010-06-19 13:31:40 +00:00
|
|
|
int blue1 = Convert5To8(c1 & 0x1F);
|
|
|
|
|
int blue2 = Convert5To8(c2 & 0x1F);
|
|
|
|
|
int green1 = Convert6To8((c1 >> 5) & 0x3F);
|
|
|
|
|
int green2 = Convert6To8((c2 >> 5) & 0x3F);
|
|
|
|
|
int red1 = Convert5To8((c1 >> 11) & 0x1F);
|
|
|
|
|
int red2 = Convert5To8((c2 >> 11) & 0x1F);
|
2011-01-01 03:52:32 +00:00
|
|
|
int colors[4];
|
2010-06-19 13:31:40 +00:00
|
|
|
colors[0] = makeRGBA(red1, green1, blue1, 255);
|
2011-01-01 03:52:32 +00:00
|
|
|
colors[1] = makeRGBA(red2, green2, blue2, 255);
|
|
|
|
|
if (c1 > c2)
|
|
|
|
|
{
|
|
|
|
|
int blue3 = ((blue2 - blue1) >> 1) - ((blue2 - blue1) >> 3);
|
|
|
|
|
int green3 = ((green2 - green1) >> 1) - ((green2 - green1) >> 3);
|
|
|
|
|
int red3 = ((red2 - red1) >> 1) - ((red2 - red1) >> 3);
|
|
|
|
|
colors[2] = makeRGBA(red1 + red3, green1 + green3, blue1 + blue3, 255);
|
|
|
|
|
colors[3] = makeRGBA(red2 - red3, green2 - green3, blue2 - blue3, 255);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
colors[2] = makeRGBA((red1 + red2 + 1) / 2, // Average
|
|
|
|
|
(green1 + green2 + 1) / 2,
|
|
|
|
|
(blue1 + blue2 + 1) / 2, 255);
|
|
|
|
|
colors[3] = makeRGBA(red2, green2, blue2, 0); // Color2 but transparent
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < 4; y++)
|
|
|
|
|
{
|
|
|
|
|
int val = src->lines[y];
|
|
|
|
|
for (int x = 0; x < 4; x++)
|
|
|
|
|
{
|
|
|
|
|
dst[x] = colors[(val >> 6) & 3];
|
|
|
|
|
val <<= 2;
|
|
|
|
|
}
|
|
|
|
|
dst += pitch;
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
2010-05-26 20:52:44 +00:00
|
|
|
#if 0 // TODO - currently does not handle transparency correctly and causes problems when texture dimensions are not multiples of 8
|
2009-05-06 02:10:07 +00:00
|
|
|
static void copyDXTBlock(u8* dst, const u8* src)
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
((u16*)dst)[0] = Common::swap16(((u16*)src)[0]);
|
|
|
|
|
((u16*)dst)[1] = Common::swap16(((u16*)src)[1]);
|
|
|
|
|
u32 pixels = ((u32*)src)[1];
|
|
|
|
|
// A bit of trickiness here: the row are in the same order
|
|
|
|
|
// between the two formats, but the ordering within the rows
|
|
|
|
|
// is reversed.
|
|
|
|
|
pixels = ((pixels >> 4) & 0x0F0F0F0F) | ((pixels << 4) & 0xF0F0F0F0);
|
|
|
|
|
pixels = ((pixels >> 2) & 0x33333333) | ((pixels << 2) & 0xCCCCCCCC);
|
|
|
|
|
((u32*)dst)[1] = pixels;
|
2009-05-06 02:10:07 +00:00
|
|
|
}
|
2010-05-26 20:52:44 +00:00
|
|
|
#endif
|
2009-05-06 02:10:07 +00:00
|
|
|
|
2009-05-13 02:06:02 +00:00
|
|
|
static PC_TexFormat GetPCFormatFromTLUTFormat(int tlutfmt)
|
|
|
|
|
{
|
|
|
|
|
switch (tlutfmt)
|
|
|
|
|
{
|
|
|
|
|
case 0: return PC_TEX_FMT_IA8; // IA8
|
|
|
|
|
case 1: return PC_TEX_FMT_RGB565; // RGB565
|
|
|
|
|
case 2: return PC_TEX_FMT_BGRA32; // RGB5A3: This TLUT format requires
|
2011-01-01 03:52:32 +00:00
|
|
|
// extra work to decode.
|
2009-05-13 02:06:02 +00:00
|
|
|
}
|
|
|
|
|
return PC_TEX_FMT_NONE; // Error
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-07 18:48:31 +00:00
|
|
|
PC_TexFormat GetPC_TexFormat(int texformat, int tlutfmt)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (texformat)
|
|
|
|
|
{
|
|
|
|
|
case GX_TF_C4:
|
2009-12-07 18:48:31 +00:00
|
|
|
return GetPCFormatFromTLUTFormat(tlutfmt);
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_I4:
|
ok big changes here:
in videocommon little fix for the alpha test values, return to the original values as they are more accurate.
in D3D:
huge change in state management, now all the state management is centralized and redundant state changes are eliminated.
Fixed the overlapped viewport error in non ati cards:
the error was caused by this: when a viewport is defined larger than the current rendertarget, an error is thrown and the last valid viewport is used, this is the reference behavior, in ati cards if a larger viewport is defined, no eror is returned, the rendering is valid and is rendered using the projection defined by the viewport but limited to the rendertarget are, exactly like opengl or the GC hardware.
to solve this in reference drivers defined a large rendertarget (2x the size of the original) and proceed to render in a centered quad insithe the larger rendertarget, in this way larger viewports always falls inside a valid rendertarget size, the drawback of this is the waste of resources. it can be dynamized, depending or games or changed at runtime when a oversized viewport is detected, but i live that to future commits.
please test this and let me know the results.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4841 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-15 15:52:08 +00:00
|
|
|
return PC_TEX_FMT_IA8;
|
2009-12-07 18:48:31 +00:00
|
|
|
case GX_TF_I8: // speed critical
|
ok big changes here:
in videocommon little fix for the alpha test values, return to the original values as they are more accurate.
in D3D:
huge change in state management, now all the state management is centralized and redundant state changes are eliminated.
Fixed the overlapped viewport error in non ati cards:
the error was caused by this: when a viewport is defined larger than the current rendertarget, an error is thrown and the last valid viewport is used, this is the reference behavior, in ati cards if a larger viewport is defined, no eror is returned, the rendering is valid and is rendered using the projection defined by the viewport but limited to the rendertarget are, exactly like opengl or the GC hardware.
to solve this in reference drivers defined a large rendertarget (2x the size of the original) and proceed to render in a centered quad insithe the larger rendertarget, in this way larger viewports always falls inside a valid rendertarget size, the drawback of this is the waste of resources. it can be dynamized, depending or games or changed at runtime when a oversized viewport is detected, but i live that to future commits.
please test this and let me know the results.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4841 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-15 15:52:08 +00:00
|
|
|
return PC_TEX_FMT_IA8;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C8:
|
2009-12-07 18:48:31 +00:00
|
|
|
return GetPCFormatFromTLUTFormat(tlutfmt);
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_IA4:
|
|
|
|
|
return PC_TEX_FMT_IA4_AS_IA8;
|
|
|
|
|
case GX_TF_IA8:
|
|
|
|
|
return PC_TEX_FMT_IA8;
|
|
|
|
|
case GX_TF_C14X2:
|
2009-12-07 18:48:31 +00:00
|
|
|
return GetPCFormatFromTLUTFormat(tlutfmt);
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_RGB565:
|
2009-12-07 18:48:31 +00:00
|
|
|
return PC_TEX_FMT_RGB565;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_RGB5A3:
|
|
|
|
|
return PC_TEX_FMT_BGRA32;
|
|
|
|
|
case GX_TF_RGBA8: // speed critical
|
|
|
|
|
return PC_TEX_FMT_BGRA32;
|
|
|
|
|
case GX_TF_CMPR: // speed critical
|
|
|
|
|
// The metroid games use this format almost exclusively.
|
2009-12-07 18:48:31 +00:00
|
|
|
{
|
|
|
|
|
return PC_TEX_FMT_BGRA32;
|
|
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2009-12-07 18:48:31 +00:00
|
|
|
|
|
|
|
|
// The "copy" texture formats, too?
|
2011-01-01 03:52:32 +00:00
|
|
|
return PC_TEX_FMT_NONE;
|
2009-12-07 18:48:31 +00:00
|
|
|
}
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
//switch endianness, unswizzle
|
|
|
|
|
//TODO: to save memory, don't blindly convert everything to argb8888
|
|
|
|
|
//also ARGB order needs to be swapped later, to accommodate modern hardware better
|
|
|
|
|
//need to add DXT support too
|
|
|
|
|
PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (texformat)
|
|
|
|
|
{
|
|
|
|
|
case GX_TF_C4:
|
2009-05-13 02:06:02 +00:00
|
|
|
if (tlutfmt == 2)
|
2011-01-01 03:52:32 +00:00
|
|
|
{
|
2009-05-13 02:06:02 +00:00
|
|
|
// Special decoding is required for TLUT format 5A3
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
decodebytesC4_5A3_To_BGRA32((u32*)dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
}
|
2009-05-13 02:06:02 +00:00
|
|
|
else
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
decodebytesC4_To_Raw16((u16*)dst + (y + iy) * width + x, src, tlutaddr);
|
2009-05-13 02:06:02 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
return GetPCFormatFromTLUTFormat(tlutfmt);
|
|
|
|
|
case GX_TF_I4:
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
for (int ix = 0; ix < 4; ix++)
|
|
|
|
|
{
|
|
|
|
|
int val = src[ix];
|
2009-07-30 20:29:52 +00:00
|
|
|
dst[(y + iy) * width + x + ix * 2] = Convert4To8(val >> 4);
|
|
|
|
|
dst[(y + iy) * width + x + ix * 2 + 1] = Convert4To8(val & 0xF);
|
2009-05-09 07:55:30 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
return PC_TEX_FMT_I4_AS_I8;
|
2009-05-09 07:55:30 +00:00
|
|
|
case GX_TF_I8: // speed critical
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
2009-07-26 09:52:35 +00:00
|
|
|
memcpy(dst + (y + iy)*width+x, src, 8);
|
2009-05-09 07:55:30 +00:00
|
|
|
}
|
|
|
|
|
return PC_TEX_FMT_I8;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C8:
|
2009-05-13 02:06:02 +00:00
|
|
|
if (tlutfmt == 2)
|
2011-01-01 03:52:32 +00:00
|
|
|
{
|
2009-05-13 02:06:02 +00:00
|
|
|
// Special decoding is required for TLUT format 5A3
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC8_5A3_To_BGRA32((u32*)dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
}
|
2009-05-13 02:06:02 +00:00
|
|
|
else
|
|
|
|
|
{
|
2010-04-09 15:13:42 +00:00
|
|
|
|
|
|
|
|
#if _M_SSE >= 0x301
|
|
|
|
|
|
|
|
|
|
if (cpu_info.bSSSE3) {
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC8_To_Raw16_SSSE3((u16*)dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
} else
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC8_To_Raw16((u16*)dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
}
|
2009-05-13 02:06:02 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
return GetPCFormatFromTLUTFormat(tlutfmt);
|
|
|
|
|
case GX_TF_IA4:
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
2009-07-26 09:52:35 +00:00
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
2011-01-01 03:52:32 +00:00
|
|
|
decodebytesIA4((u16*)dst + (y + iy) * width + x, src);
|
|
|
|
|
}
|
2009-05-13 02:06:02 +00:00
|
|
|
return PC_TEX_FMT_IA4_AS_IA8;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_IA8:
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
2009-07-26 09:52:35 +00:00
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
|
|
|
|
u16 *ptr = (u16 *)dst + (y + iy) * width + x;
|
2009-05-09 07:55:30 +00:00
|
|
|
u16 *s = (u16 *)src;
|
|
|
|
|
for(int j = 0; j < 4; j++)
|
|
|
|
|
*ptr++ = Common::swap16(*s++);
|
|
|
|
|
}
|
2009-02-13 14:14:45 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2009-05-09 07:55:30 +00:00
|
|
|
return PC_TEX_FMT_IA8;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C14X2:
|
2009-05-13 02:06:02 +00:00
|
|
|
if (tlutfmt == 2)
|
2011-01-01 03:52:32 +00:00
|
|
|
{
|
2009-05-13 02:06:02 +00:00
|
|
|
// Special decoding is required for TLUT format 5A3
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC14X2_5A3_To_BGRA32((u32*)dst + (y + iy) * width + x, (u16*)src, tlutaddr);
|
|
|
|
|
}
|
2009-05-13 02:06:02 +00:00
|
|
|
else
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC14X2_To_Raw16((u16*)dst + (y + iy) * width + x, (u16*)src, tlutaddr);
|
2009-05-13 02:06:02 +00:00
|
|
|
}
|
|
|
|
|
return GetPCFormatFromTLUTFormat(tlutfmt);
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_RGB565:
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
2009-07-26 09:52:35 +00:00
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
|
|
|
|
u16 *ptr = (u16 *)dst + (y + iy) * width + x;
|
2009-05-09 07:55:30 +00:00
|
|
|
u16 *s = (u16 *)src;
|
|
|
|
|
for(int j = 0; j < 4; j++)
|
|
|
|
|
*ptr++ = Common::swap16(*s++);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return PC_TEX_FMT_RGB565;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_RGB5A3:
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
//decodebytesRGB5A3((u32*)dst+(y+iy)*width+x, (u16*)src, 4);
|
|
|
|
|
decodebytesRGB5A3((u32*)dst+(y+iy)*width+x, (u16*)src);
|
|
|
|
|
}
|
|
|
|
|
return PC_TEX_FMT_BGRA32;
|
|
|
|
|
case GX_TF_RGBA8: // speed critical
|
|
|
|
|
{
|
2010-04-09 03:02:12 +00:00
|
|
|
|
2010-04-09 15:13:42 +00:00
|
|
|
#if _M_SSE >= 0x301
|
2010-04-09 03:02:12 +00:00
|
|
|
|
2010-04-09 15:13:42 +00:00
|
|
|
if (cpu_info.bSSSE3) {
|
|
|
|
|
for (int y = 0; y < height; y += 4) {
|
|
|
|
|
__m128i* p = (__m128i*)(src + y * width * 4);
|
|
|
|
|
for (int x = 0; x < width; x += 4) {
|
2010-04-09 03:02:12 +00:00
|
|
|
|
2010-11-14 04:29:20 +00:00
|
|
|
// We use _mm_loadu_si128 instead of _mm_load_si128
|
|
|
|
|
// because "p" may not be aligned in 16-bytes alignment.
|
|
|
|
|
// See Issue 3493.
|
|
|
|
|
const __m128i a0 = _mm_loadu_si128(p++);
|
|
|
|
|
const __m128i a1 = _mm_loadu_si128(p++);
|
|
|
|
|
const __m128i a2 = _mm_loadu_si128(p++);
|
|
|
|
|
const __m128i a3 = _mm_loadu_si128(p++);
|
2010-04-09 03:02:12 +00:00
|
|
|
|
2010-04-09 15:13:42 +00:00
|
|
|
// Shuffle 16-bit integeres by _mm_unpacklo_epi16()/_mm_unpackhi_epi16(),
|
|
|
|
|
// apply Common::swap32() by _mm_shuffle_epi8() and
|
|
|
|
|
// store them by _mm_stream_si128().
|
|
|
|
|
// See decodebytesARGB8_4() about the idea.
|
2010-11-14 04:29:20 +00:00
|
|
|
|
|
|
|
|
static const __m128i kMaskSwap32 = _mm_set_epi32(0x0C0D0E0FL, 0x08090A0BL, 0x04050607L, 0x00010203L);
|
|
|
|
|
|
2010-04-09 15:13:42 +00:00
|
|
|
const __m128i b0 = _mm_unpacklo_epi16(a0, a2);
|
|
|
|
|
const __m128i c0 = _mm_shuffle_epi8(b0, kMaskSwap32);
|
|
|
|
|
_mm_stream_si128((__m128i*)((u32*)dst + (y + 0) * width + x), c0);
|
|
|
|
|
|
|
|
|
|
const __m128i b1 = _mm_unpackhi_epi16(a0, a2);
|
|
|
|
|
const __m128i c1 = _mm_shuffle_epi8(b1, kMaskSwap32);
|
|
|
|
|
_mm_stream_si128((__m128i*)((u32*)dst + (y + 1) * width + x), c1);
|
|
|
|
|
|
|
|
|
|
const __m128i b2 = _mm_unpacklo_epi16(a1, a3);
|
|
|
|
|
const __m128i c2 = _mm_shuffle_epi8(b2, kMaskSwap32);
|
|
|
|
|
_mm_stream_si128((__m128i*)((u32*)dst + (y + 2) * width + x), c2);
|
|
|
|
|
|
|
|
|
|
const __m128i b3 = _mm_unpackhi_epi16(a1, a3);
|
|
|
|
|
const __m128i c3 = _mm_shuffle_epi8(b3, kMaskSwap32);
|
|
|
|
|
_mm_stream_si128((__m128i*)((u32*)dst + (y + 3) * width + x), c3);
|
|
|
|
|
}
|
2010-04-09 03:02:12 +00:00
|
|
|
}
|
2010-04-09 15:13:42 +00:00
|
|
|
} else
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
{
|
|
|
|
|
for (int iy = 0; iy < 4; iy++)
|
|
|
|
|
decodebytesARGB8_4((u32*)dst + (y+iy)*width + x, (u16*)src + 4 * iy, (u16*)src + 4 * iy + 16);
|
|
|
|
|
src += 64;
|
|
|
|
|
}
|
2010-04-09 03:02:12 +00:00
|
|
|
}
|
2010-04-09 15:13:42 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
return PC_TEX_FMT_BGRA32;
|
|
|
|
|
case GX_TF_CMPR: // speed critical
|
|
|
|
|
// The metroid games use this format almost exclusively.
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
2009-05-11 19:04:46 +00:00
|
|
|
#if 0 // TODO - currently does not handle transparency correctly and causes problems when texture dimensions are not multiples of 8
|
2011-01-01 03:52:32 +00:00
|
|
|
// 11111111 22222222 55555555 66666666
|
|
|
|
|
// 33333333 44444444 77777777 88888888
|
2009-05-11 19:04:46 +00:00
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
copyDXTBlock(dst+(y/2)*width+x*2, src);
|
|
|
|
|
src += 8;
|
|
|
|
|
copyDXTBlock(dst+(y/2)*width+x*2+8, src);
|
|
|
|
|
src += 8;
|
|
|
|
|
copyDXTBlock(dst+(y/2+2)*width+x*2, src);
|
|
|
|
|
src += 8;
|
|
|
|
|
copyDXTBlock(dst+(y/2+2)*width+x*2+8, src);
|
|
|
|
|
src += 8;
|
2009-05-11 19:04:46 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return PC_TEX_FMT_DXT1;
|
|
|
|
|
#else
|
|
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
{
|
|
|
|
|
decodeDXTBlock((u32*)dst + y * width + x, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
decodeDXTBlock((u32*)dst + y * width + x + 4, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
decodeDXTBlock((u32*)dst + (y + 4) * width + x, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
decodeDXTBlock((u32*)dst + (y + 4) * width + x + 4, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
}
|
2009-05-11 19:04:46 +00:00
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
return PC_TEX_FMT_BGRA32;
|
|
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-05-09 07:55:30 +00:00
|
|
|
// The "copy" texture formats, too?
|
2011-01-01 03:52:32 +00:00
|
|
|
return PC_TEX_FMT_NONE;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2009-12-07 18:48:31 +00:00
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-30 19:17:08 +00:00
|
|
|
PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
|
2010-06-19 13:31:40 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (texformat)
|
|
|
|
|
{
|
|
|
|
|
case GX_TF_C4:
|
2010-06-19 13:31:40 +00:00
|
|
|
if (tlutfmt == 2)
|
2011-01-01 03:52:32 +00:00
|
|
|
{
|
2010-06-19 13:31:40 +00:00
|
|
|
// Special decoding is required for TLUT format 5A3
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
decodebytesC4_5A3_To_rgba32(dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
else if(tlutfmt == 0)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
decodebytesC4IA8_To_RGBA(dst + (y + iy) * width + x, src, tlutaddr);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 8)
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
decodebytesC4RGB565_To_RGBA(dst + (y + iy) * width + x, src, tlutaddr);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_I4:
|
2010-06-19 13:31:40 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
// JSD optimized with SSE2 intrinsics.
|
|
|
|
|
// Produces a ~76% speed increase over reference C implementation.
|
|
|
|
|
const __m128i kMask_x0f = _mm_set_epi32(0x0f0f0f0fL, 0x0f0f0f0fL, 0x0f0f0f0fL, 0x0f0f0f0fL);
|
|
|
|
|
const __m128i kMask_xf0 = _mm_set_epi32(0xf0f0f0f0L, 0xf0f0f0f0L, 0xf0f0f0f0L, 0xf0f0f0f0L);
|
|
|
|
|
const __m128i kMask_x00000000ffffffff = _mm_set_epi32(0x00000000L, 0xffffffffL, 0x00000000L, 0xffffffffL);
|
|
|
|
|
const __m128i kMask_xffffffff00000000 = _mm_set_epi32(0xffffffffL, 0x00000000L, 0xffffffffL, 0x00000000L);
|
|
|
|
|
|
|
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy += 2, src += 8)
|
|
|
|
|
{
|
|
|
|
|
// Expand [BA] to [BB][BB][BB][BB] [AA][AA][AA][AA], where [BA] is a single byte and A and B are 4-bit values.
|
|
|
|
|
|
|
|
|
|
// Load 64 bits from `src` into an __m128i with upper 64 bits zeroed: (0000 0000 hgfe dcba)
|
|
|
|
|
// dcba is row #0 and hgfe is row #1. We process two rows at once with each loop iteration, hence iy += 2.
|
|
|
|
|
const __m128i r0 = _mm_loadl_epi64((const __m128i *)src);
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (0000 0000 hgfe dcba) to (hhgg ffee ddcc bbaa)
|
|
|
|
|
const __m128i r1 = _mm_unpacklo_epi8(r0, r0);
|
|
|
|
|
|
|
|
|
|
// We want the hi 4 bits of each 8-bit word replicated to 32-bit words:
|
|
|
|
|
// (HhHhGgGg FfFfEeEe DdDdCcCc BbBbAaAa) >> 4 [16] -> (0HhH0GgG 0FfF0EeE 0DdD0CcC 0BbB0AaA)
|
|
|
|
|
const __m128i i1 = _mm_srli_epi16(r1, 4);
|
|
|
|
|
// (0HhH0GgG 0FfF0EeE 0DdD0CcC 0BbB0AaA) & kMask_x0f -> (0H0H0G0G 0F0F0E0E 0D0D0C0C 0B0B0A0A)
|
|
|
|
|
const __m128i i12 = _mm_and_si128(i1, kMask_x0f);
|
|
|
|
|
// (HhHhGgGg FfFfEeEe DdDdCcCc BbBbAaAa) & kMask_xf0 -> (H0H0G0G0 F0F0E0E0 D0D0C0C0 B0B0A0A0)
|
|
|
|
|
const __m128i i13 = _mm_and_si128(r1, kMask_xf0);
|
|
|
|
|
// (0H0H0G0G 0F0F0E0E 0D0D0C0C 0B0B0A0A) | (H0H0G0G0 F0F0E0E0 D0D0C0C0 B0B0A0A0) -> (HHHHGGGG FFFFEEEE DDDDCCCC BBBBAAAA)
|
|
|
|
|
const __m128i i14 = _mm_or_si128(i12, i13);
|
|
|
|
|
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (HHHHGGGG FFFFEEEE DDDDCCCC BBBBAAAA) to (DDDDDDDD CCCCCCCC BBBBBBBB AAAAAAAA)
|
|
|
|
|
const __m128i i15 = _mm_unpacklo_epi8(i14, i14);
|
|
|
|
|
// (DDDDDDDD CCCCCCCC BBBBBBBB AAAAAAAA) -> (BBBBBBBB BBBBBBBB AAAAAAAA AAAAAAAA)
|
|
|
|
|
const __m128i i151 = _mm_unpacklo_epi8(i15, i15);
|
|
|
|
|
// (DDDDDDDD CCCCCCCC BBBBBBBB AAAAAAAA) -> (DDDDDDDD DDDDDDDD CCCCCCCC CCCCCCCC)
|
|
|
|
|
const __m128i i152 = _mm_unpackhi_epi8(i15, i15);
|
|
|
|
|
|
|
|
|
|
// Shuffle hi 64-bits with itself to expand from (HHHHGGGG FFFFEEEE DDDDCCCC BBBBAAAA) to (HHHHHHHH GGGGGGGG FFFFFFFF EEEEEEEE)
|
|
|
|
|
const __m128i i16 = _mm_unpackhi_epi8(i14, i14);
|
|
|
|
|
// (HHHHHHHH GGGGGGGG FFFFFFFF EEEEEEEE) -> (FFFFFFFF FFFFFFFF EEEEEEEE EEEEEEEE)
|
|
|
|
|
const __m128i i161 = _mm_unpacklo_epi8(i16, i16);
|
|
|
|
|
// (HHHHHHHH GGGGGGGG FFFFFFFF EEEEEEEE) -> (HHHHHHHH HHHHHHHH GGGGGGGG GGGGGGGG)
|
|
|
|
|
const __m128i i162 = _mm_unpackhi_epi8(i16, i16);
|
|
|
|
|
|
|
|
|
|
// Now find the lo 4 bits of each input 8-bit word:
|
|
|
|
|
// (HhHhGgGg FfFfEeEe DdDdCcCc BbBbAaAa) & kMask_x0f -> (0h0h0g0g 0f0f0e0e 0d0d0c0c 0b0b0a0a)
|
|
|
|
|
const __m128i i2 = _mm_and_si128(r1, kMask_x0f);
|
|
|
|
|
// (HhHhGgGg FfFfEeEe DdDdCcCc BbBbAaAa) << 4 [16] -> (hHh0gGg0 fFf0eEe0 dDd0cCc0 bBb0aAa0)
|
|
|
|
|
const __m128i i21 = _mm_slli_epi16(r1, 4);
|
|
|
|
|
// (hHh0gGg0 fFf0eEe0 dDd0cCc0 bBb0aAa0) & kMask_xf0 -> (h0h0g0g0 f0f0e0e0 d0d0c0c0 b0b0a0a0)
|
|
|
|
|
const __m128i i22 = _mm_and_si128(i21, kMask_xf0);
|
|
|
|
|
|
|
|
|
|
// (0h0h0g0g 0f0f0e0e 0d0d0c0c 0b0b0a0a) | (h0h0g0g0 f0f0e0e0 d0d0c0c0 b0b0a0a0) -> (hhhhgggg ffffeeee ddddcccc bbbbaaaa)
|
|
|
|
|
const __m128i i23 = _mm_or_si128(i2, i22);
|
|
|
|
|
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (hhhhgggg ffffeeee ddddcccc bbbbaaaa) to (dddddddd cccccccc bbbbbbbb aaaaaaaa)
|
|
|
|
|
const __m128i i25 = _mm_unpacklo_epi8(i23, i23);
|
|
|
|
|
// (dddddddd cccccccc bbbbbbbb aaaaaaaa) -> (bbbbbbbb bbbbbbbb aaaaaaaa aaaaaaaa)
|
|
|
|
|
const __m128i i251 = _mm_unpacklo_epi8(i25, i25);
|
|
|
|
|
// (dddddddd cccccccc bbbbbbbb aaaaaaaa) -> (dddddddd dddddddd cccccccc cccccccc)
|
|
|
|
|
const __m128i i252 = _mm_unpackhi_epi8(i25, i25);
|
|
|
|
|
|
|
|
|
|
// Shuffle hi 64-bits with itself to expand from (hhhhgggg ffffeeee ddddcccc bbbbaaaa) to (hhhhhhhh gggggggg ffffffff eeeeeeee)
|
|
|
|
|
const __m128i i26 = _mm_unpackhi_epi8(i23, i23);
|
|
|
|
|
// (hhhhhhhh gggggggg ffffffff eeeeeeee) -> (ffffffff ffffffff eeeeeeee eeeeeeee)
|
|
|
|
|
const __m128i i261 = _mm_unpacklo_epi8(i26, i26);
|
|
|
|
|
// (hhhhhhhh gggggggg ffffffff eeeeeeee) -> (hhhhhhhh hhhhhhhh gggggggg gggggggg)
|
|
|
|
|
const __m128i i262 = _mm_unpackhi_epi8(i26, i26);
|
|
|
|
|
|
|
|
|
|
// Now create the final output m128is to write to memory:
|
|
|
|
|
|
|
|
|
|
// _mm_and_si128(i151, kMask_x00000000ffffffff) takes i151 and masks off 1st and 3rd 32-bit words
|
|
|
|
|
// (BBBBBBBB BBBBBBBB AAAAAAAA AAAAAAAA) -> (00000000 BBBBBBBB 00000000 AAAAAAAA)
|
|
|
|
|
// _mm_and_si128(i251, kMask_xffffffff00000000) takes i251 and masks off 2nd and 4th 32-bit words
|
|
|
|
|
// (bbbbbbbb bbbbbbbb aaaaaaaa aaaaaaaa) -> (bbbbbbbb 00000000 aaaaaaaa 00000000)
|
|
|
|
|
// And last but not least, _mm_or_si128 ORs those two together, giving us the interleaving we desire:
|
|
|
|
|
// (00000000 BBBBBBBB 00000000 AAAAAAAA) | (bbbbbbbb 00000000 aaaaaaaa 00000000) -> (bbbbbbbb BBBBBBBB aaaaaaaa AAAAAAAA)
|
|
|
|
|
const __m128i o1 = _mm_or_si128(_mm_and_si128(i151, kMask_x00000000ffffffff), _mm_and_si128(i251, kMask_xffffffff00000000));
|
|
|
|
|
const __m128i o2 = _mm_or_si128(_mm_and_si128(i152, kMask_x00000000ffffffff), _mm_and_si128(i252, kMask_xffffffff00000000));
|
|
|
|
|
|
|
|
|
|
// These two are for the next row; same pattern as above. We batched up two rows because our input was 64 bits.
|
|
|
|
|
const __m128i o3 = _mm_or_si128(_mm_and_si128(i161, kMask_x00000000ffffffff), _mm_and_si128(i261, kMask_xffffffff00000000));
|
|
|
|
|
const __m128i o4 = _mm_or_si128(_mm_and_si128(i162, kMask_x00000000ffffffff), _mm_and_si128(i262, kMask_xffffffff00000000));
|
|
|
|
|
|
|
|
|
|
// Write row 0:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128( (__m128i*)( dst+(y + iy) * width + x ), o1 );
|
|
|
|
|
_mm_storeu_si128( (__m128i*)( dst+(y + iy) * width + x + 4 ), o2 );
|
2011-01-01 03:52:32 +00:00
|
|
|
// Write row 1:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128( (__m128i*)( dst+(y + iy+1) * width + x ), o3 );
|
|
|
|
|
_mm_storeu_si128( (__m128i*)( dst+(y + iy+1) * width + x + 4 ), o4 );
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
#if 0
|
|
|
|
|
// Reference C implementation:
|
2010-06-19 13:31:40 +00:00
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 8; iy++, src += 4)
|
|
|
|
|
for (int ix = 0; ix < 4; ix++)
|
|
|
|
|
{
|
|
|
|
|
int val = src[ix];
|
|
|
|
|
u8 i1 = Convert4To8(val >> 4);
|
2011-01-01 03:52:32 +00:00
|
|
|
u8 i2 = Convert4To8(val & 0xF);
|
2010-06-19 13:31:40 +00:00
|
|
|
memset(dst+(y + iy) * width + x + ix * 2 , i1,4);
|
2011-01-01 03:52:32 +00:00
|
|
|
memset(dst+(y + iy) * width + x + ix * 2 + 1 , i2,4);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
break;
|
2010-06-19 13:31:40 +00:00
|
|
|
case GX_TF_I8: // speed critical
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
// JSD optimized with SSE2 intrinsics.
|
|
|
|
|
// Produces an ~86% speed increase over reference C implementation.
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
{
|
|
|
|
|
// Each loop iteration processes 4 rows from 4 64-bit reads.
|
2010-12-30 19:17:08 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// TODO: is it more efficient to group the loads together sequentially and also the stores at the end?
|
|
|
|
|
// _mm_stream instead of _mm_store on my AMD Phenom II x410 made performance significantly WORSE, so I
|
|
|
|
|
// went with _mm_stores. Perhaps there is some edge case here creating the terrible performance or we're
|
|
|
|
|
// not aligned to 16-byte boundaries. I don't know.
|
|
|
|
|
__m128i *quaddst;
|
2010-12-30 19:17:08 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Load 64 bits from `src` into an __m128i with upper 64 bits zeroed: (0000 0000 hgfe dcba)
|
|
|
|
|
const __m128i r0 = _mm_loadl_epi64((const __m128i *)src);
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (0000 0000 hgfe dcba) to (hhgg ffee ddcc bbaa)
|
|
|
|
|
const __m128i r1 = _mm_unpacklo_epi8(r0, r0);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Shuffle low 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (dddd cccc bbbb aaaa)
|
|
|
|
|
const __m128i rgba0 = _mm_unpacklo_epi8(r1, r1);
|
|
|
|
|
// Shuffle hi 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (hhhh gggg ffff eeee)
|
|
|
|
|
const __m128i rgba1 = _mm_unpackhi_epi8(r1, r1);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (dddd cccc bbbb aaaa) out:
|
|
|
|
|
quaddst = (__m128i *)(dst + (y + 0)*width + x);
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst, rgba0);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (hhhh gggg ffff eeee) out:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst+1, rgba1);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Load 64 bits from `src` into an __m128i with upper 64 bits zeroed: (0000 0000 hgfe dcba)
|
|
|
|
|
src += 8;
|
|
|
|
|
const __m128i r2 = _mm_loadl_epi64((const __m128i *)src);
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (0000 0000 hgfe dcba) to (hhgg ffee ddcc bbaa)
|
|
|
|
|
const __m128i r3 = _mm_unpacklo_epi8(r2, r2);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Shuffle low 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (dddd cccc bbbb aaaa)
|
|
|
|
|
const __m128i rgba2 = _mm_unpacklo_epi8(r3, r3);
|
|
|
|
|
// Shuffle hi 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (hhhh gggg ffff eeee)
|
|
|
|
|
const __m128i rgba3 = _mm_unpackhi_epi8(r3, r3);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (dddd cccc bbbb aaaa) out:
|
|
|
|
|
quaddst = (__m128i *)(dst + (y + 1)*width + x);
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst, rgba2);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (hhhh gggg ffff eeee) out:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst+1, rgba3);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Load 64 bits from `src` into an __m128i with upper 64 bits zeroed: (0000 0000 hgfe dcba)
|
|
|
|
|
src += 8;
|
|
|
|
|
const __m128i r4 = _mm_loadl_epi64((const __m128i *)src);
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (0000 0000 hgfe dcba) to (hhgg ffee ddcc bbaa)
|
|
|
|
|
const __m128i r5 = _mm_unpacklo_epi8(r4, r4);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Shuffle low 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (dddd cccc bbbb aaaa)
|
|
|
|
|
const __m128i rgba4 = _mm_unpacklo_epi8(r5, r5);
|
|
|
|
|
// Shuffle hi 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (hhhh gggg ffff eeee)
|
|
|
|
|
const __m128i rgba5 = _mm_unpackhi_epi8(r5, r5);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (dddd cccc bbbb aaaa) out:
|
|
|
|
|
quaddst = (__m128i *)(dst + (y + 2)*width + x);
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst, rgba4);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (hhhh gggg ffff eeee) out:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst+1, rgba5);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Load 64 bits from `src` into an __m128i with upper 64 bits zeroed: (0000 0000 hgfe dcba)
|
|
|
|
|
src += 8;
|
|
|
|
|
const __m128i r6 = _mm_loadl_epi64((const __m128i *)src);
|
|
|
|
|
// Shuffle low 64-bits with itself to expand from (0000 0000 hgfe dcba) to (hhgg ffee ddcc bbaa)
|
|
|
|
|
const __m128i r7 = _mm_unpacklo_epi8(r6, r6);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Shuffle low 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (dddd cccc bbbb aaaa)
|
|
|
|
|
const __m128i rgba6 = _mm_unpacklo_epi8(r7, r7);
|
|
|
|
|
// Shuffle hi 64-bits with itself to expand from (hhgg ffee ddcc bbaa) to (hhhh gggg ffff eeee)
|
|
|
|
|
const __m128i rgba7 = _mm_unpackhi_epi8(r7, r7);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (dddd cccc bbbb aaaa) out:
|
|
|
|
|
quaddst = (__m128i *)(dst + (y + 3)*width + x);
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst, rgba6);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Store (hhhh gggg ffff eeee) out:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(quaddst+1, rgba7);
|
2010-12-30 19:17:08 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
src += 8;
|
|
|
|
|
}
|
|
|
|
|
#if 0
|
|
|
|
|
// Reference C implementation
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; ++iy, src += 8)
|
|
|
|
|
{
|
|
|
|
|
u32 * newdst = dst + (y + iy)*width+x;
|
|
|
|
|
const u8 * newsrc = src;
|
|
|
|
|
u8 srcval;
|
|
|
|
|
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = (newsrc++)[0]; (newdst++)[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
srcval = newsrc[0]; newdst[0] = srcval | (srcval << 8) | (srcval << 16) | (srcval << 24);
|
|
|
|
|
}
|
2010-12-30 19:17:08 +00:00
|
|
|
#endif
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C8:
|
2010-06-19 13:31:40 +00:00
|
|
|
if (tlutfmt == 2)
|
2011-01-01 03:52:32 +00:00
|
|
|
{
|
2010-06-19 13:31:40 +00:00
|
|
|
// Special decoding is required for TLUT format 5A3
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC8_5A3_To_RGBA32((u32*)dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
else if(tlutfmt == 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC8IA8_To_RGBA(dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC8RGB565_To_RGBA(dst + (y + iy) * width + x, src, tlutaddr);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_IA4:
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesIA4RGBA(dst + (y + iy) * width + x, src);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GX_TF_IA8:
|
|
|
|
|
{
|
|
|
|
|
// JSD optimized with SSE2 intrinsics.
|
|
|
|
|
// Produces an ~80% speed improvement over reference C implementation.
|
|
|
|
|
const __m128i kMask_xf0 = _mm_set_epi32(0x00000000L, 0x00000000L, 0xff00ff00L, 0xff00ff00L);
|
|
|
|
|
const __m128i kMask_x0f = _mm_set_epi32(0x00000000L, 0x00000000L, 0x00ff00ffL, 0x00ff00ffL);
|
|
|
|
|
const __m128i kMask_xf000 = _mm_set_epi32(0xff000000L, 0xff000000L, 0xff000000L, 0xff000000L);
|
|
|
|
|
const __m128i kMask_x0fff = _mm_set_epi32(0x00ffffffL, 0x00ffffffL, 0x00ffffffL, 0x00ffffffL);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
// Expands a 16-bit "IA" to a 32-bit "AIII". Each char is an 8-bit value.
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Load 4x 16-bit IA8 samples from `src` into an __m128i with upper 64 bits zeroed: (0000 0000 hgfe dcba)
|
|
|
|
|
const __m128i r0 = _mm_loadl_epi64((const __m128i *)src);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Logical shift all 16-bit words right by 8 bits (0000 0000 hgfe dcba) to (0000 0000 0h0f 0d0b)
|
|
|
|
|
// This gets us only the I components.
|
|
|
|
|
const __m128i i0 = _mm_srli_epi16(r0, 8);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Now join up the I components from their original positions but mask out the A components.
|
|
|
|
|
// (0000 0000 hgfe dcba) & kMask_xFF00 -> (0000 0000 h0f0 d0b0)
|
|
|
|
|
// (0000 0000 h0f0 d0b0) | (0000 0000 0h0f 0d0b) -> (0000 0000 hhff ddbb)
|
|
|
|
|
const __m128i i1 = _mm_or_si128(_mm_and_si128(r0, kMask_xf0), i0);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Shuffle low 64-bits with itself to expand from (0000 0000 hhff ddbb) to (hhhh ffff dddd bbbb)
|
|
|
|
|
const __m128i i2 = _mm_unpacklo_epi8(i1, i1);
|
|
|
|
|
// (hhhh ffff dddd bbbb) & kMask_x0fff -> (0hhh 0fff 0ddd 0bbb)
|
|
|
|
|
const __m128i i3 = _mm_and_si128(i2, kMask_x0fff);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Now that we have the I components in 32-bit word form, time work out the A components into
|
|
|
|
|
// their final positions.
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// (0000 0000 hgfe dcba) & kMask_x00FF -> (0000 0000 0g0e 0c0a)
|
|
|
|
|
const __m128i a0 = _mm_and_si128(r0, kMask_x0f);
|
|
|
|
|
// (0000 0000 0g0e 0c0a) -> (00gg 00ee 00cc 00aa)
|
|
|
|
|
const __m128i a1 = _mm_unpacklo_epi8(a0, a0);
|
|
|
|
|
// (00gg 00ee 00cc 00aa) << 16 -> (gg00 ee00 cc00 aa00)
|
|
|
|
|
const __m128i a2 = _mm_slli_epi32(a1, 16);
|
|
|
|
|
// (gg00 ee00 cc00 aa00) & kMask_xf000 -> (g000 e000 c000 a000)
|
|
|
|
|
const __m128i a3 = _mm_and_si128(a2, kMask_xf000);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Simply OR up i3 and a3 now and that's our result:
|
|
|
|
|
// (0hhh 0fff 0ddd 0bbb) | (g000 e000 c000 a000) -> (ghhh efff cddd abbb)
|
|
|
|
|
const __m128i r1 = _mm_or_si128(i3, a3);
|
2010-12-31 10:20:43 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// write out the 128-bit result:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128( (__m128i*)(dst + (y + iy) * width + x), r1 );
|
2010-12-31 10:20:43 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
#if 0
|
|
|
|
|
// Reference C implementation:
|
2010-06-19 13:31:40 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
|
|
|
|
u32 *ptr = dst + (y + iy) * width + x;
|
|
|
|
|
u16 *s = (u16 *)src;
|
2010-12-30 19:17:08 +00:00
|
|
|
ptr[0] = decodeIA8Swapped(s[0]);
|
|
|
|
|
ptr[1] = decodeIA8Swapped(s[1]);
|
|
|
|
|
ptr[2] = decodeIA8Swapped(s[2]);
|
|
|
|
|
ptr[3] = decodeIA8Swapped(s[3]);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
2010-12-31 10:20:43 +00:00
|
|
|
#endif
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C14X2:
|
2010-06-19 13:31:40 +00:00
|
|
|
if (tlutfmt == 2)
|
2011-01-01 03:52:32 +00:00
|
|
|
{
|
2010-06-19 13:31:40 +00:00
|
|
|
// Special decoding is required for TLUT format 5A3
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC14X2_5A3_To_BGRA32(dst + (y + iy) * width + x, (u16*)src, tlutaddr);
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
else if (tlutfmt == 0)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC14X2IA8_To_RGBA(dst + (y + iy) * width + x, (u16*)src, tlutaddr);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesC14X2rgb565_To_RGBA(dst + (y + iy) * width + x, (u16*)src, tlutaddr);
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_RGB565:
|
2010-06-19 13:31:40 +00:00
|
|
|
{
|
2011-01-02 22:53:25 +00:00
|
|
|
// JSD optimized with SSE2 intrinsics.
|
|
|
|
|
// Produces an ~78% speed improvement over reference C implementation.
|
|
|
|
|
const __m128i kMaskR0 = _mm_set_epi32(0x000000F8, 0x000000F8, 0x000000F8, 0x000000F8);
|
|
|
|
|
const __m128i kMaskG0 = _mm_set_epi32(0x0000FC00, 0x0000FC00, 0x0000FC00, 0x0000FC00);
|
|
|
|
|
const __m128i kMaskG1 = _mm_set_epi32(0x00000300, 0x00000300, 0x00000300, 0x00000300);
|
|
|
|
|
const __m128i kMaskB0 = _mm_set_epi32(0x00F80000, 0x00F80000, 0x00F80000, 0x00F80000);
|
|
|
|
|
const __m128i kAlpha = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
|
|
|
|
|
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
|
|
|
|
__m128i *dxtsrc = (__m128i *)src;
|
|
|
|
|
// Load 4x 16-bit colors: (0000 0000 hgfe dcba)
|
|
|
|
|
// where hg, fe, ba, and dc are 16-bit colors in big-endian order
|
|
|
|
|
const __m128i rgb565x4 = _mm_loadl_epi64(dxtsrc);
|
|
|
|
|
|
2011-01-03 01:24:35 +00:00
|
|
|
// The big-endian 16-bit colors `ba` and `dc` look like 0b_gggBBBbb_RRRrrGGg in a little endian xmm register
|
|
|
|
|
// Unpack `hgfe dcba` to `hhgg ffee ddcc bbaa`, where each 32-bit word is now 0b_gggBBBbb_RRRrrGGg_gggBBBbb_RRRrrGGg
|
|
|
|
|
const __m128i c0 = _mm_unpacklo_epi16(rgb565x4, rgb565x4);
|
2011-01-02 22:53:25 +00:00
|
|
|
|
2011-01-03 01:24:35 +00:00
|
|
|
// swizzle 0b_gggBBBbb_RRRrrGGg_gggBBBbb_RRRrrGGg
|
2011-01-02 22:53:25 +00:00
|
|
|
// to 0b_11111111_BBBbbBBB_GGggggGG_RRRrrRRR
|
|
|
|
|
|
2011-01-03 01:24:35 +00:00
|
|
|
// 0b_gggBBBbb_RRRrrGGg_gggBBBbb_RRRrrGGg &
|
2011-01-02 22:53:25 +00:00
|
|
|
// 0b_00000000_00000000_00000000_11111000 =
|
|
|
|
|
// 0b_00000000_00000000_00000000_RRRrr000
|
2011-01-03 01:24:35 +00:00
|
|
|
const __m128i r0 = _mm_and_si128(c0, kMaskR0);
|
2011-01-02 22:53:25 +00:00
|
|
|
// 0b_00000000_00000000_00000000_RRRrr000 >> 5 [32] =
|
|
|
|
|
// 0b_00000000_00000000_00000000_00000RRR
|
|
|
|
|
const __m128i r1 = _mm_srli_epi32(r0, 5);
|
|
|
|
|
|
2011-01-03 01:24:35 +00:00
|
|
|
// 0b_gggBBBbb_RRRrrGGg_gggBBBbb_RRRrrGGg >> 3 [32] =
|
|
|
|
|
// 0b_000gggBB_BbbRRRrr_GGggggBB_BbbRRRrr &
|
2011-01-02 22:53:25 +00:00
|
|
|
// 0b_00000000_00000000_11111100_00000000 =
|
|
|
|
|
// 0b_00000000_00000000_GGgggg00_00000000
|
2011-01-03 01:24:35 +00:00
|
|
|
const __m128i gtmp = _mm_srli_epi32(c0, 3);
|
2011-01-02 22:53:25 +00:00
|
|
|
const __m128i g0 = _mm_and_si128(gtmp, kMaskG0);
|
|
|
|
|
// 0b_GGggggBB_BbbRRRrr_GGggggBB_Bbb00000 >> 6 [32] =
|
|
|
|
|
// 0b_000000GG_ggggBBBb_bRRRrrGG_ggggBBBb &
|
|
|
|
|
// 0b_00000000_00000000_00000011_00000000 =
|
|
|
|
|
// 0b_00000000_00000000_000000GG_00000000 =
|
|
|
|
|
const __m128i g1 = _mm_and_si128(_mm_srli_epi32(gtmp, 6), kMaskG1);
|
|
|
|
|
|
2011-01-03 01:24:35 +00:00
|
|
|
// 0b_gggBBBbb_RRRrrGGg_gggBBBbb_RRRrrGGg >> 5 [32] =
|
|
|
|
|
// 0b_00000ggg_BBBbbRRR_rrGGgggg_BBBbbRRR &
|
2011-01-02 22:53:25 +00:00
|
|
|
// 0b_00000000_11111000_00000000_00000000 =
|
|
|
|
|
// 0b_00000000_BBBbb000_00000000_00000000
|
2011-01-03 01:24:35 +00:00
|
|
|
const __m128i b0 = _mm_and_si128(_mm_srli_epi32(c0, 5), kMaskB0);
|
2011-01-02 22:53:25 +00:00
|
|
|
// 0b_00000000_BBBbb000_00000000_00000000 >> 5 [16] =
|
|
|
|
|
// 0b_00000000_00000BBB_00000000_00000000
|
|
|
|
|
const __m128i b1 = _mm_srli_epi16(b0, 5);
|
|
|
|
|
|
|
|
|
|
// OR together the final RGB bits and the alpha component:
|
|
|
|
|
const __m128i abgr888x4 = _mm_or_si128(
|
|
|
|
|
_mm_or_si128(
|
|
|
|
|
_mm_or_si128(r0, r1),
|
|
|
|
|
_mm_or_si128(g0, g1)
|
|
|
|
|
),
|
|
|
|
|
_mm_or_si128(
|
|
|
|
|
_mm_or_si128(b0, b1),
|
|
|
|
|
kAlpha
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
__m128i *ptr = (__m128i *)(dst + (y + iy) * width + x);
|
|
|
|
|
_mm_storeu_si128(ptr, abgr888x4);
|
|
|
|
|
}
|
|
|
|
|
#if 0
|
|
|
|
|
// Reference C implementation.
|
2010-06-19 13:31:40 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
|
|
|
|
u32 *ptr = dst + (y + iy) * width + x;
|
|
|
|
|
u16 *s = (u16 *)src;
|
|
|
|
|
for(int j = 0; j < 4; j++)
|
|
|
|
|
*ptr++ = decode565RGBA(Common::swap16(*s++));
|
|
|
|
|
}
|
2011-01-02 22:53:25 +00:00
|
|
|
#endif
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_RGB5A3:
|
|
|
|
|
{
|
|
|
|
|
// JSD optimized with SSE2 intrinsics in 2 out of 4 cases.
|
|
|
|
|
// Produces a ~25% speed improvement over reference C implementation.
|
|
|
|
|
const __m128i kMask_x1f = _mm_set_epi32(0x0000001fL, 0x0000001fL, 0x0000001fL, 0x0000001fL);
|
|
|
|
|
const __m128i kMask_x0f = _mm_set_epi32(0x0000000fL, 0x0000000fL, 0x0000000fL, 0x0000000fL);
|
|
|
|
|
const __m128i kMask_x07 = _mm_set_epi32(0x00000007L, 0x00000007L, 0x00000007L, 0x00000007L);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// This is the hard-coded 0xFF alpha constant that is ORed in place after the RGB are calculated
|
|
|
|
|
// for the RGB555 case when (s[x] & 0x8000) is true for all pixels.
|
|
|
|
|
const __m128i aVxff00 = _mm_set_epi32(0xFF000000L, 0xFF000000L, 0xFF000000L, 0xFF000000L);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
{
|
|
|
|
|
u32 *newdst = dst+(y+iy)*width+x;
|
|
|
|
|
const u16 *newsrc = (const u16*)src;
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// TODO: weak point
|
|
|
|
|
const u16 val0 = Common::swap16(newsrc[0]);
|
|
|
|
|
const u16 val1 = Common::swap16(newsrc[1]);
|
|
|
|
|
const u16 val2 = Common::swap16(newsrc[2]);
|
|
|
|
|
const u16 val3 = Common::swap16(newsrc[3]);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Need to check all 4 pixels' MSBs to ensure we can do data-parallelism:
|
|
|
|
|
if (((val0 & 0x8000) & (val1 & 0x8000) & (val2 & 0x8000) & (val3 & 0x8000)) == 0x8000)
|
|
|
|
|
{
|
|
|
|
|
// SSE2 case #1: all 4 pixels are in RGB555 and alpha = 0xFF.
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
const __m128i valV = _mm_set_epi16(0, val3, 0, val2, 0, val1, 0, val0);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Swizzle bits: 00012345 -> 12345123
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//r0 = (((val0>>10) & 0x1f) << 3) | (((val0>>10) & 0x1f) >> 2);
|
|
|
|
|
const __m128i tmprV = _mm_and_si128(_mm_srli_epi16(valV, 10), kMask_x1f);
|
|
|
|
|
const __m128i rV = _mm_or_si128( _mm_slli_epi16(tmprV, 3), _mm_srli_epi16(tmprV, 2) );
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (_______) | (________) | (________);
|
|
|
|
|
__m128i final = rV;
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//g0 = (((val0>>5 ) & 0x1f) << 3) | (((val0>>5 ) & 0x1f) >> 2);
|
|
|
|
|
const __m128i tmpgV = _mm_and_si128(_mm_srli_epi16(valV, 5), kMask_x1f);
|
|
|
|
|
const __m128i gV = _mm_or_si128( _mm_slli_epi16(tmpgV, 3), _mm_srli_epi16(tmpgV, 2) );
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (g0 << 8) | (________) | (________);
|
|
|
|
|
final = _mm_or_si128(
|
|
|
|
|
final,
|
|
|
|
|
_mm_slli_epi32(gV, 8)
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//b0 = (((val0 ) & 0x1f) << 3) | (((val0 ) & 0x1f) >> 2);
|
|
|
|
|
const __m128i tmpbV = _mm_and_si128(valV, kMask_x1f);
|
|
|
|
|
const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) );
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (________);
|
|
|
|
|
final = _mm_or_si128(
|
|
|
|
|
final,
|
|
|
|
|
_mm_slli_epi32(bV, 16)
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Alphas are ORed in as a constant __m128i.
|
|
|
|
|
//a0 = 0xFF;
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
|
|
|
|
final = _mm_or_si128(
|
|
|
|
|
final,
|
|
|
|
|
aVxff00
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// write the final result:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128( (__m128i*)newdst, final );
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
else if (((val0 & 0x8000) | (val1 & 0x8000) | (val2 & 0x8000) | (val3 & 0x8000)) == 0x0000)
|
|
|
|
|
{
|
|
|
|
|
// SSE2 case #2: all 4 pixels are in RGBA4443.
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
const __m128i valV = _mm_set_epi16(0, val3, 0, val2, 0, val1, 0, val0);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Swizzle bits: 00001234 -> 12341234
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//r0 = (((val0>>8 ) & 0xf) << 4) | ((val0>>8 ) & 0xf);
|
|
|
|
|
const __m128i tmprV = _mm_and_si128(_mm_srli_epi16(valV, 8), kMask_x0f);
|
|
|
|
|
const __m128i rV = _mm_or_si128( _mm_slli_epi16(tmprV, 4), tmprV );
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (_______) | (________) | (________);
|
|
|
|
|
__m128i final = rV;
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//g0 = (((val0>>4 ) & 0xf) << 4) | ((val0>>4 ) & 0xf);
|
|
|
|
|
const __m128i tmpgV = _mm_and_si128(_mm_srli_epi16(valV, 4), kMask_x0f);
|
|
|
|
|
const __m128i gV = _mm_or_si128( _mm_slli_epi16(tmpgV, 4), tmpgV );
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (g0 << 8) | (________) | (________);
|
|
|
|
|
final = _mm_or_si128(
|
|
|
|
|
final,
|
|
|
|
|
_mm_slli_epi32(gV, 8)
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//b0 = (((val0 ) & 0xf) << 4) | ((val0 ) & 0xf);
|
|
|
|
|
const __m128i tmpbV = _mm_and_si128(valV, kMask_x0f);
|
|
|
|
|
const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 4), tmpbV );
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (________);
|
|
|
|
|
final = _mm_or_si128(
|
|
|
|
|
final,
|
|
|
|
|
_mm_slli_epi32(bV, 16)
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//a0 = (((val0>>12) & 0x7) << 5) | (((val0>>12) & 0x7) << 2) | (((val0>>12) & 0x7) >> 1);
|
|
|
|
|
const __m128i tmpaV = _mm_and_si128(_mm_srli_epi16(valV, 12), kMask_x07);
|
|
|
|
|
const __m128i aV = _mm_or_si128(
|
|
|
|
|
_mm_slli_epi16(tmpaV, 5),
|
|
|
|
|
_mm_or_si128(
|
|
|
|
|
_mm_slli_epi16(tmpaV, 2),
|
|
|
|
|
_mm_srli_epi16(tmpaV, 1)
|
|
|
|
|
)
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
|
|
|
|
final = _mm_or_si128(
|
|
|
|
|
final,
|
|
|
|
|
_mm_slli_epi32(aV, 24)
|
|
|
|
|
);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// write the final result:
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128( (__m128i*)newdst, final );
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Horrific fallback case, but hey at least it's inlined :D
|
|
|
|
|
// Maybe overkill? I see slight improvements on my machine as far as RDTSC
|
|
|
|
|
// counts and it's all done in registers (on x64). No temp memory moves!
|
|
|
|
|
int r0,g0,b0,a0;
|
|
|
|
|
int r1,g1,b1,a1;
|
|
|
|
|
int r2,g2,b2,a2;
|
|
|
|
|
int r3,g3,b3,a3;
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
// Normal operation, no parallelism to take advantage of:
|
|
|
|
|
if (val0 & 0x8000)
|
|
|
|
|
{
|
|
|
|
|
// Swizzle bits: 00012345 -> 12345123
|
|
|
|
|
r0 = (((val0>>10) & 0x1f) << 3) | (((val0>>10) & 0x1f) >> 2);
|
|
|
|
|
g0 = (((val0>>5 ) & 0x1f) << 3) | (((val0>>5 ) & 0x1f) >> 2);
|
|
|
|
|
b0 = (((val0 ) & 0x1f) << 3) | (((val0 ) & 0x1f) >> 2);
|
|
|
|
|
a0 = 0xFF;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
a0 = (((val0>>12) & 0x7) << 5) | (((val0>>12) & 0x7) << 2) | (((val0>>12) & 0x7) >> 1);
|
|
|
|
|
// Swizzle bits: 00001234 -> 12341234
|
|
|
|
|
r0 = (((val0>>8 ) & 0xf) << 4) | ((val0>>8 ) & 0xf);
|
|
|
|
|
g0 = (((val0>>4 ) & 0xf) << 4) | ((val0>>4 ) & 0xf);
|
|
|
|
|
b0 = (((val0 ) & 0xf) << 4) | ((val0 ) & 0xf);
|
|
|
|
|
}
|
|
|
|
|
newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
if (val1 & 0x8000)
|
|
|
|
|
{
|
|
|
|
|
// Swizzle bits: 00012345 -> 12345123
|
|
|
|
|
r1 = (((val1>>10) & 0x1f) << 3) | (((val1>>10) & 0x1f) >> 2);
|
|
|
|
|
g1 = (((val1>>5 ) & 0x1f) << 3) | (((val1>>5 ) & 0x1f) >> 2);
|
|
|
|
|
b1 = (((val1 ) & 0x1f) << 3) | (((val1 ) & 0x1f) >> 2);
|
|
|
|
|
a1 = 0xFF;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
a1 = (((val1>>12) & 0x7) << 5) | (((val1>>12) & 0x7) << 2) | (((val1>>12) & 0x7) >> 1);
|
|
|
|
|
r1 = (((val1>>8 ) & 0xf) << 4) | ((val1>>8 ) & 0xf);
|
|
|
|
|
g1 = (((val1>>4 ) & 0xf) << 4) | ((val1>>4 ) & 0xf);
|
|
|
|
|
b1 = (((val1 ) & 0xf) << 4) | ((val1 ) & 0xf);
|
|
|
|
|
}
|
|
|
|
|
newdst[1] = r1 | (g1 << 8) | (b1 << 16) | (a1 << 24);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
if (val2 & 0x8000)
|
|
|
|
|
{
|
|
|
|
|
// Swizzle bits: 00012345 -> 12345123
|
|
|
|
|
r2 = (((val2>>10) & 0x1f) << 3) | (((val2>>10) & 0x1f) >> 2);
|
|
|
|
|
g2 = (((val2>>5 ) & 0x1f) << 3) | (((val2>>5 ) & 0x1f) >> 2);
|
|
|
|
|
b2 = (((val2 ) & 0x1f) << 3) | (((val2 ) & 0x1f) >> 2);
|
|
|
|
|
a2 = 0xFF;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
a2 = (((val2>>12) & 0x7) << 5) | (((val2>>12) & 0x7) << 2) | (((val2>>12) & 0x7) >> 1);
|
|
|
|
|
r2 = (((val2>>8 ) & 0xf) << 4) | ((val2>>8 ) & 0xf);
|
|
|
|
|
g2 = (((val2>>4 ) & 0xf) << 4) | ((val2>>4 ) & 0xf);
|
|
|
|
|
b2 = (((val2 ) & 0xf) << 4) | ((val2 ) & 0xf);
|
|
|
|
|
}
|
|
|
|
|
newdst[2] = r2 | (g2 << 8) | (b2 << 16) | (a2 << 24);
|
2010-12-31 07:23:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
if (val3 & 0x8000)
|
|
|
|
|
{
|
|
|
|
|
// Swizzle bits: 00012345 -> 12345123
|
|
|
|
|
r3 = (((val3>>10) & 0x1f) << 3) | (((val3>>10) & 0x1f) >> 2);
|
|
|
|
|
g3 = (((val3>>5 ) & 0x1f) << 3) | (((val3>>5 ) & 0x1f) >> 2);
|
|
|
|
|
b3 = (((val3 ) & 0x1f) << 3) | (((val3 ) & 0x1f) >> 2);
|
|
|
|
|
a3 = 0xFF;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
a3 = (((val3>>12) & 0x7) << 5) | (((val3>>12) & 0x7) << 2) | (((val3>>12) & 0x7) >> 1);
|
|
|
|
|
r3 = (((val3>>8 ) & 0xf) << 4) | ((val3>>8 ) & 0xf);
|
|
|
|
|
g3 = (((val3>>4 ) & 0xf) << 4) | ((val3>>4 ) & 0xf);
|
|
|
|
|
b3 = (((val3 ) & 0xf) << 4) | ((val3 ) & 0xf);
|
|
|
|
|
}
|
|
|
|
|
newdst[3] = r3 | (g3 << 8) | (b3 << 16) | (a3 << 24);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#if 0
|
|
|
|
|
// Reference C implementation:
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
for (int iy = 0; iy < 4; iy++, src += 8)
|
|
|
|
|
decodebytesRGB5A3rgba(dst+(y+iy)*width+x, (u16*)src);
|
2010-12-31 07:23:17 +00:00
|
|
|
#endif
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GX_TF_RGBA8: // speed critical
|
|
|
|
|
{
|
|
|
|
|
// JSD optimized with SSE2 intrinsics.
|
|
|
|
|
// Produces a ~68% improvement in speed over reference C implementation.
|
|
|
|
|
const __m128i kMask_x000f = _mm_set_epi32(0x000000FFL, 0x000000FFL, 0x000000FFL, 0x000000FFL);
|
|
|
|
|
const __m128i kMask_xf000 = _mm_set_epi32(0xFF000000L, 0xFF000000L, 0xFF000000L, 0xFF000000L);
|
|
|
|
|
const __m128i kMask_x0ff0 = _mm_set_epi32(0x00FFFF00L, 0x00FFFF00L, 0x00FFFF00L, 0x00FFFF00L);
|
|
|
|
|
|
|
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4, src += 64)
|
|
|
|
|
{
|
|
|
|
|
// Input is divided up into 16-bit words. The texels are split up into AR and GB components where all
|
|
|
|
|
// AR components come grouped up first in 32 bytes followed by the GB components in 32 bytes. We are
|
|
|
|
|
// processing 16 texels per each loop iteration, numbered from 0-f.
|
|
|
|
|
//
|
|
|
|
|
// Convention is:
|
|
|
|
|
// one byte is [component-name texel-number]
|
|
|
|
|
// __m128i is (4-bytes 4-bytes 4-bytes 4-bytes)
|
|
|
|
|
//
|
|
|
|
|
// Input is ([A 7][R 7][A 6][R 6] [A 5][R 5][A 4][R 4] [A 3][R 3][A 2][R 2] [A 1][R 1][A 0][R 0])
|
|
|
|
|
// ([A f][R f][A e][R e] [A d][R d][A c][R c] [A b][R b][A a][R a] [A 9][R 9][A 8][R 8])
|
|
|
|
|
// ([G 7][B 7][G 6][B 6] [G 5][B 5][G 4][B 4] [G 3][B 3][G 2][B 2] [G 1][B 1][G 0][B 0])
|
|
|
|
|
// ([G f][B f][G e][B e] [G d][B d][G c][B c] [G b][B b][G a][B a] [G 9][B 9][G 8][B 8])
|
|
|
|
|
//
|
|
|
|
|
// Output is (RGBA3 RGBA2 RGBA1 RGBA0)
|
|
|
|
|
// (RGBA7 RGBA6 RGBA5 RGBA4)
|
|
|
|
|
// (RGBAb RGBAa RGBA9 RGBA8)
|
|
|
|
|
// (RGBAf RGBAe RGBAd RGBAc)
|
|
|
|
|
|
|
|
|
|
// Loads the 1st half of AR components ([A 7][R 7][A 6][R 6] [A 5][R 5][A 4][R 4] [A 3][R 3][A 2][R 2] [A 1][R 1][A 0][R 0])
|
2011-01-01 20:54:15 +00:00
|
|
|
const __m128i ar0 = _mm_loadu_si128((__m128i*)src);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Loads the 2nd half of AR components ([A f][R f][A e][R e] [A d][R d][A c][R c] [A b][R b][A a][R a] [A 9][R 9][A 8][R 8])
|
2011-01-01 20:54:15 +00:00
|
|
|
const __m128i ar1 = _mm_loadu_si128((__m128i*)src+1);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Loads the 1st half of GB components ([G 7][B 7][G 6][B 6] [G 5][B 5][G 4][B 4] [G 3][B 3][G 2][B 2] [G 1][B 1][G 0][B 0])
|
2011-01-01 20:54:15 +00:00
|
|
|
const __m128i gb0 = _mm_loadu_si128((__m128i*)src+2);
|
2011-01-01 03:52:32 +00:00
|
|
|
// Loads the 2nd half of GB components ([G f][B f][G e][B e] [G d][B d][G c][B c] [G b][B b][G a][B a] [G 9][B 9][G 8][B 8])
|
2011-01-01 20:54:15 +00:00
|
|
|
const __m128i gb1 = _mm_loadu_si128((__m128i*)src+3);
|
2011-01-01 03:52:32 +00:00
|
|
|
|
|
|
|
|
// Expand the AR components to fill out 32-bit words:
|
|
|
|
|
// ([A 7][R 7][A 6][R 6] [A 5][R 5][A 4][R 4] [A 3][R 3][A 2][R 2] [A 1][R 1][A 0][R 0]) -> ([A 3][A 3][R 3][R 3] [A 2][A 2][R 2][R 2] [A 1][A 1][R 1][R 1] [A 0][A 0][R 0][R 0])
|
|
|
|
|
const __m128i aarr00 = _mm_unpacklo_epi8(ar0, ar0);
|
|
|
|
|
// ([A 7][R 7][A 6][R 6] [A 5][R 5][A 4][R 4] [A 3][R 3][A 2][R 2] [A 1][R 1][A 0][R 0]) -> ([A 7][A 7][R 7][R 7] [A 6][A 6][R 6][R 6] [A 5][A 5][R 5][R 5] [A 4][A 4][R 4][R 4])
|
|
|
|
|
const __m128i aarr01 = _mm_unpackhi_epi8(ar0, ar0);
|
|
|
|
|
// ([A f][R f][A e][R e] [A d][R d][A c][R c] [A b][R b][A a][R a] [A 9][R 9][A 8][R 8]) -> ([A b][A b][R b][R b] [A a][A a][R a][R a] [A 9][A 9][R 9][R 9] [A 8][A 8][R 8][R 8])
|
|
|
|
|
const __m128i aarr10 = _mm_unpacklo_epi8(ar1, ar1);
|
|
|
|
|
// ([A f][R f][A e][R e] [A d][R d][A c][R c] [A b][R b][A a][R a] [A 9][R 9][A 8][R 8]) -> ([A f][A f][R f][R f] [A e][A e][R e][R e] [A d][A d][R d][R d] [A c][A c][R c][R c])
|
|
|
|
|
const __m128i aarr11 = _mm_unpackhi_epi8(ar1, ar1);
|
|
|
|
|
|
|
|
|
|
// Move A right 16 bits and mask off everything but the lowest 8 bits to get A in its final place:
|
|
|
|
|
const __m128i ___a00 = _mm_and_si128(_mm_srli_epi32(aarr00, 16), kMask_x000f);
|
|
|
|
|
// Move R left 16 bits and mask off everything but the highest 8 bits to get R in its final place:
|
|
|
|
|
const __m128i r___00 = _mm_and_si128(_mm_slli_epi32(aarr00, 16), kMask_xf000);
|
|
|
|
|
// OR the two together to get R and A in their final places:
|
|
|
|
|
const __m128i r__a00 = _mm_or_si128(r___00, ___a00);
|
|
|
|
|
|
|
|
|
|
const __m128i ___a01 = _mm_and_si128(_mm_srli_epi32(aarr01, 16), kMask_x000f);
|
|
|
|
|
const __m128i r___01 = _mm_and_si128(_mm_slli_epi32(aarr01, 16), kMask_xf000);
|
|
|
|
|
const __m128i r__a01 = _mm_or_si128(r___01, ___a01);
|
|
|
|
|
|
|
|
|
|
const __m128i ___a10 = _mm_and_si128(_mm_srli_epi32(aarr10, 16), kMask_x000f);
|
|
|
|
|
const __m128i r___10 = _mm_and_si128(_mm_slli_epi32(aarr10, 16), kMask_xf000);
|
|
|
|
|
const __m128i r__a10 = _mm_or_si128(r___10, ___a10);
|
|
|
|
|
|
|
|
|
|
const __m128i ___a11 = _mm_and_si128(_mm_srli_epi32(aarr11, 16), kMask_x000f);
|
|
|
|
|
const __m128i r___11 = _mm_and_si128(_mm_slli_epi32(aarr11, 16), kMask_xf000);
|
|
|
|
|
const __m128i r__a11 = _mm_or_si128(r___11, ___a11);
|
|
|
|
|
|
|
|
|
|
// Expand the GB components to fill out 32-bit words:
|
|
|
|
|
// ([G 7][B 7][G 6][B 6] [G 5][B 5][G 4][B 4] [G 3][B 3][G 2][B 2] [G 1][B 1][G 0][B 0]) -> ([G 3][G 3][B 3][B 3] [G 2][G 2][B 2][B 2] [G 1][G 1][B 1][B 1] [G 0][G 0][B 0][B 0])
|
|
|
|
|
const __m128i ggbb00 = _mm_unpacklo_epi8(gb0, gb0);
|
|
|
|
|
// ([G 7][B 7][G 6][B 6] [G 5][B 5][G 4][B 4] [G 3][B 3][G 2][B 2] [G 1][B 1][G 0][B 0]) -> ([G 7][G 7][B 7][B 7] [G 6][G 6][B 6][B 6] [G 5][G 5][B 5][B 5] [G 4][G 4][B 4][B 4])
|
|
|
|
|
const __m128i ggbb01 = _mm_unpackhi_epi8(gb0, gb0);
|
|
|
|
|
// ([G f][B f][G e][B e] [G d][B d][G c][B c] [G b][B b][G a][B a] [G 9][B 9][G 8][B 8]) -> ([G b][G b][B b][B b] [G a][G a][B a][B a] [G 9][G 9][B 9][B 9] [G 8][G 8][B 8][B 8])
|
|
|
|
|
const __m128i ggbb10 = _mm_unpacklo_epi8(gb1, gb1);
|
|
|
|
|
// ([G f][B f][G e][B e] [G d][B d][G c][B c] [G b][B b][G a][B a] [G 9][B 9][G 8][B 8]) -> ([G f][G f][B f][B f] [G e][G e][B e][B e] [G d][G d][B d][B d] [G c][G c][B c][B c])
|
|
|
|
|
const __m128i ggbb11 = _mm_unpackhi_epi8(gb1, gb1);
|
|
|
|
|
|
|
|
|
|
// G and B are already in perfect spots in the center, just remove the extra copies in the 1st and 4th positions:
|
|
|
|
|
const __m128i _gb_00 = _mm_and_si128(ggbb00, kMask_x0ff0);
|
|
|
|
|
const __m128i _gb_01 = _mm_and_si128(ggbb01, kMask_x0ff0);
|
|
|
|
|
const __m128i _gb_10 = _mm_and_si128(ggbb10, kMask_x0ff0);
|
|
|
|
|
const __m128i _gb_11 = _mm_and_si128(ggbb11, kMask_x0ff0);
|
|
|
|
|
|
|
|
|
|
// Now join up R__A and _GB_ to get RGBA!
|
|
|
|
|
const __m128i rgba00 = _mm_or_si128(r__a00, _gb_00);
|
|
|
|
|
const __m128i rgba01 = _mm_or_si128(r__a01, _gb_01);
|
|
|
|
|
const __m128i rgba10 = _mm_or_si128(r__a10, _gb_10);
|
|
|
|
|
const __m128i rgba11 = _mm_or_si128(r__a11, _gb_11);
|
|
|
|
|
|
|
|
|
|
// Write em out!
|
|
|
|
|
__m128i *dst128 = (__m128i*)( dst + (y + 0) * width + x );
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(dst128, rgba00);
|
2011-01-01 03:52:32 +00:00
|
|
|
dst128 = (__m128i*)( dst + (y + 1) * width + x );
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(dst128, rgba01);
|
2011-01-01 03:52:32 +00:00
|
|
|
dst128 = (__m128i*)( dst + (y + 2) * width + x );
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(dst128, rgba10);
|
2011-01-01 03:52:32 +00:00
|
|
|
dst128 = (__m128i*)( dst + (y + 3) * width + x );
|
2011-01-01 20:54:15 +00:00
|
|
|
_mm_storeu_si128(dst128, rgba11);
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
|
|
|
|
#if 0
|
|
|
|
|
// Reference C implementation.
|
2010-06-19 13:31:40 +00:00
|
|
|
for (int y = 0; y < height; y += 4)
|
|
|
|
|
for (int x = 0; x < width; x += 4)
|
|
|
|
|
{
|
|
|
|
|
for (int iy = 0; iy < 4; iy++)
|
|
|
|
|
decodebytesARGB8_4ToRgba(dst + (y+iy)*width + x, (u16*)src + 4 * iy, (u16*)src + 4 * iy + 16);
|
|
|
|
|
src += 64;
|
2010-12-31 07:23:17 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
#endif
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
break;
|
|
|
|
|
case GX_TF_CMPR: // speed critical
|
|
|
|
|
// The metroid games use this format almost exclusively.
|
2010-06-19 13:31:40 +00:00
|
|
|
{
|
|
|
|
|
for (int y = 0; y < height; y += 8)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
for (int x = 0; x < width; x += 8)
|
|
|
|
|
{
|
|
|
|
|
decodeDXTBlockRGBA((u32*)dst + y * width + x, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
decodeDXTBlockRGBA((u32*)dst + y * width + x + 4, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
decodeDXTBlockRGBA((u32*)dst + (y + 4) * width + x, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
decodeDXTBlockRGBA((u32*)dst + (y + 4) * width + x + 4, (DXTBlock*)src, width);
|
|
|
|
|
src += sizeof(DXTBlock);
|
|
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
}
|
2010-06-19 13:31:40 +00:00
|
|
|
|
|
|
|
|
// The "copy" texture formats, too?
|
2011-01-01 03:52:32 +00:00
|
|
|
return PC_TEX_FMT_RGBA32;
|
2010-06-19 13:31:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center)
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
TexFmt_Overlay_Enable = enable;
|
|
|
|
|
TexFmt_Overlay_Center = center;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-19 13:31:40 +00:00
|
|
|
PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt,bool rgbaOnly)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
PC_TexFormat retval = PC_TEX_FMT_NONE;
|
2010-06-22 00:52:17 +00:00
|
|
|
|
2009-09-30 12:58:02 +00:00
|
|
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
2010-06-22 13:17:01 +00:00
|
|
|
if (g_Config.bEnableOpenCL)
|
2011-01-01 03:52:32 +00:00
|
|
|
retval = TexDecoder_Decode_OpenCL(dst, src, width, height, texformat, tlutaddr, tlutfmt, rgbaOnly);
|
2009-09-30 12:58:02 +00:00
|
|
|
#endif
|
2010-06-22 00:52:17 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
if(retval == PC_TEX_FMT_NONE)
|
|
|
|
|
retval = rgbaOnly ? TexDecoder_Decode_RGBA((u32*)dst,src,width,height,texformat,tlutaddr,tlutfmt) : TexDecoder_Decode_real(dst,src,width,height,texformat,tlutaddr,tlutfmt);
|
2010-06-22 00:52:17 +00:00
|
|
|
|
2009-07-26 09:52:35 +00:00
|
|
|
if ((!TexFmt_Overlay_Enable)|| (retval == PC_TEX_FMT_NONE))
|
2009-05-09 07:55:30 +00:00
|
|
|
return retval;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-07-26 09:52:35 +00:00
|
|
|
int w = min(width, 40);
|
|
|
|
|
int h = min(height, 10);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-07-26 09:52:35 +00:00
|
|
|
int xoff = (width - w) >> 1;
|
|
|
|
|
int yoff = (height - h) >> 1;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-05-09 07:55:30 +00:00
|
|
|
if (!TexFmt_Overlay_Center)
|
|
|
|
|
{
|
|
|
|
|
xoff=0;
|
|
|
|
|
yoff=0;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-05-09 07:55:30 +00:00
|
|
|
const char* fmt = texfmt[texformat&15];
|
|
|
|
|
while (*fmt)
|
|
|
|
|
{
|
|
|
|
|
int xcnt = 0;
|
|
|
|
|
int nchar = sfont_map[(int)*fmt];
|
|
|
|
|
|
|
|
|
|
const unsigned char *ptr = sfont_raw[nchar]; // each char is up to 9x10
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-08-11 13:58:35 +00:00
|
|
|
for (int x = 0; x < 9;x++)
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
|
|
|
|
if (ptr[x] == 0x78)
|
|
|
|
|
break;
|
|
|
|
|
xcnt++;
|
|
|
|
|
}
|
2009-08-11 13:58:35 +00:00
|
|
|
|
|
|
|
|
for (int y=0; y < 10; y++)
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
2009-08-11 13:58:35 +00:00
|
|
|
for (int x=0; x < xcnt; x++)
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
2009-07-26 09:52:35 +00:00
|
|
|
switch(retval)
|
|
|
|
|
{
|
2009-05-09 07:55:30 +00:00
|
|
|
case PC_TEX_FMT_I8:
|
|
|
|
|
{
|
|
|
|
|
// TODO: Is this an acceptable way to draw in I8?
|
|
|
|
|
u8 *dtp = (u8*)dst;
|
2009-08-11 13:58:35 +00:00
|
|
|
dtp[(y + yoff) * width + x + xoff] = ptr[x] ? 0xFF : 0x88;
|
2009-05-09 07:55:30 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case PC_TEX_FMT_IA8:
|
2009-05-13 02:06:02 +00:00
|
|
|
case PC_TEX_FMT_IA4_AS_IA8:
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
|
|
|
|
u16 *dtp = (u16*)dst;
|
2009-08-11 13:58:35 +00:00
|
|
|
dtp[(y + yoff) * width + x + xoff] = ptr[x] ? 0xFFFF : 0xFF00;
|
2009-05-09 07:55:30 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case PC_TEX_FMT_RGB565:
|
|
|
|
|
{
|
|
|
|
|
u16 *dtp = (u16*)dst;
|
2009-07-26 09:52:35 +00:00
|
|
|
dtp[(y + yoff)*width + x + xoff] = ptr[x] ? 0xFFFF : 0x0000;
|
2009-05-09 07:55:30 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
case PC_TEX_FMT_BGRA32:
|
|
|
|
|
{
|
|
|
|
|
int *dtp = (int*)dst;
|
2009-08-11 13:58:35 +00:00
|
|
|
dtp[(y + yoff) * width + x + xoff] = ptr[x] ? 0xFFFFFFFF : 0xFF000000;
|
2009-05-09 07:55:30 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-07-26 09:52:35 +00:00
|
|
|
ptr += 9;
|
2009-05-09 07:55:30 +00:00
|
|
|
}
|
2009-07-26 09:52:35 +00:00
|
|
|
xoff += xcnt;
|
2009-05-09 07:55:30 +00:00
|
|
|
fmt++;
|
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2009-05-09 07:55:30 +00:00
|
|
|
return retval;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2009-10-10 21:19:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, int tlutaddr, int tlutfmt)
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
/* General formula for computing texture offset
|
|
|
|
|
//
|
|
|
|
|
u16 sBlk = s / blockWidth;
|
|
|
|
|
u16 tBlk = t / blockHeight;
|
|
|
|
|
u16 widthBlks = (width / blockWidth) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) * blockWidth * blockHeight;
|
|
|
|
|
u16 blkS = s & (blockWidth - 1);
|
|
|
|
|
u16 blkT = t & (blockHeight - 1);
|
|
|
|
|
u32 blkOff = blkT * blockWidth + blkS;
|
|
|
|
|
*/
|
2009-10-10 21:19:39 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (texformat)
|
|
|
|
|
{
|
|
|
|
|
case GX_TF_C4:
|
2009-10-10 21:19:39 +00:00
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 3;
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 tBlk = t >> 3;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 3) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 5;
|
|
|
|
|
u16 blkS = s & 7;
|
|
|
|
|
u16 blkT = t & 7;
|
|
|
|
|
u32 blkOff = (blkT << 3) + blkS;
|
|
|
|
|
|
|
|
|
|
int rs = (blkOff & 1)?0:4;
|
|
|
|
|
u32 offset = base + (blkOff >> 1);
|
2009-10-10 21:19:39 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
u8 val = (*(src + offset) >> rs) & 0xF;
|
|
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
|
|
|
|
|
|
|
|
|
switch (tlutfmt)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
*((u32*)dst) = decodeIA8Swapped(tlut[val]);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
*((u32*)dst) = decode565RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
*((u32*)dst) = decode5A3RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GX_TF_I4:
|
|
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 3;
|
|
|
|
|
u16 tBlk = t >> 3;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 3) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 5;
|
|
|
|
|
u16 blkS = s & 7;
|
|
|
|
|
u16 blkT = t & 7;
|
|
|
|
|
u32 blkOff = (blkT << 3) + blkS;
|
|
|
|
|
|
|
|
|
|
int rs = (blkOff & 1)?0:4;
|
|
|
|
|
u32 offset = base + (blkOff >> 1);
|
|
|
|
|
|
|
|
|
|
u8 val = (*(src + offset) >> rs) & 0xF;
|
|
|
|
|
val = Convert4To8(val);
|
2009-10-10 21:19:39 +00:00
|
|
|
dst[0] = val;
|
2011-01-01 03:52:32 +00:00
|
|
|
dst[1] = val;
|
|
|
|
|
dst[2] = val;
|
|
|
|
|
dst[3] = val;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2009-10-10 21:19:39 +00:00
|
|
|
case GX_TF_I8:
|
|
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 sBlk = s >> 3;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 3) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 5;
|
|
|
|
|
u16 blkS = s & 7;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 3) + blkS;
|
|
|
|
|
|
|
|
|
|
u8 val = *(src + base + blkOff);
|
|
|
|
|
dst[0] = val;
|
|
|
|
|
dst[1] = val;
|
|
|
|
|
dst[2] = val;
|
|
|
|
|
dst[3] = val;
|
2009-10-10 21:19:39 +00:00
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C8:
|
|
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 3;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 3) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 5;
|
|
|
|
|
u16 blkS = s & 7;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 3) + blkS;
|
|
|
|
|
|
|
|
|
|
u8 val = *(src + base + blkOff);
|
|
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
2009-10-10 21:19:39 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (tlutfmt)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
*((u32*)dst) = decodeIA8Swapped(tlut[val]);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
*((u32*)dst) = decode565RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
*((u32*)dst) = decode5A3RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-10-10 21:19:39 +00:00
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_IA4:
|
|
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 3;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 3) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 5;
|
|
|
|
|
u16 blkS = s & 7;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 3) + blkS;
|
|
|
|
|
|
|
|
|
|
u8 val = *(src + base + blkOff);
|
|
|
|
|
const u8 a = Convert4To8(val>>4);
|
|
|
|
|
const u8 l = Convert4To8(val&0xF);
|
|
|
|
|
dst[0] = l;
|
|
|
|
|
dst[1] = l;
|
|
|
|
|
dst[2] = l;
|
|
|
|
|
dst[3] = a;
|
|
|
|
|
}
|
2009-10-10 21:19:39 +00:00
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_IA8:
|
2009-10-10 21:19:39 +00:00
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 2;
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 2) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 4;
|
|
|
|
|
u16 blkS = s & 3;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 2) + blkS;
|
|
|
|
|
|
|
|
|
|
u32 offset = (base + blkOff) << 1;
|
|
|
|
|
const u16* valAddr = (u16*)(src + offset);
|
2009-10-10 21:19:39 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
*((u32*)dst) = decodeIA8Swapped(*valAddr);
|
2009-10-10 21:19:39 +00:00
|
|
|
}
|
|
|
|
|
break;
|
2011-01-01 03:52:32 +00:00
|
|
|
case GX_TF_C14X2:
|
2009-10-10 21:19:39 +00:00
|
|
|
{
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 sBlk = s >> 2;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 2) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 4;
|
|
|
|
|
u16 blkS = s & 3;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 2) + blkS;
|
|
|
|
|
|
|
|
|
|
u32 offset = (base + blkOff) << 1;
|
|
|
|
|
const u16* valAddr = (u16*)(src + offset);
|
2009-10-10 21:19:39 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
u16 val = Common::swap16(*valAddr) & 0x3FFF;
|
|
|
|
|
u16 *tlut = (u16*)(texMem + tlutaddr);
|
2009-10-10 21:19:39 +00:00
|
|
|
|
2011-01-01 03:52:32 +00:00
|
|
|
switch (tlutfmt)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
*((u32*)dst) = decodeIA8Swapped(tlut[val]);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
*((u32*)dst) = decode565RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
*((u32*)dst) = decode5A3RGBA(Common::swap16(tlut[val]));
|
|
|
|
|
break;
|
|
|
|
|
}
|
2009-10-10 21:19:39 +00:00
|
|
|
}
|
2011-01-01 03:52:32 +00:00
|
|
|
break;
|
|
|
|
|
case GX_TF_RGB565:
|
|
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 2;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 2) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 4;
|
|
|
|
|
u16 blkS = s & 3;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 2) + blkS;
|
|
|
|
|
|
|
|
|
|
u32 offset = (base + blkOff) << 1;
|
|
|
|
|
const u16* valAddr = (u16*)(src + offset);
|
|
|
|
|
|
|
|
|
|
*((u32*)dst) = decode565RGBA(Common::swap16(*valAddr));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GX_TF_RGB5A3:
|
|
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 2;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 2) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 4;
|
|
|
|
|
u16 blkS = s & 3;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 2) + blkS;
|
|
|
|
|
|
|
|
|
|
u32 offset = (base + blkOff) << 1;
|
|
|
|
|
const u16* valAddr = (u16*)(src + offset);
|
|
|
|
|
|
|
|
|
|
*((u32*)dst) = decode5A3RGBA(Common::swap16(*valAddr));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GX_TF_RGBA8:
|
|
|
|
|
{
|
|
|
|
|
u16 sBlk = s >> 2;
|
|
|
|
|
u16 tBlk = t >> 2;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 2) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 5; // shift by 5 is correct
|
|
|
|
|
u16 blkS = s & 3;
|
|
|
|
|
u16 blkT = t & 3;
|
|
|
|
|
u32 blkOff = (blkT << 2) + blkS;
|
|
|
|
|
|
|
|
|
|
u32 offset = (base + blkOff) << 1 ;
|
|
|
|
|
const u8* valAddr = src + offset;
|
|
|
|
|
|
|
|
|
|
dst[3] = valAddr[0];
|
|
|
|
|
dst[0] = valAddr[1];
|
|
|
|
|
dst[1] = valAddr[32];
|
|
|
|
|
dst[2] = valAddr[33];
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GX_TF_CMPR:
|
|
|
|
|
{
|
|
|
|
|
u16 sDxt = s >> 2;
|
|
|
|
|
u16 tDxt = t >> 2;
|
|
|
|
|
|
|
|
|
|
u16 sBlk = sDxt >> 1;
|
|
|
|
|
u16 tBlk = tDxt >> 1;
|
|
|
|
|
u16 widthBlks = (imageWidth >> 3) + 1;
|
|
|
|
|
u32 base = (tBlk * widthBlks + sBlk) << 2;
|
|
|
|
|
u16 blkS = sDxt & 1;
|
|
|
|
|
u16 blkT = tDxt & 1;
|
|
|
|
|
u32 blkOff = (blkT << 1) + blkS;
|
|
|
|
|
|
|
|
|
|
u32 offset = (base + blkOff) << 3;
|
|
|
|
|
|
|
|
|
|
const DXTBlock* dxtBlock = (const DXTBlock*)(src + offset);
|
|
|
|
|
|
|
|
|
|
u16 c1 = Common::swap16(dxtBlock->color1);
|
|
|
|
|
u16 c2 = Common::swap16(dxtBlock->color2);
|
|
|
|
|
int blue1 = Convert5To8(c1 & 0x1F);
|
|
|
|
|
int blue2 = Convert5To8(c2 & 0x1F);
|
|
|
|
|
int green1 = Convert6To8((c1 >> 5) & 0x3F);
|
|
|
|
|
int green2 = Convert6To8((c2 >> 5) & 0x3F);
|
|
|
|
|
int red1 = Convert5To8((c1 >> 11) & 0x1F);
|
|
|
|
|
int red2 = Convert5To8((c2 >> 11) & 0x1F);
|
|
|
|
|
|
|
|
|
|
u16 ss = s & 3;
|
|
|
|
|
u16 tt = t & 3;
|
|
|
|
|
|
|
|
|
|
int colorSel = dxtBlock->lines[tt];
|
|
|
|
|
int rs = 6 - (ss << 1);
|
|
|
|
|
colorSel = (colorSel >> rs) & 3;
|
|
|
|
|
colorSel |= c1 > c2?0:4;
|
|
|
|
|
|
|
|
|
|
u32 color = 0;
|
|
|
|
|
|
|
|
|
|
switch (colorSel)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
case 4:
|
|
|
|
|
color = makeRGBA(red1, green1, blue1, 255);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
case 5:
|
|
|
|
|
color = makeRGBA(red2, green2, blue2, 255);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
color = makeRGBA(red1+(red2-red1)/3, green1+(green2-green1)/3, blue1+(blue2-blue1)/3, 255);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
color = makeRGBA(red2+(red1-red2)/3, green2+(green1-green2)/3, blue2+(blue1-blue2)/3, 255);
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
color = makeRGBA((int)ceil((float)(red1+red2)/2), (int)ceil((float)(green1+green2)/2), (int)ceil((float)(blue1+blue2)/2), 255);
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
color = makeRGBA(red2, green2, blue2, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*((u32*)dst) = color;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2009-10-10 21:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
const char* texfmt[] = {
|
2009-05-09 07:55:30 +00:00
|
|
|
// pixel
|
|
|
|
|
"I4", "I8", "IA4", "IA8",
|
|
|
|
|
"RGB565", "RGB5A3", "RGBA8", "C4",
|
|
|
|
|
"C8", "C14X2", "0x0A", "0x0B",
|
|
|
|
|
"0x0C", "0x0D", "CMPR", "0x0F",
|
|
|
|
|
// Z-buffer
|
|
|
|
|
"0x10", "Z8", "0x12", "Z16",
|
|
|
|
|
"0x14", "0x15", "Z24X8", "0x17",
|
|
|
|
|
"0x18", "0x19", "0x1A", "0x1B",
|
|
|
|
|
"0x1C", "0x1D", "0x1E", "0x1F",
|
|
|
|
|
// pixel + copy
|
|
|
|
|
"CR4", "0x21", "CRA4", "CRA8",
|
|
|
|
|
"0x24", "0x25", "CYUVA8", "CA8",
|
|
|
|
|
"CR8", "CG8", "CB8", "CRG8",
|
|
|
|
|
"CGB8", "0x2D", "0x2E", "0x2F",
|
|
|
|
|
// Z + copy
|
|
|
|
|
"CZ4", "0x31", "0x32", "0x33",
|
|
|
|
|
"0x34", "0x35", "0x36", "0x37",
|
|
|
|
|
"0x38", "CZ8M", "CZ8L", "0x3B",
|
|
|
|
|
"CZ16L", "0x3D", "0x3E", "0x3F",
|
2008-12-08 05:30:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const unsigned char sfont_map[] = {
|
2009-05-09 07:55:30 +00:00
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,10,10,10,10,
|
|
|
|
|
10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,
|
|
|
|
|
26,27,28,29,30,31,32,33,34,35,36,10,10,10,10,10,
|
|
|
|
|
10,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,
|
|
|
|
|
52,53,54,55,56,57,58,59,60,61,62,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
|
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
2008-12-08 05:30:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const unsigned char sfont_raw[][9*10] = {
|
2009-05-09 07:55:30 +00:00
|
|
|
{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0x00, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},{
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0x00, 0x00, 0x00, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x78, 0x78, 0x78,
|
|
|
|
|
},
|
2008-12-08 05:30:24 +00:00
|
|
|
};
|