mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Implement rounded_div
Round-to-nearest integral based division, optimized for unsigned integral. Used in sceNpTrophyGetGameProgress. Do not allow signed values for aligned_div(), align().
This commit is contained in:
parent
e30173a835
commit
db4041e079
6 changed files with 31 additions and 16 deletions
|
|
@ -769,7 +769,9 @@ error_code cellVdecGetPicItem(u32 handle, vm::pptr<CellVdecPicItem> picItem)
|
|||
|
||||
info->codecType = vdec->type;
|
||||
info->startAddr = 0x00000123; // invalid value (no address for picture)
|
||||
info->size = align(av_image_get_buffer_size(vdec->ctx->pix_fmt, vdec->ctx->width, vdec->ctx->height, 1), 128);
|
||||
const int buffer_size = av_image_get_buffer_size(vdec->ctx->pix_fmt, vdec->ctx->width, vdec->ctx->height, 1);
|
||||
verify(HERE), (buffer_size >= 0);
|
||||
info->size = align<u32>(buffer_size, 128);
|
||||
info->auNum = 1;
|
||||
info->auPts[0].lower = static_cast<u32>(pts);
|
||||
info->auPts[0].upper = static_cast<u32>(pts >> 32);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue