From f3e7539c6786eb97014f623d8b4ee967b5bdac1c Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Tue, 15 Dec 2015 16:44:40 +0000 Subject: [PATCH] Revert "Add "unknown" status for noise estimation." This reverts commit e15fedb9258251bbb07def57e49e2bd1e0c4c538. Change-Id: Ibf2bce008c727a9754f88814b7630095fa7b8253 --- vp9/encoder/vp9_encodeframe.c | 2 +- vp9/encoder/vp9_noise_estimate.c | 4 ++-- vp9/encoder/vp9_noise_estimate.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 89f2bd9b8..1606b16a2 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -496,7 +496,7 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q) { threshold_base = 3 * threshold_base; else if (noise_level == kMedium) threshold_base = threshold_base << 1; - else if (noise_level == kLowLow) + else if (noise_level < kLow) threshold_base = (7 * threshold_base) >> 3; } if (cm->width <= 352 && cm->height <= 288) { diff --git a/vp9/encoder/vp9_noise_estimate.c b/vp9/encoder/vp9_noise_estimate.c index 6e717e53c..4befbb066 100644 --- a/vp9/encoder/vp9_noise_estimate.c +++ b/vp9/encoder/vp9_noise_estimate.c @@ -25,7 +25,7 @@ void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height) { ne->enabled = 0; - ne->level = kUnknown; + ne->level = kLowLow; ne->value = 0; ne->count = 0; ne->thresh = 90; @@ -83,7 +83,7 @@ static void copy_frame(YV12_BUFFER_CONFIG * const dest, } NOISE_LEVEL vp9_noise_estimate_extract_level(NOISE_ESTIMATE *const ne) { - int noise_level = kUnknown; + int noise_level = kLowLow; if (ne->value > (ne->thresh << 1)) { noise_level = kHigh; } else { diff --git a/vp9/encoder/vp9_noise_estimate.h b/vp9/encoder/vp9_noise_estimate.h index 266326286..826d125b5 100644 --- a/vp9/encoder/vp9_noise_estimate.h +++ b/vp9/encoder/vp9_noise_estimate.h @@ -24,7 +24,6 @@ extern "C" { #endif typedef enum noise_level { - kUnknown, kLowLow, kLow, kMedium,