vp9: Fixes for usage of skin_map for high bit depth.

Also avoid noise_estimation and source_sad if use_highbitdepth is set.

Change-Id: I5fea396b8f8380ea377045d99ba22a52b92daa46
This commit is contained in:
Marco 2017-01-26 14:09:57 -08:00
parent eacc3b4ccf
commit db99840bf6
3 changed files with 10 additions and 8 deletions

View File

@ -647,12 +647,14 @@ static void fill_variance_8x8avg(const uint8_t *s, int sp, const uint8_t *d,
}
}
#if !CONFIG_VP9_HIGHBITDEPTH
// Check if most of the superblock is skin content, and if so, force split to
// 32x32, and set x->sb_is_skin for use in mode selection.
static int skin_sb_split(VP9_COMP *cpi, MACROBLOCK *x, const int low_res,
int mi_row, int mi_col, int *force_split) {
VP9_COMMON *const cm = &cpi->common;
#if CONFIG_VP9_HIGHBITDEPTH
if (cm->use_highbitdepth) return 0;
#endif
// Avoid checking superblocks on/near boundary and avoid low resolutions.
// Note superblock may still pick 64X64 if y_sad is very small
// (i.e., y_sad < cpi->vbp_threshold_sad) below. For now leave this as is.
@ -707,7 +709,6 @@ static int skin_sb_split(VP9_COMP *cpi, MACROBLOCK *x, const int low_res,
}
return 0;
}
#endif
static void set_low_temp_var_flag(VP9_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd,
v64x64 *vt, int64_t thresholds[],
@ -1048,12 +1049,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
set_ref_ptrs(cm, xd, mi->ref_frame[0], mi->ref_frame[1]);
vp9_build_inter_predictors_sb(xd, mi_row, mi_col, BLOCK_64X64);
x->sb_is_skin = 0;
#if !CONFIG_VP9_HIGHBITDEPTH
if (cpi->use_skin_detection)
x->sb_is_skin =
skin_sb_split(cpi, x, low_res, mi_row, mi_col, force_split);
#endif
x->sb_is_skin = skin_sb_split(cpi, x, low_res, mi_row, mi_col, force_split);
d = xd->plane[0].dst.buf;
dp = xd->plane[0].dst.stride;

View File

@ -38,6 +38,9 @@ void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height) {
}
static int enable_noise_estimation(VP9_COMP *const cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
if (cpi->common.use_highbitdepth) return 0;
#endif
// Enable noise estimation if denoising is on, but not for low resolutions.
#if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) &&

View File

@ -2181,6 +2181,9 @@ void adjust_gf_boost_lag_one_pass_vbr(VP9_COMP *cpi, uint64_t avg_sad_current) {
void vp9_avg_source_sad(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
#if CONFIG_VP9_HIGHBITDEPTH
if (cm->use_highbitdepth) return;
#endif
rc->high_source_sad = 0;
if (cpi->Last_Source != NULL &&
cpi->Last_Source->y_width == cpi->Source->y_width &&