History

Use a better model for tune=ssim

Comparing to the baseline tune=ssim, the average gains are PSNR -0.55, SSIM -0.30, MS-SSIM -0.98, VMAF -1.26 Details: (150f VBR) PSNR SSIM MS-SSIM VMAF Lowres -1.347 0.291 -0.307 -1.291 Midres -0.628 -0.329 -1.011 -2.173 Hdres 0.781 -0.656 -1.319 0.210 Ugc360p -2.695 -0.972 -1.503 -4.055 Lowres_bd10 0.074 0.196 -0.623 -0.835 Midres_bd10 0.517 -0.327 -1.124 0.566

sdeng committed 6 years ago

Commit e6bfdce1 parent 76d9afc1 file · +4 −14Browse files

Unified · Split

vp9/encoder/vp9_encoder.c+4−14
@@ -4863,17 +4863,6 @@ static void set_frame_index(VP9_COMP *cpi, VP9_COMMON *cm) { · 4862 unmodified lines
48634863 }
48644864 }
48654865
4866−// Implementation and modifications of C. Yeo, H. L. Tan, and Y. H. Tan, "On
4867−// rate distortion optimization using SSIM," Circuits and Systems for Video
4868−// Technology, IEEE Transactions on, vol. 23, no. 7, pp. 1170-1181, 2013.
4869−// SSIM_VAR_SCALE defines the strength of the bias towards SSIM in RDO.
4870−// Some sample values are:
4871−// (for midres test set)
4872−// SSIM_VAR_SCALE avg_psnr ssim ms_ssim
4873−// 8.0 9.421 -5.537 -6.898
4874−// 16.0 4.703 -5.378 -6.238
4875−// 32.0 1.929 -4.308 -4.807
4876−#define SSIM_VAR_SCALE 16.0
48774866 static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) {
48784867 VP9_COMMON *cm = &cpi->common;
48794868 ThreadData *td = &cpi->td;
@@ -4890,8 +4879,6 @@ static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) { · 10 unmodified lines
48904879 double log_sum = 0.0;
48914880 int row, col;
48924881
4893− const double c2 = 58.5225 * SSIM_VAR_SCALE; // 58.5225 = (.03*255)^2
4894−
48954882 // Loop through each 64x64 block.
48964883 for (row = 0; row < num_rows; ++row) {
48974884 for (col = 0; col < num_cols; ++col) {
@@ -4925,7 +4912,10 @@ static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) { · 27 unmodified lines
49254912 }
49264913 }
49274914 var = var / num_of_var / 64.0;
4928− var = 2.0 * var + c2;
4915+
4916+ // Curve fitting with an exponential model on all 16x16 blocks from the
4917+ // Midres dataset.
4918+ var = 67.035434 * (1 - exp(-0.0021489 * var)) + 17.492222;
49294919 cpi->mi_ssim_rdmult_scaling_factors[index] = var;
49304920 log_sum += log(var);
49314921 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t