#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 index; vm::bptr value; }; struct CellPngEncConfig { be_t maxWidth; be_t maxHeight; be_t maxBitDepth; b8 enableSpu; be_t addMemSize; vm::bptr exParamList; be_t exParamNum; }; struct CellPngEncAttr { be_t memSize; // usz u8 cmdQueueDepth; be_t versionUpper; be_t versionLower; }; struct CellPngEncResource { vm::bptr memAddr; be_t memSize; // usz be_t ppuThreadPriority; be_t spuThreadPriority; }; struct CellPngEncResourceEx { vm::bptr memAddr; be_t memSize; // usz be_t ppuThreadPriority; vm::bptr spurs; // CellSpurs u8 priority[8]; }; struct CellPngEncPicture { be_t width; be_t height; be_t pitchWidth; be_t colorSpace; // CellPngEncColorSpace be_t bitDepth; b8 packedPixel; vm::bptr pictureAddr; be_t userData; }; struct CellPngEncAncillaryChunk { be_t chunkType; // CellPngEncChunkType vm::bptr chunkData; }; struct CellPngEncEncodeParam { b8 enableSpu; be_t encodeColorSpace; // CellPngEncColorSpace be_t compressionLevel; // CellPngEncCompressionLevel be_t filterType; vm::bptr ancillaryChunkList; be_t ancillaryChunkNum; }; struct CellPngEncOutputParam { be_t location; // CellPngEncLocation vm::bcptr streamFileName; vm::bptr streamAddr; be_t limitSize; // usz }; struct CellPngEncStreamInfo { be_t state; be_t location; // CellPngEncLocation vm::bcptr streamFileName; vm::bptr streamAddr; be_t limitSize; // usz be_t streamSize; // usz be_t processedLine; be_t userData; };