Skip to content

film_grain: Fix compilation with MSVC

Martin Storsjö requested to merge mstorsjo/dav1d:filmgrain-msvc into master

This fixes compiler errors like these: src/film_grain_tmpl.c(238): error C2036: 'void *': unknown size

Don't rely on sizeof(void) == 1 in pointer arithmetic, but instead cast the row pointers to the pixel datatype immediately, use PXSTRIDE() for converting a stride in byte units to pixel units, and skip sizeof(pixel) for horizontal offsets that previously were applied on a void pointer.

Merge request reports

Loading