Error-hiding is a repair technique aimed at removing small audio or video artifacts.
Artifacts can come from failures during capture, or as defects created by a repair, or both.
(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:
Re-compression, the last step, is not needed in video formats with regular structure: DV, DVCPro50, Uncompressed. Re-compression produces a small quality loss, but should be unnoticeable.
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.
Blending:
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.