1. 10 May, 2019 1 commit
  2. 20 Apr, 2019 1 commit
  3. 16 Mar, 2019 1 commit
  4. 15 Mar, 2019 1 commit
  5. 14 Mar, 2019 1 commit
  6. 13 Mar, 2019 1 commit
  7. 11 Mar, 2019 1 commit
  8. 08 Mar, 2019 1 commit
  9. 07 Mar, 2019 1 commit
  10. 01 Mar, 2019 1 commit
  11. 28 Feb, 2019 1 commit
  12. 27 Feb, 2019 1 commit
    • Romain Vimont's avatar
      Make convert_slice_2d() use raw pointers · ec8f437d
      Romain Vimont authored
      The util function convert_slice_2d() operates on a slice with stride
      information. It will become incompatible with PlaneSlice which will not
      expose a multi-rows slice anymore (see
      <https://github.com/xiph/rav1e/issues/631#issuecomment-456088577>).
      
      To keep it generic enough, we don't want to use a PlaneSlice wrapper for
      every call, so make the function use raw pointers (and unsafe).
      
      Note: this commit changes indentation for unsafe blocks, so the diff is
      more understable with "git show -b".
      ec8f437d
  13. 25 Feb, 2019 1 commit
  14. 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.
      8057ee7c
  15. 15 Feb, 2019 1 commit
  16. 14 Feb, 2019 2 commits
    • Romain Vimont's avatar
      Adapt Pixel trait for convert_slice_2d() · a99da119
      Romain Vimont authored
      Since Pixel is only implemented for u8 and u16 types, it is always
      possible to cast a Pixel to an integral primitive type. However, the
      compiler could not know this, because in theory any other type could
      also implement the Pixel trait.
      
      To enforce this restriction, make the (main) integral primitive types
      implement CastForPrimitive<T> for any T which implements Pixel. That
      way, the compiler knows that a Pixel (whatever its concrete type) can
      always be cast to an integer.
      
      Then, rewrite the constraints on convert_slice_2d() to use
      CastFromPrimitive, so that callers need not to add redundant constraints
      if T implements Pixel.
      a99da119
    • Romain Vimont's avatar
      Improve generic usage of Pixel trait · 93c3d989
      Romain Vimont authored
      In order to use either u8 or u16 for plane components, a Pixel trait
      regroups several "capabilities" that a generic pixel type must support,
      through trait inheritance.
      
      That way, a generic function can just use the Pixel type, without
      listing them all:
      
          fn f<T: Pixel>(...) { ... }
      
      However, trait inheritance cannot express constraints about T for other
      types (like "i32: AsPrimitive<T>"). As a consequence, callers had to
      specify these additional constraints manually:
      
          where
              T: Pixel,
              i32: AsPrimitive<T>,
              u32: AsPrimitive<T>,
      
      This is redundant, because if T is a Pixel, then i32 and u32 necessarily
      implement AsPrimitive<T> (since Pixel is only implemented for u8 and
      u16).
      
      To express these relationships, create a new trait,
      CastFromPrimitive<T>, representing the inverse of AsPrimitive<T>.
      
      This paves the way to make Plane (and many other structures) generic
      over the pixel type conveniently.
      93c3d989
  17. 09 Feb, 2019 1 commit
  18. 08 Feb, 2019 1 commit
  19. 04 Feb, 2019 1 commit
  20. 25 Jan, 2019 1 commit
  21. 21 Jan, 2019 1 commit
  22. 16 Jan, 2019 1 commit
  23. 11 Jan, 2019 1 commit
  24. 30 Dec, 2018 4 commits
  25. 26 Dec, 2018 1 commit
  26. 06 Dec, 2018 1 commit
    • Raphaël Zumer's avatar
      Organize use statements · 5311eeea
      Raphaël Zumer authored
      * Move use statements to the heads of their modules
      * Split local and external module use statements
      * Reorder use statements alphabetically by module name
      5311eeea
  27. 30 Nov, 2018 1 commit
  28. 29 Nov, 2018 1 commit
  29. 27 Nov, 2018 1 commit
  30. 16 Nov, 2018 3 commits
  31. 15 Nov, 2018 2 commits
  32. 11 Nov, 2018 1 commit
  33. 09 Nov, 2018 1 commit