ref: 1b5421f3c5a8cf76db2fc8b939be706ad63530e7
parent: 64bb996e03f741d513c8b6c9b006fd970ddc7984
parent: 8b9eea0a3473eb24f0d2505df8820041792143cb
author: Yaowu Xu <[email protected]>
date: Fri Jun 28 05:56:11 EDT 2013
Merge "Minor cleanups"
--- a/vp9/encoder/vp9_encodeintra.c
+++ b/vp9/encoder/vp9_encodeintra.c
@@ -20,13 +20,8 @@
(void) cpi;
mbmi->mode = DC_PRED;
mbmi->ref_frame[0] = INTRA_FRAME;
- if (use_16x16_pred) {
- mbmi->txfm_size = mbmi->sb_type >= BLOCK_SIZE_MB16X16 ? TX_16X16 : TX_8X8;
- vp9_encode_intra_block_y(&cpi->common, x, mbmi->sb_type);
- } else {
- mbmi->txfm_size = TX_4X4;
- vp9_encode_intra_block_y(&cpi->common, x, mbmi->sb_type);
- }
-
+ mbmi->txfm_size = use_16x16_pred ? (mbmi->sb_type >= BLOCK_SIZE_MB16X16 ?
+ TX_16X16 : TX_8X8) : TX_4X4;
+ vp9_encode_intra_block_y(&cpi->common, x, mbmi->sb_type);
return vp9_get_mb_ss(x->plane[0].src_diff);
}
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -932,23 +932,13 @@
BLOCK_SIZE_TYPE bsize) {
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
+ TX_SIZE uv_txfm_size = get_uv_tx_size(mbmi);
if (mbmi->ref_frame[0] > INTRA_FRAME)
vp9_subtract_sbuv(x, bsize);
- if (mbmi->txfm_size >= TX_32X32 && bsize >= BLOCK_SIZE_SB64X64) {
- super_block_uvrd_for_txfm(cm, x, rate, distortion, skippable, bsize,
- TX_32X32);
- } else if (mbmi->txfm_size >= TX_16X16 && bsize >= BLOCK_SIZE_SB32X32) {
- super_block_uvrd_for_txfm(cm, x, rate, distortion, skippable, bsize,
- TX_16X16);
- } else if (mbmi->txfm_size >= TX_8X8 && bsize >= BLOCK_SIZE_MB16X16) {
- super_block_uvrd_for_txfm(cm, x, rate, distortion, skippable, bsize,
- TX_8X8);
- } else {
- super_block_uvrd_for_txfm(cm, x, rate, distortion, skippable, bsize,
- TX_4X4);
- }
+ super_block_uvrd_for_txfm(cm, x, rate, distortion, skippable, bsize,
+ uv_txfm_size);
}
static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,