]> git.sesse.net Git - x264/commitdiff
Get rid of hardcoded parameters in speedcontrol. This allows SAR changes.
authorKieran Kunhya <kieran@kunhya.com>
Mon, 29 Aug 2011 16:58:28 +0000 (17:58 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 23 Apr 2016 10:05:45 +0000 (12:05 +0200)
encoder/speed.c

index 7bf370ef12a17250f00e1c1c41ec35f29bfcba96..a449ddd241256f55979b508f57824d344a11d1a8 100644 (file)
@@ -19,7 +19,6 @@ struct x264_speedcontrol_t
     float cplx_den;
     float cplx_decay;
     float dither;
-    x264_param_t user_param;
 
     int first;
 
@@ -54,7 +53,6 @@ void x264_speedcontrol_new( x264_t *h )
     sc->cplx_decay = 1 - 1./h->param.sc.i_buffer_size;
     sc->stat.min_buffer = sc->buffer_size;
     sc->stat.max_buffer = 0;
-    sc->user_param = h->param;
     sc->first = 1;
 }
 
@@ -128,7 +126,7 @@ static void apply_preset( x264_t *h, int preset )
     //if( preset != sc->preset )
     {
         const sc_preset_t *s = &presets[preset];
-        x264_param_t p = sc->user_param;
+        x264_param_t p = h->param;
 
         p.i_frame_reference = s->refs;
         p.analyse.inter = s->partitions;