diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2015-10-09 19:19:06 +0530 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2015-10-20 15:16:37 -0700 |
commit | ac0318fa8afe20b00342d41d10e0054f9a8f541a (patch) | |
tree | aa909d340da83222a14428a89622bcfbc1645628 /decoder | |
parent | e3d6224dca4eb80297009b1a753aa65cb0117bd8 (diff) | |
download | android_external_libhevc-ac0318fa8afe20b00342d41d10e0054f9a8f541a.tar.gz android_external_libhevc-ac0318fa8afe20b00342d41d10e0054f9a8f541a.tar.bz2 android_external_libhevc-ac0318fa8afe20b00342d41d10e0054f9a8f541a.zip |
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
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/ihevcd_utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/ihevcd_utils.c b/decoder/ihevcd_utils.c index 1cdf3be..4587694 100644 --- a/decoder/ihevcd_utils.c +++ b/decoder/ihevcd_utils.c @@ -271,6 +271,9 @@ 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; } @@ -635,7 +638,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; |