[xiph-commits] r16453 - trunk/theora/lib
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Fri Aug 7 07:18:57 PDT 2009
Author: tterribe
Date: 2009-08-07 07:18:57 -0700 (Fri, 07 Aug 2009)
New Revision: 16453
Modified:
trunk/theora/lib/rate.c
Log:
Re-initialize the IIR filters after trial encodes.
Modified: trunk/theora/lib/rate.c
===================================================================
--- trunk/theora/lib/rate.c 2009-08-07 06:37:52 UTC (rev 16452)
+++ trunk/theora/lib/rate.c 2009-08-07 14:18:57 UTC (rev 16453)
@@ -815,9 +815,13 @@
}
/*Common to all passes:*/
if(_bits>0){
- /*Use the estimated scale factor directly directly if this was a
- trial.*/
- if(_trial)_enc->rc.log_scale[_qti]=log_scale;
+ if(_trial){
+ oc_iir_filter *f;
+ /*Use the estimated scale factor directly if this was a trial.*/
+ f=_enc->rc.scalefilter+_qti;
+ f->y[1]=f->y[0]=f->x[1]=f->x[0]=oc_q57_to_q24(log_scale);
+ _enc->rc.log_scale[_qti]=log_scale;
+ }
else{
/*Otherwise update the low-pass scale filter for this frame type,
regardless of whether or not we dropped this frame.*/
More information about the commits
mailing list