#include <immintrin.h>
#include "config/aom_dsp_rtcd.h"
#include "aom/aom_integer.h"
#include "aom_dsp/x86/quantize_x86.h"
static inline void load_b_values_avx2(const int16_t *zbin_ptr, __m256i *zbin,
const int16_t *round_ptr, __m256i *round,
const int16_t *quant_ptr, __m256i *quant,
const int16_t *dequant_ptr,
__m256i *dequant,
const int16_t *shift_ptr, __m256i *shift,
int log_scale) { … }
static inline __m256i load_coefficients_avx2(const tran_low_t *coeff_ptr) { … }
static inline void store_coefficients_avx2(__m256i coeff_vals,
tran_low_t *coeff_ptr) { … }
static AOM_FORCE_INLINE __m256i quantize_b_logscale0_16(
const tran_low_t *coeff_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, __m256i *v_quant, __m256i *v_dequant,
__m256i *v_round, __m256i *v_zbin, __m256i *v_quant_shift) { … }
static inline __m256i get_max_lane_eob(const int16_t *iscan, __m256i v_eobmax,
__m256i v_mask) { … }
static inline int16_t accumulate_eob256(__m256i eob256) { … }
void aom_quantize_b_avx2(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
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) { … }
static AOM_FORCE_INLINE __m256i quantize_b_logscale_16(
const tran_low_t *coeff_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, __m256i *v_quant, __m256i *v_dequant,
__m256i *v_round, __m256i *v_zbin, __m256i *v_quant_shift, int log_scale) { … }
static AOM_FORCE_INLINE void quantize_b_no_qmatrix_avx2(
const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 *iscan, int log_scale) { … }
void aom_quantize_b_32x32_avx2(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
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) { … }
void aom_quantize_b_64x64_avx2(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
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) { … }