]> granicus.if.org Git - libvpx/commitdiff
Fixes qindex for first frame in 1-pass cq/q modes
authorDeb Mukherjee <debargha@google.com>
Thu, 5 Jun 2014 19:29:44 +0000 (12:29 -0700)
committerDeb Mukherjee <debargha@google.com>
Thu, 5 Jun 2014 19:29:44 +0000 (12:29 -0700)
Produces sane qindex for the first frame in 1-pass constant and
constrained qualirty modes.

Change-Id: Ib2a5091df15a23489e9bb5534a2019cf2689755e

vp9/encoder/vp9_ratectrl.c

index 0163fd1e80d978aaaabc461db029a6a92dc9de20..e8e4256614f2b791eb139f3f07227ba4177c2ad8 100644 (file)
@@ -428,7 +428,6 @@ static int calc_active_worst_quality_one_pass_vbr(const VP9_COMP *cpi) {
                                              : rc->last_q[INTER_FRAME] * 2;
     }
   }
-
   return MIN(active_worst_quality, rc->worst_quality);
 }
 
@@ -639,7 +638,7 @@ static int rc_pick_q_and_bounds_one_pass_vbr(const VP9_COMP *cpi,
       int delta_qindex = vp9_compute_qdelta(rc, last_boosted_q,
                                             last_boosted_q * 0.75);
       active_best_quality = MAX(qindex + delta_qindex, rc->best_quality);
-    } else if (cm->current_video_frame > 0) {
+    } else {
       // not first frame of one pass and kf_boost is set
       double q_adj_factor = 1.0;
       double q_val;
@@ -982,7 +981,6 @@ int vp9_rc_pick_q_and_bounds(const VP9_COMP *cpi,
   } else {
     q = rc_pick_q_and_bounds_two_pass(cpi, bottom_index, top_index);
   }
-
   if (cpi->sf.use_nonrd_pick_mode) {
     if (cpi->sf.force_frame_boost == 1)
       q -= cpi->sf.max_delta_qindex;