1. 21 Feb, 2018 2 commits
    • Jingning Han's avatar
      [NORMATIVE] Limit valid frame distance for mfmv projection · 248b9563
      Jingning Han authored
      Set the maximum frame distance to be 32. If a reference motion
      vector needs to span across two frames at distance more than 32,
      drop the use of this reference motion vector.
      This also clears ubsan warnings in unit tests.
      Change-Id: I98b72b5fd2a885661542bbc5f8da1886d77f889f
    • Jingning Han's avatar
      [NORMATIVE] Fix top right check condition in vert_a · 44cb357e
      Jingning Han authored
      Allow the right side rectangular block to access the top right
      neighbor if available in vert_a partition.
      Change-Id: I92369676ae1bea2d6dd5f09af612f4177560ae29
  2. 20 Feb, 2018 3 commits
    • Yunqing Wang's avatar
      Ref_mv: no need to adjust MV precision for spatial neighbours · a458afb5
      Yunqing Wang authored
      cm->allow_high_precision_mv and cm->cur_frame_force_integer_mv are
      frame-level decisions. In reference MV search, no need to adjust
      MV precision for spatial neighbours. This patch doesn't change
      Change-Id: I8a91a4c68fa24b4cddf665ee770f397c3610ba4b
    • Jingning Han's avatar
      [NORMATIVE mfmv] Store one mv per decoded block · 61bf3d8a
      Jingning Han authored
      When the block is coded in the bi-directional compound mode,
      store up to one mv that points towards last_frame side, instead
      of storing up to two mvs each corresponds to one side.
      Change-Id: Id9ec295de28c0831457c8fe9ce5fd2085e3b5459
    • Zoe Liu's avatar
      [NORMATIVE] Add decoder support for frame_refs_signaling · b57fee02
      Zoe Liu authored
      One bit is added to the frame header, to signal whether the references
      for inter frames will be short-signaled.
      When the bit is set, only 6 bits are used at the frame header level to
      signal the choices of LAST_FRAME and GOLDEN_FRAME out of the eight
      buffered references. All the other 5 references will be specified
      using the frame offset info. Hence, compared to the baseline, the use
      of frame_refs_signaling provides 2 scenarios:
      (1) Reference short-signaling:
          3*7 - (1+3*2) = 14 bits are saved in the frame header;
      (2) Reference regular-signaling:
          1 bit is added to the frame header.
      Change-Id: I2d4ff0e367a4df107235c1e7066dd28cb2c60431
  3. 19 Feb, 2018 1 commit
  4. 18 Feb, 2018 1 commit
    • Jingning Han's avatar
      [NORMATIVE] Enable mfmv for low latency settings · a127b42d
      Jingning Han authored
      Tested in the low latency setting. Comparing the three options:
      (1). Cut off temporal mv altogether.
      (2). Use collocated mv referncing.
      (3). Use mfmv referencing.
      The current baseline is using (1).
      The results are:
      (2) improves the compression performance over (1) by -0.59% for
      lowres and -0.65% for midres.
      (3) improves over (1) by -1.05% for lowres and -1.43% for midres
      Change-Id: Ie683110ecbe16131f8aea123bca490f8897ebdd8
  5. 17 Feb, 2018 1 commit
    • Jingning Han's avatar
      [NORMATIVE] Fix top right mv check condition for VERT_A partition · 56066252
      Jingning Han authored
      When a coding block runs VERT_A partition, the coding order does
      not follow raster order. This requires a special handle on the
      bottom left square block to disable its reference towards the
      top-right corner. Prior to this change the codebase would disable
      the bottom-right square, as well as the right rectangular blocks,
      from referencing the top-right mv. This commit fixes such check
      condition to allow the right rectangular block to access the top
      right mv.
      Change-Id: I87049f0cec8ed7557a87c3fdef83e01498bbcd75
  6. 14 Feb, 2018 2 commits
    • Yunqing Wang's avatar
      [NORMATIVE] Consolidate reference mv clamping · 3e225434
      Yunqing Wang authored
      Clamp_mv_ref happens in multiple places in ref_mv search, which can be
      convoluted as reported in issue 1124. This change is to consolidate
      the clamping into one place.
      Borg test result on lowres set:
      avg_psnr:    ovr_psnr:   ssim:
        0.000       0.000      0.001
      Change-Id: I1649d5b5f37683c9c30e493c6eed13a808ab543a
    • Jingning Han's avatar
      [NORMATIVE] Scale up mfmv ref step size in 64x64 block · 73190512
      Jingning Han authored
      When the coding block size has one side in length of 64 and above,
      scale up the mfmv reference search step size from 8 to 16 along
      that direction. The midres coding stats get 0.02% better. Among
      all the finished hdres points, no negative results showed up.
      Change-Id: I70ab7a9f9d1cf365d8ed1e06dbede307b6bc46ec
  7. 12 Feb, 2018 1 commit
  8. 11 Feb, 2018 3 commits
    • Jingning Han's avatar
      [NORMATIVE] Compound mode ref mv construction · e571f523
      Jingning Han authored
      Re-design the compound mode reference motion vector fetch. Use
      a single run to provide all the compound ref mvs. Save the potential
      additional two ref mv search runs on single reference frames.
      Tested on night_720p 50 frames at 800 kbps. The average time cost
      on find_mv_refs calls is reduced by 15% (average 69875 us ->
      60473 us). The overall compression performance change is less than
      Change-Id: I388b9cf36817d10613cd2c9d0bd8865b43324009
    • Yunqing Wang's avatar
      Refactor the ref_mv code · 7fcd0247
      Yunqing Wang authored
      Continued to refactor the reference MV search code, so that we can
      combine the compound ref mode search later.
      Change-Id: I6227a3142e82caa20f2a17a0c76147035eaa2129
    • Jingning Han's avatar
      [NORMATIVE opt-ref-mv] Rework mv fetch from diff ref frames · ff1a35b9
      Jingning Han authored
      This commit re-designs the reference motion vector fetching from
      spatial neighbors with different reference frames from a current
      coding block. Instead of re-running through the VP9 like reference
      motion vector search, it goes through the nearest top row and left
      column only. Such process kicks in, if and only if the regular
      reference frame match based mv search didn't find 2 or more mvs.
      The search through neighboring blocks with different reference
      frame will stop once 2 mvs are found.
      To decide the reference mvs, it compares the reference frame types
      from the two blocks. If they are on the same side, directly re-use
      it. Otherwise, reverse the sign of the motion vector.
      The compression performance change is in the noise range as
      0.03% down.
      Change-Id: Ib698d7c463f2f42c767f6ca008c8a7c84289df60
  9. 10 Feb, 2018 1 commit
  10. 09 Feb, 2018 6 commits
    • Jingning Han's avatar
      [NORMATIVE]Constrain mv reference within 64x64 block · 5e19c9da
      Jingning Han authored
      When the coding block size is above 64x64 size, only use the
      top-left 64x64 region to derive the reference motion vectors.
      Change-Id: I7a0950168dbc886222697058dee105cf70d1c196
    • Jingning Han's avatar
      [NORMATIVE] mfmv extension border check at 64x64 · d41869a2
      Jingning Han authored
      Only use the mfmv reference within the same 64x64 block region.
      Change-Id: Ia7a60cd81cb9ea0e60ae0edcbe40a43d55ebb0f3
    • Jingning Han's avatar
      [NORMATIVE] Account all the newmv modes for compound mode context · 2d17ec66
      Jingning Han authored
      The compound mode context model depends on the number of 8x8
      blocks coded in the newmv mode under opt-ref-mv. This commit makes
      the codec account for all the newmv modes in both single and
      compound settings for that purpose. It only affects changes under
      It improves the midres coding performance by 0.08%.
      Change-Id: I0899cbb31e0001d958677128bcc94b063b449817
    • Yunqing Wang's avatar
      Modify reference MV function prototypes · 02efe6a2
      Yunqing Wang authored
      This patch modified the function prototypes in reference MV search,
      which prepared for the following change to combine the compound
      reference search and 2 single reference search together while the
      current block is compound mode. This patch doesn't cause normative
      bitstream change.
      Change-Id: I0d645983233753861d940b603d13957576ab51fb
    • Frederic Barbier's avatar
      Remove experimental flag of MV_COMPRESS · 49469a98
      Frederic Barbier authored
      This experiment has been adopted, we can simplify the code
      by dropping the associated preprocessor conditionals.
      Change-Id: Iba2f4637c429780ed8d5f20730557524f8b3c607
    • Frederic Barbier's avatar
      Remove experimental flag of TEMPMV_SIGNALING · 98c16fa3
      Frederic Barbier authored
      This experiment has been adopted, we can simplify the code
      by dropping the associated preprocessor conditionals.
      Change-Id: Ieeafdf9139ef52bd26a0cb4e6e058161cc59e466
  11. 08 Feb, 2018 2 commits
    • Jingning Han's avatar
      [NORMATIVE] mfmv only use the first valid mv in stack · 2049c015
      Jingning Han authored
      This reduces the cycles spent on most add_tpl_ref_mv calls to
      1/3 of what it was. In local profiling, the percentage on
      av1_find_mv_refs + add_tpl_ref_mv goes down from 6.81% to 4.60%.
      Change-Id: Id2f879766c4d0bbee41a35aff803757f760792d5
    • Jingning Han's avatar
      [NORMATIVE] mfmv adds candidate mv by comparison · c9c8189a
      Jingning Han authored
      Sync with the design plan to use equality comparison to decide
      if to add the mfmv into candidate list.
      Change-Id: Ib01b32b9aeb48fb4b97b1ce008539184572a2655
  12. 07 Feb, 2018 2 commits
    • David Barker's avatar
      [ext-skip, bugfix] Fix reference frame setup · 1efc5bda
      David Barker authored
      In the bidirectional case, it was possible to end up with
      cm->ref_frame_idx_0 > cm->ref_frame_idx_1 (see linked bug report),
      leading to av1_ref_frame_type() producing bad outputs.
      This commit enforces the correct ordering.
      Change-Id: I45db51064cd465907412b4fb301b7c17db5100af
    • Jingning Han's avatar
      Rework inter mode context for global_mv mode · a07a3b28
      Jingning Han authored
      Compare the motion filed reference motion vector with the global
      mv to decide the context model for the compound inter mode coding.
      Change-Id: I5606ba7571a19fc6577d1d65448f7052780f0c68
  13. 06 Feb, 2018 1 commit
    • Imdad Sardharwalla's avatar
      Move sb_size to sequence header · 4ec84aba
      Imdad Sardharwalla authored
      sb_size, mib_size and mib_size_log2 have been moved from the AV1_COMMON struct
      to the SequenceHeader struct, as they are sequence-level parameters. sb_size is
      now written to and read from the end of the sequence header.
      Change-Id: I9d450518a1b898677976acd80088b8ea9ee9d7ce
  14. 05 Feb, 2018 2 commits
    • Jonathan Matthews's avatar
      Make recent mv changes build with !INTRABC · dca19253
      Jonathan Matthews authored
      Introduced in Change-Id: I219b9ca097b8fa90335d5b00f6edd639886f414d
      Change-Id: I0dbf02589a2128aec6db495db653fa4ef0652d53
    • Yunqing Wang's avatar
      Reduce reference MV search · 880ab1ca
      Yunqing Wang authored
      The VP9 style reference MV search(find_mv_refs_idx) exists in AV1,
      and gather reference MVs in mv_ref_list, which is used to set
      nearestmv and nearmv.
      This patch switches the ref_mv search order, first call
      setup_ref_mv_list() to find same reference frame MVs. If >= 2 MVs are
      found, no more search is needed. Otherwise, we add MVs with different
      reference frames. The purpose of doing this is to speed up the decoder.
      Since we depends on setup_ref_mv_list() to find same reference frame
      MVs, this change does change the bitstream. But, it wouldn't affect the
      Borg test result:
              avg_psnr ovr_psnr  ssim
      lowres:  -0.013  -0.016   -0.047
      Change-Id: I219b9ca097b8fa90335d5b00f6edd639886f414d
  15. 02 Feb, 2018 1 commit
  16. 01 Feb, 2018 1 commit
  17. 26 Jan, 2018 2 commits
    • Yaowu Xu's avatar
      minor reorder of operations · 30bf8713
      Yaowu Xu authored
      This also fixes several UBSan warnings.
      Change-Id: I4ea5f744c42983ea44c7cd6925555eab4938097c
    • Yunqing Wang's avatar
      Speed up av1_find_mv_refs() · b41ffb95
      Yunqing Wang authored
      av1_update_mv_context() is only used to provide compound_mode_context,
      which is the same as mode_context in find_mv_refs_idx(). This patch
      removes the calling of av1_update_mv_context() that takes 0.5% of the
      decoder time. This doesn't change bitstream.
      Change-Id: I6f0e082b237ff42c3b3e72361c46f98249ba07ab
  18. 25 Jan, 2018 3 commits
    • Yunqing Wang's avatar
      Search the same set of neighbouring positions · 28f3fbf7
      Yunqing Wang authored
      This patch prepares for removing of av1_update_mv_context(). In
      av1_update_mv_context() and av1_find_mv_refs(), the neighbouring
      positions searched are not exactly the same. This patch fixes it.
      This causes bitstream chamges, but shouldn't affect the coding
      Change-Id: I59d2f8c318df388f2d06634cd96802b773c8bb13
    • Yunqing Wang's avatar
      Remove mode_context calculation in find_mv_refs_idx() · 8152737f
      Yunqing Wang authored
      mode_context[ref_frame] is calculated in find_mv_refs_idx(), but is
      set to 0 in setup_ref_mv_list. Therefore, the calculation in
      find_mv_refs_idx() is not needed.
      Change-Id: I65ca06a2000278ad21c2eaa81eb12c48a7c1fcb8
    • Frank Bossen's avatar
      Do MV scaling on the fly for memory and run time reduction · 7b6bb947
      Frank Bossen authored
      This change is not normative and produces the same results as before.
      TPL_MV_REF data structure is about 5x smaller.
      Observed overall decoder run time reduction is about 4%.
      No observed change in encoder run time.
      Change-Id: Id68a492bac3bf28f48b7ceeedf85cd29981238ee
  19. 22 Jan, 2018 1 commit
  20. 09 Jan, 2018 2 commits
  21. 04 Jan, 2018 2 commits
    • Yunqing Wang's avatar
      Remove global offset components from warped motion samples · c7d4cd39
      Yunqing Wang authored
      To calculate wmmat[2] to wmmat[5], we don't need the absolute
      coordinates which include the global offset components. Hence,
      while finding samples, we only need to gather the relative coordinates
      that are the neighbor block center point's coordinates relative to the
      left-top pixel of current block. This patch won't change bitstream.
      Change-Id: Ifbe7769effe6253b27cf97ea9c942a3a29eb7f50
    • Yunqing Wang's avatar
      Remove sample sorting in warped motion sample selection · d3c13e88
      Yunqing Wang authored
      The original sample selection process involves finding best 8 sorted
      samples according to motion vector difference(MVD) between neighbor
      block and current block, and then trimming samples. To reduce the
      complexity, use the current block width/height as the MVD threshold,
      and trim the samples without sorting.
      This gives slightly less gain than the original method.
      AWCY result:
               PSNR   PSNR HVS   SSIM
      Average  -0.07   -0.13     -0.12
      Borg test result:
                   avg_psnr ovr_psnr ssim
      cam_lowres:  -0.112   -0.112  -0.180
      lowres:      -0.068   -0.073  -0.125
      Change-Id: Ic2f79a170441d5bcb04ea87dddf490ef7fbba8bc