]> granicus.if.org Git - libvpx/commitdiff
Adjust lambda with bsize in build_motion_field()
authorAngie Chiang <angiebird@google.com>
Fri, 11 Jan 2019 03:35:10 +0000 (19:35 -0800)
committerAngie Chiang <angiebird@google.com>
Fri, 11 Jan 2019 03:35:10 +0000 (19:35 -0800)
Change-Id: I34cdbc6e8625c0de8595860af02ca277c3448a19

vp9/encoder/vp9_encoder.c

index c2a61eea70c93701e3f7c2589edcd4a69de0415c..557e2b009a544b8f5cc253189470c7380d4733a8 100644 (file)
@@ -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) {