1. 20 Nov, 2017 7 commits
    • 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 17 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
    • Ola Hugosson's avatar
      lv_map_multi: optimize_txb improvement · e5a9b381
      Ola Hugosson authored
      Corrected the nz_rate which is used to estimate the cost of changing
      the current coeff to EOB (as part of optimize_txb).
      (patch suggested by Dake He)
      
      Change-Id: I60d38d86744826e5c3bbc9eaea9ba6c520145f0b
      e5a9b381
    • Ola Hugosson's avatar
      lv_map_multi: add 2 more eob coeff contexts · d2352ecb
      Ola Hugosson authored
      The EOB coefficient cannot be 0 and for that reason it has special base_cdf contexts.
      Before this commit there was two contexts (DC and AC). This commit adds two additional
      contexts to separate the AC into 3 bands (i<=N/8, i<=N/4, i<=N/2).
      
      Change-Id: If088b20fd891920b7ea7fc988d29bf6d86d93bfc
      d2352ecb
    • Thomas Davies's avatar
      LV_MAP_MULTI: use reduced probability in EC. · 736ddef5
      Thomas Davies authored
      Do not round the lv_map probabilities but instead
      reduce the precision of the entropy coder to 9 bits
      for all CDFs, and modify operation so that the EC
      interval is never 0.
      
      Change-Id: I1b4e51019613106ae3b68519b20637bc0d7b51be
      736ddef5
    • Jingning Han's avatar
      Set up txb coeff processing timer · 53c08960
      Jingning Han authored
      Allow the codec to time the average transform block coefficient
      processing for sw speed check.
      
      Change-Id: Ibdaf15ab5b7f1ea8264604cc00ef45e3ae3114c7
      53c08960
    • Linfeng Zhang's avatar
      Add av1_get_br_level_counts_sse2() · ae7b2f3a
      Linfeng Zhang authored
      Change-Id: I6ce7aea19e3bdeef24d3fe66ac6eba7b8d585f9a
      ae7b2f3a
    • Tom Finegan's avatar
      cmake: Silence warnings when daala_tx is disabled. · 7d163c50
      Tom Finegan authored
      daala_fwd_txfm and daala_inv_txfm export no symbols when
      CONFIG_DAALA_TX is disabled. Don't build them.
      
      Change-Id: I0b991248e4151de51c41fc1006ba3065d1b8d36b
      7d163c50
  5. 16 Nov, 2017 3 commits