Minor refactor to match the 4x4 forward transform.
Change-Id: Ib5337dfa78b73059ad169ca98a07119aa991864b
diff --git a/av1/common/idct.c b/av1/common/idct.c
index 8f4e58a..49a91fb 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -249,6 +249,10 @@
void av1_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
const INV_TXFM_PARAM *param) {
int tx_type = param->tx_type;
+ if (tx_type == DCT_DCT) {
+ aom_idct4x4_16_add(input, dest, stride);
+ return;
+ }
static const transform_2d IHT_4[] = {
{ aom_idct4_c, aom_idct4_c }, // DCT_DCT = 0
{ aom_iadst4_c, aom_idct4_c }, // ADST_DCT = 1
@@ -1303,15 +1307,17 @@
// idct
void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
- int eob) {
+ const INV_TXFM_PARAM *param) {
+ const int eob = param->eob;
if (eob > 1)
- aom_idct4x4_16_add(input, dest, stride);
+ av1_iht4x4_16_add(input, dest, stride, param);
else
aom_idct4x4_1_add(input, dest, stride);
}
void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
- int eob) {
+ const INV_TXFM_PARAM *param) {
+ const int eob = param->eob;
if (eob > 1)
aom_iwht4x4_16_add(input, dest, stride);
else
@@ -1427,15 +1433,14 @@
static void inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride,
const INV_TXFM_PARAM *param) {
const TX_TYPE tx_type = param->tx_type;
- const int eob = param->eob;
if (param->lossless) {
assert(tx_type == DCT_DCT);
- av1_iwht4x4_add(input, dest, stride, eob);
+ av1_iwht4x4_add(input, dest, stride, param);
return;
}
switch (tx_type) {
- case DCT_DCT: av1_idct4x4_add(input, dest, stride, eob); break;
+ case DCT_DCT: av1_idct4x4_add(input, dest, stride, param); break;
case ADST_DCT:
case DCT_ADST:
case ADST_ADST: