Treating video errors

Error correction and error concealment seem straightforward; error correction corrects errors, and error concealment conceals errors. But the topic is quite interesting, especially when you consider how the views of the broadcaster and the IT engineer differ. This topic sits at the confluence of the IT and broadcast world. So bear in mind that when you talk about this topic with a colleague or you hear a presentation on the subject, it is important to know where the other person is coming from.

For those of you who did not start out in broadcasting, suspend what you know about this area, and think about these terms from a broadcaster's point of view. We use the same words as the IT world, but we think about errors and treatment of errors in a different way. For those who started out in broadcasting, consider that the IT world has been dealing with error correction for many years and that there is a whole mindset regarding this topic. Hopefully this article will help you communicate, regardless of your background.

What is an error?

From a broadcaster's perspective, an error is something that can be perceived by a viewer — usually a disruption in video or audio. But in the IT world, an error is any loss of information, whether it is perceptible or not. Even the loss of a single bit in a two-hour movie is an error when seen from the IT perspective.

To further complicate the subject, the effect of an error at the IT level can have disastrous and sometimes unintended consequences for the broadcaster. A single unrecoverable bit error in the transfer of a two-hour movie could cause the entire transfer to fail. The broadcaster might be willing to accept the error rather than restart the entire transfer. But since we live in a world dominated by IT technology, frequently we do not have that choice.

Another point to consider is that a single bit error may have different effects on what the viewer perceives depending upon when the error is introduced. In the case of MPEG-2 compressed content, a single bit error that occurs somewhere in a P-frame may be completely undetectable by the viewer. However, the exact same single bit error introduced in the header of an I-frame may cause the picture to freeze or to go blank for a half-second or longer. To the IT engineer, the bit error rate on the link is exactly the same. To the broadcaster, the impact of the errors is completely different.

Correction or concealment

The decision to employ error correction or error concealment comes down to a simple question: Do you want to fix the errors, or do you want to cover them up? In the IT world, the answer is almost always to fix the errors. This is because a single corrupt bit in a file can cause unpredictable results. Imagine that you have transferred an executable application from one computer to another. Somewhere along the way, a single bit was changed from a zero to a one. Would you want to run that application on your computer? Do you have any way to predict what the result of the single error would be? Or perhaps you are transferring financial data from one computer to another. Again, how can you predict the severity of the error? For this reason in the IT world, the norm has been to either verify that a bit-perfect copy has been made, or to cancel the copy completely.

While in many cases, the broadcaster may desire a bit-perfect copy of a commercial or movie, in other cases, it may be more expeditious to simply conceal an error rather than take the time to fix it. There are several reasons concealment might be the best solution. First, concealment might work perfectly well. If the error is relatively minor and confined to specific areas of the picture, and of limited duration, concealment can take a visible error and make it almost undetectable. Second, error correction takes time, and in most cases, bandwidth. Those commodities may be in short supply. So while concealment is not really part of the typical IT toolkit, it has been, and will continue to be, an important technology for broadcasters.

There are several ways to conceal errors. In its simplest case, concealment repeats existing data. For example, let's say that part of a line of video is lost. A simple concealment algorithm would repeat the previous line. This method may lead to visible concealment artifacts, particularly in the case of video with strong diagonal elements in the picture. There are more complex methods that yield better results, but the idea remains the same: Replace the missing video using material that is adjacent to the error.

Error correction

Thousands of books have been devoted to error correction, so there is no way I can do the subject justice in a short article. That said, I can at least present some fundamental information about how error correction works.

Let's say that you are going to send a message consisting of eight numbers. These eight numbers are important, but you think that the chance of losing more than one number at a time is low. In this case, include a simple check number at the end of the eight numbers, which allows you to recreate the missing number should one of the eight get dropped. The check number is simply the sum of the eight numbers preceding it. Figure 1 illustrates this basic error correction scheme. Now assume that the second number in the group of eight is lost. (See Figure 2.)

The receiving application can easily recreate the missing number by adding the remaining numbers together and subtracting them from the check number: 27 - 21 = 6. Therefore, six is the number that was lost during the transfer.

This simple example points out several important concepts that are common to error correction schemes. First, sending extra information allows the receiving application to reconstruct data that is lost during a transfer. Second, it is important to have some idea of the loss characteristics of the network or application across which you are trying to protect your data. In this case, we have specified a system that is not robust, because it protects against a single lost number. This may be perfectly fine, but if a second number is lost in the group of eight, this scheme will not correct for it. Third, it is important to understand the limitations and the cost of any error correction scheme. In this case, the limitations are well understood. The scheme will not recover more than a single loss in any group of eight. The cost of the scheme is that an additional check number must be sent with every group of eight numbers. Finally, it is important to understand the efficiency of any error correction scheme compared with other alternatives. This simple scheme is actually inefficient. There are other schemes that would provide the same protection for much less overhead. In more complex scenarios, there may be several competing error correction schemes. To evaluate these, study their cost vs. their robustness at different loss levels.

Remember that concealment may work. In this case, there is zero overhead during transmission because errors are simply masked at the receiver.

Brad Gilmer is president of Gilmer & Associates and executive director of the Advanced Media Workflow Association.

Send questions and comments to:brad.gilmer@penton.com

CATEGORIES