summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2012-05-08 11:23:42 -0700
committerJohn Koleszar <jkoleszar@google.com>2012-05-08 15:01:24 -0700
commitc8f4c187b3009bf637a86241d56069cd64f84932 (patch)
tree6d119d5390db37f836d642611c6c07327e8bbdb5
parent14d827f44eebd2c375bd27483d30964f439e4b6b (diff)
downloadlibvpx-c8f4c187b3009bf637a86241d56069cd64f84932.tar.gz
Use consistent range for VP8E_SET_NOISE_SENSITIVITY
Accept the same range of inputs for the VP8E_SET_NOISE_SENSITIVITY control, regardless of whether temporal denoising is enabled or not. This is important for maintaining compatibility with existing applications. Change-Id: I94cd4bb09bf7c803516701a394cf1a63bfec0097
-rw-r--r--vp8/vp8_cx_iface.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index b3abf9583..5fb74c45e 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -177,19 +177,16 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK_BOOL(vp8_cfg, enable_auto_alt_ref);
RANGE_CHECK(vp8_cfg, cpu_used, -16, 16);
-#if CONFIG_TEMPORAL_DENOISING
- RANGE_CHECK(vp8_cfg, noise_sensitivity, 0, 1);
-#endif
#if !(CONFIG_REALTIME_ONLY)
RANGE_CHECK(vp8_cfg, encoding_mode, VP8_BEST_QUALITY_ENCODING, VP8_REAL_TIME_ENCODING);
-#if !(CONFIG_TEMPORAL_DENOISING)
- RANGE_CHECK_HI(vp8_cfg, noise_sensitivity, 6);
-#endif
#else
RANGE_CHECK(vp8_cfg, encoding_mode, VP8_REAL_TIME_ENCODING, VP8_REAL_TIME_ENCODING);
-#if !(CONFIG_TEMPORAL_DENOISING)
- RANGE_CHECK(vp8_cfg, noise_sensitivity, 0, 0);
#endif
+
+#if CONFIG_REALTIME_ONLY && !CONFIG_TEMPORAL_DENOISING
+ RANGE_CHECK(vp8_cfg, noise_sensitivity, 0, 0);
+#else
+ RANGE_CHECK_HI(vp8_cfg, noise_sensitivity, 6);
#endif
RANGE_CHECK(vp8_cfg, token_partitions, VP8_ONE_TOKENPARTITION, VP8_EIGHT_TOKENPARTITION);