OLD | NEW |
1 /* | 1 /* |
2 * Error resilience / concealment | 2 * Error resilience / concealment |
3 * | 3 * |
4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> | 4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> |
5 * | 5 * |
6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
7 * | 7 * |
8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 if(!s->error_recognition || s->error_count==0 || s->avctx->lowres || | 685 if(!s->error_recognition || s->error_count==0 || s->avctx->lowres || |
686 s->avctx->hwaccel || | 686 s->avctx->hwaccel || |
687 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || | 687 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || |
688 s->picture_structure != PICT_FRAME || // we dont support ER of field pict
ures yet, though it should not crash if enabled | 688 s->picture_structure != PICT_FRAME || // we dont support ER of field pict
ures yet, though it should not crash if enabled |
689 s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom
)) return; | 689 s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom
)) return; |
690 | 690 |
691 if(s->current_picture.motion_val[0] == NULL){ | 691 if(s->current_picture.motion_val[0] == NULL){ |
692 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); | 692 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); |
693 | 693 |
694 for(i=0; i<2; i++){ | 694 for(i=0; i<2; i++){ |
695 pic->ref_index[i]= av_mallocz(size * sizeof(uint8_t)); | 695 pic->ref_index[i]= av_mallocz(s->mb_stride * s->mb_height * 4 * size
of(uint8_t)); |
696 pic->motion_val_base[i]= av_mallocz((size+4) * 2 * sizeof(uint16_t))
; | 696 pic->motion_val_base[i]= av_mallocz((size+4) * 2 * sizeof(uint16_t))
; |
697 pic->motion_val[i]= pic->motion_val_base[i]+4; | 697 pic->motion_val[i]= pic->motion_val_base[i]+4; |
698 } | 698 } |
699 pic->motion_subsample_log2= 3; | 699 pic->motion_subsample_log2= 3; |
700 s->current_picture= *s->current_picture_ptr; | 700 s->current_picture= *s->current_picture_ptr; |
701 } | 701 } |
702 | 702 |
703 for(i=0; i<2; i++){ | 703 for(i=0; i<2; i++){ |
704 if(pic->ref_index[i]) | 704 if(pic->ref_index[i]) |
705 memset(pic->ref_index[i], 0, size * sizeof(uint8_t)); | 705 memset(pic->ref_index[i], 0, size * sizeof(uint8_t)); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 for(i=0; i<s->mb_num; i++){ | 1043 for(i=0; i<s->mb_num; i++){ |
1044 const int mb_xy= s->mb_index2xy[i]; | 1044 const int mb_xy= s->mb_index2xy[i]; |
1045 int error= s->error_status_table[mb_xy]; | 1045 int error= s->error_status_table[mb_xy]; |
1046 | 1046 |
1047 if(s->pict_type!=FF_B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){ | 1047 if(s->pict_type!=FF_B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){ |
1048 s->mbskip_table[mb_xy]=0; | 1048 s->mbskip_table[mb_xy]=0; |
1049 } | 1049 } |
1050 s->mbintra_table[mb_xy]=1; | 1050 s->mbintra_table[mb_xy]=1; |
1051 } | 1051 } |
1052 } | 1052 } |
OLD | NEW |