Commit 1b175593 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Adds 1D transforms for ADST/FlipADST to make 16

Makes a set of 16 transforms total, adding all 1D
combinations of ADST and FlipADST, and removng all DST
transforms.

lowres, midres both improve by about 0.1% and hdres by
-0.378% in BDRATE but with fewer transforms that are also
simpler.

Further experiments to continue later.

Change-Id: I7348a4c0e12078fdea5ae3a2d36a89a319ffcc6e
parent 4914ae46
......@@ -103,20 +103,6 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 7,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 8,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 9,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 10,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 11,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 12,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 13,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 14,
VPX_BITS_8, 256),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 15,
VPX_BITS_8, 256)));
#endif // !CONFIG_EXT_TX
#endif // HAVE_SSE2
......
......@@ -102,20 +102,6 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 7,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 8,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 9,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 10,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 11,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 12,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 13,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 14,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 15,
VPX_BITS_8, 16)));
#endif // !CONFIG_EXT_TX
#endif // HAVE_SSE2
......
......@@ -102,20 +102,6 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 7,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 8,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 9,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 10,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 11,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 12,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 13,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 14,
VPX_BITS_8, 64),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 15,
VPX_BITS_8, 64)));
#endif // !CONFIG_EXT_TX
#endif // HAVE_SSE2
......
......@@ -383,10 +383,10 @@ static INLINE int supertx_enabled(const MB_MODE_INFO *mbmi) {
#define USE_MSKTX_FOR_32X32 0
static const int num_ext_tx_set_inter[EXT_TX_SETS_INTER] = {
1, 19, 12, 2
1, 16, 12, 2
};
static const int num_ext_tx_set_intra[EXT_TX_SETS_INTRA] = {
1, 17, 10
1, 12, 10
};
#if EXT_TX_SIZES == 4
......@@ -437,17 +437,17 @@ static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][TX_SIZES] = {
// Transform types used in each intra set
static const int ext_tx_used_intra[EXT_TX_SETS_INTRA][TX_TYPES] = {
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, },
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},
};
// Transform types used in each inter set
static const int ext_tx_used_inter[EXT_TX_SETS_INTER][TX_TYPES] = {
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1},
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
};
static INLINE int get_ext_tx_types(TX_SIZE tx_size, BLOCK_SIZE bs,
......
This diff is collapsed.
......@@ -111,21 +111,17 @@ typedef enum {
FLIPADST_FLIPADST = 6,
ADST_FLIPADST = 7,
FLIPADST_ADST = 8,
DST_DCT = 9,
DCT_DST = 10,
DST_ADST = 11,
ADST_DST = 12,
DST_FLIPADST = 13,
FLIPADST_DST = 14,
DST_DST = 15,
IDTX = 16,
V_DCT = 17,
H_DCT = 18,
IDTX = 9,
V_DCT = 10,
H_DCT = 11,
V_ADST = 12,
H_ADST = 13,
V_FLIPADST = 14,
H_FLIPADST = 15,
#endif // CONFIG_EXT_TX
TX_TYPES,
} TX_TYPE;
#if CONFIG_EXT_TX
#define EXT_TX_SIZES 4 // number of sizes that use extended transforms
#define EXT_TX_SETS_INTER 4 // Sets of transform selections for INTER
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -5314,11 +5314,6 @@ static void rd_supertx_sb(VP10_COMP *cpi, ThreadData *td,
#if CONFIG_EXT_TX
if (!ext_tx_used_inter[ext_tx_set][tx_type])
continue;
if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX && *best_tx == DCT_DCT) {
tx_type = IDTX - 1;
continue;
}
#else
if (tx_size >= TX_32X32 && tx_type != DCT_DCT)
continue;
......
......@@ -54,17 +54,14 @@ void vp10_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
vp10_fht4x4(src_diff, coeff, diff_stride, tx_type);
break;
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
vp10_fht4x4_c(src_diff, coeff, diff_stride, tx_type);
break;
case IDTX:
......@@ -96,17 +93,14 @@ static void fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
vp10_fht8x8(src_diff, coeff, diff_stride, tx_type);
break;
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
vp10_fht8x8_c(src_diff, coeff, diff_stride, tx_type);
break;
case IDTX:
......@@ -138,17 +132,14 @@ static void fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
vp10_fht16x16(src_diff, coeff, diff_stride, tx_type);
break;
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
vp10_fht16x16_c(src_diff, coeff, diff_stride, tx_type);
break;
case IDTX:
......@@ -180,17 +171,14 @@ static void fwd_txfm_32x32(int rd_transform, const int16_t *src_diff,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
vp10_fht32x32_c(src_diff, coeff, diff_stride, tx_type);
break;
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
vp10_fht32x32_c(src_diff, coeff, diff_stride, tx_type);
break;
case IDTX:
......@@ -227,15 +215,12 @@ void vp10_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
case FLIPADST_ADST:
vp10_highbd_fht4x4(src_diff, coeff, diff_stride, tx_type);
break;
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
vp10_highbd_fht4x4_c(src_diff, coeff, diff_stride, tx_type);
break;
case IDTX:
......@@ -270,15 +255,12 @@ static void highbd_fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff,
case FLIPADST_ADST:
vp10_highbd_fht8x8(src_diff, coeff, diff_stride, tx_type);
break;
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
// Use C version since DST exists only in C
vp10_highbd_fht8x8_c(src_diff, coeff, diff_stride, tx_type);
break;
......@@ -314,15 +296,12 @@ static void highbd_fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff,
case FLIPADST_ADST:
vp10_highbd_fht16x16(src_diff, coeff, diff_stride, tx_type);
break;
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
// Use C version since DST exists only in C
vp10_highbd_fht16x16_c(src_diff, coeff, diff_stride, tx_type);
break;
......@@ -355,15 +334,12 @@ static void highbd_fwd_txfm_32x32(int rd_transform, const int16_t *src_diff,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
case DST_DST:
case DCT_DST:
case DST_DCT:
case DST_ADST:
case ADST_DST:
case DST_FLIPADST:
case FLIPADST_DST:
case H_DCT:
case V_DCT:
case H_DCT:
case V_ADST:
case H_ADST:
case V_FLIPADST:
case H_FLIPADST:
vp10_highbd_fht32x32_c(src_diff, coeff, diff_stride, tx_type);
break;
case IDTX:
......
......@@ -1349,11 +1349,6 @@ static void choose_largest_tx_size(VP10_COMP *cpi, MACROBLOCK *x,
if (cpi->sf.tx_type_search > 0) {
if (!do_tx_type_search(tx_type, prune))
continue;
} else if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX &&
best_tx_type == DCT_DCT) {
tx_type = IDTX - 1;
continue;
}
} else {
if (!ALLOW_INTRA_EXT_TX && bs >= BLOCK_8X8) {
......@@ -1362,12 +1357,6 @@ static void choose_largest_tx_size(VP10_COMP *cpi, MACROBLOCK *x,
}
if (!ext_tx_used_intra[ext_tx_set][tx_type])
continue;
if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX &&
best_tx_type == DCT_DCT) {
tx_type = IDTX - 1;
continue;
}
}
mbmi->tx_type = tx_type;
......@@ -1533,11 +1522,6 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x,
if (cpi->sf.tx_type_search > 0) {
if (!do_tx_type_search(tx_type, prune))
continue;
} else if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX &&
best_tx_type == DCT_DCT) {
tx_type = IDTX - 1;
continue;
}
} else {
if (!ALLOW_INTRA_EXT_TX && bs >= BLOCK_8X8) {
......@@ -1546,12 +1530,6 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x,
}
if (!ext_tx_used_intra[ext_tx_set][tx_type])
continue;
if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX &&
best_tx_type == DCT_DCT) {
tx_type = IDTX - 1;
break;
}
}
mbmi->tx_type = tx_type;
txfm_rd_in_plane(x,
......@@ -3169,11 +3147,6 @@ static void select_tx_type_yrd(const VP10_COMP *cpi, MACROBLOCK *x,
if (cpi->sf.tx_type_search > 0) {
if (!do_tx_type_search(tx_type, prune))
continue;
} else if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX &&
best_tx_type == DCT_DCT) {
tx_type = IDTX - 1;
continue;
}
} else {
if (!ALLOW_INTRA_EXT_TX && bsize >= BLOCK_8X8) {
......@@ -3182,12 +3155,6 @@ static void select_tx_type_yrd(const VP10_COMP *cpi, MACROBLOCK *x,
}
if (!ext_tx_used_intra[ext_tx_set][tx_type])
continue;
if (ext_tx_set == 1 &&
tx_type >= DST_ADST && tx_type < IDTX &&
best_tx_type == DCT_DCT) {
tx_type = IDTX - 1;
break;
}
}
mbmi->tx_type = tx_type;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment