1. 20 Apr, 2019 6 commits
    • Romain Vimont's avatar
      Remove unused members from RestorationPlane · 77cfa28b
      Romain Vimont authored and Thomas Daede's avatar Thomas Daede committed
      They have been implemented in TileRestorationPlane instead.
    • Romain Vimont's avatar
      Add tiling unit tests · e0bb9027
      Romain Vimont authored and Thomas Daede's avatar Thomas Daede committed
      Add unit tests to make sure that FrameState (including Frame and Plane)
      and FrameBlocks are correctly split into tiled views.
    • Romain Vimont's avatar
      Add TileRestorationState · 19eba316
      Romain Vimont authored and Thomas Daede's avatar Thomas Daede committed
      Add TileRestorationState, containing 3 TileStateRestorationPlane
      instances, each containing a TileRestorationUnits instance.
      They are tiled views of RestorationState, RestorationPlane and
    • Romain Vimont's avatar
      Add struct FrameRestorationUnits · 61f3cdb7
      Romain Vimont authored and Thomas Daede's avatar Thomas Daede committed
      The restoration units were stored in a Box<[RestorationUnit]>.
      Use a named structure instead, so that we can expose it as a 2D array
      (using Index and IndexMut traits) and split it into tiled views later.
    • Romain Vimont's avatar
      Group constant RestorationPlane fields into cfg · b6044f09
      Romain Vimont authored and Thomas Daede's avatar Thomas Daede committed
      This will simplify the creation of a tiled view, which will keep a
      reference to the RestorationPlane configuration.
    • Romain Vimont's avatar
      Refactor restoration units · e7521d26
      Romain Vimont authored and Thomas Daede's avatar Thomas Daede committed
      A restoration unit may contain several super-blocks, and may be
      "stretched" on borders, even across tile boundaries:
      In the bitstream, it must be coded only for its first super-block, in
      plane order. To do so, a "coded" flag was set the first time, so that
      further super-blocks using the same restoration will not "code" it.
      But this assumed that all super-blocks associated to a restoration unit
      were encoded sequentially in plane order. With parallel tile encoding,
      even with proper synchronization (preventing data races), this
      introduces a race condition: a "stretched" restoration unit may not be
      coded in its first super-block, corrupting the bitstream.
      To avoid the problem, expose the restoration unit only for its first
      super-block, by returning a Option<&(mut) RestorationUnit>. This also
      avoids the need for any synchronization (a restoration unit will never
      be retrieved by more than 1 tile).
      At frame level, lrf_filter_frame() will still retrieve the correct
      restoration unit for each super-block, by calling
  2. 30 Mar, 2019 1 commit
  3. 20 Mar, 2019 2 commits
  4. 18 Mar, 2019 1 commit
    • David Michael Barr's avatar
      Inline often called and almost-trivial functions (#1124) · 7a479a0c
      David Michael Barr authored
      * Inline constrain and msb for cdef_filter_block
        This reduces its average time by around 42%.
      * Inline round_shift for pred_directional and others
        This reduces its average time by around 10%.
      * Inline sgrproj_sum_finish to its various callers
        It is at the lowest level of a hot call graph and almost trivial.
      * Inline get_mv_rate in motion estimation
        It is almost trivial and called often.
  5. 11 Mar, 2019 1 commit
  6. 01 Mar, 2019 1 commit
  7. 28 Feb, 2019 1 commit
  8. 27 Feb, 2019 1 commit
  9. 22 Feb, 2019 6 commits
  10. 21 Feb, 2019 1 commit
    • Romain Vimont's avatar
      Make plane generic over pixel component type · 8057ee7c
      Romain Vimont authored
      In order to support both u8 and u16 for plane components, make the Plane
      structure generic over the component type. As a consequence, many other
      structures and functions also become generic.
      Some functions are not u8-compatible yet, although they have been make
      generic over the component type to make the compilation work. They
      assert that the size of the generic parameter is 16 bits wide.
      For this reason, the root context structure is unconditionally created
      as Context<u16> for now.
  11. 11 Feb, 2019 1 commit
  12. 08 Feb, 2019 2 commits
  13. 22 Jan, 2019 1 commit
    • Monty's avatar
      Fix to LRF cropping · 7c158f82
      Monty authored and Monty Montgomery's avatar Monty Montgomery committed
      Recent simplification that eliminated clipped_cfg broke the loop
      restoration filters and I didn't notice as it's not enabled by default yet.
      This fixes the cropping for chroma in the SGR and Wiener filters.
  14. 15 Jan, 2019 1 commit
  15. 14 Jan, 2019 2 commits
  16. 13 Jan, 2019 1 commit
    • Romain Vimont's avatar
      Store restoration units contiguously · 8503cea4
      Romain Vimont authored
      The "matrix" of restoration units was stored in a vector of vectors.
      To avoids an additional indirection for each row, store them in a
      contiguous array instead. Besides the (theoretical) performance benerit
      for every access, this will simplify the implementation of tiled-views
      which have to expose non-overlapping parts of the "matrix" via unsafe
      Also, since its size is constant (although not known at compile-time),
      replace the vector by a boxed slice.
  17. 11 Jan, 2019 2 commits
    • Romain Vimont's avatar
      Remove clipped_cfg from RestorationState · 07032e6b
      Romain Vimont authored
      A RestorationState stores a matrix of restoration units per plane. The
      restoration unit associated to a superblock may be retrieved from a
      superblock offset.
      Although this mapping is independant of subsampling, the superblock
      offsets were always converted to plane coordinates, which required to
      handle subsampling nonetheless. As a consequence, a PlaneConfig instance
      associated to RestorationPlane was necessary to find a restoration unit
      from a superblock offset.
      Instead, store the (log2) number of superblocks per restoration unit, to
      be able to retrieve a restoration unit from a superblock with a simple
      shift (without any subsampling information).
      That way, we can remove the PlaneConfig associated to RestorationPlane,
      which will simplify tiling.
    • Romain Vimont's avatar
      Use non-padded dimensions from FrameInvariants · 54526343
      Romain Vimont authored
      The loop restoration filter needs the dimensions of the non-padded
      frame, that only FrameInvariants knows.
      On construction, RestorationState created a clipped version of the
      PlaneConfigs, that was used in lrf_filter_frame() to get the non-padded
      Instead, directly pass &FrameInvariants to lrf_filter_frame().
      This paves the way to remove clipped_cfg from RestorationState entirely,
      to simplify tiling.
  18. 10 Jan, 2019 2 commits
  19. 09 Jan, 2019 2 commits
    • Romain Vimont's avatar
      Make RestorationState derive Debug · 37a62634
      Romain Vimont authored
      FrameState is Debug. In order to embed RestorationState into FrameState,
      make it Debug too.
    • Romain Vimont's avatar
      Do not borrow full FrameState for LRF · 90bed0bf
      Romain Vimont authored
      Once RestorationState will be stored into FrameState, it will not be
      possible to borrow a FrameState while its RestorationState is mutably
      In particular, this prevents passing a FrameState to a non-const
      RestorationState method.
      For lrf_optimize_superblock(), which is not implemented yet, just remove
      the FrameState parameter.
      For lrf_filter_frame(), only borrow the "rec" field instead of the whole
  20. 08 Jan, 2019 1 commit
    • Romain Vimont's avatar
      Remove duplicate fields · d92d9a2a
      Romain Vimont authored
      lrf_type and unit_size are per-plane values, there is no need to
      duplicate them as arrays in RestorationState.
  21. 07 Jan, 2019 2 commits
  22. 11 Dec, 2018 1 commit
  23. 06 Dec, 2018 1 commit