#pragma once //Return Codes enum { CELL_GIFDEC_ERROR_OPEN_FILE = 0x80611300, CELL_GIFDEC_ERROR_STREAM_FORMAT = 0x80611301, CELL_GIFDEC_ERROR_SEQ = 0x80611302, CELL_GIFDEC_ERROR_ARG = 0x80611303, CELL_GIFDEC_ERROR_FATAL = 0x80611304, CELL_GIFDEC_ERROR_SPU_UNSUPPORT = 0x80611305, CELL_GIFDEC_ERROR_SPU_ERROR = 0x80611306, CELL_GIFDEC_ERROR_CB_PARAM = 0x80611307, }; enum CellGifDecStreamSrcSel { CELL_GIFDEC_FILE = 0, // Input from a file CELL_GIFDEC_BUFFER = 1, // Input from a buffer }; enum CellGifDecColorSpace { CELL_GIFDEC_RGBA = 10, CELL_GIFDEC_ARGB = 20, }; enum CellGifDecRecordType { CELL_GIFDEC_RECORD_TYPE_IMAGE_DESC = 1, // Image data block CELL_GIFDEC_RECORD_TYPE_EXTENSION = 2, // Extension block CELL_GIFDEC_RECORD_TYPE_TERMINATE = 3, // Trailer block }; enum CellGifDecDecodeStatus { CELL_GIFDEC_DEC_STATUS_FINISH = 0, //Decoding finished CELL_GIFDEC_DEC_STATUS_STOP = 1, //Decoding halted }; struct CellGifDecInfo { be_t SWidth; be_t SHeight; be_t SGlobalColorTableFlag; be_t SColorResolution; be_t SSortFlag; be_t SSizeOfGlobalColorTable; be_t SBackGroundColor; be_t SPixelAspectRatio; }; struct CellGifDecSrc { be_t srcSelect; be_t fileName; be_t fileOffset; be_t fileSize; be_t streamPtr; be_t streamSize; be_t spuThreadEnable; }; struct CellGifDecInParam { be_t commandPtr; be_t colorSpace; // CellGifDecColorSpace be_t outputColorAlpha1; be_t outputColorAlpha2; be_t reserved[2]; }; struct CellGifDecOutParam { be_t outputWidthByte; be_t outputWidth; be_t outputHeight; be_t outputComponents; be_t outputBitDepth; be_t outputColorSpace; // CellGifDecColorSpace be_t useMemorySpace; }; struct CellGifDecExtension { be_t label; be_t data; }; struct CellGifDecDataOutInfo { be_t recordType; CellGifDecExtension outExtension; be_t status; }; struct CellGifDecOpnInfo { be_t initSpaceAllocated; }; struct CellGifDecDataCtrlParam { be_t outputBytesPerLine; }; //Custom structs struct CellGifDecSubHandle { u32 fd; u64 fileSize; CellGifDecInfo info; CellGifDecOutParam outParam; CellGifDecSrc src; };