Use input_h + pixel_margin * 2 to prevent progress report from ever going above 1. Always report a 0 before and a 1 at the end of each resize.
Use rounding to try to preserve the original value. Fix test case.
Rearrange the algebra on two of the filters to avoid repeating decimals which cause precision loss. Use int32 to test filters because it's more accurate.
Normalize downsample coefficients.
Replace premul test with better premul test that doesn't require visual inspection.
Report downsample progress by when we empty the ring buffer, it's more accurate that way.
If alpha is zero then sneakily replace it with a very small nonzero so that the color data is preserved.

Pre-process n1 so that we don't have to do it later on. Can't do n0 since it's used to find the coefficient index.
Use height, not width, for correct progress report.