Skip to content
  • Martin Storsjö's avatar
    arm64: filmgrain16: Guard against out of range pixels in the gather function · 3aac0252
    Martin Storsjö authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    In 16 bpc, the pixels are 16 bit integers, but valid pixels only
    are up to 12 bits, and the scaling buffer only contains 4096
    elements.
    
    The src pixels are, normally, supposed to be valid pixels, but when
    processing blocks of 32 pixels at a time, it can operate on
    uninitialized pixels past the right edge.
    
    Before:               Cortex A53      A72      A73  Apple M1
    fgy_32x32xn_16bpc_neon:  10372.5   8194.4   8612.1  24.2
    After:
    fgy_32x32xn_16bpc_neon:  10837.9   8469.5   8885.1   24.6
    3aac0252