1. 07 Nov, 2017 16 commits
    • Rupert Swarbrick's avatar
      Remove duplicated code for reading/writing sequence header · b394bfec
      Rupert Swarbrick authored
      Teach read_sequence_header_obu and write_sequence_header_obu to just
      call read_sequence_header and write_sequence_header, respectively.
      
      Change-Id: Iff27b5cfbccab0ebaf2e28d72df3d6606964936f
      b394bfec
    • Rupert Swarbrick's avatar
      Fix widths in OBU reading code · 4cbf05c5
      Rupert Swarbrick authored
      It was mixing uint32_t and size_t, which isn't correct on a 64-bit
      system and causes compilation warnings.
      
      Change-Id: I3677c02cb366d60175e762ec4249d2445ee729de
      4cbf05c5
    • Rupert Swarbrick's avatar
      Use correct RestorationInfo when encoding tilesize · 4596deb2
      Rupert Swarbrick authored
      Also, factor out some long constants to avoid line wrapping.
      
      BUG=aomedia:1009
      
      Change-Id: I7850c27d22ef8b927c3554f1083bc7bdf2c7c6b3
      4596deb2
    • Sebastien Alaiwan's avatar
      Remove LPF_DIRECT experiment · 472b1744
      Sebastien Alaiwan authored
      This experiment has been abandonned for AV1.
      
      Change-Id: I599608060ade646d6551dea7cfc680f83ee9d507
      472b1744
    • Hui Su's avatar
      Don't use sub8x8_inter for intrabc blocks · 96e119a3
      Hui Su authored
      Change-Id: Ibaeea878e37f193e405910fac34176065cb5d2e3
      96e119a3
    • Hui Su's avatar
      intrabc: add assertions for DV subpel · 1e6bf6ba
      Hui Su authored
      DV and ref DV should not have subpel values.
      
      Change-Id: I7c47c442936f1d6bda36314812c44498ba6195a6
      1e6bf6ba
    • Hui Su's avatar
      intrabc: only consider intrabc blocks' mvs for ref mv · 1e68d5dd
      Hui Su authored
      When generating ref mv list, only consider neighbor blocks that use intrabc.
      
      Change-Id: I69f838a38478ce118f936dbf431048d3d42d4f34
      1e68d5dd
    • Linfeng Zhang's avatar
      Add levels array in av1_optimize_txb() · 1015a347
      Linfeng Zhang authored
      av1_txb_init_levels() has prefix 'av1' because it will be optimized
      and not static later.
      
      Change-Id: I988da817335f122522a76c4412207c3a6fdd6b71
      1015a347
    • Joe Young's avatar
      Enable ext-intra-mod by default · 2edfc37b
      Joe Young authored
      Provisionally adopted on 2017-10-31
      
      (Also an asan warning fix + few non-functional changes)
      
      Change-Id: I2ff4f34f8b20d2eeb567f2e5b1e57b296a97be82
      2edfc37b
    • Yaowu Xu's avatar
      Avoid left shift of negative numbers · 2a91ab7e
      Yaowu Xu authored
      Change-Id: I21f956a83687ebaeab81577aabdbfed2ea2b4dd2
      2a91ab7e
    • Zoe Liu's avatar
      Speed up ref selection by enforcing max 6 frames · f452fdfe
      Zoe Liu authored
      A speedup feature that enforces the maximum number of reference frames
      to evaluate for each arbitrary frame to be 6, as opposed to the maximum
      syntax-allowed number of reference frames which is 7, through the
      following rules:
      
      (1) When all the possible reference frames are availble, we reduce the
          number of reference frames (7) by 1 by removing one reference
          frame;
      (2) Always retain GOLDEN_FARME/ALTEF_FRAME;
      (3) Check the earliest 2 remaining reference frames, and there are two
          options to remove one reference frame:
          (a) Remove the one with the lower quality factor; Otherwise if
          both frames have been coded at the same quality level, remove the
          earliest reference frame;
          (b) Always remove the earliest reference frame.
          Currently set option (a).
      
      This patch has demonstrated an encoder speedup of ~8.5%. It is under
      speed2 with "selective_ref_frame >= 2". (May be considered to move
      to speed1 later once the coding performance impact is evaluated
      further.)
      
      Using the following configure setups, the coding performance has been
      dropped on Google test sets (50 frames) in BDRate by ~0.2% for lowres
      and by ~0.1% for midres:
      --enable-experimental --disable-convolve-round --disable-ext-partition
      --disable-ext-partition-types --disable-txk-sel --disable-txm
      
      Change-Id: I84317bae00bfd90b2c3d301858a849f441974e6f
      f452fdfe
    • Nathan E. Egge's avatar
      Replace OD_UNBIASED_RSHIFT32() with OD_RSHIFT1(). · 49fad89a
      Nathan E. Egge authored
      Because daala_tx only ever does an unbiased shift by 1, we can replace
       the varible shift macro with a simpler hardcoded implementation.
      This patch causes no change in behavior.
      
      subset-1:
      
      daala_tx@2017-11-04T07:20:17.571Z ->
       daala_tx-no_op@2017-11-04T07:21:06.231Z
      
        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: Ifddfef079320de0df09d9bc39757af9fe81e3c38
      49fad89a
    • Monty Montgomery's avatar
      Fix build for CONFIG_DAALA_TX and CONFIG_TX64X64 · 683f70e7
      Monty Montgomery authored
      The recent 64x32 and 32x64 patches break the build when
      CONFIG_DAALA_TX and CONFIG_TX64X64 are enabled simultaneously.  This
      is a minor correction that fixes the build problem.
      
      Change-Id: I53cd8df9160fc35b67f2ac16bddcfab08425cf8e
      683f70e7
    • Debargha Mukherjee's avatar
      Back out pruning for horz_4 and vert_4 partitions · d75ea5b5
      Debargha Mukherjee authored
      This change seems to drop efficiency more than expected. So backing
      that out for now until a better rd based decision is found.
      
      Change-Id: I3791a13ba76cfa38dd0df2f1fd4119b42b12291d
      d75ea5b5
    • Yue Chen's avatar
      Fix mismatches caused by filter_intra · 18f6c15c
      Yue Chen authored
      Return invalid rate (previously only invalid rdcost) if the
      mode combination to check is < 8x8 tx_size + filter_intra mode.
      
      BUG=aomedia:1006
      
      Change-Id: If90f431c7692473c88ac7a644bfa969a1acb3573
      18f6c15c
    • Rupert Swarbrick's avatar
      striped-loop-restoration: Respect tile experiments · 921b334f
      Rupert Swarbrick authored
      As of patch https://aomedia-review.googlesource.com/c/aom/+/28821 ,
      loop-restoration units cannot cross tile borders. But the context
      around each processing unit was still allowed to cross tile borders.
      This is fine in the usual case - but, when loop filtering across tiles
      is switched off, we're supposed to be able to decode each tile completely
      independently (each tile column, if dependent-horztiles is on).
      
      Roughly, the change we need to make is:
      When loop filtering across tiles is switched off, we treat each tile
      as if it were a full frame, and extend the CDEF output for that tile
      to form a 3-pixel border around the tile. We only use deblocked
      above/below pixels for processing unit boundaries which lie inside
      a tile.
      
      In terms of the code, this is implemented in two parts. This only
      applies when the loop_filter_across_tiles_flag is false; otherwise,
      we keep the old behaviour.
      
      * For processing units at the top edge of a tile, fill the above context
        with copies of the topmost line of CDEF output *from the same tile*,
        rather than using deblocked pixels from the tile above.
        The below context of processing units at the bottom edge of a tile
        is treated analogously.
      
      * When setting up the boundary for a processing stripe at the left edge
        of a tile, fill the stripe's left boundary with copies of the
        leftmost column of CDEF output from the same tile. Again, processing
        stripes at the right edge of a tile are treated analogously.
      
        Similarly to the above/below boundaries, we store the overwritten
        pixels into a pair of left/right context buffers, and restore them
        to their original values once we've dealt with that processing stripe.
      
      Change-Id: I53a0932793c1c56dc037683c6a4353a3f5dc4539
      921b334f
  2. 06 Nov, 2017 14 commits
    • Yushin Cho's avatar
      [segment] Remove coding of seg->abs_delta · d728c216
      Yushin Cho authored
      Remove the option of raw data or delta when coding the
      segment data, then only use delta coding.
      
      Raw data coding of segment data has been nowhere used but
      the option of "raw or delta codig of seg_data" has been coded to a bitstream.
      
      Change-Id: Iaf8f21692452d0c9a127b958812c6151d3c5db05
      d728c216
    • Yushin Cho's avatar
      [segment] Remove unused function · accfe39a
      Yushin Cho authored
      Also move its comment on seg_data to other relavant function.
      
      Change-Id: I5d3282040862cd09565b9d4f7baadf0124b64823
      accfe39a
    • Luc Trudeau's avatar
      [CFL] DC_PRED as a block instead of as single value · ace7ffb2
      Luc Trudeau authored
      This change does not alter the bitstream. This change simplifies a subsequent
      commit to remove the custom DC_PRED used by CfL. To use the DC_PRED in AV1, 
      CfL must consider the DC_PRED as a block instead of a single value.
      
      Results on Subset1 (Compared to Previous commit with CfL enabled)
        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
      
      https://arewecompressedyet.com/?job=master%402017-11-03T15%3A57%3A30.643Z&job=cfl-pixel-DC_PRED%402017-11-03T15%3A59%3A03.304Z
      Change-Id: I75f981ab93ab1808450f8280bfbabde76ea5b7fe
      ace7ffb2
    • Rupert Swarbrick's avatar
      Correct a loop restoration buffer size · efa76d7e
      Rupert Swarbrick authored
      On subsampled planes, the frame is narrower but the padding by
      RESTORATION_EXTRA_HORZ on each side is the same width as usual.
      
      Change-Id: Id68c0dd674efaa769412825b119ae5ebe56548ad
      efa76d7e
    • Yunqing Wang's avatar
      Disallow to use temporal MVs while large_scale_tile=1 · 0edbdcde
      Yunqing Wang authored
      While large_scale_tile=1, not use temporal MVs.
      
      Change-Id: I7107519595b79cbca45dfe72d5ada78cfdc39b00
      0edbdcde
    • Yunqing Wang's avatar
      Update the encoder flags for reference frames using and updating · 9a50fec3
      Yunqing Wang authored
      Updated the encoder flags for externally setting reference frames using
      and updating to include latest changes in AV1.
      
      1. For what reference frames to use, always initilize
      cpi->ref_frame_flags with AOM_REFFRAME_ALL at the beginning of encoding
      a frame. The internal ref_frame_flags starts from external flags. Added
      AOM_EFLAG_NO_REF_LAST2 and AOM_EFLAG_NO_REF_LAST3 for LAST2 and LAST3.
      
      2. For what reference frames to update, added ext_refresh_bwd_ref_frame
      and ext_refresh_alt2_ref_frame for BWD and ALT2. Also, removed
      AOM_EFLAG_FORCE_GF and AOM_EFLAG_FORCE_ARF since these are never
      actually used. They can be added back if needed later.
      
      Change-Id: I1e4429290f09bfcd1b26f2babc0cf556fc6fbc6c
      9a50fec3
    • Sebastien Alaiwan's avatar
      Accept all global motion model settings · 8d88b297
      Sebastien Alaiwan authored
      When needed, fallback regular interp filter at reconstruction stage.
      
      Such bitstreams are valid.
      However, as we don't expect aomenc to generate them,
      print a helper warning.
      
      Change-Id: I7e818cf607d7d6f71df4ca7878d8976fb88c3282
      8d88b297
    • Rupert Swarbrick's avatar
      Fix mismatch with striped loop restoration+superres · 8ce049e6
      Rupert Swarbrick authored
      When upscaling a frame, we extend frame borders to stop the upscale to
      save boundary lines convolving with uninitialised data off the edges,
      which was causing encode/decode mismatches. With this patch, we only
      do the extension when there's going to be an upscale (otherwise
      there's no need), which should give a small coding gain when not
      upscaling.
      
      More importantly, it forces us to extend in the decode path whether or
      not we are using loop restoration, which matches what the encoder does
      and fixes a mismatch.
      
      Change-Id: Ie5a0791b0cbedbf254f9080f3cbf668318673f2f
      8ce049e6
    • Debargha Mukherjee's avatar
      A better trade-off for ext-partition-types search · b88f50a0
      Debargha Mukherjee authored
      Changes a pruning criterion that seems to give a little better
      compression efficiency at a little faster speed.
      
      Change-Id: I8e3f9aa552b093c4af4ba615bb6ce29587bc8c36
      b88f50a0
    • Dominic Symes's avatar
      Turn on the max_tile experiment · ab8bb8b8
      Dominic Symes authored
      max_tile was provisionally adopted at the working group meeting 2017-Oct-10
      
      This patch also enables support for 64x64 and 128x128 superblock size for max tile
      (rather than assuming 128). There is also one fix for max_tile in combination of
      loop restoration where the width/height was in the wrong units for max-tile specific code.
      
      Change-Id: Icb862a2738fea5fc6215819396e1afa4eb86e461
      ab8bb8b8
    • Yue Chen's avatar
      Use lower-precision filters in filter_intra · 00bc4aac
      Yue Chen authored
      Filter coeffcients c0, c1, c2 are scaled by 8, and can be
      represented by 4 bits unsigned integer (c2 is always <=0)
      
      Change-Id: I93643bab6734214cef0b0175d6980ebabe9dfe10
      00bc4aac
    • Cheng Chen's avatar
      JNT_COMP: Round the weighted sum · 7caa7382
      Cheng Chen authored
      Previously the weighted sums in convolve are right shifted without
      rounding. This patch adds rounding value before right shifts.
      
      Change-Id: Iea39aca419ac0ca0c32756f345293ce5e28dbd5b
      7caa7382
    • Cheng Chen's avatar
      JNT_COMP: add SIMD implementations for c functions · ef34fff7
      Cheng Chen authored
      Add SIMD implementations for c functions for low bit-depth, making
      encoder speed faster by 3~4x than c functions.
      
      Change-Id: Icca0b07b25489759be9504aaec09d1239076fc52
      ef34fff7
    • Cheng Chen's avatar
      JNT_COMP: Refactor code · f78632e0
      Cheng Chen authored
      The refactoring serves two purposes:
      1. Separate code paths for jnt_comp and original compound average
      computation. It provides function interface for jnt_comp while leaving
      original compound average computation unchanged. In near future, SIMD
      functions can be added for jnt_comp using the interface.
      
      2. Previous implementation uses a hack on second_pred. But it may cause
      segmentation fault when the test clip is small. As reported in Issue
      944. This refactoring removes hacking and make it possible to address
      the seg fault problem in the future.
      
      Change-Id: Idd2cb99f6c77dae03d32ccfa1f9cbed1d7eed067
      f78632e0
  3. 05 Nov, 2017 4 commits
    • Sebastien Alaiwan's avatar
      Remove LGT_FROM_PRED experiment · 7fc6b2ac
      Sebastien Alaiwan authored
      This experiment has been abandonned for AV1.
      
      Change-Id: I18cf1354df928a0614a1e58b718cd96ee7999925
      7fc6b2ac
    • Zoe Liu's avatar
      Add frame offset of references to dumped info · b4f31036
      Zoe Liu authored
      This patch also updates cm->frame_offset for show_existing_frame at
      the encoder.
      
      Change-Id: I863876675145ba663fc229a854b83b39759309a5
      b4f31036
    • Debargha Mukherjee's avatar
      Misc. clean ups / refactor of speed 1 · d7338aa8
      Debargha Mukherjee authored
      With this patch, and the speed settings turned on for speed 1,
      the coding efficiency of speed 1 in default configuration should be
      only a little worse than speed 0, but it should roughly run at
      double the speed.
      
      Specifically, this patch makes various changes to make sure that
      speed 1 behaves exactly the same as speed 0 except for speed settings
      turned on or off in speed_features.c.
      
      This will change the bitstream generated a little for speeds
      1 or higher because of the following reasons:
      1. Removes a hacky speed setting correction factor in firstpass.c
      2. Fast cdef search is moved from speed 1+ to 2+, and a new speed
      feature is added to control that.
      3. Mesh search settings are pushed down one level so that speeds 0
      and 1 use the same settings.
      4. A disable_split_mask feature for animated content previously
      turned on speeds 1+ is moved down to speeds 2+.
      
      Change-Id: I0ec36556f157bdc42c5daa0cfb9518cf7ff65f6b
      d7338aa8
    • Debargha Mukherjee's avatar
      Further speed-up of ext-partition-types · 6f77d081
      Debargha Mukherjee authored
      Removing the NONE partition check from horz_4 and
      vert_4 partition search conditions provides another
      5-10% speedup at very little loss.
      
      Change-Id: Ie5f14191efe6d2b0695b27021de96ad0a1550f26
      6f77d081
  4. 04 Nov, 2017 6 commits
    • Zoe Liu's avatar
      Refactor the code for reference frame flag setup · 368bf16d
      Zoe Liu authored
      At the encoder side, for the 7 reference frames, we always set up the
      priority rank as follows:
      LAST, ALTREF, LAST2, LAST3, GOLDEN, BWDREF, ALTREF2
      That is, if two reference frames point to the same reference frame
      buffer, the flag for the latter frame in the rank will always be
      turned off.
      
      This patch does not change any coding performance / coding speed for
      the default configure setup. It only affects the following setup:
      one-sided-compound is on && ext-comp-refs is off
      As one-sided-compound is enabled by default when ext-comp-refs is
      enabled, and ext-comp-refs is enabled by default, above setup should
      not be considered.
      
      Change-Id: I6de18d3be938e1d4a8897e5ba0857b8d21e7f9d0
      368bf16d
    • Sebastien Alaiwan's avatar
      Use rtcd script to choose between implementations · 78a7bd7d
      Sebastien Alaiwan authored
      Change-Id: I752ad96a8b4349d4a437a97e30edc8e4c22f81b5
      78a7bd7d
    • James Zern's avatar
      cdef_test: quiet implicit bool to int conv warning · 9feda796
      James Zern authored
      Change-Id: Ic7096fe85dc653c9c7d7d1f098df19daff27e1cf
      9feda796
    • Yue Chen's avatar
      Remove NCOBMC_ADAPT_WEIGHT from AV1 · 80daf0c4
      Yue Chen authored
      Development of this experiment will be deferred to AV2.
      
      Change-Id: I3c4615a21b59508500bed8aab0a5c54413b4f284
      80daf0c4
    • Zoe Liu's avatar
      Speed up one-sided compound mode (ext-comp-refs) · 77fb5be1
      Zoe Liu authored
      One-sided compound ref prediction is used only when all reference
      frames are one-sided.
      
      This patch has demonstrated an encoder speedup of ~28%.
      
      Using the following configure setups, the coding performance has been
      dropped on Google test sets (50 frames) in BDRate by ~0.2% for lowres
      and by ~0.1% for midres (Corresponding performance impact should be
      smaller on AWCY):
      --enable-experimental --disable-convolve-round --disable-ext-partition
      --disable-ext-partition-types --disable-txk-sel --disable-txm
      
      Change-Id: I585bbffb2f8d154e8f52a1e79a84eff8bb4a471d
      77fb5be1
    • Jingning Han's avatar
      Separate ref frame mvs control from prev_frame_mvs · e17ebe92
      Jingning Han authored
      The control of using reference frame motion vector is a separate
      factor from the existence of previous frame motion vectors. This
      commit decouples these two, such that the encoder can control the
      use of reference motion vector. When it is used, one can further
      identify if the previous frame exists or not, then to decide if
      need to force use_prev_frame_mvs to be zero.
      
      This solves the issue where the previous frame mvs is set to be
      0 and it accidentally shuts off the access to all other existing
      referece frames mvs in the mfmv system. It brings back the coding
      performance gains to normal.
      
      Change-Id: I2531f73e55582a9bb5b3e0ff47e361a199ec8082
      e17ebe92