shithub: libvpx

Download patch

ref: a5cb1b1ad59ec716806660d6699cd8db52c0652a
parent: 94bb09cab8a31cb28c265d509b24353c01263c9f
parent: 3977e64fc78e4d30bbbceaa0432a86c49a343e2b
author: Jim Bankoski <jimbankoski@google.com>
date: Thu Jan 16 03:21:03 EST 2014

Merge "don't dummy pack if we won't recode"

--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2707,14 +2707,16 @@
     // Dummy pack of the bitstream using up to date stats to get an
     // accurate estimate of output frame size to determine if we need
     // to recode.
-    vp9_save_coding_context(cpi);
-    cpi->dummy_packing = 1;
-    vp9_pack_bitstream(cpi, dest, size);
-    cpi->rc.projected_frame_size = (*size) << 3;
-    vp9_restore_coding_context(cpi);
+    if (cpi->sf.recode_loop != 0) {
+      vp9_save_coding_context(cpi);
+      cpi->dummy_packing = 1;
+      vp9_pack_bitstream(cpi, dest, size);
+      cpi->rc.projected_frame_size = (*size) << 3;
+      vp9_restore_coding_context(cpi);
 
-    if (frame_over_shoot_limit == 0)
-      frame_over_shoot_limit = 1;
+      if (frame_over_shoot_limit == 0)
+        frame_over_shoot_limit = 1;
+    }
 
     if (cpi->oxcf.end_usage == USAGE_CONSTANT_QUALITY) {
       loop = 0;