1. A method for correcting a distortion effect in a distorted image, the method comprising: selecting a destination macroblock in a destination image based on a size of a local memory; determining an x-coordinate offset and a y-coordinate offset for each pixel in the destination macroblock; identifying a source macroblock in the distorted image that corresponds with the destination macroblock, wherein a size of the source macroblock is selected to encompass the x-coordinate offset and the y-coordinate offset of each pixel in the destination macroblock; reading into local memory from system memory pixels corresponding to the source macroblock in the distorted image; reversing the distortion by computing, using information associated with the pixels stored in the local memory, revised values of each pixel in the destination macroblock in the destination image; and writing the computed values into system memory.