]> granicus.if.org Git - libvpx/commitdiff
Remove the resetting of qp params for temporal layers.
authorMarco Paniconi <marpan@google.com>
Sat, 28 Jul 2012 00:24:29 +0000 (17:24 -0700)
committerMarco Paniconi <marpan@google.com>
Sat, 28 Jul 2012 00:27:32 +0000 (17:27 -0700)
The ambient qp and active worse/best qp were reset for every frame
when temporal layers is on. This change removes this reset.

As this affects the target size for forced key frames
(it will actually lower the size somewhat), we increased the
inital boost factor to compensate.

Change-Id: Ie38d95f5c99ab3d447469c49e2177bc3fcc4ad28

vp8/encoder/onyx_if.c
vp8/encoder/ratectrl.c

index d50076d3b871116ed8667002ca740a97c360f170..6eefacbf56b2f4467323c3417c5e05132f3803dd 100644 (file)
@@ -1364,10 +1364,6 @@ static void update_layer_contexts (VP8_COMP *cpi)
                     oxcf->target_bitrate[i-1]) * 1000 /
                     (lc->frame_rate - prev_layer_frame_rate);
 
-            lc->active_worst_quality         = oxcf->worst_allowed_q;
-            lc->active_best_quality          = oxcf->best_allowed_q;
-            lc->avg_frame_qindex             = oxcf->worst_allowed_q;
-
             prev_layer_frame_rate = lc->frame_rate;
         }
     }
index 05e152ebecb02dc80a7ef04fd09b015f402ecd76..e1c8c4eb7178ebcbbf7bd36ca1734ad88431aca1 100644 (file)
@@ -388,13 +388,13 @@ static void calc_iframe_target_size(VP8_COMP *cpi)
         int Q = (cpi->common.frame_flags & FRAMEFLAGS_KEY)
                 ? cpi->avg_frame_qindex : cpi->ni_av_qi;
 
-        int initial_boost = 24; /* |2.5 * per_frame_bandwidth| */
+        int initial_boost = 32; /* |3.0 * per_frame_bandwidth| */
         /* Boost depends somewhat on frame rate: only used for 1 layer case. */
         if (cpi->oxcf.number_of_layers == 1) {
           kf_boost = MAX(initial_boost, (int)(2 * cpi->output_frame_rate - 16));
         }
         else {
-          /* Initial factor: set target size to: |2.5 * per_frame_bandwidth|. */
+          /* Initial factor: set target size to: |3.0 * per_frame_bandwidth|. */
           kf_boost = initial_boost;
         }