How does MPEG compression work within a video frame?
The starting point of the MPEG encoding process is intraframe compression. If you digitize a single-frame color image, the result is a grid of pixels. Each pixel may be thought of as a measure (sample) of the source image at a point in the grid. In a typical 24-bit RGB image, the value of each pixel is expressed as the intensity of each of the three primary colors of light (red, green, and blue, corresponding to the cones in our retinas). Each color is allocated 8 bits of the 24-bit sample, making 256 possible intensity values (0 to 255) for each color.