1. 30 Nov, 2017 2 commits
    • Jingning Han's avatar
      Make adaptive scan order support multi-threading · 0bd3bf69
      Jingning Han authored
      Count the non-zero appearance per tile and update per frame. This
      resolves an enc/dec mismatch in multi-threading coding.
      
      BUG=aomedia:1073
      
      Change-Id: I474f05913e6c3f75ca3fa1057bd4809ef51af164
      0bd3bf69
    • Debargha Mukherjee's avatar
      Refactor/Change the entropy context for transforms · b3eda2f4
      Debargha Mukherjee authored
      The change makes the entropy context for transforms use
      the same mechanism as with and without lv_map.
      For the non-lv-map case the context is now based on the
      the larger transform dim for 2:1 rect transforms. The context
      is now the average for 4:1 rect transforms for both lv-map and
      non-lv-map cases.
      There is one small fix for level map for getting the correct
      rate when skip is set.
      
      BDRATE: lowres, 30 frames, speed 1: -0.15% gain for the
      non-lv-map case on the baseline.
      
      Change-Id: I06a583d33bef68202d72a88e077f8d31cc5e7fe4
      b3eda2f4
  2. 27 Nov, 2017 1 commit
    • Jingning Han's avatar
      Use sub-frame statistics for adaptive scan order update · 025c6c41
      Jingning Han authored
      Skip the last SB row counting for per frame adaptive scan order.
      This allows enough time window for HW decoder to process the
      scan order update for next frame decoding.
      
      Change-Id: I8a3b48fe452c68c921d55dc76cc787f0a8e00e29
      025c6c41
  3. 22 Nov, 2017 2 commits
  4. 21 Nov, 2017 1 commit
  5. 20 Nov, 2017 2 commits
    • 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
  6. 18 Nov, 2017 2 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
      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
  7. 17 Nov, 2017 3 commits
    • 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
    • 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
    • Linfeng Zhang's avatar
      Add av1_get_br_level_counts_sse2() · ae7b2f3a
      Linfeng Zhang authored
      Change-Id: I6ce7aea19e3bdeef24d3fe66ac6eba7b8d585f9a
      ae7b2f3a
  8. 16 Nov, 2017 1 commit
  9. 14 Nov, 2017 2 commits
    • Ola Hugosson's avatar
      WIP: lv_map_multi: make br multi symbol · e72a2091
      Ola Hugosson authored
      The br_cdf and lps_cdf with a new 4-state symbol br_cdf.
      The br symbol indicates whether the level is k, k+1, k+2 or >k+2
      In the latter case, a new br symbol is read. Up to 4 br symbols are
      read which will reach level 14 at most. Levels greater than 14 are
      golomb coded.
      
      The adapted symbol count is reduced further by this commit.
      E.g. for the I-frame of ducks_take_off at cq=12, the number of adapted symbols
      is reduced from 4.27M to 3.85M. About 10% reduction.
      
      Gains seems about neutral on a limitied subset.
      
      Change-Id: I294234dbd63fb0fa26aef297a371cba80bd67383
      e72a2091
    • Ola Hugosson's avatar
      WIP: lv_map_multi: New experiment · 13892108
      Ola Hugosson authored
      This experiment modifies lv_map to make use of multi symbol.
      
      Replace the nz_map and coeff_base binary CDF with a new multi-symbol
      CDF of size 4. The new base_cdf indicates for each coeff if the level
      is 0, 1, 2 or >2. Two new special contexts are added to be used for the
      last coefficient (the EOB coeff). For the EOB coefficient we already know
      that it is non-zero. We use one context for DC EOB and one for AC EOB
      (this can potentially be refined more).
      
      The new symbol is read/written by special bitreader/bitwriter functions.
      Those functions reduce the probability precision from 15bit to 9bit before
      the invocation of the arithmetic coding engine.
      
      The adapted symbol count is significantly reduced by this experiment.
      E.g. for the I-frame of ducks_take_off at cq=12, the number of adapted symbols
      is reduced from 6.7M to 4.3M.
      
      Change-Id: Ifc3927d81ad044fb9b0733f1e54d713cb71a1572
      13892108
  10. 09 Nov, 2017 7 commits
    • Linfeng Zhang's avatar
      Add av1_get_br_level_counts() · 97fc474c
      Linfeng Zhang authored
      which calculates br level counts in block.
      
      Change-Id: Iec5c9a8a0ce7e57bf5fb29db552f6a9065c5de88
      97fc474c
    • Linfeng Zhang's avatar
      Add av1_get_base_level_counts() · f72e1382
      Linfeng Zhang authored
      which calculates base level counts in block.
      
      Change-Id: Ia975faad4afbfc0c587bdcd403de3d4dc3f5f411
      f72e1382
    • Linfeng Zhang's avatar
      Split get_level_count_mag() · 8c841f7d
      Linfeng Zhang authored
      to get_level_count() and get_level_mag() since they actually
      calculate in different levels and get_level_mag() is hard to be SIMDed.
      
      Change-Id: Iedb12a1d592cf09425e5a77e6bdc9990c271c872
      8c841f7d
    • Linfeng Zhang's avatar
      Pad extra columns in txb levels and signs · 1122d7da
      Linfeng Zhang authored
      This helps the removal of horizontal availability check.
      
      Change-Id: Ie3b97eea63b4cc79ec78df119c2730a4d7cf539d
      1122d7da
    • Linfeng Zhang's avatar
      Pad extra rows in txb levels and signs · 679d81e9
      Linfeng Zhang authored
      This helps the removal of vertical availability check.
      
      Change-Id: Ie9204e3f2aacd86c8e19f1db0e40949e437a500c
      679d81e9
    • Monty Montgomery's avatar
      Separate quantizers used for quantization from RDO · 125c0fca
      Monty Montgomery authored
      Generalize quantizer setup so that quantization and TX can use
      different coefficient shifts/scalings without inpacting RDO lambda
      generation.
      
      This patch is documentaiton + a minor refactor setting up later
      work; it causes no functional change.
      
      monty-daalaTX-fulltest-Daalabaseline-o1f@2017-11-07T00:01:20.779Z ->
       monty-daalaTX-fulltest-DaalaRDO-o1f@2017-11-07T00:02:31.347Z
      
      PSNR | PSNR Cb | PSNR Cr | PSNR HVS | SSIM | MS SSIM | CIEDE 2000
       N/A |  0.0000 |  0.0000 |      N/A |  N/A |     N/A |        N/A
      (note-- the numbers above were collected using --cpu-used=3, which
       appears to be newly broken.)
      
      monty-daalaTX-fulltest-Daalabaseline-o1f4@2017-11-07T05:59:16.553Z ->
       monty-daalaTX-fulltest-DaalaRDO-o1f4@2017-11-07T05:59:50.180Z
      
        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
      
      monty-daalaTX-fulltest-Daalabaseline-s1@2017-11-07T00:01:46.582Z ->
       monty-daalaTX-fulltest-DaalaRDO-s1@2017-11-07T00:02:56.282Z
      
        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: Ia5a3c052eacd17184ca1b0fe6d032cfb9afdb77f
      125c0fca
    • Linfeng Zhang's avatar
      Initialize update_eob to -1 in txb code · 848f7bc7
      Linfeng Zhang authored
      To skip possible unnecessary looping.
      
      Change-Id: If611d344ab39eee53de6c5256ce5f8febedecc9b
      848f7bc7
  11. 08 Nov, 2017 2 commits
  12. 07 Nov, 2017 1 commit
  13. 03 Nov, 2017 1 commit
    • Yunqing Wang's avatar
      Allow to disable the probability update · 0e141b56
      Yunqing Wang authored
      Added the function of allowing to disable the probability update while
      needed. This would be needed while encoding in multiple tiles, and
      enabling/disabling probability update can be set separately for every
      individual tile.
      
      Change-Id: Ic3c64e6cebac89c483d48b874761bd2e902d81e6
      0e141b56
  14. 02 Nov, 2017 3 commits
    • Dake He's avatar
      [level map] cleanup and remove assertions · bd47bfaa
      Dake He authored
      Removed assertions were not properly set up and may cause decoding failure when USE_CASUAL_CTX is enabled. This CL does not change bitstream.
      
      Change-Id: Ib9193cbda32f342335a79aca39e9cc49204a0ec9
      bd47bfaa
    • Sebastien Alaiwan's avatar
      Remove experimental flag of EXT_TX · 3bac9928
      Sebastien Alaiwan authored
      This experiment has been adopted, we can simplify the code
      by dropping the associated preprocessor conditionals.
      
      Change-Id: I02ed47186bbc32400ee9bfadda17659d859c0ef7
      3bac9928
    • Dake He's avatar
      [level map] simplified context derivation · 03a32926
      Dake He authored
      This CL simplifies context derivation for nz and base level flags in
      level map.
      1. Reduce SIG_COEF_CONTEXTS from 58 to 42.
      2. NZ and base level flags share the same context offsets derived from a
      template of size 5 (down from 7).
      
      In limited runs, compression performance seems neutral if not better.
      Encoding time for a key frame on a local linux machine is reduced by about 25% or more.
      
      Change-Id: Ibd93b21c839154bc5ae26b993f9e66537cbf5942
      03a32926
  15. 01 Nov, 2017 2 commits
  16. 28 Oct, 2017 1 commit
    • Jingning Han's avatar
      Extend the eob context model · 35deaa73
      Jingning Han authored
      Account for 1-D/2-D transform kernels for the eob modeling. To
      maintain a smaller context cardinality, set the two 1-D transform
      kernels in the same category. The difference in directions should
      be largely covered by the scan order.
      
      This and the previous CLs on nz_map context modeling together
      improve the compression performance of level-map coefficient coding
      system by 0.4% for lowres.
      
      Change-Id: I8c4f03ca01ce3d248950d04bd1266f445b4227a0
      35deaa73
  17. 26 Oct, 2017 4 commits
  18. 24 Oct, 2017 3 commits