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
4863 }4863 }
4864}4864}
4865 4865
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
4877static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) {4866static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) {
4878 VP9_COMMON *cm = &cpi->common;4867 VP9_COMMON *cm = &cpi->common;
4879 ThreadData *td = &cpi->td;4868 ThreadData *td = &cpi->td;
@@ -4890,8 +4879,6 @@ static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) { · 10 unmodified lines
4890 double log_sum = 0.0;4879 double log_sum = 0.0;
4891 int row, col;4880 int row, col;
4892 4881
4893 const double c2 = 58.5225 * SSIM_VAR_SCALE; // 58.5225 = (.03*255)^2
4894
4895 // Loop through each 64x64 block.4882 // Loop through each 64x64 block.
4896 for (row = 0; row < num_rows; ++row) {4883 for (row = 0; row < num_rows; ++row) {
4897 for (col = 0; col < num_cols; ++col) {4884 for (col = 0; col < num_cols; ++col) {
@@ -4925,7 +4912,10 @@ static void set_mb_ssim_rdmult_scaling(VP9_COMP *cpi) { · 27 unmodified lines
4925 }4912 }
4926 }4913 }
4927 var = var / num_of_var / 64.0;4914 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;
4929 cpi->mi_ssim_rdmult_scaling_factors[index] = var;4919 cpi->mi_ssim_rdmult_scaling_factors[index] = var;
4930 log_sum += log(var);4920 log_sum += log(var);
4931 }4921 }

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