From 1857cfa1e8f560c787995ba3f6ff40a89be46256 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Thu, 23 Feb 2017 12:38:24 -0800 Subject: [PATCH] Remove recon_variance variable from MACROBLOCK Skip redundant computation of recon_variance value. Change-Id: I0ea1a3528f8bdc7095d9cc458ce0bd3a958989b4 --- av1/encoder/block.h | 1 - av1/encoder/rdopt.c | 49 --------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/av1/encoder/block.h b/av1/encoder/block.h index 5c7aeb4b2..38fc18e74 100644 --- a/av1/encoder/block.h +++ b/av1/encoder/block.h @@ -119,7 +119,6 @@ struct macroblock { int mv_best_ref_index[TOTAL_REFS_PER_FRAME]; unsigned int max_mv_context[TOTAL_REFS_PER_FRAME]; unsigned int source_variance; - unsigned int recon_variance; unsigned int pred_sse[TOTAL_REFS_PER_FRAME]; int pred_mv_sad[TOTAL_REFS_PER_FRAME]; diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index bf6c94cb7..e91a50dbf 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c @@ -8979,18 +8979,6 @@ static int64_t handle_inter_mode( #endif // CONFIG_VAR_TX best_xskip = x->skip; best_disable_skip = *disable_skip; -#if CONFIG_AOM_HIGHBITDEPTH - if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - x->recon_variance = av1_high_get_sby_perpixel_variance( - cpi, &xd->plane[0].dst, bsize, xd->bd); - } else { - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); - } -#else - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); -#endif // CONFIG_AOM_HIGHBITDEPTH } } @@ -9014,19 +9002,6 @@ static int64_t handle_inter_mode( #if !(CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION) if (!is_comp_pred) single_skippable[this_mode][refs[0]] = rd_stats->skip; - -#if CONFIG_AOM_HIGHBITDEPTH - if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - x->recon_variance = av1_high_get_sby_perpixel_variance( - cpi, &xd->plane[0].dst, bsize, xd->bd); - } else { - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); - } -#else - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); -#endif // CONFIG_AOM_HIGHBITDEPTH #endif // !(CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION) restore_dst_buf(xd, orig_dst); @@ -9339,18 +9314,6 @@ static void pick_filter_intra_interframe( distortion2 = distortion_y + distortion_uv; av1_encode_intra_block_plane((AV1_COMMON *)cm, x, bsize, 0, 0, mi_row, mi_col); -#if CONFIG_AOM_HIGHBITDEPTH - if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - x->recon_variance = av1_high_get_sby_perpixel_variance( - cpi, &xd->plane[0].dst, bsize, xd->bd); - } else { - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); - } -#else - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); -#endif // CONFIG_AOM_HIGHBITDEPTH rate2 += ref_costs_single[INTRA_FRAME]; @@ -10168,18 +10131,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data, if (this_mode != DC_PRED && this_mode != TM_PRED) rate2 += intra_cost_penalty; distortion2 = distortion_y + distortion_uv; -#if CONFIG_AOM_HIGHBITDEPTH - if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - x->recon_variance = av1_high_get_sby_perpixel_variance( - cpi, &xd->plane[0].dst, bsize, xd->bd); - } else { - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); - } -#else - x->recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); -#endif // CONFIG_AOM_HIGHBITDEPTH } else { #if CONFIG_REF_MV int_mv backup_ref_mv[2]; -- GitLab