avfilter/lut3d: move the scale calc out of the inner loop.