mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-15 12:51:49 -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
|
||||
{
|
||||
m_objScopeSink->feed(m_objScopeSampleBuffer.begin(), m_objScopeSampleBuffer.end(), false); // m_ssb = positive only
|
||||
}
|
||||
|
||||
m_objScopeSampleBuffer.clear();
|
||||
}
|
||||
|
||||
if (ptrBufferToRelease != 0)
|
||||
{
|
||||
@ -404,10 +403,12 @@ void ATVDemod::demod(Complex& c)
|
||||
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 = (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;
|
||||
|
||||
|
@ -385,6 +385,8 @@ private:
|
||||
AvgExpInt m_objAvgColIndex;
|
||||
int m_intAvgColIndex;
|
||||
|
||||
SampleVector m_sampleBuffer;
|
||||
|
||||
//*************** RF ***************
|
||||
|
||||
MovingAverage<double> m_objMagSqAverage;
|
||||
|
Loading…
Reference in New Issue
Block a user