Merge "vp9: 1 pass cbr: allow noise estimation down to 360p."
This commit is contained in:
@@ -477,8 +477,8 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q) {
|
|||||||
thresholds[2] = threshold_base >> 2;
|
thresholds[2] = threshold_base >> 2;
|
||||||
thresholds[3] = threshold_base << 2;
|
thresholds[3] = threshold_base << 2;
|
||||||
} else {
|
} else {
|
||||||
// Increase base variance threshold based on estimated noise level.
|
// Increase base variance threshold based on estimated noise level.
|
||||||
if (cpi->noise_estimate.enabled) {
|
if (cpi->noise_estimate.enabled && cm->width >= 640 && cm->height >= 480) {
|
||||||
NOISE_LEVEL noise_level =
|
NOISE_LEVEL noise_level =
|
||||||
vp9_noise_estimate_extract_level(&cpi->noise_estimate);
|
vp9_noise_estimate_extract_level(&cpi->noise_estimate);
|
||||||
if (noise_level == kHigh)
|
if (noise_level == kHigh)
|
||||||
|
@@ -26,13 +26,13 @@ void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height) {
|
|||||||
ne->level = kLowLow;
|
ne->level = kLowLow;
|
||||||
ne->value = 0;
|
ne->value = 0;
|
||||||
ne->count = 0;
|
ne->count = 0;
|
||||||
ne->thresh = 90;
|
ne->thresh = 100;
|
||||||
ne->last_w = 0;
|
ne->last_w = 0;
|
||||||
ne->last_h = 0;
|
ne->last_h = 0;
|
||||||
if (width * height >= 1920 * 1080) {
|
if (width * height >= 1920 * 1080) {
|
||||||
ne->thresh = 200;
|
ne->thresh = 200;
|
||||||
} else if (width * height >= 1280 * 720) {
|
} else if (width * height >= 1280 * 720) {
|
||||||
ne->thresh = 130;
|
ne->thresh = 140;
|
||||||
}
|
}
|
||||||
ne->num_frames_estimate = 20;
|
ne->num_frames_estimate = 20;
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ static int enable_noise_estimation(VP9_COMP *const cpi) {
|
|||||||
cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cpi->oxcf.speed >= 5 &&
|
cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cpi->oxcf.speed >= 5 &&
|
||||||
cpi->resize_state == ORIG && cpi->resize_pending == 0 && !cpi->use_svc &&
|
cpi->resize_state == ORIG && cpi->resize_pending == 0 && !cpi->use_svc &&
|
||||||
cpi->oxcf.content != VP9E_CONTENT_SCREEN && cpi->common.width >= 640 &&
|
cpi->oxcf.content != VP9E_CONTENT_SCREEN && cpi->common.width >= 640 &&
|
||||||
cpi->common.height >= 480)
|
cpi->common.height >= 360)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user