Signal clamping apparatus

Abstract: A video signal clamp involves evaluating (310) the difference between the signal level (VIDEO_IN) and the desired clamp level (CLAMP LEVEL) during the back porch interval. A correction signal (CHARGE_x) indicates whether the signal level must be increased or decreased to establish the desired clamp level. Generation of the correction signal involves a median filter algorithm (330-350). Any required increase or decrease of the signal level occurs continuously throughout each horizontal line interval.

Description: Signal processing systems may include a clamping function. For example, a digital video signal processing system may include an analog-to-digital converter (ADC) having an analog input that is AC coupled to an analog video signal source. It is desirable to establish and maintain a DC bias at the input of the ADC so that the analog signal does not exceed the DC range of the ADC. If the DC range is exceeded, signal clipping will occur. Clipping may produce objectionable effects, e.g. image distortion in a video signal processing system. A clamping feature can provide the desired DC bias. The operation of a signal clamp typically involves sampling the signal level, comparing the sampled value to a reference value, and adjusting the signal level to establish the desired value. As an example, a video signal typically includes "back-porch" intervals during which a DC level is present. In an NTSC compatible signal, the back porch interval begins approximately 4.7 µs after the leading edge of horizontal sync and has a duration of 4.7 µs. In the above-mentioned digital signal processing system, the level at the input of a video ADC during back porch represents the bias at the ADC input. Thus, the ADC input signal level can be sampled during back porch intervals and adjusted to clamp the bias to a desired value. Certain approaches to clamping may involve completing both the sampling and signal level adjustment operations during a brief interval such as the back porch interval. Attempting to sample and modify a signal level during a relatively brief interval may require a significant signal pulse to adjust the signal level. A pulse may produce transients that introduce noise into the signal processing system. In addition, a signal pulse may interact with sampling causing effects such as oscillations or drift of the clamping level. In EP-A-0 462 804 a signal clamping apparatus according to the preamble of claim 1 is disclosed. Further video signal clamping apparatuses are disclosed in DE-A-38 17 421 and EP-A-0 498 262. The present invention resides, in part, in recognition of the described problem and, in part, in providing signal processing apparatus for addressing the problem as set out in the claims. In accordance with the principles of the present invention, signal processing apparatus provides for evaluating during an evaluation interval the relationship between a signal characteristic and a desired signal characteristic. If the results of the evaluation indicate that the relationship is not a desired relationship, the signal characteristic is modified to cause the relationship to substantially become the desired relationship. The modification occurs during a modification interval. The modification interval has a duration exceeding the evaluation interval. In accordance with another aspect of the present invention, evaluation during the evaluation interval involves a filter exhibiting a median filter algorithm. The invention may be better understood by referring to the enclosed drawing in which: Figure 1 shows, in block diagram form, an embodiment of a portion of a signal processing system incorporating the principles of the present invention; Figure 2 shows signal waveforms useful for understanding the operation of the embodiment in Figures 1, 3, and 4; Figure 3 shows a schematic diagram representation of a digital logic implementation of a feature shown in block diagram form in Figure 1; and Figure 4 shows an embodiment of an approach to generating control signals shown in Figure 3. For purposes of explaining the principles of the present invention, an exemplary embodiment shown in Figure 1 will be explained in the context of video signal processing systems. As will become readily apparent, the present invention is applicable to a variety of signal processing applications. In Figure 1, three channels are shown for processing video input signals Y_IN, U_IN, and V_IN where signal Y_IN represents a luminance signal and signals U_IN and V_IN represent color difference signals (e.g. R-Y and B-Y). Coupling capacitors 103, 101, and 107 couple signals Y_IN, U_IN, and V_IN to respective amplifiers 113, 111, and 117. As is described further below, the input DC bias of each amplifier is clamped in accordance with the principles of the present invention. Each amplifier output is coupled to a low pass filter (LPF) exhibiting an appropriate frequency response. As an example, Figure 1 indicates a 6 MHz bandwidth for luminance LPF 133 and a bandwidth of 500 kHz for chrominance LPF's 131 and 137. The output of luminance LPF 133 is coupled to analog-to-digital converter (A/D or ADC) 153 which produces 8-bit digital luminance output signal Y_IN. A single 8-bit digital chrominance output signal, i.e. signal UV_IN, is produced at the output of ADC 155. The chrominance (i.e. U_IN and V_IN) bandwidth is sufficiently low to permit multiplexing chrominance input signals U_IN and V_IN for purposes of analog to digital conversion of the chrominance information. Thus, only a single ADC, namely ADC 155, is required for chrominance information. The multiplexing operation is performed via analog switch 145 which alternately couples signals U_IN and V_IN to ADC 155. Analog switch 145 is controlled by control signal UV_SEL_IN. Signal UV_SEL_IN may be generated by dividing (not shown in Figure 1) the frequency of ADC clock signal CLOCK by an integer value, e.g. two. Bias level clamping at the inputs of amplifiers 113, 111, and 117 is controlled by signals CHARGE_Y, CHARGE_U, and CHARGE_V, respectively. These signals are produced by bias control circuits 163, 161, and 167 in response to a digital clock signal CLOCK, a timing signal CLAMP_KEY, and one of digital output signals Y_IN and UV_IN. Signal Y_IN is coupled to bias control circuit 133 while signal UV_IN is coupled to both bias control circuits 161 and 167 because of the multiplexed nature of the U and V digital chrominance data in output signal UV_IN. Signal UV_SEL_IN is coupled to bias control circuits 161 and 167 to synchronize the operation of U and V bias control to the presence of U and V related data at the output of ADC 155. Signals CHARGE_Y, CHARGE_U, and CHARGE_V are coupled to respective inputs of amplifiers 113, 111, and 117 via resistors 123, 121, and 127, respectively. To briefly summarize the operation of the bias control circuits, each bias control circuit monitors the voltage at the input of the corresponding amplifier during a portion of the back porch interval. If the bias level is not a desired level, the bias voltage is increased (the input coupling capacitor is charged) or decreased (the input coupling capacitor is discharged). The decision to charge or discharge a particular capacitor is updated during a portion of each back porch interval as defined by a pulse on signal CLAMP_KEY. The timing relationship between the analog video signal and signal CLAMP_KEY is shown in Figure 2. Charging, or discharging, continues throughout each horizontal interval as shown by signal CHARGE_x in Figure 2. Signal CHARGE_x represents one of signals CHARGE_Y, CHARGE_U, or CHARGE_V in Figure 1. Signal CLAMP_KEY may be generated (not shown in the drawings) by, for example, counting cycles of a digital clock signal, such as signal CLOCK in Figure 1, at frequency f C . Frequency f C may be 1024 times the horizontal frequency fH where frequency fH for NTSC systems is approximately 15.6 kHz. As mentioned above, the back porch interval begins approximately 4.7 µs after the leading edge of horizontal sync (i.e. falling edge of SYNC pulse in Figure 2) and continues for 4.7 us. Based on a frequency fC of 1024 f H , a pulse on signal CLAMP_KEY that begins 96 cycles of signal CLOCK (approximately 6 us) after the leading edge of sync and continues for 32 cycles (approximately 2 us) will be within the back porch interval as desired. The operation of bias control circuits 163, 161, and 167 may be better understood by referring to Figure 3. The following description of Figure 3 will refer only to bias control circuit 163 and the luminance channel of Figure 1. However, the three bias control circuits operate in a similar manner. During the interval defined by each pulse on signal CLAMP_KEY, bias control circuit 163 compares the DC level at the input of amplifier 113 to a desired reference level. In Figure 3, the comparison is performed digitally by comparator 310. Signal CLAMP LEVEL coupled to the Q input of comparator 310 is a digital representation of the reference level, i.e. the desired clamp level. Signal VIDEO_IN coupled to the P input of comparator 310 represents the digital signal at an ADC output. For bias control circuit 163, signal VIDEO_IN represents digital signal Y_IN at the output of ADC 153. If comparator 310 is a typical digital comparator requiring unsigned binary inputs (i.e. a range of 0 to +2n) and the ADC output is in 2's complement format (i.e. a range of -n to +n), an inversion (not shown in Figure 3) of the most significant bit (MSB) of signal VIDEO_IN is required. As indicated in Figure 3, comparator 310 determines if the value at input P is greater than the value at input Q. Thus, if signal VIDEO_IN is greater than reference level CLAMP LEVEL, the output of the comparator is true (e.g. at logic 1) enabling 5-bit counter 330 via AND gate 320. Signal CLAMP_KEY START resets counter 330 is to a count of zero at the beginning of the interval defined by signal CLAMP_KEY. Signal CLAMP_KEY START provides a pulse indicating the start of the CLAMP_KEY pulse interval. Signal CLAMP_KEY START may be generated as shown in Figure 4. When enabled, counter 330 is clocked by signal CLOCK and, therefore, counts cycles of signal CLOCK. Thus, the output of counter 330 indicates the number of cycles of signal CLOCK following the beginning of the CLAMP_KEY pulse during which signal VIDEO_IN exceeds reference level CLAMP LEVEL. If the output of counter 330 reaches a count of 16 as indicated by the MSB of the counter output, counting is disabled via AND gate 320. The count value at the output of counter 330 is evaluated by comparator 340 which produces a true (e.g. logic 1) output when the count value is equal to or exceeds 16. At the end of the clamp key interval as indicated by signal CLAMP_KEY STOP, the comparator output (or the MSB of the count value) is latched into D-type flip-flop (DFF) 350. An approach to generating signal CLAMP_KEY STOP is shown in Figure 4. A logic 1 at the output of DFF 350 indicates that signal VIDEO_IN has exceeded the reference level for at least half of the CLAMP_KEY pulse (i.e. 16 out of 32 cycles of signal CLOCK during the CLAMP_KEY pulse). In response to a logic 1 at the output of DFF 350, signal CHARGE_x at the output of inverter 360 goes to logic 0 discharging the corresponding coupling capacitor in Figure 1, thereby decreasing the bias level. Similarly, a logic 0 at the output of DFF 350 indicates that signal VIDEO_IN is not greater than the reference level for at least one-half of the CLAMP_KEY pulse interval. A logic 0 at the output of DFF 350 causes signal CHARGE_x to go to logic 1 charging the corresponding coupling capacitor in Figure 1, thereby increasing the bias level. The effect of deciding whether to charge or discharge based on a count of at least 16 out of 32 is to filter the voltage at the clamping point during the sampling procedure using a median filter algorithm. A median filter algorithm advantageously decreases the likelihood that "shot" type noise in the video signal will affect the charge-discharge decision. In addition, as Figure 3 demonstrates, a median filter algorithm may be implemented with relatively few devices. Another aspect of the embodiment shown in Figure 3 is that charging, or discharging, may continue throughout each horizontal line interval as shown in Figure 2. The charge-discharge decision is updated only at the end of the CLAMP_KEY pulse interval when DFF 350 is clocked by signal CLAMP_KEY STOP. Thus, a particular charge-discharge decision remains in effect for a complete horizontal line interval. In addition, the output of inverter 360 is connected to signal CHARGE_x continuously. As as result, charge or discharge occurs continuously at a rate determined by the output impedance of inverter 360, the value R of resistor 123 (for the luminance channel), and the voltage on the coupling capacitor. Continuous charge or discharge advantageously eliminates the need for charge or discharge pulses that might introduce noise. Also, there is no need to decouple signal CHARGE_x from the charge-discharge source. Therefore, a simple inverter may be used for device 360 rather than a more complex tristate device. The preceding description and the embodiment shown in Figure 3 are applicable to each of bias control functions 163, 161, and 167 shown in Figure 1. However, less complex implementations of the functions in Figure 3 are also possible. For example, comparator 340 may be eliminated when the charge-discharge decision is based on the output of counter 330 reaching a number that is an integer power of two, e.g. 16 as described above. In Figure 3, the MSB of the output of counter 330 indicates when the count value is at least 16. Thus, the MSB of the counter output indicates the charge-discharge decision point and may be coupled directly to DFF 350 eliminating comparator 340. System design considerations may make it possible to further simplify the arrangement shown in Figure 3. For example, it may be desirable to clamp the bias level for the color difference channels, i.e. signals U_IN and V_IN, to the midpoint of the signal range. If ADC 155 produces a 2's complement output, the midrange value is 0. The MSB of the output of ADC 155 indicates whether the signal level is below midrange or at least equal to midrange. If the MSB value is logic 1, the signal level is less than midrange. If the MSB value is logic 0, the signal level is 0 or positive indicating that the signal level is at least midrange. Thus, comparator 310 in Figure 3 is not necessary because the MSB value indicates the relationship of signal level to the desired midrange level. The MSB of the output of ADC 155 may be inverted and coupled to an input of AND gate 320 to enable counter 330. If the output of ADC 155 is unsigned binary, the MSB of the ADC output provides a signal midrange indicator that can be directly coupled to AND gate 320 (i.e. no inversion) to enable counter 330. Various other modifications of the embodiment shown in the Figures and described above are possible. For example, the width of the CLAMP_KEY pulse may vary. If a different clock frequency is selected, 32 clock cycles would produce a different pulse width than that described above. Alternatively, it may be desirable to increase the number of clock cycles during the CLAMP_KEY pulse to increase the number of "samples" of the video signal level that may be counted during the CLAMP_KEY interval. An increased number of samples may enhance the performance of the median filtering algorithm. In addition, a count other than 16 may be used to determine whether charging or discharging will occur. For example, if the number of pulses during the CLAMP_KEY pulse is changed, the count limit might be changed to maintain the above-described relationship of one-half between the count limit and the total number of clock cycles during the CLAMP_KEY pulse. Also, the count limit could be modified to vary the relationship between the count limit and the total number of clock pulses, thereby modifying the filter algorithm. Another possible modification involves resistors 121-127 and capacitors 101-107 shown in Figure 1. If the source of signal CHARGE_x in Figure 3 is current driven rather than voltage driven as in Figure 3, resistors 121-127 are not required. As indicated in Figure 1, resistors 121-127 may be of equal value, e.g. 160 kΩ each. Similarly, capacitors 101-103 may be of equal value such as 10 µF each. System requirements may, however, require one or more resistance, or capacitance, values to differ. In addition to the preceding modifications, the present invention may be useful in systems other than video signal processing systems. In particular, the invention is not limited to applications involving three channels, each including a bias control function as shown in Figure 1. The described embodiment is well-suited for implementation in a signal processing integrated circuit, thereby further expanding the potential uses of the invention. As discussed above, using an approach other than the described continuous charge, or discharge, approach may add complexity, e.g. a tristate device, may be necessary in Figure 3. However, if adding a tristate device is not objectionable in a particular application, the charge and discharge timing may be modified such that charging or discharging occurs during a particular portion of a horizontal line interval rather than a complete line interval. For example, it may be desirable that charging or discharging occurs during an interval that extends into the active video interval but is less than a complete line interval.

Claims: Apparatus for clamping a signal level of a video signal, the video signal comprising a horizontal line interval having a first information interval (back porch) and a second information interval (active video), comprising: means for providing a signal (CLAMP_KEY) indicative of an evaluation interval during a portion of said first information interval ; means (310-340) responsive to said signal for evaluating, during said evaluation interval, a DC level of said video signal with respect to a desired DC level (CLAMP_LEVEL) and generating a control signal in response to said evaluation; and means (350, 360, 101, 103, 107), coupled to said evaluating means, for modifying said DC level of said video signal in response to said control signal, characterized in that said modifying means continuously modifies, during a portion of said second information interval, said DC level of said video signal to cause said DC level of said video signal to correspond to said desired DC level. The apparatus of claim 1, characterized in that said modifying means is adapted to continuously modify, until the occurrence of a next evaluation interval, said characteristic of said video signal to cause said relationship to become a desired relationship in response to said control signal. The apparatus of claim 1, characterized in that said modifying means includes a capacitor (101, 103, 107) having a first terminal coupled to receive said video signal and a second terminal coupled to said evaluating means. The apparatus of claim 3, characterized in that said modifying means continuously modifies said signal characteristic at a rate dependent on a capacitance value of said capacitor. The apparatus of claim 1, characterized in that said constant level interval corresponds to a portion of the back porch of said video signal. The apparatus of claim 1, characterized in that said modifying means continuously modifies a DC level of said video signal. The apparatus of claim 6, characterized in that said evaluating means includes: means (310) for generating a second control signal representative of said relationship between said DC level and a reference DC level; and means for filtering said second control signal including: a counter (330) responsive to said second control signal and said timing signal for generating a count representing the portion of said evaluation level interval during which said DC level of said input signal and said reference DC level exhibit a said relationship; and means (340) for evaluating said count. The apparatus of claim 7, characterized in that said means for generating said second control signal comprises a first comparator (310) for comparing said DC level to said reference DC level; said count evaluating means comprises a second comparator (340) for comparing said count to a predetermined count representative of a particular fraction of said first interval; and said means for continuously modifying comprises an amplifier (360) having an input coupled to said second comparator and an output coupled via a signal path to said second terminal of said capacitor. The apparatus of claim 7, characterized in that said filtering means comprises a filter having a median filter characteristic.

Inventors: CHRISTOPHER TODD J, ERSOZ NATHANIEL HALUK, ROMESBURG ERIC DOUGLAS, WALBY MARK DOUGLAS, CHRISTOPHER, TODD J., ERSOZ, NATHANIEL HALUK, ROMESBURG, ERIC DOUGLAS, WALBY, MARK DOUGLAS
Applicants: THOMSON CONSUMER ELECTRONICS, THOMSON CONSUMER ELECTRONICS, INC.
Application year: 1994
Main classification: H04N5
IPC codes: H04N5, H03M1, H04N9