Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 3 | * |
Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 4 | * This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | * was not distributed with this source code in the LICENSE file, you can |
| 7 | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | * Media Patent License 1.0 was not distributed with this source code in the |
| 9 | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 10 | */ |
| 11 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 12 | #ifndef AV1_COMMON_IDCT_H_ |
| 13 | #define AV1_COMMON_IDCT_H_ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 14 | |
| 15 | #include <assert.h> |
| 16 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 17 | #include "./aom_config.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 18 | #include "av1/common/blockd.h" |
| 19 | #include "av1/common/common.h" |
| 20 | #include "av1/common/enums.h" |
| 21 | #include "aom_dsp/inv_txfm.h" |
| 22 | #include "aom_dsp/txfm_common.h" |
| 23 | #include "aom_ports/mem.h" |
| 24 | |
| 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
| 27 | #endif |
| 28 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 29 | typedef void (*transform_1d)(const tran_low_t *, tran_low_t *); |
| 30 | |
| 31 | typedef struct { |
| 32 | transform_1d cols, rows; // vertical and horizontal |
| 33 | } transform_2d; |
| 34 | |
Lester Lu | 918fe69 | 2017-08-17 14:39:29 -0700 | [diff] [blame] | 35 | #if CONFIG_LGT |
| 36 | int get_lgt4(const TxfmParam *txfm_param, int is_col, |
| 37 | const tran_high_t **lgtmtx); |
| 38 | int get_lgt8(const TxfmParam *txfm_param, int is_col, |
| 39 | const tran_high_t **lgtmtx); |
| 40 | #endif // CONFIG_LGT |
| 41 | |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 42 | #if CONFIG_HIGHBITDEPTH |
Frank Galligan | 34c06df | 2017-05-03 17:41:10 +0000 | [diff] [blame] | 43 | typedef void (*highbd_transform_1d)(const tran_low_t *, tran_low_t *, int bd); |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 44 | |
| 45 | typedef struct { |
| 46 | highbd_transform_1d cols, rows; // vertical and horizontal |
| 47 | } highbd_transform_2d; |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 48 | #endif // CONFIG_HIGHBITDEPTH |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 49 | |
| 50 | #define MAX_TX_SCALE 1 |
Jingning Han | ff70545 | 2017-04-27 11:32:15 -0700 | [diff] [blame] | 51 | int av1_get_tx_scale(const TX_SIZE tx_size); |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 52 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 53 | void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 54 | const TxfmParam *txfm_param); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 55 | void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 56 | const TxfmParam *txfm_param); |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 57 | |
hui su | bb9c73b | 2017-03-17 15:51:02 -0700 | [diff] [blame] | 58 | void av1_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 59 | TxfmParam *txfm_param); |
Urvang Joshi | 0d1e4ff | 2017-04-27 16:17:25 -0700 | [diff] [blame] | 60 | void av1_inverse_transform_block(const MACROBLOCKD *xd, |
Lester Lu | 708c1ec | 2017-06-14 14:54:49 -0700 | [diff] [blame] | 61 | const tran_low_t *dqcoeff, |
| 62 | #if CONFIG_LGT |
| 63 | PREDICTION_MODE mode, |
| 64 | #endif |
| 65 | TX_TYPE tx_type, TX_SIZE tx_size, uint8_t *dst, |
| 66 | int stride, int eob); |
Angie Chiang | bc2288c | 2017-04-09 15:41:17 -0700 | [diff] [blame] | 67 | void av1_inverse_transform_block_facade(MACROBLOCKD *xd, int plane, int block, |
| 68 | int blk_row, int blk_col, int eob); |
Yi Luo | 5128109 | 2017-06-26 16:36:15 -0700 | [diff] [blame] | 69 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 70 | void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, |
| 71 | int eob, int bd); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 72 | void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 73 | int stride, const TxfmParam *param); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 74 | void av1_highbd_inv_txfm_add_4x8(const tran_low_t *input, uint8_t *dest, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 75 | int stride, const TxfmParam *param); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 76 | void av1_highbd_inv_txfm_add_8x4(const tran_low_t *input, uint8_t *dest, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 77 | int stride, const TxfmParam *param); |
hui su | bb9c73b | 2017-03-17 15:51:02 -0700 | [diff] [blame] | 78 | void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride, |
Lester Lu | 27319b6 | 2017-07-10 16:57:15 -0700 | [diff] [blame] | 79 | TxfmParam *txfm_param); |
Yi Luo | 5128109 | 2017-06-26 16:36:15 -0700 | [diff] [blame] | 80 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 81 | #ifdef __cplusplus |
| 82 | } // extern "C" |
| 83 | #endif |
| 84 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 85 | #endif // AV1_COMMON_IDCT_H_ |