1. 08 Jul, 2019 1 commit
  2. 13 Nov, 2018 1 commit
  3. 30 Aug, 2018 2 commits
  4. 24 Jun, 2017 1 commit
  5. 23 Jun, 2017 1 commit
  6. 13 Jun, 2017 1 commit
  7. 11 May, 2017 1 commit
  8. 06 May, 2017 1 commit
  9. 13 Apr, 2017 1 commit
  10. 31 Jan, 2017 1 commit
  11. 08 Dec, 2016 1 commit
  12. 15 Nov, 2016 1 commit
  13. 17 Aug, 2016 1 commit
  14. 25 May, 2016 1 commit
  15. 22 May, 2016 1 commit
  16. 29 Dec, 2015 1 commit
    • Mark Harris's avatar
      avcodec: Use get_ue_golomb_long() when needed · c51c08e0
      Mark Harris authored
      get_ue_golomb() cannot decode values larger than 8190 (the maximum
      value that can be golomb encoded in 25 bits) and produces the error
      "Invalid UE golomb code" if a larger value is encountered.  Use
      get_ue_golomb_long() instead (which supports 63 bits, up to 4294967294)
      when valid h264/hevc values can exceed 8190.
      
      This updates decoding of the following values:   (maximum)
        first_mb_in_slice                                36863* for level 5.2
        abs_diff_pic_num_minus1                         131071
        difference_of_pic_nums_minus1                   131071
        idr_pic_id                                       65535
        recovery_frame_cnt                               65535
        frame_packing_arrangement_id                4294967294
        frame_packing_arrangement_repetition_period      16384
        display_orientation_repetition_period            16384
      
      An alternative would be to modify get_ue_golomb() to handle encoded
      values of up to 49 bits as was done for get_se_golomb() in a92816c4.
      In that case get_ue_golomb() could continue to be used for all of
      these except frame_packing_arrangement_id.
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      c51c08e0
  17. 14 Dec, 2015 1 commit
    • Andreas Cadhalpun's avatar
      golomb: always check for invalid UE golomb codes in get_ue_golomb · 22e960ad
      Andreas Cadhalpun authored
      Also correct the check to reject log < 7, because UPDATE_CACHE only
      guarantees 25 meaningful bits.
      
      This fixes undefined behavior:
      runtime error: shift exponent is negative
      
      Testing with START/STOP timers in get_ue_golomb, one for the first
      branch (A) and one for the second (B), shows that there is practically no
      slowdown, e.g. for the cavs decoder:
      
      With the check in the B branch:
          629 decicycles in get_ue_golomb B, 4194260 runs,     44 skips
          433 decicycles in get_ue_golomb A,268434102 runs,   1354 skips
      
      Without the check:
          624 decicycles in get_ue_golomb B, 4194273 runs,     31 skips
          433 decicycles in get_ue_golomb A,268434203 runs,   1253 skips
      
      Since the B branch is executed far less often than the A branch, this
      change is negligible, even more so for the h264 decoder, where the ratio
      B/A is a lot smaller.
      
      Fixes: mozilla bug 1230239
      Fixes: fbeb8b2c7c996e9b91c6b1af319d7ebc/asan_heap-oob_195450f_2743_e8856ece4579ea486670be2b236099a0.bit
      
      Found-by: Tyson Smith
      Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
      Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
      22e960ad
  18. 19 May, 2015 1 commit
  19. 17 May, 2015 2 commits
  20. 22 Apr, 2015 1 commit
  21. 11 Mar, 2015 1 commit
  22. 07 Mar, 2015 1 commit
  23. 13 Feb, 2015 1 commit
  24. 05 Dec, 2014 1 commit
  25. 02 Sep, 2014 1 commit
  26. 29 Mar, 2014 1 commit
    • Martin Storsjö's avatar
      golomb: Fix the implementation of get_se_golomb_long · 508a84e6
      Martin Storsjö authored
      This was only used in hevc muxing code so far.
      
      This makes the return values match what get_se_golomb returns for
      the same bitstream reader instances.
      
      The logic for producing a signed golomb code out of an unsigned one
      was based on the corresponding code in get_se_golomb, which operated
      directly on the bitstream reader buffer - not on the equivalent
      return value from get_ue_golomb.
      
      CC: libav-stable@libav.org
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      508a84e6
  27. 10 Mar, 2014 1 commit
  28. 24 Oct, 2013 1 commit
  29. 23 Oct, 2013 1 commit
  30. 09 Feb, 2013 1 commit
  31. 18 Jan, 2013 1 commit
  32. 08 Dec, 2012 1 commit
    • Janne Grunau's avatar
      golomb: use unsigned arithmetics in svq3_get_ue_golomb() · 9a2e7911
      Janne Grunau authored
      This prevents undefined behaviour of signed left shift if the coded
      value is larger than 2^31. Large values are most likely invalid and
      caused errors or by feeding random.
      
      Validate every use of svq3_get_ue_golomb() and changed the place there
      the return value was compared with negative numbers. dirac.c was clean,
      fixed rv30 and svq3.
      9a2e7911
  33. 01 Oct, 2012 1 commit
  34. 27 Sep, 2012 1 commit
  35. 12 Jun, 2012 1 commit
  36. 06 Jun, 2012 1 commit
  37. 24 Feb, 2012 1 commit
  38. 17 Feb, 2012 1 commit