[xiph-commits] r16395 - branches/theora-thusnelda/lib/enc

tterribe at svn.xiph.org tterribe at svn.xiph.org
Sat Aug 1 16:48:07 PDT 2009


Author: tterribe
Date: 2009-08-01 16:48:06 -0700 (Sat, 01 Aug 2009)
New Revision: 16395

Modified:
   branches/theora-thusnelda/lib/enc/rate.c
Log:
Move two-pass variable initialization up since it's used in oc_enc_rc_reset()
 now.


Modified: branches/theora-thusnelda/lib/enc/rate.c
===================================================================
--- branches/theora-thusnelda/lib/enc/rate.c	2009-08-01 23:41:50 UTC (rev 16394)
+++ branches/theora-thusnelda/lib/enc/rate.c	2009-08-01 23:48:06 UTC (rev 16395)
@@ -274,6 +274,10 @@
 }
 
 void oc_rc_state_init(oc_rc_state *_rc,oc_enc_ctx *_enc){
+  _rc->twopass=0;
+  _rc->twopass_buffer_bytes=0;
+  _rc->twopass_force_kf=0;
+  _rc->frame_metrics=NULL;
   if(_enc->state.info.target_bitrate>0){
     /*The buffer size is set equal to the keyframe interval, clamped to the
        range [12,256] frames.
@@ -289,10 +293,6 @@
     _rc->cap_underflow=0;
     oc_enc_rc_reset(_enc);
   }
-  _rc->twopass=0;
-  _rc->twopass_buffer_bytes=0;
-  _rc->twopass_force_kf=0;
-  _rc->frame_metrics=NULL;
 }
 
 void oc_rc_state_clear(oc_rc_state *_rc){



More information about the commits mailing list