Skip to content
Snippets Groups Projects
error_resilience.c 38.7 KiB
Newer Older
  • Learn to ignore specific revisions
  •             const int mb_type= s->current_picture.mb_type[mb_xy];
    
                error= s->error_status_table[mb_xy];
    
                if(!(error&AC_ERROR)) continue;              //undamaged
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
                dest_y = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize;
                dest_cb= s->current_picture.data[1] + mb_x*8  + mb_y*8 *s->uvlinesize;
                dest_cr= s->current_picture.data[2] + mb_x*8  + mb_y*8 *s->uvlinesize;
    
                put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y);
            }
        }
    #endif
    
        if(s->avctx->error_concealment&FF_EC_DEBLOCK){
            /* filter horizontal block boundaries */
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
            h_block_filter(s, s->current_picture.data[0], s->mb_width*2, s->mb_height*2, s->linesize  , 1);
            h_block_filter(s, s->current_picture.data[1], s->mb_width  , s->mb_height  , s->uvlinesize, 0);
            h_block_filter(s, s->current_picture.data[2], s->mb_width  , s->mb_height  , s->uvlinesize, 0);
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
            v_block_filter(s, s->current_picture.data[0], s->mb_width*2, s->mb_height*2, s->linesize  , 1);
            v_block_filter(s, s->current_picture.data[1], s->mb_width  , s->mb_height  , s->uvlinesize, 0);
            v_block_filter(s, s->current_picture.data[2], s->mb_width  , s->mb_height  , s->uvlinesize, 0);
    
    Ivan Kalvachev's avatar
    Ivan Kalvachev committed
    ec_clean:
    
        /* clean a few tables */
        for(i=0; i<s->mb_num; i++){
    
            const int mb_xy= s->mb_index2xy[i];
            int error= s->error_status_table[mb_xy];
    
            if(s->pict_type!=FF_B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){