comparison error_resilience.c @ 8342:e76576f38ade libavcodec

Switch xvmc over to a CONFIG_ option.
author diego
date Mon, 15 Dec 2008 22:22:51 +0000
parents 8dc81763fb42
children 24c5744c3e96
comparison
equal deleted inserted replaced
8341:750453ac8c90 8342:e76576f38ade
561 undamaged_count++; 561 undamaged_count++;
562 } 562 }
563 563
564 if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction 564 if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
565 565
566 #ifdef HAVE_XVMC 566 #ifdef CONFIG_XVMC
567 //prevent dsp.sad() check, that requires access to the image 567 //prevent dsp.sad() check, that requires access to the image
568 if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1; 568 if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1;
569 #endif 569 #endif
570 570
571 skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs 571 skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs
932 } 932 }
933 } 933 }
934 }else 934 }else
935 guess_mv(s); 935 guess_mv(s);
936 936
937 #ifdef HAVE_XVMC 937 #ifdef CONFIG_XVMC
938 /* the filters below are not XvMC compatible, skip them */ 938 /* the filters below are not XvMC compatible, skip them */
939 if(s->avctx->xvmc_acceleration) goto ec_clean; 939 if(s->avctx->xvmc_acceleration) goto ec_clean;
940 #endif 940 #endif
941 /* fill DC for inter blocks */ 941 /* fill DC for inter blocks */
942 for(mb_y=0; mb_y<s->mb_height; mb_y++){ 942 for(mb_y=0; mb_y<s->mb_height; mb_y++){
1021 v_block_filter(s, s->current_picture.data[0], s->mb_width*2, s->mb_height*2, s->linesize , 1); 1021 v_block_filter(s, s->current_picture.data[0], s->mb_width*2, s->mb_height*2, s->linesize , 1);
1022 v_block_filter(s, s->current_picture.data[1], s->mb_width , s->mb_height , s->uvlinesize, 0); 1022 v_block_filter(s, s->current_picture.data[1], s->mb_width , s->mb_height , s->uvlinesize, 0);
1023 v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); 1023 v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0);
1024 } 1024 }
1025 1025
1026 #ifdef HAVE_XVMC 1026 #ifdef CONFIG_XVMC
1027 ec_clean: 1027 ec_clean:
1028 #endif 1028 #endif
1029 /* clean a few tables */ 1029 /* clean a few tables */
1030 for(i=0; i<s->mb_num; i++){ 1030 for(i=0; i<s->mb_num; i++){
1031 const int mb_xy= s->mb_index2xy[i]; 1031 const int mb_xy= s->mb_index2xy[i];