| 217 | } |
| 218 | |
| 219 | error_code cellVpostExec(u32 handle, vm::cptr<u8> inPicBuff, vm::cptr<CellVpostCtrlParam> ctrlParam, vm::ptr<u8> outPicBuff, vm::ptr<CellVpostPictureInfo> picInfo) |
| 220 | { |
| 221 | cellVpost.trace("cellVpostExec(handle=0x%x, inPicBuff=*0x%x, ctrlParam=*0x%x, outPicBuff=*0x%x, picInfo=*0x%x)", handle, inPicBuff, ctrlParam, outPicBuff, picInfo); |
| 222 | |
| 223 | const auto vpost = idm::get_unlocked<VpostInstance>(handle); |
| 224 | |
| 225 | if (!vpost) |
| 226 | { |
| 227 | return CELL_VPOST_ERROR_E_ARG_HDL_INVALID; |
| 228 | } |
| 229 | |
| 230 | u32 w = ctrlParam->inWidth; |
| 231 | u32 h = ctrlParam->inHeight; |
| 232 | u32 ow = ctrlParam->outWidth; |
| 233 | u32 oh = ctrlParam->outHeight; |
| 234 | |
| 235 | // ctrlParam->inWindow; // ignored |
| 236 | if (ctrlParam->inWindow.x) |
| 237 | cellVpost.notice("*** inWindow.x = %d", ctrlParam->inWindow.x); |
| 238 | if (ctrlParam->inWindow.y) |
| 239 | cellVpost.notice("*** inWindow.y = %d", ctrlParam->inWindow.y); |
| 240 | if (ctrlParam->inWindow.width != w) |
| 241 | cellVpost.notice("*** inWindow.width = %d", ctrlParam->inWindow.width); |
| 242 | if (ctrlParam->inWindow.height != h) |
| 243 | cellVpost.notice("*** inWindow.height = %d", ctrlParam->inWindow.height); |
| 244 | // ctrlParam->outWindow; // ignored |
| 245 | if (ctrlParam->outWindow.x) |
| 246 | cellVpost.notice("*** outWindow.x = %d", ctrlParam->outWindow.x); |
| 247 | if (ctrlParam->outWindow.y) |
| 248 | cellVpost.notice("*** outWindow.y = %d", ctrlParam->outWindow.y); |
| 249 | if (ctrlParam->outWindow.width != ow) |
| 250 | cellVpost.notice("*** outWindow.width = %d", ctrlParam->outWindow.width); |
| 251 | if (ctrlParam->outWindow.height != oh) |
| 252 | cellVpost.notice("*** outWindow.height = %d", ctrlParam->outWindow.height); |
| 253 | // ctrlParam->execType; // ignored |
| 254 | // ctrlParam->scalerType; // ignored |
| 255 | // ctrlParam->ipcType; // ignored |
| 256 | |
| 257 | picInfo->inWidth = w; // copy |
| 258 | picInfo->inHeight = h; // copy |
| 259 | picInfo->inDepth = CELL_VPOST_PIC_DEPTH_8; // fixed |
| 260 | picInfo->inScanType = CELL_VPOST_SCAN_TYPE_P; // TODO |
| 261 | picInfo->inPicFmt = CELL_VPOST_PIC_FMT_IN_YUV420_PLANAR; // fixed |
| 262 | picInfo->inChromaPosType = ctrlParam->inChromaPosType; // copy |
| 263 | picInfo->inPicStruct = CELL_VPOST_PIC_STRUCT_PFRM; // TODO |
| 264 | picInfo->inQuantRange = ctrlParam->inQuantRange; // copy |
| 265 | picInfo->inColorMatrix = ctrlParam->inColorMatrix; // copy |
| 266 | |
| 267 | picInfo->outWidth = ow; // copy |
| 268 | picInfo->outHeight = oh; // copy |
| 269 | picInfo->outDepth = CELL_VPOST_PIC_DEPTH_8; // fixed |
| 270 | picInfo->outScanType = CELL_VPOST_SCAN_TYPE_P; // TODO |
| 271 | picInfo->outPicFmt = CELL_VPOST_PIC_FMT_OUT_RGBA_ILV; // TODO |
| 272 | picInfo->outChromaPosType = ctrlParam->inChromaPosType; // ignored |
| 273 | picInfo->outPicStruct = picInfo->inPicStruct; // ignored |
| 274 | picInfo->outQuantRange = ctrlParam->inQuantRange; // ignored |
| 275 | picInfo->outColorMatrix = ctrlParam->inColorMatrix; // ignored |
| 276 | |