xiph / daala

Modern video compression for the internet
https://xiph.org/daala/
BSD 2-Clause "Simplified" License
542 stars 102 forks source link

Change PVQ QM scale from Q4 to Q6 and refit chroma #192

Closed barrbrain closed 8 years ago

barrbrain commented 8 years ago

This is a bitstream change with respect to QM sequence. This would almost be a no-op except that the DC scales are updated for the additional precision. This does seem to worsen chroma performance, due to sensitivity to rounding behavior.

Results for ntt-short-1: https://arewecompressedyet.com/?r%5B%5D=pvq-q6-only-2016-05-21T14-31-16.675Z&r%5B%5D=master-2016-05-19-621b1c8&s=ntt-short-1

AWCY Report v0.2
Reference: master-2016-05-19-621b1c8
Test Run: pvq-q6-only-2016-05-21T14-31-16.675Z
Range: Anchor vp9-anchor-ntt-short-1c q range 20-50
      PSNR:     -0.04
   PSNRHVS:     -0.03
      SSIM:     -0.00
  FASTSSIM:     -0.30
 CIEDE2000:       nan
barrbrain commented 8 years ago

This pull request should be merged with #177, since moving to Q6 necessitates adjusting the the chroma interpolation endpoint and vice versa.

On ntt-short-1, the overall progression in chroma metric is about 4x the regression in luma metrics:

            RATE (%) DSNR (dB)
     PSNR 0.265129 -0.00946544
  PSNRHVS 0.329241 -0.0162786
     SSIM 0.232177 -0.00711245
 FASTSSIM 0.197832 -0.00580373
CIEDE2000 -0.93191 0.0192225

psnr psnrhvs ssim fastssim ciede2000

barrbrain commented 8 years ago

Commit 16a5045c15993478e3edd631db8ef3a176ef8f35 updates the activity-masking QM entries to take advantage of Q6. Without adding interpolation for the luma QM, it allows for some bitrate skew. For matching average bitrate across all bands between AM and non-AM, it minimises MSE of bitrates in each band. Further analysis suggests only 8x8 and 16x16 bands benefit from interpolation.

The overall effect, including earlier commits:

AWCY Report v0.4
Reference: master-2016-05-19-621b1c8
Test Run: pvq-q6-chroma-haar-nointerp
Range: Anchor vp9-anchor-ntt-short-1c
      PSNR:     -2.64
   PSNRHVS:      1.48
      SSIM:     -1.37
  FASTSSIM:     -0.95
 CIEDE2000:      0.28

psnr psnrhvs ssim fastssim