1. 29 Sep, 2018 1 commit
    • Niklas Haas's avatar
      common: switch to explicit includes · b6104e12
      Niklas Haas authored
      Since we no longer need the GCC pragma for symbol visibility, there's
      also no more reason to have common.h import everything under the sun -
      so only have modules import what they actually use.
      
      This speeds up compilation a tiny bit.
      b6104e12
  2. 22 Dec, 2017 1 commit
    • Niklas Haas's avatar
      shaders: refactor pl_shader_obj and add sh_lut · 456aa914
      Niklas Haas authored
      This refactors the way we store data like scaler LUTs, with the intent
      of generalizing it for other types of LUTs (e.g. dither matrix) in an
      easy-to-use but flexible way.
      
      Instead of trying to come up with sane semantics for who gets to use
      what fields inside a pl_shader_obj, we just abstract it away and let the
      caller deal with the *priv representation (as usual). Unfortunately,
      this requires "nesting" pl_shader_objs for cases like the sampler LUTs
      where we need to store information about the scaling kernel *and* the
      underlying LUT. But that's not too bad, I think.
      
      I had to rewrite the code that uses pl_shader_objs. Hopefully for the
      better.
      456aa914
  3. 31 Oct, 2017 1 commit
    • Niklas Haas's avatar
      libplacebo: explicitly default *params where defaults exist · 7daca5eb
      Niklas Haas authored
      As a rule of thumb, if there's a pl_foo_default_params, then specifying
      a const struct pl_foo_params *params as NULL will default to this. Ditto
      for the neutral color adjustment.
      
      There are some special cases where there are no reasonable default, e.g.
      for ra object creation or filter sampling.
      7daca5eb
  4. 14 Oct, 2017 1 commit
    • Niklas Haas's avatar
      colorspace: refactor color representation · dd172eab
      Niklas Haas authored
      Make the bits struct more complicated. Also, since it's sufficiently
      non-trivial, make the various color representation changing function
      mutate the representation to represent the change that was being made.
      (And give them better names)
      
      Also, I needed to update the test cases to make `feq` not fail on the
      large values (65535), since that + the epsilon of 1e-6 exceeded the
      floating point precision. And apparently we never actually linked the
      test cases against libm etc.
      dd172eab
  5. 13 Oct, 2017 1 commit
  6. 12 Oct, 2017 2 commits
    • Niklas Haas's avatar
      common: API consistency · ba302189
      Niklas Haas authored
      Use pointers instead of passing around bare structs for the matrix math.
      Only exception right now are the structs-of-enums in colorspace.h, but
      anything bigger or involving multiple floats will be passed as pointer
      from now on.
      ba302189
    • Niklas Haas's avatar
      filters: add test cases · c6cda649
      Niklas Haas authored
      Also fixes some bugs
      c6cda649
  7. 11 Oct, 2017 1 commit