1. Field of the Invention
The present invention relates generally to audio/video (AV) systems, and more specifically, to a method and system for maintaining an ideal frequency ratio between numerically-controlled frequency sources.
2. Background of the Invention
Numerically controlled oscillators and other digital phase/frequency timebases are increasingly used in digital circuits that receive, generate and transform data to and from analog devices. In particular, the above-incorporated patent applications describe video and audio systems and circuits that sample input signals and transform them to the digital domain.
When two or more information streams are to be synchronized to numerically-generated timebases, the finite expression of the number controlling each timebase produces an error between an ideal relationship of the frequencies of the timebases and the actual frequencies of the timebases as controlled by the input numbers. In the above-incorporated patent applications, techniques are described for generating timebase information and/or synchronization signals from numbers representing ratios between a local precision reference oscillator frequency and a known or detected input information reference frequency and also from ratios between various desired output frequencies and the input information frequencies.
When two or more timebase or clock signal outputs are generated in such a scheme, for example in the audio/video synchronizing embodiment described in the above incorporated application entitled “METHOD AND SYSTEM FOR VIDEO-SYNCHRONOUS AUDIO CLOCK GENERATION FROM AN ASYNCHRONOUSLY SAMPLED VIDEO SIGNAL”, long-term error between the generated audio clock or timebase and the generated video clock or timebase occurs due to the finite expression of the audio ratio and the video ratio numbers. There are two sources of finite expression error present in the described circuits: 1) The generated video synchronization reference is only as accurate as the video expression number will permit; and 2) The audio synchronization reference is not generated from the actual generated video synchronization reference and further is only as accurate as the audio ratio precision permits. Although these errors are small if the number of bits used to represent the ratios is sufficiently high, over long periods of time, synchronization drift will still occur between the sampled video and the sampled audio.
Therefore, it would be desirable to provide a method and system for maintaining an ideal ratio between numerically-controlled frequency sources so that long-term drift between the frequency sources can be eliminated.
The above stated objectives are achieved in a method and apparatus for maintaining a generated synchronization reference in an ideal ratiometric relationship with another generated synchronization reference.
A first synchronization reference is generated from a first ratio between a reference clock frequency and a first clock frequency and a second synchronization reference is generated from a second ratio between the reference clock frequency and a second clock frequency. A dynamic frequency correction factor is computed by comparing the frequency of the first synchronization reference to the frequency of the second synchronization reference via a rational frequency comparator. The dynamic frequency correction factor is applied to generation of the second synchronization reference to correct the frequency of the second synchronization reference so that an ideal rational relationship between the frequencies of the generated first and second synchronization references is maintained.
The dynamic frequency correction factor can be a dither factor that provides for preservation of the ideal ratio between the first and second references over a long-term average, or may provide a precision correction factor that stabilizes around a fixed value.
The foregoing and other objectives, features, and advantages of the invention will be apparent from the following, more particular, description of the preferred embodiment of the invention, as illustrated in the accompanying drawings.
The present invention encompasses a method and apparatus for maintaining an ideal rational frequency relationship between two numerically generated synchronization sources, even though the numeric control values cannot express the ideal rational relationship. The method and apparatus adjust the frequency of a given one of the synchronization sources in conformity with a ratiometric frequency comparison of the outputs of the synchronization sources to the desired ideal ratio. The action of the method and apparatus compensate the frequency of the given synchronization source not only for error in the finite expression of the number controlling its frequency, but also for error in the other synchronization source frequency due to finite expression of the other frequency control number. The result is is that the present invention forces the long-term average frequency of the controlled synchronization source to be in ideal rational relationship with the actual frequency generated by the other synchronization source. Finite expression error is that error due to the finite number of bits used to express a binary number. In the present application, finite expression error is caused by error in a rational ratio between the frequencies two synchronization references that cannot be expressed in the number of bits employed to control the ratiometric synthesis of the synchronization source frequencies. Some ratios, e.g. 3/5, cannot be expressed completely in any number of bits. The “ideal ratio” as used herein, refers to the exact relationship desired between the synchronization sources, e.g., the actual audio to video synchronization frequency ratio embedded in a composite audio-video source.
The present invention is applicable any time that phase coherence and/or an exact frequency ratio needs to be maintained between two numerically-controlled frequency sources. However, the exemplary embodiments depicted herein are directed toward circuits and methods that produce a reference audio clock for sampling an audio signal. The reference audio clock is synchronized to a video source clock signal that has an ideal rational frequency relationship with the audio clock. The frequency of the reference audio clock is adjusted to maintain the ideal frequency ratio. However, the video clock could be adjusted for other applications by applying a frequency correction determined in accordance with an alternative embodiment of the present invention.
Referring now to
MPEG-3 encoder 14 receives the sampled digital video produced by video sampling subsystem 10, which may be wide data or a serial digital interface such as DV-I. MPEG-3 encoder 14 bundles the received digital audio and video into an encoded and compressed file stream for storage by DVD-R writer 16.
Referring now to
Adder 27 receives a number constituting a video factor that is added to the output of loop filter 26 to generate a frequency offset. The video factor is determined from the known difference between the video source frequency and the sampling frequency and may be adjusted programmatically to adapt to various video rates.
The output of adder 27 is a slowly-varying or essentially constant number corresponding to the ratio between the sampling clock rate and the video clock rate, labeled “video ratio”. The video ratio is multiplied by a known factor (constant) representing the ratio of the video clock frequency to the desired reference audio clock frequency by a multiplier 44. The resulting “audio” ratio is the ratio between the sampling clock frequency and the desired reference audio clock rate and the audio ratio is supplied to a reference audio clock generator 42 that produces the reference audio clock. (The reference audio clock frequency will generally be a multiple of the actual audio data sample rate used by ADC 18.) A ratiometric frequency comparator 40 compares the frequencies of reference audio clock generator 42 and video clock generator 28 and adjusts the frequency of reference audio clock generator 42 to maintain a long-term average value of the ideal frequency ratio between the reference audio clock and the video line-locked clock. As the frequency difference is generally very small, it is not necessary to stabilize the reference audio clock frequency for some applications. In those applications, rational frequency comparator 40 may provide a dynamically changing frequency adjustment to dither the reference audio clock frequency around its ideal value with respect to the generated video line-locked clock. Alternatively, for applications requiring an extremely stable reference audio clock frequency, filtering may be employed and the dynamic frequency correction factor made to stabilize around a fixed frequency.
Loop filter 26 receives a line clock signal derived from other processing circuits that is synchronous with the video source line frequency. The line clock signal is used to synchronize the processing in the loop filter to avoid aliasing error that would occur through phase detector 22 due to the difference between the source video sync rate and the sync rate as sampled and appear as a “beat frequency” at the output of loop filter 26. Such beat frequencies can approach DC values and therefore are eliminated rather than filtered.
The video ratio is provided to an inverse function block 33 that generates a numeric output functionally inverse to the video ratio and therefore corresponding to a second ratio of the video source line rate to the sampling clock frequency. The second (inverted) ratio provides an input to a second NCO 36 through multiplexer 35. NCO 36 generates a number (a) that controls a sample rate converter (SRC) 30 by adjusting coefficients of an interpolation filter. The second NCO 36 output is further supplied as feedback to an adder 29 that combines the inverse ratio from inverse function block 33 in combination with the output of NCO 36 to provide the input to NCO 36, when multiplexer 35 is in its normal operating state. The select input of multiplexer 35 is pulsed at the start of each line (or frame or field if the ratio is based on the frame or field) and causes a start fraction value to be loaded into NCO 36 at the beginning of each video sync interval. The start fraction is a value dependent on the sync rate of the incoming video and the desired output sync rate, which is obtained by latching a remainder value out of phase detector 22 via a latch 37. The feedback through adder 29 causes NCO 36 to generate a linearly varying progressive phase number a that is used by SRC 30 to interpolate digital video samples received from ADC 20 and stored in FIFO 32 to be synchronized with the new line rate.
While the above described circuits use a digital NCO 24 and a digital phase detector 22 that receives a waveform representation (generally parallel binary data that represents a ramp signal integrator output for phase-locking with the filtered input video sync data, which is also parallel digital data), other circuit embodiments, both digital and analog are contemplated by the present invention. In particular, NCO 24 may generate an actual signal waveform that is phase compared with either a digital or analog filtered sync signal and NCO may be replaced with a voltage-controlled oscillator (VCO) with an appropriate analog loop filter and analog adders/multipliers, or portions of the above-circuits may be implemented in analog circuits with appropriate A/D or D/A converters between disparate blocks. Also, a digital timebase input to phase detector 22 may be any digital representation of phase, which may be a parallel multi-bit number representing an absolute phase ramp (phase/time ramp) or other numeric indicator of the phase and frequency, such as numbers indicating an edge position and pulse width, etc.
Similarly, embodiments of the present invention may or may not generate an actual clock signal from the respective numerically-controlled oscillators (in the exemplary embodiment video clock generator 28 and reference audio clock generator 42), as long as the output of the respective numerically controlled oscillators can provide a phase and frequency reference. For example, in sample rate converter (SRC) applications where the audio input data is already in a digital format, the SRC input reference clock may be digital numeric data corresponding to a video-synchronized reference audio clock signal, but may require no actual reference audio clock signal to operate, as the converter may use the numeric audio reference clock data to operate interpolators and the SRC circuitry may be “clocked” by the sampling clock instead. Similarly, video clock generator 28 may not need to generate an actual clock waveform output, as rational frequency comparator 40 and other processing blocks may be designed to receive a numeric indication of phase.
Referring now to
Referring now to
While
Referring now to
A loop filter 66 provides the voltage control input to VCO 68 to close the loop, and a divider 69 reduces the output rate of VCO 68 to that of the desired reference audio clock frequency. The dynamic frequency correction factor, which may be a single bit, a multi-bit number or an analog signal is provided to reference audio clock generator 42 in order to adjust the long-term average of reference audio clock to be in ideal ratiometric relationship with the video line-locked clock. Generally the frequency correction factor will be supplied to fractional divider 64 or applied to the incoming ratio by an adder (illustrated as the +/− introduction of the dynamic frequency correction factor to the audio ratio input) to provide one or more additional bits of resolution to the ratio. However, as noted above, the correction does not have to be applied as a “fine adjustment” to the ratio, but may rather be a dithered “coarse” adjustment of frequency that maintains the long-term average frequency ratio at its ideal value.
The dashed lines connecting the dynamic frequency correction factor to various blocks within reference audio clock generator 42A illustrate various points at which a frequency control or dithered frequency shift could be introduced in the loop that controls VCO 68 and may include shifting the VCO 68 control voltage and adding or subtracting an offset within loop filter 66, in response to the detected deviation of the frequency ratio from the ideal. As explained above, any mechanism that permits dithering of the output frequency of VCO 68 around the ideal reference audio clock frequency value, as determined in ratio with the video line-locked clock, may be employed, as well as any mechanism that adjusts the frequency of VCO 68 to a stable ideal value.
Referring now to
Whether dithering, or adjustment via filtering or other means that provides a stable single frequency of the source being frequency controlled by the action of the present invention, the goal is that the long-term average of the frequency of the controlled frequency source is maintained in a prescribed “ideal” ratio to the other frequency source. While the exact period of averaging is particular to a specific application of the invention, in general with respect to audio and video sources, the average should be maintained so that no noticeable drift between the audio and the video content may be observed.
While the invention has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form, and details may be made therein without departing from the spirit and scope of the invention.
This application is related to U.S. provisional application Ser. No. 60/618,303, filed Oct. 13, 2004 and from which it claims benefits under 35 U.S.C. §119(e). The present application is also related to the following U.S. patent applications: “INVERSE TRACKING OVER TWO DIFFERENT CLOCK DOMAINS” Ser. No. 10/964,556, filed Oct. 13, 2004; and “METHOD AND SYSTEM FOR SYNCHRONIZING VIDEO INFORMATION DERIVED FROM AN ASYNCHRONOUSLY SAMPLED VIDEO SIGNAL”, Ser. No. 11/082,346, filed Mar. 13, 2005; and “METHOD AND SYSTEM FOR VIDEO-SYNCHRONOUS AUDIO CLOCK GENERATION FROM AN ASYNCHRONOUSLY SAMPLED VIDEO SIGNAL” Ser. No. 11/082,347, filed Mar. 13, 2005. Each of the above-referenced patent applications has at least one inventor in common with the present application and are assigned to the same assignee. The specifications and drawings of each of the above-referenced patent applications are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
4689664 | Moring et al. | Aug 1987 | A |
5212690 | Low | May 1993 | A |
5422917 | Scott | Jun 1995 | A |
5739762 | Kuramatsu et al. | Apr 1998 | A |
6028900 | Taura et al. | Feb 2000 | A |
6148051 | Fujimori et al. | Nov 2000 | A |
6208671 | Paulos et al. | Mar 2001 | B1 |
6489901 | Venkitachalam et al. | Dec 2002 | B1 |
6642863 | Venkitachalam et al. | Nov 2003 | B1 |
Number | Date | Country | |
---|---|---|---|
60618303 | Oct 2004 | US |