Add "unknown" status for noise estimation. Change-Id: I0fe95332ccfa2e1ad2a01a8e7ddd631289e0f8eb
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 1606b16..89f2bd9 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c
@@ -496,7 +496,7 @@ threshold_base = 3 * threshold_base; else if (noise_level == kMedium) threshold_base = threshold_base << 1; - else if (noise_level < kLow) + else if (noise_level == kLowLow) 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 4befbb0..6e717e5 100644 --- a/vp9/encoder/vp9_noise_estimate.c +++ b/vp9/encoder/vp9_noise_estimate.c
@@ -25,7 +25,7 @@ int width, int height) { ne->enabled = 0; - ne->level = kLowLow; + ne->level = kUnknown; ne->value = 0; ne->count = 0; ne->thresh = 90; @@ -83,7 +83,7 @@ } NOISE_LEVEL vp9_noise_estimate_extract_level(NOISE_ESTIMATE *const ne) { - int noise_level = kLowLow; + int noise_level = kUnknown; 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 826d125..2663262 100644 --- a/vp9/encoder/vp9_noise_estimate.h +++ b/vp9/encoder/vp9_noise_estimate.h
@@ -24,6 +24,7 @@ #endif typedef enum noise_level { + kUnknown, kLowLow, kLow, kMedium,