Video Coding Concepts: Mean Removal

This article is now maintained as a Wiki page at http://wiki.multimedia.cx/index.php?title=Mean_Removal.

Mean removal is another one of those concepts– like differential coding— that sounds like it would be difficult to understand. It’s not.

What is a mean? It’s an average. It’s the sum of n items divided by n. Not difficult. Removal in this context is just mathematical subtraction. To remove a mean from, say, a vector of numbers, sum the numbers, divide the sum by the number of elements in the vector, and subtract that number from each element in the vector. An example vector:

17 24 18 16
11 25 20 17
12 20 22 19
15 19 23 21

Add the elements and divide by the number of elements to obtain the vector mean:

(17 + 24 + 18 + 16 + 11 + 25 + 20 + 17 + 12 + 20 + 22 + 19 + 15 + 19 + 23 + 21) / 16 = 299 / 16 = 18

For the mean removal part, subtract the mean of 18 from each element in the vector:

-1  6  0 -2
-7  7  2 -1
-6  2  4  1
-3  1  5  3

This is the mean-removed vector. Just as with differential coding, the primary purpose is to make the numbers small. From here, the video codec needs to figure out efficient ways to transmit the mean-removed vector (also called the residual) as well as the vector mean. Encoding the residual will often result in information loss. However, the most significant number is the mean of the whole vector which should be transmitted losslessly.