1. 27 Sep, 2017 4 commits
    • Dominic Symes's avatar
      MAX_TILE experiment: add explicit tiles · f58f111f
      Dominic Symes authored
      This patch is designed to complete the CONFIG_MAX_TILE experiment.
      It adds the following features:
      - Explicit tiles of same width can be signalled with command line --tile_width
      - Explicit tiles of same hieght can be signalled with command line --tile_height
      - max_tile now works with the depenedent horizontal tiles experiment
      - additional checking added to ensure maximum number of rows/columns <= 64
      - one fix to the tile group code for when the number of tiles is not a power of two
      
      Change-Id: I749a68fdb3dcdd8d1ced2b3558f3817e4b832c06
      f58f111f
    • Pavel Frolov's avatar
      Setup sb_size when decoding intra_only frame · ea3dd3aa
      Pavel Frolov authored
      This fixes decoder's capability to start decoding
      bitstream from non-KEY intra_only frame.
      
      BUG=aomedia:816
      
      Change-Id: Iecd5add418590119f59a51acd7208eb08cb17042
      ea3dd3aa
    • Sebastien Alaiwan's avatar
      Fix typo in comment · c4559cad
      Sebastien Alaiwan authored
      Change-Id: Id6f588876b1adf68abd8c17d7eef2223d552e457
      c4559cad
    • Cheng Chen's avatar
      LPF_SB: add filter step and tune threshold · f89ca3e1
      Cheng Chen authored
      Set filter step = 2, such that 3 bit can represent [-14, +14] filter
      level difference.
      
      Tune threshold for reusing filter level between previous and current
      superblock.
      
      Change-Id: I6f26377591f3e93f7c068e4aa4279ae9bc2c9522
      f89ca3e1
  2. 26 Sep, 2017 5 commits
    • Yushin Cho's avatar
      Disable palette coding if pvq is enabled · a8810391
      Yushin Cho authored
      PVQ has been broken again since the experiment flag for palette is removed
      in commit c6300aa1.
      
      As a fix, if PVQ is enabled then disable both of --tune-content=screen and
      automatic detection of screen and use of palette coding tool.
      
      Change-Id: Iea6bb042b4402163805c44dabfb3f4c05dfd4e23
      a8810391
    • Luc Trudeau's avatar
      [CFL] Store Reconstructed Luma for Intra In Inter · b05eeaef
      Luc Trudeau authored
      Like for intra block in intra frames, an extra call to
      txfm_rd_in_plane is added to the RDO of intra blocks in inter frames.
      This extra call is performed using the best parameters found during
      RDO and the reconstructed luma pixel are stored.
      
      Results on objective-1-fast (compared to CfL on Intra frames only)
      
         PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
      -0.2497 | -3.5526 | -3.5048 |  -0.2456 | -0.2392 | -0.2508 |    -1.4811
      
      https://arewecompressedyet.com/?job=cfl-no-inter%402017-09-13&job=cfl-inter%402017-09-13T14%3A13%3A13.918Z
      
      Change-Id: I70ea2c01859b6c55d7c3eb9680d492c0bfc2aad4
      b05eeaef
    • Cheng Chen's avatar
      Reorgnize loop filter range for superblock · 5589d71c
      Cheng Chen authored
      For each superblock, its filtering range is shifted up and left by
      8 pixels (half of the maximum loop filter length), such that
      estimation of deblocking filtering will not cross two superblocks.
      
      Change-Id: I82244b7c26ab8b2ac553037b3bb1fe1d82bf5704
      5589d71c
    • Cheng Chen's avatar
      Add threshold to superblock filter level selection · c7855b1a
      Cheng Chen authored
      Signal one bit to indicate whether current superblock reuses filter
      level of previous superblock.
      Try filtering and compute sse using previous filter level and search
      the best possible filter level. If their diff is less than predefined
      threshold, current superblock reuses previous level. Otherwise,
      signal the best filter level.
      
      Change-Id: Ibf125860883b774ef2464b62bb8b799b48258c64
      c7855b1a
    • Debargha Mukherjee's avatar
      Add experiment to restrict compressed header · 2eada612
      Debargha Mukherjee authored
      The compressed header is now used only when the refresh
      type is set as forward, i.e. in error resilience and
      frame parallel modes. As long as backward updates are
      used the header is disabled thereby saving bits.
      
      Change-Id: Iee9f66ffbd30ef3552ea41b75e4b51537cd9ff97
      2eada612
  3. 23 Sep, 2017 4 commits
  4. 22 Sep, 2017 2 commits
    • Hui Su's avatar
      Remove probablity model for tx type · 98b0b3e9
      Hui Su authored
      It's not being used anymore, replaced by the CDF model.
      The counters are moved under the entropy-stats experiment, so that they
      can be used to tune the default CDF values.
      
      Change-Id: I50cb170c4c8699cf7317fd77853b3fedf2342d3e
      98b0b3e9
    • 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
  5. 20 Sep, 2017 4 commits
    • Cheng Chen's avatar
      Search for deblocking filter level for superblock · f572cd30
      Cheng Chen authored
      Search and pick filter level for each superblock after the entire
      frame has been encoded. And then apply loop filtering using
      selected filter levels.
      
      Now it can't work with LOOPFILTER_LEVEL. Y, U, V planes share the
      same filter level.
      
      Per superblock, filter levels are signaled via bitstream.
      
      Future work: move selecting filter level into each superblock
      rather than wait for the whole frame encoded.
      
      Change-Id: I46cb994ec4866abb0456146f7c3cae8813c1d52e
      f572cd30
    • Soo-Chul Han's avatar
      initial implementation of HLS based on R18 · 65c00ae1
      Soo-Chul Han authored
      Change-Id: I78bb38e3d61d74442278bd5ed1c4f695b7c8e24a
      65c00ae1
    • David Barker's avatar
      new-multisymbol: Don't signal ext-comp-refs probs · 037ee412
      David Barker authored
      Currently, when new-multisymbol and ext-comp-refs are
      both enabled, the comp_ref_type_prob and uni_comp_ref_prob
      arrays are forward updated in the compressed header, but
      their values are never used.
      
      We can save a tiny bit of space by not signalling the
      forward updates at all; as a side benefit, we can wrap
      the whole of read_frame_reference_mode_probs() in
      a #if !CONFIG_NEW_MULTISYMBOL block.
      
      Note: It seems the encoder already does this; I think
      the reason it doesn't cause mismatches is because we
      effectively pad the compressed header out to a full byte,
      and av1_diff_update_prob() reads a bit with a very high
      probability of being 0.
      
      Change-Id: Ia1fca05ee498609c98c7ea1f89578f6783357d7f
      037ee412
    • Dominic Symes's avatar
      Add the max-tile tool with uniform tile support · db5d66fe
      Dominic Symes authored
      This adds the tool CONFIG_MAX_TILE
      Uniform tiles are implemented using power of two number of rows or columns.
      Maximum number of rows or columns is 64
      Explicit tiles will follow in a later commit once the command line API is updated for this
      
      Change-Id: Ia8d22e7f4aa779448211496c644937afdf037228
      db5d66fe
  6. 19 Sep, 2017 1 commit
  7. 18 Sep, 2017 1 commit
    • David Barker's avatar
      Save global motion params even in error-resilient-mode · cba7da74
      David Barker authored
      The error-resilient-mode flag is currently set per frame,
      so we can encode a non-error-resilient frame immediately
      after an error-resilient frame.
      
      As of https://aomedia-review.googlesource.com/c/21783 , this
      case causes the decoder to read uninitialized memory. This
      happens because the error-resilient frame no longer sets up
      cm->cur_frame->global_motion. Then, on the non-error-resilient
      frame, that is renamed to cm->prev_frame->global_motion and we
      try to use it as a reference for delta encoding.
      
      Fix this by always writing cm->cur_frame->global_motion.
      
      Change-Id: I0d4f13bf413ca15da210e06d5ce1780331c005da
      cba7da74
  8. 16 Sep, 2017 1 commit
    • Hui Su's avatar
      intrabc: replace prob with cdf · 6c8584f6
      Hui Su authored
      Improves keyframe coding by 0.1% on the screen_content testset.
      
      Change-Id: I5793a67eaae21010ef200038af99ebb9029fc770
      6c8584f6
  9. 13 Sep, 2017 2 commits
  10. 12 Sep, 2017 1 commit
    • Debargha Mukherjee's avatar
      Ensure consistent border extension before LR · fc9f3ccd
      Debargha Mukherjee authored
      Before LR the border extension needs to be consistent.
      Otherwise there will be inconsistency at the frame boundaries
      causing mismatches.
      
      BUG=aomedia:742
      BUG=aomedia:744
      BUG=aomedia:745
      
      Change-Id: I5b0c51aa1493c58f7acc706bf686ce711eadd75d
      fc9f3ccd
  11. 11 Sep, 2017 2 commits
    • Sarah Parker's avatar
      Tokenize and write mrc mask · 99e7daa2
      Sarah Parker authored
      This allows a mask for mrc-tx to be sent in the bitstream for
      inter or intra 32x32 transform blocks. The option to send the mask
      vs build it from the prediction signal is currently controlled with
      a macro. In the future, it is likely the macro will be removed and it
      will be possible for a block to select either method. The mask building
      functions are still placeholders and will be filled in in a followup.
      
      Change-Id: Ie27643ff172cc2b1a9b389fd503fe6bf7c9e21e3
      99e7daa2
    • Steinar Midtskogen's avatar
      CDEF: Do not filter chroma if subsampling_x != subsampling_y · 1c1161f1
      Steinar Midtskogen authored
      Since CDEF looks uses the luma direction for chroma, CDEF would have
      to change significantly to support formats like 4:2:2.  The limited
      use of such formats does not justify the complexity to support this,
      so the simple solution is to mandate that the chroma planes aren't
      filtered if subsampling_x != subsampling_y.  Most of the visual gain
      is in luma, anyway.
      
      This also means that the chroma strengths and chroma skip condition
      shall not be sent if subsampling_x != subsampling_y.
      
      BUG=aomedia:720
      
      Change-Id: I35c184a6fe0908ae0fee1e74494b6904fa9a3c82
      1c1161f1
  12. 10 Sep, 2017 1 commit
    • Debargha Mukherjee's avatar
      Reduce/Eliminate line buffer for loop-restoration. · e168a783
      Debargha Mukherjee authored
      This patch forces the vertical filtering for the top and bottom
      rows of a processing unit for the Wiener filter to not use border
      more than what is set in the WIENER_BORDER_VERT macro.
      This macro is currently set at 0 to eliminate line buffer completely,
      but it could be increased to 1 or 2 to use limited line buffers
      if the coding efficiency is affected too much with a 0 line-buffer.
      
      Also, for the sgr filter we added the option of using overlapping
      windows horizonttally and vertically to improve coding efficiency.
      The vertical border used is set by the SGRPROJ_BORDER_VERT
      macro, while the horizontal border can be set by the
      SGRPROJ_BORDER_HORZ macro set at 2, the max needed. Currently we do not
      recommend changing SGRPROJ_BORDER_HORZ below 2.
      
      The overall line buffer requirement for LR is twice the max of
      WIENER_BORDER_VERT and SGRPROJ_BORDER_VERT.
      Currently both are set as 0, eliminating line buffers completely.
      
      Also this patch extends borders consistently before CDEF / LR.
      
      Change-Id: Ie58a98c784a0db547627b9cfcf55f018c30e8e79
      e168a783
  13. 09 Sep, 2017 1 commit
  14. 07 Sep, 2017 3 commits
    • David Barker's avatar
      Don't read global motion for intra-only frames · d3bbfee8
      David Barker authored
      Save bits by not encoding global motion data when there's no
      previous frame to use as a reference. Use the same logic
      as for using the previous frame's motion vectors - ie, we don't
      read global motion information when the current frame is
      intra-only or when using error-resilient mode.
      
      This also fixes an undefined behaviour / segfault bug - see
      https://bugs.chromium.org/p/aomedia/issues/detail?id=731 for
      details
      
      BUG=aomedia:731
      
      Change-Id: Icca90a1bccafd06de8a4056ca5353318fce416cb
      d3bbfee8
    • Rupert Swarbrick's avatar
      Remove repetition in decode_partition · 668d3d99
      Rupert Swarbrick authored
      The callsites to decode_block and decode_partition in the body of
      decode_partition are rather noisy with code that is enabled or
      disabled by config flags, so it's hard to see what is fundamentally a
      simple recursion.
      
      This patch moves all that cruft into a pair of locally defined
      preprocessor macros (DEC_BLOCK and DEC_PARTITION) to simplify
      things.
      
      There's no diff in disassembled code when compiling before and after
      the patch.
      
      Change-Id: Ie08db263a9874e2c566c758e8f3a51d131b1b80b
      668d3d99
    • David Barker's avatar
      Fix an edge case in tile group decoding · 1a191125
      David Barker authored
      As of patch https://aomedia-review.googlesource.com/c/20220 ,
      it is no longer always the case that tile_rows == (1 << log2_tile_rows)
      and tile_cols == (1 << log2_tile_cols). This exposed an inconsistency
      in the tile-group decoding:
      
      When reading the first tile group in a frame, we read
      (log2_tile_rows + log2_tile_cols) bits each for the tile group
      start and length, but when reading later tile groups we read
      get_msb(tile_rows * tile_cols) bits. But now there are edge cases
      where those values differ! Since the encoder always uses
      (log2_tile_rows + log2_tile_cols) bits, this leads to mis-parsing
      the bitstream.
      
      Fix this by moving the decode logic to one function, which always
      reads (log2_tile_rows + log2_tile_cols) bits. As a bonus, this gives
      us one place to check other invariants, eg. that tile groups can't
      run off the end of the frame.
      
      Change-Id: I83b24314526b6055300b70b0f1cdce038e6b23dc
      1a191125
  15. 06 Sep, 2017 3 commits
    • Sarah Parker's avatar
      Remove global motion from compressed header · 3e579a60
      Sarah Parker authored
      This requires making a temporary copy of the functions in
      binary_codes_writer/reader to take in the aom_write_bit_buffer type.
      
      Change-Id: Idb60b29cff69b45224535c6e6a4079a34a2c6871
      3e579a60
    • Wei-Ting Lin's avatar
      ncobmc-adapt-weight: refactoring the mode selection function · 3122b7d5
      Wei-Ting Lin authored
      Change-Id: I7393596d98f11aa53ba4b9e329386b5168b3e086
      3122b7d5
    • Debargha Mukherjee's avatar
      Make loop-restoration use 64x64 processing units · 7a5587a8
      Debargha Mukherjee authored
      Changes loop-restoration to use processing unit size that is
      64x64 for luma; for chroma the processing unit is coupled to
      64x64 support region for luma.
      Thus for chroma the processing unit size is 32x32 for 4:2:0,
      32x64 for 4:2:2 and 64x64 for 4:4:4, etc.
      
      While the Wiener filter output should not change with this patch,
      the sgr filter will change since the boundary pixel handling in
      sgr is internal within the filter.
      
      Change-Id: I65a9e2df88927a19445420ce400acb1fcf7afa93
      7a5587a8
  16. 05 Sep, 2017 4 commits
    • Wei-Ting Lin's avatar
      ncobmc-adapt-weight: applying at the encoder as new motion mode · 01d4d8f2
      Wei-Ting Lin authored
      Change-Id: I1cd1197b48a3315fe4f44578b80634be73de17a3
      01d4d8f2
    • Rupert Swarbrick's avatar
      Fix tile height/width calculation · 9a3640d8
      Rupert Swarbrick authored
      In the bitstream in bug 709, the frame has a width of 13318 mi
      units. This rounds up to 13328 mi units (when rounding to a whole
      number of max superblocks) but then the shift right by log2_tile_cols
      gives floor(13328/32) = floor(416.5) = 416. Of course 32*416 = 13312
      which is less than 13318.
      
      This patch moves the <mi_cols, log2_tile_cols> -> tile_width
      calculation (and the equivalent calculation for tile_height) into a
      common function which gets the rounding right.
      
      BUG=aomedia:709
      
      Change-Id: If5e8e6b7a3c6f3d336cda9edd94a17595eaf5406
      9a3640d8
    • Rupert Swarbrick's avatar
      Allow tile_rows/tile_cols to not be a power of 2 · 940942ba
      Rupert Swarbrick authored
      The example bitstream in bug 710 shows what might go on. This has a
      frame with mi_cols=540 and log2_tile_cols=3. But 540/8 = 67.5, which
      gets rounded up to give a tile_width of 5*16=80. However, 540/80 =
      6.75 which means that the frame finishes somewhere in the middle of
      tile 7 (and tile 8 is completely empty).
      
      This patch clamps tile_rows/tile_cols to ensure that can't happen. The
      bitstream still signals ceil(log2(tile_<rows/cols>)) so there's no
      change there.
      
      BUG=aomedia:710
      
      Change-Id: Idfad658ef59cf71674100f5e74bd53dd192c6a84
      940942ba
    • Jonathan Matthews's avatar
      Reset delta_lf_present_flag as required · a48b1e68
      Jonathan Matthews authored
      BUG=aomedia:721
      
      Change-Id: Ic6e767b1c11399379391a2ba92e3ec53dd0a2be0
      a48b1e68
  17. 04 Sep, 2017 1 commit