Drop zbin_ptr and quant_shift_ptr

vp9[_highbd]_quantize]_fp[_32x32] and vp9_fdct8x8_quant do not make use
of these parameters.

scan is used for C code and iscan is used for SIMD implementations.

Change-Id: I908a0ff7d3febac33da97e0596e040ec7bc18ca5
This commit is contained in:
Johann
2017-02-13 16:29:49 -08:00
parent 1cb44945fb
commit ca4e27f5da
11 changed files with 78 additions and 120 deletions

View File

@@ -135,13 +135,13 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
add_proto qw/int64_t vp9_block_error_fp/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size"; add_proto qw/int64_t vp9_block_error_fp/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size";
specialize qw/vp9_block_error_fp sse2/; specialize qw/vp9_block_error_fp sse2/;
add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64"; specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64";
add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64"; specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
add_proto qw/void vp9_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
specialize qw/vp9_fdct8x8_quant neon ssse3/; specialize qw/vp9_fdct8x8_quant neon ssse3/;
} else { } else {
add_proto qw/int64_t vp9_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz"; add_proto qw/int64_t vp9_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
@@ -150,13 +150,13 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
add_proto qw/int64_t vp9_block_error_fp/, "const int16_t *coeff, const int16_t *dqcoeff, int block_size"; add_proto qw/int64_t vp9_block_error_fp/, "const int16_t *coeff, const int16_t *dqcoeff, int block_size";
specialize qw/vp9_block_error_fp neon sse2/; specialize qw/vp9_block_error_fp neon sse2/;
add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64"; specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64";
add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64"; specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
add_proto qw/void vp9_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
specialize qw/vp9_fdct8x8_quant sse2 ssse3 neon/; specialize qw/vp9_fdct8x8_quant sse2 ssse3 neon/;
} }
@@ -206,9 +206,9 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
# ENCODEMB INVOKE # ENCODEMB INVOKE
add_proto qw/void vp9_highbd_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_highbd_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan";
add_proto qw/void vp9_highbd_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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"; add_proto qw/void vp9_highbd_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, 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 int16_t *scan, const int16_t *iscan" ;
# fdct functions # fdct functions
add_proto qw/void vp9_highbd_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type"; add_proto qw/void vp9_highbd_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";

View File

@@ -20,17 +20,16 @@
void vp9_fdct8x8_quant_neon(const int16_t *input, int stride, void vp9_fdct8x8_quant_neon(const int16_t *input, int stride,
tran_low_t *coeff_ptr, intptr_t n_coeffs, tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *iscan_ptr) {
const int16_t *scan_ptr, const int16_t *iscan_ptr) {
tran_low_t temp_buffer[64]; tran_low_t temp_buffer[64];
(void)coeff_ptr; (void)coeff_ptr;
vpx_fdct8x8_neon(input, temp_buffer, stride); vpx_fdct8x8_neon(input, temp_buffer, stride);
vp9_quantize_fp_neon(temp_buffer, n_coeffs, skip_block, zbin_ptr, round_ptr, vp9_quantize_fp_neon(temp_buffer, n_coeffs, skip_block, round_ptr, quant_ptr,
quant_ptr, quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, scan_ptr,
dequant_ptr, eob_ptr, scan_ptr, iscan_ptr); iscan_ptr);
} }

View File

@@ -25,16 +25,11 @@
#include "vpx_dsp/vpx_dsp_common.h" #include "vpx_dsp/vpx_dsp_common.h"
void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t count, void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t count,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan,
const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *iscan) {
const int16_t *scan, const int16_t *iscan) {
// TODO(jingning) Decide the need of these arguments after the
// quantization process is completed.
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)scan; (void)scan;
if (!skip_block) { if (!skip_block) {

View File

@@ -556,9 +556,8 @@ void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride,
void vp9_fdct8x8_quant_c(const int16_t *input, int stride, void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
tran_low_t *coeff_ptr, intptr_t n_coeffs, tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan, uint16_t *eob_ptr, const int16_t *scan,
const int16_t *iscan) { const int16_t *iscan) {
@@ -567,6 +566,8 @@ void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
int i, j; int i, j;
tran_low_t intermediate[64]; tran_low_t intermediate[64];
(void)iscan;
// Transform columns // Transform columns
{ {
tran_low_t *output = intermediate; tran_low_t *output = intermediate;
@@ -632,12 +633,6 @@ void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
for (j = 0; j < 8; ++j) coeff_ptr[j + i * 8] /= 2; for (j = 0; j < 8; ++j) coeff_ptr[j + i * 8] /= 2;
} }
// TODO(jingning) Decide the need of these arguments after the
// quantization process is completed.
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)iscan;
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr)); memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));

View File

@@ -339,31 +339,27 @@ void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block, int row, int col,
switch (tx_size) { switch (tx_size) {
case TX_32X32: case TX_32X32:
highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
vp9_highbd_quantize_fp_32x32(coeff, 1024, x->skip_block, p->zbin, vp9_highbd_quantize_fp_32x32(coeff, 1024, x->skip_block, p->round_fp,
p->round_fp, p->quant_fp, p->quant_shift, p->quant_fp, qcoeff, dqcoeff, pd->dequant,
qcoeff, dqcoeff, pd->dequant, eob, eob, scan_order->scan, scan_order->iscan);
scan_order->scan, scan_order->iscan);
break; break;
case TX_16X16: case TX_16X16:
vpx_highbd_fdct16x16(src_diff, coeff, diff_stride); vpx_highbd_fdct16x16(src_diff, coeff, diff_stride);
vp9_highbd_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, vp9_highbd_quantize_fp(coeff, 256, x->skip_block, p->round_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, p->quant_fp, qcoeff, dqcoeff, pd->dequant, eob,
pd->dequant, eob, scan_order->scan, scan_order->scan, scan_order->iscan);
scan_order->iscan);
break; break;
case TX_8X8: case TX_8X8:
vpx_highbd_fdct8x8(src_diff, coeff, diff_stride); vpx_highbd_fdct8x8(src_diff, coeff, diff_stride);
vp9_highbd_quantize_fp(coeff, 64, x->skip_block, p->zbin, p->round_fp, vp9_highbd_quantize_fp(coeff, 64, x->skip_block, p->round_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, p->quant_fp, qcoeff, dqcoeff, pd->dequant, eob,
pd->dequant, eob, scan_order->scan, scan_order->scan, scan_order->iscan);
scan_order->iscan);
break; break;
case TX_4X4: case TX_4X4:
x->fwd_txm4x4(src_diff, coeff, diff_stride); x->fwd_txm4x4(src_diff, coeff, diff_stride);
vp9_highbd_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, vp9_highbd_quantize_fp(coeff, 16, x->skip_block, p->round_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, p->quant_fp, qcoeff, dqcoeff, pd->dequant, eob,
pd->dequant, eob, scan_order->scan, scan_order->scan, scan_order->iscan);
scan_order->iscan);
break; break;
default: assert(0); default: assert(0);
} }
@@ -374,28 +370,26 @@ void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block, int row, int col,
switch (tx_size) { switch (tx_size) {
case TX_32X32: case TX_32X32:
fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
vp9_quantize_fp_32x32(coeff, 1024, x->skip_block, p->zbin, p->round_fp, vp9_quantize_fp_32x32(coeff, 1024, x->skip_block, p->round_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, p->quant_fp, qcoeff, dqcoeff, pd->dequant, eob,
pd->dequant, eob, scan_order->scan, scan_order->scan, scan_order->iscan);
scan_order->iscan);
break; break;
case TX_16X16: case TX_16X16:
vpx_fdct16x16(src_diff, coeff, diff_stride); vpx_fdct16x16(src_diff, coeff, diff_stride);
vp9_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, vp9_quantize_fp(coeff, 256, x->skip_block, p->round_fp, p->quant_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant,
eob, scan_order->scan, scan_order->iscan);
break;
case TX_8X8:
vp9_fdct8x8_quant(src_diff, diff_stride, coeff, 64, x->skip_block,
p->zbin, p->round_fp, p->quant_fp, p->quant_shift,
qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan,
scan_order->iscan); scan_order->iscan);
break; break;
case TX_8X8:
vp9_fdct8x8_quant(src_diff, diff_stride, coeff, 64, x->skip_block,
p->round_fp, p->quant_fp, qcoeff, dqcoeff, pd->dequant,
eob, scan_order->scan, scan_order->iscan);
break;
case TX_4X4: case TX_4X4:
x->fwd_txm4x4(src_diff, coeff, diff_stride); x->fwd_txm4x4(src_diff, coeff, diff_stride);
vp9_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, vp9_quantize_fp(coeff, 16, x->skip_block, p->round_fp, p->quant_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan,
eob, scan_order->scan, scan_order->iscan); scan_order->iscan);
break; break;
default: assert(0); break; default: assert(0); break;
} }

View File

@@ -674,23 +674,20 @@ static void block_yrd(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc,
switch (tx_size) { switch (tx_size) {
case TX_16X16: case TX_16X16:
vpx_hadamard_16x16(src_diff, diff_stride, coeff); vpx_hadamard_16x16(src_diff, diff_stride, coeff);
vp9_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, vp9_quantize_fp(coeff, 256, x->skip_block, p->round_fp, p->quant_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan,
pd->dequant, eob, scan_order->scan,
scan_order->iscan); scan_order->iscan);
break; break;
case TX_8X8: case TX_8X8:
vpx_hadamard_8x8(src_diff, diff_stride, coeff); vpx_hadamard_8x8(src_diff, diff_stride, coeff);
vp9_quantize_fp(coeff, 64, x->skip_block, p->zbin, p->round_fp, vp9_quantize_fp(coeff, 64, x->skip_block, p->round_fp, p->quant_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan,
pd->dequant, eob, scan_order->scan,
scan_order->iscan); scan_order->iscan);
break; break;
case TX_4X4: case TX_4X4:
x->fwd_txm4x4(src_diff, coeff, diff_stride); x->fwd_txm4x4(src_diff, coeff, diff_stride);
vp9_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, vp9_quantize_fp(coeff, 16, x->skip_block, p->round_fp, p->quant_fp,
p->quant_fp, p->quant_shift, qcoeff, dqcoeff, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan,
pd->dequant, eob, scan_order->scan,
scan_order->iscan); scan_order->iscan);
break; break;
default: assert(0); break; default: assert(0); break;

View File

@@ -21,17 +21,12 @@
#include "vp9/encoder/vp9_rd.h" #include "vp9/encoder/vp9_rd.h"
void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan, uint16_t *eob_ptr, const int16_t *scan,
const int16_t *iscan) { const int16_t *iscan) {
int i, eob = -1; int i, eob = -1;
// TODO(jingning) Decide the need of these arguments after the
// quantization process is completed.
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)iscan; (void)iscan;
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
@@ -60,19 +55,14 @@ void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count, void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_ptr, tran_low_t *dqcoeff_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 *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan) { const int16_t *scan, const int16_t *iscan) {
int i; int i;
int eob = -1; int eob = -1;
// TODO(jingning) Decide the need of these arguments after the
// quantization process is completed.
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)iscan; (void)iscan;
memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr)); memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
@@ -100,15 +90,12 @@ void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count,
// TODO(jingning) Refactor this file and combine functions with similar // TODO(jingning) Refactor this file and combine functions with similar
// operations. // operations.
void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, tran_low_t *dqcoeff_ptr,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan) { const int16_t *scan, const int16_t *iscan) {
int i, eob = -1; int i, eob = -1;
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)iscan; (void)iscan;
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
@@ -139,13 +126,11 @@ void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
void vp9_highbd_quantize_fp_32x32_c( void vp9_highbd_quantize_fp_32x32_c(
const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block,
const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_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, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan) { const int16_t *scan, const int16_t *iscan) {
int i, eob = -1; int i, eob = -1;
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)iscan; (void)iscan;
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));

View File

@@ -181,14 +181,14 @@ void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride,
void vp9_fdct8x8_quant_sse2(const int16_t *input, int stride, void vp9_fdct8x8_quant_sse2(const int16_t *input, int stride,
int16_t *coeff_ptr, intptr_t n_coeffs, int16_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, int16_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr,
int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, int16_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan_ptr, uint16_t *eob_ptr, const int16_t *scan_ptr,
const int16_t *iscan_ptr) { const int16_t *iscan_ptr) {
__m128i zero; __m128i zero;
int pass; int pass;
// Constants // Constants
// When we use them, in one case, they are all the same. In all others // When we use them, in one case, they are all the same. In all others
// it's a pair of them that we need to repeat four times. This is done // it's a pair of them that we need to repeat four times. This is done
@@ -215,8 +215,6 @@ void vp9_fdct8x8_quant_sse2(const int16_t *input, int stride,
int index = 0; int index = 0;
(void)scan_ptr; (void)scan_ptr;
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)coeff_ptr; (void)coeff_ptr;
// Pre-condition input (shift by two) // Pre-condition input (shift by two)

View File

@@ -20,12 +20,12 @@
void vp9_fdct8x8_quant_ssse3( void vp9_fdct8x8_quant_ssse3(
const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, int skip_block, const int16_t *round_ptr, const int16_t *quant_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, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan_ptr, const int16_t *iscan_ptr) { uint16_t *eob_ptr, const int16_t *scan_ptr, const int16_t *iscan_ptr) {
__m128i zero; __m128i zero;
int pass; int pass;
// Constants // Constants
// When we use them, in one case, they are all the same. In all others // When we use them, in one case, they are all the same. In all others
// it's a pair of them that we need to repeat four times. This is done // it's a pair of them that we need to repeat four times. This is done
@@ -53,8 +53,6 @@ void vp9_fdct8x8_quant_ssse3(
int index = 0; int index = 0;
(void)scan_ptr; (void)scan_ptr;
(void)zbin_ptr;
(void)quant_shift_ptr;
(void)coeff_ptr; (void)coeff_ptr;
// Pre-condition input (shift by two) // Pre-condition input (shift by two)

View File

@@ -17,18 +17,16 @@
#include "vpx_dsp/x86/bitdepth_conversion_sse2.h" #include "vpx_dsp/x86/bitdepth_conversion_sse2.h"
void vp9_quantize_fp_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, void vp9_quantize_fp_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, int skip_block, const int16_t *round_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr,
const int16_t *quant_shift_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *iscan_ptr) {
const int16_t *scan_ptr, const int16_t *iscan_ptr) {
__m128i zero; __m128i zero;
__m128i thr; __m128i thr;
int16_t nzflag; int16_t nzflag;
(void)scan_ptr; (void)scan_ptr;
(void)zbin_ptr;
(void)quant_shift_ptr;
coeff_ptr += n_coeffs; coeff_ptr += n_coeffs;
iscan_ptr += n_coeffs; iscan_ptr += n_coeffs;

View File

@@ -19,8 +19,8 @@ pw_1: times 8 dw 1
SECTION .text SECTION .text
%macro QUANTIZE_FP 2 %macro QUANTIZE_FP 2
cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, round, quant, \
shift, qcoeff, dqcoeff, dequant, \ qcoeff, dqcoeff, dequant, \
eob, scan, iscan eob, scan, iscan
cmp dword skipm, 0 cmp dword skipm, 0
jne .blank jne .blank
@@ -29,7 +29,6 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
movifnidn coeffq, coeffmp movifnidn coeffq, coeffmp
movifnidn ncoeffq, ncoeffmp movifnidn ncoeffq, ncoeffmp
mov r2, dequantmp mov r2, dequantmp
movifnidn zbinq, zbinmp
movifnidn roundq, roundmp movifnidn roundq, roundmp
movifnidn quantq, quantmp movifnidn quantq, quantmp
mova m1, [roundq] ; m1 = round mova m1, [roundq] ; m1 = round