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.
Make sure calculate_memory matches with the allocations. Fix some errant asserts.
Use the info structure to keep track of our memory block sizes to reduce duplicated code and cut down on errors.
Avoid repeated adds and ensure correct round-trip result.
These minor optimizations were probably already done by the compiler but they can't hurt.
Add the epsilon value into the alpha instead of using an if statement. It's a tiny bit faster and it can be removed afterwards.
Reverse allocation routines parameter order so that the context is at the back.
Use an even smaller epsilon. Allow the user to avoid the epsilon business if they want to preserve their alpha values.
Use a carefully shaped trapezoid instead of a box filter to avoid jumps between pixel values.
Use vertical pixel width for the ring buffer.
Merge branch 'resample' of http://github.com/bsvino/stb into resample
compile as C;
fix some unsigned/signed comparisons;
avoid round() since it's not in pre-C99 C;
remove MAX_CHANNELS since I never ended up needing it;
rename STBIR_EPSILON to STBIR_ALPHA_EPSILON;
don't use STBIR_ALPHA_EPSILON on float input (can't remove it properly due to numeric precision, and they can do it themselves);
optimize subtraction of STBIR_ALPHA_EPSILON;
sorry i forgot to commit these separately!;
fix stbir__linear_to_srgb_uchar:
    1. table stored threshhold of transition from i to i+1, but wants to be i-1 to i
    2. table was computed by dividing uchar by 256.0 instead of 255.0, causing it to be 100% wrong