A digital-analog hybrid automatic clamping control method and device
Through the automatic clamp control method of digital-analog hybrid, combined with analog and digital clamping methods, the clamping parameters of the video signal are adaptively adjusted, and the problem of insufficient signal clamping accuracy and response speed in the prior art is solved, and the high-precision and low-latency signal clamping effect is achieved.
Patent Information
- Application Number
- CN202411709140.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The clamping control methods for existing coaxial video signals are insufficient in accuracy and response speed. The analog active clamping circuit is insufficient and the feedback speed is slow, while the digital clamping method may introduce high latency in real-time applications to affect system performance.
The automatic clamp control method of digital-analog hybrid is adopted. By initializing the analog and digital clamp parameters, combining analog and digital clamping methods, adaptive adjustments are made according to the difference between the blanking level value of the video signal and the target value, and the appropriate clamping method is selected to achieve accurate signal clamping.
Accurate clamping of signals is achieved, avoiding signal top-cutting or bottoming, improving system response speed and performance without losing signal content.
Smart Images

Figure CN119211450B_ABST
Abstract
Description
Technical Field
[0001] This application relates to image communication technology in electric communication technology, and particularly relates to a coaxial video signal automatic clamping control method and device. Background Art
[0002] For coaxial video signals, the currently commonly used clamping schemes all use active clamping circuits for clamping, which are implemented in an analog way and achieved through a series of transformers, flyback switching transistors, clamping switching transistors and clamping capacitors. However, the analog active clamping control circuit can only clamp the signal within a certain approximate amplitude range, with insufficient accuracy; at the same time, the charging and discharging time of the capacitor in analog clamping is long and the feedback speed is slow. Digital clamping methods are also common in digital signal processing. Digital signal processing can provide high accuracy compared with analog implementation methods, can accurately control the clamping value, and ensure that the signal is within the required range. Digital signal processing usually involves steps such as sampling, quantization, and calculation, and these steps will introduce a certain delay. In real-time applications, high delay may affect the response speed and performance of the system. Summary of the Invention
[0003] In view of at least one defect in the above-mentioned prior art, the present invention combines analog and digital clamping methods so that the clamped signal is accurately clamped to a certain amplitude without losing the content of the signal. At the same time, taking one line of the input coaxial video signal as a period, the clamping adjustment is performed during the horizontal blanking period without affecting the video content.
[0004] A digital-analog hybrid automatic clamping control method, initializing analog clamping parameters and digital clamping control parameters;
[0005] The coaxial video signal is sequentially input into an analog clamping unit, an analog-to-digital conversion unit and a digital clamping unit; after the analog clamping output signal is converted by analog-to-digital conversion, a digital clamping output signal is output through a digital clamping method;
[0006] Calculate the blanking difference between the blanking level value of the video signal and the target blanking value as the clamping error. If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping method is used to adjust the signal. Otherwise, the digital clamping method is used to adjust the signal.
[0007] Use the blanking level during the horizontal blanking period of the coaxial video signal as the basis for clamping (hereinafter referred to as the clamping error), and clamp the blanking level within the error tolerance range of the set target value. As a preferred solution, it is necessary to calculate the difference between the blanking level value of each line and the target blanking value as the clamping error. If the error is greater than a certain threshold (or defined as the analog clamping threshold), then use analog clamping for adjustment; otherwise, use digital clamping for adjustment. As a more preferred option, calculate the difference between the blanking level value of each line and the target blanking value as the clamping error, calculate the corresponding parameters of the clamping method to be executed for the next line based on the clamping error of the current line, update the clamping control parameters in units of lines, and perform clamping during the horizontal blanking period of each line so that the effective video content within the line will not be affected by the clamping. Specifically as follows:
[0008] A method for adaptively adjusting analog clamping parameters and digital clamping control parameters, including:
[0009] Calculate the blanking difference between the blanking level value of each line of the video signal and the target blanking value as the clamping error. If the absolute value of the clamping error of the current line is greater than the analog clamping threshold, update the analog clamping control parameters according to the relationship between the clamping error of the current line and the error tolerance threshold, and return the updated analog control parameters to the analog clamping unit, and use the analog clamping method for signal adjustment;
[0010] If the absolute value of the clamping error of the current line is less than or equal to the analog clamping threshold, update the digital clamping control parameters according to the relationship between the clamping error of the current line and the error tolerance threshold, and use the digital clamping method for signal adjustment.
[0011] Furthermore, the analog clamping parameters include charging control parameters and discharging control parameters. The method for updating the analog clamping parameters includes:
[0012] When the clamping error is greater than the analog clamping threshold, use analog clamping for processing, otherwise the analog clamping parameters remain unchanged;
[0013] When the clamping error is negative, perform charging without discharging;
[0014] When the clamping error is positive, first perform discharging. If the discharging has reached the maximum, then reduce the charging level.
[0015] Furthermore, the signal states for using the digital clamping method for signal adjustment include:
[0016] When the absolute value of the clamping error is less than or equal to the analog clamping threshold, or the analog clamping parameters have been adjusted to the boundary value and the absolute value of the clamping error is still greater than the analog clamping threshold, then use the digital clamping method for processing.
[0017] The method for updating the digital clamping control parameters includes:
[0018] The current digital clamping control parameter is the clamping control parameter of the previous line plus the increment of the digital clamping control parameter. The calculation method of the increment of the digital clamping control parameter includes:
[0019] If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping parameter includes a charging control parameter and a discharging control parameter. If the charging control parameter of the previous line is the largest and the discharging control parameter is the smallest, or the charging control parameter is the smallest and the discharging control parameter is the largest, then the increment of the digital clamping control parameter is the analog clamping threshold. Otherwise, the increment of the digital clamping control parameter is the clamping error.
[0020] As another preferred solution, clamping locking is set. When the clamping error is less than the error tolerance threshold for several consecutive lines, it can be determined that the clamping meets the requirements, and the analog and digital clamping configurations are maintained subsequently. In the present invention, the so-called "several lines" can be judged by a counter. The specific solution is as follows:
[0021] Set a counter, initialize the initial parameters of the counter, and limit the counter value within an interval, counting the minimum value and the maximum value. The initial parameter is set to the minimum value of the interval;
[0022] If the absolute value of the clamping error is greater than or equal to the error tolerance threshold and the counter value of the previous line is not the minimum value, the counter value is decreased by 1. If the counter value of the previous line is the minimum value, the current counter value is set to the minimum value;
[0023] If the absolute value of the clamping error is less than the error tolerance threshold and the counter value of the previous line is the maximum value, the counter value of the current line is recorded as the maximum value;
[0024] If the absolute value of the clamping error is less than the error tolerance value and the counter value of the previous line is not the maximum value, the counter value is increased by 1;
[0025] If the counter value is greater than or equal to 0, mark the clamping lock flag as clamped. Otherwise, the clamping is not achieved. If the clamping is not achieved, the clamping parameter control logic is performed, such as the method of adaptively adjusting the analog clamping parameter and the digital clamping control parameter proposed above.
[0026] When the clamping is locked, the analog clamping parameter and the digital clamping control parameter remain unchanged.
[0027] Using a counter to control the clamping lock flag and not adjusting the clamping parameters after clamping is locked can improve the stability of the clamping system, prevent the system from performing incorrect clamping due to one or several incorrect signal lines, and improve the anti-noise ability of the system.
[0028] As another preferred solution, the method for calculating the difference between the blanking level of each line of the coaxial video signal and the target value further includes a low-pass filtering method. The digital coaxial video signal output by the analog-to-digital conversion unit is subjected to the low-pass filtering method in units of samples to obtain a filtered output signal including the low-frequency signal component of the blanking level.
[0029] Calculate the blanking difference between the blanking level value of each line of the filtered output signal and the target blanking value as the clamping error.
[0030] As another preferred solution, the method for calculating the blanking level value includes: taking the calculated mean value of N consecutive samples at the back shoulder of the synchronization pulse of each line of the signal after low-pass filtering, and using the mean value as the current blanking level value; among them, the selection of the N value can remove the interference of noise in the signal on the obtained current blanking level value and ensure its accuracy.
[0031] Furthermore, the present invention also proposes an automatic clamping control device for coaxial video signals, including:
[0032] A signal receiving unit for receiving coaxial video signals;
[0033] An analog clamping unit connected to the signal receiving unit for implementing analog clamping according to analog clamping parameters;
[0034] An analog-to-digital conversion unit connected to the analog clamping unit for converting the analog signal output by the analog clamping unit into a digital signal and inputting it to the digital clamping unit;
[0035] A digital clamping unit connected to the analog-to-digital conversion unit for implementing digital clamping according to digital clamping control parameters;
[0036] A main processing unit connected to the analog-to-digital conversion unit and the digital clamping unit respectively for calculating the blanking difference between the blanking level value of the coaxial video signal and the target blanking value as the clamping error. If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping method is used for signal adjustment. Otherwise, the digital clamping method is used for signal adjustment. Description of the Drawings
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] Figure 1 It is a flowchart of the digital-analog hybrid automatic clamping control method;
[0039] Figure 2It is a schematic diagram of a low-pass filtering method;
[0040] Figure 3 It is a schematic diagram of the value-taking of the blanking level value;
[0041] Figure 4 It is one of the feasible analog clamping circuit diagrams;
[0042] Figure 5 It is a schematic diagram of a digital clamping method. Specific implementation manners
[0043] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0044] Embodiment 1: A digital-analog hybrid automatic clamping control method, as Figure 1 , includes the following steps: Initialize the analog clamping control parameters and digital clamping control parameters, which are set to two groups of fixed values in this embodiment and can be set according to the experience of those skilled in the art. The analog clamping control parameters are generally related to the ADC to ensure that the input analog coaxial video signal is within the effective level range of the ADC; the initial value of the digital clamping control parameter is generally 0.
[0045] The coaxial video signal is sequentially input into the analog clamping unit, analog-to-digital conversion unit, and digital clamping unit; after the analog clamping output signal is subjected to analog-to-digital conversion, the digital clamping output signal is output through the digital clamping method;
[0046] Calculate the blanking difference between the blanking level value of the coaxial video signal and the target blanking value as the clamping error. If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping method is used for signal adjustment. If not, the digital clamping method is used for signal adjustment. The analog clamping threshold is also a parameter set according to experience. If it is set too small, it is easy to enter the analog clamping and the clamping is not easy to lock. If it is set too large, it is not easy to enter the analog clamping, which may cause signal clipping at the top or bottom, affecting the signal content.
[0047] The clamping method disclosed in the present application, which adopts a digital-analog hybrid clamping method, uses analog clamping when the error is large to adjust the input signal to an approximately appropriate range to ensure that the signal is not clipped at the top or bottom; uses digital clamping when the error is small to ensure the clamping accuracy.
[0048] In a preferred solution, before calculating the blanking difference between the blanking level value of the video signal and the target blanking value as the clamping error, a low-pass filtering method is further included. The digital coaxial video signal output by the analog-to-digital conversion unit is subjected to a low-pass filtering method in units of samples to obtain a filtered output signal including a low-frequency signal component of the blanking level; the blanking difference between the blanking level value of the filtered output signal and the target blanking value is calculated as the clamping error.
[0049] The digital coaxial video signal output by the analog-to-digital conversion unit is subjected to low-pass filtering to filter out high-frequency signals in units of samples (data points after ADC sampling) to obtain a filtered output signal, denoted as S flt ; More preferably, a two-stage filtering method is used to implement low-pass filtering, such as Figure 2 , including a first-stage filtering and a second-stage filtering. Exemplarily, the first-stage filtering coefficient is (7, 16, 18, 16, 7), and the second-stage filtering coefficient is (4, 1, 6, 1, 4).
[0050] This step of low-pass filtering is to filter out high-frequency chrominance signals and extract low-frequency blanking levels. The preferred two-stage filtering scheme is simpler and more efficient to implement in a circuit.
[0051] Specifically, if the input signal is denoted as S in , and the first-stage filtered output signal is denoted as S 0 , then the filtering mathematical expressions are as follows:
[0052] Formula 1
[0053] Formula 2
[0054] Among them, S 0 (i) and S flt (i) respectively represent the i-th sample of the first-stage filtered output and the second-stage filtered output. If the coordinates corresponding to the samples in the above expressions are less than 0, the sample value is 0; round() represents rounding the content in the parentheses to the nearest integer.
[0055] Furthermore, the method for calculating the blanking level of each row of the coaxial video signal, such as Figure 3 , includes:
[0056] Taking the calculated mean value of N consecutive samples on the back shoulder of the sync pulse of each row of the signal after low-pass filtering as the blanking level value of the current row, denoted as blk_val. Exemplarily, in this solution, N is taken as 32.
[0057] The specific position of the value is blk_st samples away from the falling edge of the line synchronization pulse. Since the widths of the line synchronization headers are different for different formats (ahd / cvi / tvi) and different resolutions (1M / 2M, etc.), the value of blk_st is different. Ensure that the value is within the blanking level interval shown in Figure 5 at the position shown. Specifically, refer to the analog high-definition coding standard.
[0058] The method for calculating the difference between the blanking level value of the video signal and the target blanking value is as follows: Calculate the difference between the current line blanking value and the target blanking value std_blk_val through the following expression, denoted as blk_err, and use blk_err as the clamping error.
[0059] Formula 3
[0060] Embodiment 2: A further improved digital-analog hybrid automatic clamping control method, which proposes a method for updating the analog clamping control parameter and the digital clamping control parameter row by row. The specific steps are as follows:
[0061] According to the signal state of each row, that is, the difference between the blanking level value of the current row and the target blanking value, adaptively update the analog clamping parameter or the digital clamping control parameter for the signal adjustment of the next row. At the same time, a preferred scheme of the low-pass filtering method based on this is that before calculating the blanking difference between the blanking level value of each row of the video signal and the target blanking value as the clamping error, a low-pass filtering method is also included. The digital coaxial video signal output by the analog-to-digital conversion unit is subjected to the low-pass filtering method in units of samples to obtain a filtered output signal; calculate the blanking difference between the blanking level value of each row of the filtered output signal and the target blanking value as the clamping error.
[0062] The analog clamping control parameter and the digital clamping control parameter in the digital-analog hybrid automatic clamping control method can be a manually set parameter. Preferably, it can be an adaptive clamping control parameter. The calculation method of the adaptive clamping control parameter is as follows:
[0063] The method for adaptively adjusting the analog clamping parameter and the digital clamping control parameter includes:
[0064] First, the same as in Embodiment 1, initialize the analog clamping control parameter and the digital clamping control parameter to determine an initial value.
[0065] Then calculate the blanking difference between the blanking level value of each row of the video signal and the target blanking value as the clamping error. If the absolute value of the clamping error of the current row is greater than the analog clamping threshold, update the analog clamping control parameter according to the relationship between the current row clamping error and the error tolerance threshold, and return the updated analog control parameter to the analog clamping unit, and use the analog clamping method for signal adjustment;
[0066] If the absolute value of the current line clamping error is greater than the analog clamping threshold, but the analog clamping control parameter has been adjusted to the boundary value and cannot be adjusted further, then update the digital clamping control parameter according to the relationship between the current line clamping error and the error tolerance threshold, and use the digital clamping method to perform signal adjustment.
[0067] If the absolute value of the current line clamping error is less than or equal to the analog clamping threshold, then update the digital clamping control parameter according to the relationship between the current line clamping error and the error tolerance threshold, and use the digital clamping method to perform signal adjustment.
[0068] Among them, the analog clamping parameters include the charging control parameter and the discharging control parameter. The method for updating the analog clamping parameters is as follows:
[0069] Generally speaking, when the actual blanking level value is lower than the target blanking level value (the clamping error is negative), and the absolute value of the error exceeds the analog clamping threshold, the clamping circuit will start the charging operation to increase the actual blanking level to make it close to the target level.
[0070] When the actual blanking level value is higher than the target blanking level value (the clamping error is positive), and the error exceeds the analog clamping threshold, the clamping circuit will start the discharging or reducing the charging level operation to decrease the actual blanking level to make it close to the target level.
[0071] Since each line needs to be adaptively adjusted, it is necessary to further adjust based on the parameters of the previous line according to the clamping error to achieve a better control level. The better control logic is shown in Formula 6 and Formula 7:
[0072] Formula 6
[0073] Formula 7
[0074] Among them, the charging control parameter and the discharging control parameter are represented by A_up and A_down respectively, and their initial values are both 0, indicating no charging and no discharging; the larger A_up is, the more charging there is, and the larger A_down is, the more discharging there is. A_down prev and A_up prev respectively represent A_down and A_up of the previous line, and A_clamp_TH represents the analog clamping threshold.
[0075] The explanations of Formula 6 and Formula 7 are as follows: When the clamping is locked, the analog clamping parameter remains unchanged, that is, blk_ok = 1;
[0076] When the clamping is under control, if the absolute value of the clamping error exceeds the analog clamping threshold A_clamp_TH, analog clamping is used for processing, otherwise the analog clamping parameter remains unchanged;
[0077] If the clamping error is negative, charge without discharging.
[0078] If the clamping error is positive, first discharge. If the discharge has reached the maximum (or the discharge parameter has reached the maximum), then reduce the charging level.
[0079] In the formula, A_down prev +1 means increasing the discharge level or grade, A_up prev +1 means increasing the charging level or grade, A_down prev -1 means decreasing the discharge level or grade, A_up prev -1 means decreasing the discharge level or grade.
[0080] In principle, when clamping is controlled, when the absolute value of the clamping error is greater than the analog clamping threshold A_clamp_TH, it means that the actual signal range still differs greatly from the target range, and analog clamping needs to be used for processing. Otherwise, the analog clamping parameters remain unchanged. If the clamping error is negative, it means that the actual blanking level is less than the target level, and charge without discharging. If the clamping error is positive, it means that the actual blanking level is greater than the target level, first discharge. If the discharge has reached the maximum, then reduce the charging level.
[0081] As an optimal solution, calculate the digital clamping control parameter increment, denoted as blk_err', through the following process;
[0082] Formula 8
[0083] Among them, max_up represents the maximum value of A_up, and max_down represents the maximum value of A_down. The maximum value is determined by the specific analog clamping circuit.
[0084] When clamping is controlled, when the absolute value of the clamping error is less than or equal to the analog clamping threshold A_clamp_TH, it means that the actual signal range is close to the target range, and more refined digital clamping is required for processing. At the same time, if the analog clamping has been adjusted to the boundary value and the absolute value of the clamping error is still greater than the analog clamping threshold A_clamp_TH, then digital clamping is also used for processing.
[0085] According to blk_err', calculate the digital clamping control parameter clamp_d through the following method. The larger the value of clamp_d, the greater the amplitude of the signal reduction.
[0086]
[0087] Among them, clamp_d prevIndicates clamp_d of the previous line; that is, the current digital clamp control parameter is the clamp control parameter of the previous line plus the digital clamp control parameter increment. The calculation method of the digital clamp control parameter increment includes:
[0088] If the absolute value of the clamping error is greater than the analog clamping threshold, but the analog clamping parameters including the charge control parameter and the discharge control parameter have reached the boundary value, such as the charge control parameter is the largest and the discharge control parameter is the smallest in the previous line, or the charge control parameter is the smallest and the discharge control parameter is the largest, then the digital clamp control parameter increment is the analog clamping threshold. Otherwise, the digital clamp control parameter increment is the clamping error. The boundary value described in the present disclosure can be understood as the maximum or the minimum, and cannot be adjusted further in the corresponding direction.
[0089] Send the updated analog clamp control parameters A_up, A_down and the digital clamp control parameter clamp_d of the current line to the analog clamp unit and the digital clamp unit respectively, and then return to the second step to perform the clamping process of the next line until the clamping is completed.
[0090] Update the clamp control parameter in units of lines, and perform clamping during the line blanking period of each line, so that the valid video content within the line will not be affected by the clamping.
[0091] As a preferred solution, it further includes a marking method for clamp locking, which is used to control the calculation of the clamp control parameter of the next line.
[0092] Set a counter, initialize the initial parameters of the counter, and limit the counter value within an interval. Usually, the initial parameter is the minimum value of the interval;
[0093] If the absolute value of the clamping error is greater than or equal to the error tolerance threshold, and the counter value of the previous line is not the minimum value, then the counter value is decremented by 1. If the counter value of the previous line is the minimum value, then the current counter value is set to the minimum value;
[0094] If the absolute value of the clamping error is less than the error tolerance threshold, and the counter value of the previous line is the maximum value, then the counter value of the current line is recorded as the maximum value;
[0095] If the absolute value of the blanking difference is less than the error tolerance value, and the counter value of the previous line is not the maximum value, then the counter value is incremented by 1;
[0096] If the counter value is greater than or equal to 0, then mark the clamp locking flag as clamp locked. Otherwise, the clamping is not achieved. If the clamping is not achieved, perform the clamp parameter control logic, such as the method of adaptively adjusting the analog clamp parameter and the digital clamp control parameter proposed above. When the clamp is locked, the analog clamp parameter and the digital clamp control parameter remain unchanged.
[0097] The specific process and examples include: Exemplarily, the initial value of the counter is -cnt_lmt, denoted as cnt.
[0098] In the present disclosure, assuming the default value of cnt_lmt is 16, then:
[0099] The initial value cnt = -cnt_lmt, that is, cnt = -16.
[0100] In the present disclosure, the clamping lock flag is controlled by this counter parameter. The larger cnt_lmt is, the longer the waiting time for clamping lock, but the more stable the clamping system is; the smaller cnt_lmt is, the faster the clamping lock speed, but the clamping system is prone to fluctuations due to noise. Implementers can adjust the parameter values according to experience, experimental adjustment, and actual application needs, etc.
[0101] The formula for counting cnt is as follows:
[0102] Formula 4
[0103] where cnt prev represents the counter value of the previous line, max_clamp_err is the error tolerance threshold for clamping, and |blk_err| represents taking the absolute value of blk_err. The counter value is restricted within the interval [-cnt_lmt, cnt_lmt].
[0104] The clamping lock flag blk_ok is obtained through the following expression. When its value is 1, it indicates that the clamping is completed and the clamping has reached the requirements.
[0105] Formula 5
[0106] It is judged whether the clamping is achieved through the clamping lock flag. If the counter is greater than or equal to 0, it is judged that the clamping lock is completed; if not, the clamping is not achieved. In this preferred solution, the value of the counter is set for the next judgment of the clamping lock flag, making the clamping system more stable and having strong anti-noise ability. The signals affected by noise in one or several lines occasionally will not cause clamping fluctuations.
[0107] Since when the clamping is not yet stable, the blanking difference of one or several lines is less than the error tolerance value, which cannot represent the overall level of the signal. Only when multiple lines are like this does it indicate that the overall signal clamping reaches the target value. When cnt is greater than 0, the clamping is in the locking state; after the clamping is locked, when one or several lines are affected by the external environment occasionally and their blanking difference is greater than the error tolerance value, as long as the number of lines does not exceed a certain number and the count value cnt is not less than 0, the clamping control parameters will not change to ensure the stability of the system.
[0108] Embodiment 3: Disclose an automatic clamping control device for coaxial video signals, including:
[0109] A signal receiving unit for receiving a coaxial video signal;
[0110] An analog clamping unit connected to the signal receiving unit for performing analog clamping according to analog clamping parameters;
[0111] An analog-to-digital conversion unit connected to the analog clamping unit for converting the analog signal output by the analog clamping unit into a digital signal and inputting it to the digital clamping unit;
[0112] A digital clamping unit connected to the analog-to-digital conversion unit for performing digital clamping according to digital clamping control parameters;
[0113] A main processing unit connected to the analog-to-digital conversion unit and the digital clamping unit respectively, for calculating the blanking difference between the blanking level value of the coaxial video signal and the target blanking value as the clamping error. If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping method is used for signal adjustment. Otherwise, the digital clamping method is used for signal adjustment.
[0114] Among them, the main processing unit further includes an adaptive clamping calculation unit for calculating the blanking difference between the blanking level value of each line of the video signal and the target blanking value as the clamping error. If the absolute value of the clamping error of the current line is greater than the analog clamping threshold, the analog clamping control parameters are updated according to the relationship between the clamping error of the current line and the error tolerance threshold, and the updated analog control parameters are returned to the analog clamping unit, and the analog clamping method is used for signal adjustment;
[0115] If the absolute value of the clamping error of the current line is less than or equal to the analog clamping threshold, the digital clamping control parameters are updated according to the relationship between the clamping error of the current line and the error tolerance threshold, and the digital clamping method is used for signal adjustment.
[0116] In each unit, for a more specific circuit structure and control method, please refer to Embodiment 1 and Embodiment 2 for understanding, and details will not be elaborated.
[0117] It should be noted that the above-mentioned disclosed analog clamping method and digital clamping method are respectively known knowledge to those skilled in the art. In the present invention, the structure thereof is not specifically described. An exemplary structural diagram can be referred to Figure 4 and Figure 5 the disclosed structure. Of course, since the present invention protects a hybrid application method of analog and digital, the detailed schemes and structures of analog clamping and digital clamping are not limited. If there are other known or innovative analog clamping methods and digital clamping methods applied or combined in the technical solution of the present invention, they are also included in the protection scope of the present invention.
Claims
1. A digital-analog hybrid automatic clamping control method, characterized in that: It includes the following: Initialize analog clamp parameters and digital clamp control parameters; The coaxial video signal is sequentially input into the analog clamping unit, the analog-to-digital conversion unit and the digital clamping unit; after the analog clamping output signal is converted into a digital signal, the digital clamping output signal is outputted through the digital clamping method; The blanking difference between the blanking level value of the video signal and the target blanking value is calculated as the clamping error. If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping method is used to adjust the signal. If not, the digital clamping method is used to adjust the signal. The specific method of adaptively adjusting the analog clamping parameters and the digital clamping control parameters includes: Calculate the blanking difference between the blanking level value of each line of the video signal and the target blanking value as the clamping error. If the absolute value of the current line clamping error is greater than the analog clamping threshold, update the analog clamping control parameter according to the relationship between the current line clamping error and the error tolerance threshold, and return the updated analog control parameter to the analog clamping unit, and use the analog clamping method to adjust the signal; If the absolute value of the current row clamp error is less than or equal to the analog clamp threshold, the digital clamp control parameter is updated according to the relationship between the current row clamp error and the error tolerance threshold, and the digital clamp method is used to perform signal adjustment; The analog clamping parameters include charging control parameters and discharging control parameters, and the method for updating the analog clamping parameters includes: When the absolute value of the clamp error is greater than the analog clamp threshold, analog clamping is used for processing, otherwise the analog clamp parameters remain unchanged; When the clamp error is negative, charging is performed without discharging; When the clamp error is positive, discharge is performed first. If the discharge has reached the maximum, the charge level is reduced. Signal conditions that use digital clamping methods for signal conditioning include: When the absolute value of the clamp error is less than or equal to the analog clamp threshold, or the analog clamp parameter has been adjusted to the boundary value, and the absolute value of the clamp error is still greater than the analog clamp threshold, the digital clamp method is used for processing; The method for updating the digital clamp control parameters comprises: The current digital clamp control parameter is the previous line clamp control parameter plus the digital clamp control parameter increment. The calculation method of the digital clamp control parameter increment includes: If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping parameters include charging control parameters and discharging control parameters. If the charging control parameter of the previous row is the largest and the discharging control parameter is the smallest, or the charging control parameter is the smallest and the discharging control parameter is the largest, then the digital clamping control parameter increment is the analog clamping threshold; otherwise, the digital clamping control parameter increment is the clamping error.
2. The digital-analog hybrid automatic clamping control method according to any one of claim 1, characterized in that: Also includes clamp locking method, Set the counter, initialize the initial parameters of the counter, and limit the counter value to a range, counting the minimum and maximum values. The initial parameter is the minimum value of the range; If the absolute value of the clamp error is greater than or equal to the error tolerance threshold, and the counter value of the previous row is not the minimum value, the counter value is reduced by 1. If the counter value of the previous row is the minimum value, the current counter value is counted as the minimum value. If the absolute value of the clamp error is less than the error tolerance threshold, and the counter value of the previous row is the maximum value, the counter value of the current row is recorded as the maximum value; If the absolute value of the clamp error is less than the error tolerance value, and the counter value of the previous row is not the maximum value, the counter value is increased by 1; If the counter value is greater than or equal to 0, the clamp lock indicator is marked as clamp locked, if not, the clamp is not reached; When the clamp is locked, the analog clamp parameters and digital clamp control parameters remain unchanged.
3. The automatic clamping control method for digital-analog hybrid according to claim 1, characterized in that: The method further includes a low-pass filtering method, wherein the digital coaxial video signal outputted by the analog-to-digital conversion unit is subjected to a low-pass filtering method in units of samples to obtain a filtered output signal containing only low-frequency signal components such as the blanking level; The blanking difference between the blanking level value of the filtered output signal and the target blanking value is calculated as the clamping error.
4. The automatic clamping control method for digital-analog hybrid according to claim 3, characterized in that: The blanking level value calculation method includes: taking the calculated average value of N consecutive sample points of the rear shoulder of the synchronization pulse of each line signal after low-pass filtering, and taking the average value as the current blanking level value.
5. A coaxial video signal automatic clamping control device, characterized in that: include: A signal receiving unit, used for receiving a coaxial video signal; An analog clamping unit, connected to the signal receiving unit, and used to implement analog clamping according to analog clamping parameters; The analog-to-digital conversion unit is connected to the analog clamping unit and is used to convert the analog signal output by the analog clamping unit into a digital signal and input the digital signal into the digital clamping unit; A digital clamping unit, connected to the analog-to-digital conversion unit, and used to implement digital clamping according to digital clamping control parameters; The main processing unit is connected to the analog-to-digital conversion unit and the digital clamping unit respectively, and is used to calculate the blanking difference between the blanking level value of the coaxial video signal and the target blanking value as the clamping error. If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping method is used to adjust the signal. If not, the digital clamping method is used to adjust the signal. The specific method of adaptively adjusting the analog clamping parameters and the digital clamping control parameters includes: Calculate the blanking difference between the blanking level value of each line of the video signal and the target blanking value as the clamping error. If the absolute value of the current line clamping error is greater than the analog clamping threshold, update the analog clamping control parameter according to the relationship between the current line clamping error and the error tolerance threshold, and return the updated analog control parameter to the analog clamping unit, and use the analog clamping method to adjust the signal; If the absolute value of the current row clamp error is less than or equal to the analog clamp threshold, the digital clamp control parameter is updated according to the relationship between the current row clamp error and the error tolerance threshold, and the digital clamp method is used to perform signal adjustment; The analog clamping parameters include charging control parameters and discharging control parameters, and the method for updating the analog clamping parameters includes: When the absolute value of the clamp error is greater than the analog clamp threshold, analog clamping is used for processing, otherwise the analog clamp parameters remain unchanged; When the clamp error is negative, charging is performed without discharging; When the clamp error is positive, discharge is performed first. If the discharge has reached the maximum, the charge level is reduced. Signal conditions that use digital clamping methods for signal conditioning include: When the absolute value of the clamp error is less than or equal to the analog clamp threshold, or the analog clamp parameter has been adjusted to the boundary value, and the absolute value of the clamp error is still greater than the analog clamp threshold, the digital clamp method is used for processing; The method for updating the digital clamp control parameters comprises: The current digital clamp control parameter is the previous line clamp control parameter plus the digital clamp control parameter increment. The calculation method of the digital clamp control parameter increment includes: If the absolute value of the clamping error is greater than the analog clamping threshold, the analog clamping parameters include charging control parameters and discharging control parameters. If the charging control parameter of the previous row is the largest and the discharging control parameter is the smallest, or the charging control parameter is the smallest and the discharging control parameter is the largest, then the digital clamping control parameter increment is the analog clamping threshold; otherwise, the digital clamping control parameter increment is the clamping error.
6. The digital-analog hybrid automatic clamping control device according to claim 5, characterized in that: The main processing unit also includes an adaptive clamping calculation unit, It is used to calculate the blanking difference between the blanking level value of each line of the video signal and the target blanking value as the clamping error. If the absolute value of the current line clamping error is greater than the analog clamping threshold, the analog clamping control parameter is updated according to the relationship between the current line clamping error and the error tolerance threshold, and the updated analog control parameter is returned to the analog clamping unit, and the signal is adjusted using the analog clamping method; If the absolute value of the current row clamp error is less than or equal to the analog clamp threshold, the digital clamp control parameter is updated according to the relationship between the current row clamp error and the error tolerance threshold, and the digital clamp method is used to perform signal adjustment.
Citation Information
Patent Citations
Clamping control circuit structure of television signal of composite video broadcast signal (CVBS)
CN103167219A
Digital clamp circuit
CN1595956A