From: Yaowu Xu Date: Fri, 1 Nov 2013 14:24:07 +0000 (-0700) Subject: Two optimizations: X-Git-Tag: v1.3.0~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a272530bf0962d4cbf54fdb8abd1051f8fbb5917;p=libvpx Two optimizations: 1. Reduced the size memset based on eob for 32x32 transform. The reset of non-zero coefficient should probably go into where they are read in inverse transform functions. (TODO) 2. Removed a redundant level of indirection. vp9_iht4x4_add() checks transform type and call vp9_iht4x4_16_add() for tranforms other than DCT_DCT. In this case, the DCT_DCT case has been already handled here. Change-Id: Iacbc77da761f0b308df5acea0f20c9add9f33d20 --- diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index c7ca18cf2..41d140010 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -262,7 +262,7 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block, if (tx_type == DCT_DCT) xd->itxm_add(qcoeff, dst, stride, eob); else - vp9_iht4x4_add(tx_type, qcoeff, dst, stride, eob); + vp9_iht4x4_16_add(qcoeff, dst, stride, tx_type); break; case TX_8X8: tx_type = get_tx_type_8x8(pd->plane_type, xd); @@ -285,6 +285,8 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block, } else { if (tx_type == DCT_DCT && tx_size <= TX_16X16 && eob <= 10) vpx_memset(qcoeff, 0, 4 * (4 << tx_size) * sizeof(qcoeff[0])); + else if (tx_size == TX_32X32 && eob <= 34) + vpx_memset(qcoeff, 0, 256 * sizeof(qcoeff[0])); else vpx_memset(qcoeff, 0, (16 << (tx_size << 1)) * sizeof(qcoeff[0])); }