summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_blockd.h
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-02-27 15:46:48 -0800
committerDmitry Kovalev <dkovalev@google.com>2014-03-03 12:20:51 -0800
commit46af01d719b2cc3c33fae476239ed03bda05538e (patch)
tree2b7bc1ab622bf62d5d3ff0a7980829b9b2f679f3 /vp9/common/vp9_blockd.h
parent6440e2955d401699389a5715eb067f59e85b6aac (diff)
downloadlibvpx-46af01d719b2cc3c33fae476239ed03bda05538e.tar
libvpx-46af01d719b2cc3c33fae476239ed03bda05538e.tar.gz
libvpx-46af01d719b2cc3c33fae476239ed03bda05538e.tar.bz2
libvpx-46af01d719b2cc3c33fae476239ed03bda05538e.zip
Adding get_tx_type() instead of get_tx_type_{8x8, 16x16}.
Change-Id: I4a54b12e5229705222c5a101258b9d1f81e2948d
Diffstat (limited to 'vp9/common/vp9_blockd.h')
-rw-r--r--vp9/common/vp9_blockd.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h
index 2a0ebfba0..84403ae15 100644
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -255,7 +255,16 @@ static INLINE BLOCK_SIZE get_subsize(BLOCK_SIZE bsize,
return subsize;
}
-extern const TX_TYPE mode2txfm_map[MB_MODE_COUNT];
+extern const TX_TYPE mode2txfm_map[INTRA_MODES];
+
+static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type,
+ const MACROBLOCKD *xd) {
+ const MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi;
+
+ if (plane_type != PLANE_TYPE_Y || is_inter_block(mbmi))
+ return DCT_DCT;
+ return mode2txfm_map[mbmi->mode];
+}
static INLINE TX_TYPE get_tx_type_4x4(PLANE_TYPE plane_type,
const MACROBLOCKD *xd, int ib) {
@@ -267,18 +276,6 @@ static INLINE TX_TYPE get_tx_type_4x4(PLANE_TYPE plane_type,
return mode2txfm_map[get_y_mode(mi, ib)];
}
-static INLINE TX_TYPE get_tx_type_8x8(PLANE_TYPE plane_type,
- const MACROBLOCKD *xd) {
- return plane_type == PLANE_TYPE_Y ? mode2txfm_map[xd->mi_8x8[0]->mbmi.mode]
- : DCT_DCT;
-}
-
-static INLINE TX_TYPE get_tx_type_16x16(PLANE_TYPE plane_type,
- const MACROBLOCKD *xd) {
- return plane_type == PLANE_TYPE_Y ? mode2txfm_map[xd->mi_8x8[0]->mbmi.mode]
- : DCT_DCT;
-}
-
void vp9_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y);
static INLINE TX_SIZE get_uv_tx_size_impl(TX_SIZE y_tx_size, BLOCK_SIZE bsize) {