Revision d23e3e5f

View differences:

libavcodec/cavs.c
353 353
          || full_my < 0-extra_height
354 354
          || full_mx + 16/*FIXME*/ > pic_width + extra_width
355 355
          || full_my + 16/*FIXME*/ > pic_height + extra_height){
356
        ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*h->l_stride, h->l_stride,
356
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*h->l_stride, h->l_stride,
357 357
                            16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height);
358 358
        src_y= s->edge_emu_buffer + 2 + 2*h->l_stride;
359 359
        emu=1;
......
365 365
    }
366 366

  
367 367
    if(emu){
368
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cb, h->c_stride,
368
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb, h->c_stride,
369 369
                            9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
370 370
        src_cb= s->edge_emu_buffer;
371 371
    }
372 372
    chroma_op(dest_cb, src_cb, h->c_stride, chroma_height, mx&7, my&7);
373 373

  
374 374
    if(emu){
375
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cr, h->c_stride,
375
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cr, h->c_stride,
376 376
                            9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
377 377
        src_cr= s->edge_emu_buffer;
378 378
    }
libavcodec/dsputil.c
4218 4218
    c->add_pixels8 = add_pixels8_c;
4219 4219
    c->add_pixels4 = add_pixels4_c;
4220 4220
    c->sum_abs_dctelem = sum_abs_dctelem_c;
4221
    c->emulated_edge_mc = ff_emulated_edge_mc;
4221 4222
    c->gmc1 = gmc1_c;
4222 4223
    c->gmc = ff_gmc_c;
4223 4224
    c->clear_block = clear_block_c;
libavcodec/dsputil.h
216 216
    void (*add_pixels4)(uint8_t *pixels, DCTELEM *block, int line_size);
217 217
    int (*sum_abs_dctelem)(DCTELEM *block/*align 16*/);
218 218
    /**
219
     * Motion estimation with emulated edge values.
220
     * @param buf pointer to destination buffer (unaligned)
221
     * @param src pointer to pixel source (unaligned)
222
     * @param linesize width (in pixels) for src/buf
223
     * @param block_w number of pixels (per row) to copy to buf
224
     * @param block_h nummber of pixel rows to copy to buf
225
     * @param src_x offset of src to start of row - this may be negative
226
     * @param src_y offset of src to top of image - this may be negative
227
     * @param w width of src in pixels
228
     * @param h height of src in pixels
229
     */
230
    void (*emulated_edge_mc)(uint8_t *buf, const uint8_t *src, int linesize,
231
                             int block_w, int block_h,
232
                             int src_x, int src_y, int w, int h);
233
    /**
219 234
     * translational global motion compensation.
220 235
     */
221 236
    void (*gmc1)(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int srcStride, int h, int x16, int y16, int rounder);
libavcodec/h264.c
361 361
       || full_my < 0-extra_height
362 362
       || full_mx + 16/*FIXME*/ > pic_width + extra_width
363 363
       || full_my + 16/*FIXME*/ > pic_height + extra_height){
364
        ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*h->mb_linesize, h->mb_linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height);
364
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*h->mb_linesize, h->mb_linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height);
365 365
            src_y= s->edge_emu_buffer + 2 + 2*h->mb_linesize;
366 366
        emu=1;
367 367
    }
......
382 382
    src_cr= pic->data[2] + (mx>>3) + (my>>3)*h->mb_uvlinesize;
383 383

  
384 384
    if(emu){
385
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cb, h->mb_uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
385
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb, h->mb_uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
386 386
            src_cb= s->edge_emu_buffer;
387 387
    }
388 388
    chroma_op(dest_cb, src_cb, h->mb_uvlinesize, chroma_height, mx&7, my&7);
389 389

  
390 390
    if(emu){
391
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cr, h->mb_uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
391
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cr, h->mb_uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
392 392
            src_cr= s->edge_emu_buffer;
393 393
    }
394 394
    chroma_op(dest_cr, src_cr, h->mb_uvlinesize, chroma_height, mx&7, my&7);
libavcodec/mpegvideo.c
1479 1479

  
1480 1480
    if(   (unsigned)src_x > h_edge_pos                 - (!!sx) - w
1481 1481
       || (unsigned)src_y >(v_edge_pos >> field_based) - (!!sy) - h){
1482
        ff_emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w+1, (h+1)<<field_based,
1482
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w+1, (h+1)<<field_based,
1483 1483
                            src_x, src_y<<field_based, h_edge_pos, v_edge_pos);
1484 1484
        src= s->edge_emu_buffer;
1485 1485
        emu=1;
......
1552 1552

  
1553 1553
    if(   (unsigned)src_x > h_edge_pos                 - (!!sx) - 2*block_s
1554 1554
       || (unsigned)src_y >(v_edge_pos >> field_based) - (!!sy) - h){
1555
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
1555
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
1556 1556
                             src_x, src_y<<field_based, h_edge_pos, v_edge_pos);
1557 1557
            ptr_y = s->edge_emu_buffer;
1558 1558
            if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1559 1559
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
1560
                ff_emulated_edge_mc(uvbuf  , ptr_cb, s->uvlinesize, 9, 9+field_based,
1560
                s->dsp.emulated_edge_mc(uvbuf  , ptr_cb, s->uvlinesize, 9, 9+field_based,
1561 1561
                                 uvsrc_x, uvsrc_y<<field_based, h_edge_pos>>1, v_edge_pos>>1);
1562
                ff_emulated_edge_mc(uvbuf+16, ptr_cr, s->uvlinesize, 9, 9+field_based,
1562
                s->dsp.emulated_edge_mc(uvbuf+16, ptr_cr, s->uvlinesize, 9, 9+field_based,
1563 1563
                                 uvsrc_x, uvsrc_y<<field_based, h_edge_pos>>1, v_edge_pos>>1);
1564 1564
                ptr_cb= uvbuf;
1565 1565
                ptr_cr= uvbuf+16;
......
1625 1625
    if(s->flags&CODEC_FLAG_EMU_EDGE){
1626 1626
        if(   (unsigned)src_x > h_edge_pos - (!!sx) - block_s
1627 1627
           || (unsigned)src_y > v_edge_pos - (!!sy) - block_s){
1628
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, h_edge_pos, v_edge_pos);
1628
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, h_edge_pos, v_edge_pos);
1629 1629
            ptr= s->edge_emu_buffer;
1630 1630
            emu=1;
1631 1631
        }
......
1636 1636

  
1637 1637
    ptr = ref_picture[2] + offset;
1638 1638
    if(emu){
1639
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, h_edge_pos, v_edge_pos);
1639
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, h_edge_pos, v_edge_pos);
1640 1640
        ptr= s->edge_emu_buffer;
1641 1641
    }
1642 1642
    pix_op[op_index](dest_cr, ptr, s->uvlinesize, block_s, sx, sy);
libavcodec/mpegvideo_common.h
83 83
    if(s->flags&CODEC_FLAG_EMU_EDGE){
84 84
        if(   (unsigned)src_x >= s->h_edge_pos - 17
85 85
           || (unsigned)src_y >= s->v_edge_pos - 17){
86
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr, linesize, 17, 17, src_x, src_y, s->h_edge_pos, s->v_edge_pos);
86
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, linesize, 17, 17, src_x, src_y, s->h_edge_pos, s->v_edge_pos);
87 87
            ptr= s->edge_emu_buffer;
88 88
        }
89 89
    }
......
122 122
    if(s->flags&CODEC_FLAG_EMU_EDGE){
123 123
        if(   (unsigned)src_x >= (s->h_edge_pos>>1) - 9
124 124
           || (unsigned)src_y >= (s->v_edge_pos>>1) - 9){
125
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
125
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
126 126
            ptr= s->edge_emu_buffer;
127 127
            emu=1;
128 128
        }
......
131 131

  
132 132
    ptr = ref_picture[2] + offset;
133 133
    if(emu){
134
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
134
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
135 135
        ptr= s->edge_emu_buffer;
136 136
    }
137 137
    s->dsp.gmc1(dest_cr, ptr, uvlinesize, 8, motion_x&15, motion_y&15, 128 - s->no_rounding);
......
223 223
    if(s->unrestricted_mv && (s->flags&CODEC_FLAG_EMU_EDGE)){
224 224
        if(   (unsigned)src_x > h_edge_pos - (motion_x&1) - w
225 225
           || (unsigned)src_y > v_edge_pos - (motion_y&1) - h){
226
            ff_emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w+1, (h+1)<<field_based,
226
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w+1, (h+1)<<field_based,
227 227
                             src_x, src_y<<field_based, h_edge_pos, s->v_edge_pos);
228 228
            src= s->edge_emu_buffer;
229 229
            emu=1;
......
315 315
                        "MPEG motion vector out of boundary (%d %d)\n", src_x, src_y);
316 316
                return;
317 317
            }
318
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize,
318
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize,
319 319
                                17, 17+field_based,
320 320
                                src_x, src_y<<field_based,
321 321
                                s->h_edge_pos, s->v_edge_pos);
322 322
            ptr_y = s->edge_emu_buffer;
323 323
            if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
324 324
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
325
                ff_emulated_edge_mc(uvbuf ,
325
                s->dsp.emulated_edge_mc(uvbuf ,
326 326
                                    ptr_cb, s->uvlinesize,
327 327
                                    9, 9+field_based,
328 328
                                    uvsrc_x, uvsrc_y<<field_based,
329 329
                                    s->h_edge_pos>>1, s->v_edge_pos>>1);
330
                ff_emulated_edge_mc(uvbuf+16,
330
                s->dsp.emulated_edge_mc(uvbuf+16,
331 331
                                    ptr_cr, s->uvlinesize,
332 332
                                    9, 9+field_based,
333 333
                                    uvsrc_x, uvsrc_y<<field_based,
......
512 512

  
513 513
    if(   (unsigned)src_x > s->h_edge_pos - (motion_x&3) - 16
514 514
       || (unsigned)src_y >    v_edge_pos - (motion_y&3) - h  ){
515
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize,
515
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize,
516 516
                            17, 17+field_based, src_x, src_y<<field_based,
517 517
                            s->h_edge_pos, s->v_edge_pos);
518 518
        ptr_y= s->edge_emu_buffer;
519 519
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
520 520
            uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize;
521
            ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize,
521
            s->dsp.emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize,
522 522
                                9, 9 + field_based,
523 523
                                uvsrc_x, uvsrc_y<<field_based,
524 524
                                s->h_edge_pos>>1, s->v_edge_pos>>1);
525
            ff_emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize,
525
            s->dsp.emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize,
526 526
                                9, 9 + field_based,
527 527
                                uvsrc_x, uvsrc_y<<field_based,
528 528
                                s->h_edge_pos>>1, s->v_edge_pos>>1);
......
590 590
    if(s->flags&CODEC_FLAG_EMU_EDGE){
591 591
        if(   (unsigned)src_x > (s->h_edge_pos>>1) - (dxy &1) - 8
592 592
           || (unsigned)src_y > (s->v_edge_pos>>1) - (dxy>>1) - 8){
593
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize,
593
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize,
594 594
                                9, 9, src_x, src_y,
595 595
                                s->h_edge_pos>>1, s->v_edge_pos>>1);
596 596
            ptr= s->edge_emu_buffer;
......
601 601

  
602 602
    ptr = ref_picture[2] + offset;
603 603
    if(emu){
604
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize,
604
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize,
605 605
                            9, 9, src_x, src_y,
606 606
                            s->h_edge_pos>>1, s->v_edge_pos>>1);
607 607
        ptr= s->edge_emu_buffer;
......
762 762
                if(s->flags&CODEC_FLAG_EMU_EDGE){
763 763
                    if(   (unsigned)src_x > s->h_edge_pos - (motion_x&3) - 8
764 764
                       || (unsigned)src_y > s->v_edge_pos - (motion_y&3) - 8 ){
765
                        ff_emulated_edge_mc(s->edge_emu_buffer, ptr,
765
                        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
766 766
                                            s->linesize, 9, 9,
767 767
                                            src_x, src_y,
768 768
                                            s->h_edge_pos, s->v_edge_pos);
libavcodec/mpegvideo_enc.c
1548 1548

  
1549 1549
    if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){
1550 1550
        uint8_t *ebuf= s->edge_emu_buffer + 32;
1551
        ff_emulated_edge_mc(ebuf            , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width   , s->height);
1551
        s->dsp.emulated_edge_mc(ebuf            , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width   , s->height);
1552 1552
        ptr_y= ebuf;
1553
        ff_emulated_edge_mc(ebuf+18*wrap_y  , ptr_cb, wrap_c, 8, mb_block_height, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
1553
        s->dsp.emulated_edge_mc(ebuf+18*wrap_y  , ptr_cb, wrap_c, 8, mb_block_height, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
1554 1554
        ptr_cb= ebuf+18*wrap_y;
1555
        ff_emulated_edge_mc(ebuf+18*wrap_y+8, ptr_cr, wrap_c, 8, mb_block_height, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
1555
        s->dsp.emulated_edge_mc(ebuf+18*wrap_y+8, ptr_cr, wrap_c, 8, mb_block_height, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
1556 1556
        ptr_cr= ebuf+18*wrap_y+8;
1557 1557
    }
1558 1558

  
libavcodec/rv34.c
718 718
        uint8_t *uvbuf= s->edge_emu_buffer + 22 * s->linesize;
719 719

  
720 720
        srcY -= 2 + 2*s->linesize;
721
        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, (width<<3)+6, (height<<3)+6,
721
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, (width<<3)+6, (height<<3)+6,
722 722
                            src_x - 2, src_y - 2, s->h_edge_pos, s->v_edge_pos);
723 723
        srcY = s->edge_emu_buffer + 2 + 2*s->linesize;
724
        ff_emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, (width<<2)+1, (height<<2)+1,
724
        s->dsp.emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, (width<<2)+1, (height<<2)+1,
725 725
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
726
        ff_emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, (width<<2)+1, (height<<2)+1,
726
        s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, (width<<2)+1, (height<<2)+1,
727 727
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
728 728
        srcU = uvbuf;
729 729
        srcV = uvbuf + 16;
libavcodec/snow.c
1171 1171
        src += sx + sy*stride;
1172 1172
        if(   (unsigned)sx >= w - b_w - (HTAPS_MAX-2)
1173 1173
           || (unsigned)sy >= h - b_h - (HTAPS_MAX-2)){
1174
            ff_emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h);
1174
            s->dsp.emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h);
1175 1175
            src= tmp + MB_SIZE;
1176 1176
        }
1177 1177
//        assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h);
libavcodec/svq3.c
283 283
    src  = pic->data[0] + mx + my*s->linesize;
284 284

  
285 285
    if (emu) {
286
        ff_emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, (width + 1), (height + 1),
286
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, (width + 1), (height + 1),
287 287
                            mx, my, s->h_edge_pos, s->v_edge_pos);
288 288
        src = s->edge_emu_buffer;
289 289
    }
......
304 304
            src  = pic->data[i] + mx + my*s->uvlinesize;
305 305

  
306 306
            if (emu) {
307
                ff_emulated_edge_mc(s->edge_emu_buffer, src, s->uvlinesize, (width + 1), (height + 1),
307
                s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->uvlinesize, (width + 1), (height + 1),
308 308
                                    mx, my, (s->h_edge_pos >> 1), (s->v_edge_pos >> 1));
309 309
                src = s->edge_emu_buffer;
310 310
            }
libavcodec/vc1dec.c
288 288
        uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize;
289 289

  
290 290
        srcY -= s->mspel * (1 + s->linesize);
291
        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2,
291
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2,
292 292
                            src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos);
293 293
        srcY = s->edge_emu_buffer;
294
        ff_emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, 8+1, 8+1,
294
        s->dsp.emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, 8+1, 8+1,
295 295
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
296
        ff_emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1,
296
        s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1,
297 297
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
298 298
        srcU = uvbuf;
299 299
        srcV = uvbuf + 16;
......
403 403
       || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 8 - s->mspel*2
404 404
       || (unsigned)(src_y - s->mspel) > s->v_edge_pos - (my&3) - 8 - s->mspel*2){
405 405
        srcY -= s->mspel * (1 + s->linesize);
406
        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 9+s->mspel*2, 9+s->mspel*2,
406
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 9+s->mspel*2, 9+s->mspel*2,
407 407
                            src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos);
408 408
        srcY = s->edge_emu_buffer;
409 409
        /* if we deal with range reduction we need to scale source blocks */
......
537 537
    if(v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP)
538 538
       || (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 9
539 539
       || (unsigned)uvsrc_y > (s->v_edge_pos >> 1) - 9){
540
        ff_emulated_edge_mc(s->edge_emu_buffer     , srcU, s->uvlinesize, 8+1, 8+1,
540
        s->dsp.emulated_edge_mc(s->edge_emu_buffer     , srcU, s->uvlinesize, 8+1, 8+1,
541 541
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
542
        ff_emulated_edge_mc(s->edge_emu_buffer + 16, srcV, s->uvlinesize, 8+1, 8+1,
542
        s->dsp.emulated_edge_mc(s->edge_emu_buffer + 16, srcV, s->uvlinesize, 8+1, 8+1,
543 543
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
544 544
        srcU = s->edge_emu_buffer;
545 545
        srcV = s->edge_emu_buffer + 16;
......
872 872
        uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize;
873 873

  
874 874
        srcY -= s->mspel * (1 + s->linesize);
875
        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2,
875
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2,
876 876
                            src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos);
877 877
        srcY = s->edge_emu_buffer;
878
        ff_emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, 8+1, 8+1,
878
        s->dsp.emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, 8+1, 8+1,
879 879
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
880
        ff_emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1,
880
        s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1,
881 881
                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
882 882
        srcU = uvbuf;
883 883
        srcV = uvbuf + 16;
libavcodec/vp3.c
1432 1432
                            if(stride<0) temp -= 9*stride;
1433 1433
                            else temp += 9*stride;
1434 1434

  
1435
                            ff_emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
1435
                            s->dsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
1436 1436
                            motion_source= temp;
1437 1437
                        }
1438 1438
                    }
libavcodec/vp56.c
337 337

  
338 338
    if (x<0 || x+12>=s->plane_width[plane] ||
339 339
        y<0 || y+12>=s->plane_height[plane]) {
340
        ff_emulated_edge_mc(s->edge_emu_buffer,
340
        s->dsp.emulated_edge_mc(s->edge_emu_buffer,
341 341
                            src + s->block_offset[b] + (dy-2)*stride + (dx-2),
342 342
                            stride, 12, 12, x, y,
343 343
                            s->plane_width[plane],
libavcodec/vp8.c
1234 1234
        src += y_off * linesize + x_off;
1235 1235
        if (x_off < mx_idx || x_off >= width  - block_w - idx[2][mx] ||
1236 1236
            y_off < my_idx || y_off >= height - block_h - idx[2][my]) {
1237
            ff_emulated_edge_mc(s->edge_emu_buffer, src - my_idx * linesize - mx_idx, linesize,
1237
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, src - my_idx * linesize - mx_idx, linesize,
1238 1238
                                block_w + idx[1][mx], block_h + idx[1][my],
1239 1239
                                x_off - mx_idx, y_off - my_idx, width, height);
1240 1240
            src = s->edge_emu_buffer + mx_idx + linesize * my_idx;
libavcodec/wmv2.c
102 102
    if(s->flags&CODEC_FLAG_EMU_EDGE){
103 103
        if(src_x<1 || src_y<1 || src_x + 17  >= s->h_edge_pos
104 104
                              || src_y + h+1 >= v_edge_pos){
105
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr - 1 - s->linesize, s->linesize, 19, 19,
105
            s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr - 1 - s->linesize, s->linesize, 19, 19,
106 106
                             src_x-1, src_y-1, s->h_edge_pos, s->v_edge_pos);
107 107
            ptr= s->edge_emu_buffer + 1 + s->linesize;
108 108
            emu=1;
......
143 143
    offset = (src_y * uvlinesize) + src_x;
144 144
    ptr = ref_picture[1] + offset;
145 145
    if(emu){
146
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
146
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
147 147
                         src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
148 148
        ptr= s->edge_emu_buffer;
149 149
    }
......
151 151

  
152 152
    ptr = ref_picture[2] + offset;
153 153
    if(emu){
154
        ff_emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
154
        s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
155 155
                         src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);
156 156
        ptr= s->edge_emu_buffer;
157 157
    }

Also available in: Unified diff