ref: 988fd77c1fc9e9b47e1da00c3aeae932c3d06899
parent: 006fd192461915b8264e89d42165b15c2e4b7afa
author: Marco <[email protected]>
date: Fri Nov 13 03:09:17 EST 2015
Reduce sampling time for noise estimate. Change-Id: I46abd85e2187b8f4c2846416a23fab26d9b9f67d
--- a/vp9/encoder/vp9_noise_estimate.c
+++ b/vp9/encoder/vp9_noise_estimate.c
@@ -36,6 +36,7 @@
} else if (width * height >= 1280 * 720) {
ne->thresh = 130;
}
+ ne->num_frames_estimate = 20;
}
int enable_noise_estimation(VP9_COMP *const cpi) {
@@ -91,7 +92,6 @@
unsigned int thresh_sum_diff = 100;
unsigned int thresh_sum_spatial = (200 * 200) << 8;
unsigned int thresh_spatial_var = (32 * 32) << 8;
- int num_frames_estimate = 20;
int min_blocks_estimate = cm->mi_rows * cm->mi_cols >> 7;
// Estimate is between current source and last source.
YV12_BUFFER_CONFIG *last_source = cpi->Last_Source;
@@ -216,9 +216,9 @@
// Update noise estimate.
ne->value = (int)((15 * ne->value + avg_est) >> 4);
ne->count++;
- if (ne->count == num_frames_estimate) {
+ if (ne->count == ne->num_frames_estimate) {
// Reset counter and check noise level condition.
- num_frames_estimate = 40;
+ ne->num_frames_estimate = 30;
ne->count = 0;
if (ne->value > (ne->thresh << 1))
ne->level = kHigh;
--- a/vp9/encoder/vp9_noise_estimate.h
+++ b/vp9/encoder/vp9_noise_estimate.h
@@ -38,6 +38,7 @@
int count;
int last_w;
int last_h;
+ int num_frames_estimate;
} NOISE_ESTIMATE;
struct VP9_COMP;