SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ATVDemod Class Reference

#include <atvdemod.h>

+ Inheritance diagram for ATVDemod:
+ Collaboration diagram for ATVDemod:

Classes

struct  ATVConfig
 
struct  ATVConfigPrivate
 
struct  ATVRFConfig
 
class  AvgExpInt
 
class  MsgConfigureATVDemod
 
class  MsgConfigureChannelizer
 
class  MsgConfigureRFATVDemod
 
class  MsgReportChannelSampleRateChanged
 
class  MsgReportEffectiveSampleRate
 

Public Types

enum  ATVStd {
  ATVStdPAL625, ATVStdPAL525, ATVStd405, ATVStdShortInterleaved,
  ATVStdShort, ATVStdHSkip
}
 
enum  ATVModulation {
  ATV_FM1, ATV_FM2, ATV_FM3, ATV_AM,
  ATV_USB, ATV_LSB, ATV_NONE
}
 
- Public Types inherited from ChannelAPI
enum  StreamType { StreamSingleSink, StreamSingleSource, StreamMIMO }
 < This is the same enum as in PluginInterface More...
 

Public Member Functions

 ATVDemod (DeviceAPI *deviceAPI)
 
 ~ATVDemod ()
 
virtual void destroy ()
 
void setScopeSink (BasebandSampleSink *scopeSink)
 
void configure (MessageQueue *objMessageQueue, float fltLineDurationUs, float fltTopDurationUs, float fltFramePerS, ATVStd enmATVStandard, int intNumberOfLines, float fltRatioOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, bool blnInvertVideo, int intVideoTabIndex)
 
void configureRF (MessageQueue *objMessageQueue, int64_t frequencyOffset, ATVModulation enmModulation, float fltRFBandwidth, float fltRFOppBandwidth, bool blnFFTFiltering, bool blndecimatorEnable, float fltBFOFrequency, float fmDeviation)
 
virtual void feed (const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool po)
 
virtual void start ()
 
virtual void stop ()
 
virtual bool handleMessage (const Message &cmd)
 Processing of a message. Returns true if message has actually been processed. More...
 
virtual void getIdentifier (QString &id)
 
virtual void getTitle (QString &title)
 
virtual qint64 getCenterFrequency () const
 Applies to a default stream. More...
 
virtual QByteArray serialize () const
 
virtual bool deserialize (const QByteArray &data)
 
virtual int getNbSinkStreams () const
 
virtual int getNbSourceStreams () const
 
virtual qint64 getStreamCenterFrequency (int streamIndex, bool sinkElseSource) const
 
void setTVScreen (TVScreen *objScreen)
 set by the GUI More...
 
int getSampleRate ()
 
int getEffectiveSampleRate ()
 
double getMagSq () const
 Beware this is scaled to 2^30. More...
 
bool getBFOLocked ()
 
- Public Member Functions inherited from BasebandSampleSink
 BasebandSampleSink ()
 
virtual ~BasebandSampleSink ()
 
MessageQueuegetInputMessageQueue ()
 Get the queue for asynchronous inbound communication. More...
 
virtual void setMessageQueueToGUI (MessageQueue *queue)
 
MessageQueuegetMessageQueueToGUI ()
 
- Public Member Functions inherited from ChannelAPI
 ChannelAPI (const QString &name, StreamType streamType)
 
virtual ~ChannelAPI ()
 
virtual void setName (const QString &name)
 
virtual const QString & getName () const
 
virtual int webapiSettingsGet (SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
 
virtual int webapiSettingsPutPatch (bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
 
virtual int webapiReportGet (SWGSDRangel::SWGChannelReport &response, QString &errorMessage)
 
int getIndexInDeviceSet () const
 
void setIndexInDeviceSet (int indexInDeviceSet)
 
int getDeviceSetIndex () const
 
void setDeviceSetIndex (int deviceSetIndex)
 
DeviceAPIgetDeviceAPI ()
 
void setDeviceAPI (DeviceAPI *deviceAPI)
 
uint64_t getUID () const
 
StreamType getStreamType () const
 

Static Public Attributes

static const QString m_channelIdURI = "sdrangel.channel.demodatv"
 
static const QString m_channelId = "ATVDemod"
 

Private Slots

void channelSampleRateChanged ()
 

Private Member Functions

void applySettings ()
 
void applyStandard ()
 
void demod (Complex &c)
 
void processHSkip (float &fltVal, int &intVal)
 
void processClassic (float &fltVal, int &intVal)
 

Static Private Member Functions

static float getRFBandwidthDivisor (ATVModulation modulation)
 

Private Attributes

DeviceAPIm_deviceAPI
 
ThreadedBasebandSampleSinkm_threadedChannelizer
 
DownChannelizerm_channelizer
 
BasebandSampleSinkm_scopeSink
 
SampleVector m_scopeSampleBuffer
 
TVScreenm_registeredTVScreen
 
int m_intNumberSamplePerTop
 
int m_intNumberOfLines
 
int m_intNumberOfSyncLines
 this is the number of non displayable lines at the start of a frame. First displayable row comes next. More...
 
int m_intNumberOfBlackLines
 this is the total number of lines not part of the image and is used for vertical screen size More...
 
int m_intNumberOfEqLines
 number of equalizing lines both whole and partial More...
 
int m_intNumberSamplePerLineSignals
 number of samples in the non image part of the line (signals) More...
 
int m_intNumberSaplesPerHSync
 number of samples per horizontal synchronization pattern (pulse + back porch) More...
 
bool m_interleaved
 interleaved image More...
 
int m_intImageIndex
 
int m_intSynchroPoints
 
bool m_blnSynchroDetected
 
bool m_blnVerticalSynchroDetected
 
float m_fltAmpLineAverage
 
float m_fltEffMin
 
float m_fltEffMax
 
float m_fltAmpMin
 
float m_fltAmpMax
 
float m_fltAmpDelta
 
float m_fltBufferI [6]
 
float m_fltBufferQ [6]
 
int m_intColIndex
 
int m_intSampleIndex
 
int m_intRowIndex
 
int m_intLineIndex
 
AvgExpInt m_objAvgColIndex
 
int m_intAvgColIndex
 
SampleVector m_sampleBuffer
 
MovingAverageUtil< double, double, 32 > m_objMagSqAverage
 
NCO m_nco
 
SimplePhaseLock m_bfoPLL
 
SecondOrderRecursiveFilter m_bfoFilter
 
Interpolator m_interpolator
 
Real m_interpolatorDistance
 
Real m_interpolatorDistanceRemain
 
fftfiltm_DSBFilter
 
Complexm_DSBFilterBuffer
 
int m_DSBFilterBufferIndex
 
PhaseDiscriminators m_objPhaseDiscri
 
ATVConfig m_running
 
ATVConfig m_config
 
ATVRFConfig m_rfRunning
 
ATVRFConfig m_rfConfig
 
ATVConfigPrivate m_runningPrivate
 
ATVConfigPrivate m_configPrivate
 
QMutex m_objSettingsMutex
 

Static Private Attributes

static const int m_ssbFftLen = 1024
 

Additional Inherited Members

- Protected Slots inherited from BasebandSampleSink
void handleInputMessages ()
 
- Protected Attributes inherited from BasebandSampleSink
MessageQueue m_inputMessageQueue
 Queue for asynchronous inbound communication. More...
 
MessageQueuem_guiMessageQueue
 Input message queue to the GUI. More...
 

Detailed Description

Definition at line 47 of file atvdemod.h.

Member Enumeration Documentation

◆ ATVModulation

Enumerator
ATV_FM1 

Classical frequency modulation with discriminator #1.

ATV_FM2 

Classical frequency modulation with discriminator #2.

ATV_FM3 

Classical frequency modulation with phase derivative discriminator.

ATV_AM 

Classical amplitude modulation.

ATV_USB 

AM with vestigial lower side band (main signal is in the upper side)

ATV_LSB 

AM with vestigial upper side band (main signal is in the lower side)

ATV_NONE 

No modulation just produces zeros.

Definition at line 63 of file atvdemod.h.

63  {
64  ATV_FM1,
65  ATV_FM2,
66  ATV_FM3,
67  ATV_AM,
68  ATV_USB,
69  ATV_LSB,
70  ATV_NONE
71  };
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
Classical frequency modulation with discriminator #2.
Definition: atvdemod.h:65
No modulation just produces zeros.
Definition: atvdemod.h:70
Classical frequency modulation with phase derivative discriminator.
Definition: atvdemod.h:66
Classical amplitude modulation.
Definition: atvdemod.h:67
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
Classical frequency modulation with discriminator #1.
Definition: atvdemod.h:64

◆ ATVStd

Enumerator
ATVStdPAL625 
ATVStdPAL525 
ATVStd405 
ATVStdShortInterleaved 
ATVStdShort 
ATVStdHSkip 

Definition at line 53 of file atvdemod.h.

Constructor & Destructor Documentation

◆ ATVDemod()

ATVDemod::ATVDemod ( DeviceAPI deviceAPI)

Definition at line 42 of file atvdemod.cpp.

References DeviceAPI::addChannelSink(), DeviceAPI::addChannelSinkAPI(), applyStandard(), channelSampleRateChanged(), m_channelId, m_channelizer, m_deviceAPI, m_DSBFilter, m_DSBFilterBuffer, m_fltBufferI, m_fltBufferQ, ATVDemod::ATVRFConfig::m_fltRFBandwidth, m_interleaved, m_intNumberOfLines, m_intSynchroPoints, m_objPhaseDiscri, m_rfConfig, m_ssbFftLen, m_threadedChannelizer, and PhaseDiscriminators::setFMScaling().

Referenced by ATVDemod::MsgReportChannelSampleRateChanged::MsgReportChannelSampleRateChanged().

42  :
44  m_deviceAPI(deviceAPI),
45  m_scopeSink(0),
48  m_intImageIndex(0),
50  m_blnSynchroDetected(false),
52  m_fltAmpLineAverage(0.0f),
53  m_fltEffMin(2000000000.0f),
54  m_fltEffMax(-2000000000.0f),
55  m_fltAmpMin(-2000000000.0f),
56  m_fltAmpMax(2000000000.0f),
57  m_fltAmpDelta(1.0),
58  m_intColIndex(0),
60  m_intRowIndex(0),
61  m_intLineIndex(0),
63  m_bfoPLL(200/1000000, 100/1000000, 0.01),
64  m_bfoFilter(200.0, 1000000.0, 0.9),
67  m_DSBFilter(0),
70  m_objSettingsMutex(QMutex::Recursive)
71 {
72  setObjectName(m_channelId);
73 
74  //*************** ATV PARAMETERS ***************
75  //m_intNumberSamplePerLine=0;
78  m_interleaved = true;
79 
80  m_DSBFilter = new fftfilt((2.0f * m_rfConfig.m_fltRFBandwidth) / 1000000, 2 * m_ssbFftLen); // arbitrary 1 MS/s sample rate
82  memset(m_DSBFilterBuffer, 0, sizeof(Complex)*(m_ssbFftLen));
83 
84  memset((void*)m_fltBufferI,0,6*sizeof(float));
85  memset((void*)m_fltBufferQ,0,6*sizeof(float));
86 
88 
89  applyStandard();
90 
91  m_channelizer = new DownChannelizer(this);
95 
96  connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
97 }
int m_intLineIndex
Definition: atvdemod.h:463
void addChannelSinkAPI(ChannelAPI *channelAPI, int streamIndex=0)
Definition: deviceapi.cpp:156
void setFMScaling(Real fmScaling)
Definition: phasediscri.h:42
static const QString m_channelIdURI
Definition: atvdemod.h:252
int m_intNumberSamplePerTop
Definition: atvdemod.h:431
float m_fltAmpDelta
Definition: atvdemod.h:455
AvgExpInt m_objAvgColIndex
Definition: atvdemod.h:465
float m_fltBufferI[6]
Definition: atvdemod.h:457
int m_DSBFilterBufferIndex
Definition: atvdemod.h:486
QMutex m_objSettingsMutex
Definition: atvdemod.h:503
float m_fltBufferQ[6]
Definition: atvdemod.h:458
static const QString m_channelId
Definition: atvdemod.h:253
int m_intSampleIndex
Definition: atvdemod.h:461
ChannelAPI(const QString &name, StreamType streamType)
Definition: channelapi.cpp:23
int m_intImageIndex
Definition: atvdemod.h:442
void applyStandard()
Definition: atvdemod.cpp:683
static const int m_ssbFftLen
Definition: atvdemod.h:487
ATVRFConfig m_rfConfig
Definition: atvdemod.h:498
ThreadedBasebandSampleSink * m_threadedChannelizer
Definition: atvdemod.h:419
SimplePhaseLock m_bfoPLL
Definition: atvdemod.h:475
Exposes a single sink stream (input, Rx)
Definition: channelapi.h:41
TVScreen * m_registeredTVScreen
Definition: atvdemod.h:428
BasebandSampleSink * m_scopeSink
Definition: atvdemod.h:424
int m_intRowIndex
Definition: atvdemod.h:462
PhaseDiscriminators m_objPhaseDiscri
Definition: atvdemod.h:490
void addChannelSink(ThreadedBasebandSampleSink *sink, int streamIndex=0)
Add a channel sink (Rx)
Definition: deviceapi.cpp:118
int m_intSynchroPoints
Definition: atvdemod.h:443
void channelSampleRateChanged()
Definition: atvdemod.cpp:774
Complex * m_DSBFilterBuffer
Definition: atvdemod.h:485
bool m_blnVerticalSynchroDetected
Definition: atvdemod.h:446
float m_fltEffMax
Definition: atvdemod.h:451
bool m_interleaved
interleaved image
Definition: atvdemod.h:438
int m_intColIndex
Definition: atvdemod.h:460
bool m_blnSynchroDetected
Definition: atvdemod.h:445
float m_fltAmpMin
Definition: atvdemod.h:453
SecondOrderRecursiveFilter m_bfoFilter
Definition: atvdemod.h:476
float m_fltAmpLineAverage
Definition: atvdemod.h:448
Real m_interpolatorDistanceRemain
Definition: atvdemod.h:481
float m_fltAmpMax
Definition: atvdemod.h:454
int m_intNumberOfLines
Definition: atvdemod.h:432
fftfilt * m_DSBFilter
Definition: atvdemod.h:484
std::complex< Real > Complex
Definition: dsptypes.h:43
Real m_interpolatorDistance
Definition: atvdemod.h:480
DeviceAPI * m_deviceAPI
Definition: atvdemod.h:418
DownChannelizer * m_channelizer
Definition: atvdemod.h:420
float m_fltEffMin
Definition: atvdemod.h:450
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~ATVDemod()

ATVDemod::~ATVDemod ( )

Definition at line 99 of file atvdemod.cpp.

References m_channelizer, m_deviceAPI, m_DSBFilter, m_DSBFilterBuffer, m_threadedChannelizer, DeviceAPI::removeChannelSink(), and DeviceAPI::removeChannelSinkAPI().

Referenced by ATVDemod::MsgReportChannelSampleRateChanged::MsgReportChannelSampleRateChanged().

100 {
103  delete m_threadedChannelizer;
104  delete m_channelizer;
105  delete m_DSBFilter;
106  delete m_DSBFilterBuffer;
107 }
void removeChannelSinkAPI(ChannelAPI *channelAPI, int streamIndex=0)
Definition: deviceapi.cpp:163
void removeChannelSink(ThreadedBasebandSampleSink *sink, int streamIndex=0)
Remove a channel sink (Rx)
Definition: deviceapi.cpp:127
ThreadedBasebandSampleSink * m_threadedChannelizer
Definition: atvdemod.h:419
Complex * m_DSBFilterBuffer
Definition: atvdemod.h:485
fftfilt * m_DSBFilter
Definition: atvdemod.h:484
DeviceAPI * m_deviceAPI
Definition: atvdemod.h:418
DownChannelizer * m_channelizer
Definition: atvdemod.h:420
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ applySettings()

void ATVDemod::applySettings ( )
private

Definition at line 541 of file atvdemod.cpp.

References applyStandard(), PhaseLock::configure(), Interpolator::create(), ATVDemod::MsgReportEffectiveSampleRate::create(), fftfilt::create_asym_filter(), BasebandSampleSink::getMessageQueueToGUI(), getRFBandwidthDivisor(), i, m_bfoFilter, m_bfoPLL, ATVDemod::ATVRFConfig::m_blndecimatorEnable, m_config, m_configPrivate, m_DSBFilter, m_DSBFilterBuffer, m_DSBFilterBufferIndex, ATVDemod::ATVConfig::m_enmATVStandard, ATVDemod::ATVRFConfig::m_enmModulation, ATVDemod::ATVRFConfig::m_fltBFOFrequency, ATVDemod::ATVConfig::m_fltFramePerS, ATVDemod::ATVConfig::m_fltLineDuration, ATVDemod::ATVConfig::m_fltRatioOfRowsToDisplay, ATVDemod::ATVRFConfig::m_fltRFBandwidth, ATVDemod::ATVRFConfig::m_fltRFOppBandwidth, ATVDemod::ATVConfig::m_fltTopDuration, ATVDemod::ATVRFConfig::m_fmDeviation, m_intColIndex, m_interpolator, m_interpolatorDistance, m_interpolatorDistanceRemain, ATVDemod::ATVRFConfig::m_intFrequencyOffset, m_intImageIndex, m_intNumberOfBlackLines, ATVDemod::ATVConfig::m_intNumberOfLines, m_intNumberOfLines, ATVDemod::ATVConfigPrivate::m_intNumberSamplePerLine, m_intNumberSamplePerLineSignals, m_intNumberSamplePerTop, m_intRowIndex, ATVDemod::ATVConfig::m_intSampleRate, ATVDemod::ATVConfigPrivate::m_intTVSampleRate, m_nco, m_objPhaseDiscri, m_objSettingsMutex, m_registeredTVScreen, m_rfConfig, m_rfRunning, m_running, m_runningPrivate, m_ssbFftLen, MessageQueue::push(), TVScreen::resizeTVScreen(), PhaseDiscriminators::setFMScaling(), NCO::setFreq(), and SecondOrderRecursiveFilter::setFrequencies().

Referenced by handleMessage().

542 {
543 
544  if (m_config.m_intSampleRate == 0)
545  {
546  return;
547  }
548 
549  bool forwardSampleRateChange = false;
550 
554  {
556  }
557 
562  {
563  m_objSettingsMutex.lock();
564 
565  int linesPerSecond = m_config.m_intNumberOfLines * m_config.m_fltFramePerS;
566 
567  int maxPoints = m_config.m_intSampleRate / linesPerSecond;
568  int i = maxPoints;
569 
570  for (; i > 0; i--)
571  {
572  if ((i * linesPerSecond) % 10 == 0)
573  break;
574  }
575 
576  int nbPointsPerRateUnit = i == 0 ? maxPoints : i;
577  m_configPrivate.m_intTVSampleRate = nbPointsPerRateUnit * linesPerSecond;
578 
580  {
582  }
583  else
584  {
586  m_interpolatorDistance = 1.0f;
587  }
588 
593  3.0);
594  m_objSettingsMutex.unlock();
595  }
596 
604  {
605  m_objSettingsMutex.lock();
606 
608 
609  applyStandard();
610 
613 
615  {
616  //m_registeredTVScreen->setRenderImmediate(!(m_config.m_fltFramePerS > 25.0f));
620  }
621 
622  qDebug() << "ATVDemod::applySettings:"
623  << " m_fltLineDuration: " << m_config.m_fltLineDuration
624  << " m_fltFramePerS: " << m_config.m_fltFramePerS
625  << " m_intNumberOfLines: " << m_intNumberOfLines
626  << " m_intNumberSamplePerLine: " << m_configPrivate.m_intNumberSamplePerLine
627  << " m_intNumberOfBlackLines: " << m_intNumberOfBlackLines;
628 
629  m_intImageIndex = 0;
630  m_intColIndex=0;
631  m_intRowIndex=0;
632 
633  m_objSettingsMutex.unlock();
634  }
635 
640  {
641  forwardSampleRateChange = true;
642  }
643 
647  {
648  m_objSettingsMutex.lock();
651  memset(m_DSBFilterBuffer, 0, sizeof(Complex)*(m_ssbFftLen));
653  m_objSettingsMutex.unlock();
654  }
655 
658  {
661  0.01);
663  }
664 
666  {
668  }
669 
673 
674  if (forwardSampleRateChange && getMessageQueueToGUI())
675  {
677  MsgReportEffectiveSampleRate *report;
679  getMessageQueueToGUI()->push(report);
680  }
681 }
ATVConfigPrivate m_runningPrivate
Definition: atvdemod.h:500
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
void push(Message *message, bool emitSignal=true)
Push message onto queue.
ATVStd m_enmATVStandard
Definition: atvdemod.h:76
int64_t m_intFrequencyOffset
Definition: atvdemod.h:109
void create(int phaseSteps, double sampleRate, double cutoff, double nbTapsPerPhase=4.5)
void setFMScaling(Real fmScaling)
Definition: phasediscri.h:42
int m_intNumberSamplePerTop
Definition: atvdemod.h:431
void configure(Real freq, Real bandwidth, Real minsignal)
Definition: phaselock.cpp:87
static MsgReportEffectiveSampleRate * create(int sampleRate, int nbPointsPerLine)
Definition: atvdemod.h:159
int m_intNumberOfBlackLines
this is the total number of lines not part of the image and is used for vertical screen size ...
Definition: atvdemod.h:434
float m_fltRatioOfRowsToDisplay
Definition: atvdemod.h:81
void resizeTVScreen(int intCols, int intRows)
Definition: tvscreen.cpp:86
Interpolator m_interpolator
Definition: atvdemod.h:479
float m_fltTopDuration
Definition: atvdemod.h:79
int m_DSBFilterBufferIndex
Definition: atvdemod.h:486
void setFrequencies(float samplingFrequency, float centerFrequency)
QMutex m_objSettingsMutex
Definition: atvdemod.h:503
float m_fltFramePerS
Definition: atvdemod.h:80
ATVConfig m_running
Definition: atvdemod.h:494
NCO m_nco
Definition: atvdemod.h:474
int m_intNumberSamplePerLineSignals
number of samples in the non image part of the line (signals)
Definition: atvdemod.h:436
int32_t i
Definition: decimators.h:244
int m_intImageIndex
Definition: atvdemod.h:442
void applyStandard()
Definition: atvdemod.cpp:683
static const int m_ssbFftLen
Definition: atvdemod.h:487
static float getRFBandwidthDivisor(ATVModulation modulation)
Definition: atvdemod.cpp:758
void setFreq(Real freq, Real sampleRate)
Definition: nco.cpp:49
ATVRFConfig m_rfConfig
Definition: atvdemod.h:498
ATVConfigPrivate m_configPrivate
Definition: atvdemod.h:501
SimplePhaseLock m_bfoPLL
Definition: atvdemod.h:475
MessageQueue * getMessageQueueToGUI()
ATVConfig m_config
Definition: atvdemod.h:495
ATVModulation m_enmModulation
Definition: atvdemod.h:110
TVScreen * m_registeredTVScreen
Definition: atvdemod.h:428
int m_intRowIndex
Definition: atvdemod.h:462
PhaseDiscriminators m_objPhaseDiscri
Definition: atvdemod.h:490
float m_fltLineDuration
Definition: atvdemod.h:78
Complex * m_DSBFilterBuffer
Definition: atvdemod.h:485
int m_intColIndex
Definition: atvdemod.h:460
SecondOrderRecursiveFilter m_bfoFilter
Definition: atvdemod.h:476
void create_asym_filter(float fopp, float fin)
two different filters for in band and opposite band
Definition: fftfilt.cpp:174
Real m_interpolatorDistanceRemain
Definition: atvdemod.h:481
int m_intNumberOfLines
Definition: atvdemod.h:432
fftfilt * m_DSBFilter
Definition: atvdemod.h:484
std::complex< Real > Complex
Definition: dsptypes.h:43
float Real
Definition: dsptypes.h:42
Real m_interpolatorDistance
Definition: atvdemod.h:480
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyStandard()

void ATVDemod::applyStandard ( )
private

Definition at line 683 of file atvdemod.cpp.

References ATVStd405, ATVStdHSkip, ATVStdPAL525, ATVStdPAL625, ATVStdShort, ATVStdShortInterleaved, m_config, ATVDemod::ATVConfig::m_enmATVStandard, ATVDemod::ATVConfig::m_fltLineDuration, m_interleaved, m_intNumberOfBlackLines, m_intNumberOfEqLines, m_intNumberOfSyncLines, m_intNumberSamplePerLineSignals, m_intNumberSaplesPerHSync, and ATVDemod::ATVConfig::m_intSampleRate.

Referenced by applySettings(), and ATVDemod().

684 {
685  switch(m_config.m_enmATVStandard)
686  {
687  case ATVStdHSkip:
688  // what is left in a line for the image
691  m_intNumberOfEqLines = 0; // not applicable
692  m_interleaved = false;
693  break;
694  case ATVStdShort:
695  // what is left in a line for the image
699  m_interleaved = false;
700  break;
702  // what is left in a line for the image
706  m_interleaved = true;
707  break;
708  case ATVStd405: // Follows loosely the 405 lines standard
709  // what is left in a ine for the image
710  m_intNumberOfSyncLines = 24; // (15+7)*2 - 20
711  m_intNumberOfBlackLines = 28; // above + 4
713  m_interleaved = true;
714  break;
715  case ATVStdPAL525: // Follows PAL-M standard
716  // what is left in a 64/1.008 us line for the image
717  m_intNumberOfSyncLines = 40; // (15+15)*2 - 20
718  m_intNumberOfBlackLines = 44; // above + 4
720  m_interleaved = true;
721  break;
722  case ATVStdPAL625: // Follows PAL-B/G/H standard
723  default:
724  // what is left in a 64 us line for the image
725  m_intNumberOfSyncLines = 44; // (15+17)*2 - 20
726  m_intNumberOfBlackLines = 48; // above + 4
728  m_interleaved = true;
729  }
730 
731  // for now all standards apply this
732  m_intNumberSamplePerLineSignals = (int) ((12.0f/64.0f)*m_config.m_fltLineDuration * m_config.m_intSampleRate); // 12.0 = 7.3 + 4.7
733  m_intNumberSaplesPerHSync = (int) ((9.6f/64.0f)*m_config.m_fltLineDuration * m_config.m_intSampleRate); // 9.4 = 4.7 + 4.7
734 }
ATVStd m_enmATVStandard
Definition: atvdemod.h:76
int m_intNumberOfEqLines
number of equalizing lines both whole and partial
Definition: atvdemod.h:435
int m_intNumberOfBlackLines
this is the total number of lines not part of the image and is used for vertical screen size ...
Definition: atvdemod.h:434
int m_intNumberSamplePerLineSignals
number of samples in the non image part of the line (signals)
Definition: atvdemod.h:436
int m_intNumberSaplesPerHSync
number of samples per horizontal synchronization pattern (pulse + back porch)
Definition: atvdemod.h:437
ATVConfig m_config
Definition: atvdemod.h:495
float m_fltLineDuration
Definition: atvdemod.h:78
bool m_interleaved
interleaved image
Definition: atvdemod.h:438
int m_intNumberOfSyncLines
this is the number of non displayable lines at the start of a frame. First displayable row comes next...
Definition: atvdemod.h:433
+ Here is the caller graph for this function:

◆ channelSampleRateChanged

void ATVDemod::channelSampleRateChanged ( )
privateslot

Definition at line 774 of file atvdemod.cpp.

References ATVDemod::MsgReportChannelSampleRateChanged::create(), DownChannelizer::getInputSampleRate(), BasebandSampleSink::getMessageQueueToGUI(), m_channelizer, and MessageQueue::push().

Referenced by ATVDemod().

775 {
776  qDebug("ATVDemod::channelSampleRateChanged");
777  if (getMessageQueueToGUI())
778  {
779  MsgReportChannelSampleRateChanged *msg = MsgReportChannelSampleRateChanged::create(m_channelizer->getInputSampleRate());
780  getMessageQueueToGUI()->push(msg);
781  }
782 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static MsgReportChannelSampleRateChanged * create(int sampleRate)
Definition: atvdemod.h:181
int getInputSampleRate() const
MessageQueue * getMessageQueueToGUI()
DownChannelizer * m_channelizer
Definition: atvdemod.h:420
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ configure()

void ATVDemod::configure ( MessageQueue objMessageQueue,
float  fltLineDurationUs,
float  fltTopDurationUs,
float  fltFramePerS,
ATVStd  enmATVStandard,
int  intNumberOfLines,
float  fltRatioOfRowsToDisplay,
float  fltVoltLevelSynchroTop,
float  fltVoltLevelSynchroBlack,
bool  blnHSync,
bool  blnVSync,
bool  blnInvertVideo,
int  intVideoTabIndex 
)

Definition at line 114 of file atvdemod.cpp.

References ATVDemod::MsgConfigureATVDemod::create(), and MessageQueue::push().

Referenced by ATVDemodGUI::applySettings(), and setScopeSink().

128 {
130  fltLineDurationUs,
131  fltTopDurationUs,
132  fltFramePerS,
133  enmATVStandard,
134  intNumberOfLines,
135  fltRatioOfRowsToDisplay,
136  fltVoltLevelSynchroTop,
137  fltVoltLevelSynchroBlack,
138  blnHSync,
139  blnVSync,
140  blnInvertVideo,
141  intVideoTabIndex);
142  objMessageQueue->push(msgCmd);
143 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static MsgConfigureATVDemod * create(float fltLineDurationUs, float fltTopDurationUs, float fltFramePerS, ATVStd enmATVStandard, int intNumberOfLines, float fltRatioOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, bool blnInvertVideo, int intVideoTabIndex)
Definition: atvdemod.h:275
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ configureRF()

void ATVDemod::configureRF ( MessageQueue objMessageQueue,
int64_t  frequencyOffset,
ATVModulation  enmModulation,
float  fltRFBandwidth,
float  fltRFOppBandwidth,
bool  blnFFTFiltering,
bool  blndecimatorEnable,
float  fltBFOFrequency,
float  fmDeviation 
)

Definition at line 145 of file atvdemod.cpp.

References ATVDemod::MsgConfigureRFATVDemod::create(), and MessageQueue::push().

Referenced by ATVDemodGUI::applyRFSettings(), and setScopeSink().

155 {
157  frequencyOffset,
158  enmModulation,
159  fltRFBandwidth,
160  fltRFOppBandwidth,
161  blnFFTFiltering,
162  blnDecimatorEnable,
163  fltBFOFrequency,
164  fmDeviation);
165  objMessageQueue->push(msgCmd);
166 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static MsgConfigureRFATVDemod * create(int64_t frequencyOffset, ATVModulation enmModulation, float fltRFBandwidth, float fltRFOppBandwidth, bool blnFFTFiltering, bool blndecimatorEnable, int intBFOFrequency, float fmDeviation)
Definition: atvdemod.h:342
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ demod()

void ATVDemod::demod ( Complex c)
private

Definition at line 248 of file atvdemod.cpp.

References ATV_AM, ATV_FM1, ATV_FM2, ATV_FM3, ATV_LSB, ATV_USB, ATVStdHSkip, m_bfoFilter, m_bfoPLL, ATVDemod::ATVRFConfig::m_blnFFTFiltering, ATVDemod::ATVConfig::m_blnInvertVideo, m_DSBFilter, m_DSBFilterBuffer, m_DSBFilterBufferIndex, ATVDemod::ATVConfig::m_enmATVStandard, ATVDemod::ATVRFConfig::m_enmModulation, m_fltAmpDelta, m_fltAmpLineAverage, m_fltAmpMin, m_fltBufferI, m_fltBufferQ, m_fltEffMax, m_fltEffMin, ATVDemod::ATVConfig::m_fltVoltLevelSynchroBlack, ATVDemod::ATVRFConfig::m_fmDeviation, ATVDemod::ATVConfig::m_intVideoTabIndex, m_objMagSqAverage, m_objPhaseDiscri, m_registeredTVScreen, m_rfRunning, m_running, m_scopeSampleBuffer, m_scopeSink, PhaseDiscriminators::phaseDiscriminatorDelta(), PhaseLock::process(), processClassic(), processHSkip(), SecondOrderRecursiveFilter::run(), fftfilt::runAsym(), SDR_RX_SCALEF, and sqrt().

Referenced by feed().

249 {
250  float fltDivSynchroBlack = 1.0f - m_running.m_fltVoltLevelSynchroBlack;
251  float fltNormI;
252  float fltNormQ;
253  float fltNorm;
254  float fltVal;
255  int intVal;
256 
257  //********** FFT filtering **********
258 
260  {
261  int n_out;
262  fftfilt::cmplx *filtered;
263 
264  n_out = m_DSBFilter->runAsym(c, &filtered, m_rfRunning.m_enmModulation != ATV_LSB); // all usb except explicitely lsb
265 
266  if (n_out > 0)
267  {
268  memcpy((void *) m_DSBFilterBuffer, (const void *) filtered, n_out*sizeof(Complex));
270  }
271 
273  }
274 
275  //********** demodulation **********
276 
277  const float& fltI = m_rfRunning.m_blnFFTFiltering ? m_DSBFilterBuffer[m_DSBFilterBufferIndex-1].real() : c.real();
278  const float& fltQ = m_rfRunning.m_blnFFTFiltering ? m_DSBFilterBuffer[m_DSBFilterBufferIndex-1].imag() : c.imag();
279  double magSq;
280 
282  {
283  //Amplitude FM
284  magSq = fltI*fltI + fltQ*fltQ;
285  m_objMagSqAverage(magSq);
286  fltNorm = sqrt(magSq);
287  fltNormI= fltI/fltNorm;
288  fltNormQ= fltQ/fltNorm;
289 
290  //-2 > 2 : 0 -> 1 volt
291  //0->0.3 synchro 0.3->1 image
292 
294  {
295  //YDiff Cd
296  fltVal = m_fltBufferI[0]*(fltNormQ - m_fltBufferQ[1]);
297  fltVal -= m_fltBufferQ[0]*(fltNormI - m_fltBufferI[1]);
298 
299  fltVal += 2.0f;
300  fltVal /= 4.0f;
301 
302  }
303  else
304  {
305  //YDiff Folded
306  fltVal = m_fltBufferI[2]*((m_fltBufferQ[5]-fltNormQ)/16.0f + m_fltBufferQ[1] - m_fltBufferQ[3]);
307  fltVal -= m_fltBufferQ[2]*((m_fltBufferI[5]-fltNormI)/16.0f + m_fltBufferI[1] - m_fltBufferI[3]);
308 
309  fltVal += 2.125f;
310  fltVal /= 4.25f;
311 
314 
317 
320 
323  }
324 
327 
328  m_fltBufferI[0]=fltNormI;
329  m_fltBufferQ[0]=fltNormQ;
330 
331  if (m_rfRunning.m_fmDeviation != 1.0f)
332  {
333  fltVal = ((fltVal - 0.5f) / m_rfRunning.m_fmDeviation) + 0.5f;
334  }
335  }
336  else if (m_rfRunning.m_enmModulation == ATV_AM)
337  {
338  //Amplitude AM
339  magSq = fltI*fltI + fltQ*fltQ;
340  m_objMagSqAverage(magSq);
341  fltNorm = sqrt(magSq);
342  fltVal = fltNorm / SDR_RX_SCALEF;
343 
344  //********** Mini and Maxi Amplitude tracking **********
345 
346  if(fltVal<m_fltEffMin)
347  {
348  m_fltEffMin=fltVal;
349  }
350 
351  if(fltVal>m_fltEffMax)
352  {
353  m_fltEffMax=fltVal;
354  }
355 
356  //Normalisation
357  fltVal -= m_fltAmpMin;
358  fltVal /=m_fltAmpDelta;
359  }
361  {
362  magSq = fltI*fltI + fltQ*fltQ;
363  m_objMagSqAverage(magSq);
364  fltNorm = sqrt(magSq);
365 
366  Real bfoValues[2];
367  float fltFiltered = m_bfoFilter.run(fltI);
368  m_bfoPLL.process(fltFiltered, bfoValues);
369 
370  // do the mix
371 
372  float mixI = fltI * bfoValues[0] - fltQ * bfoValues[1];
373  float mixQ = fltI * bfoValues[1] + fltQ * bfoValues[0];
374 
376  fltVal = (mixI + mixQ);
377  } else {
378  fltVal = (mixI - mixQ);
379  }
380 
381  //********** Mini and Maxi Amplitude tracking **********
382 
383  if(fltVal<m_fltEffMin)
384  {
385  m_fltEffMin=fltVal;
386  }
387 
388  if(fltVal>m_fltEffMax)
389  {
390  m_fltEffMax=fltVal;
391  }
392 
393  //Normalisation
394  fltVal -= m_fltAmpMin;
395  fltVal /=m_fltAmpDelta;
396  }
397  else if (m_rfRunning.m_enmModulation == ATV_FM3)
398  {
399  float rawDeviation;
400  fltVal = m_objPhaseDiscri.phaseDiscriminatorDelta(c, magSq, rawDeviation) + 0.5f;
401  //fltVal = fltVal < 0.0f ? 0.0f : fltVal > 1.0f ? 1.0f : fltVal;
402  m_objMagSqAverage(magSq);
403  fltNorm = sqrt(magSq);
404  }
405  else
406  {
407  magSq = fltI*fltI + fltQ*fltQ;
408  m_objMagSqAverage(magSq);
409  fltNorm = sqrt(magSq);
410  fltVal = 0.0f;
411  }
412 
413  fltVal = m_running.m_blnInvertVideo ? 1.0f - fltVal : fltVal;
414  fltVal = (fltVal < -1.0f) ? -1.0f : (fltVal > 1.0f) ? 1.0f : fltVal;
415 
416  if ((m_running.m_intVideoTabIndex == 1) && (m_scopeSink != 0)) { // feed scope buffer only if scope is present and visible
417  m_scopeSampleBuffer.push_back(Sample(fltVal*SDR_RX_SCALEF, 0.0f));
418  }
419 
420  m_fltAmpLineAverage += fltVal;
421 
422  //********** gray level **********
423  //-0.3 -> 0.7
424  intVal = (int) 255.0*(fltVal - m_running.m_fltVoltLevelSynchroBlack) / fltDivSynchroBlack;
425 
426  //0 -> 255
427  if(intVal<0)
428  {
429  intVal=0;
430  }
431  else if(intVal>255)
432  {
433  intVal=255;
434  }
435 
436  //********** process video sample **********
437 
438  if (m_registeredTVScreen) // can process only if the screen is available (set via the GUI)
439  {
441  processHSkip(fltVal, intVal);
442  } else {
443  processClassic(fltVal, intVal);
444  }
445  }
446 }
void processClassic(float &fltVal, int &intVal)
Definition: atvdemod.h:591
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
Classical frequency modulation with discriminator #2.
Definition: atvdemod.h:65
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
ATVStd m_enmATVStandard
Definition: atvdemod.h:76
MovingAverageUtil< double, double, 32 > m_objMagSqAverage
Definition: atvdemod.h:472
float m_fltAmpDelta
Definition: atvdemod.h:455
float m_fltBufferI[6]
Definition: atvdemod.h:457
std::complex< float > cmplx
Definition: fftfilt.h:21
SampleVector m_scopeSampleBuffer
Definition: atvdemod.h:425
int m_DSBFilterBufferIndex
Definition: atvdemod.h:486
#define SDR_RX_SCALEF
Definition: dsptypes.h:33
Classical frequency modulation with phase derivative discriminator.
Definition: atvdemod.h:66
ATVConfig m_running
Definition: atvdemod.h:494
float m_fltBufferQ[6]
Definition: atvdemod.h:458
void process(const std::vector< Real > &samples_in, std::vector< Real > &samples_out)
Definition: phaselock.cpp:148
Fixed< IntType, IntBits > sqrt(Fixed< IntType, IntBits > const &x)
Definition: fixed.h:2283
SimplePhaseLock m_bfoPLL
Definition: atvdemod.h:475
ATVModulation m_enmModulation
Definition: atvdemod.h:110
TVScreen * m_registeredTVScreen
Definition: atvdemod.h:428
BasebandSampleSink * m_scopeSink
Definition: atvdemod.h:424
Classical amplitude modulation.
Definition: atvdemod.h:67
PhaseDiscriminators m_objPhaseDiscri
Definition: atvdemod.h:490
Complex * m_DSBFilterBuffer
Definition: atvdemod.h:485
float m_fltEffMax
Definition: atvdemod.h:451
float m_fltAmpMin
Definition: atvdemod.h:453
SecondOrderRecursiveFilter m_bfoFilter
Definition: atvdemod.h:476
float m_fltVoltLevelSynchroBlack
Definition: atvdemod.h:83
float m_fltAmpLineAverage
Definition: atvdemod.h:448
fftfilt * m_DSBFilter
Definition: atvdemod.h:484
std::complex< Real > Complex
Definition: dsptypes.h:43
void processHSkip(float &fltVal, int &intVal)
Definition: atvdemod.h:510
Real phaseDiscriminatorDelta(const Complex &sample, double &magsq, Real &fmDev)
Definition: phasediscri.h:62
float Real
Definition: dsptypes.h:42
float m_fltEffMin
Definition: atvdemod.h:450
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
Classical frequency modulation with discriminator #1.
Definition: atvdemod.h:64
int runAsym(const cmplx &in, cmplx **out, bool usb)
Asymmetrical fitering can be used for vestigial sideband.
Definition: fftfilt.cpp:360
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

virtual bool ATVDemod::deserialize ( const QByteArray &  data)
inlinevirtual

Implements ChannelAPI.

Definition at line 234 of file atvdemod.h.

234 { (void) data; return false; }

◆ destroy()

virtual void ATVDemod::destroy ( )
inlinevirtual

Implements ChannelAPI.

Definition at line 197 of file atvdemod.h.

197 { delete this; }

◆ feed()

void ATVDemod::feed ( const SampleVector::const_iterator &  begin,
const SampleVector::const_iterator &  end,
bool  po 
)
virtual

Implements BasebandSampleSink.

Definition at line 168 of file atvdemod.cpp.

References Interpolator::decimate(), demod(), BasebandSampleSink::feed(), ATVDemod::ATVRFConfig::m_blndecimatorEnable, m_interpolator, m_interpolatorDistance, m_interpolatorDistanceRemain, ATVDemod::ATVRFConfig::m_intFrequencyOffset, ATVDemod::ATVConfig::m_intVideoTabIndex, m_nco, m_objSettingsMutex, m_rfRunning, m_running, m_scopeSampleBuffer, m_scopeSink, and NCO::nextIQ().

Referenced by setScopeSink().

169 {
170  (void) firstOfBurst;
171  float fltI;
172  float fltQ;
173  Complex ci;
174 
175  //********** Let's rock and roll buddy ! **********
176 
177  m_objSettingsMutex.lock();
178 
179  //********** Accessing ATV Screen context **********
180 
181 #ifdef EXTENDED_DIRECT_SAMPLE
182 
183  qint16 * ptrBufferToRelease = 0;
184  qint16 * ptrBuffer;
185  qint32 intLen;
186 
187  //********** Reading direct samples **********
188 
189  SampleVector::const_iterator it = begin;
190  intLen = it->intLen;
191  ptrBuffer = it->ptrBuffer;
192  ptrBufferToRelease = ptrBuffer;
193  ++it;
194 
195  for(qint32 intInd=0; intInd<intLen-1; intInd +=2)
196  {
197 
198  fltI= ((qint32) (*ptrBuffer)) << 4;
199  ptrBuffer ++;
200  fltQ= ((qint32) (*ptrBuffer)) << 4;
201  ptrBuffer ++;
202 
203 #else
204 
205  for (SampleVector::const_iterator it = begin; it != end; ++it /* ++it **/)
206  {
207 
208  fltI = it->real();
209  fltQ = it->imag();
210 #endif
211  Complex c(fltI, fltQ);
212 
214  {
215  c *= m_nco.nextIQ();
216  }
217 
219  {
221  {
222  demod(ci);
224  }
225  }
226  else
227  {
228  demod(c);
229  }
230  }
231 
232  if ((m_running.m_intVideoTabIndex == 1) && (m_scopeSink != 0)) // do only if scope tab is selected and scope is available
233  {
234  m_scopeSink->feed(m_scopeSampleBuffer.begin(), m_scopeSampleBuffer.end(), false); // m_ssb = positive only
235  m_scopeSampleBuffer.clear();
236  }
237 
238 #ifdef EXTENDED_DIRECT_SAMPLE
239  if (ptrBufferToRelease != 0)
240  {
241  delete ptrBufferToRelease;
242  }
243 #endif
244 
245  m_objSettingsMutex.unlock();
246 }
Complex nextIQ()
Return next complex sample.
Definition: nco.cpp:61
void demod(Complex &c)
Definition: atvdemod.cpp:248
bool decimate(Real *distance, const Complex &next, Complex *result)
Definition: interpolator.h:38
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
int64_t m_intFrequencyOffset
Definition: atvdemod.h:109
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)=0
SampleVector m_scopeSampleBuffer
Definition: atvdemod.h:425
Interpolator m_interpolator
Definition: atvdemod.h:479
QMutex m_objSettingsMutex
Definition: atvdemod.h:503
ATVConfig m_running
Definition: atvdemod.h:494
NCO m_nco
Definition: atvdemod.h:474
BasebandSampleSink * m_scopeSink
Definition: atvdemod.h:424
Real m_interpolatorDistanceRemain
Definition: atvdemod.h:481
std::complex< Real > Complex
Definition: dsptypes.h:43
Real m_interpolatorDistance
Definition: atvdemod.h:480
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBFOLocked()

bool ATVDemod::getBFOLocked ( )

Definition at line 746 of file atvdemod.cpp.

References ATV_LSB, ATV_USB, PhaseLock::locked(), m_bfoPLL, ATVDemod::ATVRFConfig::m_enmModulation, and m_rfRunning.

Referenced by getMagSq(), and ATVDemodGUI::tick().

747 {
749  {
750  return m_bfoPLL.locked();
751  }
752  else
753  {
754  return false;
755  }
756 }
bool locked() const
Definition: phaselock.h:80
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
SimplePhaseLock m_bfoPLL
Definition: atvdemod.h:475
ATVModulation m_enmModulation
Definition: atvdemod.h:110
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCenterFrequency()

virtual qint64 ATVDemod::getCenterFrequency ( ) const
inlinevirtual

Applies to a default stream.

Implements ChannelAPI.

Definition at line 231 of file atvdemod.h.

References ATVDemod::ATVRFConfig::m_intFrequencyOffset, and m_rfRunning.

ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
int64_t m_intFrequencyOffset
Definition: atvdemod.h:109

◆ getEffectiveSampleRate()

int ATVDemod::getEffectiveSampleRate ( )

◆ getIdentifier()

virtual void ATVDemod::getIdentifier ( QString &  id)
inlinevirtual

Implements ChannelAPI.

Definition at line 229 of file atvdemod.h.

229 { id = objectName(); }

◆ getMagSq()

double ATVDemod::getMagSq ( ) const
inline

Beware this is scaled to 2^30.

Definition at line 249 of file atvdemod.h.

References getBFOLocked(), and m_objMagSqAverage.

Referenced by ATVDemodGUI::tick().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNbSinkStreams()

virtual int ATVDemod::getNbSinkStreams ( ) const
inlinevirtual

Implements ChannelAPI.

Definition at line 236 of file atvdemod.h.

236 { return 1; }

◆ getNbSourceStreams()

virtual int ATVDemod::getNbSourceStreams ( ) const
inlinevirtual

Implements ChannelAPI.

Definition at line 237 of file atvdemod.h.

237 { return 0; }

◆ getRFBandwidthDivisor()

float ATVDemod::getRFBandwidthDivisor ( ATVModulation  modulation)
staticprivate

Definition at line 758 of file atvdemod.cpp.

References ATV_AM, ATV_FM1, ATV_FM2, ATV_LSB, and ATV_USB.

Referenced by applySettings().

759 {
760  switch(modulation)
761  {
762  case ATV_USB:
763  case ATV_LSB:
764  return 1.05f;
765  break;
766  case ATV_FM1:
767  case ATV_FM2:
768  case ATV_AM:
769  default:
770  return 2.2f;
771  }
772 }
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
Classical frequency modulation with discriminator #2.
Definition: atvdemod.h:65
Classical amplitude modulation.
Definition: atvdemod.h:67
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
Classical frequency modulation with discriminator #1.
Definition: atvdemod.h:64
+ Here is the caller graph for this function:

◆ getSampleRate()

int ATVDemod::getSampleRate ( )

Definition at line 736 of file atvdemod.cpp.

References ATVDemod::ATVConfig::m_intSampleRate, and m_running.

Referenced by ATVDemodGUI::applySettings(), and getStreamCenterFrequency().

737 {
738  return m_running.m_intSampleRate;
739 }
ATVConfig m_running
Definition: atvdemod.h:494
+ Here is the caller graph for this function:

◆ getStreamCenterFrequency()

virtual qint64 ATVDemod::getStreamCenterFrequency ( int  streamIndex,
bool  sinkElseSource 
) const
inlinevirtual

Implements ChannelAPI.

Definition at line 239 of file atvdemod.h.

References getEffectiveSampleRate(), getSampleRate(), ATVDemod::ATVRFConfig::m_intFrequencyOffset, m_rfRunning, and setTVScreen().

240  {
241  (void) streamIndex;
242  (void) sinkElseSource;
244  }
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
int64_t m_intFrequencyOffset
Definition: atvdemod.h:109
+ Here is the call graph for this function:

◆ getTitle()

virtual void ATVDemod::getTitle ( QString &  title)
inlinevirtual

Implements ChannelAPI.

Definition at line 230 of file atvdemod.h.

230 { title = objectName(); }

◆ handleMessage()

bool ATVDemod::handleMessage ( const Message cmd)
virtual

Processing of a message. Returns true if message has actually been processed.

Implements BasebandSampleSink.

Definition at line 457 of file atvdemod.cpp.

References applySettings(), DownChannelizer::configure(), ATVDemod::MsgConfigureChannelizer::getCenterFrequency(), DownChannelizer::MsgChannelizerNotification::getFrequencyOffset(), BasebandSampleSink::getInputMessageQueue(), DownChannelizer::getInputSampleRate(), DownChannelizer::MsgChannelizerNotification::getSampleRate(), BasebandSampleSink::handleMessage(), ATVDemod::ATVRFConfig::m_blndecimatorEnable, ATVDemod::ATVRFConfig::m_blnFFTFiltering, ATVDemod::ATVConfig::m_blnHSync, ATVDemod::ATVConfig::m_blnVSync, m_channelizer, m_config, ATVDemod::ATVRFConfig::m_enmModulation, ATVDemod::ATVRFConfig::m_fltBFOFrequency, ATVDemod::ATVConfig::m_fltFramePerS, ATVDemod::ATVConfig::m_fltLineDuration, ATVDemod::ATVConfig::m_fltRatioOfRowsToDisplay, ATVDemod::ATVRFConfig::m_fltRFBandwidth, ATVDemod::ATVRFConfig::m_fltRFOppBandwidth, ATVDemod::ATVConfig::m_fltTopDuration, ATVDemod::ATVConfig::m_fltVoltLevelSynchroBlack, ATVDemod::ATVConfig::m_fltVoltLevelSynchroTop, ATVDemod::ATVRFConfig::m_fmDeviation, ATVDemod::ATVRFConfig::m_intFrequencyOffset, ATVDemod::ATVConfig::m_intSampleRate, ATVDemod::MsgConfigureATVDemod::m_objMsgConfig, ATVDemod::MsgConfigureRFATVDemod::m_objMsgConfig, m_rfConfig, m_scopeSink, and Message::match().

Referenced by setScopeSink().

458 {
459  qDebug() << "ATVDemod::handleMessage";
460 
462  {
466 
467  qDebug() << "ATVDemod::handleMessage: MsgChannelizerNotification:"
468  << " m_intSampleRate: " << m_config.m_intSampleRate
469  << " m_intFrequencyOffset: " << m_rfConfig.m_intFrequencyOffset;
470 
471  applySettings();
472 
473  return true;
474  }
475  else if (MsgConfigureChannelizer::match(cmd))
476  {
477  MsgConfigureChannelizer& cfg = (MsgConfigureChannelizer&) cmd;
478 
481  cfg.getCenterFrequency());
482 
483  qDebug() << "ATVDemod::handleMessage: MsgConfigureChannelizer: sampleRate: " << m_channelizer->getInputSampleRate()
484  << " centerFrequency: " << cfg.getCenterFrequency();
485 
486  return true;
487  }
488  else if (MsgConfigureATVDemod::match(cmd))
489  {
490  MsgConfigureATVDemod& objCfg = (MsgConfigureATVDemod&) cmd;
491 
492  m_config = objCfg.m_objMsgConfig;
493 
494  qDebug() << "ATVDemod::handleMessage: MsgConfigureATVDemod:"
495  << " m_fltVoltLevelSynchroBlack:" << m_config.m_fltVoltLevelSynchroBlack
496  << " m_fltVoltLevelSynchroTop:" << m_config.m_fltVoltLevelSynchroTop
497  << " m_fltFramePerS:" << m_config.m_fltFramePerS
498  << " m_fltLineDurationUs:" << m_config.m_fltLineDuration
499  << " m_fltRatioOfRowsToDisplay:" << m_config.m_fltRatioOfRowsToDisplay
500  << " m_fltTopDurationUs:" << m_config.m_fltTopDuration
501  << " m_blnHSync:" << m_config.m_blnHSync
502  << " m_blnVSync:" << m_config.m_blnVSync;
503 
504  applySettings();
505 
506  return true;
507  }
508  else if (MsgConfigureRFATVDemod::match(cmd))
509  {
510  MsgConfigureRFATVDemod& objCfg = (MsgConfigureRFATVDemod&) cmd;
511 
512  m_rfConfig = objCfg.m_objMsgConfig;
513 
514  qDebug() << "ATVDemod::handleMessage: MsgConfigureRFATVDemod:"
515  << " m_intFrequencyOffset:" << m_rfConfig.m_intFrequencyOffset
516  << " m_enmModulation:" << m_rfConfig.m_enmModulation
517  << " m_fltRFBandwidth:" << m_rfConfig.m_fltRFBandwidth
518  << " m_fltRFOppBandwidth:" << m_rfConfig.m_fltRFOppBandwidth
519  << " m_blnFFTFiltering:" << m_rfConfig.m_blnFFTFiltering
520  << " m_blnDecimatorEnable:" << m_rfConfig.m_blndecimatorEnable
521  << " m_fltBFOFrequency:" << m_rfConfig.m_fltBFOFrequency
522  << " m_fmDeviation:" << m_rfConfig.m_fmDeviation;
523 
524  applySettings();
525 
526  return true;
527  }
528  else
529  {
530  if (m_scopeSink != 0)
531  {
532  return m_scopeSink->handleMessage(cmd);
533  }
534  else
535  {
536  return false;
537  }
538  }
539 }
void configure(MessageQueue *messageQueue, int sampleRate, int centerFrequency)
int64_t m_intFrequencyOffset
Definition: atvdemod.h:109
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
float m_fltRatioOfRowsToDisplay
Definition: atvdemod.h:81
float m_fltTopDuration
Definition: atvdemod.h:79
float m_fltFramePerS
Definition: atvdemod.h:80
virtual bool handleMessage(const Message &cmd)=0
Processing of a message. Returns true if message has actually been processed.
void applySettings()
Definition: atvdemod.cpp:541
static bool match(const Message *message)
Definition: message.cpp:45
int getInputSampleRate() const
ATVRFConfig m_rfConfig
Definition: atvdemod.h:498
ATVConfig m_config
Definition: atvdemod.h:495
ATVModulation m_enmModulation
Definition: atvdemod.h:110
BasebandSampleSink * m_scopeSink
Definition: atvdemod.h:424
float m_fltLineDuration
Definition: atvdemod.h:78
float m_fltVoltLevelSynchroTop
Definition: atvdemod.h:82
float m_fltVoltLevelSynchroBlack
Definition: atvdemod.h:83
DownChannelizer * m_channelizer
Definition: atvdemod.h:420
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processClassic()

void ATVDemod::processClassic ( float &  fltVal,
int &  intVal 
)
inlineprivate

Definition at line 591 of file atvdemod.h.

References ATV_AM, ATV_LSB, ATV_USB, ATVDemod::ATVConfig::m_blnHSync, ATVDemod::ATVConfig::m_blnVSync, ATVDemod::ATVRFConfig::m_enmModulation, m_fltEffMax, m_fltEffMin, ATVDemod::ATVConfig::m_fltVoltLevelSynchroBlack, ATVDemod::ATVConfig::m_fltVoltLevelSynchroTop, ATVDemod::ATVConfigPrivate::m_intNumberSamplePerLine, m_intNumberSamplePerTop, TVScreen::renderImage(), TVScreen::selectRow(), and TVScreen::setDataColor().

Referenced by demod().

592  {
593  int intSynchroTimeSamples= (3 * m_runningPrivate.m_intNumberSamplePerLine)/4;
594  float fltSynchroTrameLevel = 0.5f*((float)intSynchroTimeSamples) * m_running.m_fltVoltLevelSynchroBlack;
595 
596  // Horizontal Synchro detection
597 
598  // Floor Detection 0
599  if (fltVal < m_running.m_fltVoltLevelSynchroTop)
600  {
602  }
603  // Black detection 0.3
604  else if (fltVal > m_running.m_fltVoltLevelSynchroBlack)
605  {
606  m_intSynchroPoints = 0;
607  }
608 
610 
611  //Horizontal Synchro processing
612 
613  bool blnNewLine = false;
614 
616  {
618  //qDebug("HSync: %d %d %d", m_intSampleIndex, m_intColIndex, m_intAvgColIndex);
619  m_intSampleIndex = 0;
620  }
621  else
622  {
624  }
625 
627  {
628  m_intColIndex = 0;
629  blnNewLine = true;
630  }
632  {
633  if (m_running.m_blnHSync && (m_intLineIndex == 0))
634  {
635  //qDebug("HSync: %d %d", m_intColIndex, m_intAvgColIndex);
637  }
638  else
639  {
641  }
642 
643  blnNewLine = true;
644  }
645 
646  if (blnNewLine)
647  {
651  {
655 
656  if(m_fltAmpDelta<=0.0)
657  {
658  m_fltAmpDelta=1.0f;
659  }
660 
661  //Reset extrema
662  m_fltEffMin = 2000000.0f;
663  m_fltEffMax = -2000000.0f;
664  }
665 
666  m_fltAmpLineAverage=0.0f;
667 
668  //New line + Interleaving
669  m_intRowIndex += m_interleaved ? 2 : 1;
670 
672  {
674  }
675 
676  m_intLineIndex++;
677  }
678 
679  // Filling pixels
680 
681  // +4 is to compensate shift due to hsync amortizing factor of 1/4
683  m_intColIndex++;
684 
685  // Vertical sync and image rendering
686 
687  if ((m_running.m_blnVSync) && (m_intLineIndex < m_intNumberOfLines)) // VSync activated and lines in range
688  {
689  if (m_intColIndex >= intSynchroTimeSamples)
690  {
691  if (m_fltAmpLineAverage <= fltSynchroTrameLevel)
692  {
693  m_fltAmpLineAverage = 0.0f;
694 
695  if (!m_blnVerticalSynchroDetected) // not yet
696  {
697  m_blnVerticalSynchroDetected = true; // prevent repetition
698 
699  if ((m_intLineIndex % 2 == 0) || !m_interleaved) // even => odd image
700  {
702  m_intRowIndex = 1;
703  }
704  else
705  {
706  m_intRowIndex = 0;
707  }
708 
710  m_intLineIndex = 0;
711  m_intImageIndex++;
712  }
713  }
714  else
715  {
716  m_blnVerticalSynchroDetected = false; // reset
717  }
718  }
719  }
720  else // no VSync or lines out of range => arbitrary
721  {
723  {
724  if (m_intImageIndex % 2 == 1) // odd image
725  {
727 
729  {
733 
734  if(m_fltAmpDelta<=0.0)
735  {
736  m_fltAmpDelta=1.0f;
737  }
738 
739  //Reset extrema
740  m_fltEffMin = 2000000.0f;
741  m_fltEffMax = -2000000.0f;
742  }
743 
744  m_intRowIndex = 1;
745  }
746  else
747  {
748  m_intRowIndex = 0;
749  }
750 
752  m_intLineIndex = 0;
753  m_intImageIndex++;
754  }
755  }
756  }
bool setDataColor(int intCol, int intRed, int intGreen, int intBlue)
Definition: tvscreen.cpp:224
ATVConfigPrivate m_runningPrivate
Definition: atvdemod.h:500
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
int m_intLineIndex
Definition: atvdemod.h:463
void renderImage(unsigned char *objData)
Definition: tvscreen.cpp:70
int m_intNumberSamplePerTop
Definition: atvdemod.h:431
float m_fltAmpDelta
Definition: atvdemod.h:455
int m_intAvgColIndex
Definition: atvdemod.h:466
ATVConfig m_running
Definition: atvdemod.h:494
int m_intSampleIndex
Definition: atvdemod.h:461
int m_intImageIndex
Definition: atvdemod.h:442
int m_intNumberSaplesPerHSync
number of samples per horizontal synchronization pattern (pulse + back porch)
Definition: atvdemod.h:437
ATVModulation m_enmModulation
Definition: atvdemod.h:110
TVScreen * m_registeredTVScreen
Definition: atvdemod.h:428
int m_intRowIndex
Definition: atvdemod.h:462
Classical amplitude modulation.
Definition: atvdemod.h:67
int m_intSynchroPoints
Definition: atvdemod.h:443
bool m_blnVerticalSynchroDetected
Definition: atvdemod.h:446
float m_fltEffMax
Definition: atvdemod.h:451
bool m_interleaved
interleaved image
Definition: atvdemod.h:438
float m_fltVoltLevelSynchroTop
Definition: atvdemod.h:82
int m_intColIndex
Definition: atvdemod.h:460
bool m_blnSynchroDetected
Definition: atvdemod.h:445
float m_fltAmpMin
Definition: atvdemod.h:453
float m_fltVoltLevelSynchroBlack
Definition: atvdemod.h:83
float m_fltAmpLineAverage
Definition: atvdemod.h:448
float m_fltAmpMax
Definition: atvdemod.h:454
int m_intNumberOfLines
Definition: atvdemod.h:432
int m_intNumberOfSyncLines
this is the number of non displayable lines at the start of a frame. First displayable row comes next...
Definition: atvdemod.h:433
float m_fltEffMin
Definition: atvdemod.h:450
bool selectRow(int intLine)
Definition: tvscreen.cpp:212
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processHSkip()

void ATVDemod::processHSkip ( float &  fltVal,
int &  intVal 
)
inlineprivate

Definition at line 510 of file atvdemod.h.

References ATV_AM, ATV_LSB, ATV_USB, ATVDemod::ATVConfig::m_blnHSync, ATVDemod::ATVRFConfig::m_enmModulation, m_fltEffMax, m_fltEffMin, ATVDemod::ATVConfig::m_fltVoltLevelSynchroBlack, ATVDemod::ATVConfig::m_fltVoltLevelSynchroTop, m_intAvgColIndex, m_intColIndex, ATVDemod::ATVConfigPrivate::m_intNumberSamplePerLine, m_intNumberSamplePerTop, TVScreen::renderImage(), TVScreen::selectRow(), and TVScreen::setDataColor().

Referenced by demod().

511  {
513 
514  // Horizontal Synchro detection
515 
516  // Floor Detection 0
517  if (fltVal < m_running.m_fltVoltLevelSynchroTop)
518  {
520  }
521  // Black detection 0.3
522  else if (fltVal > m_running.m_fltVoltLevelSynchroBlack)
523  {
524  m_intSynchroPoints = 0;
525  }
526 
527  // sync pulse
528 
530 
532  {
533  if (m_intSampleIndex >= (3 * m_runningPrivate.m_intNumberSamplePerLine)/2) // first after skip
534  {
535  //qDebug("VSync: %d %d %d", m_intColIndex, m_intSampleIndex, m_intLineIndex);
538 
539  m_intImageIndex++;
540  m_intLineIndex = 0;
541  m_intRowIndex = 0;
542  }
543 
544  m_intSampleIndex = 0;
545  }
546  else
547  {
549  }
550 
552  {
553  m_intColIndex++;
554  }
555  else
556  {
557  if (m_running.m_blnHSync && (m_intLineIndex == 0))
558  {
559  //qDebug("HCorr: %d", m_intAvgColIndex);
561  }
562  else
563  {
565  }
566 
570  {
574 
575  if(m_fltAmpDelta<=0.0)
576  {
577  m_fltAmpDelta=1.0f;
578  }
579 
580  //Reset extrema
581  m_fltEffMin = 2000000.0f;
582  m_fltEffMax = -2000000.0f;
583  }
584 
586  m_intLineIndex++;
587  m_intRowIndex++;
588  }
589  }
bool setDataColor(int intCol, int intRed, int intGreen, int intBlue)
Definition: tvscreen.cpp:224
ATVConfigPrivate m_runningPrivate
Definition: atvdemod.h:500
AM with vestigial lower side band (main signal is in the upper side)
Definition: atvdemod.h:68
ATVRFConfig m_rfRunning
Definition: atvdemod.h:497
int m_intLineIndex
Definition: atvdemod.h:463
void renderImage(unsigned char *objData)
Definition: tvscreen.cpp:70
int m_intNumberSamplePerTop
Definition: atvdemod.h:431
float m_fltAmpDelta
Definition: atvdemod.h:455
int m_intAvgColIndex
Definition: atvdemod.h:466
ATVConfig m_running
Definition: atvdemod.h:494
int m_intSampleIndex
Definition: atvdemod.h:461
int m_intImageIndex
Definition: atvdemod.h:442
int m_intNumberSaplesPerHSync
number of samples per horizontal synchronization pattern (pulse + back porch)
Definition: atvdemod.h:437
ATVModulation m_enmModulation
Definition: atvdemod.h:110
TVScreen * m_registeredTVScreen
Definition: atvdemod.h:428
int m_intRowIndex
Definition: atvdemod.h:462
Classical amplitude modulation.
Definition: atvdemod.h:67
int m_intSynchroPoints
Definition: atvdemod.h:443
float m_fltEffMax
Definition: atvdemod.h:451
float m_fltVoltLevelSynchroTop
Definition: atvdemod.h:82
int m_intColIndex
Definition: atvdemod.h:460
bool m_blnSynchroDetected
Definition: atvdemod.h:445
float m_fltAmpMin
Definition: atvdemod.h:453
float m_fltVoltLevelSynchroBlack
Definition: atvdemod.h:83
float m_fltAmpMax
Definition: atvdemod.h:454
float m_fltEffMin
Definition: atvdemod.h:450
bool selectRow(int intLine)
Definition: tvscreen.cpp:212
AM with vestigial upper side band (main signal is in the lower side)
Definition: atvdemod.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

virtual QByteArray ATVDemod::serialize ( ) const
inlinevirtual

Implements ChannelAPI.

Definition at line 233 of file atvdemod.h.

233 { return QByteArray(); }

◆ setScopeSink()

void ATVDemod::setScopeSink ( BasebandSampleSink scopeSink)
inline

Definition at line 198 of file atvdemod.h.

References configure(), configureRF(), feed(), handleMessage(), m_scopeSink, start(), and stop().

Referenced by ATVDemodGUI::ATVDemodGUI().

198 { m_scopeSink = scopeSink; }
BasebandSampleSink * m_scopeSink
Definition: atvdemod.h:424
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTVScreen()

void ATVDemod::setTVScreen ( TVScreen objScreen)

set by the GUI

Definition at line 109 of file atvdemod.cpp.

References m_registeredTVScreen.

Referenced by ATVDemodGUI::ATVDemodGUI(), and getStreamCenterFrequency().

110 {
111  m_registeredTVScreen = objScreen;
112 }
TVScreen * m_registeredTVScreen
Definition: atvdemod.h:428
+ Here is the caller graph for this function:

◆ start()

void ATVDemod::start ( )
virtual

Implements BasebandSampleSink.

Definition at line 448 of file atvdemod.cpp.

Referenced by setScopeSink().

449 {
450  //m_objTimer.start();
451 }
+ Here is the caller graph for this function:

◆ stop()

void ATVDemod::stop ( )
virtual

Implements BasebandSampleSink.

Definition at line 453 of file atvdemod.cpp.

Referenced by setScopeSink().

454 {
455 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bfoFilter

SecondOrderRecursiveFilter ATVDemod::m_bfoFilter
private

Definition at line 476 of file atvdemod.h.

Referenced by applySettings(), and demod().

◆ m_bfoPLL

SimplePhaseLock ATVDemod::m_bfoPLL
private

Definition at line 475 of file atvdemod.h.

Referenced by applySettings(), demod(), and getBFOLocked().

◆ m_blnSynchroDetected

bool ATVDemod::m_blnSynchroDetected
private

Definition at line 445 of file atvdemod.h.

◆ m_blnVerticalSynchroDetected

bool ATVDemod::m_blnVerticalSynchroDetected
private

Definition at line 446 of file atvdemod.h.

◆ m_channelId

const QString ATVDemod::m_channelId = "ATVDemod"
static

Definition at line 253 of file atvdemod.h.

Referenced by ATVDemod(), and ATVDemodPlugin::initPlugin().

◆ m_channelIdURI

const QString ATVDemod::m_channelIdURI = "sdrangel.channel.demodatv"
static

Definition at line 252 of file atvdemod.h.

Referenced by ATVDemodGUI::ATVDemodGUI(), and ATVDemodPlugin::initPlugin().

◆ m_channelizer

DownChannelizer* ATVDemod::m_channelizer
private

Definition at line 420 of file atvdemod.h.

Referenced by ATVDemod(), channelSampleRateChanged(), handleMessage(), and ~ATVDemod().

◆ m_config

ATVConfig ATVDemod::m_config
private

Definition at line 495 of file atvdemod.h.

Referenced by applySettings(), applyStandard(), and handleMessage().

◆ m_configPrivate

ATVConfigPrivate ATVDemod::m_configPrivate
private

Definition at line 501 of file atvdemod.h.

Referenced by applySettings().

◆ m_deviceAPI

DeviceAPI* ATVDemod::m_deviceAPI
private

Definition at line 418 of file atvdemod.h.

Referenced by ATVDemod(), and ~ATVDemod().

◆ m_DSBFilter

fftfilt* ATVDemod::m_DSBFilter
private

Definition at line 484 of file atvdemod.h.

Referenced by applySettings(), ATVDemod(), demod(), and ~ATVDemod().

◆ m_DSBFilterBuffer

Complex* ATVDemod::m_DSBFilterBuffer
private

Definition at line 485 of file atvdemod.h.

Referenced by applySettings(), ATVDemod(), demod(), and ~ATVDemod().

◆ m_DSBFilterBufferIndex

int ATVDemod::m_DSBFilterBufferIndex
private

Definition at line 486 of file atvdemod.h.

Referenced by applySettings(), and demod().

◆ m_fltAmpDelta

float ATVDemod::m_fltAmpDelta
private

Definition at line 455 of file atvdemod.h.

Referenced by demod().

◆ m_fltAmpLineAverage

float ATVDemod::m_fltAmpLineAverage
private

Definition at line 448 of file atvdemod.h.

Referenced by demod().

◆ m_fltAmpMax

float ATVDemod::m_fltAmpMax
private

Definition at line 454 of file atvdemod.h.

◆ m_fltAmpMin

float ATVDemod::m_fltAmpMin
private

Definition at line 453 of file atvdemod.h.

Referenced by demod().

◆ m_fltBufferI

float ATVDemod::m_fltBufferI[6]
private

Definition at line 457 of file atvdemod.h.

Referenced by ATVDemod(), and demod().

◆ m_fltBufferQ

float ATVDemod::m_fltBufferQ[6]
private

Definition at line 458 of file atvdemod.h.

Referenced by ATVDemod(), and demod().

◆ m_fltEffMax

float ATVDemod::m_fltEffMax
private

Definition at line 451 of file atvdemod.h.

Referenced by demod(), processClassic(), and processHSkip().

◆ m_fltEffMin

float ATVDemod::m_fltEffMin
private

Definition at line 450 of file atvdemod.h.

Referenced by demod(), processClassic(), and processHSkip().

◆ m_intAvgColIndex

int ATVDemod::m_intAvgColIndex
private

Definition at line 466 of file atvdemod.h.

Referenced by processHSkip().

◆ m_intColIndex

int ATVDemod::m_intColIndex
private

Definition at line 460 of file atvdemod.h.

Referenced by applySettings(), and processHSkip().

◆ m_interleaved

bool ATVDemod::m_interleaved
private

interleaved image

Definition at line 438 of file atvdemod.h.

Referenced by applyStandard(), and ATVDemod().

◆ m_interpolator

Interpolator ATVDemod::m_interpolator
private

Definition at line 479 of file atvdemod.h.

Referenced by applySettings(), and feed().

◆ m_interpolatorDistance

Real ATVDemod::m_interpolatorDistance
private

Definition at line 480 of file atvdemod.h.

Referenced by applySettings(), and feed().

◆ m_interpolatorDistanceRemain

Real ATVDemod::m_interpolatorDistanceRemain
private

Definition at line 481 of file atvdemod.h.

Referenced by applySettings(), and feed().

◆ m_intImageIndex

int ATVDemod::m_intImageIndex
private

Definition at line 442 of file atvdemod.h.

Referenced by applySettings().

◆ m_intLineIndex

int ATVDemod::m_intLineIndex
private

Definition at line 463 of file atvdemod.h.

◆ m_intNumberOfBlackLines

int ATVDemod::m_intNumberOfBlackLines
private

this is the total number of lines not part of the image and is used for vertical screen size

Definition at line 434 of file atvdemod.h.

Referenced by applySettings(), and applyStandard().

◆ m_intNumberOfEqLines

int ATVDemod::m_intNumberOfEqLines
private

number of equalizing lines both whole and partial

Definition at line 435 of file atvdemod.h.

Referenced by applyStandard().

◆ m_intNumberOfLines

int ATVDemod::m_intNumberOfLines
private

Definition at line 432 of file atvdemod.h.

Referenced by applySettings(), and ATVDemod().

◆ m_intNumberOfSyncLines

int ATVDemod::m_intNumberOfSyncLines
private

this is the number of non displayable lines at the start of a frame. First displayable row comes next.

Definition at line 433 of file atvdemod.h.

Referenced by applyStandard().

◆ m_intNumberSamplePerLineSignals

int ATVDemod::m_intNumberSamplePerLineSignals
private

number of samples in the non image part of the line (signals)

Definition at line 436 of file atvdemod.h.

Referenced by applySettings(), and applyStandard().

◆ m_intNumberSamplePerTop

int ATVDemod::m_intNumberSamplePerTop
private

Definition at line 431 of file atvdemod.h.

Referenced by applySettings(), processClassic(), and processHSkip().

◆ m_intNumberSaplesPerHSync

int ATVDemod::m_intNumberSaplesPerHSync
private

number of samples per horizontal synchronization pattern (pulse + back porch)

Definition at line 437 of file atvdemod.h.

Referenced by applyStandard().

◆ m_intRowIndex

int ATVDemod::m_intRowIndex
private

Definition at line 462 of file atvdemod.h.

Referenced by applySettings().

◆ m_intSampleIndex

int ATVDemod::m_intSampleIndex
private

Definition at line 461 of file atvdemod.h.

◆ m_intSynchroPoints

int ATVDemod::m_intSynchroPoints
private

Definition at line 443 of file atvdemod.h.

Referenced by ATVDemod().

◆ m_nco

NCO ATVDemod::m_nco
private

Definition at line 474 of file atvdemod.h.

Referenced by applySettings(), and feed().

◆ m_objAvgColIndex

AvgExpInt ATVDemod::m_objAvgColIndex
private

Definition at line 465 of file atvdemod.h.

◆ m_objMagSqAverage

MovingAverageUtil<double, double, 32> ATVDemod::m_objMagSqAverage
private

Definition at line 472 of file atvdemod.h.

Referenced by demod(), and getMagSq().

◆ m_objPhaseDiscri

PhaseDiscriminators ATVDemod::m_objPhaseDiscri
private

Definition at line 490 of file atvdemod.h.

Referenced by applySettings(), ATVDemod(), and demod().

◆ m_objSettingsMutex

QMutex ATVDemod::m_objSettingsMutex
private

Definition at line 503 of file atvdemod.h.

Referenced by applySettings(), and feed().

◆ m_registeredTVScreen

TVScreen* ATVDemod::m_registeredTVScreen
private

Definition at line 428 of file atvdemod.h.

Referenced by applySettings(), demod(), and setTVScreen().

◆ m_rfConfig

ATVRFConfig ATVDemod::m_rfConfig
private

Definition at line 498 of file atvdemod.h.

Referenced by applySettings(), ATVDemod(), and handleMessage().

◆ m_rfRunning

ATVRFConfig ATVDemod::m_rfRunning
private

◆ m_running

ATVConfig ATVDemod::m_running
private

Definition at line 494 of file atvdemod.h.

Referenced by applySettings(), demod(), feed(), getEffectiveSampleRate(), and getSampleRate().

◆ m_runningPrivate

ATVConfigPrivate ATVDemod::m_runningPrivate
private

Definition at line 500 of file atvdemod.h.

Referenced by applySettings(), and getEffectiveSampleRate().

◆ m_sampleBuffer

SampleVector ATVDemod::m_sampleBuffer
private

Definition at line 468 of file atvdemod.h.

◆ m_scopeSampleBuffer

SampleVector ATVDemod::m_scopeSampleBuffer
private

Definition at line 425 of file atvdemod.h.

Referenced by demod(), and feed().

◆ m_scopeSink

BasebandSampleSink* ATVDemod::m_scopeSink
private

Definition at line 424 of file atvdemod.h.

Referenced by demod(), feed(), handleMessage(), and setScopeSink().

◆ m_ssbFftLen

const int ATVDemod::m_ssbFftLen = 1024
staticprivate

Definition at line 487 of file atvdemod.h.

Referenced by applySettings(), and ATVDemod().

◆ m_threadedChannelizer

ThreadedBasebandSampleSink* ATVDemod::m_threadedChannelizer
private

Definition at line 419 of file atvdemod.h.

Referenced by ATVDemod(), and ~ATVDemod().


The documentation for this class was generated from the following files: