ATV Demod: integer number of points per line is simply an Euclidean division

pull/620/head
f4exb 2020-08-20 08:50:44 +02:00
rodzic 0c04560b3c
commit cbc81b8769
1 zmienionych plików z 2 dodań i 11 usunięć

Wyświetl plik

@ -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;
}