1. 05 Apr, 2017 2 commits
  2. 04 Feb, 2017 1 commit
    • David Michael Barr's avatar
      Reset PVQ chroma QM interpolation to constant identity QM · fb993173
      David Michael Barr authored
      The PVQ QM interpolation code needs to be adapted to AV1 ranges.
      
      av1_float_pvq_dist_scale_AM_5f_Jan31@2017-02-02T08:57:23.156Z
       -> av1_float_pvq_dist_scale_AM_5f_Jan31_crfix@2017-02-02T15:14:40.477Z
      
        PSNR |  PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      1.8501 | -29.0766 | -6.6775 |   1.8421 | 1.8252 |  1.8228 |    -9.9734
      
      Change-Id: Ib72c1f8eeccf806f8d719866ce80172b6908643e
      fb993173
  3. 03 Feb, 2017 1 commit
    • Yushin Cho's avatar
      Fix fixed-pt PVQ compand/expand outputs zero gain · 3ebfe2a4
      Yushin Cho authored
      For fixed-point version of PVQ, which is current default,
      added MAXI(1, ) to limit the minimum companded or expanded gain to be one.
      Previously, gain compand/expand function, which is invoked when
      activity masking is enabled, sometimes outputs zero
      then triggered the assert(gain != 0).
      
      Metric change from floating-pt to fixed-pt PVQ is:
      PSNR  PSNR-HVS  SSIM  CIEDE-2000  PSNR Cb PSNR Cr MS-SSIM VMAF
      0.02  0.10      0.08  0.11        0.01    0.02    0.13    -0.30
      
      Change-Id: I64a60d1970d35a26af227841e4a5e50a89ddc44c
      3ebfe2a4
  4. 25 Jan, 2017 1 commit
  5. 23 Jan, 2017 1 commit
    • Yushin Cho's avatar
      Add a new experiment, DAALA_DIST · 7a428ba2
      Yushin Cho authored
      This commit adds a new experiment, Daala's distortion function,
      which is designed to better approximate perceptual distortion
      in 8x8 pixel blocks.
      
      This experiment is expected to work best with PVQ.
      
      It measures the variance of overlapped 4x4 regions in the 8x8 area,
      then uses these variances to scale the MSE of weighted frequency domain
      distortion of 8x8 block.
      
      Since AV1 calculates distortion in blocks as small as 4x4, it is not possible to
      directly replace the existing distortion functions of AV1,
      such as dist_block() and block_rd_txf().
      Hence, there has been substantial changes in order to apply
      Daala's 8x8 distortion function.
      The daala distortion function is applied
      after all 4x4 tx blocks in a 8x8 block are encoded (during RDO),
      as in below two cases:
      1) intra/inter sub8x8 predictions and
      2) 4x4 transform with prediction size >= 8.
      
      To enable this experiment, add '--enable-daala-dist' with configure.
      
      TODO: Significant tuning of parameters is required since the function has
      originally came from Daala thus most parameters would not work
      correctly outside Daala.
      The fact that chroma distortion is added to the distortion of AV1's RDO is
      also critical since Daala's distortion function is applied to luma only
      and chroma continues to use MSE.
      
      Change-Id: If35fdd3aec7efe401f351ba1c99891ad57a3d957
      7a428ba2
  6. 14 Dec, 2016 1 commit
    • Yushin Cho's avatar
      Enable the activity masking codes of PVQ · 70669125
      Yushin Cho authored
      Turned off, by default.
      
      TODO: The distortion function of Daala should be added
      to complete the activity masking working.
      
      Note that PVQ QM matrix (i.e. scaler for each band of
      transform block) is calculated in decoder side as exactly same
      way in encoder. In Daala, this matrix is written to bitstream
      and decoder does not generate it.
      
      Activity masking can be turned on by setting below flag as 1:
      
      Change-Id: I44bfb905cb4e0cad6aa830a4c355cd760a993ffe
      70669125
  7. 09 Dec, 2016 1 commit
    • Tristan Matthews's avatar
      pvq: sync with daala · f95a0c14
      Tristan Matthews authored
      This means that all shared PVQ code is now in fixed-point.
      Applies the following patches from daala:
      
      963d3a9 pvq: fix artificial chroma boost with --enable-float-pvq
      7522712 pvq: cosmetics: drop OD_ROUND32 where it is a noop
      3395f61 pvq: in float pvq case, mag must default to 1.0
      29193bb pvq: fix typo
      c774e25 pvq: convert od_init_qm to int
      b5607d6 pvq: use small LUT for integer sqrt((n+3)/2) sqrt((n+2)/2)
      a989c43 pvq: use od_beta_rcp in od_gain_compand
      12c31ea pvq: use od_rcp_beta in od_compute_k
      
      Change-Id: I0ad6a896c9f9fdd752f3b65a0df313efc0db5e63
      f95a0c14
  8. 08 Nov, 2016 2 commits
    • Yushin Cho's avatar
      Fix the bug that PVQ commit broke dering · 48f84dbd
      Yushin Cho authored
      Since PVQ's max block size equals to the max transform size,
      daala's definition of OD_BSIZE_MAX was changed from 5 down to 4 to
      use AV1's max trasform size 32x32. However, dering also uses
      OD_BSIZE_MAX and assumes its value is 5, which caused dering
      not working.
      
      Change-Id: I9d82bb24adc7d57552a8e0a8a7e798e77d96fd4b
      48f84dbd
    • Yushin Cho's avatar
      Fix the bug that PVQ commit broke dering · 7d208d08
      Yushin Cho authored
      Since PVQ's max block size equals to the max transform size,
      daala's definition of OD_BSIZE_MAX was changed from 5 down to 4 to
      use AV1's max trasform size 32x32. However, dering also uses
      OD_BSIZE_MAX and assumes its value is 5, which caused dering
      not working.
      
      Change-Id: I9d82bb24adc7d57552a8e0a8a7e798e77d96fd4b
      7d208d08
  9. 07 Nov, 2016 1 commit
    • Yushin Cho's avatar
      New experiment: Perceptual Vector Quantization from Daala · 77bba8d3
      Yushin Cho authored
      PVQ replaces the scalar quantizer and coefficient coding with a new
      design originally developed in Daala. It currently depends on the
      Daala entropy coder although it could be adapted to work with another
      entropy coder if needed:
      ./configure --enable-experimental --enable-daala_ec --enable-pvq
      
      The version of PVQ in this commit is adapted from the following
      revision of Daala:
      https://github.com/xiph/daala/commit/fb51c1ade6a31b668a0157d89de8f0a4493162a8
      
      More information about PVQ:
      - https://people.xiph.org/~jm/daala/pvq_demo/
      - https://jmvalin.ca/papers/spie_pvq.pdf
      
      The following files are copied as-is from Daala with minimal
      adaptations, therefore we disable clang-format on those files
      to make it easier to synchronize the AV1 and Daala codebases in the future:
       av1/common/generic_code.c
       av1/common/generic_code.h
       av1/common/laplace_tables.c
       av1/common/partition.c
       av1/common/partition.h
       av1/common/pvq.c
       av1/common/pvq.h
       av1/common/state.c
       av1/common/state.h
       av1/common/zigzag.h
       av1/common/zigzag16.c
       av1/common/zigzag32.c
       av1/common/zigzag4.c
       av1/common/zigzag64.c
       av1/common/zigzag8.c
       av1/decoder/decint.h
       av1/decoder/generic_decoder.c
       av1/decoder/laplace_decoder.c
       av1/decoder/pvq_decoder.c
       av1/decoder/pvq_decoder.h
       av1/encoder/daala_compat_enc.c
       av1/encoder/encint.h
       av1/encoder/generic_encoder.c
       av1/encoder/laplace_encoder.c
       av1/encoder/pvq_encoder.c
       av1/encoder/pvq_encoder.h
      
      Known issues:
      - Lossless mode is not supported, '--lossless=1' will give the same result as
      '--end-usage=q --cq-level=1'.
      - High bit depth is not supported by PVQ.
      
      Change-Id: I1ae0d6517b87f4c1ccea944b2e12dc906979f25e
      77bba8d3
  10. 04 Nov, 2016 1 commit
    • Yushin Cho's avatar
      New experiment: Perceptual Vector Quantization from Daala · 09705fe7
      Yushin Cho authored
      PVQ replaces the scalar quantizer and coefficient coding with a new
      design originally developed in Daala. It currently depends on the
      Daala entropy coder although it could be adapted to work with another
      entropy coder if needed:
      ./configure --enable-experimental --enable-daala_ec --enable-pvq
      
      The version of PVQ in this commit is adapted from the following
      revision of Daala:
      https://github.com/xiph/daala/commit/fb51c1ade6a31b668a0157d89de8f0a4493162a8
      
      More information about PVQ:
      - https://people.xiph.org/~jm/daala/pvq_demo/
      - https://jmvalin.ca/papers/spie_pvq.pdf
      
      The following files are copied as-is from Daala with minimal
      adaptations, therefore we disable clang-format on those files
      to make it easier to synchronize the AV1 and Daala codebases in the future:
       av1/common/generic_code.c
       av1/common/generic_code.h
       av1/common/laplace_tables.c
       av1/common/partition.c
       av1/common/partition.h
       av1/common/pvq.c
       av1/common/pvq.h
       av1/common/state.c
       av1/common/state.h
       av1/common/zigzag.h
       av1/common/zigzag16.c
       av1/common/zigzag32.c
       av1/common/zigzag4.c
       av1/common/zigzag64.c
       av1/common/zigzag8.c
       av1/decoder/decint.h
       av1/decoder/generic_decoder.c
       av1/decoder/laplace_decoder.c
       av1/decoder/pvq_decoder.c
       av1/decoder/pvq_decoder.h
       av1/encoder/daala_compat_enc.c
       av1/encoder/encint.h
       av1/encoder/generic_encoder.c
       av1/encoder/laplace_encoder.c
       av1/encoder/pvq_encoder.c
       av1/encoder/pvq_encoder.h
      
      Known issues:
      - Lossless mode is not supported, '--lossless=1' will give the same result as
      '--end-usage=q --cq-level=1'.
      - High bit depth is not supported by PVQ.
      
      Change-Id: I1ae0d6517b87f4c1ccea944b2e12dc906979f25e
      09705fe7