]> granicus.if.org Git - libx264/commitdiff
Encoder_reconfig: esa/tesa can only be enabled if they were on to begin with
authorFiona Glaser <fiona@x264.com>
Tue, 4 Nov 2008 06:59:49 +0000 (22:59 -0800)
committerFiona Glaser <fiona@x264.com>
Wed, 5 Nov 2008 11:07:05 +0000 (03:07 -0800)
Bug report by kemuri-_9.

encoder/encoder.c

index b359e3fd003ed4ef30f9748e5b6ec64d61cde881..2e7ea80cb5eb75f775d20232b3b9bfb1ff24ab7e 100644 (file)
@@ -814,7 +814,6 @@ int x264_encoder_reconfig( x264_t *h, x264_param_t *param )
     COPY( analyse.intra );
     COPY( analyse.inter );
     COPY( analyse.i_direct_mv_pred );
-    COPY( analyse.i_me_method );
     COPY( analyse.i_me_range );
     COPY( analyse.i_noise_reduction );
     COPY( analyse.i_subpel_refine );
@@ -826,6 +825,8 @@ int x264_encoder_reconfig( x264_t *h, x264_param_t *param )
     COPY( analyse.f_psy_rd );
     COPY( analyse.f_psy_trellis );
     // can only twiddle these if they were enabled to begin with:
+    if( h->param.analyse.i_me_method >= X264_ME_ESA || param->analyse.i_me_method < X264_ME_ESA )
+        COPY( analyse.i_me_method );
     if( h->pps->b_transform_8x8_mode )
         COPY( analyse.b_transform_8x8 );
     if( h->frames.i_max_ref1 > 1 )