Revision 08baa3e0

View differences:

libavcodec/vc1.c
790 790
    }
791 791
    uvmx = (mx + ((mx & 3) == 3)) >> 1;
792 792
    uvmy = (my + ((my & 3) == 3)) >> 1;
793
    if(v->fastuvmc) {
794
        uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
795
        uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
796
    }
793 797
    if(!dir) {
794 798
        srcY = s->last_picture.data[0];
795 799
        srcU = s->last_picture.data[1];
......
878 882
        srcY += s->mspel * (1 + s->linesize);
879 883
    }
880 884

  
881
    if(v->fastuvmc) {
882
        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
883
        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
884
    }
885

  
886 885
    if(s->mspel) {
887 886
        dxy = ((my & 3) << 2) | (mx & 3);
888 887
        dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0]    , srcY    , s->linesize, v->rnd);
......
1052 1051
    s->current_picture.motion_val[1][s->block_index[0]][1] = ty;
1053 1052
    uvmx = (tx + ((tx&3) == 3)) >> 1;
1054 1053
    uvmy = (ty + ((ty&3) == 3)) >> 1;
1054
    if(v->fastuvmc) {
1055
        uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
1056
        uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
1057
    }
1055 1058

  
1056 1059
    uvsrc_x = s->mb_x * 8 + (uvmx >> 2);
1057 1060
    uvsrc_y = s->mb_y * 8 + (uvmy >> 2);
......
1102 1105
        }
1103 1106
    }
1104 1107

  
1105
    if(v->fastuvmc) {
1106
        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
1107
        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
1108
    }
1109

  
1110 1108
    /* Chroma MC always uses qpel bilinear */
1111 1109
    uvdxy = ((uvmy & 3) << 2) | (uvmx & 3);
1112 1110
    uvmx = (uvmx&3)<<1;
......
2061 2059
    my = s->mv[1][0][1];
2062 2060
    uvmx = (mx + ((mx & 3) == 3)) >> 1;
2063 2061
    uvmy = (my + ((my & 3) == 3)) >> 1;
2062
    if(v->fastuvmc) {
2063
        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
2064
        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
2065
    }
2064 2066
    srcY = s->next_picture.data[0];
2065 2067
    srcU = s->next_picture.data[1];
2066 2068
    srcV = s->next_picture.data[2];
......
2123 2125
        srcY += s->mspel * (1 + s->linesize);
2124 2126
    }
2125 2127

  
2126
    if(v->fastuvmc) {
2127
        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
2128
        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
2129
    }
2130

  
2131 2128
    mx >>= 1;
2132 2129
    my >>= 1;
2133 2130
    dxy = ((my & 1) << 1) | (mx & 1);

Also available in: Unified diff