diff --git a/encoder/encoder.c b/encoder/encoder.c index 22e8ce4..50e5b7f 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -544,6 +544,9 @@ static int x264_validate_parameters( x264_t *h ) if( h->param.i_level_idc < 0 ) { int maxrate_bak = h->param.rc.i_vbv_max_bitrate; + int i_save_mv_range = h->param.analyse.i_mv_range; + if( h->param.analyse.i_mv_range <= 0 ) + h->param.analyse.i_mv_range = 32; if( h->param.rc.i_rc_method == X264_RC_ABR && h->param.rc.i_vbv_buffer_size <= 0 ) h->param.rc.i_vbv_max_bitrate = h->param.rc.i_bitrate * 2; h->sps = h->sps_array; @@ -551,6 +554,7 @@ static int x264_validate_parameters( x264_t *h ) do h->param.i_level_idc = l->level_idc; while( l[1].level_idc && x264_validate_levels( h, 0 ) && l++ ); h->param.rc.i_vbv_max_bitrate = maxrate_bak; + h->param.analyse.i_mv_range = i_save_mv_range; } else {