Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -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 | 9c01aa1 | 2016-09-01 14:32:49 -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 AOM_DSP_QUANTIZE_H_ |
| 13 | #define AOM_DSP_QUANTIZE_H_ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 14 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 15 | #include "./aom_config.h" |
| 16 | #include "aom_dsp/aom_dsp_common.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
Thomas Davies | f3b5ee1 | 2017-07-18 15:16:43 +0100 | [diff] [blame] | 22 | void quantize_b_helper_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, |
| 23 | int skip_block, const int16_t *zbin_ptr, |
| 24 | const int16_t *round_ptr, const int16_t *quant_ptr, |
| 25 | const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, |
| 26 | tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, |
| 27 | uint16_t *eob_ptr, const int16_t *scan, |
| 28 | const int16_t *iscan, const qm_val_t *qm_ptr, |
| 29 | const qm_val_t *iqm_ptr, const int log_scale); |
| 30 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 31 | void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 32 | int skip_block, const int16_t *zbin_ptr, |
| 33 | const int16_t *round_ptr, const int16_t *quant_ptr, |
| 34 | const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, |
| 35 | tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, |
| 36 | uint16_t *eob_ptr, const int16_t *scan, |
Thomas Davies | f3b5ee1 | 2017-07-18 15:16:43 +0100 | [diff] [blame] | 37 | const int16_t *iscan); |
| 38 | |
Thomas Davies | 181fc08 | 2017-08-09 14:26:53 +0100 | [diff] [blame] | 39 | void highbd_quantize_b_helper_c( |
| 40 | const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, |
| 41 | const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, |
| 42 | const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, |
| 43 | tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, |
| 44 | const int16_t *scan, const int16_t *iscan, const qm_val_t *qm_ptr, |
| 45 | const qm_val_t *iqm_ptr, const int log_scale); |
| 46 | |
Thomas Davies | f3b5ee1 | 2017-07-18 15:16:43 +0100 | [diff] [blame] | 47 | #if CONFIG_HIGHBITDEPTH |
| 48 | void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, |
| 49 | int skip_block, const int16_t *zbin_ptr, |
| 50 | const int16_t *round_ptr, const int16_t *quant_ptr, |
| 51 | const int16_t *quant_shift_ptr, |
| 52 | tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, |
| 53 | const int16_t *dequant_ptr, uint16_t *eob_ptr, |
| 54 | const int16_t *scan, const int16_t *iscan); |
Thomas Davies | f3b5ee1 | 2017-07-18 15:16:43 +0100 | [diff] [blame] | 55 | #endif |
| 56 | |
| 57 | void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, |
| 58 | const int16_t *round_ptr, const int16_t quant_ptr, |
| 59 | tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, |
| 60 | const int16_t dequant_ptr, uint16_t *eob_ptr); |
| 61 | void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, |
| 62 | const int16_t *round_ptr, const int16_t quant_ptr, |
| 63 | tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, |
| 64 | const int16_t dequant_ptr, uint16_t *eob_ptr); |
| 65 | #if CONFIG_TX64X64 |
| 66 | void aom_quantize_dc_64x64(const tran_low_t *coeff_ptr, int skip_block, |
| 67 | const int16_t *round_ptr, const int16_t quant_ptr, |
| 68 | tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, |
| 69 | const int16_t dequant_ptr, uint16_t *eob_ptr); |
| 70 | #endif // CONFIG_TX64X64 |
| 71 | |
| 72 | #if CONFIG_AOM_QM |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 73 | #if CONFIG_HIGHBITDEPTH |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 74 | void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 75 | int skip_block, const int16_t *round_ptr, |
| 76 | const int16_t quant_ptr, tran_low_t *qcoeff_ptr, |
| 77 | tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, |
| 78 | uint16_t *eob_ptr, const qm_val_t *qm_ptr, |
| 79 | const qm_val_t *iqm_ptr); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 80 | void aom_highbd_quantize_dc_32x32( |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 81 | const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, |
| 82 | const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, |
| 83 | const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, |
| 84 | const qm_val_t *iqm_ptr); |
Debargha Mukherjee | 0e11912 | 2016-11-04 12:10:23 -0700 | [diff] [blame] | 85 | #if CONFIG_TX64X64 |
| 86 | void aom_highbd_quantize_dc_64x64( |
| 87 | const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, |
| 88 | const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, |
| 89 | const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, |
| 90 | const qm_val_t *iqm_ptr); |
| 91 | #endif // CONFIG_TX64X64 |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 92 | #endif // CONFIG_HIGHBITDEPTH |
Debargha Mukherjee | 0e11912 | 2016-11-04 12:10:23 -0700 | [diff] [blame] | 93 | |
| 94 | #else // CONFIG_AOM_QM |
| 95 | |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 96 | #if CONFIG_HIGHBITDEPTH |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 97 | void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 98 | int skip_block, const int16_t *round_ptr, |
| 99 | const int16_t quant_ptr, tran_low_t *qcoeff_ptr, |
| 100 | tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, |
| 101 | uint16_t *eob_ptr); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 102 | void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 103 | const int16_t *round_ptr, |
| 104 | const int16_t quant_ptr, |
| 105 | tran_low_t *qcoeff_ptr, |
| 106 | tran_low_t *dqcoeff_ptr, |
| 107 | const int16_t dequant_ptr, uint16_t *eob_ptr); |
Debargha Mukherjee | 0e11912 | 2016-11-04 12:10:23 -0700 | [diff] [blame] | 108 | #if CONFIG_TX64X64 |
| 109 | void aom_highbd_quantize_dc_64x64(const tran_low_t *coeff_ptr, int skip_block, |
| 110 | const int16_t *round_ptr, |
| 111 | const int16_t quant_ptr, |
| 112 | tran_low_t *qcoeff_ptr, |
| 113 | tran_low_t *dqcoeff_ptr, |
| 114 | const int16_t dequant_ptr, uint16_t *eob_ptr); |
| 115 | #endif // CONFIG_TX64X64 |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 116 | #endif // CONFIG_HIGHBITDEPTH |
Debargha Mukherjee | 0e11912 | 2016-11-04 12:10:23 -0700 | [diff] [blame] | 117 | #endif // CONFIG_AOM_QM |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 118 | |
| 119 | #ifdef __cplusplus |
| 120 | } // extern "C" |
| 121 | #endif |
| 122 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 123 | #endif // AOM_DSP_QUANTIZE_H_ |