Aligned ps_pic_pu to 4 bytes

am: e8bfec1fa4

* commit 'e8bfec1fa4':
  Aligned ps_pic_pu to 4 bytes
This commit is contained in:
Harish Mahendrakar 2015-10-21 21:39:20 +00:00 committed by android-build-merger
commit 7899c8cffa
2 changed files with 4 additions and 1 deletions

View file

@ -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)))

View file

@ -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;