cellVdec: implement cellVdecOpenExt

This commit is contained in:
Megamouse 2025-02-06 17:17:14 +01:00
parent 85715e893b
commit a1a0333e56
2 changed files with 28 additions and 3 deletions

View file

@ -1619,10 +1619,25 @@ error_code cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frameRateCode)
return CELL_OK; return CELL_OK;
} }
error_code cellVdecOpenExt() error_code cellVdecOpenExt(ppu_thread& ppu, vm::cptr<CellVdecType> type, vm::cptr<CellVdecResourceExt> res, vm::cptr<CellVdecCb> cb, vm::ptr<u32> handle)
{ {
UNIMPLEMENTED_FUNC(cellVdec); cellVdec.warning("cellVdecOpenExt(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle);
return CELL_OK;
if (!res)
{
return CELL_VDEC_ERROR_ARG;
}
vm::var<CellVdecResource> tmp = vm::make_var<CellVdecResource>({});
tmp->memAddr = res->memAddr;
tmp->memSize = res->memSize;
tmp->ppuThreadPriority = res->ppuThreadPriority;
tmp->ppuThreadStackSize = res->ppuThreadStackSize;
tmp->spuThreadPriority = 0;
tmp->numOfSpus = res->numOfSpus;
const vm::ptr<CellVdecResource> ptr = vm::cast(tmp.addr());
return vdecOpen(ppu, type, ptr, cb, handle);
} }
error_code cellVdecStartSeqExt() error_code cellVdecStartSeqExt()

View file

@ -133,6 +133,16 @@ struct CellVdecResourceEx
be_t<u32> spursResource_addr; be_t<u32> spursResource_addr;
}; };
struct CellVdecResourceExt // speculative
{
be_t<u32> memAddr;
be_t<u32> memSize;
be_t<s32> ppuThreadPriority;
be_t<u32> ppuThreadStackSize;
u8 unk[12];
be_t<u32> numOfSpus;
};
// Access Unit Information // Access Unit Information
struct CellVdecAuInfo struct CellVdecAuInfo
{ {