1. 09 Feb, 2017 1 commit
  2. 07 Feb, 2017 1 commit
    • Timothy B. Terriberry's avatar
      Scale PVQ input to OD_COEFF_SHIFT resolution. · e93acb2d
      Timothy B. Terriberry authored
      This ensures we operate at the same precision that Daala uses, which matters
      when activity masking is enabled, because of the gain companding.
      
      Metrics from Patchset 4 (which had slightly incorrect rounding):
      
      With activity masking (5 frames only):
      av1_pvq_AM_ref_5f@2017-02-07T03:37:53.702Z -> av1_pvq_AM_derf_fix2_coeff_scaling_5f@2017-02-07T00:12:24.427Z
      
          PSNR |  PSNR Cb |  PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
        0.6653 | -12.3177 | -12.1858 |   0.3350 | 4.1013 |  2.0964 |    -4.0539
      
      In particular for Netflix_Crosswalk_1920x1080_60fps_8bit_420_60f.y4m
       -5.0589 | -22.3077 | -21.2188 |  -7.0389 | -3.3715 |-5.7794 |   -13.1891
      
      I.e., it fixes the large regression with AM on this sequence, and
       substantially improves chroma (at a lesser cost to other metrics).
      
      Without activity masking (5 frames only):
      av1_pvq_ref_5f@2017-02-07T03:52:51.279Z -> av1_pvq_derf_fix2_coeff_scaling_5f@2017-02-07T00:12:48.873Z
      
          PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
        0.0989 | -0.0322 | -0.0464 |   0.1883 | 0.0795 |  0.0579 |     0.0923
      
      Change-Id: I46b808b7c8e4733465f8bebc8336dfd5b75783ec
      e93acb2d
  3. 26 Jan, 2017 1 commit
    • ltrudeau's avatar
      Convert PVQ skip variable to enum · e1c0929f
      ltrudeau authored
      Creates the PVQ_SKIP_TYPE enum to encapsulate the different types of
      skipping that can be signaled by PVQ (i.e. skip: AC, DC or both).
      
      There is no impact on the bitstream. However, the decoder will now emit
      an internal error if the decoded skip flag is out of range. The
      block_skip variable is also renamed to ac_dc_coded as it stores the same
      information.
      
      Change-Id: Ib2aadaf99dc1736ea392ae5ed8948c3cdc12da9b
      e1c0929f
  4. 24 Jan, 2017 1 commit
    • David Barker's avatar
      Make ext-inter use new rectangular intra predictor · 839467f4
      David Barker authored
      Now that https://aomedia-review.googlesource.com/#/c/6729/
      has been merged, build_intra_predictors_for_interintra() is
      now redundant, so replace it by a direct call to
      av1_predict_intra_block() and remove the old function.
      
      Reset rect_interintra back to 1.
      
      To do this, we need to make the intra predictor take a
      BLOCK_SIZE instead of a TX_SIZE. This is because we need to
      be able to predict 32x64 and 64x32 blocks, but there is no
      TX_32X64 or TX_64X32.
      
      No effect on output or performance.
      
      Change-Id: I8c185a211c97a85012cc54ec293c785a693608ed
      839467f4
  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. 20 Jan, 2017 1 commit
    • ltrudeau's avatar
      Replace Skip with AC/DC coded in PVQ · 472f63f4
      ltrudeau authored
      Instead of returning skip, av1_pvq_encode_helper and od_pvq_encode now
      return ac_dc_coded. This gives more information on whether the DC part
      or the AC part was skipped.
      
      Although it is possible to obtain ac_dc_coded from the pvq_info struct,
      this struct is not always used, in which case the information was lost.
      
      This change does not impact the bitstream.
      
      Change-Id: Ie303de915f74e8da384f822332eb1aa27f677bd3
      472f63f4
  7. 18 Jan, 2017 1 commit
    • Urvang Joshi's avatar
      Enable rectangular transforms for Intra also. · feb925fe
      Urvang Joshi authored
      These are under EXT_TX + RECT_TX experiment combo.
      
      Results
      =======
      
      Derf Set:
      --------
      All Intra frames: 1.8% avg improvement (and 1.78% BD-rate improvement)
      Video: 0.230% avg improvement (and 0.262% BD-rate improvement)
      
      Objective-1-fast set
      --------------------
      Video: 0.52 PSNR improvement
      
      Change-Id: I1893465929858e38419f327752dc61c19b96b997
      feb925fe
  8. 06 Jan, 2017 2 commits
    • Jingning Han's avatar
      Rework the txfm partition context to support cb4x4 mode · 581d1697
      Jingning Han authored
      This commit reworks the transform block partition context update
      to support cb4x4 mode in the recursive transform block partition.
      It resolves the remaining enc/dec mismatch issue when both cb4x4
      and var-tx are turned on.
      
      Change-Id: I850d121204fe4c68e81488f1d2848c570d9d08b9
      581d1697
    • Jingning Han's avatar
      Refactor var-tx pipeline to support cb4x4 mode · 9ca05b7e
      Jingning Han authored
      Replace hard coded 4x4 transform block step size assumption with
      scalable table access.
      
      Change-Id: Ib1cc555c2641e5634acdd91ca33217f00aeb0b89
      9ca05b7e
  9. 05 Jan, 2017 2 commits
    • Nathan E. Egge's avatar
      Use aom_writer with generic_encode(). · 760c27f1
      Nathan E. Egge authored
      Change the generic_encode() function to take an aom_writer struct
       instead of an od_ec_enc struct.
      
      Change-Id: Icb447fe5ada27aba45fbaea08b28e9fe42c5a404
      760c27f1
    • Nathan E. Egge's avatar
      Replace od_ec_enc with aom_writer in daala_enc_ctx. · 6675be0a
      Nathan E. Egge authored
      Use the generic AOM entropy encoder in the daala_enc_ctx struct.
      This is done in preparation for migrating other entropy coder calls to
       use the more generic entropy coding API.
      
      Change-Id: Id627d12402a397bcb21d48d896c0de249d4d8657
      6675be0a
  10. 04 Jan, 2017 2 commits
  11. 19 Dec, 2016 1 commit
    • Guillaume Martres's avatar
      Fix uninitialized entropy contexts · e50d9ddb
      Guillaume Martres authored
      When enable_optimize_b is false in av1_encode_intra_block_plane the
      entropy contexts were never initialized.
      
      No changes on metrics for objective-1-fast when no experiment is
      enabled.
      
      Change-Id: Ic68913f6400d2becbaec3cc14214a0257530ed0b
      e50d9ddb
  12. 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
  13. 06 Dec, 2016 1 commit
    • Jingning Han's avatar
      Handle the block offset using min transform block size · 81492267
      Jingning Han authored
      Map the block offset to pixel positions in the unit of minimum
      transform block size. This change retains the same coding
      statistics. The encoding speed is slightly faster (<1%).
      
      Change-Id: I2641d2b1e317ef4cdf477718c446ef025b8eef41
      81492267
  14. 01 Dec, 2016 1 commit
  15. 30 Nov, 2016 2 commits
  16. 29 Nov, 2016 1 commit
  17. 22 Nov, 2016 2 commits
    • Jingning Han's avatar
      Deprecated the separate handle on rectangular tx_size in var_tx · fe45b216
      Jingning Han authored
      The recursive transform block partitioning system naturally supports
      the use of rectangular transform block size. Hence there is no need
      to make a separate coding route for the rectangular transform block
      size support there.
      
      Change-Id: I709b61f94cd4a6ea3f33c05abe319488c7d24f5a
      fe45b216
    • Jingning Han's avatar
      Update tx_size assertions in rd search · d3fada80
      Jingning Han authored
      The processing units support the rectangular transform block size.
      Update the assertion conditions accordingly.
      
      Change-Id: Iebd46dbbb04feaf161fb02f203fa2cde50b2b700
      d3fada80
  18. 18 Nov, 2016 1 commit
    • Debargha Mukherjee's avatar
      Add default 64x64 scan orders and entropy models · 153e1f86
      Debargha Mukherjee authored
      Adds 64x64 default scan orders
      Adds 64x64 coefficient entropy models (just copy the 32x32 ones)
      Entropy context updates for 64x64 transform
      Various misc. changes to support 64x64 transforms
      
      Change-Id: I2c0bc4ba540886dd196e87a78b205407ad3e866b
      153e1f86
  19. 16 Nov, 2016 2 commits
    • Debargha Mukherjee's avatar
      Add recode loop test for global motion usage · b98a702d
      Debargha Mukherjee authored
      Adds a feature to recode if global motion is used for a reference but
      has very few blocks in the frame actually using it.
      
      lowres improves to -0.512% on average.
      
      Change-Id: I61a36770e1b7103b9a27706909443c3f14ee4e42
      b98a702d
    • Thomas Davies's avatar
      AOM_QM: fix av1_optimize_b. · e0f8c559
      Thomas Davies authored
      BUG=aomedia:79
      
      Merge of nextgenv2 caused av1_optimize_b not to take account
      of different inverse quantization when quant matrices are on.
      
      Change-Id: I1b8da2e110ce201183be777663222e3d73c9f17b
      e0f8c559
  20. 11 Nov, 2016 1 commit
  21. 10 Nov, 2016 3 commits
    • Jingning Han's avatar
      Support rectangular tx_size in recursive txfm partition · 70e5f3f0
      Jingning Han authored
      This commit supports the recursive transform block partition to
      start with both square and rectangular transform block sizes.
      
      Change-Id: Idaf29d50cb1f4876b43e5ba82c2609708c6b1926
      70e5f3f0
    • Yushin Cho's avatar
      Refactor PVQ codes in av1_encode_block_intra() · 3827fddd
      Yushin Cho authored
      Since non PVQ path in av1_encode_block_intra() was refactored
      in nextgenv2 so that both inter and intra block txfm_quant,
      i.e. av1_encode_block() and av1_encode_block_intra(), are done
      similar way, such as both call av1_xform_quant().
      This is also nice for PVQ, since it can reuse pvq enc helper call
      in av1_xform_quant() for intra block mode.
      
      Change-Id: I45aaf5b899552bf947d777cdb2d92e665d4f217e
      3827fddd
    • Yaowu Xu's avatar
      apply clang-format · 49eea11c
      Yaowu Xu authored
      For these files:
      av1/common/common_data.h
      av1/encoder/encodemb.c
      av1/encoder/quantize.c
      av1/encoder/rdopt.c
      
      Change-Id: I379e861d55c2875d0366df24f986b29796a70087
      49eea11c
  22. 09 Nov, 2016 3 commits
  23. 08 Nov, 2016 4 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
    • Thomas Davies's avatar
      Fix clang-format issues. · 8b0f6368
      Thomas Davies authored
      Change-Id: I6cdb7e80072359fc2c485424e2130e62a796cf25
      8b0f6368
    • 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
    • Yaowu Xu's avatar
      Add transform parameter initialization · 856c55e9
      Yaowu Xu authored
      The initialization of transform parameters was missing, that led to a
      crash in encoder.
      
      Change-Id: I9e35830d5f24e771c845f0d8881671d6b7228c5e
      856c55e9
  24. 07 Nov, 2016 3 commits
    • Yaowu Xu's avatar
      Fix compiler warning of un-used variables · 02d4c3b7
      Yaowu Xu authored
      Change-Id: I17d05bbf75a201fd010fc17e2d9bd0db8ef36d41
      02d4c3b7
    • Yaowu Xu's avatar
      Resolve merge issues with --enable-pvq · d6ea71cf
      Yaowu Xu authored
      This commit resolves some compiling issues due to merge.
      
      Change-Id: I0eef8aa36c404e185e0b0004948a49307c360d3e
      d6ea71cf
    • 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
  25. 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