MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / cellRecQueryMemSize

Function cellRecQueryMemSize

ps3fw/cellRec.cpp:1513–1677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1511}
1512
1513u32 cellRecQueryMemSize(vm::cptr<CellRecParam> pParam)
1514{
1515 cellRec.notice("cellRecQueryMemSize(pParam=*0x%x)", pParam);
1516
1517 if (!pParam)
1518 {
1519 return 0x900000;
1520 }
1521
1522 u32 video_size = 0x600000; // 6 MB
1523 u32 audio_size = 0x100000; // 1 MB
1524 u32 external_input_size = 0;
1525 u32 reduce_memsize = 0;
1526
1527 s32 video_type = pParam->videoFmt & 0xf000;
1528 s32 video_quality = pParam->videoFmt & 0xf00;
1529
1530 switch (video_type)
1531 {
1532 case VIDEO_TYPE_MPEG4:
1533 {
1534 switch (video_quality)
1535 {
1536 case VIDEO_QUALITY_0:
1537 case VIDEO_QUALITY_3:
1538 video_size = 0x600000; // 6 MB
1539 break;
1540 case VIDEO_QUALITY_1:
1541 video_size = 0x700000; // 7 MB
1542 break;
1543 case VIDEO_QUALITY_2:
1544 video_size = 0x800000; // 8 MB
1545 break;
1546 default:
1547 video_size = 0x900000; // 9 MB
1548 break;
1549 }
1550
1551 audio_size = 0x100000; // 1 MB
1552 break;
1553 }
1554 case VIDEO_TYPE_AVC_BL:
1555 case VIDEO_TYPE_AVC_MP:
1556 {
1557 switch (video_quality)
1558 {
1559 case VIDEO_QUALITY_0:
1560 case VIDEO_QUALITY_3:
1561 video_size = 0x800000; // 8 MB
1562 break;
1563 default:
1564 video_size = 0x900000; // 9 MB
1565 break;
1566 }
1567
1568 audio_size = 0x100000; // 1 MB
1569 break;
1570 }

Callers 1

cellRecOpenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected