mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 23:32:35 +07:00
Aligned ps_pic_pu to 4 bytes
am:e8bfec1fa4* commit 'e8bfec1fa4': Aligned ps_pic_pu to 4 bytes
This commit is contained in:
commit
7899c8cffa
2 changed files with 4 additions and 1 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#define ALIGN32(x) ((((x) + 31) >> 5) << 5)
|
||||
#define ALIGN16(x) ((((x) + 15) >> 4) << 4)
|
||||
#define ALIGN8(x) ((((x) + 7) >> 3) << 3)
|
||||
#define ALIGN4(x) ((((x) + 3) >> 2) << 2)
|
||||
|
||||
#define ALIGN_POW2(ptr,align) ((((WORD32)ptr)+align-1)&(~(align-1)))
|
||||
|
||||
|
|
|
|||
|
|
@ -354,6 +354,8 @@ WORD32 ihevcd_get_pic_mv_bank_size(WORD32 num_luma_samples)
|
|||
/* Size for storing pu_t for each PU */
|
||||
mv_bank_size += num_pu * sizeof(pu_t);
|
||||
|
||||
/* Size for storing slice_idx for each CTB */
|
||||
mv_bank_size += ALIGN4(num_ctb * sizeof(UWORD16));
|
||||
|
||||
size = mv_bank_size;
|
||||
return size;
|
||||
|
|
@ -720,7 +722,7 @@ IHEVCD_ERROR_T ihevcd_mv_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
pu1_buf += num_pu;
|
||||
|
||||
ps_mv_buf->pu1_pic_slice_map = (UWORD16 *)pu1_buf;
|
||||
pu1_buf += num_ctb * sizeof(UWORD16);
|
||||
pu1_buf += ALIGN4(num_ctb * sizeof(UWORD16));
|
||||
|
||||
ps_mv_buf->ps_pic_pu = (pu_t *)pu1_buf;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue