summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2015-12-04 11:57:04 -0800
committerMarco <marpan@google.com>2015-12-04 14:43:39 -0800
commitd5b3f29f3c19583bb9b5a10b96c1f23ec66f9689 (patch)
tree98981a89fe1ce678bdfc4ae4858201454d35087c
parent64e46a033fa4bc86f3cde4fa5424e8fb0970cafa (diff)
downloadlibvpx-d5b3f29f3c19583bb9b5a10b96c1f23ec66f9689.tar
libvpx-d5b3f29f3c19583bb9b5a10b96c1f23ec66f9689.tar.gz
libvpx-d5b3f29f3c19583bb9b5a10b96c1f23ec66f9689.tar.bz2
libvpx-d5b3f29f3c19583bb9b5a10b96c1f23ec66f9689.zip
Adjust variance threshold based on source noise level.
For non-rd variance partition: Adjust variance threhsold based on noise level estimate. This change allows the adjustment to be updated more frequently. Change-Id: Ie2abf63bf3f1ee54d0bc4ff497298801fdb92b0d
-rw-r--r--vp9/encoder/vp9_encodeframe.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 17ba95652..c643b1848 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -488,13 +488,14 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q) {
thresholds[2] = threshold_base >> 2;
thresholds[3] = threshold_base << 2;
} else {
- // Increase base variance threshold if estimated noise level is high.
+ // Increase base variance threshold based on estimated noise level.
if (cpi->noise_estimate.enabled) {
- if (cpi->noise_estimate.level == kHigh)
+ NOISE_LEVEL noise_level = vp9_noise_estimate_extract_level(
+ &cpi->noise_estimate);
+ if (noise_level == kHigh)
threshold_base = 3 * threshold_base;
- else
- if (cpi->noise_estimate.level == kMedium)
- threshold_base = threshold_base << 1;
+ else if (noise_level == kMedium)
+ threshold_base = threshold_base << 1;
}
if (cm->width <= 352 && cm->height <= 288) {
thresholds[0] = threshold_base >> 3;