ref: aa88e32017dc84ebd1e962e9b6cd3deee25dcae0
parent: f617889be798710aec19ee843329e988b7aa3124
author: Marco <[email protected]>
date: Tue Aug 19 11:31:39 EDT 2014
Fixes to adaptive denoiser mode. Scale min_consec_zero_last wrt to #temporal layers, and use full framerate as factor in noise metric. Change-Id: Id0842b90164ce468d1236173c51965e7620c0e12
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -3303,7 +3303,8 @@
int skip = 2;
// Only select blocks for computing nmse that have been encoded
// as ZERO LAST min_consec_zero_last frames in a row.
- int min_consec_zero_last = 10;
+ // Scale with number of temporal layers.
+ int min_consec_zero_last = 8 / cpi->oxcf.number_of_layers;
// Decision is tested for changing the denoising mode every
// num_mode_change times this function is called. Note that this
// function called every 8 frames, so (8 * num_mode_change) is number
@@ -3310,8 +3311,9 @@
// of frames where denoising mode change is tested for switch.
int num_mode_change = 15;
// Framerate factor, to compensate for larger mse at lower framerates.
- // TODO(marpan): Adjust this factor,
- int fac_framerate = cpi->output_framerate < 25.0f ? 80 : 100;
+ // Use ref_framerate, which is full source framerate for temporal layers.
+ // TODO(marpan): Adjust this factor.
+ int fac_framerate = cpi->ref_framerate < 25.0f ? 80 : 100;
int tot_num_blocks = cm->mb_rows * cm->mb_cols;
int ystride = cpi->Source->y_stride;
unsigned char *src = cpi->Source->y_buffer;