Move daala_fdst32() / daala_idst32() into daala_tx.c. This commit has no impact on metrics. Change-Id: I916ae31f2ddd3c8079291b3f01727a6565dd160d
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c index 2eeadf9..b6a59a5 100644 --- a/av1/common/daala_tx.c +++ b/av1/common/daala_tx.c
@@ -4248,6 +4248,32 @@ for (i = 0; i < 32; i++) output[i] = (tran_low_t)x[i]; } +/* Preserve the "half-right" transform behavior. */ +void daala_fdst32(const tran_low_t *input, tran_low_t *output) { + int i; + tran_low_t inputhalf[16]; + for (i = 0; i < 16; ++i) { + output[16 + i] = input[i]; + } + for (i = 0; i < 16; ++i) { + inputhalf[i] = input[i + 16]; + } + daala_fdct16(inputhalf, output); +} + +/* Preserve the "half-right" transform behavior. */ +void daala_idst32(const tran_low_t *input, tran_low_t *output) { + int i; + tran_low_t inputhalf[16]; + for (i = 0; i < 16; ++i) { + inputhalf[i] = input[i]; + } + for (i = 0; i < 16; ++i) { + output[i] = input[16 + i]; + } + daala_idct16(inputhalf, output + 16); +} + void daala_idtx32(const tran_low_t *input, tran_low_t *output) { int i; for (i = 0; i < 32; i++) output[i] = input[i];
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h index e825375..6ca133f 100644 --- a/av1/common/daala_tx.h +++ b/av1/common/daala_tx.h
@@ -21,6 +21,8 @@ void daala_idtx16(const tran_low_t *input, tran_low_t *output); void daala_fdct32(const tran_low_t *input, tran_low_t *output); void daala_idct32(const tran_low_t *input, tran_low_t *output); +void daala_fdst32(const tran_low_t *input, tran_low_t *output); +void daala_idst32(const tran_low_t *input, tran_low_t *output); void daala_idtx32(const tran_low_t *input, tran_low_t *output); #if CONFIG_TX64X64 void daala_fdct64(const tran_low_t *input, tran_low_t *output);
diff --git a/av1/common/idct.c b/av1/common/idct.c index 1abed9c..a8f928c 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c
@@ -72,20 +72,6 @@ #endif // CONFIG_EXT_TX // For use in lieu of ADST -#if CONFIG_DAALA_DCT32 -static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) { - int i; - tran_low_t inputhalf[16]; - // No scaling within; Daala transforms are all orthonormal - for (i = 0; i < 16; ++i) { - inputhalf[i] = input[i]; - } - for (i = 0; i < 16; ++i) { - output[i] = input[16 + i]; - } - daala_idct16(inputhalf, output + 16); -} -#else static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) { int i; tran_low_t inputhalf[16]; @@ -99,7 +85,6 @@ aom_idct16_c(inputhalf, output + 16); // Note overall scaling factor is 4 times orthogonal } -#endif #if CONFIG_TX64X64 #if CONFIG_DAALA_DCT64 @@ -1365,21 +1350,21 @@ #if CONFIG_DAALA_DCT32 { daala_idct32, daala_idct32 }, // DCT_DCT #if CONFIG_EXT_TX - { ihalfright32_c, daala_idct32 }, // ADST_DCT - { daala_idct32, ihalfright32_c }, // DCT_ADST - { ihalfright32_c, ihalfright32_c }, // ADST_ADST - { ihalfright32_c, daala_idct32 }, // FLIPADST_DCT - { daala_idct32, ihalfright32_c }, // DCT_FLIPADST - { ihalfright32_c, ihalfright32_c }, // FLIPADST_FLIPADST - { ihalfright32_c, ihalfright32_c }, // ADST_FLIPADST - { ihalfright32_c, ihalfright32_c }, // FLIPADST_ADST - { daala_idtx32, daala_idtx32 }, // IDTX - { daala_idct32, daala_idtx32 }, // V_DCT - { daala_idtx32, daala_idct32 }, // H_DCT - { ihalfright32_c, daala_idtx32 }, // V_ADST - { daala_idtx32, ihalfright32_c }, // H_ADST - { ihalfright32_c, daala_idtx32 }, // V_FLIPADST - { daala_idtx32, ihalfright32_c }, // H_FLIPADST + { daala_idst32, daala_idct32 }, // ADST_DCT + { daala_idct32, daala_idst32 }, // DCT_ADST + { daala_idst32, daala_idst32 }, // ADST_ADST + { daala_idst32, daala_idct32 }, // FLIPADST_DCT + { daala_idct32, daala_idst32 }, // DCT_FLIPADST + { daala_idst32, daala_idst32 }, // FLIPADST_FLIPADST + { daala_idst32, daala_idst32 }, // ADST_FLIPADST + { daala_idst32, daala_idst32 }, // FLIPADST_ADST + { daala_idtx32, daala_idtx32 }, // IDTX + { daala_idct32, daala_idtx32 }, // V_DCT + { daala_idtx32, daala_idct32 }, // H_DCT + { daala_idst32, daala_idtx32 }, // V_ADST + { daala_idtx32, daala_idst32 }, // H_ADST + { daala_idst32, daala_idtx32 }, // V_FLIPADST + { daala_idtx32, daala_idst32 }, // H_FLIPADST #endif #else { aom_idct32_c, aom_idct32_c }, // DCT_DCT
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index dd31da6..8e5a947 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c
@@ -1010,20 +1010,6 @@ } // For use in lieu of ADST -#if CONFIG_DAALA_DCT32 -static void fhalfright32(const tran_low_t *input, tran_low_t *output) { - int i; - tran_low_t inputhalf[16]; - // No scaling within; Daala transforms are all orthonormal - for (i = 0; i < 16; ++i) { - output[16 + i] = input[i]; - } - for (i = 0; i < 16; ++i) { - inputhalf[i] = input[i + 16]; - } - daala_fdct16(inputhalf, output); -} -#else static void fhalfright32(const tran_low_t *input, tran_low_t *output) { int i; tran_low_t inputhalf[16]; @@ -1037,7 +1023,6 @@ fdct16(inputhalf, output); // Note overall scaling factor is 4 times orthogonal } -#endif #if CONFIG_MRC_TX static void get_masked_residual32(const int16_t **input, int *input_stride, @@ -2417,21 +2402,21 @@ #if CONFIG_DAALA_DCT32 { daala_fdct32, daala_fdct32 }, // DCT_DCT #if CONFIG_EXT_TX - { fhalfright32, daala_fdct32 }, // ADST_DCT - { daala_fdct32, fhalfright32 }, // DCT_ADST - { fhalfright32, fhalfright32 }, // ADST_ADST - { fhalfright32, daala_fdct32 }, // FLIPADST_DCT - { daala_fdct32, fhalfright32 }, // DCT_FLIPADST - { fhalfright32, fhalfright32 }, // FLIPADST_FLIPADST - { fhalfright32, fhalfright32 }, // ADST_FLIPADST - { fhalfright32, fhalfright32 }, // FLIPADST_ADST + { daala_fdst32, daala_fdct32 }, // ADST_DCT + { daala_fdct32, daala_fdst32 }, // DCT_ADST + { daala_fdst32, daala_fdst32 }, // ADST_ADST + { daala_fdst32, daala_fdct32 }, // FLIPADST_DCT + { daala_fdct32, daala_fdst32 }, // DCT_FLIPADST + { daala_fdst32, daala_fdst32 }, // FLIPADST_FLIPADST + { daala_fdst32, daala_fdst32 }, // ADST_FLIPADST + { daala_fdst32, daala_fdst32 }, // FLIPADST_ADST { daala_idtx32, daala_idtx32 }, // IDTX { daala_fdct32, daala_idtx32 }, // V_DCT { daala_idtx32, daala_fdct32 }, // H_DCT - { fhalfright32, daala_idtx32 }, // V_ADST - { daala_idtx32, fhalfright32 }, // H_ADST - { fhalfright32, daala_idtx32 }, // V_FLIPADST - { daala_idtx32, fhalfright32 }, // H_FLIPADST + { daala_fdst32, daala_idtx32 }, // V_ADST + { daala_idtx32, daala_fdst32 }, // H_ADST + { daala_fdst32, daala_idtx32 }, // V_FLIPADST + { daala_idtx32, daala_fdst32 }, // H_FLIPADST #endif #else { fdct32, fdct32 }, // DCT_DCT