shithub: libvpx

Download patch

ref: 2823cc4d0dbd9a0fb74b2943ebb0a4831b6b3e86
parent: b7d9113ea0b716293d617884859862e1e0039e7c
parent: cc3444f01c448f1cf6acdd283d65e7ec5d0a9fdd
author: Paul Wilkins <paulwilkins@google.com>
date: Wed Mar 10 09:35:53 EST 2021

Merge "Vizier: Add defaults for > 1080P"

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -3567,7 +3567,7 @@
       twopass->kf_frame_max_boost_subs = twopass->kf_frame_max_boost_first;
       twopass->kf_max_total_boost = MAX_KF_TOT_BOOST;
       twopass->zm_power_factor = 2.568627575572356;
-    } else if (screen_area <= 1920 * 1080) {
+    } else {
       twopass->active_wq_factor = 31.0;
       twopass->base_err_per_mb = 34474.723463367416;
       twopass->sr_default_decay_limit = 0.23346886902707745;
@@ -3579,18 +3579,6 @@
       twopass->kf_frame_max_boost_subs = twopass->kf_frame_max_boost_first;
       twopass->kf_max_total_boost = MAX_KF_TOT_BOOST;
       twopass->zm_power_factor = 5.5776463538431935;
-    } else {
-      twopass->active_wq_factor = AV_WQ_FACTOR;
-      twopass->base_err_per_mb = BASELINE_ERR_PER_MB;
-      twopass->sr_default_decay_limit = DEFAULT_DECAY_LIMIT;
-      twopass->sr_diff_part = SR_DIFF_PART;
-      twopass->gf_frame_max_boost = GF_MAX_FRAME_BOOST;
-      twopass->gf_max_total_boost = MAX_GF_BOOST;
-      twopass->kf_err_per_mb = 250.0;
-      twopass->kf_frame_max_boost_first = KF_MAX_FRAME_BOOST;
-      twopass->kf_frame_max_boost_subs = twopass->kf_frame_max_boost_first;
-      twopass->kf_max_total_boost = MAX_KF_TOT_BOOST;
-      twopass->zm_power_factor = ZM_POWER_FACTOR;
     }
   }
 }
--- a/vp9/encoder/vp9_rd.c
+++ b/vp9/encoder/vp9_rd.c
@@ -206,6 +206,7 @@
   // Make sure this function is floating point safe.
   vpx_clear_system_state();
 
+  rdc->rd_mult_q_sq_key_high_qp = 7.5;  // No defined Vizer values yet
   if (1) {
     // Non/pre-Vizer defaults
     rdc->rd_mult_q_sq_inter_low_qp = 4.0;
@@ -214,49 +215,48 @@
     rdc->rd_mult_q_sq_key_ultralow_qp = 4.0;
     rdc->rd_mult_q_sq_key_low_qp = 3.5;
     rdc->rd_mult_q_sq_key_mid_qp = 4.5;
-    rdc->rd_mult_q_sq_key_high_qp = 7.5;
   } else if (screen_area <= 176 * 144) {
-    rdc->rd_mult_q_sq_inter_high_qp = 4.295745965132044;
     rdc->rd_mult_q_sq_inter_low_qp = 4.0718581295922025;
     rdc->rd_mult_q_sq_inter_mid_qp = 4.031435609256739;
+    rdc->rd_mult_q_sq_inter_high_qp = 4.295745965132044;
+    rdc->rd_mult_q_sq_key_ultralow_qp = 4.290774097327333;
     rdc->rd_mult_q_sq_key_low_qp = 5.7037775720838155;
     rdc->rd_mult_q_sq_key_mid_qp = 4.72424015517201;
-    rdc->rd_mult_q_sq_key_ultralow_qp = 4.290774097327333;
   } else if (screen_area <= 320 * 240) {
-    rdc->rd_mult_q_sq_inter_high_qp = 4.388244213131458;
     rdc->rd_mult_q_sq_inter_low_qp = 4.506676356706102;
     rdc->rd_mult_q_sq_inter_mid_qp = 4.489349899621181;
+    rdc->rd_mult_q_sq_inter_high_qp = 4.388244213131458;
+    rdc->rd_mult_q_sq_key_ultralow_qp = 4.217074424696166;
     rdc->rd_mult_q_sq_key_low_qp = 4.497000582319771;
     rdc->rd_mult_q_sq_key_mid_qp = 4.2825894884789735;
-    rdc->rd_mult_q_sq_key_ultralow_qp = 4.217074424696166;
   } else if (screen_area <= 640 * 360) {
-    rdc->rd_mult_q_sq_inter_high_qp = 4.3702861603380025;
     rdc->rd_mult_q_sq_inter_low_qp = 4.730644123689013;
     rdc->rd_mult_q_sq_inter_mid_qp = 4.314589509578551;
+    rdc->rd_mult_q_sq_inter_high_qp = 4.3702861603380025;
+    rdc->rd_mult_q_sq_key_ultralow_qp = 4.576902541873747;
     rdc->rd_mult_q_sq_key_low_qp = 6.068652999601526;
     rdc->rd_mult_q_sq_key_mid_qp = 4.817707474077241;
-    rdc->rd_mult_q_sq_key_ultralow_qp = 4.576902541873747;
   } else if (screen_area <= 854 * 480) {
-    rdc->rd_mult_q_sq_inter_high_qp = 3.969083125219539;
     rdc->rd_mult_q_sq_inter_low_qp = 4.811470143416073;
     rdc->rd_mult_q_sq_inter_mid_qp = 4.621618127750201;
+    rdc->rd_mult_q_sq_inter_high_qp = 3.969083125219539;
+    rdc->rd_mult_q_sq_key_ultralow_qp = 4.9854544277222566;
     rdc->rd_mult_q_sq_key_low_qp = 5.073157238799473;
     rdc->rd_mult_q_sq_key_mid_qp = 5.7587672849242635;
-    rdc->rd_mult_q_sq_key_ultralow_qp = 4.9854544277222566;
   } else if (screen_area <= 1280 * 720) {
-    rdc->rd_mult_q_sq_inter_high_qp = 4.410712348825541;
     rdc->rd_mult_q_sq_inter_low_qp = 5.119381136011107;
     rdc->rd_mult_q_sq_inter_mid_qp = 4.518613675766538;
+    rdc->rd_mult_q_sq_inter_high_qp = 4.410712348825541;
+    rdc->rd_mult_q_sq_key_ultralow_qp = 3.9468491666607326;
     rdc->rd_mult_q_sq_key_low_qp = 5.848703119971484;
     rdc->rd_mult_q_sq_key_mid_qp = 5.368947246228739;
-    rdc->rd_mult_q_sq_key_ultralow_qp = 3.9468491666607326;
-  } else if (screen_area <= 1920 * 1080) {
-    rdc->rd_mult_q_sq_inter_high_qp = 3.2141187537667797;
+  } else {
     rdc->rd_mult_q_sq_inter_low_qp = 6.00569815296199;
     rdc->rd_mult_q_sq_inter_mid_qp = 3.932565684947023;
+    rdc->rd_mult_q_sq_inter_high_qp = 3.2141187537667797;
+    rdc->rd_mult_q_sq_key_ultralow_qp = 4.399795006320089;
     rdc->rd_mult_q_sq_key_low_qp = 10.582906599488298;
     rdc->rd_mult_q_sq_key_mid_qp = 6.274162346360692;
-    rdc->rd_mult_q_sq_key_ultralow_qp = 4.399795006320089;
   }
 }