From e702b68b6c77c2d10f665d063ad7d74948e810da Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Fri, 11 Aug 2017 12:24:33 -0700 Subject: [PATCH] vp9: strip mb graph code when CONFIG_REALTIME_ONLY is enabled. BUG=webm:1446 Change-Id: I4b1b8e9a456830ba1b1bd3a8882e038d37ee7903 --- vp9/encoder/vp9_encoder.c | 11 +++++++---- vp9/vp9cx.mk | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 4888c20f4..fc211a5d7 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -914,6 +914,7 @@ static void restore_coding_context(VP9_COMP *cpi) { *cm->fc = cc->fc; } +#if !CONFIG_REALTIME_ONLY static void configure_static_seg_features(VP9_COMP *cpi) { VP9_COMMON *const cm = &cpi->common; const RATE_CONTROL *const rc = &cpi->rc; @@ -1037,6 +1038,7 @@ static void configure_static_seg_features(VP9_COMP *cpi) { } } } +#endif // !CONFIG_REALTIME_ONLY static void update_reference_segmentation_map(VP9_COMP *cpi) { VP9_COMMON *const cm = &cpi->common; @@ -3214,7 +3216,6 @@ static void set_size_independent_vars(VP9_COMP *cpi) { static void set_size_dependent_vars(VP9_COMP *cpi, int *q, int *bottom_index, int *top_index) { VP9_COMMON *const cm = &cpi->common; - const VP9EncoderConfig *const oxcf = &cpi->oxcf; // Setup variables that depend on the dimensions of the frame. vp9_set_speed_features_framesize_dependent(cpi); @@ -3226,17 +3227,19 @@ static void set_size_dependent_vars(VP9_COMP *cpi, int *q, int *bottom_index, vp9_set_high_precision_mv(cpi, (*q) < HIGH_PRECISION_MV_QTHRESH); } +#if !CONFIG_REALTIME_ONLY // Configure experimental use of segmentation for enhanced coding of // static regions if indicated. // Only allowed in the second pass of a two pass encode, as it requires // lagged coding, and if the relevant speed feature flag is set. - if (oxcf->pass == 2 && cpi->sf.static_segmentation) + if (cpi->oxcf.pass == 2 && cpi->sf.static_segmentation) configure_static_seg_features(cpi); +#endif // !CONFIG_REALTIME_ONLY #if CONFIG_VP9_POSTPROC && !(CONFIG_VP9_TEMPORAL_DENOISING) - if (oxcf->noise_sensitivity > 0) { + if (cpi->oxcf.noise_sensitivity > 0) { int l = 0; - switch (oxcf->noise_sensitivity) { + switch (cpi->oxcf.noise_sensitivity) { case 1: l = 20; break; case 2: l = 40; break; case 3: l = 60; break; diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk index 09d8ec8ef..d46e39667 100644 --- a/vp9/vp9cx.mk +++ b/vp9/vp9cx.mk @@ -140,5 +140,6 @@ VP9_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/vp9_fdct_msa.h # Strip unnecessary files with CONFIG_REALTIME_ONLY VP9_CX_SRCS_REMOVE-$(CONFIG_REALTIME_ONLY) += encoder/vp9_firstpass.c +VP9_CX_SRCS_REMOVE-$(CONFIG_REALTIME_ONLY) += encoder/vp9_mbgraph.c VP9_CX_SRCS-yes := $(filter-out $(VP9_CX_SRCS_REMOVE-yes),$(VP9_CX_SRCS-yes)) -- 2.49.0