1. 22 Nov, 2018 1 commit
  2. 20 Nov, 2018 2 commits
    • Janne Grunau's avatar
      film_grain: replace left shift of a signed value with a multiplication · e8f5a93e
      Janne Grunau authored
      Fixes an undefined left shift of a negative value in
      clusterfuzz-testcase-minimized-dav1d_fuzzer-5707215277654016. Credits to
    • Martin Storsjö's avatar
      film_grain: Fix compilation with MSVC · 86fd0b6d
      Martin Storsjö authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      This fixes compiler errors like these:
      src/film_grain_tmpl.c(238): error C2036: 'void *': unknown size
      Don't rely on sizeof(void) == 1 in pointer arithmetic, but instead
      cast the row pointers to the pixel datatype immediately, use PXSTRIDE()
      for converting a stride in byte units to pixel units, and skip
      sizeof(pixel) for horizontal offsets that previously were applied on
      a void pointer.
  3. 19 Nov, 2018 2 commits
    • James Almer's avatar
      film_grain: include config.h before other headers · 9f77d9c3
      James Almer authored
      Fixes warnings about redefinition of _WIN32_WINNT on Windows targets
    • Niklas Haas's avatar
      film_grain: implement film grain synthesis · cfa986fe
      Niklas Haas authored and Ronald S. Bultje's avatar Ronald S. Bultje committed
      This is using a slightly adapted version of my GPU-based algorithm. The
      major difference to the algorithm suggested by the spec (and implemented
      in libaom) is that instead of using a line buffer to hold the previous
      row's film grain blocks, we compute each row/block fully independently.
      This opens up the door to exploit parallelism in the future, since we
      don't have any left->right or top->down dependency except for the PRNG
      state. (Which we could pre-compute for a massively parallel / GPU
      That being said, it's probably somewhat slower than using a line buffer
      for the serial / single CPU case, although most likely not by much
      (since the areas with the most redundant work get progressively smaller,
      down to a single 2x2 square for the worst case).