36 extern emu_edge_core_func ff_emu_edge_core_mmx;
37 extern emu_edge_core_func ff_emu_edge_core_sse;
40 ptrdiff_t linesize_arg,
41 int block_w,
int block_h,
44 emu_edge_core_func *core_fn)
46 int start_y, start_x, end_y, end_x, src_y_add = 0;
47 int linesize = linesize_arg;
53 src -= src_y*linesize;
56 }
else if (src_y <= -block_h) {
57 src -= src_y*linesize;
58 src_y_add = 1 - block_h;
64 }
else if (src_x <= -block_w) {
65 src += 1 - block_w - src_x;
69 start_y =
FFMAX(0, -src_y);
70 start_x =
FFMAX(0, -src_x);
71 end_y =
FFMIN(block_h, h-src_y);
72 end_x =
FFMIN(block_w, w-src_x);
77 src += (src_y_add + start_y) * linesize + start_x;
79 core_fn(buf, src, linesize, start_y, end_y,
80 block_h, start_x, end_x, block_w);
86 int block_w,
int block_h,
87 int src_x,
int src_y,
int w,
int h)
89 emulated_edge_mc(buf, src, linesize, block_w, block_h, src_x, src_y,
90 w, h, &ff_emu_edge_core_mmx);
96 int block_w,
int block_h,
97 int src_x,
int src_y,
int w,
int h)
99 emulated_edge_mc(buf, src, linesize, block_w, block_h, src_x, src_y,
100 w, h, &ff_emu_edge_core_sse);