Netflix / vmaf

Perceptual video quality assessment based on multi-method fusion.
Other
4.63k stars 754 forks source link

PSNR-HVS: fix JPEG #921

Open igv opened 3 years ago

igv commented 3 years ago

In comparison by WEBP2 team JPEG is too high and JPEG-XL is too low (but this looks like because of color bleeding). VIFp with fine scale sigma_nsq=256 shows similar results. Apparently it's too much. Fix that by increasing weights of medium frequencies:

float csf_y[8][8]={
    {1.6193873005, 2.2901594831, 2.08509755623, 1.60392119708, 1.33660099757, 1.21509181597, 1.10462892361, 1.00420811237},
    {2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.40609257487, 1.27826597715, 1.16205997923, 1.05641816294},
    {2.08509755623, 2.04793073064, 1.38801296701, 1.32191711144, 1.25896867756, 1.19901778815, 1.141921703, 1.03811063909},
    {1.60392119708, 1.68731108984, 1.32191711144, 1.2069677974, 1.14949314038, 1.09475537179, 0.99523215617, 0.79618572494},
    {1.33660099757, 1.40609257487, 1.25896867756, 1.14949314038, 1.04953721513, 0.95412474103, 0.79510395086, 0.58896588953},
    {1.21509181597, 1.27826597715, 1.19901778815, 1.09475537179, 0.95412474103, 0.77743497417, 0.57587775864, 0.44298289126},
    {1.10462892361, 1.16205997923, 1.141921703, 0.99523215617, 0.79510395086, 0.57587775864, 0.43190831898, 0.33223716845},
    {1.00420811237, 1.05641816294, 1.03811063909, 0.79618572494, 0.58896588953, 0.44298289126, 0.33223716845, 0.2399490661}
};

And decrease strength of masking:

    s_mask = sqrt(s_mask * s_gvar) / 45.f;
    d_mask = sqrt(d_mask * d_gvar) / 45.f;

This shows similar result to VIFp with sigma_nsq=100 (still a little bit too much in my opinion), which is similar to DSSIM.

igv commented 3 years ago

Slightly increased weights of high frequencies for consistency (they are almost always masked anyway).