summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_noise_estimate.c
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2015-11-13 00:13:32 +0000
committerMarco Paniconi <marpan@google.com>2015-11-13 00:13:32 +0000
commit866c9357c22b9b29d5913fa85720ba74fc89b178 (patch)
treed4e0330395a8efc509305d62c1fad774cce0a728 /vp9/encoder/vp9_noise_estimate.c
parent6b79a1e3e0dfc265f43445b8181aa95e1c02deac (diff)
downloadlibvpx-866c9357c22b9b29d5913fa85720ba74fc89b178.tar.gz
Revert "Update to noise estimation."
This reverts commit 6b79a1e3e0dfc265f43445b8181aa95e1c02deac. Change-Id: I5a4923ca8a6de842855ce0725e92567ccbed6fb7
Diffstat (limited to 'vp9/encoder/vp9_noise_estimate.c')
-rw-r--r--vp9/encoder/vp9_noise_estimate.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/vp9/encoder/vp9_noise_estimate.c b/vp9/encoder/vp9_noise_estimate.c
index f24be3cfd..ddf081c86 100644
--- a/vp9/encoder/vp9_noise_estimate.c
+++ b/vp9/encoder/vp9_noise_estimate.c
@@ -88,7 +88,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
// Estimate of noise level every frame_period frames.
int frame_period = 10;
int thresh_consec_zeromv = 8;
- unsigned int thresh_sum_diff = 80;
+ unsigned int thresh_sum_diff = 128;
unsigned int thresh_sum_spatial = (200 * 200) << 8;
unsigned int thresh_spatial_var = (32 * 32) << 8;
int num_frames_estimate = 20;
@@ -135,17 +135,6 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
const int uv_width_shift = y_width_shift >> 1;
const int uv_height_shift = y_height_shift >> 1;
int mi_row, mi_col;
- int num_low_motion = 0;
- int frame_low_motion = 1;
- for (mi_row = 0; mi_row < cm->mi_rows; mi_row++) {
- for (mi_col = 0; mi_col < cm->mi_cols; mi_col++) {
- int bl_index = mi_row * cm->mi_cols + mi_col;
- if (cr->consec_zero_mv[bl_index] > thresh_consec_zeromv)
- num_low_motion++;
- }
- }
- if (num_low_motion < ((5 * cm->mi_rows * cm->mi_cols) >> 3))
- frame_low_motion = 1;
for (mi_row = 0; mi_row < cm->mi_rows; mi_row++) {
for (mi_col = 0; mi_col < cm->mi_cols; mi_col++) {
// 16x16 blocks, 1/4 sample of frame.
@@ -165,8 +154,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
const uint8_t vsource =
src_v[uv_height_shift * src_uvstride + uv_width_shift];
int is_skin = vp9_skin_pixel(ysource, usource, vsource);
- if (frame_low_motion &&
- cr->consec_zero_mv[bl_index] > thresh_consec_zeromv &&
+ if (cr->consec_zero_mv[bl_index] > thresh_consec_zeromv &&
cr->consec_zero_mv[bl_index1] > thresh_consec_zeromv &&
cr->consec_zero_mv[bl_index2] > thresh_consec_zeromv &&
cr->consec_zero_mv[bl_index3] > thresh_consec_zeromv &&
@@ -214,7 +202,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
// Normalize.
avg_est = avg_est / num_samples;
// Update noise estimate.
- ne->value = (int)((7 * ne->value + avg_est) >> 3);
+ ne->value = (int)((3 * ne->value + avg_est) >> 2);
ne->count++;
if (ne->count == num_frames_estimate) {
// Reset counter and check noise level condition.