Now we see through a glass, darkly...
- Apr 5, 2016
Adding padding fake pixels will make the h/w stutter?
They don't add any "fake pixels". They add actual hardware photosites to the sensor outside the edges of the output resolution because color interpolation is done using surrounding photosites, both those that are filtered by the same color as the photosite that corresponds to the pixel on the edge of the output image as well as those that are filtered by different colors than the photosite in question. If a demosaicing algorithm uses three rows of photosites in all four directions to interpolate colors for the output pixel representing a particular photosite, then the sensor needs three rows of additional photosites on all four sides of the sensor beyond the number of rows and columns output in the final image. If a demosaicing algorithm uses five rows of photosites in all four directions, then the sensor needs five rows of additional photosites on all four sides, and so on.
Demosaicing algorithms to do color interpolation have nothing to do with compression algorithms. Those are two entirely separate things in the processing pipeline.
After demosaicing (including color channel multiplication for color temperature and white balance correction, gamma processing/light curves are applied) is done, there is an uncompressed image file that has RGB values for every pixel in the output resolution. Uncompressed TIFF files are one form that represents these individual RGB values for each pixel. Then whatever image file compression scheme used is applied to the uncompressed RGB values for each image pixel.