1. 06 Oct, 2017 4 commits
    • Debargha Mukherjee's avatar
      Avoid large stack allocations · 5d108a36
      Debargha Mukherjee authored
      When ext-partition and ncobmc-adapt-weight is on, avoid too large
      stack allocations.
      
      Change-Id: I8db74e45cac80c4e5dfd9e20cfc73d9978d1578e
      5d108a36
    • Alexander Bokov's avatar
      Predict skip flag to speed up the TX type search · 8829a24d
      Alexander Bokov authored
      Average speed-up (lowres):
      low bitrates: 6.6%
      mid bitrates: 2.5%
      high bitrates: 0.0%
      
      Average PSNR loss:
      lowres: 0.010%
      midres: 0.005%
      
      Change-Id: Id34fb247e5e31f04ca324c58142e4b5ac4edacda
      8829a24d
    • Rupert Swarbrick's avatar
      Simplify the ALL_ZERO_FLAG logic in av1_rd_pick_intra_mode_sb · 799ff701
      Rupert Swarbrick authored
      Since the CONFIG_EXT_INTER #if/#endif lines have been removed, it's a
      bit clearer what's going on here and this patch cleans up the code.
      
      Firstly, the patch pulls the cheap checks on best_mbmode.ref_frame out
      to the front of the block, so we needn't call gm_get_motion_vector at
      all for compound predictions.
      
      Next, second element of the zeromv array is never used, so we needn't
      compute it.
      
      Finally, the patch removes the calls to lower_mv_precision. These
      shouldn't be needed, but it's not exactly obvious why not so the patch
      adds some comments to gm_get_motion_vector to explain what's going on
      and adds an assertion to make sure they are true. It also adds a call
      to integer_mv_precision on the early return path of
      gm_get_motion_vector, correcting an apparent bug when CONFIG_AMVR is
      true.
      
      This patch shouldn't make any difference to encoder or decoder
      behaviour.
      
      Change-Id: I0b4a01063574d080bbf6d30187f4e1748c60939d
      799ff701
    • RogerZhou's avatar
      Extend IntraBC to 4x4 · ca86546f
      RogerZhou authored
      Change-Id: I3f30c35bcd1bc623ad0c34c4b954ff71b2fcfd00
      ca86546f
  2. 05 Oct, 2017 2 commits
  3. 04 Oct, 2017 3 commits
    • Rupert Swarbrick's avatar
      Fix rate costing for small blocks with skip flag · c6cc1f5e
      Rupert Swarbrick authored
      In av1_rd_pick_intra_mode_sb, the code calculates the rate for Y and
      UV planes separately. If the transform coefficient should be zero,
      rd_pick_intra_sby_mode and rd_pick_intra_sbuv_mode return the cost of
      actually coding up the zero coefficient, but also set a flag (y_skip
      or uv_skip) saying that this could be skipped.
      
      Since the skip flag isn't per-plane, av1_rd_pick_intra_mode_sb checks
      to see whether both y_skip and uv_skip were true. In that case, it
      costs the block for setting the skip flag rather than outputting zero
      transform coefficients.
      
      If a small block (less than 8x8) has no chroma information,
      x->skip_chroma_rd is true. In that case, we don't call
      rd_pick_intra_sbuv_mode and so uv_skip is never set. However, when we
      come to write the block, it will be written using the skip flag. This
      patch gets the costing right in that case.
      
      Change-Id: Ib31b80b4b44a5c8ed9d9b3f86d782c54927345f3
      c6cc1f5e
    • Debargha Mukherjee's avatar
      Fix rd scales for transforms larger than 32x32 · b02d2f39
      Debargha Mukherjee authored
      Change-Id: I1ddec0cf3513e2bd7568393e5ed5d52c25014ab4
      b02d2f39
    • Rupert Swarbrick's avatar
      Pack InterpFilters into a single integer · 27e90295
      Rupert Swarbrick authored
      Before this patch, if CONFIG_DUAL_FILTER was true then an MB_MODE_INFO
      stored its filter choices as an array of four numbers, each of which
      was between 0 and 10. It also seems that elements 2 and 3 of the array
      were always the same as elements 0 and 1 when used.
      
      This patch defines a new type(def) called InterpFilters together with
      constructor and extractor functions. When CONFIG_DUAL_FILTER is zero,
      InterpFilters is a synonym for InterpFilter and the constructor and
      extractor functions should compile away to nothing. When it is
      nonzero, InterpFilters is a uint32_t which stores the x filter in the
      high part and the y filter in the low part (this looks strange, but
      matches the old numbering).
      
      Making this change allows us to get rid of lots of special case code
      that was dependent on CONFIG_DUAL_FILTER. The uniform
      extract/make/broadcast interface also actually shortens code in
      general.
      
      Change-Id: I6b24a61bac3e4b220d8d46d0b27cfe865dcfba81
      27e90295
  4. 03 Oct, 2017 1 commit
  5. 02 Oct, 2017 1 commit
  6. 30 Sep, 2017 2 commits
    • Yushin Cho's avatar
      [dist-8x8] Bug fix - exclude invisible pixels · 2f025aae
      Yushin Cho authored
      There were two places where invisible pixels are included
      when calculating distortion with dist-8x8 is turned on.
      Those are bugs and fixed by this commit.
      
      1) When av1_dist_8x8() is called in dist_8x8_sub8x8_txfm_rd()
      - New assert() are also added to detect any failures in the future.
      
      2) Inside av1_dist_8x8() and av1_dist_8x8_diff(), with tune-metric == PSNR.
      
      Change-Id: I078d1feb3bb010c0e34041640bb69a400125817a
      2f025aae
    • Yaowu Xu's avatar
      Remove experiment speed_refs · 9293bce0
      Yaowu Xu authored
      Change-Id: Ie4e2f04a6fa27480e500469a0d822e539b7cb066
      9293bce0
  7. 29 Sep, 2017 3 commits
  8. 28 Sep, 2017 2 commits
  9. 27 Sep, 2017 4 commits
    • Angie Chiang's avatar
      Only use fast optimize_b in rd loop for lv_map · 25645b74
      Angie Chiang authored
      Change-Id: Ia33e9962fce962e4f45281537d3e90b4d88543a5
      25645b74
    • Luc Trudeau's avatar
      Replace DC_PRED with UV_DC_PRED for chroma · 91357ee9
      Luc Trudeau authored
      When using uv_mode the corresponding enum is the UV_PREDICTION_MODE not
      the PREDICTION_MODE enum.
      
      Change-Id: I44b19e4db5947a2d44281430b34ed61b82f999eb
      91357ee9
    • David Barker's avatar
      ext-partition: Don't read not-yet-decoded values · 761b1ac8
      David Barker authored
      When deciding whether the top-right or bottom-left blocks are
      available, we currently always act as if we're using 128x128
      superblocks. This means that, when using 64x64 superblocks,
      we sometimes conclude that blocks are available when they haven't
      been decoded yet!
      
      This typically happens at, for example, mi_row=15, mi_col=16
      (for bottom left), where we're at a 64x64 boundary but not
      a 128x128 boundary.
      
      This patch fixes the issue by checking based on the signalled
      superblock size.
      
      Note: Most of this patch is just threading 'cm' through the
      intra prediction process, so that we have access to cm->sb_size
      in has_top_right() and has_bottom_left()
      
      Change-Id: I126964c510aafffc870e7cd8b3e64a46abb14b3a
      761b1ac8
    • Luc Trudeau's avatar
      [CFL] Subsample to Q3 · a0af3b5e
      Luc Trudeau authored
      Result from luma subsampling is left-shifted by 3. This avoids having to
      do it during averaging, in alpha search and when building the
      prediction. This change does not alter the bitstream.
      
      Results on Subset1
        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
      
      https://arewecompressedyet.com/?job=cfl-baseline%402017-09-06T17%3A41%3A38.041Z&job=cfl-SubsampleQ3%402017-09-06T17%3A42%3A01.252Z
      
      Change-Id: I6e89eac6496f7c36e46364c9223fbcbca6759032
      a0af3b5e
  10. 26 Sep, 2017 2 commits
  11. 25 Sep, 2017 1 commit
  12. 23 Sep, 2017 3 commits
    • Yushin Cho's avatar
      Improve dist-8x8 · 8e75e8bb
      Yushin Cho authored
      Improve dist-8x8 when computing 8x8 yuv dist for sub8x8.
      
      To apply dist-8x8 for sub8x8 partitions, once mode decision for
      sub8x8 partitions are finished then dist-8x8 is computed on 8x8 window.
      Since dist-8x8 is only for luma, chroma distortion should be identified.
      
      Previously, it has been hard to be free from potential bugs doing this,
      due to the complex inter mode search code.
      
      The new method is less-error-prone, which computes uv distortion (in MSE) after
      the mode decisions for all of sub8x8 blocks in a 8x8 window are finished,
      when the dist-8x8 distortion for luma 8x8 pixels are computed with
      new distortion metric.
      
      All the code separating y and uv distortion in inter mode search has
      been removed in this commit.
      
      Change-Id: Ieaccb7915df5faeb5e89a7e70b2b7cbac65231af
      8e75e8bb
    • Hui Su's avatar
      Move local functions out of blockd.h · 032ab8b3
      Hui Su authored
      Change-Id: Id667950de84ad6a0b55222264a0ce8473cd10bcc
      032ab8b3
    • Yushin Cho's avatar
      [dist-8x8] Enable early-exit, if MSE is used · c00769a9
      Yushin Cho authored
      If dist-8x8 is enabled, it has disabled early-exit during the RD
      of sub8x8 tx block in 8x8 or larger partition for plane 0.
      
      However, for the sanity check mode of dist-8x8 which still use MSE,
      this can cause different bdrate from the reference (i.e
      dist-8x8 off). Hence, if tune-metirc is MSE then
      regular early-exit will perform for all cases.
      
      Note that the rd cost used for early-exit condition during tx mode
      decision does not include rate for mode itself but only coefficints.
      So, when the total distortion for a partition is very small, the rd cost
      of mode can exceed that of distortion.
      
      Change-Id: Ie25c64064b78d2d1582dbb0c286212fbc52dbdb9
      c00769a9
  13. 22 Sep, 2017 2 commits
    • Jingning Han's avatar
      Fix merge conflict · 75a6f87a
      Jingning Han authored
      Fix the missing the compiler fix in 772cb136.
      
      Change-Id: I2e1d0576964483c7890fb87e3db5451816883b9b
      75a6f87a
    • Hui Su's avatar
      Refactor the ext-tx experiment · ddbcde28
      Hui Su authored
      Use common structure for inter and intra tx type information when
      possible.
      
      Change-Id: I1fd3bc86033871ffbcc2b496a31dca00b7d64b31
      ddbcde28
  14. 21 Sep, 2017 2 commits
    • Jingning Han's avatar
      Fix compiler error when dist-8x8 · 772cb136
      Jingning Han authored
      Fix a compiler error when both DISABLE_TRELLISQ_SEARCH and dist-8x8
      are turned on.
      
      Change-Id: Idd122cb4fc391c449bfcd17ec8406d72ef92d15d
      772cb136
    • Rupert Swarbrick's avatar
      Fix compiler warning in block_rd_txfm · f06faea4
      Rupert Swarbrick authored
      Patch a4817a6b added the sub8x8tx_in_gte8x8blk_in_plane0 variable, but
      it's read in a block that doesn't exist if DISABLE_TRELLISQ_SEARCH is
      true, causing a warning in the overnight "lv-map" unit tests.
      
      Change-Id: I916b61957ffdad1ac7be38efd4051d266d4bd61c
      f06faea4
  15. 20 Sep, 2017 4 commits
  16. 19 Sep, 2017 3 commits
    • RogerZhou's avatar
      Adaptive Motion Vector Resolution · 3b635245
      RogerZhou authored
      Change-Id: Ic3c93a5d2e427ce1ed578389196a265245063821
      3b635245
    • Luc Trudeau's avatar
      [CFL] Use MAX_NUM_TXB_SQUARE instead of MAX_NUM_TXB · f1cf7178
      Luc Trudeau authored
      MAX_NUM_TXB represents the maximum number of transform blocks in 1
      dimension. CfL requires the maximum number of transform blocks in 2
      dimensions. As such, we now use MAX_NUM_TXB_SQUARE instead of the
      erroneous MAX_NUM_TXB for the average buffer.
      
      There's an assert guarding for overrun on the average buffer.
      This fix stops assertions on 4:4:4 sequences. This patch does
      not alter AWCY results as AWCY only covers 4:2:0 sequences (for
      which MAX_NUM_TXB turns out to be sufficient). 
      
      Change-Id: I628db0131f60abc2d06cbbe3fe3dc40e28894ce3
      f1cf7178
    • Luc Trudeau's avatar
      Convert to PREDICTION_MODE for is_directional · f24a35f8
      Luc Trudeau authored
      Recent code added in EXT_INTRA wasn't compatible with CfL,
      because it assumed that the PREDICTION_MODE was the same
      for luma and chroma, which is not the case with CfL.
      
      UV_PREDICTION_MODE must be converted to PREDICTION_MODE for
      av1_is_directional_mode function.
      
      Change-Id: I10e42e3f4a904905f41205d0018f97807959e841
      f24a35f8
  17. 16 Sep, 2017 1 commit
    • Hui Su's avatar
      intrabc: consider mode cost in RD selection · 8dc0092f
      Hui Su authored
      Should take the overhead into consideration when intrabc is not
      being used. Did not see much coding gain with this patch though.
      
      Change-Id: Ie997c1a7284159252d5f663171957c044d3e0a03
      8dc0092f