diff options
author | Ronald S. Bultje <rbultje@google.com> | 2013-04-24 09:18:16 -0700 |
---|---|---|
committer | Ronald S. Bultje <rbultje@google.com> | 2013-04-25 14:20:59 -0700 |
commit | c849eaca5918cbe523968cde479fbb5a125b866d (patch) | |
tree | df747effc3c87e52a210f7b5f2bb13696c7e3bcc /vp9/common | |
parent | e40a769036a97403718244caa81b8680a4c9c7eb (diff) | |
download | libvpx-c849eaca5918cbe523968cde479fbb5a125b866d.tar libvpx-c849eaca5918cbe523968cde479fbb5a125b866d.tar.gz libvpx-c849eaca5918cbe523968cde479fbb5a125b866d.tar.bz2 libvpx-c849eaca5918cbe523968cde479fbb5a125b866d.zip |
Use b_width/height_log2 instead of mb_ where appropriate.
Basic assumption: when talking about transform units, use b_; when
talking about macroblock indices, use mb_.
Change-Id: Ifd163f595d4924ff892de4eb0401ccd56dc81884
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_blockd.h | 18 | ||||
-rw-r--r-- | vp9/common/vp9_invtrans.c | 22 |
2 files changed, 20 insertions, 20 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index b6354855a..878da4cc4 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -574,12 +574,12 @@ static TX_TYPE get_tx_type_4x4(const MACROBLOCKD *xd, int ib) { // is smaller than the prediction size TX_TYPE tx_type = DCT_DCT; const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type; - const int wb = mb_width_log2(sb_type), hb = mb_height_log2(sb_type); + const int wb = b_width_log2(sb_type), hb = b_height_log2(sb_type); #if !USE_ADST_FOR_SB if (sb_type > BLOCK_SIZE_MB16X16) return tx_type; #endif - if (ib >= (16 << (wb + hb))) // no chroma adst + if (ib >= (1 << (wb + hb))) // no chroma adst return tx_type; if (xd->lossless) return DCT_DCT; @@ -630,7 +630,7 @@ static TX_TYPE get_tx_type_4x4(const MACROBLOCKD *xd, int ib) { xd->q_index < ACTIVE_HT) { #if USE_ADST_FOR_I16X16_4X4 #if USE_ADST_PERIPHERY_ONLY - const int hmax = 4 << wb; + const int hmax = 1 << wb; tx_type = txfm_map(pred_mode_conv(xd->mode_info_context->mbmi.mode)); #if USE_ADST_FOR_REMOTE_EDGE if ((ib & (hmax - 1)) != 0 && ib >= hmax) @@ -663,12 +663,12 @@ static TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd, int ib) { // is smaller than the prediction size TX_TYPE tx_type = DCT_DCT; const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type; - const int wb = mb_width_log2(sb_type), hb = mb_height_log2(sb_type); + const int wb = b_width_log2(sb_type), hb = b_height_log2(sb_type); #if !USE_ADST_FOR_SB if (sb_type > BLOCK_SIZE_MB16X16) return tx_type; #endif - if (ib >= (16 << (wb + hb))) // no chroma adst + if (ib >= (1 << (wb + hb))) // no chroma adst return tx_type; if (xd->mode_info_context->mbmi.mode == I8X8_PRED && xd->q_index < ACTIVE_HT8) { @@ -681,7 +681,7 @@ static TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd, int ib) { xd->q_index < ACTIVE_HT8) { #if USE_ADST_FOR_I16X16_8X8 #if USE_ADST_PERIPHERY_ONLY - const int hmax = 4 << wb; + const int hmax = 1 << wb; tx_type = txfm_map(pred_mode_conv(xd->mode_info_context->mbmi.mode)); #if USE_ADST_FOR_REMOTE_EDGE if ((ib & (hmax - 1)) != 0 && ib >= hmax) @@ -712,19 +712,19 @@ static TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd, int ib) { static TX_TYPE get_tx_type_16x16(const MACROBLOCKD *xd, int ib) { TX_TYPE tx_type = DCT_DCT; const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type; - const int wb = mb_width_log2(sb_type), hb = mb_height_log2(sb_type); + const int wb = b_width_log2(sb_type), hb = b_height_log2(sb_type); #if !USE_ADST_FOR_SB if (sb_type > BLOCK_SIZE_MB16X16) return tx_type; #endif - if (ib >= (16 << (wb + hb))) + if (ib >= (1 << (wb + hb))) return tx_type; if (xd->mode_info_context->mbmi.mode < I8X8_PRED && xd->q_index < ACTIVE_HT16) { tx_type = txfm_map(pred_mode_conv(xd->mode_info_context->mbmi.mode)); #if USE_ADST_PERIPHERY_ONLY if (sb_type > BLOCK_SIZE_MB16X16) { - const int hmax = 4 << wb; + const int hmax = 1 << wb; #if USE_ADST_FOR_REMOTE_EDGE if ((ib & (hmax - 1)) != 0 && ib >= hmax) tx_type = DCT_DCT; diff --git a/vp9/common/vp9_invtrans.c b/vp9/common/vp9_invtrans.c index 0673fd81a..458f13532 100644 --- a/vp9/common/vp9_invtrans.c +++ b/vp9/common/vp9_invtrans.c @@ -31,8 +31,8 @@ void vp9_inverse_transform_b_16x16(int16_t *input_dqcoeff, } void vp9_inverse_transform_sby_32x32(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize) - 1, bw = 1 << bwl; - const int bh = 1 << (mb_height_log2(bsize) - 1); + const int bwl = b_width_log2(bsize) - 3, bw = 1 << bwl; + const int bh = 1 << (b_height_log2(bsize) - 3); const int stride = 32 << bwl; int n; @@ -46,8 +46,8 @@ void vp9_inverse_transform_sby_32x32(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { } void vp9_inverse_transform_sby_16x16(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize), bw = 1 << bwl; - const int bh = 1 << mb_height_log2(bsize); + const int bwl = b_width_log2(bsize) - 2, bw = 1 << bwl; + const int bh = 1 << (b_height_log2(bsize) - 2); const int stride = 16 << bwl, bstride = 4 << bwl; int n; @@ -68,8 +68,8 @@ void vp9_inverse_transform_sby_16x16(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { } void vp9_inverse_transform_sby_8x8(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize) + 1, bw = 1 << bwl; - const int bh = 1 << (mb_height_log2(bsize) + 1); + const int bwl = b_width_log2(bsize) - 1, bw = 1 << bwl; + const int bh = 1 << (b_height_log2(bsize) - 1); const int stride = 8 << bwl, bstride = 2 << bwl; int n; @@ -89,8 +89,8 @@ void vp9_inverse_transform_sby_8x8(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { } void vp9_inverse_transform_sby_4x4(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize) + 2, bw = 1 << bwl; - const int bh = 1 << (mb_height_log2(bsize) + 2); + const int bwl = b_width_log2(bsize), bw = 1 << bwl; + const int bh = 1 << b_height_log2(bsize); const int stride = 4 << bwl, bstride = 1 << bwl; int n; @@ -118,7 +118,7 @@ void vp9_inverse_transform_sbuv_32x32(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { } void vp9_inverse_transform_sbuv_16x16(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize), bhl = mb_height_log2(bsize); + const int bwl = b_width_log2(bsize) - 2, bhl = b_height_log2(bsize) - 2; const int bw = 1 << (bwl - 1), bh = 1 << (bhl - 1); const int stride = 16 << (bwl - 1); int n; @@ -135,7 +135,7 @@ void vp9_inverse_transform_sbuv_16x16(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { } void vp9_inverse_transform_sbuv_8x8(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize) + 1, bhl = mb_height_log2(bsize) + 1; + const int bwl = b_width_log2(bsize) - 1, bhl = b_height_log2(bsize) - 1; const int bw = 1 << (bwl - 1), bh = 1 << (bhl - 1); const int stride = 8 << (bwl - 1); int n; @@ -152,7 +152,7 @@ void vp9_inverse_transform_sbuv_8x8(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { } void vp9_inverse_transform_sbuv_4x4(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) { - const int bwl = mb_width_log2(bsize) + 2, bhl = mb_height_log2(bsize) + 2; + const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize); const int bw = 1 << (bwl - 1), bh = 1 << (bhl - 1); const int stride = 4 << (bwl - 1); int n; |