Diffusion is one of the simplest of the restoration techniques. The basic idea is that a spot or line that is "wrong" should be restored to a color that is a "diffusion" of the surrounding pixels -- picture elements. Mathematically the technique is called convolution, but intuitively it is a blending of the surrounding colors as if they were wet and diffused into one another. If there is a spot where everything around the spot is blue, the spot should also be blue. If there is a line or crack going across the picture, each pixel along the line should be restored to the convolution of the pixel above and below that pixel in the line.
Sometimes diffusion will not get the right colors or shapes. If the line or other flaw goes across a repeating pattern like a picket fence, diffusion may give the wrong results. Global considerations are especially significant when restoring film. If a spot is blue in the previous frame and blue in the subsequent frame, it probably should be blue in the current frame. This is especially true if the spot is part of the background instead of part of a moving object. Determining what is background and what is moving object involves another set of algorithms. Still another set of algorithms detects scene changes when the entire background may change.
Thanks to the computational power of computers, it is possible to use statistical techniques to decide what color a pixel should be. Statistics -- especially Bayesian statistics -- involve techniques that can establish which areas of a film frame represent moving objects and which areas represent background. There is even a Bayesian technique to detecting moving backgrounds such as a view out a train window. Statistics can also detect when to use diffusion or global information to fill in a spot of a fixed image.
The chief advantage of inpainting algorithms is that they can be implemented on a computer. Running a computer program is faster and cheaper than using a professional image restorer. Impainting algorithms also open up the possibly of reforming film, which would be prohibitively expensive and time consuming with a human restorer.