From 2bc3d47dd1fb65bd718116b4afb607c961a06872 Mon Sep 17 00:00:00 2001 From: Hui Su Date: Tue, 16 Oct 2018 09:50:13 -0700 Subject: [PATCH] Fix a bug in ml_prune_rect_partition() The quantization step size should be scaled properly for high bit depth settings. This only affects speed 0. Encoder speed change is almost neutral. There is a small coding gain of 0.09%. Change-Id: I96b2bae03a53ce8ccd6428e3a050cfe18e06a024 --- vp9/encoder/vp9_encodeframe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index ba1d71bf7..9864de075 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -3288,7 +3288,12 @@ static void ml_prune_rect_partition(VP9_COMP *const cpi, MACROBLOCK *const x, { const int64_t none_rdcost = pc_tree->none.rdcost; const VP9_COMMON *const cm = &cpi->common; +#if CONFIG_VP9_HIGHBITDEPTH + const int dc_q = + vp9_dc_quant(cm->base_qindex, 0, cm->bit_depth) >> (x->e_mbd.bd - 8); +#else const int dc_q = vp9_dc_quant(cm->base_qindex, 0, cm->bit_depth); +#endif // CONFIG_VP9_HIGHBITDEPTH int feature_index = 0; unsigned int block_var = 0; unsigned int sub_block_var[4] = { 0 }; -- 2.40.0