93 int motion_x,
int motion_y,
int h)
97 int dxy,
offset, mx, my, src_x, src_y, v_edge_pos, linesize, uvlinesize;
100 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
102 src_x = s->
mb_x * 16 + (motion_x >> 1);
103 src_y = s->
mb_y * 16 + (motion_y >> 1);
107 src_x = av_clip(src_x, -16, s->
width);
108 src_y = av_clip(src_y, -16, s->
height);
110 if(src_x<=-16 || src_x >= s->
width)
112 if(src_y<=-16 || src_y >= s->
height)
117 ptr = ref_picture[0] + (src_y * linesize) + src_x;
120 if(src_x<1 || src_y<1 || src_x + 17 >= s->
h_edge_pos
121 || src_y + h+1 >= v_edge_pos){
138 if ((motion_x & 3) != 0)
140 if ((motion_y & 3) != 0)
147 dxy = ((my & 1) << 1) | (mx & 1);
152 src_x = s->
mb_x * 8 + mx;
153 src_y = s->
mb_y * 8 + my;
154 src_x = av_clip(src_x, -8, s->
width >> 1);
155 if (src_x == (s->
width >> 1))
157 src_y = av_clip(src_y, -8, s->
height >> 1);
158 if (src_y == (s->
height >> 1))
160 offset = (src_y * uvlinesize) + src_x;
161 ptr = ref_picture[1] +
offset;
167 pix_op[1][dxy](dest_cb, ptr, uvlinesize, h >> 1);
169 ptr = ref_picture[2] +
offset;
175 pix_op[1][dxy](dest_cr, ptr, uvlinesize, h >> 1);