Skip to content

Simplify the extractFace() expressions

Tim Starling requested to merge work/tstarling/coord-tweak into main

Rearrange the expressions so that there is less to do in the inner loop. The output does change slightly -- not just by one either, sometimes by 3 or 4. I think that shows how sensitive interpolation is in contrasty areas. We're using 32-bit floats, so the first 8-10 bits of the 24 bit mantissa are used for the address, and the rest of the bits go into the mixing coefficients. I was comparing JPEGs, which might add some noise.

Anyway, this is probably better than before in terms of output accuracy, and it's faster too. It also should be easier to understand how to extend or crop the output region.

Merge request reports