blob: 03609e8b4f63bf59b309f6a0d3a370320349a0ba [file] [log] [blame]
Yaowu Xuc27fc142016-08-22 16:08:15 -07001/*
Yaowu Xu9c01aa12016-09-01 14:32:49 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Yaowu Xuc27fc142016-08-22 16:08:15 -07003 *
Yaowu Xu9c01aa12016-09-01 14:32:49 -07004 * 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 Xuc27fc142016-08-22 16:08:15 -070010 */
11
Yaowu Xuf883b422016-08-30 14:01:10 -070012#ifndef AOM_DSP_QUANTIZE_H_
13#define AOM_DSP_QUANTIZE_H_
Yaowu Xuc27fc142016-08-22 16:08:15 -070014
Yaowu Xuf883b422016-08-30 14:01:10 -070015#include "./aom_config.h"
16#include "aom_dsp/aom_dsp_common.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070017
18#ifdef __cplusplus
19extern "C" {
20#endif
21
Thomas Daviesf3b5ee12017-07-18 15:16:43 +010022void 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 Xuf883b422016-08-30 14:01:10 -070031void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
Yaowu Xuc27fc142016-08-22 16:08:15 -070032 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 Daviesf3b5ee12017-07-18 15:16:43 +010037 const int16_t *iscan);
38
Thomas Davies181fc082017-08-09 14:26:53 +010039void 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 Daviesf3b5ee12017-07-18 15:16:43 +010047#if CONFIG_HIGHBITDEPTH
48void 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 Daviesf3b5ee12017-07-18 15:16:43 +010055#endif
56
57void 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);
61void 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
66void 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 Alaiwan71e87842017-04-12 16:03:28 +020073#if CONFIG_HIGHBITDEPTH
Yaowu Xuf883b422016-08-30 14:01:10 -070074void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs,
Yaowu Xuc27fc142016-08-22 16:08:15 -070075 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 Xuf883b422016-08-30 14:01:10 -070080void aom_highbd_quantize_dc_32x32(
Yaowu Xuc27fc142016-08-22 16:08:15 -070081 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 Mukherjee0e119122016-11-04 12:10:23 -070085#if CONFIG_TX64X64
86void 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 Alaiwan71e87842017-04-12 16:03:28 +020092#endif // CONFIG_HIGHBITDEPTH
Debargha Mukherjee0e119122016-11-04 12:10:23 -070093
94#else // CONFIG_AOM_QM
95
Sebastien Alaiwan71e87842017-04-12 16:03:28 +020096#if CONFIG_HIGHBITDEPTH
Yaowu Xuf883b422016-08-30 14:01:10 -070097void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs,
Yaowu Xuc27fc142016-08-22 16:08:15 -070098 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 Xuf883b422016-08-30 14:01:10 -0700102void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
Yaowu Xuc27fc142016-08-22 16:08:15 -0700103 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 Mukherjee0e119122016-11-04 12:10:23 -0700108#if CONFIG_TX64X64
109void 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 Alaiwan71e87842017-04-12 16:03:28 +0200116#endif // CONFIG_HIGHBITDEPTH
Debargha Mukherjee0e119122016-11-04 12:10:23 -0700117#endif // CONFIG_AOM_QM
Yaowu Xuc27fc142016-08-22 16:08:15 -0700118
119#ifdef __cplusplus
120} // extern "C"
121#endif
122
Yaowu Xuf883b422016-08-30 14:01:10 -0700123#endif // AOM_DSP_QUANTIZE_H_