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){
126 src_x - 1, src_y - 1,
141 if ((motion_x & 3) != 0)
143 if ((motion_y & 3) != 0)
150 dxy = ((my & 1) << 1) | (mx & 1);
155 src_x = s->
mb_x * 8 + mx;
156 src_y = s->
mb_y * 8 + my;
157 src_x = av_clip(src_x, -8, s->
width >> 1);
158 if (src_x == (s->
width >> 1))
160 src_y = av_clip(src_y, -8, s->
height >> 1);
161 if (src_y == (s->
height >> 1))
163 offset = (src_y * uvlinesize) + src_x;
164 ptr = ref_picture[1] +
offset;
173 pix_op[1][dxy](dest_cb, ptr, uvlinesize, h >> 1);
175 ptr = ref_picture[2] +
offset;
184 pix_op[1][dxy](dest_cr, ptr, uvlinesize, h >> 1);