From: Angie Chiang Date: Fri, 11 Jan 2019 03:35:10 +0000 (-0800) Subject: Adjust lambda with bsize in build_motion_field() X-Git-Tag: v1.8.1~303^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9525a59f21905760f40d117e7d78dd56b8cc80b0;p=libvpx Adjust lambda with bsize in build_motion_field() Change-Id: I34cdbc6e8625c0de8595860af02ca277c3448a19 --- 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) {