93 int motion_x,
int motion_y,
int h)
97 int dxy, mx, my, src_x, src_y, v_edge_pos;
98 ptrdiff_t
offset, linesize, uvlinesize;
101 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
103 src_x = s->
mb_x * 16 + (motion_x >> 1);
104 src_y = s->
mb_y * 16 + (motion_y >> 1);
108 src_x = av_clip(src_x, -16, s->
width);
109 src_y = av_clip(src_y, -16, s->
height);
111 if(src_x<=-16 || src_x >= s->
width)
113 if(src_y<=-16 || src_y >= s->
height)
118 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){
139 if ((motion_x & 3) != 0)
141 if ((motion_y & 3) != 0)
148 dxy = ((my & 1) << 1) | (mx & 1);
153 src_x = s->
mb_x * 8 + mx;
154 src_y = s->
mb_y * 8 + my;
155 src_x = av_clip(src_x, -8, s->
width >> 1);
156 if (src_x == (s->
width >> 1))
158 src_y = av_clip(src_y, -8, s->
height >> 1);
159 if (src_y == (s->
height >> 1))
161 offset = (src_y * uvlinesize) + src_x;
162 ptr = ref_picture[1] +
offset;
169 pix_op[1][dxy](dest_cb, ptr, uvlinesize, h >> 1);
171 ptr = ref_picture[2] +
offset;
178 pix_op[1][dxy](dest_cr, ptr, uvlinesize, h >> 1);