IPU: SGN support for IDEC. Again, what uses this I don't know.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3108 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1 2010-05-28 22:16:01 +00:00
parent a98072a3ca
commit e82bb4a82b
2 changed files with 10 additions and 3 deletions

View File

@ -1162,7 +1162,7 @@ void __fastcall ipu_csc(macroblock_8 *mb8, macroblock_rgb32 *rgb32, int sgn)
if (s_thresh[0] > 0)
{
for (i = 0; i < 64*4; i++, p += 4)
for (i = 0; i < 16*16; i++, p += 4)
{
if ((p[0] < s_thresh[0]) && (p[1] < s_thresh[0]) && (p[2] < s_thresh[0]))
*(u32*)p = 0;
@ -1172,12 +1172,19 @@ void __fastcall ipu_csc(macroblock_8 *mb8, macroblock_rgb32 *rgb32, int sgn)
}
else if (s_thresh[1] > 0)
{
for (i = 0; i < 64*4; i++, p += 4)
for (i = 0; i < 16*16; i++, p += 4)
{
if ((p[0] < s_thresh[1]) && (p[1] < s_thresh[1]) && (p[2] < s_thresh[1]))
p[3] = 0x40;
}
}
if (sgn)
{
for (i = 0; i < 16*16; i++, p += 4)
{
*(u32*)p ^= 0x808080;
}
}
}
void __fastcall ipu_dither(const macroblock_rgb32* rgb32, macroblock_rgb16 *rgb16, int dte)

View File

@ -1203,7 +1203,7 @@ void mpeg2sliceIDEC(void* pdone)
}
else
{
ipu_csc(decoder->mb8, decoder->rgb32, decoder->dte);
ipu_csc(decoder->mb8, decoder->rgb32, decoder->sgn);
ipu_dither(decoder->rgb32, decoder->rgb16, decoder->dte);
g_nIPU0Data = 32;