1. 22 Feb, 2019 2 commits
  2. 21 Feb, 2019 4 commits
  3. 19 Feb, 2019 9 commits
  4. 18 Feb, 2019 1 commit
    • Josh Holmer's avatar
      Fixes for speed-test option (#1013) · 9e4ea86a
      Josh Holmer authored
      Defaults block size to 16x16
      Allows specifying multiple settings at once (space separated)
      Uses low_latency setting specified on CLI during speed-test
      9e4ea86a
  5. 17 Feb, 2019 1 commit
  6. 16 Feb, 2019 4 commits
  7. 15 Feb, 2019 7 commits
  8. 14 Feb, 2019 6 commits
    • Thomas Daede's avatar
    • Vladimir Kazakov's avatar
    • 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
    • Vittorio Giovara's avatar
      82a5270e
    • Vittorio Giovara's avatar
      085e9e3a
  9. 13 Feb, 2019 6 commits