From cbc81b876911f2bc26ae7df9d0108a01d434d5a0 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 20 Aug 2020 08:50:44 +0200 Subject: [PATCH] ATV Demod: integer number of points per line is simply an Euclidean division --- plugins/channelrx/demodatv/atvdemodsettings.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/channelrx/demodatv/atvdemodsettings.cpp b/plugins/channelrx/demodatv/atvdemodsettings.cpp index 78beae444..1b34717d3 100644 --- a/plugins/channelrx/demodatv/atvdemodsettings.cpp +++ b/plugins/channelrx/demodatv/atvdemodsettings.cpp @@ -318,15 +318,6 @@ float ATVDemodSettings::getRFBandwidthDivisor(ATVModulation modulation) void ATVDemodSettings::getBaseValues(int sampleRate, int linesPerSecond, uint32_t& nbPointsPerLine) { - int maxPoints = sampleRate / linesPerSecond; - int i = maxPoints; - - for (; i > 0; i--) - { - if ((i * linesPerSecond) % 10 == 0) { - break; - } - } - - nbPointsPerLine = i == 0 ? maxPoints : i; + nbPointsPerLine = sampleRate / linesPerSecond; + nbPointsPerLine = nbPointsPerLine == 0 ? 1 : nbPointsPerLine; } \ No newline at end of file