1. 20 Nov, 2017 16 commits
    • Cheng Chen's avatar
      JNT_COMP: refactor if statements · 8263f80c
      Cheng Chen authored
      Refactor if statement that use frame_offset == -1 to indicate
      jnt_comp is not chosen, as distance now can not be negative.
      Instead, add a variable use_jnt_comp_avg for the same functionality.
      
      Change-Id: Ie6b9c6ab36131b48bc9e066babada17046729cd8
      8263f80c
    • Yunqing Wang's avatar
      Only use 1 above row and left column in warped reference MV · d3af66c7
      Yunqing Wang authored
      Multiple above rows and left columns are checked while generating reference
      MV candidate list for the current block. But, for warped ref_mv, we only
      generate warped reference MV for current block if one neighbor block is
      WARPED_CAUSAL mode and is located in the immediate above row or left column.
      
      Change-Id: Ia9e9c2b7f97b61e0e4d2eeffd8d91e9e5f93d1a0
      d3af66c7
    • Monty Montgomery's avatar
      Move Daala TX to fixed coeff depth of 12 (Q4) · 358abfb7
      Monty Montgomery authored
      This patch activates all the preceeding work, moving Daala TX to a
      greater, fixed coefficient depth (12).  This reclaims the regression
      caused by going to Q3.
      
      subset-1:
      monty-rest-of-stack-rmscale-s1@2017-11-13T14:40:20.646Z ->
       monty-rest-of-stack-Q4-s1@2017-11-13T14:40:44.807Z
      
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.0745 |     N/A | -0.1040 |  -0.1017 | -0.0660 | -0.0522 |    -0.0806
      
      Change-Id: If2a0853b320d57c2fa3a66f919ceb2dc526d017f
      358abfb7
    • Monty Montgomery's avatar
      Remove use of av1_get_tx_scale in Daala TX · 27d1b373
      Monty Montgomery authored
      Daala TX does not scale coefficients based on TX size.  Although
      previous patches force av1_get_tx_scale() to always return zero when
      CONFIG_DAALA_TX is true, this patch removes the call entirely.  This
      represents no functional change.
      
      subset-1:
      monty-rest-of-stack-Q3-s1@2017-11-13T14:39:52.160Z ->
       monty-rest-of-stack-rmscale-s1@2017-11-13T14:40:20.646Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0000 |     N/A |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000
      
      Change-Id: I5757282153c291c59510b17b5f71b3e0a56382ca
      27d1b373
    • Monty Montgomery's avatar
      Enable configurable fixed-depth coefficients in Daala TX · 57f6bfd0
      Monty Montgomery authored
      This patch turns on the fixed-depth TX code in the Daala toplevel TX
      
      A REGRESSION IS EXPECTED as this is temporarily dropping Daala TX back
      to Q3, which is reduced operating precision over current master.
      
      subset-1:
      monty-rest-of-stack-RDO-s1@2017-11-13T14:39:17.093Z ->
       monty-rest-of-stack-Q3-s1@2017-11-13T14:39:52.160Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0927 |     N/A | -0.0001 |   0.1390 | 0.0871 |  0.0835 |     0.0826
      
      objective-1-fast --limit=4:
      monty-rest-of-stack-RDO-o1f4@2017-11-13T14:38:57.951Z ->
       monty-rest-of-stack-Q3-o1f4@2017-11-13T14:39:32.205Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0981 |  0.2341 |  0.4784 |   0.1215 | 0.0761 |  0.1144 |     0.1444
      
      Change-Id: Ibbe17226dd47980da632814422d6201c9fc6fa36
      57f6bfd0
    • Monty Montgomery's avatar
      Modify RDO for use with Daala TX constant-depth coeffs · 4a05a58c
      Monty Montgomery authored
      Modify the portions of RDO using TX-domain coeff calaculations to deal
      with TX_COEFF_DEPTH and constant-depth coefficient scaling.  At
      present, this represents no functional change.
      
      subset-1:
      monty-rest-of-stack-quant-s1@2017-11-13T14:38:43.774Z ->
       monty-rest-of-stack-RDO-s1@2017-11-13T14:39:17.093Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0000 |  0.0000 |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000
      
      objective-1-fast --limit=4:
      monty-rest-of-stack-quant-o1f4@2017-11-13T14:38:28.828Z ->
       monty-rest-of-stack-RDO-o1f4@2017-11-13T14:38:57.951Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0000 |  0.0000 |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000
      
      Change-Id: I0fbc45e018f565f48e1fc8fdeabfcd6cb6fa62fe
      4a05a58c
    • Dake He's avatar
      [lv_map_multi] Base level alphabet adjustment · 3fe369c8
      Dake He authored
      At eob-1, coefficient must be non-zero. As such, this CL changes the
      alphabet for base levels at eob-1 from size 4 to size 3. Minor
      performance improvement is observed. In addition, changes in 33462 made
      by Ola Hugosson were also incorporated.
      
      Now with trained initial probability distributions.
      
      Change-Id: Id6b5d0908b5ff186ed88ab0733ce7cc0c4a468d5
      3fe369c8
    • David Barker's avatar
      loop-restoration: Remove duplicated function · abb3e4e9
      David Barker authored
      We currently have two implementations of the same function
      (aom_memset16() and memset16()), one of which is only defined inside
      restoration.c. Remove this duplicate, and use the globally defined
      version instead.
      
      Change-Id: I52740541f2e974f505728240127842397f6ef38d
      abb3e4e9
    • Yue Chen's avatar
      New filter_intra implementation + entropy coding · da2eefc6
      Yue Chen authored
      Use 4x2 processing unit.
      Reduce # of modes from 6 to 5.
      
      Change-Id: I3c12e18084636de0e279c9102a8b212342faf4c7
      da2eefc6
    • David Barker's avatar
      superres + frame-size: Fix experiment combination · 22171319
      David Barker authored
      The current code has two issues with this combination:
      i) The frame_size_override_flag was being set based on the downscaled
         frame size rather than the upscaled frame size
      ii) This flag was then being ignored in write_frame_size(), and we
          would always write a 16-bit size, even if the flag was 0.
          This lead to an encode/decode mismatch.
      
      This patch fixes these two issues, and rewrites write_frame_size()
      to be much clearer and more closely match setup_frame_size() from
      the decoder.
      
      Change-Id: Id6b8e51ef10f3285f8318e4acd8606060f29e9cb
      22171319
    • Cheng Chen's avatar
      JNT_COMP: clamp distance · 1ee07323
      Cheng Chen authored
      Let maximum distance be INT16_MAX - 1.
      
      To decide distance weights, use multiplication
      instead of a division.
      
      Google test shows +0.05% on lowres.
      
      Change-Id: I2be25aec3c921773b0d776cf5ae00e3cd4cc27cd
      1ee07323
    • Debargha Mukherjee's avatar
      Some RD fixes · 2c50f9ae
      Debargha Mukherjee authored
      Change-Id: Ie6b41ac068846da3c87bdcaa94180777edb27d1f
      2c50f9ae
    • Debargha Mukherjee's avatar
      Update cdf for intra blocks · a496c673
      Debargha Mukherjee authored
      This was missing before. Hopefully it will improve costing.
      
      Change-Id: Id7dbe963fe5e26798b853419804bdd128537a5d9
      a496c673
    • Dake He's avatar
      [lv_map] fix template size to 5 · 0c9ea803
      Dake He authored
      Cleanup context derivation for base levels by fixing the template size
      to 5. No change to bitstream.
      
      Change-Id: I496c74b386b8d8a4fb43c0b69add52a0a798a981
      0c9ea803
    • Monty Montgomery's avatar
      Add Daala TX fixed-coeff-depth capability to quantization · 60f2a229
      Monty Montgomery authored
      This patch completes the work to add fixed-depth TX domain support to
      the quantization and dequantization code.  At present, it is active but
      configured to behave identically to current AV1 master as RDO and TX
      have not yet been updated to also support this functionality.
      
      subset-1:
      monty-rest-of-stack-noshift-s1@2017-11-13T14:37:42.541Z ->
       monty-rest-of-stack-quant-s1@2017-11-13T14:38:43.774Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0000 |  0.0000 |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000
      
      objective-1-fast --limit=4:
      monty-rest-of-stack-noshift-o1f4@2017-11-13T14:37:16.992Z ->
       monty-rest-of-stack-quant-o1f4@2017-11-13T14:38:28.828Z
      
        PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
      0.0000 |  0.0000 |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000
      
      Change-Id: I3773a1fc128136c9fea227f4b547576a8aa6efa3
      60f2a229
    • Debargha Mukherjee's avatar
      Remove unused tx_size_implied count · 605d63f3
      Debargha Mukherjee authored
      Change-Id: Icca39f1d037a3aca4540e35b70fdfafeae2b094e
      605d63f3
  2. 19 Nov, 2017 5 commits
    • Zhijie Yang's avatar
      enable short_filter by default · 728cdbe3
      Zhijie Yang authored
      Change-Id: I1ce575377c3d971f4488177b82c6e0b32aa5e4be
      728cdbe3
    • Jingning Han's avatar
      Turn off debug counters in tx coeff timing · 5880758b
      Jingning Han authored
      Change-Id: I3d152b28bb31027156719c1ecd7544df0f9766bb
      5880758b
    • Alexander Bokov's avatar
      Add extra hashing mechanism on the TX size search level · c5ddf06e
      Alexander Bokov authored
      In TX size search the rate and distortion values are often computed for
      residuals that have already been seen before, with exactly the same
      entropy context. Such repeated computations occur when the residue
      signal is the same for 2 or more partitions for a given prediction mode.
      By saving previous RD search results we can achieve some encoder
      speed-up at the cost of higher RAM consumption (~20MB).
      
      Test results with all default experiments:
      Speedup      15% (measured on 4 lowres 30-frame sequences)
      compression   0%
      
      Change-Id: I8d9b8dd483cf862f0864b50ae80466beac978290
      c5ddf06e
    • Jingning Han's avatar
      Replace scan index with local var · ad2c1782
      Jingning Han authored
      Change-Id: I36334c25f904e2a40f29c8ab83da4501f52e2eb3
      ad2c1782
    • Yue Chen's avatar
      Make the first cdf prob < CDF_PROB_TOP to avoid infinite loop · 01b01c0d
      Yue Chen authored
      The probability training tool generates all CDF_PROB_TOP table if
      the counts are all zero. Although it means such cases are never
      used in actual encoding, in rd cost pre-calculation, we still
      sometimes run into such cases and the token cost calcualtion
      function cannot handle all-CDF_PROB_TOP cdfs (Will trigger assertion
      when debug mode is on).
      
      Change-Id: I259620e210fea0f6e1f7848724fa006fa06da226
      01b01c0d
  3. 18 Nov, 2017 8 commits
    • Jingning Han's avatar
      Properly scale the distortion in lv-map optimize_b · b433f4c4
      Jingning Han authored
      Account for the bit-depth in calculating the distortion for lv-map
      coefficient level optimization.
      
      Change-Id: I47c60f15bfda5aeba8e32f1ac898015650a057db
      b433f4c4
    • Jingning Han's avatar
      Remove unneeded memset on sign array · ea636197
      Jingning Han authored
      Change-Id: I21213ad3a8b9bd018927582ffa7eeab372aa7f9c
      ea636197
    • Jingning Han's avatar
      Reconstruct dqcoeff inline with coeff decoding · cf3a0824
      Jingning Han authored
      Reconstruct dqcoeff inline with transform coefficient level
      decoding process. This saves one pass through 0 to eob scan. The
      txb coeff decoding speed is up by 5%.
      
      Change-Id: Icd88a9dca4595a180d514ce4b067ecf9dd90a609
      cf3a0824
    • Jingning Han's avatar
      Fix av1_txb_init_levels clamping limit · 5cb408e5
      Jingning Han authored
      This solves an enc/dec mismatch issue due to the fact that
      SIMD implementation compares signed int8_t. Hence we need to
      limit the base level reference to be under 127, to avoid cmpt
      instruction taking it as a negative number.
      
      BUG=aomedia:1045
      
      Change-Id: I2ed616fda52415fbf50451660b9564df1adf77af
      5cb408e5
    • Zoe Liu's avatar
      Add motion selection to ext_skip · f40a9577
      Zoe Liu authored
      A new block mode, referred to as skip_mode is added. If a block is
      coded as skip_mode, it will be inter-coded, with its references and
      motion vectors derived from its neighboring blocks with zero-residue.
      Otherwise, the block can be coded in the current intra or inter mode.
      
      The computational load on skip_mode evaluation at the encoder should
      be kept minimum. No transform size / type evaluations are needed.
      
      Change-Id: I5aef0159c7d5ecd64258510835903375d6c536d6
      f40a9577
    • Jingning Han's avatar
      Avoid using multiplication in context fetch · d915e4ee
      Jingning Han authored
      Replace the multiplication with shifts.
      
      Change-Id: I245efaddea2019d789179569e82e81bb7cb97715
      d915e4ee
    • Jingning Han's avatar
      Properly update eob state in first pass coeff decode · 8682cd91
      Jingning Han authored
      Update the last coefficient position whose level is above
      NUM_BASE_LEVELS in the first pass decoding. This increases the
      lv-map txb decode speed by 10%.
      
      Change-Id: Ib35409a1d374c1e171ee45ac805a3a318793935e
      8682cd91
    • David Barker's avatar
      Fix render size with !CONFIG_FRAME_SUPERRES · 6e5ade98
      David Barker authored
      If CONFIG_FRAME_SUPERRES is disabled, and we don't explicitly signal
      a render size for a frame, then the render size would be set to the
      crop size of the *previous* frame (or 0 for the first frame in a video).
      
      Return to using the VP9 behaviour in this case (albeit coded slightly
      differently to help support superres) - ie, use the crop size of the
      current frame if an explicit render size is not provided.
      
      We do this by moving the calls to resize_context_buffers() (which sets
      up cm->width and cm->height) before the calls to setup_render_size
      (which might use those values). Because resize_context_buffers() does not
      read any data, the bitstream format should not be affected, aside from
      the intended bugfix.
      
      BUG=aomedia:1044
      
      Change-Id: I4fc71b9aea36cc06e10408715c205d9674f87fc2
      6e5ade98
  4. 17 Nov, 2017 11 commits
    • Zoe Liu's avatar
      Clean up decoder on NEWMV handling · 2854fe70
      Zoe Liu authored
      Change-Id: Idc72cff4ab9ba1691a7f5c72366a61be9569d370
      2854fe70
    • Yunqing Wang's avatar
      Reuse neighbor's warped motion parameters · 876a8b0b
      Yunqing Wang authored
      If a block's motion_mode is WARPED_CAUSAL and its mode is NEARESTMV, search
      its immediate above and left neighbors to get the set of neighbor blocks
      using WARPED_CAUSAL motion mode, pick the one with largest block size, and
      use that neighbor's warped motion parameters directly for the current block.
      If none of the neighbors uses WARPED_CAUSAL motion mode, we estimate the
      current block's warped motion parameters.
      
      Before this patch, for every block, we estimate its warped motion parameters.
      With this patch, we reduce the number of blocks doing parameter estimation.
      Here are results by testing on clips with camera motions.
                          WARPED_CAUSAL blocks   blocks reusing parameters
      station2_240p(30f):     3857                    1678
      netflix_arieal(30f):     692                     223
      
      No noticable changes in coding gain. Borg test result showed a PSNR
      change of +0.006% on cam_lowres set, and -0.014% on lowres set.
      
      Change-Id: If12387ad0ca8a1996ea4c3f1bedcb269ebf78c6c
      876a8b0b
    • Urvang Joshi's avatar
      intrapred: Remove two local flags. · 49404055
      Urvang Joshi authored
      These used to be a combination of some config flags. But as those config
      flags are now removed, they were always 1 now.
      
      This simplifies the code a bit.
      
      Change-Id: Ifd3a94b6b786c95c3efc6d646dcf1489cdda7f92
      49404055
    • Urvang Joshi's avatar
      TX64X64: Remove two tests. · df8a1f71
      Urvang Joshi authored
      These tests were testing the accuracy of fwd + inverse transform. But,
      given that we have an approximation that zeroes out 3/4th of the
      coefficients, we cannot put a reasonable upper bound on the error, and
      the test itself doesn't make sense.
      
      Change-Id: I0f44e7bcbe56c6be2cabbe3179af844c41836662
      df8a1f71
    • Hui Su's avatar
      Call aom_clear_system_state() before palette RD search · c3769e5c
      Hui Su authored
      BUG=aomedia:1042,aomedia:1043
      
      Change-Id: Ia7e82cbd280132bbeef41c90c38cbb585db8828a
      c3769e5c
    • Hui Su's avatar
      Remove prob table entries and counters for new mv · 21b67229
      Hui Su authored
      Change-Id: Ifa2cdc2d2230dfa11396ee3e547653180f96b795
      21b67229
    • Debargha Mukherjee's avatar
      Make hbd transforms compatible with 4:1 transforms · 9eabd691
      Debargha Mukherjee authored
      Change-Id: I7123717b2d11bca826d650c6e6b6ae137476d541
      9eabd691
    • Debargha Mukherjee's avatar
      Make forward 4:1 transforms txmg compliant · 69f914a8
      Debargha Mukherjee authored
      Change-Id: I9e55a9c9dd546e2e1d5e9c43e3e73fc44c3ba590
      69f914a8
    • Jingning Han's avatar
      Simplify tx size access in read_coeffs_txb · 4b9892d5
      Jingning Han authored
      Change-Id: I482f95ee0e466d14a893152fdd03d0cfe368a7e1
      4b9892d5
    • Jingning Han's avatar
      Skip unnecessary memset operation in lv-map decoding · 3925aae0
      Jingning Han authored
      Speed up the lv-map txb decoding process by 5%.
      
      Change-Id: I5c87666b353a27f7fc67cc55322a30bb417435a3
      3925aae0
    • David Barker's avatar
      striped-loop-restoration: Use consistent frame height · 9cf9e28c
      David Barker authored
      The stripes are intended to extend down to the full decoded
      height of the frame, which is always a multiple of 8 luma pixels,
      in order to avoid some nasty edge cases.
      
      This change was partially implemented in previous patches, but
      not everywhere was modified, leading to slightly inconsistent code.
      This patch finishes making the relevant changes, along with a
      slight bit of refactoring.
      
      Change-Id: Ibc8e2f5ace5415815625edbc224557a7c548c38a
      9cf9e28c