summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2013-02-13 09:03:21 -0800
committerJingning Han <jingning@google.com>2013-02-21 18:24:28 -0800
commitbabbd5d170d080ea69c602a7ab8b824a27aaa0a2 (patch)
tree000168e74427ec685110e00a1e4f2b8c8974354e /vp9/encoder/vp9_rdopt.c
parent5a18106fb7829ecb2a6f8413ff5c34fc6419ea6e (diff)
downloadlibvpx-babbd5d170d080ea69c602a7ab8b824a27aaa0a2.tar
libvpx-babbd5d170d080ea69c602a7ab8b824a27aaa0a2.tar.gz
libvpx-babbd5d170d080ea69c602a7ab8b824a27aaa0a2.tar.bz2
libvpx-babbd5d170d080ea69c602a7ab8b824a27aaa0a2.zip
Forward butterfly hybrid transform
This patch includes 4x4, 8x8, and 16x16 forward butterfly ADST/DCT hybrid transform. The kernel of 4x4 ADST is sin((2k+1)*(n+1)/(2N+1)). The kernel of 8x8/16x16 ADST is of the form sin((2k+1)*(2n+1)/4N). Change-Id: I8f1ab3843ce32eb287ab766f92e0611e1c5cb4c1
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 14b9a13db..824395e15 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1046,7 +1046,11 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, BLOCK *be,
b->bmi.as_mode.first = mode;
tx_type = get_tx_type_4x4(xd, b);
if (tx_type != DCT_DCT) {
+#if CONFIG_INTHT4X4
+ vp9_short_fht4x4(be->src_diff, be->coeff, 32, tx_type);
+#else
vp9_fht(be->src_diff, 32, be->coeff, tx_type, 4);
+#endif
vp9_ht_quantize_b_4x4(be, b, tx_type);
} else {
x->fwd_txm4x4(be->src_diff, be->coeff, 32);
@@ -1346,7 +1350,11 @@ static int64_t rd_pick_intra8x8block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
if (xd->mode_info_context->mbmi.txfm_size == TX_8X8) {
TX_TYPE tx_type = get_tx_type_8x8(xd, b);
if (tx_type != DCT_DCT)
+#if CONFIG_INTHT
+ vp9_short_fht8x8(be->src_diff, (x->block + idx)->coeff, 32, tx_type);
+#else
vp9_fht(be->src_diff, 32, (x->block + idx)->coeff, tx_type, 8);
+#endif
else
x->fwd_txm8x8(be->src_diff, (x->block + idx)->coeff, 32);
x->quantize_b_8x8(x->block + idx, xd->block + idx);
@@ -1379,7 +1387,11 @@ static int64_t rd_pick_intra8x8block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
be = &x->block[ib + iblock[i]];
tx_type = get_tx_type_4x4(xd, b);
if (tx_type != DCT_DCT) {
+#if CONFIG_INTHT4X4
+ vp9_short_fht4x4(be->src_diff, be->coeff, 32, tx_type);
+#else
vp9_fht_c(be->src_diff, 32, be->coeff, tx_type, 4);
+#endif
vp9_ht_quantize_b_4x4(be, b, tx_type);
} else if (!(i & 1) && get_tx_type_4x4(xd, b + 1) == DCT_DCT) {
x->fwd_txm8x4(be->src_diff, be->coeff, 32);