2017-02-23 02:18:56 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2017 F4HKW //
|
|
|
|
// for F4EXB / SDRAngel //
|
|
|
|
// //
|
|
|
|
// This program is free software; you can redistribute it and/or modify //
|
|
|
|
// it under the terms of the GNU General Public License as published by //
|
|
|
|
// the Free Software Foundation as version 3 of the License, or //
|
|
|
|
// //
|
|
|
|
// This program is distributed in the hope that it will be useful, //
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
|
|
// GNU General Public License V3 for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef INCLUDE_ATVDEMOD_H
|
|
|
|
#define INCLUDE_ATVDEMOD_H
|
|
|
|
|
|
|
|
#include <QMutex>
|
|
|
|
#include <QElapsedTimer>
|
|
|
|
#include <vector>
|
2017-03-17 06:46:38 -04:00
|
|
|
|
|
|
|
#include "dsp/basebandsamplesink.h"
|
2017-11-18 21:38:07 -05:00
|
|
|
#include "channel/channelsinkapi.h"
|
2017-03-17 06:46:38 -04:00
|
|
|
#include "dsp/devicesamplesource.h"
|
|
|
|
#include "dsp/dspcommands.h"
|
|
|
|
#include "dsp/downchannelizer.h"
|
2017-02-23 02:18:56 -05:00
|
|
|
#include "dsp/nco.h"
|
|
|
|
#include "dsp/interpolator.h"
|
2018-02-03 04:33:02 -05:00
|
|
|
#include "util/movingaverage.h"
|
2017-03-17 06:46:38 -04:00
|
|
|
#include "dsp/fftfilt.h"
|
2017-02-23 02:18:56 -05:00
|
|
|
#include "dsp/agc.h"
|
2017-03-19 05:28:54 -04:00
|
|
|
#include "dsp/phaselock.h"
|
|
|
|
#include "dsp/recursivefilters.h"
|
2017-03-22 18:55:47 -04:00
|
|
|
#include "dsp/phasediscri.h"
|
2017-02-23 02:18:56 -05:00
|
|
|
#include "audio/audiofifo.h"
|
|
|
|
#include "util/message.h"
|
2017-11-06 19:04:43 -05:00
|
|
|
#include "atvscreeninterface.h"
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
class DeviceSourceAPI;
|
2017-11-06 17:57:59 -05:00
|
|
|
class ThreadedBasebandSampleSink;
|
|
|
|
class DownChannelizer;
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-11-18 21:38:07 -05:00
|
|
|
class ATVDemod : public BasebandSampleSink, public ChannelSinkAPI
|
2017-02-23 02:18:56 -05:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2017-03-26 20:29:02 -04:00
|
|
|
enum ATVStd
|
|
|
|
{
|
|
|
|
ATVStdPAL625,
|
|
|
|
ATVStdPAL525,
|
2017-04-02 17:20:25 -04:00
|
|
|
ATVStd405,
|
2017-04-02 21:17:37 -04:00
|
|
|
ATVStdShortInterleaved,
|
2017-04-03 12:57:48 -04:00
|
|
|
ATVStdShort,
|
2017-04-07 23:35:09 -04:00
|
|
|
ATVStdHSkip
|
2017-03-26 20:29:02 -04:00
|
|
|
};
|
|
|
|
|
2017-03-16 15:45:31 -04:00
|
|
|
enum ATVModulation {
|
2017-03-17 06:46:38 -04:00
|
|
|
ATV_FM1, //!< Classical frequency modulation with discriminator #1
|
|
|
|
ATV_FM2, //!< Classical frequency modulation with discriminator #2
|
2017-03-22 18:55:47 -04:00
|
|
|
ATV_FM3, //!< Classical frequency modulation with phase derivative discriminator
|
2017-03-17 06:46:38 -04:00
|
|
|
ATV_AM, //!< Classical amplitude modulation
|
2017-03-19 05:28:54 -04:00
|
|
|
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)
|
2017-03-16 15:45:31 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ATVConfig
|
|
|
|
{
|
2017-03-16 18:29:22 -04:00
|
|
|
int m_intSampleRate;
|
2017-03-26 20:29:02 -04:00
|
|
|
ATVStd m_enmATVStandard;
|
2017-04-02 17:20:25 -04:00
|
|
|
int m_intNumberOfLines;
|
2017-03-20 17:37:11 -04:00
|
|
|
float m_fltLineDuration;
|
2017-03-26 17:47:21 -04:00
|
|
|
float m_fltTopDuration;
|
2017-03-16 19:12:12 -04:00
|
|
|
float m_fltFramePerS;
|
|
|
|
float m_fltRatioOfRowsToDisplay;
|
2017-03-16 15:45:31 -04:00
|
|
|
float m_fltVoltLevelSynchroTop;
|
|
|
|
float m_fltVoltLevelSynchroBlack;
|
|
|
|
bool m_blnHSync;
|
|
|
|
bool m_blnVSync;
|
2017-03-19 14:10:48 -04:00
|
|
|
bool m_blnInvertVideo;
|
2017-03-24 07:57:49 -04:00
|
|
|
int m_intVideoTabIndex;
|
2017-03-16 15:45:31 -04:00
|
|
|
|
|
|
|
ATVConfig() :
|
2017-03-16 18:29:22 -04:00
|
|
|
m_intSampleRate(0),
|
2017-03-26 20:29:02 -04:00
|
|
|
m_enmATVStandard(ATVStdPAL625),
|
2017-04-02 17:20:25 -04:00
|
|
|
m_intNumberOfLines(625),
|
2017-03-20 17:37:11 -04:00
|
|
|
m_fltLineDuration(0.0f),
|
2017-03-26 17:47:21 -04:00
|
|
|
m_fltTopDuration(0.0f),
|
2017-04-10 16:03:18 -04:00
|
|
|
m_fltFramePerS(25.0f),
|
2017-03-16 19:12:12 -04:00
|
|
|
m_fltRatioOfRowsToDisplay(0.0f),
|
2017-03-16 19:33:14 -04:00
|
|
|
m_fltVoltLevelSynchroTop(0.0f),
|
|
|
|
m_fltVoltLevelSynchroBlack(1.0f),
|
2017-03-16 15:45:31 -04:00
|
|
|
m_blnHSync(false),
|
2017-03-19 14:10:48 -04:00
|
|
|
m_blnVSync(false),
|
2017-03-24 07:57:49 -04:00
|
|
|
m_blnInvertVideo(false),
|
|
|
|
m_intVideoTabIndex(0)
|
2017-03-16 15:45:31 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-03-17 04:39:20 -04:00
|
|
|
struct ATVRFConfig
|
|
|
|
{
|
2017-03-17 19:11:48 -04:00
|
|
|
int64_t m_intFrequencyOffset;
|
2017-03-17 04:39:20 -04:00
|
|
|
ATVModulation m_enmModulation;
|
|
|
|
float m_fltRFBandwidth;
|
|
|
|
float m_fltRFOppBandwidth;
|
2017-03-17 05:04:00 -04:00
|
|
|
bool m_blnFFTFiltering;
|
2017-03-17 06:46:38 -04:00
|
|
|
bool m_blndecimatorEnable;
|
2017-03-19 05:28:54 -04:00
|
|
|
float m_fltBFOFrequency;
|
2017-03-22 18:55:47 -04:00
|
|
|
float m_fmDeviation;
|
2017-03-17 04:39:20 -04:00
|
|
|
|
|
|
|
ATVRFConfig() :
|
2017-03-17 19:11:48 -04:00
|
|
|
m_intFrequencyOffset(0),
|
2017-03-17 04:39:20 -04:00
|
|
|
m_enmModulation(ATV_FM1),
|
|
|
|
m_fltRFBandwidth(0),
|
2017-03-17 05:04:00 -04:00
|
|
|
m_fltRFOppBandwidth(0),
|
2017-03-17 06:46:38 -04:00
|
|
|
m_blnFFTFiltering(false),
|
2017-03-19 05:28:54 -04:00
|
|
|
m_blndecimatorEnable(false),
|
2017-03-22 18:55:47 -04:00
|
|
|
m_fltBFOFrequency(0.0f),
|
|
|
|
m_fmDeviation(1.0f)
|
2017-03-17 04:39:20 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-11-06 17:57:59 -05:00
|
|
|
class MsgConfigureChannelizer : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getCenterFrequency() const { return m_centerFrequency; }
|
|
|
|
|
|
|
|
static MsgConfigureChannelizer* create(int centerFrequency)
|
|
|
|
{
|
|
|
|
return new MsgConfigureChannelizer(centerFrequency);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_centerFrequency;
|
|
|
|
|
|
|
|
MsgConfigureChannelizer(int centerFrequency) :
|
|
|
|
Message(),
|
|
|
|
m_centerFrequency(centerFrequency)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-03-18 05:04:57 -04:00
|
|
|
class MsgReportEffectiveSampleRate : public Message
|
|
|
|
{
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getSampleRate() const { return m_sampleRate; }
|
2017-03-23 21:42:36 -04:00
|
|
|
int getNbPointsPerLine() const { return m_nbPointsPerLine; }
|
2017-03-18 05:04:57 -04:00
|
|
|
|
2017-03-23 21:42:36 -04:00
|
|
|
static MsgReportEffectiveSampleRate* create(int sampleRate, int nbPointsPerLine)
|
2017-03-18 05:04:57 -04:00
|
|
|
{
|
2017-03-23 21:42:36 -04:00
|
|
|
return new MsgReportEffectiveSampleRate(sampleRate, nbPointsPerLine);
|
2017-03-18 05:04:57 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int m_sampleRate;
|
2017-03-23 21:42:36 -04:00
|
|
|
int m_nbPointsPerLine;
|
2017-03-18 05:04:57 -04:00
|
|
|
|
2017-03-23 21:42:36 -04:00
|
|
|
MsgReportEffectiveSampleRate(int sampleRate, int nbPointsPerLine) :
|
2017-03-18 05:04:57 -04:00
|
|
|
Message(),
|
2017-03-23 21:42:36 -04:00
|
|
|
m_sampleRate(sampleRate),
|
|
|
|
m_nbPointsPerLine(nbPointsPerLine)
|
2017-03-18 05:04:57 -04:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-06 17:04:23 -05:00
|
|
|
class MsgReportChannelSampleRateChanged : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getSampleRate() const { return m_sampleRate; }
|
|
|
|
|
|
|
|
static MsgReportChannelSampleRateChanged* create(int sampleRate)
|
|
|
|
{
|
|
|
|
return new MsgReportChannelSampleRateChanged(sampleRate);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_sampleRate;
|
|
|
|
|
|
|
|
MsgReportChannelSampleRateChanged(int sampleRate) :
|
|
|
|
Message(),
|
|
|
|
m_sampleRate(sampleRate)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
ATVDemod(DeviceSourceAPI *deviceAPI);
|
2017-02-23 02:18:56 -05:00
|
|
|
~ATVDemod();
|
2017-12-17 17:15:42 -05:00
|
|
|
virtual void destroy() { delete this; }
|
2017-10-01 04:12:54 -04:00
|
|
|
void setScopeSink(BasebandSampleSink* scopeSink) { m_scopeSink = scopeSink; }
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-02-25 01:12:41 -05:00
|
|
|
void configure(MessageQueue* objMessageQueue,
|
2017-03-16 19:12:12 -04:00
|
|
|
float fltLineDurationUs,
|
|
|
|
float fltTopDurationUs,
|
|
|
|
float fltFramePerS,
|
2017-03-26 20:29:02 -04:00
|
|
|
ATVStd enmATVStandard,
|
2017-04-02 17:20:25 -04:00
|
|
|
int intNumberOfLines,
|
2017-03-16 19:12:12 -04:00
|
|
|
float fltRatioOfRowsToDisplay,
|
2017-02-25 01:12:41 -05:00
|
|
|
float fltVoltLevelSynchroTop,
|
|
|
|
float fltVoltLevelSynchroBlack,
|
|
|
|
bool blnHSync,
|
2017-03-19 14:10:48 -04:00
|
|
|
bool blnVSync,
|
2017-03-24 07:57:49 -04:00
|
|
|
bool blnInvertVideo,
|
|
|
|
int intVideoTabIndex);
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-03-17 04:39:20 -04:00
|
|
|
void configureRF(MessageQueue* objMessageQueue,
|
2017-11-13 19:06:19 -05:00
|
|
|
int64_t frequencyOffset,
|
2017-03-17 04:39:20 -04:00
|
|
|
ATVModulation enmModulation,
|
|
|
|
float fltRFBandwidth,
|
2017-03-17 05:04:00 -04:00
|
|
|
float fltRFOppBandwidth,
|
2017-03-17 06:46:38 -04:00
|
|
|
bool blnFFTFiltering,
|
2017-03-19 05:28:54 -04:00
|
|
|
bool blndecimatorEnable,
|
2017-03-22 18:55:47 -04:00
|
|
|
float fltBFOFrequency,
|
|
|
|
float fmDeviation);
|
2017-03-17 04:39:20 -04:00
|
|
|
|
2017-02-23 02:18:56 -05:00
|
|
|
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);
|
|
|
|
|
2017-11-18 21:38:07 -05:00
|
|
|
virtual void getIdentifier(QString& id) { id = objectName(); }
|
|
|
|
virtual void getTitle(QString& title) { title = objectName(); }
|
2017-12-17 17:15:42 -05:00
|
|
|
virtual qint64 getCenterFrequency() const { return m_rfRunning.m_intFrequencyOffset; }
|
|
|
|
|
|
|
|
virtual QByteArray serialize() const { return QByteArray(); }
|
|
|
|
virtual bool deserialize(const QByteArray& data __attribute__((unused))) { return false; }
|
2017-11-18 21:38:07 -05:00
|
|
|
|
2017-11-06 19:04:43 -05:00
|
|
|
void setATVScreen(ATVScreenInterface *objScreen);
|
2017-03-16 21:05:13 -04:00
|
|
|
int getSampleRate();
|
2017-03-18 06:05:28 -04:00
|
|
|
int getEffectiveSampleRate();
|
2018-02-03 04:33:02 -05:00
|
|
|
double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30
|
2017-03-19 05:28:54 -04:00
|
|
|
bool getBFOLocked();
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-11-22 19:19:32 -05:00
|
|
|
static const QString m_channelIdURI;
|
|
|
|
static const QString m_channelId;
|
2017-11-08 08:23:49 -05:00
|
|
|
|
2017-11-06 17:57:59 -05:00
|
|
|
private slots:
|
|
|
|
void channelSampleRateChanged();
|
|
|
|
|
2017-02-23 02:18:56 -05:00
|
|
|
private:
|
2017-03-18 05:04:57 -04:00
|
|
|
struct ATVConfigPrivate
|
|
|
|
{
|
|
|
|
int m_intTVSampleRate;
|
2017-04-06 19:35:08 -04:00
|
|
|
int m_intNumberSamplePerLine;
|
2017-03-18 05:04:57 -04:00
|
|
|
|
|
|
|
ATVConfigPrivate() :
|
2017-04-06 19:35:08 -04:00
|
|
|
m_intTVSampleRate(0),
|
|
|
|
m_intNumberSamplePerLine(0)
|
2017-03-18 05:04:57 -04:00
|
|
|
{}
|
|
|
|
};
|
2017-02-23 02:18:56 -05:00
|
|
|
|
|
|
|
class MsgConfigureATVDemod : public Message
|
|
|
|
{
|
2017-03-16 18:13:51 -04:00
|
|
|
MESSAGE_CLASS_DECLARATION
|
2017-02-23 02:18:56 -05:00
|
|
|
|
|
|
|
public:
|
2017-03-17 04:39:20 -04:00
|
|
|
static MsgConfigureATVDemod* create(
|
|
|
|
float fltLineDurationUs,
|
2017-03-16 18:29:22 -04:00
|
|
|
float fltTopDurationUs,
|
2017-03-16 19:12:12 -04:00
|
|
|
float fltFramePerS,
|
2017-03-26 20:29:02 -04:00
|
|
|
ATVStd enmATVStandard,
|
2017-04-02 17:20:25 -04:00
|
|
|
int intNumberOfLines,
|
2017-03-16 19:12:12 -04:00
|
|
|
float fltRatioOfRowsToDisplay,
|
2017-02-25 01:12:41 -05:00
|
|
|
float fltVoltLevelSynchroTop,
|
|
|
|
float fltVoltLevelSynchroBlack,
|
|
|
|
bool blnHSync,
|
2017-03-19 14:10:48 -04:00
|
|
|
bool blnVSync,
|
2017-03-24 07:57:49 -04:00
|
|
|
bool blnInvertVideo,
|
|
|
|
int intVideoTabIndex)
|
2017-02-23 02:18:56 -05:00
|
|
|
{
|
2017-03-17 04:39:20 -04:00
|
|
|
return new MsgConfigureATVDemod(
|
|
|
|
fltLineDurationUs,
|
2017-03-16 18:29:22 -04:00
|
|
|
fltTopDurationUs,
|
2017-03-16 19:12:12 -04:00
|
|
|
fltFramePerS,
|
2017-03-26 20:29:02 -04:00
|
|
|
enmATVStandard,
|
2017-04-02 17:20:25 -04:00
|
|
|
intNumberOfLines,
|
2017-03-16 19:12:12 -04:00
|
|
|
fltRatioOfRowsToDisplay,
|
2017-02-25 01:12:41 -05:00
|
|
|
fltVoltLevelSynchroTop,
|
|
|
|
fltVoltLevelSynchroBlack,
|
|
|
|
blnHSync,
|
2017-03-19 14:10:48 -04:00
|
|
|
blnVSync,
|
2017-03-24 07:57:49 -04:00
|
|
|
blnInvertVideo,
|
|
|
|
intVideoTabIndex);
|
2017-02-23 02:18:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
ATVConfig m_objMsgConfig;
|
|
|
|
|
|
|
|
private:
|
2017-03-16 19:12:12 -04:00
|
|
|
MsgConfigureATVDemod(
|
|
|
|
float fltLineDurationUs,
|
2017-03-16 18:29:22 -04:00
|
|
|
float fltTopDurationUs,
|
2017-03-16 19:12:12 -04:00
|
|
|
float fltFramePerS,
|
2017-03-26 20:29:02 -04:00
|
|
|
ATVStd enmATVStandard,
|
2017-04-02 17:20:25 -04:00
|
|
|
int intNumberOfLines,
|
2017-03-16 19:12:12 -04:00
|
|
|
float flatRatioOfRowsToDisplay,
|
2017-02-25 01:12:41 -05:00
|
|
|
float fltVoltLevelSynchroTop,
|
|
|
|
float fltVoltLevelSynchroBlack,
|
|
|
|
bool blnHSync,
|
2017-03-19 14:10:48 -04:00
|
|
|
bool blnVSync,
|
2017-03-24 07:57:49 -04:00
|
|
|
bool blnInvertVideo,
|
|
|
|
int intVideoTabIndex) :
|
2017-02-23 02:18:56 -05:00
|
|
|
Message()
|
|
|
|
{
|
|
|
|
m_objMsgConfig.m_fltVoltLevelSynchroBlack = fltVoltLevelSynchroBlack;
|
|
|
|
m_objMsgConfig.m_fltVoltLevelSynchroTop = fltVoltLevelSynchroTop;
|
2017-03-16 19:12:12 -04:00
|
|
|
m_objMsgConfig.m_fltFramePerS = fltFramePerS;
|
2017-03-26 20:29:02 -04:00
|
|
|
m_objMsgConfig.m_enmATVStandard = enmATVStandard;
|
2017-04-02 17:20:25 -04:00
|
|
|
m_objMsgConfig.m_intNumberOfLines = intNumberOfLines;
|
2017-03-20 17:37:11 -04:00
|
|
|
m_objMsgConfig.m_fltLineDuration = fltLineDurationUs;
|
2017-03-26 17:47:21 -04:00
|
|
|
m_objMsgConfig.m_fltTopDuration = fltTopDurationUs;
|
2017-03-16 19:12:12 -04:00
|
|
|
m_objMsgConfig.m_fltRatioOfRowsToDisplay = flatRatioOfRowsToDisplay;
|
2017-02-23 02:18:56 -05:00
|
|
|
m_objMsgConfig.m_blnHSync = blnHSync;
|
|
|
|
m_objMsgConfig.m_blnVSync = blnVSync;
|
2017-03-19 14:10:48 -04:00
|
|
|
m_objMsgConfig.m_blnInvertVideo = blnInvertVideo;
|
2017-03-24 07:57:49 -04:00
|
|
|
m_objMsgConfig.m_intVideoTabIndex = intVideoTabIndex;
|
2017-02-23 02:18:56 -05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-03-17 04:39:20 -04:00
|
|
|
class MsgConfigureRFATVDemod : public Message
|
|
|
|
{
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
static MsgConfigureRFATVDemod* create(
|
2017-11-13 19:06:19 -05:00
|
|
|
int64_t frequencyOffset,
|
2017-03-17 04:39:20 -04:00
|
|
|
ATVModulation enmModulation,
|
|
|
|
float fltRFBandwidth,
|
2017-03-17 05:04:00 -04:00
|
|
|
float fltRFOppBandwidth,
|
2017-03-17 06:46:38 -04:00
|
|
|
bool blnFFTFiltering,
|
2017-03-19 05:28:54 -04:00
|
|
|
bool blndecimatorEnable,
|
2017-03-22 18:55:47 -04:00
|
|
|
int intBFOFrequency,
|
|
|
|
float fmDeviation)
|
2017-03-17 04:39:20 -04:00
|
|
|
{
|
|
|
|
return new MsgConfigureRFATVDemod(
|
2017-11-13 19:06:19 -05:00
|
|
|
frequencyOffset,
|
2017-03-17 04:39:20 -04:00
|
|
|
enmModulation,
|
|
|
|
fltRFBandwidth,
|
2017-03-17 05:04:00 -04:00
|
|
|
fltRFOppBandwidth,
|
2017-03-17 06:46:38 -04:00
|
|
|
blnFFTFiltering,
|
2017-03-19 05:28:54 -04:00
|
|
|
blndecimatorEnable,
|
2017-03-22 18:55:47 -04:00
|
|
|
intBFOFrequency,
|
|
|
|
fmDeviation);
|
2017-03-17 04:39:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ATVRFConfig m_objMsgConfig;
|
|
|
|
|
|
|
|
private:
|
|
|
|
MsgConfigureRFATVDemod(
|
2017-11-13 19:06:19 -05:00
|
|
|
int64_t frequencyOffset,
|
2017-03-17 04:39:20 -04:00
|
|
|
ATVModulation enmModulation,
|
|
|
|
float fltRFBandwidth,
|
2017-03-17 05:04:00 -04:00
|
|
|
float fltRFOppBandwidth,
|
2017-03-17 06:46:38 -04:00
|
|
|
bool blnFFTFiltering,
|
2017-03-19 05:28:54 -04:00
|
|
|
bool blndecimatorEnable,
|
2017-03-22 18:55:47 -04:00
|
|
|
float fltBFOFrequency,
|
|
|
|
float fmDeviation) :
|
2017-03-17 04:39:20 -04:00
|
|
|
Message()
|
|
|
|
{
|
2017-11-13 19:06:19 -05:00
|
|
|
m_objMsgConfig.m_intFrequencyOffset = frequencyOffset;
|
2017-03-17 04:39:20 -04:00
|
|
|
m_objMsgConfig.m_enmModulation = enmModulation;
|
|
|
|
m_objMsgConfig.m_fltRFBandwidth = fltRFBandwidth;
|
|
|
|
m_objMsgConfig.m_fltRFOppBandwidth = fltRFOppBandwidth;
|
2017-03-17 05:04:00 -04:00
|
|
|
m_objMsgConfig.m_blnFFTFiltering = blnFFTFiltering;
|
2017-03-18 04:19:51 -04:00
|
|
|
m_objMsgConfig.m_blndecimatorEnable = blndecimatorEnable;
|
2017-03-19 05:28:54 -04:00
|
|
|
m_objMsgConfig.m_fltBFOFrequency = fltBFOFrequency;
|
2017-03-22 18:55:47 -04:00
|
|
|
m_objMsgConfig.m_fmDeviation = fmDeviation;
|
2017-03-17 04:39:20 -04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-03-28 13:02:03 -04:00
|
|
|
/**
|
|
|
|
* Exponential average using integers and alpha as the inverse of a power of two
|
|
|
|
*/
|
|
|
|
class AvgExpInt
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AvgExpInt(int log2Alpha) : m_log2Alpha(log2Alpha), m_m1(0), m_start(true) {}
|
|
|
|
void reset() { m_start = true; }
|
|
|
|
|
|
|
|
int run(int m0)
|
|
|
|
{
|
|
|
|
if (m_start)
|
|
|
|
{
|
|
|
|
m_m1 = m0;
|
|
|
|
m_start = false;
|
|
|
|
return m0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_m1 = m0 + m_m1 - (m_m1>>m_log2Alpha);
|
|
|
|
return m_m1>>m_log2Alpha;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_log2Alpha;
|
|
|
|
int m_m1;
|
|
|
|
bool m_start;
|
|
|
|
};
|
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
DeviceSourceAPI* m_deviceAPI;
|
2017-11-06 17:57:59 -05:00
|
|
|
ThreadedBasebandSampleSink* m_threadedChannelizer;
|
|
|
|
DownChannelizer* m_channelizer;
|
2017-10-01 04:12:54 -04:00
|
|
|
|
2017-03-20 06:57:52 -04:00
|
|
|
//*************** SCOPE ***************
|
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
BasebandSampleSink* m_scopeSink;
|
|
|
|
SampleVector m_scopeSampleBuffer;
|
2017-03-20 06:57:52 -04:00
|
|
|
|
2017-03-16 18:13:51 -04:00
|
|
|
//*************** ATV PARAMETERS ***************
|
2017-11-06 19:04:43 -05:00
|
|
|
ATVScreenInterface * m_registeredATVScreen;
|
2017-03-16 18:13:51 -04:00
|
|
|
|
2017-04-06 19:35:08 -04:00
|
|
|
//int m_intNumberSamplePerLine;
|
2017-03-16 18:13:51 -04:00
|
|
|
int m_intNumberSamplePerTop;
|
|
|
|
int m_intNumberOfLines;
|
2017-03-28 20:23:03 -04:00
|
|
|
int m_intNumberOfSyncLines; //!< this is the number of non displayable lines at the start of a frame. First displayable row comes next.
|
|
|
|
int m_intNumberOfBlackLines; //!< this is the total number of lines not part of the image and is used for vertical screen size
|
2017-04-05 07:48:43 -04:00
|
|
|
int m_intNumberOfEqLines; //!< number of equalizing lines both whole and partial
|
2017-03-28 20:23:03 -04:00
|
|
|
int m_intNumberSamplePerLineSignals; //!< number of samples in the non image part of the line (signals)
|
|
|
|
int m_intNumberSaplesPerHSync; //!< number of samples per horizontal synchronization pattern (pulse + back porch)
|
2017-04-02 21:17:37 -04:00
|
|
|
bool m_interleaved; //!< interleaved image
|
2017-03-16 18:13:51 -04:00
|
|
|
|
|
|
|
//*************** PROCESSING ***************
|
|
|
|
|
|
|
|
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;
|
2017-04-03 21:18:11 -04:00
|
|
|
int m_intSampleIndex;
|
2017-03-16 18:13:51 -04:00
|
|
|
int m_intRowIndex;
|
2017-03-30 13:41:43 -04:00
|
|
|
int m_intLineIndex;
|
2017-03-16 18:13:51 -04:00
|
|
|
|
2017-03-28 20:23:03 -04:00
|
|
|
AvgExpInt m_objAvgColIndex;
|
|
|
|
int m_intAvgColIndex;
|
|
|
|
|
2017-04-09 11:43:23 -04:00
|
|
|
SampleVector m_sampleBuffer;
|
|
|
|
|
2017-03-16 18:13:51 -04:00
|
|
|
//*************** RF ***************
|
|
|
|
|
2018-02-03 04:33:02 -05:00
|
|
|
MovingAverageUtil<double, double, 32> m_objMagSqAverage;
|
2017-03-16 18:13:51 -04:00
|
|
|
|
2017-03-17 19:11:48 -04:00
|
|
|
NCO m_nco;
|
2017-03-19 05:28:54 -04:00
|
|
|
SimplePhaseLock m_bfoPLL;
|
|
|
|
SecondOrderRecursiveFilter m_bfoFilter;
|
2017-03-17 19:11:48 -04:00
|
|
|
|
2017-03-17 06:46:38 -04:00
|
|
|
// Interpolator group for decimation and/or double sideband RF filtering
|
|
|
|
Interpolator m_interpolator;
|
|
|
|
Real m_interpolatorDistance;
|
|
|
|
Real m_interpolatorDistanceRemain;
|
|
|
|
|
|
|
|
// Used for vestigial SSB with asymmetrical filtering (needs double sideband scheme)
|
|
|
|
fftfilt* m_DSBFilter;
|
|
|
|
Complex* m_DSBFilterBuffer;
|
|
|
|
int m_DSBFilterBufferIndex;
|
|
|
|
static const int m_ssbFftLen;
|
|
|
|
|
2017-03-22 18:55:47 -04:00
|
|
|
// Used for FM
|
|
|
|
PhaseDiscriminators m_objPhaseDiscri;
|
|
|
|
|
2017-03-16 18:13:51 -04:00
|
|
|
//QElapsedTimer m_objTimer;
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
ATVConfig m_running;
|
|
|
|
ATVConfig m_config;
|
2017-02-23 02:18:56 -05:00
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
ATVRFConfig m_rfRunning;
|
|
|
|
ATVRFConfig m_rfConfig;
|
2017-03-17 05:04:00 -04:00
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
ATVConfigPrivate m_runningPrivate;
|
|
|
|
ATVConfigPrivate m_configPrivate;
|
2017-03-18 05:04:57 -04:00
|
|
|
|
2017-02-23 02:18:56 -05:00
|
|
|
QMutex m_objSettingsMutex;
|
|
|
|
|
2017-03-16 21:05:13 -04:00
|
|
|
void applySettings();
|
2017-03-26 20:29:02 -04:00
|
|
|
void applyStandard();
|
2017-03-18 00:37:52 -04:00
|
|
|
void demod(Complex& c);
|
2017-03-20 00:06:33 -04:00
|
|
|
static float getRFBandwidthDivisor(ATVModulation modulation);
|
2017-04-03 21:18:11 -04:00
|
|
|
|
2017-04-07 23:35:09 -04:00
|
|
|
inline void processHSkip(float& fltVal, int& intVal)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->setDataColor(m_intColIndex - m_intNumberSaplesPerHSync + m_intNumberSamplePerTop, intVal, intVal, intVal);
|
2017-04-03 21:18:11 -04:00
|
|
|
|
|
|
|
// Horizontal Synchro detection
|
|
|
|
|
|
|
|
// Floor Detection 0
|
2017-10-01 03:06:55 -04:00
|
|
|
if (fltVal < m_running.m_fltVoltLevelSynchroTop)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
m_intSynchroPoints++;
|
|
|
|
}
|
|
|
|
// Black detection 0.3
|
2017-10-01 03:06:55 -04:00
|
|
|
else if (fltVal > m_running.m_fltVoltLevelSynchroBlack)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
m_intSynchroPoints = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// sync pulse
|
|
|
|
|
|
|
|
m_blnSynchroDetected = (m_intSynchroPoints == m_intNumberSamplePerTop);
|
|
|
|
|
|
|
|
if (m_blnSynchroDetected)
|
|
|
|
{
|
2017-10-01 03:06:55 -04:00
|
|
|
if (m_intSampleIndex >= (3 * m_runningPrivate.m_intNumberSamplePerLine)/2) // first after skip
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
//qDebug("VSync: %d %d %d", m_intColIndex, m_intSampleIndex, m_intLineIndex);
|
|
|
|
m_intAvgColIndex = m_intColIndex;
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->renderImage(0);
|
2017-04-03 21:18:11 -04:00
|
|
|
|
|
|
|
m_intImageIndex++;
|
|
|
|
m_intLineIndex = 0;
|
|
|
|
m_intRowIndex = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_intSampleIndex = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_intSampleIndex++;
|
|
|
|
}
|
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
if (m_intColIndex < m_runningPrivate.m_intNumberSamplePerLine + m_intNumberSamplePerTop - 1)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
m_intColIndex++;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-10-01 03:06:55 -04:00
|
|
|
if (m_running.m_blnHSync && (m_intLineIndex == 0))
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
//qDebug("HCorr: %d", m_intAvgColIndex);
|
2017-10-01 03:06:55 -04:00
|
|
|
m_intColIndex = m_intNumberSamplePerTop + (m_runningPrivate.m_intNumberSamplePerLine - m_intAvgColIndex)/2; // amortizing factor 1/2
|
2017-04-03 21:18:11 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_intColIndex = m_intNumberSamplePerTop;
|
|
|
|
}
|
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
if ((m_rfRunning.m_enmModulation == ATV_AM)
|
|
|
|
|| (m_rfRunning.m_enmModulation == ATV_USB)
|
|
|
|
|| (m_rfRunning.m_enmModulation == ATV_LSB))
|
2017-04-05 01:35:48 -04:00
|
|
|
{
|
|
|
|
m_fltAmpMin = m_fltEffMin;
|
|
|
|
m_fltAmpMax = m_fltEffMax;
|
|
|
|
m_fltAmpDelta = m_fltEffMax-m_fltEffMin;
|
|
|
|
|
|
|
|
if(m_fltAmpDelta<=0.0)
|
|
|
|
{
|
|
|
|
m_fltAmpDelta=1.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Reset extrema
|
|
|
|
m_fltEffMin = 2000000.0f;
|
|
|
|
m_fltEffMax = -2000000.0f;
|
|
|
|
}
|
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->selectRow(m_intRowIndex);
|
2017-04-03 21:18:11 -04:00
|
|
|
m_intLineIndex++;
|
|
|
|
m_intRowIndex++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void processClassic(float& fltVal, int& intVal)
|
|
|
|
{
|
2017-10-01 03:06:55 -04:00
|
|
|
int intSynchroTimeSamples= (3 * m_runningPrivate.m_intNumberSamplePerLine)/4;
|
|
|
|
float fltSynchroTrameLevel = 0.5f*((float)intSynchroTimeSamples) * m_running.m_fltVoltLevelSynchroBlack;
|
2017-04-03 21:18:11 -04:00
|
|
|
|
|
|
|
// Horizontal Synchro detection
|
|
|
|
|
|
|
|
// Floor Detection 0
|
2017-10-01 03:06:55 -04:00
|
|
|
if (fltVal < m_running.m_fltVoltLevelSynchroTop)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
m_intSynchroPoints++;
|
|
|
|
}
|
|
|
|
// Black detection 0.3
|
2017-10-01 03:06:55 -04:00
|
|
|
else if (fltVal > m_running.m_fltVoltLevelSynchroBlack)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
m_intSynchroPoints = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_blnSynchroDetected = (m_intSynchroPoints == m_intNumberSamplePerTop);
|
|
|
|
|
|
|
|
//Horizontal Synchro processing
|
|
|
|
|
|
|
|
bool blnNewLine = false;
|
|
|
|
|
2017-04-05 23:11:48 -04:00
|
|
|
if (m_blnSynchroDetected)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
2017-10-01 03:06:55 -04:00
|
|
|
m_intAvgColIndex = m_intSampleIndex - m_intColIndex - (m_intColIndex < m_runningPrivate.m_intNumberSamplePerLine/2 ? 150 : 0);
|
2017-04-05 23:11:48 -04:00
|
|
|
//qDebug("HSync: %d %d %d", m_intSampleIndex, m_intColIndex, m_intAvgColIndex);
|
|
|
|
m_intSampleIndex = 0;
|
2017-04-03 21:18:11 -04:00
|
|
|
}
|
2017-04-05 23:11:48 -04:00
|
|
|
else
|
|
|
|
{
|
|
|
|
m_intSampleIndex++;
|
|
|
|
}
|
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
if (!m_running.m_blnHSync && (m_intColIndex >= m_runningPrivate.m_intNumberSamplePerLine)) // H Sync not active
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
2017-04-05 23:11:48 -04:00
|
|
|
m_intColIndex = 0;
|
2017-04-03 21:18:11 -04:00
|
|
|
blnNewLine = true;
|
|
|
|
}
|
2017-10-01 03:06:55 -04:00
|
|
|
else if (m_intColIndex >= m_runningPrivate.m_intNumberSamplePerLine + m_intNumberSamplePerTop) // No valid H sync
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
2017-10-01 03:06:55 -04:00
|
|
|
if (m_running.m_blnHSync && (m_intLineIndex == 0))
|
2017-04-05 23:11:48 -04:00
|
|
|
{
|
|
|
|
//qDebug("HSync: %d %d", m_intColIndex, m_intAvgColIndex);
|
|
|
|
m_intColIndex = m_intNumberSamplePerTop + m_intAvgColIndex/4; // amortizing 1/4
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_intColIndex = m_intNumberSamplePerTop;
|
|
|
|
}
|
|
|
|
|
2017-04-05 02:24:59 -04:00
|
|
|
blnNewLine = true;
|
2017-04-03 21:18:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (blnNewLine)
|
|
|
|
{
|
2017-10-01 03:06:55 -04:00
|
|
|
if ((m_rfRunning.m_enmModulation == ATV_AM)
|
|
|
|
|| (m_rfRunning.m_enmModulation == ATV_USB)
|
|
|
|
|| (m_rfRunning.m_enmModulation == ATV_LSB))
|
2017-04-05 01:35:48 -04:00
|
|
|
{
|
|
|
|
m_fltAmpMin = m_fltEffMin;
|
|
|
|
m_fltAmpMax = m_fltEffMax;
|
|
|
|
m_fltAmpDelta = m_fltEffMax-m_fltEffMin;
|
|
|
|
|
|
|
|
if(m_fltAmpDelta<=0.0)
|
|
|
|
{
|
|
|
|
m_fltAmpDelta=1.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Reset extrema
|
|
|
|
m_fltEffMin = 2000000.0f;
|
|
|
|
m_fltEffMax = -2000000.0f;
|
|
|
|
}
|
|
|
|
|
2017-04-03 21:18:11 -04:00
|
|
|
m_fltAmpLineAverage=0.0f;
|
|
|
|
|
|
|
|
//New line + Interleaving
|
|
|
|
m_intRowIndex += m_interleaved ? 2 : 1;
|
|
|
|
|
|
|
|
if (m_intRowIndex < m_intNumberOfLines)
|
|
|
|
{
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->selectRow(m_intRowIndex - m_intNumberOfSyncLines);
|
2017-04-03 21:18:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
m_intLineIndex++;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Filling pixels
|
|
|
|
|
2017-04-05 23:11:48 -04:00
|
|
|
// +4 is to compensate shift due to hsync amortizing factor of 1/4
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->setDataColor(m_intColIndex - m_intNumberSaplesPerHSync + m_intNumberSamplePerTop + 4, intVal, intVal, intVal);
|
2017-04-03 21:18:11 -04:00
|
|
|
m_intColIndex++;
|
|
|
|
|
|
|
|
// Vertical sync and image rendering
|
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
if ((m_running.m_blnVSync) && (m_intLineIndex < m_intNumberOfLines)) // VSync activated and lines in range
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
if (m_intColIndex >= intSynchroTimeSamples)
|
|
|
|
{
|
|
|
|
if (m_fltAmpLineAverage <= fltSynchroTrameLevel)
|
|
|
|
{
|
|
|
|
m_fltAmpLineAverage = 0.0f;
|
|
|
|
|
|
|
|
if (!m_blnVerticalSynchroDetected) // not yet
|
|
|
|
{
|
|
|
|
m_blnVerticalSynchroDetected = true; // prevent repetition
|
|
|
|
|
|
|
|
if ((m_intLineIndex % 2 == 0) || !m_interleaved) // even => odd image
|
|
|
|
{
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->renderImage(0);
|
2017-04-03 21:18:11 -04:00
|
|
|
m_intRowIndex = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_intRowIndex = 0;
|
|
|
|
}
|
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->selectRow(m_intRowIndex - m_intNumberOfSyncLines);
|
2017-04-03 21:18:11 -04:00
|
|
|
m_intLineIndex = 0;
|
|
|
|
m_intImageIndex++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_blnVerticalSynchroDetected = false; // reset
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-04-05 21:14:03 -04:00
|
|
|
else // no VSync or lines out of range => arbitrary
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
if (m_intLineIndex >= m_intNumberOfLines/2)
|
|
|
|
{
|
|
|
|
if (m_intImageIndex % 2 == 1) // odd image
|
|
|
|
{
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->renderImage(0);
|
2017-04-03 21:18:11 -04:00
|
|
|
|
2017-10-01 03:06:55 -04:00
|
|
|
if (m_rfRunning.m_enmModulation == ATV_AM)
|
2017-04-03 21:18:11 -04:00
|
|
|
{
|
|
|
|
m_fltAmpMin = m_fltEffMin;
|
|
|
|
m_fltAmpMax = m_fltEffMax;
|
|
|
|
m_fltAmpDelta = m_fltEffMax-m_fltEffMin;
|
|
|
|
|
|
|
|
if(m_fltAmpDelta<=0.0)
|
|
|
|
{
|
|
|
|
m_fltAmpDelta=1.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Reset extrema
|
|
|
|
m_fltEffMin = 2000000.0f;
|
|
|
|
m_fltEffMax = -2000000.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_intRowIndex = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_intRowIndex = 0;
|
|
|
|
}
|
|
|
|
|
2017-10-01 04:12:54 -04:00
|
|
|
m_registeredATVScreen->selectRow(m_intRowIndex - m_intNumberOfSyncLines);
|
2017-04-03 21:18:11 -04:00
|
|
|
m_intLineIndex = 0;
|
|
|
|
m_intImageIndex++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-02-23 02:18:56 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_ATVDEMOD_H
|