shithub: libvpx

Download patch

ref: 9525a59f21905760f40d117e7d78dd56b8cc80b0
parent: f33045f6b11f153475b02f6389f77e8974a2d769
author: Angie Chiang <angiebird@google.com>
date: Thu Jan 10 14:35:10 EST 2019

Adjust lambda with bsize in build_motion_field()

Change-Id: I34cdbc6e8625c0de8595860af02ca277c3448a19

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6165,11 +6165,13 @@
   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) {