Fixed an overread in YUV420 Semi-planar input usecase
Handled non-multiple of 16 dimensions for 420 semiplanar input Modified test code to remove alignment of width and height Change-Id: I83ff8165364a863d577fcac81e711b07eec9c004
This commit is contained in:
parent
bf9cd17d31
commit
5cdb888fea
4 changed files with 58 additions and 3 deletions
|
|
@ -1591,7 +1591,7 @@ void synchronous_encode(iv_obj_t *ps_enc, app_ctxt_t *ps_app_ctxt)
|
|||
ps_inp_raw_buf->apv_bufs[0] = pu1_buf;
|
||||
|
||||
/*Init chroma buffer*/
|
||||
pu1_buf += (ps_app_ctxt->u4_strd) * ALIGN16(ps_app_ctxt->u4_ht);
|
||||
pu1_buf += ps_app_ctxt->u4_strd * ps_app_ctxt->u4_ht;
|
||||
ps_inp_raw_buf->apv_bufs[1] = pu1_buf;
|
||||
|
||||
ps_inp_raw_buf->au4_wd[0] = ps_app_ctxt->u4_wd;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void allocate_recon(app_ctxt_t *ps_app_ctxt)
|
|||
num_bufs = DEFAULT_NUM_RECON_BUFS;
|
||||
|
||||
/* Size of buffer for YUV420/420SP */
|
||||
luma_size = ALIGN16(ps_app_ctxt->u4_max_wd) * ALIGN16(ps_app_ctxt->u4_max_ht);
|
||||
luma_size = ps_app_ctxt->u4_max_wd * ps_app_ctxt->u4_max_ht;
|
||||
chroma_size = (luma_size) / 4;
|
||||
pic_size = luma_size + chroma_size * 2;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue