Revision fbd312fd libavcodec/h264.c

View differences:

libavcodec/h264.c
2578 2578
    int emu=0;
2579 2579
    const int full_mx= mx>>2;
2580 2580
    const int full_my= my>>2;
2581
    const int pic_width  = 16*s->mb_width;
2582
    const int pic_height = 16*s->mb_height;
2581 2583
    
2582 2584
    assert(pic->data[0]);
2583 2585
    
......
2586 2588
    
2587 2589
    if(   full_mx < 0-extra_width 
2588 2590
       || full_my < 0-extra_height 
2589
       || full_mx + 16/*FIXME*/ > s->width + extra_width 
2590
       || full_my + 16/*FIXME*/ > s->height + extra_height){
2591
        ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*s->linesize, s->linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, s->width, s->height);
2591
       || full_mx + 16/*FIXME*/ > pic_width + extra_width 
2592
       || full_my + 16/*FIXME*/ > pic_height + extra_height){
2593
        ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*s->linesize, s->linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height);
2592 2594
            src_y= s->edge_emu_buffer + 2 + 2*s->linesize;
2593 2595
        emu=1;
2594 2596
    }
......
2601 2603
    if(s->flags&CODEC_FLAG_GRAY) return;
2602 2604
    
2603 2605
    if(emu){
2604
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cb, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
2606
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cb, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
2605 2607
            src_cb= s->edge_emu_buffer;
2606 2608
    }
2607 2609
    chroma_op(dest_cb, src_cb, s->uvlinesize, chroma_height, mx&7, my&7);
2608 2610

  
2609 2611
    if(emu){
2610
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cr, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
2612
        ff_emulated_edge_mc(s->edge_emu_buffer, src_cr, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
2611 2613
            src_cr= s->edge_emu_buffer;
2612 2614
    }
2613 2615
    chroma_op(dest_cr, src_cr, s->uvlinesize, chroma_height, mx&7, my&7);

Also available in: Unified diff