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

@@ -54,7 +54,11 @@ void vp9_encode_intra4x4block(MACROBLOCK *x, int ib) {
tx_type = get_tx_type_4x4(&x->e_mbd, 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);
#if CONFIG_INTHT4X4
vp9_short_iht4x4(b->dqcoeff, b->diff, 32, tx_type);
@@ -153,8 +157,12 @@ void vp9_encode_intra8x8(MACROBLOCK *x, int ib) {
tx_type = get_tx_type_8x8(xd, &xd->block[ib]);
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
x->quantize_b_8x8(x->block + idx, xd->block + idx);
#if CONFIG_INTHT
@@ -175,7 +183,11 @@ void vp9_encode_intra8x8(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);
#if CONFIG_INTHT4X4
vp9_short_iht4x4(b->dqcoeff, b->diff, 32, tx_type);