1. 22 Sep, 2017 1 commit
    • 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
  2. 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
  3. 19 Sep, 2017 1 commit
  4. 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
  5. 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
  6. 13 Sep, 2017 2 commits
  7. 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
  8. 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
  9. 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
  10. 09 Sep, 2017 1 commit
  11. 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
  12. 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
  13. 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
  14. 04 Sep, 2017 3 commits
    • clang-format's avatar
      apply clang-format · 4eafefe0
      clang-format authored
      Change-Id: If0b48a4ee1f7902d8c6154945ccef68a2b5aabb5
      4eafefe0
    • Rupert Swarbrick's avatar
      Check for early end of data when reading tiles · cd75739f
      Rupert Swarbrick authored
      BUG=aomedia:709
      
      Change-Id: I26f8938a744f7ebfd9734929502730b17de348f9
      cd75739f
    • Rupert Swarbrick's avatar
      Replace an assertion with a proper error on bad bitstream · 5c73c003
      Rupert Swarbrick authored
      The example in bug 712 is a bitstream that signals a global motion
      type of ROTZOOM, but its second frame has shear parameters that fail
      the is_affine_shear_allowed check at warped_motion.c:754. This is
      quite possible (and it's not obvious how to change the bitstream
      format so that you can't signal something like this).
      
      This patch replaces the failing assertion with a proper "no you
      can't!" error.
      
      BUG=aomedia:712
      
      Change-Id: I6a32632d17031b777acd2f78a887491a40177785
      5c73c003
  15. 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
  16. 02 Sep, 2017 1 commit
  17. 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
  18. 31 Aug, 2017 6 commits
    • 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
    • hui su's avatar
      Remove probablity model for coeffecient tokens · b53682f5
      hui su authored
      Remove the token prob tables and counters.
      
      Change-Id: Ic63d52d80bb922fc10b586c27a20f2378618168c
      b53682f5
    • Jingning Han's avatar
      Enable motion field estimation in DRL · ffbb0f91
      Jingning Han authored
      Enable the use of motion field estimation in the dynamic motion
      vector referencing system. With default experiments on, it improves
      the compression performance:
      
      lowres 1.2%
      midres 1.5%
      
      Change-Id: Ifc5b15a7239b5c3212ea50f326ab99d372034658
      ffbb0f91
    • Jingning Han's avatar
      Add frame index to the decoded frames · c723b348
      Jingning Han authored
      Add frame index to the deocded frames. Store such information to
      the reference frame buffer pool. This design allows each frame
      to know its index in natural order, as well as its reference
      frames positions.
      
      Change-Id: I5bb36928dc5750a4fdcc582dca0d244d6482f400
      c723b348
  19. 30 Aug, 2017 1 commit
  20. 29 Aug, 2017 1 commit