diff options
author | Hui Su <huisu@google.com> | 2018-10-12 10:59:48 -0700 |
---|---|---|
committer | Hui Su <huisu@google.com> | 2018-10-12 15:19:59 -0700 |
commit | d4666ac7d2e30d18de740d5801765b3833f23f90 (patch) | |
tree | 75956ae1655db4169edb73689feb7648d8083cf8 /vp9/encoder | |
parent | d8c59e0206279499646c3ccd2c5a6e6fe36f6fc4 (diff) | |
download | libvpx-d4666ac7d2e30d18de740d5801765b3833f23f90.tar libvpx-d4666ac7d2e30d18de740d5801765b3833f23f90.tar.gz libvpx-d4666ac7d2e30d18de740d5801765b3833f23f90.tar.bz2 libvpx-d4666ac7d2e30d18de740d5801765b3833f23f90.zip |
Turn on ml_var_partition_pruning for HBD
This affects speed 0 and 1 only.
Tested on lowres_bd10(480p) and midres_bd10(720p),
speed 0 speed 1
coding loss: 0.07% 0.10%
encoder speedup: 14% 6.5%
Change-Id: I5812400d8c7393321b7284d3fca06026842390b5
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 72dc13797..f20182faa 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -3404,7 +3404,15 @@ static void ml_predict_var_rd_paritioning(VP9_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd = &x->e_mbd; MODE_INFO *mi = xd->mi[0]; const NN_CONFIG *nn_config = NULL; - DECLARE_ALIGNED(16, uint8_t, pred_buf[64 * 64]); +#if CONFIG_VP9_HIGHBITDEPTH + DECLARE_ALIGNED(16, uint8_t, pred_buffer[64 * 64 * 2]); + uint8_t *const pred_buf = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) + ? (CONVERT_TO_BYTEPTR(pred_buffer)) + : pred_buffer; +#else + DECLARE_ALIGNED(16, uint8_t, pred_buffer[64 * 64]); + uint8_t *const pred_buf = pred_buffer; +#endif // CONFIG_VP9_HIGHBITDEPTH const int speed = cpi->oxcf.speed; int i; float thresh = 0.0f; @@ -3475,7 +3483,12 @@ static void ml_predict_var_rd_paritioning(VP9_COMP *cpi, MACROBLOCK *x, { float features[FEATURES] = { 0.0f }; +#if CONFIG_VP9_HIGHBITDEPTH + const int dc_q = + vp9_dc_quant(cm->base_qindex, 0, cm->bit_depth) >> (xd->bd - 8); +#else const int dc_q = vp9_dc_quant(cm->base_qindex, 0, cm->bit_depth); +#endif // CONFIG_VP9_HIGHBITDEPTH int feature_idx = 0; float score; @@ -3758,14 +3771,10 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td, pc_tree->partitioning = PARTITION_NONE; if (cpi->sf.ml_var_partition_pruning) { - int do_ml_var_partition_pruning = + const int do_ml_var_partition_pruning = !frame_is_intra_only(cm) && partition_none_allowed && do_split && mi_row + num_8x8_blocks_high_lookup[bsize] <= cm->mi_rows && mi_col + num_8x8_blocks_wide_lookup[bsize] <= cm->mi_cols; -#if CONFIG_VP9_HIGHBITDEPTH - if (x->e_mbd.cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) - do_ml_var_partition_pruning = 0; -#endif // CONFIG_VP9_HIGHBITDEPTH if (do_ml_var_partition_pruning) { ml_predict_var_rd_paritioning(cpi, x, bsize, mi_row, mi_col, &partition_none_allowed, &do_split); |