Revision d23e3e5f libavcodec/mpegvideo_common.h

View differences:

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);

Also available in: Unified diff