37 extern emu_edge_core_func ff_emu_edge_core_mmx;
38 extern emu_edge_core_func ff_emu_edge_core_sse;
41 ptrdiff_t linesize_arg,
42 int block_w,
int block_h,
45 emu_edge_core_func *core_fn)
47 int start_y, start_x, end_y, end_x, src_y_add = 0;
48 int linesize = linesize_arg;
54 src -= src_y*linesize;
57 }
else if (src_y <= -block_h) {
58 src -= src_y*linesize;
59 src_y_add = 1 - block_h;
65 }
else if (src_x <= -block_w) {
66 src += 1 - block_w - src_x;
70 start_y =
FFMAX(0, -src_y);
71 start_x =
FFMAX(0, -src_x);
72 end_y =
FFMIN(block_h, h-src_y);
73 end_x =
FFMIN(block_w, w-src_x);
78 src += (src_y_add + start_y) * linesize + start_x;
80 core_fn(buf, src, linesize, start_y, end_y,
81 block_h, start_x, end_x, block_w);
87 int block_w,
int block_h,
88 int src_x,
int src_y,
int w,
int h)
90 emulated_edge_mc(buf, src, linesize, block_w, block_h, src_x, src_y,
91 w, h, &ff_emu_edge_core_mmx);
97 int block_w,
int block_h,
98 int src_x,
int src_y,
int w,
int h)
100 emulated_edge_mc(buf, src, linesize, block_w, block_h, src_x, src_y,
101 w, h, &ff_emu_edge_core_sse);