From 9525a59f21905760f40d117e7d78dd56b8cc80b0 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Thu, 10 Jan 2019 19:35:10 -0800 Subject: [PATCH] Adjust lambda with bsize in build_motion_field() Change-Id: I34cdbc6e8625c0de8595860af02ca277c3448a19 --- vp9/encoder/vp9_encoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index c2a61eea7..557e2b009 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -6165,11 +6165,13 @@ static void build_motion_field(VP9_COMP *cpi, MACROBLOCKD *xd, int frame_idx, TplDepFrame *tpl_frame = &cpi->tpl_stats[frame_idx]; const int mi_height = num_8x8_blocks_high_lookup[bsize]; const int mi_width = num_8x8_blocks_wide_lookup[bsize]; + const int pw = num_4x4_blocks_wide_lookup[bsize] << 2; + const int ph = num_4x4_blocks_high_lookup[bsize] << 2; int fs_loc_sort_size; int fs_loc_heap_size; int mi_row, mi_col; - tpl_frame->lambda = 250; + tpl_frame->lambda = (pw * ph) / 4; fs_loc_sort_size = 0; for (mi_row = 0; mi_row < cm->mi_rows; mi_row += mi_height) { -- 2.40.0