Mercurial > libavcodec.hg
comparison error_resilience.c @ 11531:31033caa5344 libavcodec
Change ref_index structure so it matches how its organized in h264.
Also revert the related error concealment hotfix.
author | michael |
---|---|
date | Tue, 23 Mar 2010 02:17:04 +0000 |
parents | 2a8845a2687f |
children | 53822d92c3f7 |
comparison
equal
deleted
inserted
replaced
11530:86e4be64519e | 11531:31033caa5344 |
---|---|
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] && s->codec_id == CODEC_ID_H264) | 489 if(j && ref[j] != ref[j-1]) |
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 && s->codec_id == CODEC_ID_H264) //predictor intra or otherwise not available | 552 if(ref[j]<0) //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)); | |
771 | 770 |
772 if(s->avctx->debug&FF_DEBUG_ER){ | 771 if(s->avctx->debug&FF_DEBUG_ER){ |
773 for(mb_y=0; mb_y<s->mb_height; mb_y++){ | 772 for(mb_y=0; mb_y<s->mb_height; mb_y++){ |
774 for(mb_x=0; mb_x<s->mb_width; mb_x++){ | 773 for(mb_x=0; mb_x<s->mb_width; mb_x++){ |
775 int status= s->error_status_table[mb_x + mb_y*s->mb_stride]; | 774 int status= s->error_status_table[mb_x + mb_y*s->mb_stride]; |