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
This commit is contained in:
Jingning Han
2013-02-13 09:03:21 -08:00
parent 5a18106fb7
commit babbd5d170
6 changed files with 495 additions and 0 deletions

View File

@@ -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);