1. A method, comprising: determining, by an apparatus that processes image data, a gain value for a pixel in the image data for which there is no gain value available in the apparatus, by interpolating related gain values associated with corners of a rectangle bounding the pixel, wherein the interpolating includes determining at least two partial coefficients by interpolating pairs of the related gain values; filtering noise from the image data using a noise threshold, and modifying the noise threshold by using the at least two partial coefficients; and applying the gain value to the pixel in the image data.