1. 14 Nov, 2018 10 commits
    • Rupert Swarbrick's avatar
      Correctly flush at the end of OBUs · c59f1940
      Rupert Swarbrick authored
      This fixes failures when an OBU has more than a byte's worth of
      trailing zeros.
      
      As part of this work, it also rejigs the dav1d_flush_get_bits function
      slightly. This worked before, but it wasn't very obvious why (it
      worked because bits_left was never more than 7). This patch renames it
      to dav1d_bytealign_get_bits, which makes it clearer what it does and
      adds a comment explaining why it works properly.
      
      The new dav1d_bytealign_get_bits is also now void (rather than
      returning the next byte to read). The patch defines
      dav1d_get_bits_pos, which returns the current bit position. This feels
      a little easier to reason about.
      
      We also add a new check to make sure that we haven't fallen off the
      end of the OBU. This can happen when a byte buffer contains more than
      one OBU: the GetBits might not have got to EOF, but we might now be
      half-way through the next OBU.
      c59f1940
    • Rupert Swarbrick's avatar
      Fix how we read the UV quantization level · 2532642b
      Rupert Swarbrick authored
      See section 5.9.12 of the AV1 spec. The flag controlling U and V share
      a quantization level wasn't being read.
      2532642b
    • boyuanxiao-argondesign's avatar
      Segmentation map reference logic · 066b02c2
      boyuanxiao-argondesign authored
      The previous code raised an error if !segmentation.update_map but the
      reference frame didn't yield any segmentation data. (The first "goto
      error" that the patch removes happens if the reference frame was the
      right size but had no segmentation data; the second happens if the
      reference frame was the wrong size).
      
      This doesn't match the logic in the description of
      load_previous_segment_ids in section 6.8.2 of the spec.
      
      This patch allows such streams, allocating and zeroing cur_segmap in
      this case. It is still an error for a stream to signal a temporal
      update but not to have valid segmentation data from the ref frame -
      that's the error case that the patch puts back in.
      066b02c2
    • boyuanxiao-argondesign's avatar
      Fix parsing segmentation data in parse_frame_hdr · 2f7eb1e9
      boyuanxiao-argondesign authored
      The first memset is dead code: if primary_ref_frame is
      PRIMARY_REF_NONE then segmentation.update_data is always true. The
      patch removes this memset and explains why the copy in the other
      branch is correct.
      
      The second memset should always fire: if segmentation is not enabled
      for this frame, the seg_data structure should be set to zero rather
      than copied from a reference frame (see section 5.9.14 of the AV1
      spec).
      2f7eb1e9
    • Ronald S. Bultje's avatar
      Fix segmentation map size check · 0bf59f09
      Ronald S. Bultje authored
      Fixes #166.
      0bf59f09
    • Janne Grunau's avatar
      mc: use width/height of reference frame in warp_affine · cf9ec49a
      Janne Grunau authored
      Fixes a heap buffer overflow in emu_edge_c with
      clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5089954858795008 if the
      reference frame is smaller than the current frame. Credits to oss-fuzz.
      cf9ec49a
    • Janne Grunau's avatar
      mc: ensure order of evaluation of macro arguments in FILTER_BILIN · faa09008
      Janne Grunau authored
      Fixes undefined shifts in put_bilin_scaled_c with
      clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5732654503165952. Credits
      to oss-fuzz.
      faa09008
    • Ronald S. Bultje's avatar
      3fdb6cc9
    • Janne Grunau's avatar
      mc: use PXSTRIDE consistently in {put,prep}_8tap_scaled_c · 66adb457
      Janne Grunau authored
      Fixes a heap buffer overflow with high bit depth scaled reference frames
      in clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5652139771166720.
      Credits to oss-fuzz.
      66adb457
    • James Almer's avatar
      implement a decoupled decode API · 02606969
      James Almer authored
      02606969
  2. 13 Nov, 2018 4 commits
  3. 12 Nov, 2018 8 commits
  4. 10 Nov, 2018 1 commit
    • Henrik Gramner's avatar
      Split MC blend · 58fc5165
      Henrik Gramner authored
      The mstride == 0, mstride == 1, and mstride == w cases are very different
      from each other, and splitting them into separate functions makes it easier
      top optimize them.
      
      Also add some further optimizations to the AVX2 asm that became possible
      after this change.
      58fc5165
  5. 09 Nov, 2018 3 commits
    • Janne Grunau's avatar
      lf mask: calculate vertical mask correctly · 8b8e9fe8
      Janne Grunau authored
      Fixes an error introduced in 22d3b6d9 (!294).
      Fixes an use of uninitialized value in loop_filter_v_sb128y_c with
      clusterfuzz-testcase-minimized-dav1d_fuzzer-5682084585144320. The
      original sample in 22d3b6d9
      clusterfuzz-testcase-minimized-dav1d_fuzzer-5691087507685376 shows no
      regression. Credits to oss-fuzz.
      8b8e9fe8
    • Janne Grunau's avatar
      frame-mt: do not derive_warpmv intrabc blocks · d253401a
      Janne Grunau authored
      Fixes an use-of-uninitialized-value in decode_b() with
      clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5674585370918912. Credits
      to oss-fuzz.
      d253401a
    • Janne Grunau's avatar
      reduce size of Av1FrameHeader by 7940 bytes · 4d3b6c15
      Janne Grunau authored
      Take the maximal number of tile rows and columns (each 64) into account.
      Reduces size of Av1FrameHeader from 9588 to 1648 bytes on x86_64
      according to pahole.
      Refs #156.
      4d3b6c15
  6. 08 Nov, 2018 8 commits
  7. 07 Nov, 2018 6 commits