From 8c5ac79e66619f51b1d6830b26c394ec54871356 Mon Sep 17 00:00:00 2001 From: Deb Mukherjee Date: Thu, 19 Mar 2015 20:32:07 -0700 Subject: [PATCH] Some build fixes with highbitdepth and new quant Highbitdepth performance about the same as 8-bit. Change-Id: If737962d8588dd190083edae4383b731f9d22873 --- vp9/common/vp9_rtcd_defs.pl | 30 +++++++++++++++--------------- vp9/decoder/vp9_decodeframe.c | 5 ++++- vp9/encoder/vp9_quantize.c | 2 -- vp9/encoder/vp9_rdopt.c | 2 +- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/vp9/common/vp9_rtcd_defs.pl b/vp9/common/vp9_rtcd_defs.pl index c9648d968..5e46e4de9 100644 --- a/vp9/common/vp9_rtcd_defs.pl +++ b/vp9/common/vp9_rtcd_defs.pl @@ -2153,27 +2153,27 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") { add_proto qw/void vp9_highbd_quantize_b_64x64/, "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_64x64/; + } - if (vpx_config("CONFIG_NEW_QUANT") eq "yes") { - add_proto qw/void vp9_highbd_quantize_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; - specialize qw/vp9_highbd_quantize_nuq/; + if (vpx_config("CONFIG_NEW_QUANT") eq "yes") { + add_proto qw/void vp9_highbd_quantize_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; + specialize qw/vp9_highbd_quantize_nuq/; - add_proto qw/void vp9_highbd_quantize_fp_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; - specialize qw/vp9_highbd_quantize_fp_nuq/; + add_proto qw/void vp9_highbd_quantize_fp_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; + specialize qw/vp9_highbd_quantize_fp_nuq/; - add_proto qw/void vp9_highbd_quantize_32x32_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; - specialize qw/vp9_highbd_quantize_32x32_nuq/; + add_proto qw/void vp9_highbd_quantize_32x32_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; + specialize qw/vp9_highbd_quantize_32x32_nuq/; - add_proto qw/void vp9_highbd_quantize_32x32_fp_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; - specialize qw/vp9_highbd_quantize_32x32_fp_nuq/; + add_proto qw/void vp9_highbd_quantize_32x32_fp_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; + specialize qw/vp9_highbd_quantize_32x32_fp_nuq/; - if (vpx_config("CONFIG_TX64X64") eq "yes") { - add_proto qw/void vp9_highbd_quantize_64x64_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; - specialize qw/vp9_highbd_quantize_64x64_nuq/; + if (vpx_config("CONFIG_TX64X64") eq "yes") { + add_proto qw/void vp9_highbd_quantize_64x64_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; + specialize qw/vp9_highbd_quantize_64x64_nuq/; - add_proto qw/void vp9_highbd_quantize_64x64_fp_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; - specialize qw/vp9_highbd_quantize_64x64_fp_nuq/; - } + add_proto qw/void vp9_highbd_quantize_64x64_fp_nuq/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *quant_ptr, const int16_t *dequant_ptr, const cumbins_type_nuq *cumbins_ptr, const dequant_val_type_nuq *dequant_val, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const int16_t *scan, const uint8_t *band"; + specialize qw/vp9_highbd_quantize_64x64_fp_nuq/; } } diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 7dc9708ce..715f7025f 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -300,6 +300,7 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block, int shift = mbmi->tx_skip_shift; PREDICTION_MODE mode = (plane == 0) ? get_y_mode(xd->mi[0].src_mi, block): mbmi->uv_mode; + (void) mode; #endif if (eob > 0) { TX_TYPE tx_type = DCT_DCT; @@ -462,7 +463,9 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block, } } } -#else + +#else // CONFIG_VP9_HIGHBITDEPTH + #if CONFIG_TX_SKIP if (xd->lossless && !mbmi->tx_skip[plane != 0]) { #else diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c index 1f12c56f2..b878433ef 100644 --- a/vp9/encoder/vp9_quantize.c +++ b/vp9/encoder/vp9_quantize.c @@ -958,7 +958,6 @@ void vp9_highbd_quantize_nuq_c(const tran_low_t *coeff_ptr, const int16_t *scan, const uint8_t *band) { int eob = -1; - (void)iscan; vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr)); if (!skip_block) { @@ -992,7 +991,6 @@ void vp9_highbd_quantize_fp_nuq_c(const tran_low_t *coeff_ptr, const int16_t *scan, const uint8_t *band) { int eob = -1; - (void)iscan; vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr)); if (!skip_block) { diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 1d446993e..f92510b34 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -4039,7 +4039,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, #else if (this_mode == NEWMV) { #endif - int rate_mv; + int rate_mv = 0; if (is_comp_pred) { #if CONFIG_COMPOUND_MODES if (this_mode == NEW_NEWMV) { -- 2.49.0