76 int motion_x,
int motion_y,
int h)
80 int dxy,
offset, mx, my, src_x, src_y, v_edge_pos, linesize, uvlinesize;
83 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
85 src_x = s->
mb_x * 16 + (motion_x >> 1);
86 src_y = s->
mb_y * 16 + (motion_y >> 1);
90 src_x = av_clip(src_x, -16, s->
width);
91 src_y = av_clip(src_y, -16, s->
height);
93 if(src_x<=-16 || src_x >= s->
width)
95 if(src_y<=-16 || src_y >= s->
height)
100 ptr = ref_picture[0] + (src_y * linesize) + src_x;
103 if(src_x<1 || src_y<1 || src_x + 17 >= s->
h_edge_pos
104 || src_y + h+1 >= v_edge_pos){
121 if ((motion_x & 3) != 0)
123 if ((motion_y & 3) != 0)
130 dxy = ((my & 1) << 1) | (mx & 1);
135 src_x = s->
mb_x * 8 + mx;
136 src_y = s->
mb_y * 8 + my;
137 src_x = av_clip(src_x, -8, s->
width >> 1);
138 if (src_x == (s->
width >> 1))
140 src_y = av_clip(src_y, -8, s->
height >> 1);
141 if (src_y == (s->
height >> 1))
143 offset = (src_y * uvlinesize) + src_x;
144 ptr = ref_picture[1] +
offset;
150 pix_op[1][dxy](dest_cb, ptr, uvlinesize, h >> 1);
152 ptr = ref_picture[2] +
offset;
158 pix_op[1][dxy](dest_cr, ptr, uvlinesize, h >> 1);