mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
stub cellPngEnc
This commit is contained in:
parent
413f87b737
commit
1cb4fb9c50
4 changed files with 214 additions and 28 deletions
|
@ -1,70 +1,83 @@
|
|||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "cellPngEnc.h"
|
||||
|
||||
LOG_CHANNEL(cellPngEnc);
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
template <>
|
||||
void fmt_class_string<CellPngEncError>::format(std::string& out, u64 arg)
|
||||
{
|
||||
CELL_PNGENC_ERROR_ARG = 0x80611291,
|
||||
CELL_PNGENC_ERROR_SEQ = 0x80611292,
|
||||
CELL_PNGENC_ERROR_BUSY = 0x80611293,
|
||||
CELL_PNGENC_ERROR_EMPTY = 0x80611294,
|
||||
CELL_PNGENC_ERROR_RESET = 0x80611295,
|
||||
CELL_PNGENC_ERROR_FATAL = 0x80611296,
|
||||
};
|
||||
format_enum(out, arg, [](CellPngEncError value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
STR_CASE(CELL_PNGENC_ERROR_ARG);
|
||||
STR_CASE(CELL_PNGENC_ERROR_SEQ);
|
||||
STR_CASE(CELL_PNGENC_ERROR_BUSY);
|
||||
STR_CASE(CELL_PNGENC_ERROR_EMPTY);
|
||||
STR_CASE(CELL_PNGENC_ERROR_RESET);
|
||||
STR_CASE(CELL_PNGENC_ERROR_FATAL);
|
||||
STR_CASE(CELL_PNGENC_ERROR_STREAM_ABORT);
|
||||
STR_CASE(CELL_PNGENC_ERROR_STREAM_SKIP);
|
||||
STR_CASE(CELL_PNGENC_ERROR_STREAM_OVERFLOW);
|
||||
STR_CASE(CELL_PNGENC_ERROR_STREAM_FILE_OPEN);
|
||||
}
|
||||
|
||||
s32 cellPngEncQueryAttr()
|
||||
return unknown;
|
||||
});
|
||||
}
|
||||
|
||||
error_code cellPngEncQueryAttr(vm::cptr<CellPngEncConfig> config, vm::ptr<CellPngEncAttr> attr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncQueryAttr(config=*0x%x, attr=*0x%x)", config, attr);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncOpen()
|
||||
error_code cellPngEncOpen(vm::cptr<CellPngEncConfig> config, vm::cptr<CellPngEncResource> resource, vm::pptr<void> handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncOpen(config=*0x%x, resource=*0x%x, handle=*0x%x)", config, resource, handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncOpenEx()
|
||||
error_code cellPngEncOpenEx(vm::cptr<CellPngEncConfig> config, vm::cptr<CellPngEncResourceEx> resourceEx, vm::pptr<void> handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncOpenEx(config=*0x%x, resourceEx=*0x%x, handle=*0x%x)", config, resourceEx, handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncClose()
|
||||
error_code cellPngEncClose(vm::ptr<void> handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncClose(handle=*0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncWaitForInput()
|
||||
error_code cellPngEncWaitForInput(vm::ptr<void> handle, b8 block)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncWaitForInput(handle=*0x%x, block=%d)", handle, block);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncEncodePicture()
|
||||
error_code cellPngEncEncodePicture(vm::ptr<void> handle, vm::cptr<CellPngEncPicture> picture, vm::cptr<CellPngEncEncodeParam> encodeParam, vm::cptr<CellPngEncOutputParam> outputParam)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncEncodePicture(handle=*0x%x, picture=*0x%x, encodeParam=*0x%x, outputParam=*0x%x)", handle, picture, encodeParam, outputParam);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncWaitForOutput()
|
||||
error_code cellPngEncWaitForOutput(vm::ptr<void> handle, vm::ptr<u32> streamInfoNum, b8 block)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncWaitForOutput(handle=*0x%x, streamInfoNum=*0x%x, block=%d)", handle, streamInfoNum, block);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncGetStreamInfo()
|
||||
error_code cellPngEncGetStreamInfo(vm::ptr<void> handle, vm::ptr<CellPngEncStreamInfo> streamInfo)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncGetStreamInfo(handle=*0x%x, streamInfo=*0x%x)", handle, streamInfo);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellPngEncReset()
|
||||
error_code cellPngEncReset(vm::ptr<void> handle)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellPngEnc);
|
||||
cellPngEnc.todo("cellPngEncReset(handle=*0x%x)", handle);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
169
rpcs3/Emu/Cell/Modules/cellPngEnc.h
Normal file
169
rpcs3/Emu/Cell/Modules/cellPngEnc.h
Normal file
|
@ -0,0 +1,169 @@
|
|||
#pragma once
|
||||
|
||||
// Error Codes
|
||||
enum CellPngEncError
|
||||
{
|
||||
CELL_PNGENC_ERROR_ARG = 0x80611291,
|
||||
CELL_PNGENC_ERROR_SEQ = 0x80611292,
|
||||
CELL_PNGENC_ERROR_BUSY = 0x80611293,
|
||||
CELL_PNGENC_ERROR_EMPTY = 0x80611294,
|
||||
CELL_PNGENC_ERROR_RESET = 0x80611295,
|
||||
CELL_PNGENC_ERROR_FATAL = 0x80611296,
|
||||
CELL_PNGENC_ERROR_STREAM_ABORT = 0x806112A1,
|
||||
CELL_PNGENC_ERROR_STREAM_SKIP = 0x806112A2,
|
||||
CELL_PNGENC_ERROR_STREAM_OVERFLOW = 0x806112A3,
|
||||
CELL_PNGENC_ERROR_STREAM_FILE_OPEN = 0x806112A4,
|
||||
};
|
||||
|
||||
enum CellPngEncColorSpace
|
||||
{
|
||||
CELL_PNGENC_COLOR_SPACE_GRAYSCALE = 1,
|
||||
CELL_PNGENC_COLOR_SPACE_RGB = 2,
|
||||
CELL_PNGENC_COLOR_SPACE_PALETTE = 4,
|
||||
CELL_PNGENC_COLOR_SPACE_GRAYSCALE_ALPHA = 9,
|
||||
CELL_PNGENC_COLOR_SPACE_RGBA = 10,
|
||||
CELL_PNGENC_COLOR_SPACE_ARGB = 20
|
||||
};
|
||||
|
||||
enum CellPngEncCompressionLevel
|
||||
{
|
||||
CELL_PNGENC_COMPR_LEVEL_0,
|
||||
CELL_PNGENC_COMPR_LEVEL_1,
|
||||
CELL_PNGENC_COMPR_LEVEL_2,
|
||||
CELL_PNGENC_COMPR_LEVEL_3,
|
||||
CELL_PNGENC_COMPR_LEVEL_4,
|
||||
CELL_PNGENC_COMPR_LEVEL_5,
|
||||
CELL_PNGENC_COMPR_LEVEL_6,
|
||||
CELL_PNGENC_COMPR_LEVEL_7,
|
||||
CELL_PNGENC_COMPR_LEVEL_8,
|
||||
CELL_PNGENC_COMPR_LEVEL_9
|
||||
};
|
||||
|
||||
enum CellPngEncFilterType
|
||||
{
|
||||
CELL_PNGENC_FILTER_TYPE_NONE = 0x08,
|
||||
CELL_PNGENC_FILTER_TYPE_SUB = 0x10,
|
||||
CELL_PNGENC_FILTER_TYPE_UP = 0x20,
|
||||
CELL_PNGENC_FILTER_TYPE_AVG = 0x40,
|
||||
CELL_PNGENC_FILTER_TYPE_PAETH = 0x80,
|
||||
CELL_PNGENC_FILTER_TYPE_ALL = 0xF8
|
||||
};
|
||||
|
||||
enum CellPngEncChunkType
|
||||
{
|
||||
CELL_PNGENC_CHUNK_TYPE_PLTE,
|
||||
CELL_PNGENC_CHUNK_TYPE_TRNS,
|
||||
CELL_PNGENC_CHUNK_TYPE_CHRM,
|
||||
CELL_PNGENC_CHUNK_TYPE_GAMA,
|
||||
CELL_PNGENC_CHUNK_TYPE_ICCP,
|
||||
CELL_PNGENC_CHUNK_TYPE_SBIT,
|
||||
CELL_PNGENC_CHUNK_TYPE_SRGB,
|
||||
CELL_PNGENC_CHUNK_TYPE_TEXT,
|
||||
CELL_PNGENC_CHUNK_TYPE_BKGD,
|
||||
CELL_PNGENC_CHUNK_TYPE_HIST,
|
||||
CELL_PNGENC_CHUNK_TYPE_PHYS,
|
||||
CELL_PNGENC_CHUNK_TYPE_SPLT,
|
||||
CELL_PNGENC_CHUNK_TYPE_TIME,
|
||||
CELL_PNGENC_CHUNK_TYPE_OFFS,
|
||||
CELL_PNGENC_CHUNK_TYPE_PCAL,
|
||||
CELL_PNGENC_CHUNK_TYPE_SCAL,
|
||||
CELL_PNGENC_CHUNK_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
enum CellPngEncLocation
|
||||
{
|
||||
CELL_PNGENC_LOCATION_FILE,
|
||||
CELL_PNGENC_LOCATION_BUFFER
|
||||
};
|
||||
|
||||
//typedef void *CellPngEncHandle;
|
||||
|
||||
struct CellPngEncExParam
|
||||
{
|
||||
be_t<s32> index;
|
||||
vm::bptr<s32> value;
|
||||
};
|
||||
|
||||
struct CellPngEncConfig
|
||||
{
|
||||
be_t<u32> maxWidth;
|
||||
be_t<u32> maxHeight;
|
||||
be_t<u32> maxBitDepth;
|
||||
b8 enableSpu;
|
||||
be_t<u32> addMemSize;
|
||||
vm::bptr<CellPngEncExParam> exParamList;
|
||||
be_t<u32> exParamNum;
|
||||
};
|
||||
|
||||
struct CellPngEncAttr
|
||||
{
|
||||
be_t<u32> memSize; // size_t
|
||||
u8 cmdQueueDepth;
|
||||
be_t<u32> versionUpper;
|
||||
be_t<u32> versionLower;
|
||||
};
|
||||
|
||||
struct CellPngEncResource
|
||||
{
|
||||
vm::bptr<void> memAddr;
|
||||
be_t<u32> memSize; // size_t
|
||||
be_t<s32> ppuThreadPriority;
|
||||
be_t<s32> spuThreadPriority;
|
||||
};
|
||||
|
||||
struct CellPngEncResourceEx
|
||||
{
|
||||
vm::bptr<void> memAddr;
|
||||
be_t<u32> memSize; // size_t
|
||||
be_t<s32> ppuThreadPriority;
|
||||
vm::bptr<void> spurs; // CellSpurs
|
||||
u8 priority[8];
|
||||
};
|
||||
|
||||
struct CellPngEncPicture
|
||||
{
|
||||
be_t<u32> width;
|
||||
be_t<u32> height;
|
||||
be_t<u32> pitchWidth;
|
||||
be_t<u32> colorSpace; // CellPngEncColorSpace
|
||||
be_t<u32> bitDepth;
|
||||
b8 packedPixel;
|
||||
vm::bptr<void> pictureAddr;
|
||||
be_t<u64> userData;
|
||||
};
|
||||
|
||||
struct CellPngEncAncillaryChunk
|
||||
{
|
||||
be_t<u32> chunkType; // CellPngEncChunkType
|
||||
vm::bptr<void> chunkData;
|
||||
};
|
||||
|
||||
struct CellPngEncEncodeParam
|
||||
{
|
||||
b8 enableSpu;
|
||||
be_t<u32> encodeColorSpace; // CellPngEncColorSpace
|
||||
be_t<u32> compressionLevel; // CellPngEncCompressionLevel
|
||||
be_t<u32> filterType;
|
||||
vm::bptr<CellPngEncAncillaryChunk> ancillaryChunkList;
|
||||
be_t<u32> ancillaryChunkNum;
|
||||
};
|
||||
|
||||
struct CellPngEncOutputParam
|
||||
{
|
||||
be_t<u32> location; // CellPngEncLocation
|
||||
vm::bcptr<char> streamFileName;
|
||||
vm::bptr<void> streamAddr;
|
||||
be_t<u32> limitSize; // size_t
|
||||
};
|
||||
|
||||
struct CellPngEncStreamInfo
|
||||
{
|
||||
be_t<s32> state;
|
||||
be_t<u32> location; // CellPngEncLocation
|
||||
vm::bcptr<char> streamFileName;
|
||||
vm::bptr<void> streamAddr;
|
||||
be_t<u32> limitSize; // size_t
|
||||
be_t<u32> streamSize; // size_t
|
||||
be_t<u32> processedLine;
|
||||
be_t<u64> userData;
|
||||
};
|
|
@ -509,6 +509,7 @@
|
|||
<ClInclude Include="Emu\Cell\Modules\cellJpgEnc.h" />
|
||||
<ClInclude Include="Emu\Cell\lv2\sys_overlay.h" />
|
||||
<ClInclude Include="Emu\Cell\Modules\cellOskDialog.h" />
|
||||
<ClInclude Include="Emu\Cell\Modules\cellPngEnc.h" />
|
||||
<ClInclude Include="Emu\Cell\Modules\cellVoice.h" />
|
||||
<ClInclude Include="Emu\Cell\Modules\StaticHLE.h" />
|
||||
<ClInclude Include="Emu\Cell\PPUAnalyser.h" />
|
||||
|
|
|
@ -1357,6 +1357,9 @@
|
|||
<ClInclude Include="Emu\Cell\Modules\cellPngDec.h">
|
||||
<Filter>Emu\Cell\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\Modules\cellPngEnc.h">
|
||||
<Filter>Emu\Cell\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\Modules\cellResc.h">
|
||||
<Filter>Emu\Cell\Modules</Filter>
|
||||
</ClInclude>
|
||||
|
|
Loading…
Add table
Reference in a new issue