From: Fiona Glaser Date: Tue, 4 Nov 2008 06:59:49 +0000 (-0800) Subject: Encoder_reconfig: esa/tesa can only be enabled if they were on to begin with X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16e3ef85b4d1162ac46e4b6b384bc61481dbaf7a;p=libx264 Encoder_reconfig: esa/tesa can only be enabled if they were on to begin with Bug report by kemuri-_9. --- diff --git a/encoder/encoder.c b/encoder/encoder.c index b359e3fd..2e7ea80c 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -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 )