ATV: use skip instead of leap for the horizontal sync skip mode

This commit is contained in:
f4exb 2017-04-08 05:35:09 +02:00
parent f2d2978edc
commit 6f9a044ddc
8 changed files with 76 additions and 25 deletions

View File

@ -427,9 +427,9 @@ void ATVDemod::demod(Complex& c)
//********** process video sample **********
if (m_objRunning.m_enmATVStandard == ATVStdHLeap)
if (m_objRunning.m_enmATVStandard == ATVStdHSkip)
{
processHLeap(fltVal, intVal);
processHSkip(fltVal, intVal);
}
else
{
@ -645,7 +645,7 @@ void ATVDemod::applyStandard()
{
switch(m_objConfig.m_enmATVStandard)
{
case ATVStdHLeap:
case ATVStdHSkip:
// what is left in a line for the image
m_intNumberOfSyncLines = 0;
m_intNumberOfBlackLines = 0;

View File

@ -52,7 +52,7 @@ public:
ATVStd405,
ATVStdShortInterleaved,
ATVStdShort,
ATVStdHLeap
ATVStdHSkip
};
enum ATVModulation {
@ -425,7 +425,7 @@ private:
void demod(Complex& c);
static float getRFBandwidthDivisor(ATVModulation modulation);
inline void processHLeap(float& fltVal, int& intVal)
inline void processHSkip(float& fltVal, int& intVal)
{
m_objRegisteredATVScreen->setDataColor(m_intColIndex - m_intNumberSaplesPerHSync + m_intNumberSamplePerTop, intVal, intVal, intVal);
@ -448,7 +448,7 @@ private:
if (m_blnSynchroDetected)
{
if (m_intSampleIndex >= (3 * m_objRunningPrivate.m_intNumberSamplePerLine)/2) // first after leap
if (m_intSampleIndex >= (3 * m_objRunningPrivate.m_intNumberSamplePerLine)/2) // first after skip
{
//qDebug("VSync: %d %d %d", m_intColIndex, m_intSampleIndex, m_intLineIndex);
m_intAvgColIndex = m_intColIndex;

View File

@ -666,7 +666,7 @@
</item>
<item>
<property name="text">
<string>HLeap</string>
<string>HSkip</string>
</property>
</item>
</widget>

View File

@ -44,14 +44,12 @@ This is the channel sample rate in kS/s. For good horizontal synchronization you
N = S / (l &#215; F)
The number of points should be a bit larger than the number of lines up to 240 lines then it can be a bit smaller to give an acceptable image quality.
&#9758; The number of points should be a bit larger than the number of lines up to 240 lines then it can be a bit smaller to give an acceptable image quality.
<h3>5: Number of points (or samples) per line</h3>
This is the number of points or samples per complete line including sync and padding. This is derived from the sample rate and line frequency as the ratio of the two. For example with a 625 lines &#215; 25 FPS signal the line frequency is 15625 Hz. If the channel sample rate is 1500 kS/s this yields 1500000/15625 = 96 points. If the ratio is not an integer then the integer part is taken.
Picture definition depends largely on this number and the larger the better but it is useless to have a much greater number than the number of points per line used in transmission.
<h3>6: BFO PLL lock indicator</h3>
&#9888; this is experimental.
@ -79,7 +77,9 @@ Average total power in dB relative to a &#177;1.0 amplitude signal generated in
- USB: &#9888; USB demodulation synchronous to the carrier (experimental)
- LSB: &#9888; LSB demodulation synchronous to the carrier (experimental)
For FM choose the algorithm that best suits your conditions. &#9888; only FM3 is accurate with regard to FM deviation (see 10).
For FM choose the algorithm that best suits your conditions.
&#9758; only FM3 is accurate with regard to FM deviation (see 10).
&#9888; USB and LSB modes are experimental and do not show good results for sample rates greater than 1 MS/s. Adjusting the BFO can be picky and unstable.
@ -87,7 +87,7 @@ For FM choose the algorithm that best suits your conditions. &#9888; only FM3 is
Using this button you can adjust the nominal FM deviation as a percentage of the channel bandwidth that is displayed on the right of the button. When a signal with this deviation is received the demodulated signal is in the range -0.5/+0.5 which is shifted to a 0/1 range video signal.
&#9888; The value is accurate only with the atan2 differential demodulator i.e. FM3. With FM1 and FM2 you will have to adjust it for best image results. You can use the scope as an aid to try to fit the video signal in the 0/1 range.
&#9758; The value is accurate only with the atan2 differential demodulator i.e. FM3. With FM1 and FM2 you will have to adjust it for best image results. You can use the scope as an aid to try to fit the video signal in the 0/1 range.
<h3>11: FFT asymmetrical filter toggle</h3>
@ -130,11 +130,11 @@ This combo lets you set the TV standard type. This sets the number of lines per
- PAL405: this is not the British standard. It just follows the same scheme as the two above but with only 7 black lines per half frame
- ShI: this is an experimental mode that uses the least possible vertical sync lines as possible. That is one line for a long synchronization pulse and one line at a higher level (0.7) to reset the vertical sync condition. Thus only 2 lines are consumed for vertical sync and the rest is left to the image. In this mode the frames are interleaved
- ShNI: this is the same as above but with non interleaved frames.
- HLeap: this is the horizontal sync leap technique for vertical synchronization. This has been in use in the first TV experiments with a small number of lines. This method just skips one horizontal synchronization pluse to mark the last or the first line (here it is the last). This method does not use any full line for vertical sync and all lines can be used for the image thus it suits the modes with a small number of lines. With more lines however the risk of missing pulses gets higher in adverse conditions because the pulses get shorter and may get swallowed by a stray pulse or a stray pulse can be taken for a valid one. In this case two images might get out of sync instead of just two lines. In practice this is suitable up to 90~120 lines.
- HSkip: this is the horizontal sync skip technique for vertical synchronization. This has been in use in the first TV experiments with a small number of lines. This method just skips one horizontal synchronization pluse to mark the last or the first line (here it is the last). This method does not use any full line for vertical sync and all lines can be used for the image thus it suits the modes with a small number of lines. With more lines however the risk of missing pulses gets higher in adverse conditions because the pulses get shorter and may get swallowed by a stray pulse or a stray pulse can be taken for a valid one. In this case two images might get out of sync instead of just two lines. In practice this is suitable up to 90~120 lines.
When the standard chosen matches the standard of transmission the image should appear in full size and proper aspect ratio.
All standards are supposed to work for any number of lines. You may experiment with any and see if it fits your purpose. However it will be easier to obtain good or optimal results in general with the following recommendations:
&#9758; All standards are supposed to work for any number of lines. You may experiment with any and see if it fits your purpose. However it will be easier to obtain good or optimal results in general with the following recommendations:
<table>
<tr>
@ -167,19 +167,19 @@ All standards are supposed to work for any number of lines. You may experiment w
</tr>
<tr>
<td>120</td>
<td>ShNI, HLeap</td>
<td>ShNI, HSkip</td>
</tr>
<tr>
<td>90</td>
<td>ShNI, HLeap</td>
<td>ShNI, HSkip</td>
</tr>
<tr>
<td>60</td>
<td>HLeap</td>
<td>HSkip</td>
</tr>
<tr>
<td>32</td>
<td>HLeap</td>
<td>HSkip</td>
</tr>
</table>
@ -235,6 +235,8 @@ This is the length in time units of a horizontal or line synchronization pulse.
Similarly to the line length slider the slider step is set to a sample period in order to ensure that the adjustment is done with the best possible precision. The middle position of the slider sets the nominal value and the slider step appears in the tooltip.
&#9758; You can move this control back and forth in case you have synchronizing issues as it can help the synchronization system to get back into pace.
<h2>C: Image</h2>
<h3>Monitor</h3>
@ -251,6 +253,6 @@ Select scope with the scope tab on the left side.
![ATV Demodulator plugin GUI Video scope](../../../doc/img/ATVDemod_pluginC_scope.png)
This is a scope widget fed with the video signal. Controls of the scope are the same as with the ChannelAnalyzerNG plugin. Please refer to the [source folder](https://github.com/f4exb/sdrangel/tree/master/plugins/channelrx/chanalyzerng) of this plugin for more details.
This is a scope widget fed with the video signal. Controls of the scope are the same as with the ChannelAnalyzerNG plugin. Please refer to [this plugin](https://github.com/f4exb/sdrangel/tree/master/plugins/channelrx/chanalyzerng) for more details.
Note that the video signal is a real signal so the imaginary part is always null. Therefore only the "Real" mode for both the trace and the trigger is interesting.

View File

@ -271,7 +271,7 @@ Complex& ATVMod::modulateVestigialSSB(Real& sample)
void ATVMod::pullVideo(Real& sample)
{
if ((m_running.m_atvStd == ATVStdHLeap) && (m_lineCount == m_nbLines2)) // last line in leap mode
if ((m_running.m_atvStd == ATVStdHSkip) && (m_lineCount == m_nbLines2)) // last line in skip mode
{
pullImageLine(sample, true); // pull image line without sync
}
@ -829,7 +829,7 @@ void ATVMod::applyStandard()
switch(m_config.m_atvStd)
{
case ATVStdHLeap:
case ATVStdHSkip:
m_nbImageLines = m_nbLines; // lines less the total number of sync lines
m_nbImageLines2 = m_nbImageLines; // force non interleaved for vbars
m_interleaved = false;

View File

@ -45,7 +45,7 @@ public:
ATVStd405,
ATVStdShortInterleaved,
ATVStdShort,
ATVStdHLeap,
ATVStdHSkip,
} ATVStd;
typedef enum

View File

@ -691,7 +691,7 @@
</item>
<item>
<property name="text">
<string>HLeap</string>
<string>HSkip</string>
</property>
</item>
</widget>

View File

@ -115,7 +115,56 @@ This controls the frame synchronization schem and number of black lines:
- PAL405: this loosely corresponds to the British 405 lines system and is similar to PAL for synchronization. This mode has only 7 black lines.
- ShI: this is an experimental mode that uses the least possible vertical sync lines as possible. That is one line for a long synchronization pulse and one line at a higher level (0.7) to reset the vertical sync condition. Thus only 2 lines are consumed for vertical sync and the rest is left to the image. In this mode the frames are interleaved
- ShNI: this is the same as above but with non interleaved frames.
- HLeap: this is the horizontal sync leap technique for vertical synchronization. This has been in use in the first TV experiments with a small number of lines. This method just skips one horizontal synchronization pluse to mark the last or the first line (here it is the last). This method does not use any full line for vertical sync and all lines can be used for the image thus it suits the modes with a small number of lines. With more lines however the risk of missing pulses gets higher in adverse conditions because the pulses get shorter and may get swallowed by a stray pulse or a stray pulse can be taken for a valid one. In this case two images might get out of sync instead of just two lines. In practice this is suitable up to 90~120 lines.
- HSkip: this is the horizontal sync skip technique for vertical synchronization. This has been in use in the first TV experiments with a small number of lines. This method just skips one horizontal synchronization pluse to mark the last or the first line (here it is the last). This method does not use any full line for vertical sync and all lines can be used for the image thus it suits the modes with a small number of lines. With more lines however the risk of missing pulses gets higher in adverse conditions because the pulses get shorter and may get swallowed by a stray pulse or a stray pulse can be taken for a valid one. In this case two images might get out of sync instead of just two lines. In practice this is suitable up to 90~120 lines.
&#9758; All standards are supposed to work for any number of lines. You may experiment with any and see if it fits your purpose. However it will be easier to obtain good or optimal results in general with the following recommendations:
<table>
<tr>
<th>#lines</th>
<th>standard</th>
</tr>
<tr>
<td>625</td>
<td>PAL625, PAL525, PAL405</td>
</tr>
<tr>
<td>525</td>
<td>PAL525, PAL405</td>
</tr>
<tr>
<td>405</td>
<td>PAL405, ShI, ShNI</td>
</tr>
<tr>
<td>343</td>
<td>ShI, ShNI</td>
</tr>
<tr>
<td>240</td>
<td>ShNI</td>
</tr>
<tr>
<td>180</td>
<td>ShNI</td>
</tr>
<tr>
<td>120</td>
<td>ShNI, HSkip</td>
</tr>
<tr>
<td>90</td>
<td>ShNI, HSkip</td>
</tr>
<tr>
<td>60</td>
<td>HSkip</td>
</tr>
<tr>
<td>32</td>
<td>HSkip</td>
</tr>
</table>
<h2>A.10: Input source</h2>
@ -143,7 +192,7 @@ This button lets you adjust the luminance level of the "blank" screens displays,
The button toggles the display of an overlay text on a still image, or a video signal from a file or a camera. Note that for still images you will have to toggle off/on this button to take any change of text or text brightness into account. The brightness level of the text is selected with the luminance adjust button (10). The number of characters is limited to 12.
The text area lers you type a text up to 12 characters.
The text area lets you type a text up to 12 characters.
<h2>6. Still picture file select</h2>