Adjust the extra bias applied for very low variance blocks to focus
mainly on DC_PRED.
Change-Id: I8f1c1a29932f319535807046846b604b5b8827c1
static void rd_variance_adjustment(VP9_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bsize, int64_t *this_rd,
struct buf_2d *recon,
static void rd_variance_adjustment(VP9_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bsize, int64_t *this_rd,
struct buf_2d *recon,
- MV_REFERENCE_FRAME ref_frame) {
+ MV_REFERENCE_FRAME ref_frame,
+ PREDICTION_MODE this_mode) {
MACROBLOCKD *const xd = &x->e_mbd;
unsigned int rec_variance;
unsigned int src_variance;
MACROBLOCKD *const xd = &x->e_mbd;
unsigned int rec_variance;
unsigned int src_variance;
if (content_type == VP9E_CONTENT_FILM) {
if (src_rec_min <= LOW_VAR_THRESH / 2) {
if (content_type == VP9E_CONTENT_FILM) {
if (src_rec_min <= LOW_VAR_THRESH / 2) {
- if (ref_frame == INTRA_FRAME) *this_rd *= 2;
- if (bsize > BLOCK_16X16) *this_rd *= 2;
+ if (ref_frame == INTRA_FRAME) {
+ if (this_mode == DC_PRED)
+ *this_rd *= 2;
+ else
+ *this_rd += (*this_rd / 4);
+ }
// Apply an adjustment to the rd value based on the similarity of the
// source variance and reconstructed variance.
if (recon) {
// Apply an adjustment to the rd value based on the similarity of the
// source variance and reconstructed variance.
if (recon) {
- rd_variance_adjustment(cpi, x, bsize, &this_rd, recon, ref_frame);
+ rd_variance_adjustment(cpi, x, bsize, &this_rd, recon, ref_frame,
+ this_mode);
}
if (ref_frame == INTRA_FRAME) {
}
if (ref_frame == INTRA_FRAME) {