Error-hiding is a repair technique aimed at removing small audio or video artifacts.
(Error-hiding can therefore be the second step of a repair operation).
How it works:
When the artifacts are rare and have a small footprint, we can expect to use neighboring data to patch them.
In case of video, neighboring data can be a portion of the previous or the next frame.
In case of audio, neighboring data can be the audio spectrum just before the defect, that we modulate.
Such patches will be detected if you scrutinize the footage, for example looking frame by frame. But it will be barely unnoticeable for the public.
Error-hiding is very hard to program, as it is an investigative repair. The algorithm is more or less:
- Detection of alien data in the frame.
- Find in previous or next frame the data corresponding to this picture area
- Replace alien data by data from other frame.
- Re-compress frame if needed
Low quantity of artifacts:
Beyond a certain threshold, error-hiding will not be enough. Based on past repairs, it seems that 1 data block damaged in 5 to 30% of the frames, representing less than 1/1000 of the data, is the maximum we can handle.
Slow motion scenes:
Error-hiding works better if the damaged clip has no camera movement or very slow action.
As we use previous or next frames to correct a damaged area of a frame, a fast movement of camera will result in
Otherwise, error-hiding would need to be complemented by a movement compensation algorithm.
To improve error-hiding (make corrections less noticeable), we can also use several frames to compose the patch: blending the previous and next frames at 50/50% will make the corrected area more blurred but less eye-catching. That's usually better.