Noise shaping is a technique typically used in digital audio, image, and video processing, usually in combination with dithering, as part of the process of quantization or bit-depth reduction of a digital signal. Its purpose is to increase the apparent signal-to-noise ratio of the resultant signal. It does this by altering the spectral shape of the error that is introduced by dithering and quantization; such that the noise power is at a lower level in frequency bands at which noise is considered to be less desirable and at a correspondingly higher level in bands where it is considered to be more desirable. A popular noise shaping algorithm used in image processing is known as ‘Floyd Steinberg dithering’; and many noise shaping algorithms used in audio processing are based on an ‘Absolute threshold of hearing’ model. Operation Noise shaping works by putting the quantization error in a feedback loop. Any feedback loop functions as a filter, so by creating a feedback loop for the error itself, the error can be filtered as desired. For example, consider the feedback system: where is the output sample value that is to be quantized, is the input sample value, is the sample number, and is the quantization error introduced at sample : In this model, when any sample's bit depth is reduced, the quantization error between the quantized value and the original value is measured and stored. That "error value" is then re-added into the next sample prior to its quantization. The effect is that the quantization error is low-pass filtered by a 2-sample boxcar filter (also known as a simple moving average filter). As a result, compared to before, the quantization error has lower power at higher frequencies and higher power at lower frequencies. Note that we can adjust the cutoff frequency of the filter by modifying the proportion, , of the error from the previous sample that is fed back: More generally, any FIR filter or IIR filter can be used to create a more complex frequency response curve. Such filters can be designed using the weighted least squares method. In the case of digital audio, typically the weighting function used is one divided by the absolute threshold of hearing curve, i.e. Noise shaping should also always involve an appropriate amount of dither within the process itself so as to prevent determinable and correlated errors to the signal itself. If dither is not