summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2013-07-11 21:52:27 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-07-11 21:52:27 -0700
commit84c3ac047636b1df37dfa731da75d0a34f3fa0e3 (patch)
treeaa424f72d359361478a082a322743290f27c3633
parentee09dd99495d46d366bebe4c6d24882dd32d8652 (diff)
parentb9381b6faf4186a19dee2e52bda71b6a4c2d9796 (diff)
downloadlibvpx-84c3ac047636b1df37dfa731da75d0a34f3fa0e3.tar
libvpx-84c3ac047636b1df37dfa731da75d0a34f3fa0e3.tar.gz
libvpx-84c3ac047636b1df37dfa731da75d0a34f3fa0e3.tar.bz2
libvpx-84c3ac047636b1df37dfa731da75d0a34f3fa0e3.zip
Merge "Remove unnecessary tx_type branch in encode_block"
-rw-r--r--vp9/encoder/vp9_encodemb.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index d243fea68..eb8f2aa6e 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -488,8 +488,6 @@ static void encode_block(int plane, int block, BLOCK_SIZE_TYPE bsize,
uint8_t *const dst = raster_block_offset_uint8(xd, bsize, plane,
raster_block,
pd->dst.buf, pd->dst.stride);
- TX_TYPE tx_type = DCT_DCT;
-
xform_quant(plane, block, bsize, ss_txfrm_size, arg);
if (x->optimize)
@@ -500,29 +498,17 @@ static void encode_block(int plane, int block, BLOCK_SIZE_TYPE bsize,
vp9_short_idct32x32_add(dqcoeff, dst, pd->dst.stride);
break;
case TX_16X16:
- tx_type = plane == 0 ? get_tx_type_16x16(xd) : DCT_DCT;
- if (tx_type == DCT_DCT)
- vp9_short_idct16x16_add(dqcoeff, dst, pd->dst.stride);
- else
- vp9_short_iht16x16_add(dqcoeff, dst, pd->dst.stride, tx_type);
+ vp9_short_idct16x16_add(dqcoeff, dst, pd->dst.stride);
break;
case TX_8X8:
- tx_type = plane == 0 ? get_tx_type_8x8(xd) : DCT_DCT;
- if (tx_type == DCT_DCT)
- vp9_short_idct8x8_add(dqcoeff, dst, pd->dst.stride);
- else
- vp9_short_iht8x8_add(dqcoeff, dst, pd->dst.stride, tx_type);
+ vp9_short_idct8x8_add(dqcoeff, dst, pd->dst.stride);
break;
case TX_4X4:
- tx_type = plane == 0 ? get_tx_type_4x4(xd, raster_block) : DCT_DCT;
- if (tx_type == DCT_DCT)
- // this is like vp9_short_idct4x4 but has a special case around eob<=1
- // which is significant (not just an optimization) for the lossless
- // case.
- inverse_transform_b_4x4_add(xd, pd->eobs[block], dqcoeff,
- dst, pd->dst.stride);
- else
- vp9_short_iht4x4_add(dqcoeff, dst, pd->dst.stride, tx_type);
+ // this is like vp9_short_idct4x4 but has a special case around eob<=1
+ // which is significant (not just an optimization) for the lossless
+ // case.
+ inverse_transform_b_4x4_add(xd, pd->eobs[block], dqcoeff,
+ dst, pd->dst.stride);
break;
}
}