A kind of method and apparatus of judging video signal distortion of mobile simulated television
Technical field
The present invention relates to the simulated television technical field, more specifically, relate to a kind of method and apparatus of judging video signal distortion of mobile simulated television.
Background technology
In the simulated television, from the generation of picture signal, process, be transferred to the recovery of receiver, whole process is nearly all finished under the simulation system.Be characterized in adopting the time shaft sampling, every frame is taken a sample in the vertical direction, transmits television image signal in the amplitude modulation(PAM) mode.For reducing frequency band, avoid simultaneously human eye to the sensitive frequency of image repetition, with a two field picture be divided into again very, by chance two field scans.
Analogue television standards itself is not used design for mobile, for the relevant application of mobility seldom.In the anolog TV signals receiving course, especially in the mobile occasion of using, because channel situation is complicated, signal declines, distorts, and causes final picture disply Quality Down.Therefore in the mobile receiving device design process of simulated television, need to effectively judge whether distorted of anolog TV signals, be used to the vision signal of rear end to process reliably foundation is provided in time, thereby situation about further signal being worsened is handled it.
In simulated television current standard, stipulated capable synchronous head amplitude (hereinafter to be referred as: sync-tip amp) and the proportionate relationship between the video signal content, automatic gain control (is based on also hereinafter to be referred as: adjustment AGC) that the constant prerequisite of this proportionate relationship carries out.In the application of mobile analog television, and the composite video broadcast singal (hereinafter to be referred as: CVBS) during the signal distorted, since the change of this proportionate relationship, the yield value that can cause AGC to make mistake.
And in analogue television standards, the general generation of judging that anolog TV signals distort need to just can be carried out after the vision signal decoding, yet can't make timely the situation that vision signal worsens and process this moment, the yield value that further causes AGC to make mistake, therefore in the mobile receiving device of simulated television, judgement anolog TV signals distorted can not be continued to use prior art, is further improved.
Summary of the invention
The embodiment of the invention proposes a kind of method of judging video signal distortion of mobile simulated television, and the situation that signal worsens is made timely processing, can allow AGC stop gain adjustment, and processes for the vision signal of rear end reliably foundation is provided in time.
The embodiment of the invention also proposes a kind of device of judging video signal distortion of mobile simulated television, and the situation that signal worsens is made timely processing, can allow AGC stop gain adjustment, and processes for the vision signal of rear end reliably foundation is provided in time.
The technical scheme of the embodiment of the invention is as follows:
A kind of method of judging video signal distortion of mobile simulated television, the method comprises:
A, judge whether row synchronous head amplitude sync-tip amp is identical with the variation tendency of black level black level, if described variation tendency difference then finish;
If the described variation tendency of B is identical, whether the while is greater than default threshold value K to continue to judge the amplitude of variation TIP_AMP_DIFF_VAL of sync-tip amp and the amplitude of variation BLACK_DIFF_VAL of black level, if TIP_AMP_DIFF_VAL and BLACK_DIFF_VAL simultaneously greater than described threshold value K, then determine composite video broadcast singal CVBS distorted; Otherwise finish.
Described steps A specifically comprises the steps:
A1, obtain sync-tip amp increment accumulation value by described sync-tip amp, obtain black level increment accumulation value by described black level;
If A2 sync-tip amp increment accumulation value and black level increment accumulation value all be on the occasion of or all are negative values, determine that then described sync-tip amp is identical with the variation tendency of described black level; Otherwise, determine that described sync-tip amp is different with the variation tendency of described black level.
Described steps A 2 specifically comprises the steps:
Get the symbol of sync-tip amp increment accumulation value, be designated as sync-tip amp increment accumulation value symbol TIP_AMP_DIFF_SIG;
Get the symbol of black level increment accumulation value, be designated as black level increment accumulation value symbol BLACK_DIFF_SIG;
If TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG, then described sync-tip amp increment accumulation value and described black level increment accumulation value all be on the occasion of or all are negative values.
Described steps A 1 specifically comprises the steps,
A11, by obtaining the capable sync-tip amp of M mean value after the capable sync-tip amp of the M cumulative mean that comprises current line sync-tip amp, the difference of described current line sync-tip amp and the capable sync-tip amp of described M mean value is current line sync-tip amp increment size, and the described current line sync-tip amp increment size addition of N continuous row obtains described sync-tip amp increment accumulation value;
A12, by obtaining the capable black level of M mean value after the capable black level of the M cumulative mean that comprises current line black level, the difference of described current line black level and the capable black level of described M mean value is current line black level increment size, and the described current line black level increment size addition of N continuous row obtains described black level increment accumulation value.
Described TIP_AMP_DIFF_VAL equals that described sync-tip amp increment accumulation value takes absolute value and divided by N, and described BLACK_DIFF_VAL equals that described black level increment accumulation value takes absolute value and divided by N.
The span of described N is, 4≤N≤32, and the span of described M is 64≤M≤512.
The span of described threshold value K is 1≤K≤64.
Further comprise behind the described CVBS distorted, with the DISTOR_FLAG set of line flag position.
Further comprise behind the described CVBS distorted, add up the number of times DISTOR_COUNT that a field distortion occurs.
A kind of device of judging video signal distortion of mobile simulated television, this device comprises:
Control module is used for judging whether row synchronous head amplitude sync-tip amp is identical with the variation tendency of black level black level, when described variation tendency difference then finishes; When described variation tendency is identical, described variation tendency is inputted judge module;
Described judge module, whether the while is greater than default threshold value K to be used for continuing to judge the amplitude of variation TIP_AMP_DIFF_VAL of sync-tip amp and the amplitude of variation BLACK_DIFF_VAL of black level, if TIP_AMP_DIFF_VAL and BLACK_DIFF_VAL simultaneously greater than described threshold value K, then determine composite video broadcast singal CVBS distorted; Otherwise finish.
Described control module comprises computing unit and comparing unit;
Described computing unit is used for obtaining sync-tip amp increment accumulation value by described sync-tip amp, obtains black level increment accumulation value by described black level;
Described comparing unit, if sync-tip amp increment accumulation value and black level increment accumulation value all be on the occasion of or all are negative values, described comparing unit determines that described sync-tip amp is identical with the variation tendency of described black level; Otherwise described comparing unit determines that described sync-tip amp is different with the variation tendency of described black level.
Described computing module is further used for,
By obtaining the capable sync-tip amp of M mean value after the capable sync-tip amp of the M cumulative mean that comprises current line sync-tip amp, the difference of described current line sync-tip amp and the capable sync-tip amp of described M mean value is current line sync-tip amp increment size, and the described current line sync-tip amp increment size addition of N continuous row obtains described sync-tip amp increment accumulation value;
By obtaining the capable blacklevel mean value of M after the capable black level of the M cumulative mean that comprises current line black level, the difference of described current line black level and the capable black level of described M mean value is current line black level increment size, and the described current line black level increment size addition of N continuous row obtains described black level increment accumulation value.
Described control module further comprises memory cell,
Described computing unit, be further used for calculating the symbol of described sync-tip amp increment accumulation value, be designated as sync-tip amp increment accumulation value symbol TIP_AMP_DIFF_SIG, calculate the symbol of described black level increment accumulation value, be designated as black level increment accumulation value symbol BLACK_DIFF_SIG;
Described memory cell, storage TIP_AMP_DIFF_SIG and BLACK_DIFF_SIG;
Described comparing unit is further used for, and judges TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG, then described sync-tip amp increment accumulation value and described black level increment accumulation value all be on the occasion of or all are negative values.
Described computing unit further takes absolute value according to sync-tip amp increment accumulation value and obtains described TIP_AMP_DIFF_VAL divided by N, take absolute value and obtain described BLACK_DIFF_VAL divided by N according to described black level increment accumulation value, and described TIP_AMP_DIFF_VAL and described BLACK_DIFF_VAL are inputted described judge module.
Described device further comprises mark module, and described judge module is judged described CVBS distorted, and described mark module is used for set line flag position DISTOR_FLAG.
Described device further comprises statistical module, and described judge module is judged described CVBS distorted, and described statistical module is used for the number of times DISTOR_COUNT that statistics one field distortion occurs.
From technique scheme, can find out, in embodiments of the present invention, utilize sync-tip amp and black level (to judge the distortion of composite video broadcast singal (CVBS) video signal generator hereinafter to be referred as: amplitude of variation black level) is whether consistent.
Whether the variation tendency of at first judging sync-tip amp and black level is identical, if described variation tendency difference then finish; If described variation tendency is identical, whether the while is greater than default threshold value K to continue to judge the amplitude of variation TIP_AMP_DIFF_VAL of sync-tip amp and the amplitude of variation (BLACK_DIFF_VAL) of black level, if (TIP_AMP_DIFF_VAL) greater than described threshold value K, and BLACK_DIFF_VAL then determines the CVBS distorted and further determines the video signal generator distortion simultaneously greater than described threshold value K; Otherwise finish.
When sync-tip amp identical with the amplitude of variation of black level, and its amplitude of variation is during all greater than threshold value, then can in time determine the video signal generator distortion, allow on the one hand AGC stop gain adjustment, occur on the other hand to judge that distortion also can be used as the foundation that the rear end vision signal is adjusted.Thereby situation about in time signal being worsened is handled it.
Description of drawings
Fig. 1 is embodiment of the invention CVBS signal sync-tip amp variation tendency schematic diagram opposite with black level when normal;
The variation tendency schematic diagram that sync-tip amp was identical with black level when Fig. 2 was embodiment of the invention CVBS signal distortion;
Fig. 3 is a kind of method flow schematic diagram of judging mobile simulation CVBS video signal distortion of the embodiment of the invention;
Fig. 4 is a kind of apparatus structure schematic diagram of judging mobile simulation CVBS video signal distortion of the embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention express clearlyer, the present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
In embodiments of the present invention, at first utilize sync-tip amp and black level increment accumulation value to judge whether the variation tendency of sync-tip amp and black level is identical, if variation tendency is identical when the amplitude of variation of sync-tip amp and black level during simultaneously greater than predefined same threshold value, judge that then sync-tip amp and black level have essentially identical variable quantity, can determine the CVBS distorted this moment, allow on the one hand AGC stop gain adjustment, distorted also can be used as the foundation that the rear end vision signal is adjusted on the other hand, and the CVBS with distortion in the process of rear end vision signal adjustment abandons.
Referring to Fig. 1, when the CVBS signal power increased, the profile of signal integral body amplified, and then sync-tip amp increases, because the CVBS signal generally adopts the negative polarity modulation at transmitting terminal, at positive signal, blacklevel increases with the signal amplitude and reduces.Otherwise when the CVBS signal amplitude reduced, sync-tip amp reduced, and black level increases.Namely when the CVBS signal power changes, observe at positive polarity CVBS signal, sync-tip amp and black level have inverse variation trend.
Find in the experiment, as shown in Figure 2 when the CVBS signal because when fading channel or Doppler effect distorted, the variation tendency of sync-tip amp and black level has become in the same way.Therefore can be according to this rule, the trend of monitoring sync-tip amp and these two parameters of black level and variation thereof when both have essentially identical variable quantity, determines that distortion has occured the CVBS signal.
Be a kind of method flow schematic diagram of judging mobile analog television CVBS signal distortion of the embodiment of the invention referring to Fig. 3, utilize rule shown in Figure 2 to judge whether distorted of video signal of mobile analog television, specifically may further comprise the steps:
Step 301, calculating increment size.
Obtain current line sync-tip amp and current line black level.Obtain the capable sync-tip amp of M mean value divided by M after comprising the capable sync-tip amp of the M addition of current line.The difference of the capable sync-tip amp of current line sync-tip amp and M mean value is called current line sync-tip amp increment size.
Same, obtain the capable blacklevel mean value of M divided by M after comprising the capable black level of the M addition of current line.The difference of the capable black level of current line black level and M mean value is called current line blacklevel increment size.
Obtain current line sync-tip amp and obtain current line black level and all adopt prior art, this paper repeats no more.The span of M can not too greatly can not be too little, when sync-tipamp or black level acute variation, can not really embody the overall variation trend of sync-tip amp and black level if the value of M is too little; And if the value of M is bigger than normal, can not in time embody again the variation tendency of sync-tip amp and black level.The span of M determines that through test of many times optimum value can be controlled in the scope of 64≤M≤512, can demonstrate fully the variation tendency of sync-tip amp and black level.
Step 302, calculating sync-tip amp increment accumulation value and black level increment accumulation value.
After cumulative to the capable sync-tip amp of continuous N increment size, obtain sync-tip amp increment accumulation value.Get the symbol of sync-tip amp increment accumulation value, be designated as sync-tip amp increment accumulation value symbol TIP_AMP_DIFF_SIG.The symbol of sync-tip amp increment accumulation value has+number and-numbers two kinds may, so TIP_AMP_DIFF_SIG representative+number or-number.
After cumulative to the capable black level of continuous N increment size, obtain black level increment accumulation value.Get the symbol of black level increment accumulation value, be designated as black level increment accumulation value symbol BLACK_DIFF_SIG.The symbol of black level increment accumulation value has+number and-numbers two kinds may, so BLACK_DIFF_SIG representative+number or-number.
Wherein, N is configurable parameter.The value of N can not too greatly can not be too little.The too little or too little variation tendency that all can not embody sync-tip amp or black level of N, the span that obtains N after the test of many times is 4≤N≤32.
Step 303, calculate normalized amplitude of variation.
After sync-tip amp increment accumulation value taken absolute value and obtain normalized sync-tip amp amplitude of variation divided by N, be designated as TIP_AMP_DIFF_VAL.After black level increment accumulation value taken absolute value and obtain normalized black level amplitude of variation divided by N, be designated as BLACK_DIFF_VAL.
Obtain sync-tip amp amplitude of variation by the capable sync-tip amp of N increment accumulation value, increment accumulation value by the capable blacklevel of N obtains black level amplitude of variation, determined the scope that sync-tip amp and black level change from quantitative angle, whether distorted provides basis for estimation for CVBS.
Step 304, judgement distortion.
Judge that the condition that the CVBS distortion occurs is:
TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG
And
TIP_AMP_DIFF_VAL>DISTOR_THRESHOLD
Simultaneously
BLACK_DIFF_VAL>DISTOR_THRESHOLD
DISTOR_THRESHOLD=K, K is configurable parameter, has defined the thresholding of amplitude of variation.The span of K value is 1≤K≤64.
When sync-tip amp identical with the variation tendency of black level, namely TIP_AMP_DIFF_SIG and BLACK_DIFF_SIG be both+number, or be both-number, TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG then satisfies condition.Namely when sync-tip amp increment accumulation value and black level increment accumulation value all be on the occasion of or all are negative values, TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG can satisfy condition.If do not satisfy this condition, mean that then the variation tendency of sync-tip amp and black level is not identical, the CVBS signal of this moment does not have distorted, finishes to judge.
If satisfy condition TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG, then sync-tip amp is identical with the variation tendency of black level; Whether continue to judge sync-tip amp amplitude of variation and black level amplitude of variation simultaneously greater than the K value, if the while greater than the K value then illustrate that sync-tip amp and black level have essentially identical variable quantity, CVBS signal distorted then.
If the amplitude of variation of sync-tip amp and black level is not simultaneously greater than the K value, then sync-tip amp and black level do not have significant change trend, do not judge whether distorted of signal.
Step 305, marking signal distortion.
When satisfying the condition that signal distortion occurs with the DISTOR_FLAG set of field mark position, allow AGC stop gain adjustment by DISTOR_FLAG, and in the process of rear end vision signal adjustment, will abandon with the CVBS of DISTOR_FLAG, guarantee the viewing effect of vision signal.
Can also in a field signal, add up in addition the number of times DISTOR_COUNT that distortion occurs.As DISTOR_COUNT during greater than threshold value, in the process of rear end vision signal adjustment, will abandon with the CVBS of DISTOR_COUNT, guarantee the viewing effect of vision signal.
DISTOR_FLAG and DISTOR_COUNT can be used as the judgement symbol that signal distortion occurs, and for different distortion number of times the rear end vision signal are adjusted.Automatic clear when DISTOR_FLAG and DISTOR_COUNT finish in field synchronization.
Are a kind of apparatus structure schematic diagrames of judging mobile simulation CVBS video signal distortion of the embodiment of the invention referring to accompanying drawing 4, specifically comprise:
Control module 401 is used for judging that sync-tip amp is identical with the variation tendency of black level, with described variation tendency input judge module;
Control module 401 comprises computing unit 4011 and comparing unit 4012,
Computing unit 4011 is used for execution in step 301 to step 303;
Comparing unit 4012, if sync-tip amp increment accumulation value and black level increment accumulation value all be on the occasion of or all are negative values, described comparing unit determines that described sync-tip amp is identical with the variation tendency of described black level; Otherwise described comparing unit determines that described sync-tip amp is different with the variation tendency of described black level, finishes.
Control module 401 also comprises memory cell 4013
Memory cell 4013, storage TIP_AMP_DIFF_SIG and BLACK_DIFF_SIG;
Comparing unit 4012 is further used for, and judges TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG, then described sync-tip amp increment accumulation value and described black level increment accumulation value all be on the occasion of or all are negative values.
Judge module 402, execution in step 304.
Obtain sync-tip amp amplitude of variation by the capable sync-tip amp of N increment accumulation value.Increment accumulation value by the capable blacklevel of N obtains black level amplitude of variation, has determined the scope that sync-tipamp and black level change from quantitative angle, and whether distorted provides basis for estimation for CVBS.
Mark module 403, judge module are judged described CVBS distorted, and mark module is used for set line flag position DISTOR_FLAG.
Statistical module 404, judge module are judged described CVBS distorted, and statistical module is used for the number of times DISTOR_COUNT that statistics one field distortion occurs.
When sync-tip amp identical with the variation tendency of black level, namely TIP_AMP_DIFF_SIG and BLACK_DIFF_SIG be both+number, or be both-number, TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG then satisfies condition.Namely when sync-tip amp increment accumulation value and black level increment accumulation value all be on the occasion of or all are negative values, TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG can satisfy condition.If do not satisfy this condition, mean that then the variation tendency of sync-tip amp and black level is not identical, the CVBS signal of this moment does not have distorted, finishes to judge.
If satisfy condition TIP_AMP_DIFF_SIG=BLACK_DIFF_SIG, then sync-tip amp is identical with the variation tendency of black level; Whether continue to judge sync-tip amp amplitude of variation and black level amplitude of variation simultaneously greater than the K value, if the while greater than the K value then illustrate that sync-tip amp and black level have essentially identical variable quantity, CVBS signal distorted then.
If the amplitude that sync-tip amp and black level change not is simultaneously greater than the K value, then sync-tip amp and black level do not have significant change trend, do not judge whether distorted of signal
The above is preferred embodiment of the present invention only, is not for limiting protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.