From 750f644505792da7095395c871a8b8de8ee4f7bd Mon Sep 17 00:00:00 2001 From: Sebastien Alaiwan Date: Mon, 29 Jan 2018 09:46:38 +0100 Subject: [PATCH] Move encoder-only function to encodemb.c Change-Id: Id7ea17a5124215907d076e0e3500b9aeea1146fc --- av1/common/idct.c | 24 ++---------------------- av1/common/idct.h | 7 ------- av1/encoder/encodemb.c | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/av1/common/idct.c b/av1/common/idct.c index 3799a7773..07fef410e 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c @@ -1296,28 +1296,8 @@ void av1_iht64x16_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, #endif // CONFIG_TX64X64 // idct -void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - const TxfmParam *txfm_param) { - assert(av1_ext_tx_used[txfm_param->tx_set_type][txfm_param->tx_type]); - const int eob = txfm_param->eob; - if (eob > 1) - av1_iht4x4_16_add(input, dest, stride, txfm_param); - else - aom_idct4x4_1_add(input, dest, stride); -} - -void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - const TxfmParam *txfm_param) { - assert(av1_ext_tx_used[txfm_param->tx_set_type][txfm_param->tx_type]); - const int eob = txfm_param->eob; - if (eob > 1) - aom_iwht4x4_16_add(input, dest, stride); - else - aom_iwht4x4_1_add(input, dest, stride); -} - -void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob, int bd) { +static void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, + int stride, int eob, int bd) { if (eob > 1) aom_highbd_iwht4x4_16_add(input, dest, stride, bd); else diff --git a/av1/common/idct.h b/av1/common/idct.h index 79c948a7b..ab6a28147 100644 --- a/av1/common/idct.h +++ b/av1/common/idct.h @@ -32,18 +32,11 @@ typedef struct { #define MAX_TX_SCALE 1 int av1_get_tx_scale(const TX_SIZE tx_size); -void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - const TxfmParam *txfm_param); -void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - const TxfmParam *txfm_param); - void av1_inverse_transform_block(const MACROBLOCKD *xd, const tran_low_t *dqcoeff, int plane, TX_TYPE tx_type, TX_SIZE tx_size, uint8_t *dst, int stride, int eob, int reduced_tx_set); -void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob, int bd); void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride, const TxfmParam *param); #ifdef __cplusplus diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c index 429bd2bfa..7c55dcb48 100644 --- a/av1/encoder/encodemb.c +++ b/av1/encoder/encodemb.c @@ -659,6 +659,26 @@ typedef struct encode_block_pass1_args { MACROBLOCK *x; } encode_block_pass1_args; +static void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, + const TxfmParam *txfm_param) { + assert(av1_ext_tx_used[txfm_param->tx_set_type][txfm_param->tx_type]); + const int eob = txfm_param->eob; + if (eob > 1) + aom_iwht4x4_16_add(input, dest, stride); + else + aom_iwht4x4_1_add(input, dest, stride); +} + +static void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, + const TxfmParam *txfm_param) { + assert(av1_ext_tx_used[txfm_param->tx_set_type][txfm_param->tx_type]); + const int eob = txfm_param->eob; + if (eob > 1) + av1_iht4x4_16_add(input, dest, stride, txfm_param); + else + aom_idct4x4_1_add(input, dest, stride); +} + static void encode_block_pass1(int plane, int block, int blk_row, int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg) { -- GitLab