Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/LibJXR/image/decode/strdec_x86.c view on Meta::CPAN
mov [edi + ebx + 8], eax
add edi, edx // $edi = pbRGB += cbRGB
mov eax, [esp + DISP + 64 * 2 + 4 + 8] // ..B3G3R3
mov ecx, [esp + DISP + 64 * 2 + 32 + 8] // B2G2R2..
shld eax, ecx, 24 // R3B2G2R2
mov [edi + ebx + 0], eax
mov eax, [esp + DISP + 64 * 2 + 20 + 8] // ..B7G7R7
mov ecx, [esp + DISP + 64 * 2 + 36 + 8] // B3G3R3..
shld eax, ecx, 16 // G7R7B3G3
mov [edi + ebx + 4], eax
mov eax, [esp + DISP + 64 * 2 + 16 + 8] // ..B6G6R6
mov ecx, [esp + DISP + 64 * 2 + 52 + 8] // B7G7R7..
shld eax, ecx, 8 // B6G6R6B7
mov [edi + ebx + 8], eax
add edi, edx // $edi = pbRGB += cbRGB
// RGBX32 -> RGB24
mov eax, [esp + DISP + 64 * 3 + 4 + 8] // ..B3G3R3
mov ecx, [esp + DISP + 64 * 3 + 32 + 8] // B2G2R2..
shld eax, ecx, 24 // R3B2G2R2
mov [edi + ebx + 0], eax
mov eax, [esp + DISP + 64 * 3 + 20 + 8] // ..B7G7R7
mov ecx, [esp + DISP + 64 * 3 + 36 + 8] // B3G3R3..
shld eax, ecx, 16 // G7R7B3G3
mov [edi + ebx + 4], eax
mov eax, [esp + DISP + 64 * 3 + 16 + 8] // ..B6G6R6
mov ecx, [esp + DISP + 64 * 3 + 52 + 8] // B7G7R7..
shld eax, ecx, 8 // B6G6R6B7
mov [edi + ebx + 8], eax
add edi, edx // $edi = pbRGB += cbRGB
mov eax, [esp + DISP + 64 * 3 + 4] // ..B1G1R1
mov ecx, [esp + DISP + 64 * 3 + 32] // B0G0R0..
shld eax, ecx, 24 // R1B0G0R0
mov [edi + ebx + 0], eax
mov eax, [esp + DISP + 64 * 3 + 20] // ..B5G5R5
mov ecx, [esp + DISP + 64 * 3 + 36] // B1G1R1..
shld eax, ecx, 16 // G5R5B1G1
mov [edi + ebx + 4], eax
mov eax, [esp + DISP + 64 * 3 + 16] // ..B4G4R4
mov ecx, [esp + DISP + 64 * 3 + 52] // B5G5R5..
shld eax, ecx, 8 // B4G4R4B5
mov [edi + ebx + 8], eax
//================================
add esi, 256 - 64
add ebx, 12
jnz Loop0
//================
pop esp
pop edi
pop esi
pop ebx
pop ebp
ret 20
}
}
Int outputMBRow_RGB24_Lossless_1(CWMImageStrCodec* pSC)
{
#ifdef REENTRANT_MODE
const size_t cHeight = min((pSC->m_Dparam->cROIBottomY + 1) - (pSC->cRow - 1) * 16, 16);
const size_t iFirstRow = ((pSC->cRow - 1) * 16 > pSC->m_Dparam->cROITopY ? 0 : (pSC->m_Dparam->cROITopY & 0xf));
#endif
const size_t cbRGB = pSC->WMIBI.cbStride;
const U8* const pbRGB = (U8*)pSC->WMIBI.pv + cbRGB * (pSC->cRow - 1) * 16;
U8* const pbY = (U8*)pSC->a0MBbuffer[0];
U8* const pbU = (U8*)pSC->a0MBbuffer[1];
// U8* const pbV = (U8*)pSC->a0MBbuffer[2];
const size_t cmbColumn = (pSC->WMII.cWidth + 15) / 16;
assert(BD_8 == pSC->WMII.bdBitDepth);
assert(CF_RGB == pSC->WMII.cfColorFormat);
assert(24 == pSC->WMII.cBitsPerUnit);
assert(pSC->WMII.bRGB);
assert(O_NONE == pSC->WMII.oOrientation);
assert(YUV_444 == pSC->m_param.cfColorFormat);
assert(!pSC->m_param.bScaledArith);
assert(pSC->m_Dparam->bDecodeFullFrame);
storeRGB24_5(pbY + 64 * 0, pbU - pbY, pbRGB + cbRGB * 0, cbRGB, cmbColumn);
storeRGB24_5(pbY + 64 * 2, pbU - pbY, pbRGB + cbRGB * 8, cbRGB, cmbColumn);
#ifdef REENTRANT_MODE
pSC->WMIBI.cLinesDecoded = cHeight - iFirstRow;
#endif
return ICERR_OK;
}
__declspec(naked) void __stdcall storeRGB24_3(
U8* pbYCoCg,
size_t cbYCoCg,
const U8* pbRGB,
size_t cbRGB,
size_t cmb,
const U8* Shift)
{
UNREFERENCED_PARAMETER( pbYCoCg );
UNREFERENCED_PARAMETER( cbYCoCg );
UNREFERENCED_PARAMETER( pbRGB );
UNREFERENCED_PARAMETER( cbRGB );
UNREFERENCED_PARAMETER( cmb );
UNREFERENCED_PARAMETER( Shift );
__asm {
push ebp
push ebx
push esi
push edi
mov ecx, [esp + 40] // $ecx = Shift
mov ebx, [esp + 36] // $ebx = cmb
mov edi, [esp + 28] // $edi = pbRGB
lea ebx, [ebx + ebx * 2] // $ebx = cmb * 3
mov edx, [esp + 32] // $edx = cbRGB
src/Source/LibJXR/image/decode/strdec_x86.c view on Meta::CPAN
{
strPost4x4Stage2Split_alternate(p0, p1);
}
//================================
// first level inverse transform
strIDCT4x4Stage1_OPT5(p0, p1);
//================================
// first level inverse overlap
if (OL_ONE <= olOverlap)
{
strPost4x4Stage1_alternate_ASM5(p0, p1);
}
}
return ICERR_OK;
}
#endif
#endif
//================================================================
void StrDecOpt(CWMImageStrCodec* pSC)
{
#if defined(WMP_OPT_SSE2)
if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
{
CWMImageInfo* pII = &pSC->WMII;
// CWMIStrCodecParam* pSCP = &pSC->WMISCP;
g_const_d0 = _mm_setzero_si128();
g_const_d3 = _mm_set1_epi32(3);
g_const_d1 = _mm_set_epi32(1, 1, 1, 1);
g_const_d4 = _mm_set_epi32(4, 4, 4, 4);
g_const_d0x80 = _mm_set_epi32(0x80, 0x80, 0x80, 0x80);
g_const_w0x80 = _mm_set_epi16(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80);
g_const_b0x80 = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80);
if (pSC->WMII.fPaddedUserBuffer &&
//pSC->m_Dparam->bDecodeFullFrame &&
//((pII->cWidth & 0xf) == 0) &&
//(((int) pSC->WMIBI.pv & 0xf) == 0) &&
BD_8 == pII->bdBitDepth &&
CF_RGB == pII->cfColorFormat &&
24 == pII->cBitsPerUnit &&
pII->bRGB &&
O_NONE == pII->oOrientation &&
YUV_444 == pSC->m_param.cfColorFormat &&
pSC->p1MBbuffer[1] - pSC->p1MBbuffer[0] == pSC->p1MBbuffer[2] - pSC->p1MBbuffer[1] &&
pSC->m_Dparam->bDecodeFullFrame &&
1)
{
#if defined(WMP_OPT_CC_DEC)
if (pSC->m_param.bScaledArith || pSC->WMISCP.olOverlap != OL_NONE)
{
pSC->Load = outputMBRow_RGB24_Lossy_3;
}
else
{
pSC->Load = outputMBRow_RGB24_Lossless_1;
}
#endif // WMP_OPT_CC_DEC
}
if (YUV_444 == pSC->m_param.cfColorFormat &&
pSC->p1MBbuffer[1] - pSC->p1MBbuffer[0] == pSC->p1MBbuffer[2] - pSC->p1MBbuffer[1] &&
pSC->m_Dparam->bDecodeFullWidth &&
pSC->m_param.cSubVersion == CODEC_SUBVERSION_NEWSCALING_SOFT_TILES &&
1 == pSC->m_Dparam->cThumbnailScale)
{
#if defined(WMP_OPT_TRFM_DEC)
pSC->TransformCenter = invTransformMacroblock_YUV444_Center5;
#endif
}
}
#else
UNREFERENCED_PARAMETER( pSC );
#endif
}
( run in 0.822 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )