If the sync level varies or isn’t present, the diode can be replaced by a switch—usually a FET controlled by an external signal (Fig. 4b). This is a keyed clamp, and the control signal is the key signal. If the key signal is coincident with the sync pulse, then this becomes a sync tip clamp. But unlike the diode clamp, it can be activated anywhere in the sync interval, and not just during the sync tip. If the key signal occurs while the video is at the black level (Fig. 4c), you get a "black-level clamp." This approach is versatile, practical, and closely approximates its ideal model. The switch doesn’t have the diode’s conduction voltage, and can actually implement a black-level clamp.
Adding a dc voltage source (Vref) makes it possible to set bias for signals like chroma, Pb, and Pr, as well as composite and luma. Its shortcomings are that it requires a sync separator to get the key signal, and it’s not accurate enough for some applications. If you’re digitizing video, you want the black level to vary less than ±1 least-significant bit (LSB), or about ±2.75 mV. Clamps can’t achieve that level of accuracy.
The last method used to bias a video signal is called a dc restore, and it can achieve black-level accuracy approaching ±1 LSB. The first thing you notice in Figure 4d is that this circuit doesn’t have a coupling capacitor. Instead, U2 compares the dc output of the stage (U1) to a voltage (Vref), and applies negative feedback to U1 to force the output to track it regardless of the input voltage. Obviously, if the loop ran continuously, all you would get out is dc. Instead, a switch is inserted in the feedback loop. And it’s only closed for an instant during each horizontal line at the point (sync tip or black level) we wish to set to Vref. The voltage is stored on a capacitor (C), but it’s not in series with the input. Instead it’s in a sample-and-hold (S/H) formed by the switch in the feedback.
The practical implementation of Figure 5 actually has two capacitors (Chold and Cx ), two op amps (U1 and U2), and an S/H. The actual comparison and signal averaging is done by Rx, Cx , and U2. The RC product is chosen for noise averaging. For a 16-ms field (NTSC/PAL), the RC product should be greater than 200 ns. So U2 is a low-frequency device chosen for its low offset voltage/current, and stability—not its frequency response. (The MAX4124/25 are good candidates for this application.) U1, on the other hand, is chosen for its frequency response, but not its offset. The S/H and Chold itself are chosen for their leakage, which causes the voltage to change (droop) during a horizontal line. Although the circuit shown uses dual supplies, it can also be implemented in single-supply form using precision level translation.
The biggest problem with a dc restore is that the level restored—black video to Vref—is analog, and uncorrelated with its value in the digital domain. To correct this, a DAC is often used to generate Vref. Like the keyed clamp, a dc restore can be used on any video signal (with or without sync) and activated anywhere on the waveform—assuming the amplifiers and the S/H are fast enough to follow.