24                                       ptrdiff_t linesize_arg,
    25                                       int block_w, 
int block_h,
    26                                       int src_x, 
int src_y, 
int w, 
int h)
    29     int start_y, start_x, end_y, end_x;
    30     int linesize = linesize_arg;
    36         src -= src_y * linesize;
    37         src += (h - 1) * linesize;
    39     } 
else if (src_y <= -block_h) {
    40         src -= src_y * linesize;
    41         src += (1 - block_h) * linesize;
    47     } 
else if (src_x <= -block_w) {
    48         src  += (1 - block_w - src_x) * 
sizeof(
pixel);
    52     start_y = 
FFMAX(0, -src_y);
    53     start_x = 
FFMAX(0, -src_x);
    54     end_y = 
FFMIN(block_h, h-src_y);
    55     end_x = 
FFMIN(block_w, 
w-src_x);
    60     src += start_y * linesize + start_x * 
sizeof(
pixel);
    64     for (y = 0; y < start_y; y++) {
    70     for (; y < end_y; y++) {
    78     for (; y < block_h; y++) {
    83     buf -= block_h * linesize + start_x * 
sizeof(
pixel);
    88         for(x = 0; x < start_x; x++) {
    89             bufp[
x] = bufp[start_x];
    93         for (x = end_x; x < block_w; x++) {
    94             bufp[
x] = bufp[end_x - 1];
 void FUNC() ff_emulated_edge_mc(uint8_t *buf, const uint8_t *src, ptrdiff_t linesize_arg, int block_w, int block_h, int src_x, int src_y, int w, int h)
output residual component w
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.