A method and apparatus for automatic gain control of chrominance in a composite video signal
By detecting the color difference component reference value and phase deviation of the chrominance signal and dynamically adjusting the chrominance gain, the problem of unstable amplitude of the chrominance signal during long-distance transmission is solved, and the stability of the chrominance signal and the improvement of video quality are achieved.
Patent Information
- Application Number
- CN202510932993.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing video signal processing or transmission technologies lack an effective mechanism to automatically detect the chroma amplitude state and dynamically adjust the gain, resulting in unstable amplitude of the chroma signal during long-distance transmission, affecting image or video quality.
By obtaining the color difference component reference value of the chrominance signal, calculating the chrominance phase deviation and gain error, generating a phase lock mark, and dynamically adjusting the chrominance gain using closed-loop control to stabilize the chrominance signal amplitude.
It achieves the stability of the chrominance signal amplitude within a certain range, reduces the impact of noise, reduces the chrominance difference between lines and frames, and improves the quality of video signal transmission.
Smart Images

Figure CN120434367B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing, and in particular to a chroma automatic gain control method and device for a composite video signal. Background Art
[0002] In the field of video signal processing and transmission, the stability of chrominance signal amplitude is crucial for ensuring image or video quality. However, in practical applications, chrominance signal amplitude is often affected by a variety of unfavorable factors. First, during signal transmission, noise inevitably superimposes on the chrominance signal, causing chrominance amplitude fluctuations. This in turn causes chrominance differences between lines and frames, severely impacting the viewing experience. Second, when signals are transmitted over long distances, signal attenuation is significant due to factors such as cable length and impedance mismatch, resulting in a decrease in chrominance signal amplitude. This results in inconsistent chrominance in the received image or video at different transmission distances, reducing overall system performance.
[0003] In summary, most existing video signal processing or transmission technologies lack an effective mechanism to automatically detect the current chroma amplitude state and dynamically adjust the chroma signal gain based on the detection results to overcome problems such as noise interference and signal attenuation. It is difficult to ensure that the chroma amplitude is always stable within an appropriate range, and thus cannot meet the needs of high-quality video signal processing and transmission. Summary of the Invention
[0004] The purpose of the present invention is to provide a chroma automatic gain control method for a composite video signal to solve the problem in the prior art that the chroma signal amplitude is attenuated due to long-distance transmission of the composite video signal, and the image color is degraded, resulting in poor chroma amplitude consistency and distortion under different transmission distances.
[0005] To achieve the above objectives, this application adopts the following technical solutions:
[0006] The present invention provides a method for automatic chrominance gain control of a composite video signal, comprising the following steps:
[0007] Acquire a chroma signal adjusted by a historical chroma gain parameter, and demodulate a color difference component reference value of a color synchronization signal from the chroma signal adjusted by the historical chroma gain parameter;
[0008] Calculate the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value;
[0009] In response to the chroma phase deviation meeting a preset chroma phase lock condition, generating a chroma phase lock flag, and calculating a chroma gain error according to the actual color burst level;
[0010] A chroma gain control stability flag is determined according to the chroma gain error, and an output chroma gain parameter is determined based on the chroma gain control stability flag, the chroma phase lock flag and the chroma gain error to dynamically adjust the next line gain through closed-loop control.
[0011] Preferably, the color difference component reference value of the color synchronization signal includes a color difference U component reference value and a color difference V component reference value.
[0012] Preferably, the calculating the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value includes:
[0013] Starting from a position M samples away from the falling edge of the horizontal synchronization, the color difference U component reference value and the color difference V component reference value of N samples are continuously taken and accumulated to obtain the integrated chroma U component level value and the integrated chroma V component level value of the current horizontal color burst signal, where M and N are both integers greater than 1;
[0014] Taking the absolute value of the integrated chroma U component level, dividing it by N, and rounding it off to obtain an actual color burst level;
[0015] The integrated chroma U component level value and the integrated chroma V component level value are added to obtain a chroma phase deviation between the input color subcarrier and the local color subcarrier.
[0016] Preferably, generating a chroma phase lock flag and calculating a chroma gain error according to the actual color burst level comprises:
[0017] Setting a first counter, configuring an initial value of the first counter and using it;
[0018] updating a first counter value according to a chroma phase lock threshold and the chroma phase deviation;
[0019] If the updated first counter value is greater than or equal to 0, the chroma phase lock flag is 1, and the preset standard color synchronization level is subtracted from the actual color synchronization level to obtain the chroma gain error; otherwise, the chroma phase lock flag is 0 and the chroma gain error is 0.
[0020] Preferably, the determining of a chroma gain control stability flag according to the chroma gain error comprises:
[0021] When the chroma phase lock flag is 1, setting a second counter, configuring an initial value of the second counter and using it;
[0022] updating a second counter value according to a chroma gain allowable error threshold and the chroma gain error;
[0023] If the updated second counter value is greater than or equal to 0, the chroma gain control stability flag is 1; otherwise, the chroma gain control stability flag is 0.
[0024] Preferably, the output chroma gain parameter is determined based on the chroma gain control stability flag, the chroma phase lock flag, and the chroma gain error, including:
[0025] When the chroma phase lock flag is 1 and the chroma gain control stability flag is 0, a gain change is determined according to the chroma gain adjustment step size and the chroma gain error, and the gain change is added to the chroma gain parameter of the previous row to obtain the chroma gain parameter of the current row output; otherwise, the chroma gain parameter of the current row is equal to the chroma gain parameter of the previous row.
[0026] Preferably, the determining the gain variation according to the chroma gain adjustment step size and the chroma gain error comprises:
[0027] When the chroma gain error is greater than the chroma gain adjustment step, the gain variation is equal to the chroma gain adjustment step;
[0028] When the chroma gain error is less than the negative value of the chroma gain adjustment step, the gain variation is equal to the negative value of the chroma gain adjustment step;
[0029] Otherwise, the gain change is equal to the chroma gain error.
[0030] A chroma automatic gain control device for a composite video signal, comprising:
[0031] A pre-processing module, configured to obtain a chroma signal adjusted by a historical chroma gain parameter, and demodulate a color difference component reference value of a color synchronization signal from the chroma signal adjusted by the historical chroma gain parameter;
[0032] A first calculation module is used to calculate the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value;
[0033] a second calculation module, configured to generate a chroma phase lock flag in response to the chroma phase deviation meeting a preset phase lock condition, and calculate a chroma gain error according to the actual color burst level;
[0034] An output module is used to determine a chroma gain control stability flag according to the chroma gain error, and to determine an output chroma gain parameter based on the chroma gain control stability flag, the chroma phase lock flag and the chroma gain error, so as to dynamically adjust the gain of the next line through closed-loop control.
[0035] An electronic device includes a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a chrominance automatic gain control method for a composite video signal as described in any one of the above.
[0036] A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to implement any one of the above-mentioned chrominance automatic gain control methods for a composite video signal when executed.
[0037] The present invention has the following beneficial effects:
[0038] The present invention automatically detects the current chroma amplitude state based on the current color synchronization signal amplitude, and then adjusts the chroma signal gain to stabilize the chroma signal amplitude within a certain range, reducing the impact of noise and minimizing the chroma difference between lines and frames. At the same time, it reduces the impact of long-distance cable transmission on the composite video chroma signal and reduces the chroma difference at different transmission distances. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 This is a flow chart of a chroma automatic gain control method for a composite video signal provided by an embodiment of the present application;
[0041] Figure 2 1 is a schematic structural diagram of a chroma automatic gain control device for a composite video signal provided in an embodiment of the present application;
[0042] Figure 3 It is a schematic diagram of an electronic device for implementing a chroma automatic gain control method for a composite video signal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] To make the technical solution of the present application clearer, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. The terms "first", "second", etc. in the claims and description of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate. This is merely a way of distinguishing objects of the same attributes when describing the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product, or device comprising a series of units is not necessarily limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0044] Example 1
[0045] like Figure 1 As shown, this embodiment provides a chroma automatic gain control method for a composite video signal, comprising the following steps:
[0046] S110, acquiring a chroma signal adjusted by a historical chroma gain parameter, and demodulating a color difference component reference value of a color synchronization signal from the chroma signal adjusted by the historical chroma gain parameter;
[0047] S120, calculating the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value;
[0048] S130, in response to the chroma phase deviation meeting the preset chroma phase lock condition, generating a chroma phase lock flag, and calculating a chroma gain error according to an actual color burst level;
[0049] S140 , determining a chroma gain control stability flag according to the chroma gain error, and determining a target chroma gain parameter based on the chroma gain control stability flag, the chroma phase lock flag, and the chroma gain error, so as to dynamically adjust the gain of the next line through closed-loop control.
[0050] In this embodiment, the input is actually the original chrominance signal C in , get the original chrominance signal C in After that, the amplitude of the chroma signal C is adjusted using the historical chroma gain parameter gain_C, thereby obtaining the chroma signal C adjusted by the historical chroma gain parameter. The historical chroma gain parameter is obtained by processing the previous line of video frames. Assuming that the historical chroma gain parameter is 1024, which means that the amplitude is neither amplified nor reduced, then:
[0051] ,
[0052] Among them, round() means rounding the value in the brackets to the nearest integer.
[0053] Chroma demodulation is then performed on the chroma signal C, which has been adjusted by the historical chroma gain parameter. Specifically, C is first demodulated according to the principle of quadrature amplitude modulation and demodulation. C is obtained by quadrature amplitude modulation of the image's chroma component signals U and V. C is first multiplied by the local color subcarriers sin and cos, respectively. The resulting signals are then filtered using a low-pass filter and a mean filter to remove high-frequency harmonics. Finally, the low-pass filter is used to obtain the color difference U and color difference V component signals, denoted as U and V, respectively. The mean filter is used to obtain the color difference component reference values of the color burst signal, namely the color difference U component reference value and the color difference V component reference value, denoted as U0 and V0, respectively. It should be noted that the lengths of the low-pass filter and the mean filter are adjustable. In this embodiment, both are 31 mm long.
[0054] Furthermore, calculating the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value includes:
[0055] Starting from a position M samples away from the falling edge of the horizontal synchronization, the color difference U component reference value and the color difference V component reference value of N samples are continuously taken and accumulated to obtain the integrated chroma U component level value and the integrated chroma V component level value of the current horizontal color burst signal, where M and N are both integers greater than 1;
[0056] Take the absolute value of the integrated chroma U component level, divide it by N, and round it off to get the actual color burst level;
[0057] The integrated chroma U component level value and the integrated chroma V component level value are added to obtain the chroma phase deviation between the input color subcarrier and the local color subcarrier.
[0058] Next, starting from a position M samples away from the falling edge of the horizontal synchronization, the color difference U component reference value and the color difference V component reference value of the color burst signal are continuously taken for N samples and accumulated. The accumulated values are then used as the integrated chroma U component level value and the integrated chroma V component level value of the current horizontal color burst signal, respectively denoted as val_U and val_V, where M and N are both integers greater than 1. In this embodiment, M is replaced by csyn_st. The values of csyn_st and N can be adjusted according to actual needs, but the value of csyn_st must ensure that the interval [csyn_st, csyn_st+N-1] corresponds to the color burst signal interval of the signal to ensure that the obtained val_U and val_V are correct color burst levels. The accumulation formula is as follows:
[0059] ,
[0060] ,
[0061] Among them, i is the signal row counting coordinate, its value is reset to zero at the falling edge of the row synchronization, and U0(i) and V0(i) represent the signal values corresponding to U0 and V0 when the row coordinate is i.
[0062] Then take the absolute value of val_U, divide it by N and round it off to get the actual color burst level csyn_val, where the calculation formula is as follows:
[0063] .
[0064] Since val_U is the result of the accumulation of N color burst reference values, dividing it by N is the calculation of the average color burst level of N points. This method can ensure that the obtained color burst level csyn_val is not affected by noise. Moreover, because it represents the average level of the color burst level rather than the instantaneous value affected by noise, it can improve the noise resistance of the system.
[0065] At the same time, the chrominance phase deviation between the color subcarrier in input C and the local color subcarrier is calculated based on val_U and val_V of the color burst signal, and is recorded as phiC, where phiC=val_U+val_V.
[0066] Furthermore, a chroma phase lock flag is generated, and a chroma gain error is calculated according to an actual color burst level, including:
[0067] Set a first counter, configure an initial value of the first counter and use it;
[0068] updating a first counter value according to a chroma phase lock threshold and a chroma phase deviation;
[0069] If the updated first counter value is greater than or equal to 0, the chroma phase lock flag is 1, and the preset standard color burst level is subtracted from the actual color burst level to obtain the chroma gain error; otherwise, the chroma phase lock flag is 0 and the chroma gain error is 0.
[0070] A counter is used as the first counter, and its initial value is set to -cntlimit. The first counter value is recorded as cnt. The first counter is used to generate the chroma phase lock flag chroma_lck, and cnt is updated according to the chroma phase deviation phiC in the following manner:
[0071] ,
[0072] Among them, cnt prev is the value of cnt in the previous row, and err_th is the chroma phase lock threshold, which can be configured as needed.
[0073] Then, a chroma phase lock flag is generated based on the updated cnt value, denoted as chroma_lck. If the updated cnt value is greater than or equal to 0, the chroma phase lock flag is set to 1, otherwise the chroma phase lock flag is set to 0. At this time, the chroma gain error is 0. When the chroma phase lock flag is 1, it means that the phase of the color subcarrier in the input C is close to the phase of the local color subcarrier, and the chroma phase is locked. The chroma phase lock flag expression is as follows:
[0074] .
[0075] At the same time, when the chroma phase lock flag chroma_lck=1, the standard synchronization level std_synC is subtracted from the actual color synchronization level to obtain the chroma gain error err_sync, that is, err_sync=std_synC-csyn_val, where std_synC is configurable. The std_synC of coaxial video signals with different resolutions, frame rates and standards is different. Its value range is 0~1023. The specific value should be determined according to the image effect. The larger the value, the greater the chroma saturation and the darker the color; the smaller the value, the smaller the chroma saturation and the lighter the color.
[0076] Furthermore, determining a chroma gain control stability flag according to the chroma gain error includes:
[0077] When the chroma phase lock flag is 1, setting a second counter, configuring an initial value of the second counter and using it;
[0078] updating a second counter value according to a chroma gain allowable error threshold and the chroma gain error;
[0079] If the updated second counter value is greater than or equal to 0, the chroma gain control stability flag is 1; otherwise, the chroma gain control stability flag is 0.
[0080] Another 8-bit counter is used as the second counter, and its initial value is set to cnt_ini. The second counter value is recorded as cnt1. The second counter is used to generate the chroma gain control stability flag chroma_agc_ok. The initial value of the second counter is also configurable, as long as it is a negative number.
[0081] When the chroma phase lock flag chroma_lck = 1, cnt1 is updated as follows:
[0082] ,
[0083] Among them, cnt 1prevRepresents the cnt1 value of the previous row, cnt_limit_gainC represents the maximum value of cnt1, -cnt_limit_gainC represents the minimum value of cnt1, and cnt1 ranges from 1 to 255. The larger the value, the slower the chroma phase locking, but the stronger the anti-noise interference performance. The smaller the value, the faster the chroma phase locking, but the weaker the anti-noise interference performance. Generally, a trade-off is made between speed and performance. In this embodiment, cnt_limit_gainC takes a value of 16; GainC_err represents the chroma gain allowable error threshold. If the chroma gain error is less than this value, it means that the chroma amplitude is within the required range. Otherwise, it means that the chroma amplitude is not within the required range and chroma gain adjustment is required.
[0084] The chroma gain control stability flag chroma_agc_ok is determined based on the latest cnt1 value. The formula is as follows:
[0085] .
[0086] Furthermore, determining the output chroma gain parameter based on the chroma gain control stability flag, the chroma phase lock flag, and the chroma gain error includes:
[0087] When the chroma phase lock flag is 1 and the chroma gain control stability flag is 0, a gain change is determined according to the chroma gain adjustment step size and the chroma gain error, and the gain change is added to the chroma gain parameter of the previous row to obtain the chroma gain parameter of the current row output; otherwise, the chroma gain parameter of the current row is equal to the chroma gain parameter of the previous row.
[0088] Furthermore, determining the gain variation according to the chroma gain adjustment step size and the chroma gain error includes:
[0089] When the chroma gain error is greater than the chroma gain adjustment step, the gain change is equal to the chroma gain adjustment step;
[0090] When the chroma gain error is less than the negative value of the chroma gain adjustment step, the gain change is equal to the negative value of the chroma gain adjustment step;
[0091] Otherwise, the gain change is equal to the chroma gain error.
[0092] The gain change err_sync1 is limited according to chroma_lck and chroma_agc_ok. The formula is as follows:
[0093] ,
[0094] Among them, GainC_step represents the chroma gain adjustment step size. The chroma gain cannot be adjusted larger than this value each time to prevent the amplitude from being adjusted too large at one time, which may affect the stability of the chroma demodulation.
[0095] It can be understood that when the chroma gain control stability flag is 1, it indicates that at the current gain, the color burst level is close to the standard and no further gain adjustment is required. Frequent gain adjustment can cause the chroma to fluctuate. Therefore, under this condition, the gain change err_sync1 = 0. At the same time, using the second counter to control the chroma gain control stability flag can prevent the color burst level of one or more lines in the signal from being affected by noise or transmission errors, which may cause erroneous gain changes, thereby improving system stability.
[0096] Finally, the output chroma gain parameter gain_C1 is calculated according to err_sync1, that is, gain_C1=gain_C prev +err_sync1, where gain_C prev Indicates the chroma gain parameter of the previous line. This gain_C1 is used to dynamically adjust the gain of the chroma signal of the next line through closed-loop control.
[0097] This embodiment automatically detects the current chroma amplitude state based on the current color synchronization signal amplitude, and then adjusts the chroma signal gain to stabilize the chroma signal amplitude within a certain range, reducing the impact of noise, and minimizing chroma differences between lines and frames. At the same time, it reduces the impact of long-distance cable transmission on the composite video chroma signal and reduces chroma differences at different transmission distances.
[0098] Example 2
[0099] like Figure 2 As shown, a chroma automatic gain control device for a composite video signal includes:
[0100] A pre-processing module, configured to obtain a chroma signal adjusted by a historical chroma gain parameter, and demodulate a color difference component reference value of a color synchronization signal from the chroma signal adjusted by the historical chroma gain parameter;
[0101] A first calculation module is used to calculate the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value;
[0102] a second calculation module, configured to generate a chroma phase lock flag in response to the chroma phase deviation meeting a preset chroma phase lock condition, and calculate a chroma gain error according to the actual color burst level;
[0103] An output module is used to determine a chroma gain control stability flag according to the chroma gain error, and to determine an output chroma gain parameter based on the chroma gain control stability flag, the chroma phase lock flag and the chroma gain error, so as to dynamically adjust the gain of the next line through closed-loop control.
[0104] This embodiment is used to implement the method provided by the above embodiment and has the corresponding beneficial effects of the above method. For technical details not fully described in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.
[0105] Example 3
[0106] like Figure 3 As shown, an electronic device includes a memory 301 and a processor 302, wherein the memory 301 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 302 to implement the above-mentioned chroma automatic gain control method for a composite video signal.
[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0108] A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to implement the above-mentioned chroma automatic gain control method for a composite video signal when the computer is executed.
[0109] Exemplarily, a computer program may be divided into one or more modules / units, one or more modules / units being stored in the memory 301 and executed by the processor 302, and the input interface 305 and the output interface 306 completing the I / O interface transmission of data to complete the present invention. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer device.
[0110] The computer device may be a desktop computer, laptop, PDA, cloud server, or other computing device. The computer device may include, but is not limited to, memory 301 and processor 302. Those skilled in the art will appreciate that this embodiment is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include an input device 307, a network access device, a bus, and the like.
[0111] The processor 302 may be a central processing unit (CPU), other general-purpose processors 302, digital signal processors 302 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 302 may be a microprocessor 302 or any conventional processor 302.
[0112] Memory 301 can be an internal storage unit of a computer device, such as a hard drive or memory of the computer device. Memory 301 can also be an external storage device of the computer device, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, memory 301 can include both an internal storage unit of the computer device and an external storage device. Memory 301 is used to store computer programs and other programs and data required by the computer device. Memory 301 can also be used to temporarily store data in output device 308. The aforementioned storage media include various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM) 303, a random access memory (RAM) 304, a disk, or an optical disk.
[0113] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for automatic chrominance gain control of a composite video signal, characterized in that: The following steps are involved: Acquire a chroma signal adjusted by a historical chroma gain parameter, and demodulate a color difference component reference value of a color synchronization signal from the chroma signal adjusted by the historical chroma gain parameter, wherein the historical chroma gain parameter is obtained by performing chroma gain control on a previous line of video frames; Calculate the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value; In response to the chroma phase deviation meeting a preset chroma phase lock condition, generating a chroma phase lock flag, and calculating a chroma gain error according to the actual color burst level; Determining a chroma gain control stability flag according to the chroma gain error, and determining an output chroma gain parameter based on the chroma gain control stability flag, the chroma phase lock flag, and the chroma gain error, so as to dynamically adjust the gain of the next row through closed-loop control; The step of determining a chroma gain control stability flag according to the chroma gain error includes: When the chroma phase lock flag is 1, setting a second counter, configuring an initial value of the second counter and using it; updating a second counter value according to a chroma gain allowable error threshold and the chroma gain error; If the updated second counter value is greater than or equal to 0, the chroma gain control stability flag is 1, otherwise, the chroma gain control stability flag is 0; The chroma gain parameter outputted based on the chroma gain control stability flag, the chroma phase lock flag and the chroma gain error is determined, comprising: When the chroma phase lock flag is 1 and the chroma gain control stability flag is 0, a gain change is determined according to the chroma gain adjustment step size and the chroma gain error, and the gain change is added to the chroma gain parameter of the previous row to obtain the chroma gain parameter of the current row output; otherwise, the chroma gain parameter of the current row is equal to the chroma gain parameter of the previous row.
2. The method for automatic chrominance gain control of a composite video signal according to claim 1, wherein: The color difference component reference value of the color burst signal includes a color difference U component reference value and a color difference V component reference value.
3. The method for automatic chrominance gain control of a composite video signal according to claim 2, wherein: The calculating the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value includes: Starting from a position M samples away from the falling edge of the horizontal synchronization, the color difference U component reference value and the color difference V component reference value of N samples are continuously taken and accumulated to obtain the integrated chroma U component level value and the integrated chroma V component level value of the current horizontal color burst signal, where M and N are both integers greater than 1; Taking the absolute value of the integrated chroma U component level, dividing it by N, and rounding it off to obtain an actual color burst level; The integrated chroma U component level value and the integrated chroma V component level value are added to obtain a chroma phase deviation between the input color subcarrier and the local color subcarrier.
4. The method for automatic chrominance gain control of a composite video signal according to claim 3, wherein: The generating of the chroma phase lock flag and calculating the chroma gain error according to the actual color burst level includes: Setting a first counter, configuring an initial value of the first counter and using it; updating a first counter value according to a chroma phase lock threshold and the chroma phase deviation; If the updated first counter value is greater than or equal to 0, the chroma phase lock flag is 1, and the preset standard color synchronization level is subtracted from the actual color synchronization level to obtain the chroma gain error; otherwise, the chroma phase lock flag is 0 and the chroma gain error is 0.
5. The method for automatic chrominance gain control of a composite video signal according to claim 4, wherein: The determining the gain variation according to the chroma gain adjustment step size and the chroma gain error comprises: When the chroma gain error is greater than the chroma gain adjustment step, the gain variation is equal to the chroma gain adjustment step; When the chroma gain error is less than the negative value of the chroma gain adjustment step, the gain variation is equal to the negative value of the chroma gain adjustment step; Otherwise, the gain change is equal to the chroma gain error.
6. A chroma automatic gain control device for a composite video signal, characterized in that: include: a preprocessing module, configured to obtain a chroma signal adjusted by a historical chroma gain parameter, and demodulate a color difference component reference value of a color synchronization signal from the chroma signal adjusted by the historical chroma gain parameter, wherein the historical chroma gain parameter is obtained by performing chroma gain control on a previous line of video frames; A first calculation module is used to calculate the actual color burst level and the chroma phase deviation between the input color subcarrier and the local color subcarrier according to the color difference component reference value; a second calculation module, configured to generate a chroma phase lock flag in response to the chroma phase deviation meeting a preset phase lock condition, and calculate a chroma gain error according to the actual color burst level; an output module, configured to determine a chroma gain control stability flag according to the chroma gain error, and determine an output chroma gain parameter based on the chroma gain control stability flag, the chroma phase lock flag, and the chroma gain error, so as to dynamically adjust the gain of the next row through closed-loop control; The output module determines a chroma gain control stability flag according to the chroma gain error, including: When the chroma phase lock flag is 1, setting a second counter, configuring an initial value of the second counter and using it; updating a second counter value according to a chroma gain allowable error threshold and the chroma gain error; If the updated second counter value is greater than or equal to 0, the chroma gain control stability flag is 1, otherwise, the chroma gain control stability flag is 0; The chroma gain control stability flag, the chroma phase lock flag and the chroma gain error of the output module determine the chroma gain parameters output, including: When the chroma phase lock flag is 1 and the chroma gain control stability flag is 0, a gain change is determined according to the chroma gain adjustment step size and the chroma gain error, and the gain change is added to the chroma gain parameter of the previous row to obtain the chroma gain parameter of the current row output; otherwise, the chroma gain parameter of the current row is equal to the chroma gain parameter of the previous row.
7. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a chrominance automatic gain control method for a composite video signal according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to implement a chrominance automatic gain control method for a composite video signal according to any one of claims 1 to 5 when the computer is executed.
Citation Information
Patent Citations
Automatic gain control method and device
CN102256085A
circuit for processing a color signal
DE2544674A1