mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-17 13:04:50 +00:00
10e6l FastUVMC was done right but in the wrong place
Originally committed as revision 7207 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
516ea8d222
commit
08baa3e0d7
@ -790,6 +790,10 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
|
|||||||
}
|
}
|
||||||
uvmx = (mx + ((mx & 3) == 3)) >> 1;
|
uvmx = (mx + ((mx & 3) == 3)) >> 1;
|
||||||
uvmy = (my + ((my & 3) == 3)) >> 1;
|
uvmy = (my + ((my & 3) == 3)) >> 1;
|
||||||
|
if(v->fastuvmc) {
|
||||||
|
uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
|
||||||
|
uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
|
||||||
|
}
|
||||||
if(!dir) {
|
if(!dir) {
|
||||||
srcY = s->last_picture.data[0];
|
srcY = s->last_picture.data[0];
|
||||||
srcU = s->last_picture.data[1];
|
srcU = s->last_picture.data[1];
|
||||||
@ -878,11 +882,6 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
|
|||||||
srcY += s->mspel * (1 + s->linesize);
|
srcY += s->mspel * (1 + s->linesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(v->fastuvmc) {
|
|
||||||
uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
|
|
||||||
uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(s->mspel) {
|
if(s->mspel) {
|
||||||
dxy = ((my & 3) << 2) | (mx & 3);
|
dxy = ((my & 3) << 2) | (mx & 3);
|
||||||
dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0] , srcY , s->linesize, v->rnd);
|
dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0] , srcY , s->linesize, v->rnd);
|
||||||
@ -1052,6 +1051,10 @@ static void vc1_mc_4mv_chroma(VC1Context *v)
|
|||||||
s->current_picture.motion_val[1][s->block_index[0]][1] = ty;
|
s->current_picture.motion_val[1][s->block_index[0]][1] = ty;
|
||||||
uvmx = (tx + ((tx&3) == 3)) >> 1;
|
uvmx = (tx + ((tx&3) == 3)) >> 1;
|
||||||
uvmy = (ty + ((ty&3) == 3)) >> 1;
|
uvmy = (ty + ((ty&3) == 3)) >> 1;
|
||||||
|
if(v->fastuvmc) {
|
||||||
|
uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
|
||||||
|
uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
|
||||||
|
}
|
||||||
|
|
||||||
uvsrc_x = s->mb_x * 8 + (uvmx >> 2);
|
uvsrc_x = s->mb_x * 8 + (uvmx >> 2);
|
||||||
uvsrc_y = s->mb_y * 8 + (uvmy >> 2);
|
uvsrc_y = s->mb_y * 8 + (uvmy >> 2);
|
||||||
@ -1102,11 +1105,6 @@ static void vc1_mc_4mv_chroma(VC1Context *v)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(v->fastuvmc) {
|
|
||||||
uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
|
|
||||||
uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Chroma MC always uses qpel bilinear */
|
/* Chroma MC always uses qpel bilinear */
|
||||||
uvdxy = ((uvmy & 3) << 2) | (uvmx & 3);
|
uvdxy = ((uvmy & 3) << 2) | (uvmx & 3);
|
||||||
uvmx = (uvmx&3)<<1;
|
uvmx = (uvmx&3)<<1;
|
||||||
@ -2061,6 +2059,10 @@ static void vc1_interp_mc(VC1Context *v)
|
|||||||
my = s->mv[1][0][1];
|
my = s->mv[1][0][1];
|
||||||
uvmx = (mx + ((mx & 3) == 3)) >> 1;
|
uvmx = (mx + ((mx & 3) == 3)) >> 1;
|
||||||
uvmy = (my + ((my & 3) == 3)) >> 1;
|
uvmy = (my + ((my & 3) == 3)) >> 1;
|
||||||
|
if(v->fastuvmc) {
|
||||||
|
uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
|
||||||
|
uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
|
||||||
|
}
|
||||||
srcY = s->next_picture.data[0];
|
srcY = s->next_picture.data[0];
|
||||||
srcU = s->next_picture.data[1];
|
srcU = s->next_picture.data[1];
|
||||||
srcV = s->next_picture.data[2];
|
srcV = s->next_picture.data[2];
|
||||||
@ -2123,11 +2125,6 @@ static void vc1_interp_mc(VC1Context *v)
|
|||||||
srcY += s->mspel * (1 + s->linesize);
|
srcY += s->mspel * (1 + s->linesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(v->fastuvmc) {
|
|
||||||
uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
|
|
||||||
uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
|
|
||||||
}
|
|
||||||
|
|
||||||
mx >>= 1;
|
mx >>= 1;
|
||||||
my >>= 1;
|
my >>= 1;
|
||||||
dxy = ((my & 1) << 1) | (mx & 1);
|
dxy = ((my & 1) << 1) | (mx & 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user