quantize.h 5.63 KB
Newer Older
1
/*
2
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
3
 *
4
5
6
7
8
9
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10
11
12
13
14
 */

#ifndef VPX_DSP_QUANTIZE_H_
#define VPX_DSP_QUANTIZE_H_

Adrian Grange's avatar
Adrian Grange committed
15
16
#include "./aom_config.h"
#include "aom_dsp/aom_dsp_common.h"
17
18
19
20
21

#ifdef __cplusplus
extern "C" {
#endif

22
#if CONFIG_AOM_QM
Adrian Grange's avatar
Adrian Grange committed
23
void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
24
25
26
27
                     const int16_t *round_ptr, const int16_t quant_ptr,
                     tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                     const int16_t dequant_ptr, uint16_t *eob_ptr,
                     const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr);
Adrian Grange's avatar
Adrian Grange committed
28
void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
29
30
31
32
                           const int16_t *round_ptr, const int16_t quant_ptr,
                           tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                           const int16_t dequant_ptr, uint16_t *eob_ptr,
                           const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr);
Adrian Grange's avatar
Adrian Grange committed
33
void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
34
35
36
37
38
39
40
                      int skip_block, const int16_t *zbin_ptr,
                      const int16_t *round_ptr, const int16_t *quant_ptr,
                      const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
                      tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
                      uint16_t *eob_ptr, const int16_t *scan,
                      const int16_t *iscan, const qm_val_t *qm_ptr,
                      const qm_val_t *iqm_ptr);
41
#if CONFIG_AOM_HIGHBITDEPTH
Adrian Grange's avatar
Adrian Grange committed
42
void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs,
43
44
45
46
47
                            int skip_block, const int16_t *round_ptr,
                            const int16_t quant_ptr, tran_low_t *qcoeff_ptr,
                            tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr,
                            uint16_t *eob_ptr, const qm_val_t *qm_ptr,
                            const qm_val_t *iqm_ptr);
Adrian Grange's avatar
Adrian Grange committed
48
void aom_highbd_quantize_dc_32x32(
49
50
51
52
    const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr,
    const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
    const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr,
    const qm_val_t *iqm_ptr);
Adrian Grange's avatar
Adrian Grange committed
53
void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
54
55
56
57
58
59
60
61
62
                             int skip_block, const int16_t *zbin_ptr,
                             const int16_t *round_ptr, const int16_t *quant_ptr,
                             const int16_t *quant_shift_ptr,
                             tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                             const int16_t *dequant_ptr, uint16_t *eob_ptr,
                             const int16_t *scan, const int16_t *iscan,
                             const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr);
#endif
#else
Adrian Grange's avatar
Adrian Grange committed
63
void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
64
65
66
                     const int16_t *round_ptr, const int16_t quant_ptr,
                     tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                     const int16_t dequant_ptr, uint16_t *eob_ptr);
Adrian Grange's avatar
Adrian Grange committed
67
void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
68
69
70
                           const int16_t *round_ptr, const int16_t quant_ptr,
                           tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                           const int16_t dequant_ptr, uint16_t *eob_ptr);
Adrian Grange's avatar
Adrian Grange committed
71
void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
72
73
74
75
76
77
                      int skip_block, const int16_t *zbin_ptr,
                      const int16_t *round_ptr, const int16_t *quant_ptr,
                      const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
                      tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
                      uint16_t *eob_ptr, const int16_t *scan,
                      const int16_t *iscan);
78
#if CONFIG_AOM_HIGHBITDEPTH
Adrian Grange's avatar
Adrian Grange committed
79
void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs,
clang-format's avatar
clang-format committed
80
81
82
83
                            int skip_block, const int16_t *round_ptr,
                            const int16_t quant_ptr, tran_low_t *qcoeff_ptr,
                            tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr,
                            uint16_t *eob_ptr);
Adrian Grange's avatar
Adrian Grange committed
84
void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
85
86
87
88
                                  const int16_t *round_ptr,
                                  const int16_t quant_ptr,
                                  tran_low_t *qcoeff_ptr,
                                  tran_low_t *dqcoeff_ptr,
clang-format's avatar
clang-format committed
89
                                  const int16_t dequant_ptr, uint16_t *eob_ptr);
Adrian Grange's avatar
Adrian Grange committed
90
void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
91
92
93
94
95
96
97
                             int skip_block, const int16_t *zbin_ptr,
                             const int16_t *round_ptr, const int16_t *quant_ptr,
                             const int16_t *quant_shift_ptr,
                             tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                             const int16_t *dequant_ptr, uint16_t *eob_ptr,
                             const int16_t *scan, const int16_t *iscan);
#endif
98
99
100
101
102
103
104
#endif

#ifdef __cplusplus
}  // extern "C"
#endif

#endif  // VPX_DSP_QUANTIZE_H_