FP2-1667: Aligned ps_pic_pu to 4 bytes
Aligned ps_pic_pu to 4 bytes
stmia was resulting in SEGV_MAPERR when ps_pic_pu is not aligned to 4 bytes
Bugfix: 24686670, 21468583
Change-Id: I07672d4a790f73cf27964983350181e66edc4d57
(cherry picked from commit e8bfec1fa41eafa1fd8e05d0fdc53ea0f2379518)
diff --git a/decoder/ihevcd_utils.c b/decoder/ihevcd_utils.c
index 27dd5ac..6a58cb9 100644
--- a/decoder/ihevcd_utils.c
+++ b/decoder/ihevcd_utils.c
@@ -354,6 +354,8 @@
/* 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 @@
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;
pu1_buf += num_pu * sizeof(pu_t);