1. 13 Sep, 2017 3 commits
  2. 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
  3. 11 Sep, 2017 5 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
    • Jingning Han's avatar
      Use per tile model update for coeff_br coding · e29c9260
      Jingning Han authored
      Change-Id: Ie52d52bc25e3fdfdea877349215431d8edc064a3
      e29c9260
    • Jingning Han's avatar
      Fix base range counter index in lv-map decoding · 2e40574e
      Jingning Han authored
      Fix the index order of br_idx.
      
      Change-Id: I55acda816d1ec33c25ca4c31b09976f5e6f9c562
      2e40574e
    • Soo-Chul Han's avatar
      add SEG_LVL_ZEROMV · a752d1d5
      Soo-Chul Han authored
      Change-Id: Icd04302886a4d12890d04f9f15563169a91e3a0d
      a752d1d5
    • 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
  4. 10 Sep, 2017 2 commits
    • Jingning Han's avatar
      Rework base range entropy coding in level map system · 87b01b5a
      Jingning Han authored
      Replace the truncated geometric distribution model with the grouped
      leaves structure for more efficient probability modeling.
      Each group has its own Geometric distribution
      
      This give us 0.2% gain on lowres
      
      Change-Id: If5c73dd429bd5183a8aa81042f8f56937b1d8a6a
      87b01b5a
    • 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
  5. 09 Sep, 2017 2 commits
  6. 08 Sep, 2017 1 commit
    • Hui Su's avatar
      palette-delta-encoding: remove dependency on above SB row · 3748bc2a
      Hui Su authored
      Do not refer to above MB when on SB boundary. This helps to
      reduce line buffer.
      
      Keyframe coding gain on the screen_content testset drops from
      1.28% to 1.20%.
      
      Change-Id: I4b06fd137d6c9ea68d618035381f09d0746ba9e8
      3748bc2a
  7. 07 Sep, 2017 4 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
    • Wei-Ting Lin's avatar
      ncobmc-adapt-weight: add bitstream to support warped motion · 07ed3ab2
      Wei-Ting Lin authored
      Change-Id: I0e9df3719e5f9a55e1386afe44851d1707e2e01b
      07ed3ab2
    • 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
  8. 06 Sep, 2017 5 commits
  9. 05 Sep, 2017 5 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
    • Thomas Davies's avatar
      NEW_MULTISYMBOL: adapt palette mode coding. · 59f92319
      Thomas Davies authored
      Use adaptive CDFs for coding the palette mode.
      
      Change-Id: Iadbccfea4f4a38f3037814a609adf3f3ae2c835d
      59f92319
    • Jonathan Matthews's avatar
      Reset delta_lf_present_flag as required · a48b1e68
      Jonathan Matthews authored
      BUG=aomedia:721
      
      Change-Id: Ic6e767b1c11399379391a2ba92e3ec53dd0a2be0
      a48b1e68
  10. 04 Sep, 2017 4 commits
  11. 03 Sep, 2017 1 commit
    • Rupert Swarbrick's avatar
      Move loop restoration coefficients to within the frame · 6c545216
      Rupert Swarbrick authored
      Rather than encoding the loop restoration coefficients at the start of
      the frame header, this patch moves them to occur just after certain
      top-level superblocks.
      
      You might hope that we could just encode coefficients on top-level
      superblocks where the top-left corner of the superblock was also the
      top-left corner of the loop restoration tile. Unfortunately, this
      can't work with the superres experiment, where the loop restoration
      tiles don't necessarily line up with the superblocks. Indeed, in
      general there can be multiple different loop restoration coefficients
      that apply in a given top-level superblock. This patch defines a
      function, av1_loop_restoration_corners_in_sb, which yields the
      rectangle [rrow0, rrow1) x [rcol0, rcol1) of loop restoration tiles
      whose top left corners lie in this top-level superblock.
      
      The total file size should be unchanged by this patch: the bits have
      just been moved from the frame header and spread out among the rest of
      the frame.
      
      Change-Id: Icf43b0560964a63dea0d2cd801313f04139188d7
      6c545216
  12. 02 Sep, 2017 1 commit
  13. 01 Sep, 2017 2 commits
    • David Barker's avatar
      Miscellaneous fixes for var-tx · 16c64e33
      David Barker authored
      Lots of small bug fixes, mainly around the transform size coding:
      
      * The loop filter was accidentally using the non-subsampled
        block size for the V plane, due to comparing a plane index
        (0, 1, or 2) against PLANE_TYPE_UV (== 1)
      
      * We allowed an initial update of the transform partition probabilities
        even on frames where we know they will never be used
        (because tx_mode != TX_MODE_SELECT).
        Further, these probabilities would not be reverted at the end
        of the frame, leading to the probability delta persisting across frames.
      
        Change this to behave more like the non-var-tx transform size coding,
        where probability deltas are only coded for frames with
        tx_mode == TX_MODE_SELECT, and the deltas only apply for one frame.
      
      * Fix decoder for the case where the video as a whole isn't lossless,
        and we have tx_mode == TX_MODE_SELECT, but the current segment
        *is* lossless.
        Note that the encoder already does the right thing in this case.
      
      * Don't allow the transform splitting to recurse "below" 4x4.
        This is really just a refactor, but means we can increase the
        maximum depth when subdividing rectangular transforms if we
        want to, whereas the previous code would have needed special cases
        for 4x8 and 8x4 transforms.
      
      * Finally, when we hit the maximum splitting depth, don't update
        the counts as if we had coded a 'no split' symbol.
      
      Change-Id: Iaebdacc9de81d2e93d3c49241e719bbc02e32682
      16c64e33
    • Rupert Swarbrick's avatar
      Encode loop restoration coefficients per tile · 09b5b168
      Rupert Swarbrick authored
      This is a baby-step towards encoding the coefficients at the start of
      superblocks at the top-left of loop restoration tiles. Note that this
      patch causes us to reset "wiener_info" and "sgrproj_info" at each tile
      boundary, which will cause a performance drop.
      
      This is necessary because, in order for tiles to be processed in
      parallel, we cannot delta-encode coefficients across tile boundaries
      if the coefficients are signalled within tiles. We could probably do
      better than the current patch by, say, delta-encoding against previous
      frames.
      
      This patch also fixes up the costing in pickrst.c to match
      
      Change-Id: I5b8b91d63aaf49627cde40219c31c0ac776dfd38
      09b5b168
  14. 31 Aug, 2017 4 commits
    • Angie Chiang's avatar
      Use 7 neighbors for nz_map ctx · 2b38deff
      Angie Chiang authored
      This will let coding performance drop slightly
      lowres 0.093%
      
      Increase encoder speed by 24%
      
      Reduce nz_map's context size by 20%
      
      Change-Id: I871c18a7e0341e066afc334556b9998194b3f8c9
      2b38deff
    • Cheng Chen's avatar
      Refactor init of segment dequant in delta_q · 49d30e63
      Cheng Chen authored
      Change-Id: I51c80a22db9c4930d18676aab1496106f44f4f3e
      49d30e63
    • Stanislav Vitvitskyy's avatar
      Using CDFs for read_partition special case · 8711cf5f
      Stanislav Vitvitskyy authored
      Test results:
      akiyo	    -0.05%
      bowing	    -0.072%
      bridge	    -0.042%
      bus	    -0.156%
      coastguard  -0.645%
      container   -0.087%
      deadline     0.007%
      flower       0.02%
      football    -0.009%
      foreman      0.03%
      hall         0.087%
      highway     -0.041%
      husky       -0.031%
      mad900       0.015%
      mobile      -0.007%
      mother       0.012%
      news         0.039%
      pamphlet     0.061%
      paris       -0.003%
      sign        -0.148%
      silent       0.003%
      students    -0.009%
      tempete     -0.061%
      waterfall    0.666
      
      Change-Id: I96c2fd3a6fbc5f8e5cf7f3b881ef89335e58d5ac
      8711cf5f
    • Luc Trudeau's avatar
      [CFL] Asserts for chroma_sub8x8 · c84c21c4
      Luc Trudeau authored
      When Chroma from Luma is combined with chroma_sub8x8, the prediction
      used for sub8x8 blocks originates from multiple luma blocks. Extra
      asserts are added to validate that the prediction buffer contains all
      the required information.
      
      Change-Id: I305c46ce9b8292697e1d5b181d123461026da11c
      c84c21c4