comparison error_resilience.c @ 11511:6bf21de8e6eb libavcodec

Hotfix for regtest-error failure a proper fix appears to require changing h263/mpeg2/motion est to index ref_index like h264. Ill do this change and then revert this hotfix but it will take a bit time.
author michael
date Sat, 20 Mar 2010 16:51:36 +0000
parents 927b985f73f4
children 2a8845a2687f
comparison
equal deleted inserted replaced
11510:927b985f73f4 11511:6bf21de8e6eb
484 484
485 for(j=0; j<pred_count; j++){ 485 for(j=0; j<pred_count; j++){
486 sum_x+= mv_predictor[j][0]; 486 sum_x+= mv_predictor[j][0];
487 sum_y+= mv_predictor[j][1]; 487 sum_y+= mv_predictor[j][1];
488 sum_r+= ref[j]; 488 sum_r+= ref[j];
489 if(j && ref[j] != ref[j-1]) 489 if(j && ref[j] != ref[j-1] && s->codec_id == CODEC_ID_H264)
490 goto skip_mean_and_median; 490 goto skip_mean_and_median;
491 } 491 }
492 492
493 /* mean */ 493 /* mean */
494 mv_predictor[pred_count][0] = sum_x/j; 494 mv_predictor[pred_count][0] = sum_x/j;
547 uint8_t *src= s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; 547 uint8_t *src= s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize;
548 548
549 s->current_picture.motion_val[0][mot_index][0]= s->mv[0][0][0]= mv_predictor[j][0]; 549 s->current_picture.motion_val[0][mot_index][0]= s->mv[0][0][0]= mv_predictor[j][0];
550 s->current_picture.motion_val[0][mot_index][1]= s->mv[0][0][1]= mv_predictor[j][1]; 550 s->current_picture.motion_val[0][mot_index][1]= s->mv[0][0][1]= mv_predictor[j][1];
551 551
552 if(ref[j]<0) //predictor intra or otherwise not available 552 if(ref[j]<0 && s->codec_id == CODEC_ID_H264) //predictor intra or otherwise not available
553 continue; 553 continue;
554 554
555 decode_mb(s, ref[j]); 555 decode_mb(s, ref[j]);
556 556
557 if(mb_x>0 && fixed[mb_xy-1]){ 557 if(mb_x>0 && fixed[mb_xy-1]){
765 pic->motion_val[i]= pic->motion_val_base[i]+4; 765 pic->motion_val[i]= pic->motion_val_base[i]+4;
766 } 766 }
767 pic->motion_subsample_log2= 3; 767 pic->motion_subsample_log2= 3;
768 s->current_picture= *s->current_picture_ptr; 768 s->current_picture= *s->current_picture_ptr;
769 } 769 }
770 pic->ref_index[0]= av_realloc(pic->ref_index[0], s->mb_stride * s->mb_height * 4 * sizeof(uint8_t));
770 771
771 if(s->avctx->debug&FF_DEBUG_ER){ 772 if(s->avctx->debug&FF_DEBUG_ER){
772 for(mb_y=0; mb_y<s->mb_height; mb_y++){ 773 for(mb_y=0; mb_y<s->mb_height; mb_y++){
773 for(mb_x=0; mb_x<s->mb_width; mb_x++){ 774 for(mb_x=0; mb_x<s->mb_width; mb_x++){
774 int status= s->error_status_table[mb_x + mb_y*s->mb_stride]; 775 int status= s->error_status_table[mb_x + mb_y*s->mb_stride];