diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 5eefdc4602..452641e408 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -271,6 +271,15 @@ static int decode_slice(MpegEncContext *s) ff_tlog(NULL, "Decoding MB at %dx%d\n", s->mb_x, s->mb_y); ret = s->decode_mb(s, s->block); + if (s->h263_pred || s->h263_aic) { + int mb_xy = s->mb_y * s->mb_stride + s->mb_x; + if (!s->mb_intra) { + if (s->mbintra_table[mb_xy]) + ff_clean_intra_table_entries(s); + } else + s->mbintra_table[mb_xy] = 1; + } + if (s->pict_type != AV_PICTURE_TYPE_B) ff_h263_update_motion_val(s); diff --git a/libavcodec/mpv_reconstruct_mb_template.c b/libavcodec/mpv_reconstruct_mb_template.c index f1cb0d7989..981c837642 100644 --- a/libavcodec/mpv_reconstruct_mb_template.c +++ b/libavcodec/mpv_reconstruct_mb_template.c @@ -61,6 +61,7 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], s->cur_pic.qscale_table[mb_xy] = s->qscale; +#if IS_ENCODER /* update DC predictors for P macroblocks */ if (!s->mb_intra) { if (is_mpeg12 != DEFINITELY_MPEG12_H261 && (s->h263_pred || s->h263_aic)) { @@ -70,7 +71,6 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], } else if (is_mpeg12 != DEFINITELY_MPEG12_H261 && (s->h263_pred || s->h263_aic)) s->mbintra_table[mb_xy] = 1; -#if IS_ENCODER if ((s->avctx->flags & AV_CODEC_FLAG_PSNR) || s->frame_skip_threshold || s->frame_skip_factor || !((s->intra_only || s->pict_type == AV_PICTURE_TYPE_B) && s->avctx->mb_decision != FF_MB_DECISION_RD)) // FIXME precalc