• David Barker's avatar
    film-grain: Fix some ASAN/segfault bugs · 4809e742
    David Barker authored
    * dealloc_arrays() calculated num_pos_chroma differently to
      init_arrays(). This caused us to read past the allocated length
      of *pred_pos_chroma in the case where params->num_y_points == 0.
    
    * In the highbitdepth path of extend_even(), we were misusing
      the 'stride' attribute from an aom_image_t. This stride is given
      in bytes, but we were using it as a stride in 'uint16_t's.
      This sometimes lead to segfaults when applying film grain
      to high bit depth videos.
    
    BUG=aomedia:1729
    
    Change-Id: Ibf8825d2679265149377a14c7c0aec75c01d221c
    4809e742
grain_synthesis.c 60.3 KB