Automatic adjustment control method, system, device and medium for coaxial video signal
By separating high-frequency signals using peak filters and notch filters, and combining automatic gain control and closed-loop adjustment, the problem of chroma and luminance attenuation in coaxial video signals during long-distance transmission is solved, achieving image quality stability and ease of operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG XINMAI SILICON CO LTD
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, coaxial video signals suffer from severe attenuation of high-frequency signals during long-distance transmission, resulting in faded image color and reduced brightness. Existing compensation solutions cannot adapt to different transmission distances and cable losses, and manual adjustment is cumbersome and cannot adapt to environmental changes in real time.
The high-frequency signal centered on the chroma carrier frequency is separated by a peak filter and a notch filter. A variable gain amplifier is used for precise gain control. The reference level value is extracted by demodulating the quadrature modulation signal to achieve automatic gain control and closed-loop adjustment.
It achieves accurate compensation under different transmission distances and cable losses, ensuring the stability of image brightness and color, avoiding interference with other frequencies, reducing debugging and maintenance costs, and improving image quality and ease of operation.
Smart Images

Figure CN122179524A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal processing, and more particularly to an automatic adjustment and control method, system, device, and medium for coaxial video signals. Background Technology
[0002] Coaxial video signal transmission is widely used in security monitoring, broadcasting, video conferencing, and other fields. During long-distance transmission, due to the skin effect and dielectric loss of coaxial cables, the amplitude attenuation of high-frequency signals is much greater than that of low-frequency signals, especially the high-frequency components centered on the chroma carrier frequency. This frequency-dependent attenuation causes the decoded image at the receiving end to become paler and less saturated, while also affecting the edge sharpness of the luminance signal, resulting in image blurring.
[0003] In existing technologies, high-frequency signals are typically compensated using fixed-parameter equalizer (EQ) circuits, or users manually adjust the EQ parameters according to the transmission distance. Fixed EQ solutions are difficult to adapt to cables of different lengths and types, and the compensation effect is poor when the transmission distance changes. Manual adjustment solutions, while flexible, are cumbersome to operate, rely on human experience, cannot adapt to dynamically changing transmission environments in real time, and are inefficient in batch installation and debugging. Furthermore, some adaptive equalization solutions are based on coarse detection of signal amplitude and fail to accurately adjust signals near the chroma carrier frequency, resulting in inaccurate chroma restoration and unstable image quality. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to solve the technical problems in the prior art and provide an automatic adjustment control method, system, device and storage medium for coaxial video signals.
[0005] Technical solution: This application proposes an automatic adjustment and control method for coaxial video signals, characterized by the following steps:
[0006] The analog coaxial video signal is acquired, and the amplitude of the set frequency signal is adjusted so that its gain can be controlled by control parameters to obtain the adjusted analog coaxial video signal.
[0007] The adjusted analog coaxial video signal is converted into a discrete digital coaxial video signal;
[0008] The reference level value is extracted from the digital coaxial video signal according to the quadrature modulation signal demodulation principle;
[0009] Automatic gain control is performed on the digital coaxial video signal based on the reference level value to generate gain parameters, and a gain control completion flag is generated after the gain control is completed.
[0010] The control parameters are generated based on the gain parameters and the gain control completion identifier to achieve closed-loop automatic adjustment of the analog coaxial video signal.
[0011] Preferably, an analog coaxial video signal is acquired, and the amplitude of a set frequency signal therein is adjusted so that its gain can be controlled by control parameters to obtain an adjusted analog coaxial video signal, including:
[0012] The signal at the set frequency is separated by a peak filter and recorded as analog signal 0;
[0013] The frequency signal other than the set frequency is separated by a notch filter and denoted as analog signal 1;
[0014] Analog signal 0 is passed through a variable gain amplifier and its gain is controlled by the control parameters, and denoted as analog signal 2.
[0015] The gain signal 2 and the gain signal 1 are superimposed to output the adjusted analog coaxial video signal.
[0016] Preferably, when the control parameter is 0, the gain is 0dB;
[0017] When the control parameter range is 1-8, the gain is 7.5dB-18dB, and the step size is 1.5dB.
[0018] Preferably, extracting the reference level value from the digital coaxial video signal according to the quadrature modulation signal demodulation principle includes:
[0019] Multiply the discrete digital coaxial video signal by the gain parameter;
[0020] The results are multiplied by the sine and cosine components of the local subcarrier, respectively, and the high-frequency components are filtered out by mean filtering to obtain two orthogonal signals, denoted as Sx and Sy.
[0021] Starting from the position of sample point syn_st at the falling edge of the horizontal synchronization, the average level values of Sx and Sy from syn_st for 32 points are calculated to obtain val_x and val_y. syn_st is configured according to the coaxial video standard.
[0022] Initialize the counter cnt to -16, based on the value of val_y and the cnt value from the previous line. prev Update the current value of cnt, where the threshold parameter th is configurable;
[0023] The formula is as follows:
[0024] ;
[0025] The reference level value ref_val is generated based on the updated cnt value, using the following formula:
[0026] .
[0027] Preferably, automatic gain control is performed on the digital coaxial video signal based on the reference level value, gain parameters are generated, and a gain control completion flag is generated after the gain control is completed, including:
[0028] 5.1 Perform initial gain control. If the reference level value ref_val is greater than 0, then proceed with gain control processing.
[0029] 5.2. Calculate the difference err between the reference level value ref_val and the standard reference level for each row;
[0030] 5.3. Dynamically adjust the gain parameter gain based on the difference err. Set the gain adjustment step size gain_step during adjustment to limit the amplitude of a single gain adjustment to prevent system oscillation. The formula is as follows:
[0031] ;
[0032] 5.4 If the difference err remains less than the set threshold for a period of time, it is determined that the gain control is complete. The gain parameter gain is kept unchanged, and the gain control completion flag agc_ok is configured to 1; otherwise, return to step 5.2 to continue adjustment.
[0033] Preferably, generating the control parameters based on the gain parameters and the gain control completion identifier to achieve closed-loop automatic adjustment of the analog coaxial video signal includes:
[0034] 6.1. Initialize the 4-bit control parameter to the configurable parameter GAIN_CTRL_EQ0, and initialize the 1-bit change signal of the control parameter change_clk to 0;
[0035] 6.2 Determine if the gain control completion flag agc_ok is 1. If it is 1, proceed to the next step; otherwise, keep GAIN_CTRL_EQ unchanged and change_clk is 0.
[0036] 6.3. The preset gain parameters maintain the lower limit thresholds gain_th0 and gain_th1. If the gain parameter gain≤gain_th0, then GAIN_CTRL_EQ is incremented by 1.
[0037] If gain ≥ gain_th1 and GAIN_CTRL_EQ is less than the value before the change, then GAIN_CTRL_EQ is decreased by 1; otherwise, GAIN_CTRL_EQ remains unchanged.
[0038] 6.4 If GAIN_CTRL_EQ changes, change_clk is configured to 1, the automatic gain control module is reinitialized, and the process returns to step 6.2 to wait for agc_ok to be set to 1 before continuing. Then change_clk is pulled low to 0 to facilitate the next parameter change. If GAIN_CTRL_EQ does not change, change_clk is 0, and the EQ automatic control process ends.
[0039] Preferably, the set frequency signal is a high-frequency signal in a frequency range centered on the chroma carrier frequency.
[0040] Secondly, embodiments of the present invention provide an automatic adjustment and control system for coaxial video signals, comprising the following modules:
[0041] The adjustment module acquires an analog coaxial video signal and adjusts the amplitude of a set frequency signal so that its gain can be controlled by control parameters to obtain an adjusted analog coaxial video signal. The set frequency signal is a frequency range centered on the chroma carrier frequency.
[0042] The analog-to-digital conversion module converts the adjusted analog coaxial video signal into a discrete digital coaxial video signal;
[0043] The reference level extraction module is used to extract the reference level value from the digital coaxial video signal according to the quadrature modulation signal demodulation principle;
[0044] The automatic gain control module is used to perform automatic gain control on the digital coaxial video signal based on the reference level value, generate gain parameters, and generate a gain control completion flag after the gain control is completed.
[0045] An automatic control module is used to generate control parameters based on the gain parameters and gain control completion identifier, thereby realizing closed-loop automatic adjustment of the analog coaxial video signal.
[0046] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory. The memory stores one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the electronic device is able to implement any of the possible design methods described in the first aspect.
[0047] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any of the above embodiments.
[0048] Fifthly, embodiments of the present invention also provide a computer program product that, when run on an electronic device, causes the electronic device to perform any possible design method of any of the above aspects.
[0049] Beneficial effects:
[0050] This invention automatically adjusts the high-frequency signal amplitude centered on the chroma carrier frequency based on the gain parameters corresponding to the decoded chroma amplitude. It can match the actual attenuation of the coaxial video signal under different transmission distances and cable losses without manual intervention, completely solving the signal problems caused by insufficient or excessive compensation in existing fixed gain schemes. It accurately offsets the high-frequency signal amplitude attenuation caused by long-distance transmission, ensuring the brightness edge sharpness and chroma stability of the decoded video image.
[0051] This invention combines a peak filter and a notch filter to adjust the EQ gain of signals only in a specific high-frequency range centered on the chroma carrier frequency, while leaving other frequency signals in their original state without processing. This accurately compensates for the attenuation of high-frequency signals within the set frequency range, ensures brightness clarity and chroma stability, and effectively avoids interference with other frequencies, ensuring the sharpness of the high-frequency boundaries of image brightness and achieving dual optimization of chroma and brightness display effects.
[0052] This invention sets a gain adjustment step size gain_step in automatic gain control to limit the amplitude of a single gain adjustment. At the same time, EQ parameter adjustment must wait for the gain control completion flag agc_ok to be set to 1 before it can be started. If the EQ parameters change, the gain control module is reinitialized and recalibrated, forming a closed-loop logic of "gain stabilization - EQ adjustment - gain recalibration - EQ adaptation". This effectively prevents system oscillation caused by parameter mutations and ensures the stability of the entire EQ control process and the reliability of signal processing.
[0053] In this invention, the horizontal synchronization sampling start position syn_st and threshold parameter th in the reference level extraction stage, as well as the initial parameters GAIN_CTRL_EQ0 and gain thresholds gain_th0 / gain_th1 of EQ control, are all configurable parameters. They can be flexibly adjusted according to the needs of different coaxial video standards without requiring significant modifications to the hardware and core control logic. They are highly adaptable and can meet the practical application needs of various security monitoring and video transmission scenarios.
[0054] This invention achieves automatic detection, calculation, and adjustment of EQ gain parameters throughout the entire process, completely eliminating the need for manual gain configuration in existing technologies. It effectively solves the problems of cumbersome manual adjustment operations and inability to adapt to changes in the transmission environment in real time, significantly reducing on-site debugging and subsequent maintenance costs, and improving the feasibility and ease of use of the technical solution in actual engineering projects. Attached Figure Description
[0055] Figure 1 A schematic diagram of the method framework for this invention is provided;
[0056] Figure 2 A system implementation principle block diagram is provided for this invention;
[0057] Figure 3 This invention provides a block diagram illustrating the implementation principle of the EQ adjustment module.
[0058] Figure 4 A system structure diagram of the reference level extraction module is provided for this invention;
[0059] Figure 5 The present invention provides a flowchart of an automatic EQ control system.
[0060] Figure 6 This is a block diagram of an electronic device structure provided in one embodiment of this application. Detailed Implementation
[0061] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] Example 1
[0063] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "including" and similar expressions used herein mean that the element or object preceding the term covers the element or object listed after the term and its equivalents, but do not exclude other elements or objects.
[0064] In response to the problems existing in the current technology, such as Figure 1-3 As shown, an automatic adjustment and control method for coaxial video signals is proposed, characterized by the following steps:
[0065] Step S1: Acquire the analog coaxial video signal, and adjust the amplitude of the set frequency signal so that its gain can be controlled by the control parameters to obtain the adjusted analog coaxial video signal.
[0066] An analog coaxial video signal is acquired, and the amplitude of a set frequency signal within it is adjusted so that its gain can be controlled by control parameters, resulting in an adjusted analog coaxial video signal, including:
[0067] The signal at the set frequency is separated by a peak filter and recorded as analog signal 0;
[0068] The frequency signal other than the set frequency is separated by a notch filter and denoted as analog signal 1;
[0069] Analog signal 0 is passed through a variable gain amplifier and its gain is controlled by the control parameters, and denoted as analog signal 2.
[0070] The gain signal 2 and the gain signal 1 are superimposed to output the adjusted analog coaxial video signal.
[0071] When the control parameter is 0, the gain is 0dB;
[0072] When the control parameter range is 1-8, the gain is 7.5dB-18dB, and the step size is 1.5dB.
[0073] The set frequency signal is a high-frequency signal within a frequency range centered on the chroma carrier frequency. This type of signal is a core signal in coaxial video signals that is prone to amplitude attenuation due to long-distance transmission, directly affecting image brightness, clarity, and chroma display effects. Adjusting its amplitude separately can compensate for attenuation while avoiding interference with other frequency signals.
[0074] The acquired analog coaxial video signal is synchronously input into a peak filter and a notch filter. The peak filter, with its frequency selectivity, precisely separates the set frequency signal, and this portion of the signal requiring gain adjustment is designated as analog signal 0. Simultaneously, the notch filter filters out the set frequency signal, separating all other frequency signals from the analog coaxial video signal; this portion of the signal requiring no gain adjustment is designated as analog signal 1. Through the combined use of these two filters, the set frequency signal is precisely separated from other frequency signals, ensuring that subsequent gain adjustments only apply to the target high-frequency signal.
[0075] The separated analog signal 0 is input into a variable gain amplifier (PGA). The gain of the amplifier is precisely controlled by an externally input 4-bit EQ control parameter. The analog signal 0 after gain control is denoted as analog signal 2. The gain of the variable gain amplifier has a linear relationship with the EQ control parameter. The specific gain control rule is as follows:
[0076] When the value of the external EQ control parameter is 0, the gain of the variable gain amplifier is 0dB. At this time, the analog signal 0 has no gain amplification and maintains its original amplitude.
[0077] When the external EQ control parameter is set to 1~8, the gain of the variable gain amplifier is linearly increased from 7.5dB to 18dB in a fixed step of 1.5dB. That is, when the control parameter is 1, the gain is 7.5dB, when it is 2, the gain is 9dB, when it is 3, the gain is 10.5dB, and so on, and when it is 8, the gain is 18dB. This achieves 8-level gradient gain compensation for the set frequency signal, which can accurately match the signal compensation requirements under different transmission attenuation levels.
[0078] The analog signal 2, after being controlled by the gain amplifier, is superimposed with the analog signal 1, which is separated by the notch filter and retains its original amplitude. The complete analog coaxial video signal is then recovered through signal synthesis. The synthesized signal is the adjusted analog coaxial video signal.
[0079] After the above steps, the high-frequency signal centered on the chroma carrier frequency in the analog coaxial video signal has undergone targeted gain adjustment, while the other frequency signals remain in their original state. This not only achieves amplitude compensation for the set frequency signal that has attenuated over long-distance transmission, but also avoids interference from gain adjustment to other frequency signals, providing a basic guarantee for the chroma stability and high-frequency boundary sharpness of the subsequent decoded output image.
[0080] Step S2: Convert the adjusted analog coaxial video signal into a discrete digital coaxial video signal. This converts the continuously changing analog coaxial video signal over time into a discrete digital coaxial video signal, providing a computational digital signal foundation for subsequent digital signal processing. The analog-to-digital conversion module samples the adjusted analog coaxial video signal at equal intervals according to a preset sampling rate, converting the continuous voltage amplitude of the analog signal into corresponding digital quantization values. This achieves accurate conversion from analog to digital signals. The converted discrete digital coaxial video signal retains the core video information of the original analog signal, such as chroma and luminance, and can be directly input to subsequent digital processing units such as the reference level extraction module and automatic gain control module for demodulation, computation, and parameter adjustment.
[0081] Step S3, Combining Figure 4 The reference level value is extracted from the digital coaxial video signal according to the quadrature modulation signal demodulation principle;
[0082] Based on the principle of quadrature modulation signal demodulation, a reference level value is extracted from the digital coaxial video signal, including:
[0083] Multiply the discrete digital coaxial video signal by the gain parameter; this operation can introduce the effect of gain control in advance, providing a signal basis for amplitude matching for subsequent demodulation.
[0084] The results are multiplied by the sine and cosine components of the local subcarrier, respectively, and the high-frequency components are filtered out by mean filtering to obtain two signals, denoted as Sx and Sy. The window length of mean filtering can be flexibly configured according to the line period and sampling rate of the coaxial video system to ensure effective preservation of chroma baseband information.
[0085] Starting from the position of sample point syn_st at the falling edge of the horizontal synchronization, the average level values of Sx and Sy from syn_st for 32 points are calculated to obtain val_x and val_y. syn_st is configured according to the coaxial video standard.
[0086] The syn_st parameter is configurable and can be flexibly adjusted according to the position of the horizontal sync shoulder of different coaxial video standards to ensure that the sampling interval accurately covers the color sync signal area.
[0087] Initialize the counter cnt to -16, based on the value of val_y and the cnt value from the previous line. prev Update the current value of cnt, where the threshold parameter th is configurable;
[0088] The formula is as follows:
[0089] ;
[0090] The reference level value ref_val is generated based on the updated cnt value, using the following formula:
[0091] .
[0092] When cnt≥0, it is determined that the quadrature demodulation phase has been locked, that is, the phase of the color subcarrier of the coaxial video signal is close to the phase of the local carrier, and the val_x obtained at the current time is the effective color synchronization level component;
[0093] The reference level value ref_val extracted through the above steps will be used as input to the automatic gain control module to calculate the deviation between the signal amplitude and the standard level, providing a basis for subsequent gain parameter adjustments.
[0094] Step S4: Perform automatic gain control on the digital coaxial video signal based on the reference level value, generate gain parameters, and generate a gain control completion flag after the gain control is completed.
[0095] Automatic gain control is performed on the digital coaxial video signal based on the reference level value, gain parameters are generated, and a gain control completion flag is generated after the gain control is completed, including:
[0096] 5.1 Perform initial gain control. If the reference level value ref_val is greater than 0, enter the gain control process; if ref_val = 0, it is determined that the quadrature demodulation phase is not locked, keep the current gain parameter gain unchanged, and do not start gain adjustment.
[0097] 5.2. Calculate the difference err between the reference level value ref_val and the standard reference level for each row;
[0098] 5.3. Dynamically adjust the gain parameter gain based on the difference err. Set the gain adjustment step size gain_step during adjustment to limit the amplitude of a single gain adjustment to prevent system oscillation. The formula is as follows:
[0099] ;
[0100] Gain control completion status: If agc_ok=1 (gain has stabilized), then keep the gain parameter gain consistent with the previous cycle value gain_prev, and do not adjust it further;
[0101] Gain adjustment status: If agc_ok=0 (gain is not stable), then adjust according to the relationship between the difference err and the step size gain_step:
[0102] When err > gain_step (signal amplitude is too high and the deviation exceeds the step size): reduce the gain by a fixed step size gain_step to avoid system oscillation caused by excessive adjustment in a single step.
[0103] When err <- gain_step (signal amplitude is too low and the deviation exceeds the step size): increase the gain by a fixed step size gain_step, and also limit the single adjustment amplitude.
[0104] When |err|≤gain_step (deviation is within the step size): directly adjust the gain according to the deviation value err to achieve accurate convergence.
[0105] 5.4 If the difference err remains less than the set threshold for a period of time, it is determined that the gain control is complete. The gain parameter gain is kept unchanged, and the gain control completion flag agc_ok is configured to 1. Otherwise, keep agc_ok=0 and return to step 5.2 to continue iterative adjustment until the gain converges.
[0106] The gain parameter generated by the above steps will be fed back to the signal pre-modulation stage in step S3. At the same time, the gain control completion flag agc_ok will be used as the trigger condition for the EQ automatic control module in step S5, realizing the closed-loop control logic of "adjusting EQ after gain is stable".
[0107] Step S5, Combining Figure 5The control parameters are generated based on the gain parameters and the gain control completion identifier to achieve closed-loop automatic adjustment of the analog coaxial video signal.
[0108] The control parameters are generated based on the gain parameters and the gain control completion identifier, and the closed-loop automatic adjustment of the analog coaxial video signal is achieved by:
[0109] 6.1. Initialize the 4-bit control parameter to the configurable parameter GAIN_CTRL_EQ0, and initialize the 1-bit change signal of the control parameter change_clk to 0;
[0110] Initialize two core control parameters:
[0111] The 4-bit EQ control parameter GAIN_CTRL_EQ is initialized to the configurable parameter GAIN_CTRL_EQ0, which directly determines the gain level of the variable gain amplifier in step S1.
[0112] The 1-bit parameter change flag change_clk is initialized to 0 to mark whether GAIN_CTRL_EQ has changed. In the initial state, there is no parameter adjustment, so it is set to 0.
[0113] 6.2 Determine if the gain control completion flag agc_ok is 1. If it is 1, proceed to the next step; otherwise, keep GAIN_CTRL_EQ unchanged and change_clk is 0.
[0114] Determine the status of the gain control completion flag agc_ok:
[0115] If agc_ok = 1: it indicates that the current gain parameter has converged stably, and the EQ parameter adjustment process begins;
[0116] If agc_ok=0: This indicates that the gain is still being adjusted. Keep GAIN_CTRL_EQ unchanged and change_clk at 0. Wait for the gain to stabilize before performing subsequent operations.
[0117] 6.3. The preset gain parameters maintain the lower limit thresholds gain_th0 and gain_th1. If the gain parameter gain≤gain_th0, then GAIN_CTRL_EQ is incremented by 1.
[0118] If gain ≥ gain_th1 and GAIN_CTRL_EQ is less than the value before the change, then GAIN_CTRL_EQ is decreased by 1; otherwise, GAIN_CTRL_EQ remains unchanged.
[0119] Two preset gain thresholds, gain_th0 (lower gain hold threshold) and gain_th1 (upper gain hold threshold), are used. Based on the current gain parameter gain and the previous cycle's GAIN_CTRL_EQ value, GAIN_CTRL_EQ is updated according to the following rules:
[0120] If gain ≤ gain_th0: This indicates that the current signal gain is too low, which is likely due to severe attenuation of high-frequency signals during long-distance transmission. It is necessary to increase the EQ gain compensation → GAIN_CTRL_EQ = GAIN_CTRL_EQ + 1.
[0121] If gain ≥ gain_th1 and GAIN_CTRL_EQ < previous cycle value: it means that the current signal gain is too high and the EQ gain compensation needs to be reduced → GAIN_CTRL_EQ = GAIN_CTRL_EQ-1;
[0122] In other cases: if the signal gain is within a reasonable range, there is no need to adjust the EQ parameters → GAIN_CTRL_EQ remains unchanged.
[0123] 6.4 If GAIN_CTRL_EQ changes, change_clk is configured to 1, the automatic gain control module is reinitialized, and the process returns to step 6.2 to wait for agc_ok to be set to 1 before continuing. Then change_clk is pulled low to 0 to facilitate the next parameter change. If GAIN_CTRL_EQ does not change, change_clk is 0, and the EQ automatic control process ends.
[0124] Based on whether GAIN_CTRL_EQ has changed, execute closed-loop feedback or terminate the process:
[0125] If GAIN_CTRL_EQ changes:
[0126] Set change_clk to 1 to mark that the EQ parameters have been updated;
[0127] Reinitialize the automatic gain control module to make the gain parameter converge again based on the new EQ-compensated signal, and then pull change_clk low to 0 to facilitate the next parameter change and pull it high.
[0128] Return to step 5.2, wait for the new gain control completion flag agc_ok to be set to 1, and then determine again whether the EQ parameters need to be adjusted.
[0129] If GAIN_CTRL_EQ remains unchanged:
[0130] Keep change_clk at 0 to mark that the EQ parameters are adapted to the current transmission scenario;
[0131] The EQ automatic control process ends, and the current GAIN_CTRL_EQ is the optimal compensation parameter.
[0132] The GAIN_CTRL_EQ generated by the above steps will be fed back to the EQ adjustment module in step S1, directly controlling the gain level of the variable gain amplifier, realizing a complete closed loop of "EQ adjustment → gain recalibration → parameter convergence", and accurately compensating for the long-distance transmission attenuation of high-frequency components of coaxial video signals.
[0133] In other embodiments of the invention, combined with Figure 2 This invention discloses an automatic adjustment and control system for coaxial video signals, comprising the following modules:
[0134] The adjustment module acquires an analog coaxial video signal and adjusts the amplitude of a set frequency signal so that its gain can be controlled by control parameters to obtain an adjusted analog coaxial video signal. The set frequency signal is a frequency range centered on the chroma carrier frequency.
[0135] The analog-to-digital conversion module converts the adjusted analog coaxial video signal into a discrete digital coaxial video signal;
[0136] The reference level extraction module is used to extract the reference level value from the digital coaxial video signal according to the quadrature modulation signal demodulation principle;
[0137] The automatic gain control module is used to perform automatic gain control on the digital coaxial video signal based on the reference level value, generate gain parameters, and generate a gain control completion flag after the gain control is completed.
[0138] An automatic control module is used to generate control parameters based on the gain parameters and gain control completion identifier, thereby realizing closed-loop automatic adjustment of the analog coaxial video signal.
[0139] In other embodiments of the present invention, an electronic device 400 is disclosed, such as... Figure 6 As shown, the electronic device may include: one or more processors 401; a memory 402; a display 403; one or more application programs (not shown); and one or more computer programs 404. These devices can be connected via one or more communication buses 405. The one or more computer programs 404 are stored in the memory 402 and configured to be executed by the one or more processors 401. The one or more computer programs 404 include instructions that can be used to perform actions such as... Figure 1 And the steps in the corresponding embodiments.
[0140] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0141] In the various embodiments of this invention, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0142] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.
[0143] The above description is merely a specific implementation of the embodiments of the present invention, but the protection scope of the embodiments of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present invention should be covered within the protection scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention should be determined by the protection scope of the claims.
Claims
1. An automatic adjustment control method for coaxial video signals, characterized in that, Includes the following steps: The analog coaxial video signal is acquired, and the amplitude of the set frequency signal is adjusted so that its gain can be controlled by control parameters to obtain the adjusted analog coaxial video signal. The adjusted analog coaxial video signal is converted into a discrete digital coaxial video signal; The reference level value is extracted from the digital coaxial video signal according to the quadrature modulation signal demodulation principle; Automatic gain control is performed on the digital coaxial video signal based on the reference level value to generate gain parameters, and a gain control completion flag is generated after the gain control is completed. The control parameters are generated based on the gain parameters and the gain control completion identifier to achieve closed-loop automatic adjustment of the analog coaxial video signal.
2. The automatic adjustment control method for coaxial video signals according to claim 1, characterized in that, An analog coaxial video signal is acquired, and the amplitude of a set frequency signal within it is adjusted so that its gain can be controlled by control parameters, resulting in an adjusted analog coaxial video signal, including: The signal at the set frequency is separated by a peak filter and recorded as analog signal 0; The frequency signal other than the set frequency is separated by a notch filter and denoted as analog signal 1; Analog signal 0 is passed through a variable gain amplifier and its gain is controlled by the control parameters, and denoted as analog signal 2. The gain signal 2 and the gain signal 1 are superimposed to output the adjusted analog coaxial video signal.
3. The automatic adjustment and control method for coaxial video signals according to claim 2, characterized in that, When the control parameter is 0, the gain is 0dB; When the control parameter range is 1-8, the gain is 7.5dB-18dB, and the step size is 1.5dB.
4. The automatic adjustment control method for coaxial video signals according to claim 1, characterized in that, Based on the principle of quadrature modulation signal demodulation, a reference level value is extracted from the digital coaxial video signal, including: Multiply the discrete digital coaxial video signal by the gain parameter; The results are multiplied by the sine and cosine components of the local subcarrier, respectively, and the high-frequency components are filtered out by mean filtering to obtain two orthogonal signals, denoted as Sx and Sy. Starting from the position of sample point syn_st at the falling edge of the horizontal synchronization, the average level values of Sx and Sy from syn_st for 32 points are calculated to obtain val_x and val_y. syn_st is configured according to the coaxial video standard. Initialize the counter cnt to -16, based on the value of val_y and the cnt value from the previous line. prev Update the current value of cnt, where the threshold parameter th is configurable; The formula is as follows: ; The reference level value ref_val is generated based on the updated cnt value, using the following formula: 。 5. The automatic adjustment and control method for coaxial video signals according to claim 1, characterized in that, Automatic gain control is performed on the digital coaxial video signal based on the reference level value, gain parameters are generated, and a gain control completion flag is generated after the gain control is completed, including:
1. Perform initial gain control. If the reference level value ref_val is greater than 0, then proceed with gain control processing.
2. Calculate the difference err between the reference level value ref_val and the standard reference level for each row; 3. Dynamically adjust the gain parameter gain based on the difference err. Set the gain adjustment step size gain_step during adjustment to limit the amplitude of a single gain adjustment to prevent system oscillation. The formula is as follows: ; 4. If the difference err remains less than the set threshold for a period of time, the gain control is determined to be complete. The gain parameter gain is kept unchanged, and the gain control completion flag agc_ok is configured to 1; otherwise, return to step 5.2 to continue adjustment.
6. The automatic adjustment control method for coaxial video signals according to claim 1, characterized in that, The control parameters are generated based on the gain parameters and the gain control completion identifier, and the closed-loop automatic adjustment of the analog coaxial video signal is achieved by:
1. Initialize the 4-bit control parameter to the configurable parameter GAIN_CTRL_EQ0, and initialize the 1-bit change signal of the control parameter change_clk to 0; 2. Determine if the gain control completion flag agc_ok is 1. If it is 1, proceed to the next step; otherwise, keep GAIN_CTRL_EQ unchanged and change_clk is 0.
3. The preset gain parameters maintain the lower thresholds gain_th0 and gain_th1. If the gain parameter gain ≤ gain_th0, then GAIN_CTRL_EQ is incremented by 1. If gain ≥ gain_th1 and GAIN_CTRL_EQ is less than the value before the change, then GAIN_CTRL_EQ is decreased by 1; otherwise, GAIN_CTRL_EQ remains unchanged.
4. If GAIN_CTRL_EQ changes, change_clk is configured to 1, the automatic gain control module is reinitialized, and the process returns to step 6.2 to wait for agc_ok to be set to 1 before continuing. Then change_clk is pulled low to 0 to facilitate the next parameter change. If GAIN_CTRL_EQ does not change, change_clk is 0, and the EQ automatic control process ends.
7. The automatic adjustment control method for coaxial video signals according to claim 1, characterized in that, The set frequency signal is a high-frequency signal in a frequency range centered on the chroma carrier frequency.
8. An automatic adjustment and control system for coaxial video signals, characterized in that; Includes the following modules: The adjustment module acquires an analog coaxial video signal and adjusts the amplitude of a set frequency signal so that its gain can be controlled by control parameters to obtain an adjusted analog coaxial video signal. The set frequency signal is a frequency range centered on the chroma carrier frequency. The analog-to-digital conversion module converts the adjusted analog coaxial video signal into a discrete digital coaxial video signal; The reference level extraction module is used to extract the reference level value from the digital coaxial video signal according to the quadrature modulation signal demodulation principle; The automatic gain control module is used to perform automatic gain control on the digital coaxial video signal based on the reference level value, generate gain parameters, and generate a gain control completion flag after the gain control is completed. An automatic control module is used to generate control parameters based on the gain parameters and gain control completion identifier, thereby realizing closed-loop automatic adjustment of the analog coaxial video signal.
9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, causes the processor to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.