mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-24 19:00:36 -05:00
ATV Demod: optimize scope feed
This commit is contained in:
parent
40b5e7467f
commit
29b691a5af
@ -221,9 +221,8 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
if ((m_objRunning.m_intVideoTabIndex == 1) && (m_objScopeSink != 0)) // do only if scope tab is selected and scope is available
|
if ((m_objRunning.m_intVideoTabIndex == 1) && (m_objScopeSink != 0)) // do only if scope tab is selected and scope is available
|
||||||
{
|
{
|
||||||
m_objScopeSink->feed(m_objScopeSampleBuffer.begin(), m_objScopeSampleBuffer.end(), false); // m_ssb = positive only
|
m_objScopeSink->feed(m_objScopeSampleBuffer.begin(), m_objScopeSampleBuffer.end(), false); // m_ssb = positive only
|
||||||
}
|
|
||||||
|
|
||||||
m_objScopeSampleBuffer.clear();
|
m_objScopeSampleBuffer.clear();
|
||||||
|
}
|
||||||
|
|
||||||
if (ptrBufferToRelease != 0)
|
if (ptrBufferToRelease != 0)
|
||||||
{
|
{
|
||||||
@ -404,10 +403,12 @@ void ATVDemod::demod(Complex& c)
|
|||||||
fltVal = 0.0f;
|
fltVal = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
fltVal = (fltVal < -1.0f) ? -1.0f : (fltVal > 1.0f) ? 1.0f : fltVal;
|
|
||||||
m_objScopeSampleBuffer.push_back(Sample(fltVal*32767.0f, 0.0f));
|
|
||||||
|
|
||||||
fltVal = m_objRunning.m_blnInvertVideo ? 1.0f - fltVal : fltVal;
|
fltVal = m_objRunning.m_blnInvertVideo ? 1.0f - fltVal : fltVal;
|
||||||
|
fltVal = (fltVal < -1.0f) ? -1.0f : (fltVal > 1.0f) ? 1.0f : fltVal;
|
||||||
|
|
||||||
|
if ((m_objRunning.m_intVideoTabIndex == 1) && (m_objScopeSink != 0)) { // feed scope buffer only if scope is present and visible
|
||||||
|
m_objScopeSampleBuffer.push_back(Sample(fltVal*32767.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
m_fltAmpLineAverage += fltVal;
|
m_fltAmpLineAverage += fltVal;
|
||||||
|
|
||||||
|
@ -385,6 +385,8 @@ private:
|
|||||||
AvgExpInt m_objAvgColIndex;
|
AvgExpInt m_objAvgColIndex;
|
||||||
int m_intAvgColIndex;
|
int m_intAvgColIndex;
|
||||||
|
|
||||||
|
SampleVector m_sampleBuffer;
|
||||||
|
|
||||||
//*************** RF ***************
|
//*************** RF ***************
|
||||||
|
|
||||||
MovingAverage<double> m_objMagSqAverage;
|
MovingAverage<double> m_objMagSqAverage;
|
||||||
|
Loading…
Reference in New Issue
Block a user