1. 07 Oct, 2017 2 commits
    • Rupert Swarbrick's avatar
      Upscale frame correctly in foreach_rtile_in_tile · b66894ac
      Rupert Swarbrick authored
      The restoration tiles (rtiles) divide the upscaled frame, not the
      encoded one.
      
      Change-Id: I2d08fe926d694fee7064461685289d3fd1c1de0c
      b66894ac
    • Debargha Mukherjee's avatar
      Remove the speed optimization for rd_stats_stack · 9245d89d
      Debargha Mukherjee authored
      This optimization for speed was useful only when max tx-size
      was 32x32. However with tx64x64 this was breaking certain assumptions
      causing huge drops in coding efficiency. So I am removing this
      optimization for now. This can be brought back latger as a speed feature.
      The removal of this optimzation brings back the loss when 32x64
      and 64x32 transforms are used.
      
      Change-Id: I15987ea9ff53fa36a2962fe5f156c30a11e809ed
      9245d89d
  2. 06 Oct, 2017 9 commits
    • Jingning Han's avatar
      Rework key frame intra mode context model · a45d842d
      Jingning Han authored
      Reduce the context model size for key frame modes from 30240 bits
      to 4500 bits, i.e., less than 1/6 of the original context model.
      The coding performance loss on key frame is 0.14% for lowres and
      noise level difference for video sequence. The loss on key frame
      for midres is 0.05% and noise level for whole video. The change
      on hdres kf coding is 0.015%.
      
      Change-Id: I9e36825e5c5ee6ba35038c3ca349ad1ad3429910
      a45d842d
    • 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
    • Sebastien Alaiwan's avatar
      Avoid left shift of negative value · 92acb81b
      Sebastien Alaiwan authored
      This is undefined behaviour in C99 and could mislead the optimizer.
      This fixes the ubsan warning, and still generates optimal code
      (i.e an inlined 'sar' instruction).
      
      Change-Id: I36b20a6780532b8c9379b9fbfd970933d56b1bc5
      92acb81b
    • 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
    • Sebastien Alaiwan's avatar
      Explicit requirement about sizeof(tran_low_t) · 698af562
      Sebastien Alaiwan authored
      Here, we're testing CONFIG_HIGHBITDEPTH but what we really depend upon
      is the actual size of the coefficients.
      
      Change-Id: I33d71e4b38b4b83bb4232346f4d449f20bcf740e
      698af562
    • RogerZhou's avatar
      Fixed a bug in hash ME when it is used in intrabc · 2b6456c1
      RogerZhou authored
      Change-Id: I4f158dd15e4a7a8abb27ad0ad6aed6f8f9fce4f6
      2b6456c1
    • 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
    • Debargha Mukherjee's avatar
      Fix compile conflict w/ unpoison-partition-context · ab8bf508
      Debargha Mukherjee authored
      Fixes compile failures with unpoison-partition-context and
      ext-partition-types.
      
      Change-Id: Ibedab7d927d6bf7329a5fc5a3050aa6272d4b254
      ab8bf508
  3. 05 Oct, 2017 9 commits
  4. 04 Oct, 2017 9 commits
    • Dominic Symes's avatar
      Fix for issue 844 · c27f5424
      Dominic Symes authored
      Change the foreach_rtile_in_tile() function to call av1_tile_set_row/col
      to calculate tile borders, rather than calculate tile borders itself.
      This will then allow variable sized tiles.
      
      Also remove some unused set tile width/height defines from aomcx.h
      
      BUG=aomedia:844
      
      Change-Id: I356c90cb4189b904ca1d6e57939582b2e92f3162
      c27f5424
    • 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
    • Cheng Chen's avatar
      Clamp current_delta_lf_from_base in ext_delta_q · 9dccdf24
      Cheng Chen authored
      BUG=aomedia:829
      
      Change-Id: I78347e12b4efa05ebd424ba25de7767437495b42
      9dccdf24
    • Jingning Han's avatar
      Experiment probability precision for lv-map coding · 94cea4ac
      Jingning Han authored
      Experiment probability precision for binary coding in the lv-map
      coding system.
      
      Change-Id: I8d9c49eee6dc7ca7970390fa5febe25b80bfab3c
      94cea4ac
    • 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
    • Dominic Symes's avatar
      MAX_TILE: Allow list of tile widths/heights · 26ad0b22
      Dominic Symes authored
      The aomenc API is modified to allow --tile_width and --tile_height to take a list of sizes.
      For example, --tile_width=2,3 will give tiles of widths 2,3,2,3,... until the image width
      is exhausted. --tile_width=2 will still work to gives tiles of width 2.
      
      Change-Id: I2afa14d404557aa8b7341b20f7477590e03e0bdb
      26ad0b22
    • Sebastien Alaiwan's avatar
      Remove HBD special cases · 8ce18aea
      Sebastien Alaiwan authored
      xd->bd is available here and is equal to 8 in the low-bitdepth case.
      
      Change-Id: I20760f7ec4279008fdab005345442052b1d10905
      8ce18aea
    • Cheng Chen's avatar
      LOOPFILTER_LEVEL: add flexibility for EXT_DELTA_Q · 880166ab
      Cheng Chen authored
      When experiment LOOPFILTER_LEVEL is on, there're four base filter levels
      for each frame. This patch enables one to use one delta or four deltas
      to update corresponding filter levels for each superblock in
      EXT_DELTA_Q.
      
      1 bit per frame is sent through bitstream to select one or four deltas.
      Now, we hard code to use one delta.
      
      Change-Id: I9c61a035064fa81878b0575ad21664e2b22a6a45
      880166ab
  5. 03 Oct, 2017 6 commits
    • Hui Su's avatar
      Remove symbol mapping of intra modes · 814f41e7
      Hui Su authored
      The _ind and _inv mapping tables are not necessary. The CDF tables are
      updated with new values converted from the old tables. Performance
      impact is small and neutral.
      
      Change-Id: I65845ab3c80f88794abd9ab9e61494af56099c7c
      814f41e7
    • David Barker's avatar
      Fix global-motion + error-resilient-mode · d7c8bd51
      David Barker authored
      Patch https://aomedia-review.googlesource.com/c/21783
      changed things so that error-resilient frames use the default
      global motion parameters as a reference, rather than taking
      the reference from the previous frame.
      
      This was implemented by clearing out cm->prev_frame->global_motion
      when we have an error-resilient frame. Unfortunately, this causes
      an issue: if we have an error resilient frame which isn't stored
      into any reference slots, followed by a non-error-resilient frame,
      then both frames refer to the same prev_frame. The second frame
      then delta-codes against cm->prev_frame->global_motion, but
      this was reset to the default values by the intervening
      error-resilient frame!
      
      In order to allow the above case to work as intended, expand the
      default warp parameter set to a full WarpedMotionParams struct,
      and use that as the reference for error-resilient frames.
      
      This also allows us to remove set_default_warp_params, as we
      can now just copy directly from default_warp_params.
      
      Change-Id: I9645615db2700c1d3810e6e42f4f1da626fcd5e3
      d7c8bd51
    • David Barker's avatar
      Deduplicate use_reference_buffer/frame_id_numbers_present_flag · 5e70a114
      David Barker authored
      These two flags serve essentially the same purpose, so we can
      simplify down to just having one flag. Since the
      frame_id_numbers_present_flag is older and listed in the
      reference-buffer design doc, this is the one we'll keep.
      
      Note that, previously, frame_id_numbers_present_flag was only
      sent when CONFIG_OBU was enabled - otherwise it was always set
      to 1. On the other hand, use_reference_buffer was always signalled
      so that allowed us to disable frame ids even without CONFIG_OBU.
      
      In order to keep the ability to disable frame IDs without
      CONFIG_OBU, we send a "real" sequence header (ie, with the same
      data as in CONFIG_OBU) in-line within the uncompressed header.
      This is sent every keyframe and every intra-only frame, just
      as the use_reference_buffer flag was before this patch.
      
      BUG=aomedia:853
      
      Change-Id: I4bb6c7a222aeddfb6d3737a39d10782d32ee2eee
      5e70a114
    • Yushin Cho's avatar
      Make braces matchable in vi for select_tx_block() · c5a1f263
      Yushin Cho authored
      For select_tx_block() in rdopt.c.
      
      Change-Id: Iaac658ab7e7c0b53597f4f781a4fd0f340e9308d
      c5a1f263
    • Cheng Chen's avatar
      Make LOOPFILTER_LEVEL support EXT_DELTA_Q · a97394f7
      Cheng Chen authored
      Before LOOPFILTER_LEVEL, there's one filter level,
      now we have four filter levels for y plane vertical,
      y plane horizontal, u plane and v plane.
      
      This patch enables experiment LOOPFILTER_LEVEL to support per
      superblock loop filter level update.
      
      Change-Id: Ib11a1564471eb3076c26e73e5cdf7b5a3045ef97
      a97394f7
    • Angie Chiang's avatar
      Fix memory leak incurred by av1_alloc_txb_buf() · 9367e3ec
      Angie Chiang authored
      Since alloc_compressor_data() may be called multiple times before
      dealloc_compressor_data() is called
      
      The av1_alloc_txb_buf() called by alloc_compressor_data() should
      free the txb_buf before allocating new txb_buf
      
      Change-Id: I0fe15de771e0669ec3521e5aac322f5cedfd67a9
      9367e3ec
  6. 02 Oct, 2017 5 commits