Revision ed1dfc49 libavcodec/motion_est_template.c

View differences:

libavcodec/motion_est_template.c
976 976
        CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)  , (P_MEDIAN[1]>>shift)+1)
977 977
        CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)-1, (P_MEDIAN[1]>>shift)  )
978 978
        CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)+1, (P_MEDIAN[1]>>shift)  )
979
        if(dmin>h*h*2){
980 979
            CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
981 980
                            (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
982 981
            CHECK_MV(P_LEFT[0]    >>shift, P_LEFT[1]    >>shift)
983 982
            CHECK_MV(P_TOP[0]     >>shift, P_TOP[1]     >>shift)
984 983
            CHECK_MV(P_TOPRIGHT[0]>>shift, P_TOPRIGHT[1]>>shift)
985
        }
986 984
    }
987 985
    if(dmin>h*h*4){
988 986
        if(c->pre_pass){
......
1083 1081
    }else{
1084 1082
        CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift)
1085 1083
        //FIXME try some early stop
1086
        if(dmin>64*2){
1087 1084
            CHECK_MV(P_MEDIAN[0]>>shift, P_MEDIAN[1]>>shift)
1088 1085
            CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
1089 1086
            CHECK_MV(P_TOP[0]>>shift, P_TOP[1]>>shift)
1090 1087
            CHECK_MV(P_TOPRIGHT[0]>>shift, P_TOPRIGHT[1]>>shift)
1091 1088
            CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
1092 1089
                            (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
1093
        }
1094 1090
    }
1095 1091
    if(dmin>64*4){
1096 1092
        CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16,
......
1145 1141
    }else{
1146 1142
        CHECK_MV(P_MV1[0]>>shift, P_MV1[1]>>shift)
1147 1143
        //FIXME try some early stop
1148
        if(dmin>64*2){
1149 1144
            CHECK_MV(P_MEDIAN[0]>>shift, P_MEDIAN[1]>>shift)
1150 1145
            CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
1151 1146
            CHECK_MV(P_TOP[0]>>shift, P_TOP[1]>>shift)
1152 1147
            CHECK_MV(P_TOPRIGHT[0]>>shift, P_TOPRIGHT[1]>>shift)
1153 1148
            CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
1154 1149
                            (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
1155
        }
1156 1150
    }
1157 1151
    if(dmin>64*4){
1158 1152
        CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16,

Also available in: Unified diff