x264_me_t m[2];
int i_bcost = COST_MAX;
int list_used = 0;
+ /* A small, arbitrary bias to avoid VBV problems caused by zero-residual lookahead blocks. */
+ int lowres_penalty = 4;
h->mb.pic.p_fenc[0] = h->mb.pic.fenc_buf;
h->mc.copy[PIXEL_8x8]( h->mb.pic.p_fenc[0], FENC_STRIDE, &fenc->lowres[0][i_pel_offset], i_stride, 8 );
}
}
- i_icost += intra_penalty;
+ i_icost += intra_penalty + lowres_penalty;
fenc->i_intra_cost[i_mb_xy] = i_icost;
int i_icost_aq = i_icost;
if( h->param.rc.i_aq_mode )
fenc->i_cost_est_aq[0][0] += i_icost_aq;
}
}
+ i_bcost += lowres_penalty;
/* forbid intra-mbs in B-frames, because it's rare and not worth checking */
/* FIXME: Should we still forbid them now that we cache intra scores? */