summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2015-06-09 17:48:53 +0530
committerRonghua Wu <ronghuawu@google.com>2015-06-12 18:34:16 -0700
commitcf91c87b25ad49fc7e307932754d188e3ba2a479 (patch)
tree881c74b4e114b82b5a226678e26a6caf34660ae1 /test
parentc75cf37283c11079d6015385453200f4710656da (diff)
downloadandroid_external_libavc-cf91c87b25ad49fc7e307932754d188e3ba2a479.tar.gz
android_external_libavc-cf91c87b25ad49fc7e307932754d188e3ba2a479.tar.bz2
android_external_libavc-cf91c87b25ad49fc7e307932754d188e3ba2a479.zip
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 Bug: 21586373 Change-Id: I83ff8165364a863d577fcac81e711b07eec9c004
Diffstat (limited to 'test')
-rw-r--r--test/encoder/main.c2
-rw-r--r--test/encoder/recon.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/encoder/main.c b/test/encoder/main.c
index bb9cabf..26420e2 100644
--- a/test/encoder/main.c
+++ b/test/encoder/main.c
@@ -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;
diff --git a/test/encoder/recon.c b/test/encoder/recon.c
index 7fd0f5c..ed63aac 100644
--- a/test/encoder/recon.c
+++ b/test/encoder/recon.c
@@ -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;