Merge "Revert "Revert "Removal of legacy zbin_extra / zbin_oq_value."""
This commit is contained in:
@@ -34,7 +34,7 @@ typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count,
|
|||||||
const int16_t *round, const int16_t *quant,
|
const int16_t *round, const int16_t *quant,
|
||||||
const int16_t *quant_shift,
|
const int16_t *quant_shift,
|
||||||
tran_low_t *qcoeff, tran_low_t *dqcoeff,
|
tran_low_t *qcoeff, tran_low_t *dqcoeff,
|
||||||
const int16_t *dequant, int zbin_oq_value,
|
const int16_t *dequant,
|
||||||
uint16_t *eob, const int16_t *scan,
|
uint16_t *eob, const int16_t *scan,
|
||||||
const int16_t *iscan);
|
const int16_t *iscan);
|
||||||
typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t>
|
typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t>
|
||||||
@@ -80,7 +80,6 @@ class VP9Quantize32Test : public ::testing::TestWithParam<QuantizeParam> {
|
|||||||
|
|
||||||
TEST_P(VP9QuantizeTest, OperationCheck) {
|
TEST_P(VP9QuantizeTest, OperationCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
int zbin_oq_value = 0;
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256);
|
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
||||||
@@ -116,13 +115,12 @@ TEST_P(VP9QuantizeTest, OperationCheck) {
|
|||||||
}
|
}
|
||||||
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value,
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
zbin_ptr, round_ptr, quant_ptr,
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
quant_shift_ptr, qcoeff_ptr,
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
dqcoeff_ptr, dequant_ptr,
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
zbin_oq_value, eob_ptr,
|
|
||||||
scan_order->scan, scan_order->iscan));
|
scan_order->scan, scan_order->iscan));
|
||||||
for (int j = 0; j < sz; ++j) {
|
for (int j = 0; j < sz; ++j) {
|
||||||
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
||||||
@@ -141,7 +139,6 @@ TEST_P(VP9QuantizeTest, OperationCheck) {
|
|||||||
|
|
||||||
TEST_P(VP9Quantize32Test, OperationCheck) {
|
TEST_P(VP9Quantize32Test, OperationCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
int zbin_oq_value = 0;
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024);
|
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
||||||
@@ -177,13 +174,12 @@ TEST_P(VP9Quantize32Test, OperationCheck) {
|
|||||||
}
|
}
|
||||||
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value,
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
zbin_ptr, round_ptr, quant_ptr,
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
quant_shift_ptr, qcoeff_ptr,
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
dqcoeff_ptr, dequant_ptr,
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
zbin_oq_value, eob_ptr,
|
|
||||||
scan_order->scan, scan_order->iscan));
|
scan_order->scan, scan_order->iscan));
|
||||||
for (int j = 0; j < sz; ++j) {
|
for (int j = 0; j < sz; ++j) {
|
||||||
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
||||||
@@ -202,7 +198,6 @@ TEST_P(VP9Quantize32Test, OperationCheck) {
|
|||||||
|
|
||||||
TEST_P(VP9QuantizeTest, EOBCheck) {
|
TEST_P(VP9QuantizeTest, EOBCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
int zbin_oq_value = 0;
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256);
|
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
||||||
@@ -242,13 +237,12 @@ TEST_P(VP9QuantizeTest, EOBCheck) {
|
|||||||
|
|
||||||
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value,
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
zbin_ptr, round_ptr, quant_ptr,
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
quant_shift_ptr, qcoeff_ptr,
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
dqcoeff_ptr, dequant_ptr,
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
zbin_oq_value, eob_ptr,
|
|
||||||
scan_order->scan, scan_order->iscan));
|
scan_order->scan, scan_order->iscan));
|
||||||
|
|
||||||
for (int j = 0; j < sz; ++j) {
|
for (int j = 0; j < sz; ++j) {
|
||||||
@@ -268,7 +262,6 @@ TEST_P(VP9QuantizeTest, EOBCheck) {
|
|||||||
|
|
||||||
TEST_P(VP9Quantize32Test, EOBCheck) {
|
TEST_P(VP9Quantize32Test, EOBCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
int zbin_oq_value = 0;
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024);
|
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2);
|
||||||
@@ -308,13 +301,12 @@ TEST_P(VP9Quantize32Test, EOBCheck) {
|
|||||||
|
|
||||||
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value,
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
zbin_ptr, round_ptr, quant_ptr,
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
quant_shift_ptr, qcoeff_ptr,
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
dqcoeff_ptr, dequant_ptr,
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
zbin_oq_value, eob_ptr,
|
|
||||||
scan_order->scan, scan_order->iscan));
|
scan_order->scan, scan_order->iscan));
|
||||||
|
|
||||||
for (int j = 0; j < sz; ++j) {
|
for (int j = 0; j < sz; ++j) {
|
||||||
|
|||||||
@@ -1125,37 +1125,37 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
|
|||||||
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";
|
||||||
specialize qw/vp9_block_error/;
|
specialize qw/vp9_block_error/;
|
||||||
|
|
||||||
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, int zbin_oq_value, 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 *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";
|
||||||
specialize qw/vp9_quantize_fp/;
|
specialize qw/vp9_quantize_fp/;
|
||||||
|
|
||||||
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, int zbin_oq_value, 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 *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";
|
||||||
specialize qw/vp9_quantize_fp_32x32/;
|
specialize qw/vp9_quantize_fp_32x32/;
|
||||||
|
|
||||||
add_proto qw/void vp9_quantize_b/, "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, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
|
add_proto qw/void vp9_quantize_b/, "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";
|
||||||
specialize qw/vp9_quantize_b/;
|
specialize qw/vp9_quantize_b/;
|
||||||
|
|
||||||
add_proto qw/void vp9_quantize_b_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, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
|
add_proto qw/void vp9_quantize_b_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";
|
||||||
specialize qw/vp9_quantize_b_32x32/;
|
specialize qw/vp9_quantize_b_32x32/;
|
||||||
|
|
||||||
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, int zbin_oq_value, 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 *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";
|
||||||
specialize qw/vp9_fdct8x8_quant/;
|
specialize qw/vp9_fdct8x8_quant/;
|
||||||
} 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";
|
||||||
specialize qw/vp9_block_error avx2/, "$sse2_x86inc";
|
specialize qw/vp9_block_error avx2/, "$sse2_x86inc";
|
||||||
|
|
||||||
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, int zbin_oq_value, 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 *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";
|
||||||
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, int zbin_oq_value, 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 *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";
|
||||||
specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
|
specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
|
||||||
|
|
||||||
add_proto qw/void vp9_quantize_b/, "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, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
|
add_proto qw/void vp9_quantize_b/, "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";
|
||||||
specialize qw/vp9_quantize_b sse2/, "$ssse3_x86_64";
|
specialize qw/vp9_quantize_b sse2/, "$ssse3_x86_64";
|
||||||
|
|
||||||
add_proto qw/void vp9_quantize_b_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, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
|
add_proto qw/void vp9_quantize_b_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";
|
||||||
specialize qw/vp9_quantize_b_32x32/, "$ssse3_x86_64";
|
specialize qw/vp9_quantize_b_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, int zbin_oq_value, 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 *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";
|
||||||
specialize qw/vp9_fdct8x8_quant sse2 ssse3/;
|
specialize qw/vp9_fdct8x8_quant sse2 ssse3/;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1850,16 +1850,16 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
|
|||||||
add_proto qw/void vp9_highbd_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd";
|
add_proto qw/void vp9_highbd_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd";
|
||||||
specialize qw/vp9_highbd_subtract_block/;
|
specialize qw/vp9_highbd_subtract_block/;
|
||||||
|
|
||||||
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, int zbin_oq_value, 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 *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";
|
||||||
specialize qw/vp9_highbd_quantize_fp/;
|
specialize qw/vp9_highbd_quantize_fp/;
|
||||||
|
|
||||||
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, int zbin_oq_value, 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";
|
||||||
specialize qw/vp9_highbd_quantize_fp_32x32/;
|
specialize qw/vp9_highbd_quantize_fp_32x32/;
|
||||||
|
|
||||||
add_proto qw/void vp9_highbd_quantize_b/, "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, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
|
add_proto qw/void vp9_highbd_quantize_b/, "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";
|
||||||
specialize qw/vp9_highbd_quantize_b sse2/;
|
specialize qw/vp9_highbd_quantize_b sse2/;
|
||||||
|
|
||||||
add_proto qw/void vp9_highbd_quantize_b_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, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
|
add_proto qw/void vp9_highbd_quantize_b_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";
|
||||||
specialize qw/vp9_highbd_quantize_b_32x32 sse2/;
|
specialize qw/vp9_highbd_quantize_b_32x32 sse2/;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -26,13 +26,12 @@ void vp9_quantize_fp_neon(const int16_t *coeff_ptr, intptr_t count,
|
|||||||
const int16_t *round_ptr, const int16_t *quant_ptr,
|
const int16_t *round_ptr, const int16_t *quant_ptr,
|
||||||
const int16_t *quant_shift_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,
|
||||||
int zbin_oq_value, uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan, const int16_t *iscan) {
|
const int16_t *scan, const int16_t *iscan) {
|
||||||
// TODO(jingning) Decide the need of these arguments after the
|
// TODO(jingning) Decide the need of these arguments after the
|
||||||
// quantization process is completed.
|
// quantization process is completed.
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)scan;
|
(void)scan;
|
||||||
|
|
||||||
if (!skip_block) {
|
if (!skip_block) {
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ struct macroblock_plane {
|
|||||||
int16_t *round;
|
int16_t *round;
|
||||||
|
|
||||||
int64_t quant_thred[2];
|
int64_t quant_thred[2];
|
||||||
// Zbin Over Quant value
|
|
||||||
int16_t zbin_extra;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The [2] dimension is for whether we skip the EOB node (i.e. if previous
|
/* The [2] dimension is for whether we skip the EOB node (i.e. if previous
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
|
|||||||
const int16_t *quant_shift_ptr,
|
const int16_t *quant_shift_ptr,
|
||||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan, const int16_t *iscan) {
|
const int16_t *scan, const int16_t *iscan) {
|
||||||
int eob = -1;
|
int eob = -1;
|
||||||
|
|
||||||
@@ -416,7 +416,6 @@ void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
|
|||||||
// quantization process is completed.
|
// quantization process is completed.
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||||
|
|||||||
@@ -3893,8 +3893,6 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
|
|||||||
|
|
||||||
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
|
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
|
||||||
|
|
||||||
vp9_update_zbin_extra(x);
|
|
||||||
|
|
||||||
if (!is_inter_block(mbmi)) {
|
if (!is_inter_block(mbmi)) {
|
||||||
int plane;
|
int plane;
|
||||||
mbmi->skip = 1;
|
mbmi->skip = 1;
|
||||||
|
|||||||
@@ -386,28 +386,28 @@ void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block,
|
|||||||
vp9_highbd_quantize_fp_32x32(coeff, 1024, x->skip_block, p->zbin,
|
vp9_highbd_quantize_fp_32x32(coeff, 1024, x->skip_block, p->zbin,
|
||||||
p->round_fp, p->quant_fp, p->quant_shift,
|
p->round_fp, p->quant_fp, p->quant_shift,
|
||||||
qcoeff, dqcoeff, pd->dequant,
|
qcoeff, dqcoeff, pd->dequant,
|
||||||
p->zbin_extra, eob, scan_order->scan,
|
eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_16X16:
|
case TX_16X16:
|
||||||
vp9_highbd_fdct16x16(src_diff, coeff, diff_stride);
|
vp9_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->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_8X8:
|
case TX_8X8:
|
||||||
vp9_highbd_fdct8x8(src_diff, coeff, diff_stride);
|
vp9_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->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, 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->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -422,28 +422,28 @@ void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block,
|
|||||||
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->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob, scan_order->scan,
|
pd->dequant, eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_16X16:
|
case TX_16X16:
|
||||||
vp9_fdct16x16(src_diff, coeff, diff_stride);
|
vp9_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->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_8X8:
|
case TX_8X8:
|
||||||
vp9_fdct8x8_quant(src_diff, diff_stride, coeff, 64,
|
vp9_fdct8x8_quant(src_diff, diff_stride, coeff, 64,
|
||||||
x->skip_block, p->zbin, p->round_fp,
|
x->skip_block, p->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, 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->zbin, p->round_fp,
|
||||||
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -556,28 +556,28 @@ void vp9_xform_quant(MACROBLOCK *x, int plane, int block,
|
|||||||
highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
||||||
vp9_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin,
|
vp9_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin,
|
||||||
p->round, p->quant, p->quant_shift, qcoeff,
|
p->round, p->quant, p->quant_shift, qcoeff,
|
||||||
dqcoeff, pd->dequant, p->zbin_extra, eob,
|
dqcoeff, pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_16X16:
|
case TX_16X16:
|
||||||
vp9_highbd_fdct16x16(src_diff, coeff, diff_stride);
|
vp9_highbd_fdct16x16(src_diff, coeff, diff_stride);
|
||||||
vp9_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
vp9_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_8X8:
|
case TX_8X8:
|
||||||
vp9_highbd_fdct8x8(src_diff, coeff, diff_stride);
|
vp9_highbd_fdct8x8(src_diff, coeff, diff_stride);
|
||||||
vp9_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
|
vp9_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, 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_b(coeff, 16, x->skip_block, p->zbin, p->round,
|
vp9_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -592,28 +592,28 @@ void vp9_xform_quant(MACROBLOCK *x, int plane, int block,
|
|||||||
fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
||||||
vp9_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round,
|
vp9_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob, scan_order->scan,
|
pd->dequant, eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_16X16:
|
case TX_16X16:
|
||||||
vp9_fdct16x16(src_diff, coeff, diff_stride);
|
vp9_fdct16x16(src_diff, coeff, diff_stride);
|
||||||
vp9_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
vp9_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
case TX_8X8:
|
case TX_8X8:
|
||||||
vp9_fdct8x8(src_diff, coeff, diff_stride);
|
vp9_fdct8x8(src_diff, coeff, diff_stride);
|
||||||
vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
|
vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, 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_b(coeff, 16, x->skip_block, p->zbin, p->round,
|
vp9_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -844,8 +844,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
||||||
vp9_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin,
|
vp9_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin,
|
||||||
p->round, p->quant, p->quant_shift,
|
p->round, p->quant, p->quant_shift,
|
||||||
qcoeff, dqcoeff, pd->dequant,
|
qcoeff, dqcoeff, pd->dequant, eob,
|
||||||
p->zbin_extra, eob,
|
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
}
|
}
|
||||||
if (!x->skip_encode && *eob) {
|
if (!x->skip_encode && *eob) {
|
||||||
@@ -866,7 +865,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
vp9_highbd_fht16x16(src_diff, coeff, diff_stride, tx_type);
|
vp9_highbd_fht16x16(src_diff, coeff, diff_stride, tx_type);
|
||||||
vp9_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
vp9_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
}
|
}
|
||||||
if (!x->skip_encode && *eob) {
|
if (!x->skip_encode && *eob) {
|
||||||
@@ -888,7 +887,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
vp9_highbd_fht8x8(src_diff, coeff, diff_stride, tx_type);
|
vp9_highbd_fht8x8(src_diff, coeff, diff_stride, tx_type);
|
||||||
vp9_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
|
vp9_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
}
|
}
|
||||||
if (!x->skip_encode && *eob) {
|
if (!x->skip_encode && *eob) {
|
||||||
@@ -914,7 +913,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
x->fwd_txm4x4(src_diff, coeff, diff_stride);
|
x->fwd_txm4x4(src_diff, coeff, diff_stride);
|
||||||
vp9_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round,
|
vp9_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob,
|
pd->dequant, eob,
|
||||||
scan_order->scan, scan_order->iscan);
|
scan_order->scan, scan_order->iscan);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -953,7 +952,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride);
|
||||||
vp9_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round,
|
vp9_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob, scan_order->scan,
|
pd->dequant, eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
}
|
}
|
||||||
if (!x->skip_encode && *eob)
|
if (!x->skip_encode && *eob)
|
||||||
@@ -973,7 +972,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
vp9_fht16x16(src_diff, coeff, diff_stride, tx_type);
|
vp9_fht16x16(src_diff, coeff, diff_stride, tx_type);
|
||||||
vp9_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
vp9_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round,
|
||||||
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
p->quant, p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob, scan_order->scan,
|
pd->dequant, eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
}
|
}
|
||||||
if (!x->skip_encode && *eob)
|
if (!x->skip_encode && *eob)
|
||||||
@@ -993,7 +992,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
vp9_fht8x8(src_diff, coeff, diff_stride, tx_type);
|
vp9_fht8x8(src_diff, coeff, diff_stride, tx_type);
|
||||||
vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant,
|
vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant,
|
||||||
p->quant_shift, qcoeff, dqcoeff,
|
p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob, scan_order->scan,
|
pd->dequant, eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
}
|
}
|
||||||
if (!x->skip_encode && *eob)
|
if (!x->skip_encode && *eob)
|
||||||
@@ -1017,7 +1016,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||||||
x->fwd_txm4x4(src_diff, coeff, diff_stride);
|
x->fwd_txm4x4(src_diff, coeff, diff_stride);
|
||||||
vp9_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant,
|
vp9_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant,
|
||||||
p->quant_shift, qcoeff, dqcoeff,
|
p->quant_shift, qcoeff, dqcoeff,
|
||||||
pd->dequant, p->zbin_extra, eob, scan_order->scan,
|
pd->dequant, eob, scan_order->scan,
|
||||||
scan_order->iscan);
|
scan_order->iscan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,14 +122,13 @@ void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t *quant_ptr, const int16_t *quant_shift_ptr,
|
const int16_t *quant_ptr, const int16_t *quant_shift_ptr,
|
||||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_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;
|
||||||
// TODO(jingning) Decide the need of these arguments after the
|
// TODO(jingning) Decide the need of these arguments after the
|
||||||
// quantization process is completed.
|
// quantization process is completed.
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||||
@@ -168,7 +167,6 @@ void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr,
|
|||||||
tran_low_t *qcoeff_ptr,
|
tran_low_t *qcoeff_ptr,
|
||||||
tran_low_t *dqcoeff_ptr,
|
tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value,
|
|
||||||
uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan,
|
const int16_t *scan,
|
||||||
const int16_t *iscan) {
|
const int16_t *iscan) {
|
||||||
@@ -178,7 +176,6 @@ void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr,
|
|||||||
// quantization process is completed.
|
// quantization process is completed.
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
|
||||||
@@ -217,12 +214,11 @@ void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t *quant_shift_ptr,
|
const int16_t *quant_shift_ptr,
|
||||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_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)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||||
@@ -261,12 +257,11 @@ void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr,
|
|||||||
tran_low_t *qcoeff_ptr,
|
tran_low_t *qcoeff_ptr,
|
||||||
tran_low_t *dqcoeff_ptr,
|
tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_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)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||||
@@ -302,13 +297,11 @@ void vp9_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t *quant_ptr, const int16_t *quant_shift_ptr,
|
const int16_t *quant_ptr, const int16_t *quant_shift_ptr,
|
||||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan, const int16_t *iscan) {
|
const int16_t *scan, const int16_t *iscan) {
|
||||||
int i, non_zero_count = (int)n_coeffs, eob = -1;
|
int i, non_zero_count = (int)n_coeffs, eob = -1;
|
||||||
const int zbins[2] = { zbin_ptr[0] + zbin_oq_value,
|
const int zbins[2] = {zbin_ptr[0], zbin_ptr[1]};
|
||||||
zbin_ptr[1] + zbin_oq_value };
|
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||||
const int nzbins[2] = { zbins[0] * -1,
|
|
||||||
zbins[1] * -1 };
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||||
@@ -355,14 +348,12 @@ void vp9_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t *round_ptr, const int16_t *quant_ptr,
|
const int16_t *round_ptr, const int16_t *quant_ptr,
|
||||||
const int16_t *quant_shift_ptr,
|
const int16_t *quant_shift_ptr,
|
||||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr, int zbin_oq_value,
|
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, non_zero_count = (int)n_coeffs, eob = -1;
|
int i, non_zero_count = (int)n_coeffs, eob = -1;
|
||||||
const int zbins[2] = { zbin_ptr[0] + zbin_oq_value,
|
const int zbins[2] = {zbin_ptr[0], zbin_ptr[1]};
|
||||||
zbin_ptr[1] + zbin_oq_value };
|
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||||
const int nzbins[2] = { zbins[0] * -1,
|
|
||||||
zbins[1] * -1 };
|
|
||||||
(void)iscan;
|
(void)iscan;
|
||||||
|
|
||||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||||
@@ -412,10 +403,10 @@ void vp9_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t *quant_shift_ptr,
|
const int16_t *quant_shift_ptr,
|
||||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan, const int16_t *iscan) {
|
const int16_t *scan, const int16_t *iscan) {
|
||||||
const int zbins[2] = { ROUND_POWER_OF_TWO(zbin_ptr[0] + zbin_oq_value, 1),
|
const int zbins[2] = {ROUND_POWER_OF_TWO(zbin_ptr[0], 1),
|
||||||
ROUND_POWER_OF_TWO(zbin_ptr[1] + zbin_oq_value, 1) };
|
ROUND_POWER_OF_TWO(zbin_ptr[1], 1)};
|
||||||
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
@@ -471,10 +462,10 @@ void vp9_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr,
|
|||||||
tran_low_t *qcoeff_ptr,
|
tran_low_t *qcoeff_ptr,
|
||||||
tran_low_t *dqcoeff_ptr,
|
tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan, const int16_t *iscan) {
|
const int16_t *scan, const int16_t *iscan) {
|
||||||
const int zbins[2] = { ROUND_POWER_OF_TWO(zbin_ptr[0] + zbin_oq_value, 1),
|
const int zbins[2] = {ROUND_POWER_OF_TWO(zbin_ptr[0], 1),
|
||||||
ROUND_POWER_OF_TWO(zbin_ptr[1] + zbin_oq_value, 1) };
|
ROUND_POWER_OF_TWO(zbin_ptr[1], 1)};
|
||||||
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
@@ -534,7 +525,7 @@ void vp9_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block,
|
|||||||
p->zbin, p->round, p->quant, p->quant_shift,
|
p->zbin, p->round, p->quant, p->quant_shift,
|
||||||
BLOCK_OFFSET(p->qcoeff, block),
|
BLOCK_OFFSET(p->qcoeff, block),
|
||||||
BLOCK_OFFSET(pd->dqcoeff, block),
|
BLOCK_OFFSET(pd->dqcoeff, block),
|
||||||
pd->dequant, p->zbin_extra, &p->eobs[block],
|
pd->dequant, &p->eobs[block],
|
||||||
scan, iscan);
|
scan, iscan);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -544,7 +535,7 @@ void vp9_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block,
|
|||||||
p->zbin, p->round, p->quant, p->quant_shift,
|
p->zbin, p->round, p->quant, p->quant_shift,
|
||||||
BLOCK_OFFSET(p->qcoeff, block),
|
BLOCK_OFFSET(p->qcoeff, block),
|
||||||
BLOCK_OFFSET(pd->dqcoeff, block),
|
BLOCK_OFFSET(pd->dqcoeff, block),
|
||||||
pd->dequant, p->zbin_extra, &p->eobs[block], scan, iscan);
|
pd->dequant, &p->eobs[block], scan, iscan);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void invert_quant(int16_t *quant, int16_t *shift, int d) {
|
static void invert_quant(int16_t *quant, int16_t *shift, int d) {
|
||||||
@@ -641,8 +632,6 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
|
|||||||
const int segment_id = xd->mi[0].src_mi->mbmi.segment_id;
|
const int segment_id = xd->mi[0].src_mi->mbmi.segment_id;
|
||||||
const int qindex = vp9_get_qindex(&cm->seg, segment_id, cm->base_qindex);
|
const int qindex = vp9_get_qindex(&cm->seg, segment_id, cm->base_qindex);
|
||||||
const int rdmult = vp9_compute_rd_mult(cpi, qindex + cm->y_dc_delta_q);
|
const int rdmult = vp9_compute_rd_mult(cpi, qindex + cm->y_dc_delta_q);
|
||||||
// TODO(paulwilkins): 0 value for zbin for now pending follow on patch.
|
|
||||||
const int zbin = 0;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// Y
|
// Y
|
||||||
@@ -652,13 +641,10 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
|
|||||||
x->plane[0].quant_shift = quants->y_quant_shift[qindex];
|
x->plane[0].quant_shift = quants->y_quant_shift[qindex];
|
||||||
x->plane[0].zbin = quants->y_zbin[qindex];
|
x->plane[0].zbin = quants->y_zbin[qindex];
|
||||||
x->plane[0].round = quants->y_round[qindex];
|
x->plane[0].round = quants->y_round[qindex];
|
||||||
x->plane[0].zbin_extra = (int16_t)((cm->y_dequant[qindex][1] * zbin) >> 7);
|
|
||||||
xd->plane[0].dequant = cm->y_dequant[qindex];
|
xd->plane[0].dequant = cm->y_dequant[qindex];
|
||||||
|
|
||||||
x->plane[0].quant_thred[0] = (x->plane[0].zbin[0] + x->plane[0].zbin_extra) *
|
x->plane[0].quant_thred[0] = x->plane[0].zbin[0] * x->plane[0].zbin[0];
|
||||||
(x->plane[0].zbin[0] + x->plane[0].zbin_extra);
|
x->plane[0].quant_thred[1] = x->plane[0].zbin[1] * x->plane[0].zbin[1];
|
||||||
x->plane[0].quant_thred[1] = (x->plane[0].zbin[1] + x->plane[0].zbin_extra) *
|
|
||||||
(x->plane[0].zbin[1] + x->plane[0].zbin_extra);
|
|
||||||
|
|
||||||
// UV
|
// UV
|
||||||
for (i = 1; i < 3; i++) {
|
for (i = 1; i < 3; i++) {
|
||||||
@@ -668,15 +654,10 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
|
|||||||
x->plane[i].quant_shift = quants->uv_quant_shift[qindex];
|
x->plane[i].quant_shift = quants->uv_quant_shift[qindex];
|
||||||
x->plane[i].zbin = quants->uv_zbin[qindex];
|
x->plane[i].zbin = quants->uv_zbin[qindex];
|
||||||
x->plane[i].round = quants->uv_round[qindex];
|
x->plane[i].round = quants->uv_round[qindex];
|
||||||
x->plane[i].zbin_extra = (int16_t)((cm->uv_dequant[qindex][1] * zbin) >> 7);
|
|
||||||
xd->plane[i].dequant = cm->uv_dequant[qindex];
|
xd->plane[i].dequant = cm->uv_dequant[qindex];
|
||||||
|
|
||||||
x->plane[i].quant_thred[0] =
|
x->plane[i].quant_thred[0] = x->plane[i].zbin[0] * x->plane[i].zbin[0];
|
||||||
(x->plane[i].zbin[0] + x->plane[i].zbin_extra) *
|
x->plane[i].quant_thred[1] = x->plane[i].zbin[1] * x->plane[i].zbin[1];
|
||||||
(x->plane[i].zbin[0] + x->plane[i].zbin_extra);
|
|
||||||
x->plane[i].quant_thred[1] =
|
|
||||||
(x->plane[i].zbin[1] + x->plane[i].zbin_extra) *
|
|
||||||
(x->plane[i].zbin[1] + x->plane[i].zbin_extra);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x->skip_block = vp9_segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP);
|
x->skip_block = vp9_segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP);
|
||||||
@@ -688,15 +669,6 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
|
|||||||
vp9_initialize_me_consts(cpi, x->q_index);
|
vp9_initialize_me_consts(cpi, x->q_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp9_update_zbin_extra(MACROBLOCK *x) {
|
|
||||||
const int y_zbin_extra = 0;
|
|
||||||
const int uv_zbin_extra = 0;
|
|
||||||
|
|
||||||
x->plane[0].zbin_extra = (int16_t)y_zbin_extra;
|
|
||||||
x->plane[1].zbin_extra = (int16_t)uv_zbin_extra;
|
|
||||||
x->plane[2].zbin_extra = (int16_t)uv_zbin_extra;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vp9_frame_init_quantizer(VP9_COMP *cpi) {
|
void vp9_frame_init_quantizer(VP9_COMP *cpi) {
|
||||||
vp9_init_plane_quantizers(cpi, &cpi->td.mb);
|
vp9_init_plane_quantizers(cpi, &cpi->td.mb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ struct VP9Common;
|
|||||||
|
|
||||||
void vp9_frame_init_quantizer(struct VP9_COMP *cpi);
|
void vp9_frame_init_quantizer(struct VP9_COMP *cpi);
|
||||||
|
|
||||||
void vp9_update_zbin_extra(MACROBLOCK *x);
|
|
||||||
|
|
||||||
void vp9_init_plane_quantizers(struct VP9_COMP *cpi, MACROBLOCK *x);
|
void vp9_init_plane_quantizers(struct VP9_COMP *cpi, MACROBLOCK *x);
|
||||||
|
|
||||||
void vp9_init_quantizer(struct VP9_COMP *cpi);
|
void vp9_init_quantizer(struct VP9_COMP *cpi);
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ void vp9_fdct8x8_quant_sse2(const int16_t *input, int stride,
|
|||||||
const int16_t* round_ptr, const int16_t* quant_ptr,
|
const int16_t* round_ptr, const int16_t* quant_ptr,
|
||||||
const int16_t* quant_shift_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,
|
||||||
int zbin_oq_value, uint16_t* eob_ptr,
|
uint16_t* eob_ptr,
|
||||||
const int16_t* scan_ptr,
|
const int16_t* scan_ptr,
|
||||||
const int16_t* iscan_ptr) {
|
const int16_t* iscan_ptr) {
|
||||||
__m128i zero;
|
__m128i zero;
|
||||||
@@ -287,7 +287,6 @@ void vp9_fdct8x8_quant_sse2(const int16_t *input, int stride,
|
|||||||
(void)scan_ptr;
|
(void)scan_ptr;
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)coeff_ptr;
|
(void)coeff_ptr;
|
||||||
|
|
||||||
// Pre-condition input (shift by two)
|
// Pre-condition input (shift by two)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride,
|
|||||||
const int16_t* quant_shift_ptr,
|
const int16_t* quant_shift_ptr,
|
||||||
int16_t* qcoeff_ptr,
|
int16_t* qcoeff_ptr,
|
||||||
int16_t* dqcoeff_ptr, const int16_t* dequant_ptr,
|
int16_t* dqcoeff_ptr, const int16_t* dequant_ptr,
|
||||||
int zbin_oq_value, uint16_t* eob_ptr,
|
uint16_t* eob_ptr,
|
||||||
const int16_t* scan_ptr,
|
const int16_t* scan_ptr,
|
||||||
const int16_t* iscan_ptr) {
|
const int16_t* iscan_ptr) {
|
||||||
__m128i zero;
|
__m128i zero;
|
||||||
@@ -57,7 +57,6 @@ void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride,
|
|||||||
(void)scan_ptr;
|
(void)scan_ptr;
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
(void)coeff_ptr;
|
(void)coeff_ptr;
|
||||||
|
|
||||||
// Pre-condition input (shift by two)
|
// Pre-condition input (shift by two)
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ void vp9_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr,
|
|||||||
tran_low_t *qcoeff_ptr,
|
tran_low_t *qcoeff_ptr,
|
||||||
tran_low_t *dqcoeff_ptr,
|
tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value,
|
|
||||||
uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan,
|
const int16_t *scan,
|
||||||
const int16_t *iscan) {
|
const int16_t *iscan) {
|
||||||
@@ -32,11 +31,11 @@ void vp9_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr,
|
|||||||
__m128i zbins[2];
|
__m128i zbins[2];
|
||||||
__m128i nzbins[2];
|
__m128i nzbins[2];
|
||||||
|
|
||||||
zbins[0] = _mm_set_epi32((int)(zbin_ptr[1] + zbin_oq_value),
|
zbins[0] = _mm_set_epi32((int)zbin_ptr[1],
|
||||||
(int)(zbin_ptr[1] + zbin_oq_value),
|
(int)zbin_ptr[1],
|
||||||
(int)(zbin_ptr[1] + zbin_oq_value),
|
(int)zbin_ptr[1],
|
||||||
(int)(zbin_ptr[0] + zbin_oq_value));
|
(int)zbin_ptr[0]);
|
||||||
zbins[1] = _mm_set1_epi32((int)(zbin_ptr[1] + zbin_oq_value));
|
zbins[1] = _mm_set1_epi32((int)zbin_ptr[1]);
|
||||||
|
|
||||||
nzbins[0] = _mm_setzero_si128();
|
nzbins[0] = _mm_setzero_si128();
|
||||||
nzbins[1] = _mm_setzero_si128();
|
nzbins[1] = _mm_setzero_si128();
|
||||||
@@ -111,7 +110,6 @@ void vp9_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr,
|
|||||||
tran_low_t *qcoeff_ptr,
|
tran_low_t *qcoeff_ptr,
|
||||||
tran_low_t *dqcoeff_ptr,
|
tran_low_t *dqcoeff_ptr,
|
||||||
const int16_t *dequant_ptr,
|
const int16_t *dequant_ptr,
|
||||||
int zbin_oq_value,
|
|
||||||
uint16_t *eob_ptr,
|
uint16_t *eob_ptr,
|
||||||
const int16_t *scan,
|
const int16_t *scan,
|
||||||
const int16_t *iscan) {
|
const int16_t *iscan) {
|
||||||
@@ -120,14 +118,14 @@ void vp9_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr,
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
int idx_arr[1024];
|
int idx_arr[1024];
|
||||||
int i, eob = -1;
|
int i, eob = -1;
|
||||||
const int zbin0_tmp = ROUND_POWER_OF_TWO(zbin_ptr[0] + zbin_oq_value, 1);
|
const int zbin0_tmp = ROUND_POWER_OF_TWO(zbin_ptr[0], 1);
|
||||||
const int zbin1_tmp = ROUND_POWER_OF_TWO(zbin_ptr[1] + zbin_oq_value, 1);
|
const int zbin1_tmp = ROUND_POWER_OF_TWO(zbin_ptr[1], 1);
|
||||||
(void)scan;
|
(void)scan;
|
||||||
zbins[0] = _mm_set_epi32((zbin1_tmp + zbin_oq_value),
|
zbins[0] = _mm_set_epi32(zbin1_tmp,
|
||||||
(zbin1_tmp + zbin_oq_value),
|
zbin1_tmp,
|
||||||
(zbin1_tmp + zbin_oq_value),
|
zbin1_tmp,
|
||||||
(zbin0_tmp + zbin_oq_value));
|
zbin0_tmp);
|
||||||
zbins[1] = _mm_set1_epi32((zbin1_tmp + zbin_oq_value));
|
zbins[1] = _mm_set1_epi32(zbin1_tmp);
|
||||||
|
|
||||||
nzbins[0] = _mm_setzero_si128();
|
nzbins[0] = _mm_setzero_si128();
|
||||||
nzbins[1] = _mm_setzero_si128();
|
nzbins[1] = _mm_setzero_si128();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ void vp9_quantize_b_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t* round_ptr, const int16_t* quant_ptr,
|
const int16_t* round_ptr, const int16_t* quant_ptr,
|
||||||
const int16_t* quant_shift_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,
|
||||||
int zbin_oq_value, uint16_t* eob_ptr,
|
uint16_t* eob_ptr,
|
||||||
const int16_t* scan_ptr,
|
const int16_t* scan_ptr,
|
||||||
const int16_t* iscan_ptr) {
|
const int16_t* iscan_ptr) {
|
||||||
__m128i zero;
|
__m128i zero;
|
||||||
@@ -39,13 +39,10 @@ void vp9_quantize_b_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
|
|||||||
|
|
||||||
// Setup global values
|
// Setup global values
|
||||||
{
|
{
|
||||||
__m128i zbin_oq;
|
|
||||||
__m128i pw_1;
|
__m128i pw_1;
|
||||||
zbin_oq = _mm_set1_epi16(zbin_oq_value);
|
|
||||||
zbin = _mm_load_si128((const __m128i*)zbin_ptr);
|
zbin = _mm_load_si128((const __m128i*)zbin_ptr);
|
||||||
round = _mm_load_si128((const __m128i*)round_ptr);
|
round = _mm_load_si128((const __m128i*)round_ptr);
|
||||||
quant = _mm_load_si128((const __m128i*)quant_ptr);
|
quant = _mm_load_si128((const __m128i*)quant_ptr);
|
||||||
zbin = _mm_add_epi16(zbin, zbin_oq);
|
|
||||||
pw_1 = _mm_set1_epi16(1);
|
pw_1 = _mm_set1_epi16(1);
|
||||||
zbin = _mm_sub_epi16(zbin, pw_1);
|
zbin = _mm_sub_epi16(zbin, pw_1);
|
||||||
dequant = _mm_load_si128((const __m128i*)dequant_ptr);
|
dequant = _mm_load_si128((const __m128i*)dequant_ptr);
|
||||||
@@ -229,14 +226,13 @@ void vp9_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
|
|||||||
const int16_t* round_ptr, const int16_t* quant_ptr,
|
const int16_t* round_ptr, const int16_t* quant_ptr,
|
||||||
const int16_t* quant_shift_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,
|
||||||
int zbin_oq_value, uint16_t* eob_ptr,
|
uint16_t* eob_ptr,
|
||||||
const int16_t* scan_ptr,
|
const int16_t* scan_ptr,
|
||||||
const int16_t* iscan_ptr) {
|
const int16_t* iscan_ptr) {
|
||||||
__m128i zero;
|
__m128i zero;
|
||||||
(void)scan_ptr;
|
(void)scan_ptr;
|
||||||
(void)zbin_ptr;
|
(void)zbin_ptr;
|
||||||
(void)quant_shift_ptr;
|
(void)quant_shift_ptr;
|
||||||
(void)zbin_oq_value;
|
|
||||||
|
|
||||||
coeff_ptr += n_coeffs;
|
coeff_ptr += n_coeffs;
|
||||||
iscan_ptr += n_coeffs;
|
iscan_ptr += n_coeffs;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ SECTION .text
|
|||||||
|
|
||||||
%macro QUANTIZE_FN 2
|
%macro QUANTIZE_FN 2
|
||||||
cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
|
cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
|
||||||
shift, qcoeff, dqcoeff, dequant, zbin_oq, \
|
shift, qcoeff, dqcoeff, dequant, \
|
||||||
eob, scan, iscan
|
eob, scan, iscan
|
||||||
cmp dword skipm, 0
|
cmp dword skipm, 0
|
||||||
jne .blank
|
jne .blank
|
||||||
@@ -29,13 +29,9 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
|
|||||||
movifnidn zbinq, zbinmp
|
movifnidn zbinq, zbinmp
|
||||||
movifnidn roundq, roundmp
|
movifnidn roundq, roundmp
|
||||||
movifnidn quantq, quantmp
|
movifnidn quantq, quantmp
|
||||||
movd m4, dword zbin_oqm ; m4 = zbin_oq
|
|
||||||
mova m0, [zbinq] ; m0 = zbin
|
mova m0, [zbinq] ; m0 = zbin
|
||||||
punpcklwd m4, m4
|
|
||||||
mova m1, [roundq] ; m1 = round
|
mova m1, [roundq] ; m1 = round
|
||||||
pshufd m4, m4, 0
|
|
||||||
mova m2, [quantq] ; m2 = quant
|
mova m2, [quantq] ; m2 = quant
|
||||||
paddw m0, m4 ; m0 = zbin + zbin_oq
|
|
||||||
%ifidn %1, b_32x32
|
%ifidn %1, b_32x32
|
||||||
pcmpeqw m5, m5
|
pcmpeqw m5, m5
|
||||||
psrlw m5, 15
|
psrlw m5, 15
|
||||||
@@ -55,7 +51,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
|
|||||||
psllw m4, 1
|
psllw m4, 1
|
||||||
%endif
|
%endif
|
||||||
pxor m5, m5 ; m5 = dedicated zero
|
pxor m5, m5 ; m5 = dedicated zero
|
||||||
DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, d6, eob
|
DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, eob
|
||||||
lea coeffq, [ coeffq+ncoeffq*2]
|
lea coeffq, [ coeffq+ncoeffq*2]
|
||||||
lea iscanq, [ iscanq+ncoeffq*2]
|
lea iscanq, [ iscanq+ncoeffq*2]
|
||||||
lea qcoeffq, [ qcoeffq+ncoeffq*2]
|
lea qcoeffq, [ qcoeffq+ncoeffq*2]
|
||||||
@@ -220,7 +216,7 @@ QUANTIZE_FN b_32x32, 7
|
|||||||
|
|
||||||
%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, zbin, round, quant, \
|
||||||
shift, qcoeff, dqcoeff, dequant, zbin_oq, \
|
shift, qcoeff, dqcoeff, dequant, \
|
||||||
eob, scan, iscan
|
eob, scan, iscan
|
||||||
cmp dword skipm, 0
|
cmp dword skipm, 0
|
||||||
jne .blank
|
jne .blank
|
||||||
@@ -248,7 +244,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
|
|||||||
psllw m2, 1
|
psllw m2, 1
|
||||||
%endif
|
%endif
|
||||||
pxor m5, m5 ; m5 = dedicated zero
|
pxor m5, m5 ; m5 = dedicated zero
|
||||||
DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, d6, eob
|
DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, eob
|
||||||
lea coeffq, [ coeffq+ncoeffq*2]
|
lea coeffq, [ coeffq+ncoeffq*2]
|
||||||
lea iscanq, [ iscanq+ncoeffq*2]
|
lea iscanq, [ iscanq+ncoeffq*2]
|
||||||
lea qcoeffq, [ qcoeffq+ncoeffq*2]
|
lea qcoeffq, [ qcoeffq+ncoeffq*2]
|
||||||
|
|||||||
Reference in New Issue
Block a user