US RE41399 E1
A technique to stabilize subcarrier generation in a line-locked digital video system, caused by simultaneous locking of the genlock device causing continuous changing of a shared clock signal, by calculating a time shift occurring in an output waveform, converting the time shift into an equivalent phase shift and sending a corresponding phase correction number to a waveform generator block to correct the time shift, and thus stabilize subcarrier generation.
1. A method of stabilizing chrominance subcarrier generation in a video signal comprising the steps:
a. calculating a time shift occurring in a video information signal of an output waveform;
b. converting the time shift into an equivalent phase shift; and
c. sending a phase correction number to a waveform generator block according to the equivalent phase shift.
2. The method according to
3. The method according to
a. calculating DELT, the amount of time the output waveform is shifted; and
b. calculating TAV, the average period of the output waveform.
4. The method according to
where B is the sum of a sequence of digital numbers outputted by a limiter and TAU is a delay of one delay element.
5. The method according to
where TAU is the delay of one delay element, F2 is the frequency control number from a subcarrier phase locked loop, Q is an average value of a clockout period and m is a number of bits stored in a register.
6. The method according to
where B is the sum of a sequence of digital numbers outputted by a limiter, F2 is the frequency control number from a subcarrier phase locked loop, Q is an average value of a clockout period, m is a number of bits stored in a register and Fracof is a fractional cycle shift.
7. The method according to
where k is the number of bits in a look up table, B is the sum of a sequence of digital numbers outputted by the limiter, F2 is the frequency control number from a subcarrier phase locked loop, Q is the average value of a clockout period, m is the number of bits stored in a register and Fracof is the fractional cycle shift.
8. The method according to
9. The method according to
10. An apparatus for stabilizing chrominance subcarrier generation in a video signal, the apparatus comprising:
a. a clock generator circuit;
b. a digital phase detector;
c. a digital loop filter wherein the digital loop filter includes a K1 path and a K2 path;
d. a waveform generator; and
e. a phase correction block,
wherein the K1 path outputsresponds to an integer portioninstantaneous value of a CLOCKOUT signaltime base error for a given line and the K2 path outputs a fractional portionan accumulated of the CLOCKOUT signala time base error.
11. The apparatus of
12. The apparatus of
a. an oscillator;
b. a phase accumulator logic block;
c. a multiplexor;
d. a phase comparator; and
e. a plurality of delay elements.
13. The clock generator circuit of
14. The clock generator circuit of
15. The clock generator circuit of
16. The clock generator circuit of
17. The clock generator circuit of
18. The clock generator circuit of
19. The clock generator circuit of
20. The clock generator circuit of
21. The clock generator circuit of
22. The digital loop filter of
a. a first scaler;
b. a first summer;
c. a first limiter;
d. a first register; and
e. an accumulator block.
23. The K2 path of
24. The K2 path of
25. The K2 path of
26. The K2 path of
27. The K2 path of
28. The K2 path of
29. The K2 path of
30. The K2 path of
31. The digital loop filter of
a. a second scaler;
b. a second limiter;
c. a second register;
d. a second summer; and
e. a third limiter.
32. The K1 path of
33. The K1 path of
34. The K1 path of
35. The K1 path of
36. The K1 path of
37. The K1 path of
38. The K1 path of
39. The digital loop filter of
40. The digital loop filter of
41. The digital loop filter of
42. The clock generator circuit of
43. The digital loop filter of
44. The apparatus of
45. The apparatus of
The present invention relates to the field of line-locked video systems. More particularly, the present invention relates to the field of correcting phase shift in a chrominance subcarrier caused by the system in the process of genlocking.
A line-locked video system is a digital system that acquires a line-by-line analog signal. An example of such a system would be a video decoder. Each line signal acquired by the system contains a synchronizing pulse and a “color burst,” neither of which carry information that is displayed on the screen. The synchronizing pulse is utilized so that a genlock PLL can locate the analog signal and lock onto it. The “color burst” is a series of eight cycles at the subcarrier frequency which appear in blanking intervals for synchronizing the television receiver to the chrominance signal. The display portion of the signal is transferred after both the synchronizing pulse and the “color burst” portion of the signal. Due to the continuous changing of the clock(CLK) signal from the genlocking step, disturbance is usually created in the chrominance subcarrier PLL which will result in a phase shift and consequently in color stripe artifact. A more detailed background description is set forth below.
The composite video signal contains information which is used by a video system to generate a video picture on a display, monitor or television. Each period, within the horizontal portion of a composite video signal contains information representing one horizontal output line which is to be output on the video display, monitor or television. Each horizontal period includes a horizontal synchronization pulse, a burst signal and a video information signal. In many video transmission systems, color or chrominance information is represented by a particular phase of the chrominance subcarrier signal that is amplitude modulated with color information. The horizontal synchronization pulse is used by a phase-locked loop to synchronize the system for displaying the next horizontal line of video information. The burst signal is used to synchronize the phase and frequency of a local oscillator to that of the encoding oscillator so that color information can be “decoded” into its baseband color differential components.
A video picture or frame is made up of a number of horizontal lines included within the video display. To display a video picture or frame the video system begins at the top of the screen and displays the information within the composite video signal one horizontal line at a time. The information for each horizontal line is contained within a horizontal period of the composite video signal. After each horizontal period, the video system moves to the next line and displays the information within the next horizontal period of the composite video system. This continues until the video system reaches the bottom line on the video display. After displaying the video information on the bottom line of the video display, the video system must reset itself to the top of the display in order to begin displaying the next frame. In order to allow the system to reset itself to the top of the video display, a vertical blanking period is included within the composite video signal after the video information for each frame. This vertical blanking period allows the video system to reset to the top of the video display and begin displaying the information for the horizontal lines of the next frame. Therefore, a number of horizontal periods, enough to comprise a frame or screen, are strung together, within the composite video signal. Between each frame, the composite video signal includes a vertical blanking period which allows the video system to perform a vertical reset and prepare to display the next frame by moving back up to the top of the video display.
In this type of system, a genlock PLL device is used to lock and align with the synchronizing pulse portion of the signal. In the receiver portion of this system, a chrominance subcarrier PLL is utilized to detect and lock onto the “color burst” portion of the analog signal. These two PLLs share a common CLK signal. When the genlock PLL locks and aligns the video signal, the CLK is adjusted accordingly. Because of this arrangement, the problem which is readily encountered is a phase shift disturbance of the SINE wave in the chrominance subcarrier PLL in the receiver. This disturbance is caused by the simultaneous locking of the genlock device, thereby causing continuous changing of the CLK signal.
The technique described in this patent application, to stabilize the chrominance subcarrier generation in a line-locked digital video system, includes several steps. This technique includes calculating a time shift occurring in an output waveform, converting that time shift into an equivalent phase shift and finally sending a phase correction number to a waveform generator block according to the equivalent phase shift.
First, the time shift in the output waveform is calculated. This is done by first calculating a DELT value which is representative of the amount of time the output waveform is shifted.
DELT is calculated by multiplying the sum of a sequence of digital numbers outputted by the limiter with the delay value of one delay element. This relationship is given by:
Secondly, the average period of the output waveform TAV is calculated. This relationship is given by:
The next step this technique implements is to convert the time shift to an equivalent phase shift of the output waveform or DELP. This relationship is given by:
The last step is to send a phase correction number, represented by PHQ to the waveform generator block according to the calculated value of DELP. This relationship is given by:
In the preferred embodiment of the present invention, the system shown in
In a line-locked system this is achieved by letting the genlock circuitry modulate the system clock until the video decoder 101, MPEG decoder 102 and the digital video encoder 104 are all lined-up with the analog source. Strictly speaking, locking of the encoder is usually done through the horizontal and vertical sync and locking of the decoder to the analog source is done by modulating the system clock. With a noisy analog video source such as a VCR, this lock-up process requires continuous adjustments as the time-base of the oncoming video changes. This requires the system clock to be sped up or slowed down as appropriate. The main problem with modulating the clock is in the chrominance subcarrier generation blocks which are used both inside the video decoder 101 and the digital video encoder 104. The one in the video decoder 101 locks up to the chrominance subcarrier of the received analog video to demodulate the high frequency chrominance into its base-band color difference signals.
The chrominance subcarrier generation block in the digital video encoder 104 does the opposite and modulates the base-band color difference signals into a high frequency chrominance signal. Almost universally, a Direct-Digital-Synthesis (DDS) approach (
However, the subcarrier PLL's are designed to have very small bandwidths in order to minimize jitter in the color subcarrier. Therefore, they can not correct color subcarrier phase shifts due to rapid changes in the analog video time base, such as in the case of VCR headswitches or tape wobbles. One potential solution to this problem will be to periodically reset the phase of the subcarrier. This will, however, require a reset signal with a very stable time basis. Since the unstable system clock can not be use, a separate crystal driven reset cirucitry will be needed, thus complicating the overall system.
An alternative embodiment is shown in
In the preferred embodiment of the present invention, the effect of system clock modulation on the phase of subcarrier generation is calculated and a phase correction term is applied to both the waveform generator block (DDS) inside the video decoder 101 and the one inside the digital video encoder 104. To track slowly varying time base errors, the frequency control number F2 from the subcarrier PLL inside of the video decoder 101 is also sent.
Also in the preferred embodiment of the present invention, the clock generator 206 and the waveform generator 216 may be located in separate integrated circuits.
In such instances, it is desirable to have a technique which will simplify the interface between the two chips and yet continue to remove any phase shifts caused in the output waveform due to the modulation of the CLOCKOUT as a result of time base variations in the video source 200. This new technique consists of accurately measuring, for each video line, the amount of phase distortion caused in the OUTPUT WAVEFORM as the time base of the video source 200 varies and sending once per video line a correction term which will undo this distortion. Since this correction term has to be sent at the low line rate and does not require synchronization to CLOCKOUT, it can be serialized in the serializer 219 and a single wire between the two chips can be used to serially transmit it once per video line.
In order to implement this new technique the architecture shown in FIG. 2 and
The oscillator 302 is preferably a crystal oscillator for ensuring accuracy and stability of the clock signal CLOCK IN and can include a divide-by circuit for reducing the frequency of the clock signal CLOCK IN from the crystal frequency. Therefore, the clock signal CLOCK IN has a precisely controlled frequency. The clock signal CLOCK IN is compared by the phase comparator 304 to the signal emerging from the last delay element 16. The phase comparator 304 simultaneously adjusts the delay of all the delay elements 1-16 such that the combined delay for all the delay elements 1-16 is equal to one cycle of the clock signal CLOCK IN. Therefore, each input D0-D15 of the multiplexor 306 has the same frequency as the clock signal CLOCK IN, but a unique phase. The last input D15 has the same phase as the clock signal CLOCK IN.
Because there are sixteen delay elements, sixteen different clock phase signals are available, however, a different number of delay elements can be utilized if desired. Further, if rising and trailing edges are both utilized, then thirty-two different clock phase signals are available.
The digital sequence generated by the digital phase detector 204 represents the time base error associated with a portion of the video signal corresponding to the sync pulse. For each sync pulse the associated error, i.e. the time difference between the actual sync location determined by the video source 200 and the expected sync location determined by the video timing generator 208, is processed in the loop filter and depending on the polarity of the error and the gains used in the loop filter (FIG. 4), the CLOCKOUT is sped up or slowed down for an appropriate amount of time. This reduces, and at steady state, eliminates the time base error between the video source 200 and the video timing generator 208. However, since the CLOCKOUT or some integer divisor of the CLOCKOUT is also used in the waveform generator 216 to synthesize the OUTPUT WAVEFORM, the amount of reduction DELT in the time base error achieved by modulating CLOCKOUT will also cause a shift in the OUTPUT WAVEFORM. In the case where video source 200 has large time base errors such as a VCR which can have microseconds of error at the beginning of each video field, the phase of the OUTPUT WAVEFORM, which is typically a sine wave with a constant frequency used to demodulate color information (in the case of a decoder) or modulate it (in the case of an encoder), will be randomized. In other words, as the time base errors are corrected, the color shifts will occur, especially at the top of the screen. Similar color shifts will also occur if the genlock circuitry modulates the system clock to track VCR wobbles.
The loop filter shown in
Assuming a 16 element ring oscillator driven by a stable external oscillator 302 as shown in FIG. 3 and using 16 phases available, the average period of CLOCKOUT is given by:
The number of taps used in the ring oscillator determines the phase granularity of the resulting CLOCKOUT. More taps will give a CLOCKOUT with less jitter. Formula (1) above must be modified appropriately for a ring oscillator using more taps. In one embodiment, FCLKIN=50.625 MHz. This gives TCKLIN=19.75 Ns, TAU=600 Ps. The nominal value for Q=2.00, which gives the nominal FCLOCKOUT=54 MHz.
In contrast to the K2 path which has memory and holds a representation of the average value of CLOCKOUT, the K1 path which consists of 408, 415, 409, 410 and 411 has no memory and responds to the instantaneous value of the time base error for a given line. For each video line, the time base error from the digital phase detector 204 is scaled through multiplication with a constant K1. The output of the multiplier is limited at limiter 415 such that the amount of time base error that the K1 path acts on is restricted to a value which can be corrected in one video line. The resulting number B is loaded into a register 409. Then, for each CLOCKOUT the output of the register 409 is limited at the limiter 410 to +/−L, the unlimited output is subtracted from the limited output and the result at the output of 411 is reloaded into register 409. This process continues until the output of 409 becomes less than +/−L. Thus, the sequence of digital numbers at the output of the limiter 410 will consist of an appropriate number of +/−L's and a last number whose absolute value is less than L such that the sum of all numbers in the sequence adds up to B (e.g., for B=11 and L=2, the sequence will be 2, 2, 2, 2, 2, 1, 0, 0, 0 . . . ). The output of the limiter 410 is added to the upper bits of Q and the overflow bit OB at the adder 407. The result of the addition after being limited at the limiter 412 to prevent underflow is applied to the phase accumulator which consists of adder 413 and the register 414. The output of register 414 goes to the ring oscillator and chooses one of the 16 available phases. The limit L is chosen to be the nominal value of the integer part of Q. Therefore, in our implementation, L=2. This means that for L=0, the CLOCKOUT is at its nominal frequency. For L=2, CLOCKOUT will be running approximately 6% faster and for L=−2, it will be running approximately 6% slower.
Each number x in the digital sequence at the output of the limiter 410 will cause the phase accumulator to choose a tap which is x ahead (if x>0) or −x behind (if x<0) of what would have been normally chosen. Since a jump of x taps corresponds to a time shift of x*TAU, the total time shift caused by the K1 path will simply be DELT=B*TAU. In the current embodiment, the polarities are adjusted so that B>0 if the sync pulse from the video source 200 comes sooner than expected and B<0 if the sync pulse comes later than expected. In the former case, the loop filter will cause the CLOCKOUT to speed up and in the latter case it will cause it to slow down. The effect of this speeding up and slowing down of the CLOCKOUT will be to advance or delay the whole constellation of pulses generated by the video timing generator 208 and in particular the sync pulse by an amount DELT so that the video source 200 and the video timing generator 208 can be aligned. For a given timing error on a video line, DELT will depend both on the K1 and K2 paths. However to maintain loop stability, K1/K2 ratio is chosen to be very large (larger than 216). That means that the effect of K2 path can be to a great extent ignored and the time base correction DELT introduced by the digital loop filter will be determined by the K1 path, i.e. mathematically:
Time base correction will be performed in the appropriate direction as long as the numbers in the digital sequence at the output of the limiter 410 are non-zero. In one video line, depending on the video standard there will be a nominal number NN of CLOCKOUT pulses. Since for each CLOCKOUT, there can be a time base correction of L*TAU, the maximum time base correction in one line will be given as NN*L*TAU. For example, in case of NTSC and CLOCKOUT nominally at 54 MHz, the number of CLOCKOUT's per line will be NN=858*4=3432. Thus, with L=2 and TAU=600 ps, the maximum time base correction which can be achieved from the K1 path will be 3432*2*600 ps=4.2 us. This limitation is of no serious consequence, since even a very severe head-switch of 12 us can be compensated for in only three lines.
Thus, to ensure the validity of equation (2) above, the limiter 415 must be designed such that its output B is always less than NN*L.
Also in the preferred embodiment, the DDS is shown in FIG. 5. The frequency number F2 is applied to the first input of an adder 501. The output of the adder is coupled to a register 502. This register is clocked by the signal CLOCKOUT. Contents of the register are coupled to the 2nd input of the adder 501. Therefore the value of the signal F2 is accumulated over time in register 502 at the rate determined by the signal CLOCKOUT. This generates a series of values in the register 502 representative of a time base for the periodic signal relative to the signal CLOCKOUT. Note that the adder 501 is allowed to overflow and therefore the series of values stored in register 502 are coupled to a Look-up Table (LUT) to transform this periodic sawtooth waveform into a sinusoid wave. The number of bits m stored in register 502 determines the precision of the average period while the number of bits k in the LUT determines the phase precision in each clock cycle. The average period (TAV) of the OUTPUT WAVEFORM is thus given by:
As can be seen in formula (3), the OUTPUT WAVEFORM period and frequency is a direct function of TCLOCKOUT. As explained above, for a given video line, the difference in the actual sync location and the expected sync location will create an error signal at the output of digital phase detector 204. This error signal is applied to the digital loop filter 214 and causes the signal CLOCKOUT to be sped up or slowed downed. As a result, all of the pulses generated by the video timing generator 208 are delayed or advanced by an amount DELT depending on the polarity of the error signal. Since CLOCKOUT is also used in the waveform generator 216, the OUTPUT WAVEFORM will also be shifted in time domain by an amount equal to DELT.
Again, the amount of time DELT the OUTPUT WAVEFORM is shifted is given by Formula (2). Combining Formulas (3) and (1) will produce:
Since one full cycle corresponds to 360 degrees of phase shift which is indistinguishable from no phase shift, the effective number of subcarrier cycles shifted is given by the fractional part of NOFSC. For example, for DELT=1.5 us and TAV=279 ns, DELT/TAV=5.37 and the effective number of cycles shifted is 0.37.
Since one period TAV of the output waveform corresponds to 360 degrees, a fractional cycle shift will correspond to a phase shift DELP, given as:
It is possible to correct for DELP by sending a correction term PHQ with the required resolution. Since the inherent phase resolution in the OUTPUT WAVEFORM is determined by k (number of bits in LUT), the current embodiment uses k bits of accuracy in the correction term PHQ. Note that theoretically up to m bits of accuracy is possible.
First, the waveform generator 216 is modified as in FIG. 6. The correction term is calculated by observing the fact that a PHQ of 2k added through 602 for one CLOCKOUT cycle will shift the OUTPUT WAVEFORM phase by 360 degrees. Hence, to undo a phase shift of DELP, one can send a correction therm PHQ which will shift the OUTPUT WAVEFORM by −DELP. Then,
A possible implementation of the correction term PHQ is done in the phase correction block in FIG. 7. If the result of the division at the output of 705 is expressed in binary, the first k-bits before the decimal point will form PHQ. Since the PHQ term will have to be calculated only once per video line, the multipliers and divider shown in
It will be readily apparent to one skilled in the art that other various modifications may be made to the preferred embodiment without departing from the spirit and scope of the invention as defined by the appended claims.