Compression schemes sending difference between successive samples only, what would happen if error occurs

communicationcompressionerror correction

There are multiple inginious data compression methods in which we send the difference between current and next sample rather than the actual value of the sample. This makes it possible to send the data in fraction of the actual bandwidth required to send original samples.

I have following questions:

1) How does data transfer start? i.e if we only send the difference, how do we assign value to the data at the beginning when there is no previous sample to refer to?

2) The difference between previous and current sample will usually be small but sometimes very large e.g when the scene or focus in a video changes to something different. Does this mean that small and large differences between the samples are sent using the same bandwidth? Really??

3) Error in data can occur quite easily. What if error occurs in the current "difference sample" sent across the channel? Won't this cause the error to propagate to all future samples values at the output reciever???

Best Answer

If there is an error, it will propagate as you said through the whole sequence and would never stop.

Because of that there are certain key frames at certain points in time. That is a complete frame where all the data is transmitted. So the first thing that will be transmitted is a key frame, after that only the differences are transmitted for a certain amount of frames and then another key frame is inserted.

In some special cases it can happen that describing the differences from one frame to the next frame would take more space than the whole frame, so you can insert key frames at intelligent positions to save some data as well (think of a cut between two scenes).

I described this from a video point of view, as it can be imagined easily. I guess everyone stumbled upon a corrupt video where all colors would suddenly be wrong, only some contours are recognizable and after a few seconds it would suddenly all be well again (a key frame occurred).

Related Topic