It is not part of reconstructing the macroblock.
Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -3205,12 +3205,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 3204 unmodified lines | ||
| 3205 | 3205 | s->mv[0][0][1] = 0; |
| 3206 | 3206 | encode_mb_hq(s, &backup_s, &best_s, pb, pb2, tex_pb, |
| 3207 | 3207 | &dmin, &next_block, 0, 0); |
| 3208 | − if(s->h263_pred || s->h263_aic){ | |
| 3209 | − if(best_s.mb_intra) | |
| 3210 | − s->mbintra_table[mb_x + mb_y*s->mb_stride]=1; | |
| 3211 | − else | |
| 3212 | − ff_clean_intra_table_entries(s); //old mode? | |
| 3213 | − } | |
| 3208 | + s->mbintra_table[xy] = 1; | |
| 3214 | 3209 | } |
| 3215 | 3210 | |
| 3216 | 3211 | if ((s->mpv_flags & FF_MPV_FLAG_QP_RD) && dmin < INT_MAX) { |
| @@ -3357,6 +3352,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 140 unmodified lines | ||
| 3357 | 3352 | s->mb_intra= 1; |
| 3358 | 3353 | motion_x= s->mv[0][0][0] = 0; |
| 3359 | 3354 | motion_y= s->mv[0][0][1] = 0; |
| 3355 | + s->mbintra_table[xy] = 1; | |
| 3360 | 3356 | break; |
| 3361 | 3357 | case CANDIDATE_MB_TYPE_INTER: |
| 3362 | 3358 | s->mv_dir = MV_DIR_FORWARD; |
| @@ -3471,7 +3467,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 108 unmodified lines | ||
| 3471 | 3467 | if(s->mb_intra /* && I,P,S_TYPE */){ |
| 3472 | 3468 | s->p_mv_table[xy][0]=0; |
| 3473 | 3469 | s->p_mv_table[xy][1]=0; |
| 3474 | − } | |
| 3470 | + } else if ((s->h263_pred || s->h263_aic) && s->mbintra_table[xy]) | |
| 3471 | + ff_clean_intra_table_entries(s); | |
| 3475 | 3472 | |
| 3476 | 3473 | if (s->avctx->flags & AV_CODEC_FLAG_PSNR) { |
| 3477 | 3474 | int w= 16; |
| @@ -62,15 +62,6 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 61 unmodified lines | ||
| 62 | 62 | s->cur_pic.qscale_table[mb_xy] = s->qscale; |
| 63 | 63 | |
| 64 | 64 | #if IS_ENCODER |
| 65 | − /* update DC predictors for P macroblocks */ | |
| 66 | − if (!s->mb_intra) { | |
| 67 | − if (is_mpeg12 != DEFINITELY_MPEG12_H261 && (s->h263_pred || s->h263_aic)) { | |
| 68 | − if (s->mbintra_table[mb_xy]) | |
| 69 | − ff_clean_intra_table_entries(s); | |
| 70 | − } | |
| 71 | − } else if (is_mpeg12 != DEFINITELY_MPEG12_H261 && (s->h263_pred || s->h263_aic)) | |
| 72 | − s->mbintra_table[mb_xy] = 1; | |
| 73 | − | |
| 74 | 65 | if ((s->avctx->flags & AV_CODEC_FLAG_PSNR) || s->frame_skip_threshold || s->frame_skip_factor || |
| 75 | 66 | !((s->intra_only || s->pict_type == AV_PICTURE_TYPE_B) && |
| 76 | 67 | s->avctx->mb_decision != FF_MB_DECISION_RD)) // FIXME precalc |