1. 20 Apr, 2019 28 commits
    • Romain Vimont's avatar
      Compute predictors from tiled motion vectors · a554adca
      Romain Vimont authored
      To prepare for tiling, compute subset predictors from TileMotionVectors
      instead of FrameMotionVectors.
      a554adca
    • Romain Vimont's avatar
      Retrieve cols and rows from FrameMotionVectors · 6681b602
      Romain Vimont authored
      The parameters w_in_b and h_in_b are useless, we can retrieve the number
      of columns and rows directly from frame_mvs.
      6681b602
    • Romain Vimont's avatar
      Create CDEF SB frames from a Tile · 948ba74b
      Romain Vimont authored
      To prepare for tiling, create super-block frames from a tile instead of
      a frame.
      948ba74b
    • Romain Vimont's avatar
      Add unit tests for cdef_sb_padded_frame_copy() · 26ed19ff
      Romain Vimont authored
      Add unit tests to make sure the changes for tiling will not break
      cdef_sb_padded_frame_copy().
      26ed19ff
    • Romain Vimont's avatar
      Add tiling unit tests · e0bb9027
      Romain Vimont authored
      Add unit tests to make sure that FrameState (including Frame and Plane)
      and FrameBlocks are correctly split into tiled views.
      e0bb9027
    • Romain Vimont's avatar
      Expose tile-iterator · f667a1ab
      Romain Vimont authored
      Expose an iterator providing tiled views of FrameState and FrameBlocks.
      f667a1ab
    • Romain Vimont's avatar
      Add TilingInfo · 51f681c5
      Romain Vimont authored
      Add a structure to store the tiling description.
      51f681c5
    • Romain Vimont's avatar
      Expose whole frame blocks as tile blocks · 9d5090b5
      Romain Vimont authored
      Add convenience methods to access the whole FrameBlocks as TileBlocks.
      9d5090b5
    • Romain Vimont's avatar
      Expose tiled view of frame state · df00597c
      Romain Vimont authored
      Add a convenience method to access the whole FrameState as a TileState.
      df00597c
    • Romain Vimont's avatar
      Expose tiled view of frame motion vectors · 6dc45909
      Romain Vimont authored
      Add a convenience method to access the whole FrameMotionVectors as
      TileMotionVectors.
      6dc45909
    • Romain Vimont's avatar
      Expose whole frame as a tile · 5ebc6e3b
      Romain Vimont authored
      Add convenience methods to access a whole frame as a tile.
      5ebc6e3b
    • Romain Vimont's avatar
      Expose whole plane as a region · 52b65ad7
      Romain Vimont authored
      Add convenience methods to access a whole plane as a region.
      52b65ad7
    • Romain Vimont's avatar
      Create regions from Plane · 6c76da2e
      Romain Vimont authored
      Expose region() and region_mut() to get a PlaneRegion and PlaneRegionMut
      from a Plane.
      
      They are similar to Plane::slice() and Plane::mut_slice(), but for
      regions.
      6c76da2e
    • Romain Vimont's avatar
      Add methods to convert offsets from tile to frame · f1e6b3fa
      Romain Vimont authored
      Add convenience methods to convert from offsets relative to the
      current tile to absolute offsets (relative to the frame).
      f1e6b3fa
    • Romain Vimont's avatar
      Implement FrameBlocks methods on TileBlocks · 3a8dfa52
      Romain Vimont authored
      FrameBlocks contains several convenience methods to write to a set of
      blocks. With tiling, all these accesses will occur on TileBlocks
      instead, so implement them here.
      
      They will be removed from FrameBlocks once callers will use TileBlocks.
      3a8dfa52
    • Romain Vimont's avatar
      Add TileBlocks · e60d1b66
      Romain Vimont authored
      Expose a tiled view of FrameBlocks.
      e60d1b66
    • Romain Vimont's avatar
      Add TileMotionVectors · 7f803748
      Romain Vimont authored
      Expose a tiled view of FrameMotionVectors in FrameState.
      7f803748
    • Romain Vimont's avatar
      Add TileRestorationState · 19eba316
      Romain Vimont authored
      Add TileRestorationState, containing 3 TileStateRestorationPlane
      instances, each containing a TileRestorationUnits instance.
      
      They are tiled views of RestorationState, RestorationPlane and
      FrameRestorationUnits.
      19eba316
    • Romain Vimont's avatar
      Add TileState · 35084dc7
      Romain Vimont authored
      Add a TileState structure, which is a tiled version of FrameState.
      
      This is the top-level tiling structure, providing tiling views of its
      data.
      
      The way the FrameState fields are mapped depend on how they are accessed
      tile-wise and frame-wise.
      35084dc7
    • Romain Vimont's avatar
      Add Tile · 8ce243db
      Romain Vimont authored
      Add a Tile structure, which is a view of 3 co-located plane regions (a
      Tile is to a PlaneRegion as a Frame is to a Plane).
      8ce243db
    • Romain Vimont's avatar
      Add PlaneRegion · 88014c3d
      Romain Vimont authored
      Add structures to expose rectangular regions of a plane without giving
      access to the whole plane.
      
      This will allow to pass different regions to different threads in safe
      code.
      88014c3d
    • Romain Vimont's avatar
      Move initializations out of the loop · 08e95261
      Romain Vimont authored
      They do not depend on the loop variable.
      08e95261
    • Romain Vimont's avatar
      Store sb_size_log2 in FrameState · 18939f99
      Romain Vimont authored
      TileStateMut, which may be directly created from FrameState, needs
      sb_size_log2.
      18939f99
    • Romain Vimont's avatar
      Expose superblock size on FrameInvariants · 992e07ff
      Romain Vimont authored
      Add convenience methods to get the actual superblock size.
      992e07ff
    • Romain Vimont's avatar
      Add struct FrameRestorationUnits · 61f3cdb7
      Romain Vimont authored
      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.
      61f3cdb7
    • Romain Vimont's avatar
      Group constant RestorationPlane fields into cfg · b6044f09
      Romain Vimont authored
      This will simplify the creation of a tiled view, which will keep a
      reference to the RestorationPlane configuration.
      b6044f09
    • Romain Vimont's avatar
      Simplify restoration units conditions · 3af0f22d
      Romain Vimont authored
      For a given super-block, either none or all 3 planes have a restoration
      unit.
      3af0f22d
    • Romain Vimont's avatar
      Refactor restoration units · e7521d26
      Romain Vimont authored
      A restoration unit may contain several super-blocks, and may be
      "stretched" on borders, even across tile boundaries:
      <https://github.com/xiph/rav1e/issues/631#issuecomment-454419152>
      
      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
      restoration_unit_by_stripe().
      e7521d26
  2. 18 Apr, 2019 3 commits
  3. 17 Apr, 2019 3 commits
  4. 16 Apr, 2019 1 commit
  5. 15 Apr, 2019 1 commit
  6. 14 Apr, 2019 4 commits