Speed up tune=vmaf_with_preprocessing mode
Disable RDO multiplier scaling for this mode to save encoding time.
The mode differences can be summarized as following:
tune=vmaf vmaf_with_pp vmaf_without_pp
Frame based preprocessing X V X
Block based preprocessing V X X
RDO multiplier scaling V X V
QP adjustment V V V
The VMAF BD-rate change
-----------------------
Baseline: tune=psnr
old new
Lowres_10bd -25.88% -25.44%
Midres -27.18% -25.50%
Midres_10bd -30.73% -30.90%
Hdres -36.72% -36.03%
Fyi,
tune=vmaf vmaf_without_preprocessing
Lowres_10bd -26.90% -5.06%
Midres -28.19% -4.77%
Midres_10bd -33.10% -4.24%
Hdres -38.04% -4.59%
Speed test for different modes
------------------------------
Performance counter stats for './aomenc red_kayak_480p.y4m --limit=30
-o output_new --tune=vmaf_without_preprocessing --cpu-used=1'
New tune=vmaf_with_preprocessing
774,724,635,890 instructions:u
104.010053526 seconds time elapsed
104.012937000 seconds user
3.858861000 seconds sys
Old tune=vmaf_with_preprocessing
1,310,749,642,864 instructions:u
93.577722852 seconds time elapsed
226.912579000 seconds user
5.209748000 seconds sys
Fyi,
Tune=psnr
649,048,190,935 instructions:u
84.420997459 seconds time elapsed
84.107771000 seconds user
0.303984000 seconds sys
Tune=vmaf
1,412,870,451,983 instructions:u
153.464040921 seconds time elapsed
262.993312000 seconds user
81.008326000 seconds sys
Tune=vmaf_without_preprocessing
1,230,166,789,702 instructions:u
83.081840326 seconds time elapsed
206.672262000 seconds user
6.002862000 seconds sys
Change-Id: Idf3808ec5926a1d7c9b793459198640cb023f497
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 1e4b9a2..40eeb6a 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -375,8 +375,7 @@
set_ssim_rdmult(cpi, x, bsize, mi_row, mi_col, &x->rdmult);
}
#if CONFIG_TUNE_VMAF
- if (cpi->oxcf.tuning == AOM_TUNE_VMAF_WITH_PREPROCESSING ||
- cpi->oxcf.tuning == AOM_TUNE_VMAF_WITHOUT_PREPROCESSING ||
+ if (cpi->oxcf.tuning == AOM_TUNE_VMAF_WITHOUT_PREPROCESSING ||
cpi->oxcf.tuning == AOM_TUNE_VMAF_MAX_GAIN) {
av1_set_vmaf_rdmult(cpi, x, bsize, mi_row, mi_col, &x->rdmult);
}
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 751e0dd..c58215e 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -6307,7 +6307,6 @@
#if CONFIG_TUNE_VMAF
if (oxcf->tuning == AOM_TUNE_VMAF_WITHOUT_PREPROCESSING ||
- oxcf->tuning == AOM_TUNE_VMAF_WITH_PREPROCESSING ||
oxcf->tuning == AOM_TUNE_VMAF_MAX_GAIN) {
av1_set_mb_vmaf_rdmult_scaling(cpi);
}