Revision 2f300f89 libavcodec/motion_est.c

View differences:

libavcodec/motion_est.c
1896 1896
        int best_fcode=-1;
1897 1897
        int best_score=-10000000;
1898 1898

  
1899
        if(s->msmpeg4_version) 
1900
            range= FFMIN(range, 16);
1901
        else if(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)
1902
            range= FFMIN(range, 256);
1903

  
1899 1904
        for(i=0; i<8; i++) score[i]= s->mb_num*(8-i);
1900 1905

  
1901 1906
        for(y=0; y<s->mb_height; y++){
......
1950 1955
    int y, range;
1951 1956
    assert(s->pict_type==P_TYPE);
1952 1957

  
1953
    range = (((s->out_format == FMT_MPEG1) ? 8 : 16) << f_code);
1954
    
1955
    if(s->msmpeg4_version) range= 16;
1958
    range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);
1959

  
1960
    assert(range <= 16 || !s->msmpeg4_version);
1961
    assert(range <=256 || !(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL));
1956 1962
    
1957 1963
    if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;
1958 1964
    
......
2000 2006
    int y, h_range, v_range;
2001 2007

  
2002 2008
    // RAL: 8 in MPEG-1, 16 in MPEG-4
2003
    int range = (((s->out_format == FMT_MPEG1) ? 8 : 16) << f_code);
2009
    int range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);
2004 2010

  
2005
    if(s->msmpeg4_version) range= 16;
2006 2011
    if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;
2007 2012

  
2008 2013
    h_range= range;

Also available in: Unified diff