mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
CellVdecDivxSpecificInfo2 (who knows if this is correct...)
This commit is contained in:
parent
548b748f50
commit
fb3752a8ef
1 changed files with 31 additions and 1 deletions
|
@ -719,10 +719,40 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0
|
||||||
{
|
{
|
||||||
cellVdec.warning("cellVdecQueryAttr: DivX (profile=%d)", profile);
|
cellVdec.warning("cellVdecQueryAttr: DivX (profile=%d)", profile);
|
||||||
|
|
||||||
//const vm::ptr<CellVdecDivxSpecificInfo2> sinfo = vm::cast(spec_addr);
|
const vm::ptr<CellVdecDivxSpecificInfo2> sinfo = vm::cast(spec_addr);
|
||||||
|
|
||||||
|
if (sinfo)
|
||||||
|
{
|
||||||
|
if (sinfo->thisSize != sizeof(CellVdecDivxSpecificInfo2))
|
||||||
|
{
|
||||||
|
return CELL_VDEC_ERROR_ARG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: sinfo
|
// TODO: sinfo
|
||||||
|
|
||||||
|
//const u32 maxDecH = sinfo ? +sinfo->maxDecodedFrameHeight : 0;
|
||||||
|
//const u32 maxDecW = sinfo ? +sinfo->maxDecodedFrameWidth : 0;
|
||||||
|
u32 nrOfBuf = sinfo ? +sinfo->numberOfDecodedFrameBuffer : 0;
|
||||||
|
|
||||||
|
if (nrOfBuf == 0)
|
||||||
|
{
|
||||||
|
nrOfBuf = 4;
|
||||||
|
}
|
||||||
|
else if (nrOfBuf == 2)
|
||||||
|
{
|
||||||
|
if (profile != CELL_VDEC_DIVX_QMOBILE && profile != CELL_VDEC_DIVX_MOBILE)
|
||||||
|
{
|
||||||
|
return CELL_VDEC_ERROR_ARG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (nrOfBuf != 4 && nrOfBuf != 3)
|
||||||
|
{
|
||||||
|
return CELL_VDEC_ERROR_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: change memSize based on buffercount.
|
||||||
|
|
||||||
switch (profile)
|
switch (profile)
|
||||||
{
|
{
|
||||||
case CELL_VDEC_DIVX_QMOBILE : memSize = new_sdk ? 0x11B720 : 0x1DEF30; break;
|
case CELL_VDEC_DIVX_QMOBILE : memSize = new_sdk ? 0x11B720 : 0x1DEF30; break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue