Shift-invariant linear algorithms can be described completely by the algorithm's response to an impulse input. The so called impulse response can be used as filter kernels when the algorithm is equivalently implemented using convolution. This, however, is not true when the system is block-shift invariant, i.e. when invariance is only at repetitive locations. This paper describes a generalization of the impulse response for block shift-invariant systems. The proposed technique, takes any computer program which implements a linear block-shift-invariant algorithm, and produces its equivalent filter kernels. These kernels can then be applied efficiently by using convolution. This greatly reduces run time, especially when the convolution is implemented in hardware, or using the FFT. This algorithm can assist in finding filter kernels for interpolating missing values in mosaic images acquired by digital cameras. Using this approach any algorithmic description for the demosaicing problem, which is linear and block shift- invariant, can be translated into actual filter kernels that can be applied efficiently. Notes: 13 Pages