Skip to content

checkasm: filmgrain: Fix benchmarking in 16 bpc mode

When benchmarking, the functions are called with a fixed width of 64x32 or 32x16, while the test itself is run with a random size in the range up to 128x32.

In 16 bpc mode, the source pixels must be within the valid range, because they otherwise cause accesses out of bounds in the scaling array.

Alternatively, this could initialize the src array up to max(64,w) x max(32,h) if that is clearer with the intent.

Merge request reports