mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-12 19:19:43 +00:00
It was overcomplicated
This commit is contained in:
parent
c79b52b334
commit
3b71721a33
1 changed files with 71 additions and 158 deletions
|
@ -18,7 +18,8 @@ u32 libpngdec;
|
||||||
u32 libpngdec_rtoc;
|
u32 libpngdec_rtoc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32 pngDecCreate(
|
s32 pngDecCreate(
|
||||||
|
vm::ptr<u32> mainHandle,
|
||||||
vm::ptr<const CellPngDecThreadInParam> param,
|
vm::ptr<const CellPngDecThreadInParam> param,
|
||||||
vm::ptr<const CellPngDecExtThreadInParam> ext = {})
|
vm::ptr<const CellPngDecExtThreadInParam> ext = {})
|
||||||
{
|
{
|
||||||
|
@ -27,7 +28,7 @@ u32 pngDecCreate(
|
||||||
|
|
||||||
if (!dec)
|
if (!dec)
|
||||||
{
|
{
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_FATAL, "Memory allocation failed");
|
return CELL_PNGDEC_ERROR_FATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize decoder
|
// initialize decoder
|
||||||
|
@ -41,20 +42,26 @@ u32 pngDecCreate(
|
||||||
}
|
}
|
||||||
|
|
||||||
// use virtual memory address as a handle
|
// use virtual memory address as a handle
|
||||||
return dec.addr();
|
*mainHandle = dec.addr();
|
||||||
|
|
||||||
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pngDecDestroy(CellPngDecMainHandle dec)
|
s32 pngDecDestroy(CellPngDecMainHandle dec)
|
||||||
{
|
{
|
||||||
if (!Memory.Free(dec.addr()))
|
if (!Memory.Free(dec.addr()))
|
||||||
{
|
{
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_FATAL, "Memory deallocation failed");
|
return CELL_PNGDEC_ERROR_FATAL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 pngDecOpen(
|
return CELL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 pngDecOpen(
|
||||||
CellPngDecMainHandle dec,
|
CellPngDecMainHandle dec,
|
||||||
|
vm::ptr<u32> subHandle,
|
||||||
vm::ptr<const CellPngDecSrc> src,
|
vm::ptr<const CellPngDecSrc> src,
|
||||||
|
vm::ptr<CellPngDecOpnInfo> openInfo,
|
||||||
vm::ptr<const CellPngDecCbCtrlStrm> cb = {},
|
vm::ptr<const CellPngDecCbCtrlStrm> cb = {},
|
||||||
vm::ptr<const CellPngDecOpnParam> param = {})
|
vm::ptr<const CellPngDecOpnParam> param = {})
|
||||||
{
|
{
|
||||||
|
@ -63,7 +70,7 @@ u32 pngDecOpen(
|
||||||
|
|
||||||
if (!stream)
|
if (!stream)
|
||||||
{
|
{
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_FATAL, "Memory allocation failed");
|
return CELL_PNGDEC_ERROR_FATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize stream
|
// initialize stream
|
||||||
|
@ -102,19 +109,26 @@ u32 pngDecOpen(
|
||||||
}
|
}
|
||||||
|
|
||||||
// use virtual memory address as a handle
|
// use virtual memory address as a handle
|
||||||
return stream.addr();
|
*subHandle = stream.addr();
|
||||||
|
|
||||||
|
// set memory info
|
||||||
|
openInfo->initSpaceAllocated = 4096;
|
||||||
|
|
||||||
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pngDecClose(CellPngDecSubHandle stream)
|
s32 pngDecClose(CellPngDecSubHandle stream)
|
||||||
{
|
{
|
||||||
cellFsClose(stream->fd);
|
cellFsClose(stream->fd);
|
||||||
if (!Memory.Free(stream.addr()))
|
if (!Memory.Free(stream.addr()))
|
||||||
{
|
{
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_FATAL, "Memory deallocation failed");
|
return CELL_PNGDEC_ERROR_FATAL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void pngReadHeader(
|
return CELL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 pngReadHeader(
|
||||||
CellPngDecSubHandle stream,
|
CellPngDecSubHandle stream,
|
||||||
vm::ptr<CellPngDecInfo> info,
|
vm::ptr<CellPngDecInfo> info,
|
||||||
vm::ptr<CellPngDecExtInfo> extInfo = {})
|
vm::ptr<CellPngDecExtInfo> extInfo = {})
|
||||||
|
@ -123,7 +137,7 @@ void pngReadHeader(
|
||||||
|
|
||||||
if (stream->fileSize < 29)
|
if (stream->fileSize < 29)
|
||||||
{
|
{
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_HEADER, "The file is smaller than the length of a PNG header");
|
return CELL_PNGDEC_ERROR_HEADER; // The file is smaller than the length of a PNG header
|
||||||
}
|
}
|
||||||
|
|
||||||
//Write the header to buffer
|
//Write the header to buffer
|
||||||
|
@ -146,7 +160,7 @@ void pngReadHeader(
|
||||||
buffer_32[1].ToBE() != se32(0x0D0A1A0A) || // Error: The first 8 bytes are not a valid PNG signature
|
buffer_32[1].ToBE() != se32(0x0D0A1A0A) || // Error: The first 8 bytes are not a valid PNG signature
|
||||||
buffer_32[3].ToBE() != se32(0x49484452)) // Error: The PNG file does not start with an IHDR chunk
|
buffer_32[3].ToBE() != se32(0x49484452)) // Error: The PNG file does not start with an IHDR chunk
|
||||||
{
|
{
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_HEADER, "Invalid PNG header");
|
return CELL_PNGDEC_ERROR_HEADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (buffer[25])
|
switch (buffer[25])
|
||||||
|
@ -156,7 +170,9 @@ void pngReadHeader(
|
||||||
case 3: current_info.colorSpace = CELL_PNGDEC_PALETTE; current_info.numComponents = 1; break;
|
case 3: current_info.colorSpace = CELL_PNGDEC_PALETTE; current_info.numComponents = 1; break;
|
||||||
case 4: current_info.colorSpace = CELL_PNGDEC_GRAYSCALE_ALPHA; current_info.numComponents = 2; break;
|
case 4: current_info.colorSpace = CELL_PNGDEC_GRAYSCALE_ALPHA; current_info.numComponents = 2; break;
|
||||||
case 6: current_info.colorSpace = CELL_PNGDEC_RGBA; current_info.numComponents = 4; break;
|
case 6: current_info.colorSpace = CELL_PNGDEC_RGBA; current_info.numComponents = 4; break;
|
||||||
default: throw hle::error(CELL_PNGDEC_ERROR_HEADER, "Unknown color space (%d)"); return;
|
default:
|
||||||
|
cellPngDec->Error("cellPngDecDecodeData: Unsupported color space (%d)", (u32)buffer[25]);
|
||||||
|
return CELL_PNGDEC_ERROR_HEADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_info.imageWidth = buffer_32[4];
|
current_info.imageWidth = buffer_32[4];
|
||||||
|
@ -166,9 +182,16 @@ void pngReadHeader(
|
||||||
current_info.chunkInformation = 0; // Unimplemented
|
current_info.chunkInformation = 0; // Unimplemented
|
||||||
|
|
||||||
*info = current_info;
|
*info = current_info;
|
||||||
|
|
||||||
|
if (extInfo)
|
||||||
|
{
|
||||||
|
extInfo->reserved = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pngDecSetParameter(
|
return CELL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 pngDecSetParameter(
|
||||||
CellPngDecSubHandle stream,
|
CellPngDecSubHandle stream,
|
||||||
vm::ptr<const CellPngDecInParam> inParam,
|
vm::ptr<const CellPngDecInParam> inParam,
|
||||||
vm::ptr<CellPngDecOutParam> outParam,
|
vm::ptr<CellPngDecOutParam> outParam,
|
||||||
|
@ -195,7 +218,9 @@ void pngDecSetParameter(
|
||||||
case CELL_PNGDEC_RGBA:
|
case CELL_PNGDEC_RGBA:
|
||||||
case CELL_PNGDEC_ARGB: current_outParam.outputComponents = 4; break;
|
case CELL_PNGDEC_ARGB: current_outParam.outputComponents = 4; break;
|
||||||
|
|
||||||
default: throw hle::error(CELL_PNGDEC_ERROR_ARG, fmt::Format("Unknown color space (%d)", (u32)current_outParam.outputColorSpace).c_str());
|
default:
|
||||||
|
cellPngDec->Error("pngDecSetParameter: Unsupported color space (%d)", current_outParam.outputColorSpace.ToLE());
|
||||||
|
return CELL_PNGDEC_ERROR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_outParam.outputBitDepth = inParam->outputBitDepth;
|
current_outParam.outputBitDepth = inParam->outputBitDepth;
|
||||||
|
@ -203,9 +228,11 @@ void pngDecSetParameter(
|
||||||
current_outParam.useMemorySpace = 0; // Unimplemented
|
current_outParam.useMemorySpace = 0; // Unimplemented
|
||||||
|
|
||||||
*outParam = current_outParam;
|
*outParam = current_outParam;
|
||||||
|
|
||||||
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pngDecodeData(
|
s32 pngDecodeData(
|
||||||
CellPngDecSubHandle stream,
|
CellPngDecSubHandle stream,
|
||||||
vm::ptr<u8> data,
|
vm::ptr<u8> data,
|
||||||
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
|
vm::ptr<const CellPngDecDataCtrlParam> dataCtrlParam,
|
||||||
|
@ -242,7 +269,11 @@ void pngDecodeData(
|
||||||
stbi_load_from_memory(png.ptr(), (s32)fileSize, &width, &height, &actual_components, 4),
|
stbi_load_from_memory(png.ptr(), (s32)fileSize, &width, &height, &actual_components, 4),
|
||||||
&::free
|
&::free
|
||||||
);
|
);
|
||||||
if (!image) throw hle::error(CELL_PNGDEC_ERROR_STREAM_FORMAT);
|
if (!image)
|
||||||
|
{
|
||||||
|
cellPngDec->Error("pngDecodeData: stbi_load_from_memory failed");
|
||||||
|
return CELL_PNGDEC_ERROR_STREAM_FORMAT;
|
||||||
|
}
|
||||||
|
|
||||||
const bool flip = current_outParam.outputMode == CELL_PNGDEC_BOTTOM_TO_TOP;
|
const bool flip = current_outParam.outputMode == CELL_PNGDEC_BOTTOM_TO_TOP;
|
||||||
const int bytesPerLine = (u32)dataCtrlParam->outputBytesPerLine;
|
const int bytesPerLine = (u32)dataCtrlParam->outputBytesPerLine;
|
||||||
|
@ -317,14 +348,17 @@ void pngDecodeData(
|
||||||
case CELL_PNGDEC_GRAYSCALE:
|
case CELL_PNGDEC_GRAYSCALE:
|
||||||
case CELL_PNGDEC_PALETTE:
|
case CELL_PNGDEC_PALETTE:
|
||||||
case CELL_PNGDEC_GRAYSCALE_ALPHA:
|
case CELL_PNGDEC_GRAYSCALE_ALPHA:
|
||||||
cellPngDec->Error("cellPngDecDecodeData: Unsupported color space (%d)", current_outParam.outputColorSpace.ToLE());
|
cellPngDec->Error("pngDecodeData: Unsupported color space (%d)", current_outParam.outputColorSpace.ToLE());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw hle::error(CELL_PNGDEC_ERROR_ARG);
|
cellPngDec->Error("pngDecodeData: Unsupported color space (%d)", current_outParam.outputColorSpace.ToLE());
|
||||||
|
return CELL_PNGDEC_ERROR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataOutInfo->status = CELL_PNGDEC_DEC_STATUS_FINISH;
|
dataOutInfo->status = CELL_PNGDEC_DEC_STATUS_FINISH;
|
||||||
|
|
||||||
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam)
|
s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInParam> threadInParam, vm::ptr<CellPngDecThreadOutParam> threadOutParam)
|
||||||
|
@ -336,16 +370,8 @@ s32 cellPngDecCreate(vm::ptr<u32> mainHandle, vm::ptr<const CellPngDecThreadInPa
|
||||||
cellPngDec->Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x)",
|
||||||
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr());
|
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr());
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// create decoder
|
// create decoder
|
||||||
*mainHandle = pngDecCreate(threadInParam);
|
if (s32 res = pngDecCreate(mainHandle, threadInParam)) return res;
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set codec version
|
// set codec version
|
||||||
threadOutParam->pngCodecVersion = PNGDEC_CODEC_VERSION;
|
threadOutParam->pngCodecVersion = PNGDEC_CODEC_VERSION;
|
||||||
|
@ -368,16 +394,8 @@ s32 cellPngDecExtCreate(
|
||||||
cellPngDec->Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x, extThreadInParam_addr=0x%x, extThreadOutParam_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecCreate(mainHandle_addr=0x%x, threadInParam_addr=0x%x, threadOutParam_addr=0x%x, extThreadInParam_addr=0x%x, extThreadOutParam_addr=0x%x)",
|
||||||
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr(), extThreadInParam.addr(), extThreadOutParam.addr());
|
mainHandle.addr(), threadInParam.addr(), threadOutParam.addr(), extThreadInParam.addr(), extThreadOutParam.addr());
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// create decoder
|
// create decoder
|
||||||
*mainHandle = pngDecCreate(threadInParam, extThreadInParam);
|
if (s32 res = pngDecCreate(mainHandle, threadInParam, extThreadInParam)) return res;
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set codec version
|
// set codec version
|
||||||
threadOutParam->pngCodecVersion = PNGDEC_CODEC_VERSION;
|
threadOutParam->pngCodecVersion = PNGDEC_CODEC_VERSION;
|
||||||
|
@ -396,17 +414,8 @@ s32 cellPngDecDestroy(CellPngDecMainHandle mainHandle)
|
||||||
#else
|
#else
|
||||||
cellPngDec->Warning("cellPngDecDestroy(mainHandle=0x%x)", mainHandle.addr());
|
cellPngDec->Warning("cellPngDecDestroy(mainHandle=0x%x)", mainHandle.addr());
|
||||||
|
|
||||||
try
|
// destroy decoder
|
||||||
{
|
return pngDecDestroy(mainHandle);
|
||||||
pngDecDestroy(mainHandle);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,21 +432,8 @@ s32 cellPngDecOpen(
|
||||||
cellPngDec->Warning("cellPngDecOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr());
|
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr());
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// create stream handle
|
// create stream handle
|
||||||
*subHandle = pngDecOpen(mainHandle, src);
|
return pngDecOpen(mainHandle, subHandle, src, openInfo);
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set memory info
|
|
||||||
openInfo->initSpaceAllocated = 4096;
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,21 +452,8 @@ s32 cellPngDecExtOpen(
|
||||||
cellPngDec->Warning("cellPngDecExtOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x, cbCtrlStrm_addr=0x%x, opnParam_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecExtOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x, cbCtrlStrm_addr=0x%x, opnParam_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr(), cbCtrlStrm.addr(), opnParam.addr());
|
mainHandle.addr(), subHandle.addr(), src.addr(), openInfo.addr(), cbCtrlStrm.addr(), opnParam.addr());
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// create stream handle
|
// create stream handle
|
||||||
*subHandle = pngDecOpen(mainHandle, src, cbCtrlStrm, opnParam);
|
return pngDecOpen(mainHandle, subHandle, src, openInfo, cbCtrlStrm, opnParam);
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set memory info
|
|
||||||
openInfo->initSpaceAllocated = 4096;
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,17 +465,7 @@ s32 cellPngDecClose(CellPngDecMainHandle mainHandle, CellPngDecSubHandle subHand
|
||||||
#else
|
#else
|
||||||
cellPngDec->Warning("cellPngDecClose(mainHandle=0x%x, subHandle=0x%x)", mainHandle.addr(), subHandle.addr());
|
cellPngDec->Warning("cellPngDecClose(mainHandle=0x%x, subHandle=0x%x)", mainHandle.addr(), subHandle.addr());
|
||||||
|
|
||||||
try
|
return pngDecClose(subHandle);
|
||||||
{
|
|
||||||
pngDecClose(subHandle);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,17 +478,7 @@ s32 cellPngDecReadHeader(CellPngDecMainHandle mainHandle, CellPngDecSubHandle su
|
||||||
cellPngDec->Warning("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), info.addr());
|
mainHandle.addr(), subHandle.addr(), info.addr());
|
||||||
|
|
||||||
try
|
return pngReadHeader(subHandle, info);
|
||||||
{
|
|
||||||
pngReadHeader(subHandle, info);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,17 +495,7 @@ s32 cellPngDecExtReadHeader(
|
||||||
cellPngDec->Warning("cellPngDecExtReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x, extInfo_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecExtReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%x, extInfo_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), info.addr(), extInfo.addr());
|
mainHandle.addr(), subHandle.addr(), info.addr(), extInfo.addr());
|
||||||
|
|
||||||
try
|
return pngReadHeader(subHandle, info, extInfo);
|
||||||
{
|
|
||||||
pngReadHeader(subHandle, info, extInfo);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -559,17 +512,7 @@ s32 cellPngDecSetParameter(
|
||||||
cellPngDec->Warning("cellPngDecSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr());
|
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr());
|
||||||
|
|
||||||
try
|
return pngDecSetParameter(subHandle, inParam, outParam);
|
||||||
{
|
|
||||||
pngDecSetParameter(subHandle, inParam, outParam);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -588,17 +531,7 @@ s32 cellPngDecExtSetParameter(
|
||||||
cellPngDec->Warning("cellPngDecExtSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x, extInParam=0x%x, extOutParam=0x%x",
|
cellPngDec->Warning("cellPngDecExtSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam_addr=0x%x, outParam_addr=0x%x, extInParam=0x%x, extOutParam=0x%x",
|
||||||
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr(), extInParam.addr(), extOutParam.addr());
|
mainHandle.addr(), subHandle.addr(), inParam.addr(), outParam.addr(), extInParam.addr(), extOutParam.addr());
|
||||||
|
|
||||||
try
|
return pngDecSetParameter(subHandle, inParam, outParam, extInParam, extOutParam);
|
||||||
{
|
|
||||||
pngDecSetParameter(subHandle, inParam, outParam, extInParam, extOutParam);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -616,17 +549,7 @@ s32 cellPngDecDecodeData(
|
||||||
cellPngDec->Warning("cellPngDecDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr());
|
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr());
|
||||||
|
|
||||||
try
|
return pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo);
|
||||||
{
|
|
||||||
pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,17 +569,7 @@ s32 cellPngDecExtDecodeData(
|
||||||
cellPngDec->Warning("cellPngDecExtDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x, cbCtrlDisp_addr=0x%x, dispParam_addr=0x%x)",
|
cellPngDec->Warning("cellPngDecExtDecodeData(mainHandle=0x%x, subHandle=0x%x, data_addr=0x%x, dataCtrlParam_addr=0x%x, dataOutInfo_addr=0x%x, cbCtrlDisp_addr=0x%x, dispParam_addr=0x%x)",
|
||||||
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr(), cbCtrlDisp.addr(), dispParam.addr());
|
mainHandle.addr(), subHandle.addr(), data.addr(), dataCtrlParam.addr(), dataOutInfo.addr(), cbCtrlDisp.addr(), dispParam.addr());
|
||||||
|
|
||||||
try
|
return pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo, cbCtrlDisp, dispParam);
|
||||||
{
|
|
||||||
pngDecodeData(subHandle, data, dataCtrlParam, dataOutInfo, cbCtrlDisp, dispParam);
|
|
||||||
}
|
|
||||||
catch (hle::error& e)
|
|
||||||
{
|
|
||||||
e.print(__FUNCTION__);
|
|
||||||
return e.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue