aboutsummaryrefslogtreecommitdiff
path: root/decoder/ih264d_structs.h
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-11-22 12:23:34 +0530
committerHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-11-24 12:18:48 +0530
commite98bd1f5a0e268ac6a4a65e6996d2a38d571ab1d (patch)
tree7ec501a1f3e2ad539c8ec43aae21989ad4722f98 /decoder/ih264d_structs.h
parent4b6344b28159ddec7e9eb3de074d5e3affff178a (diff)
downloadlibavc-e98bd1f5a0e268ac6a4a65e6996d2a38d571ab1d.tar.gz
Decoder: Aligned pi1_left_pred_mode[8] in _DecStruct definition
This array is sometimes accessed as two WORD32 variables. On platforms that do not support unaligned load/stores, this needs to be aligned to 4 byte boundary. Bug: 33073518 Test: Tested with -fsanitize=alignment enabled on avcdec Change-Id: I470bc868dde7049be12bee06ee0ba0c4c4bd8566
Diffstat (limited to 'decoder/ih264d_structs.h')
-rw-r--r--decoder/ih264d_structs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/decoder/ih264d_structs.h b/decoder/ih264d_structs.h
index 4260393..d8b02da 100644
--- a/decoder/ih264d_structs.h
+++ b/decoder/ih264d_structs.h
@@ -1057,7 +1057,6 @@ typedef struct _DecStruct
prev_seq_params_t s_prev_seq_params;
UWORD8 u1_cur_mb_fld_dec_flag; /* current Mb fld or Frm */
- WORD8 pi1_left_pred_mode[8];
UWORD8 u1_topleft_mb_fld;
UWORD8 u1_topleft_mbtype;
UWORD8 u1_topleft_mb_fld_bot;
@@ -1067,6 +1066,9 @@ typedef struct _DecStruct
UWORD16 u2_top_left_mask;
UWORD16 u2_top_right_mask;
dec_err_status_t * ps_dec_err_status;
+ /* Ensure pi1_left_pred_mode is aligned to 4 byte boundary,
+ by declaring this after a pointer or an integer */
+ WORD8 pi1_left_pred_mode[8];
UWORD8 u1_mb_idx_mv;
UWORD16 u2_mv_2mb[2];