1. 20 Dec, 2018 3 commits
    • Jan Beich's avatar
      arm: detect NEON on FreeBSD armv6 · b10771e9
      Jan Beich authored
      FreeBSD 11.2 added AT_HWCAP via sysctl() while 12.0 added elf_aux_info()
      which requires less code to use and is cached by libc. Only support the
      latter to avoid cruft to be removed after 11.* EOL on 2021-09-30.
      b10771e9
    • Jan Beich's avatar
      arm: assume NEON if built with it · 65305637
      Jan Beich authored
      Downstream may build with -march=armv7-a and/or -mfpu=neon or have
      those enabled by default e.g., on FreeBSD armv7. There's no point
      detecting NEON then only to fail if OS doesn't support getauxval().
      65305637
    • Janne Grunau's avatar
      intrabc: adjust right border to multiple of the block size · a2bda884
      Janne Grunau authored
      This fixes an overlapping memcpy with
      clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5734069753610240. This is
      a regression introduced by "intrabc: use visible width/height in mv
      correction".
      
      This reverts commit 7677c120.
      a2bda884
  2. 19 Dec, 2018 1 commit
  3. 18 Dec, 2018 10 commits
  4. 17 Dec, 2018 4 commits
  5. 16 Dec, 2018 1 commit
  6. 15 Dec, 2018 5 commits
  7. 14 Dec, 2018 1 commit
    • Ronald S. Bultje's avatar
      Rewrite inverse transforms to prevent integer overflows · 6a10a981
      Ronald S. Bultje authored
      The basic idea is that with intermediates of 19+sign bits and
      multipliers of 12+sign bits, the intermediates are 19+12=31+sign
      bits, and adding two of these together can overflow, which is UB
      in C. These are not valid AV1 streams, but they are codable, and
      so although we don't particularly care about the pixel-level
      output for such streams, we do want to prevent triggering UB,
      since that could be considered a security vulnerability.
      
      To resolve this, we clip all multipliers to 11 bit by inverting
      them:
      
      (a * constant_1 + b * constant_2 + 2048) >> 12, where
      constant_1 < 2048 but constant_2 >= 2048, is identical to:
      ((a * constant_1 + b * (4096 - constant_2) + 2048) >> 12) + b,
      and 4096 - constant_2 < 2048. In other places, where both
      constants are a multiple of 2, we can reduce the magnitude of
      both and round/shift by 11 instead of 12.
      
      Do this in dct4,8,16,32,64 as well as adst8,16. Also slightly
      simplify the final phase of idct64_1d by moving the add/sub to
      before the multiply.
      
      The adst4 is rewritten to be shaped like a matrix-multiply, and
      then use the same idea on all 4 multipliers in the matrix, since
      the sum of all 4 multipliers is still under 4096 in all cases.
      
      Fixes clusterfuzz-testcase-minimized-dav1d_fuzzer-5709759466962944,
      credits to oss-fuzz. Also fixes #223.
      6a10a981
  8. 13 Dec, 2018 2 commits
  9. 12 Dec, 2018 4 commits
  10. 11 Dec, 2018 3 commits
  11. 10 Dec, 2018 6 commits