From b7166143d0137518b98353062c8dc73b9e2904d7 Mon Sep 17 00:00:00 2001 From: hkuang Date: Fri, 12 Dec 2014 11:31:23 -0800 Subject: [PATCH] Let YUV plane share the same dqcoeff buffer. Remove unnecessary dqcoeff from macroblockd which reduce macroblockd size by 16384 bytes. Change-Id: Ia379a703b4fee81c8fd4698b52488a85a90c9bc2 --- vp9/common/vp9_blockd.h | 3 ++- vp9/common/vp9_onyxc_int.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index ebb1d1d0a..e7fb19fd1 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -227,7 +227,8 @@ typedef struct macroblockd { DECLARE_ALIGNED(16, uint16_t, mc_buf_high[80 * 2 * 80 * 2]); #endif - DECLARE_ALIGNED(16, tran_low_t, dqcoeff[MAX_MB_PLANE][64 * 64]); + /* dqcoeff are shared by all the planes. So planes must be decoded serially */ + DECLARE_ALIGNED(16, tran_low_t, dqcoeff[64 * 64]); int lossless; int corrupted; diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index bba24e03b..ad91c10dd 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -265,7 +265,7 @@ static INLINE void init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd) { int i; for (i = 0; i < MAX_MB_PLANE; ++i) { - xd->plane[i].dqcoeff = xd->dqcoeff[i]; + xd->plane[i].dqcoeff = xd->dqcoeff; xd->above_context[i] = cm->above_context + i * sizeof(*cm->above_context) * 2 * mi_cols_aligned_to_sb(cm->mi_cols); } -- 2.50.1