summaryrefslogtreecommitdiff
path: root/libavcodec/error_resilience.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-03-20 16:51:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-03-20 16:51:36 +0000
commitb297129bdb0e779824db9b50440570212df58353 (patch)
treee830b2c390554d7107b661456674e82e15314990 /libavcodec/error_resilience.c
parent59b4b540148e6f7ff1f82983f9eb1aeec3dec359 (diff)
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. Originally committed as revision 22608 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index c6eea3811e..58eaa3496b 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -486,7 +486,7 @@ int score_sum=0;
sum_x+= mv_predictor[j][0];
sum_y+= mv_predictor[j][1];
sum_r+= ref[j];
- if(j && ref[j] != ref[j-1])
+ if(j && ref[j] != ref[j-1] && s->codec_id == CODEC_ID_H264)
goto skip_mean_and_median;
}
@@ -549,7 +549,7 @@ skip_mean_and_median:
s->current_picture.motion_val[0][mot_index][0]= s->mv[0][0][0]= mv_predictor[j][0];
s->current_picture.motion_val[0][mot_index][1]= s->mv[0][0][1]= mv_predictor[j][1];
- if(ref[j]<0) //predictor intra or otherwise not available
+ if(ref[j]<0 && s->codec_id == CODEC_ID_H264) //predictor intra or otherwise not available
continue;
decode_mb(s, ref[j]);
@@ -767,6 +767,7 @@ void ff_er_frame_end(MpegEncContext *s){
pic->motion_subsample_log2= 3;
s->current_picture= *s->current_picture_ptr;
}
+ pic->ref_index[0]= av_realloc(pic->ref_index[0], s->mb_stride * s->mb_height * 4 * sizeof(uint8_t));
if(s->avctx->debug&FF_DEBUG_ER){
for(mb_y=0; mb_y<s->mb_height; mb_y++){