diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2013-07-24 12:55:45 -0700 |
---|---|---|
committer | Dmitry Kovalev <dkovalev@google.com> | 2013-07-24 12:55:45 -0700 |
commit | 9139ee0908764ab0455f3a991cfaf57ae3eb5e80 (patch) | |
tree | 0ac0712c9e5bd87faa2cac568ce6e02dba179e99 /vp9/common/vp9_blockd.h | |
parent | a183f17d339a22ff3a5c76ac829c84115eadeb3f (diff) | |
download | libvpx-9139ee0908764ab0455f3a991cfaf57ae3eb5e80.tar libvpx-9139ee0908764ab0455f3a991cfaf57ae3eb5e80.tar.gz libvpx-9139ee0908764ab0455f3a991cfaf57ae3eb5e80.tar.bz2 libvpx-9139ee0908764ab0455f3a991cfaf57ae3eb5e80.zip |
Adding condition inside get_tx_type_{4x4, 8x8, 16x16}.
Adding plane type check condition because it was always used outside of
get_tx_type_{4x4, 8x8, 16x16}.
Change-Id: I02f0bbfee8063474865bd903eb25b54d26e07230
Diffstat (limited to 'vp9/common/vp9_blockd.h')
-rw-r--r-- | vp9/common/vp9_blockd.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index dc20f2ad2..129711412 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -359,23 +359,30 @@ static BLOCK_SIZE_TYPE get_subsize(BLOCK_SIZE_TYPE bsize, extern const TX_TYPE mode2txfm_map[MB_MODE_COUNT]; -static INLINE TX_TYPE get_tx_type_4x4(const MACROBLOCKD *xd, int ib) { - MODE_INFO *const mi = xd->mode_info_context; - MB_MODE_INFO *const mbmi = &mi->mbmi; - - if (xd->lossless || mbmi->ref_frame[0] != INTRA_FRAME) +static INLINE TX_TYPE get_tx_type_4x4(PLANE_TYPE plane_type, + const MACROBLOCKD *xd, int ib) { + const MODE_INFO *const mi = xd->mode_info_context; + const MB_MODE_INFO *const mbmi = &mi->mbmi; + + if (plane_type != PLANE_TYPE_Y_WITH_DC || + xd->lossless || + mbmi->ref_frame[0] != INTRA_FRAME) return DCT_DCT; return mode2txfm_map[mbmi->sb_type < BLOCK_SIZE_SB8X8 ? mi->bmi[ib].as_mode : mbmi->mode]; } -static INLINE TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd) { - return mode2txfm_map[xd->mode_info_context->mbmi.mode]; +static INLINE TX_TYPE get_tx_type_8x8(PLANE_TYPE plane_type, + const MACROBLOCKD *xd) { + return plane_type == PLANE_TYPE_Y_WITH_DC ? + mode2txfm_map[xd->mode_info_context->mbmi.mode] : DCT_DCT; } -static INLINE TX_TYPE get_tx_type_16x16(const MACROBLOCKD *xd) { - return mode2txfm_map[xd->mode_info_context->mbmi.mode]; +static INLINE TX_TYPE get_tx_type_16x16(PLANE_TYPE plane_type, + const MACROBLOCKD *xd) { + return plane_type == PLANE_TYPE_Y_WITH_DC ? + mode2txfm_map[xd->mode_info_context->mbmi.mode] : DCT_DCT; } static void setup_block_dptrs(MACROBLOCKD *xd, int ss_x, int ss_y) { |