fixed frame layout detection

This commit is contained in:
Thomas Jentzsch 2022-10-09 07:38:08 +02:00
parent e752f376e9
commit 9e973bc955
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ void FrameLayoutDetector::finalizeFrame()
// 1.0 (>=312) and added to PAL and (inverted) NTSC sums.
constexpr double ODD_PENALTY = 0.5; // guessed value :)
const double palFrame = BSPF::clamp(((myCurrentFrameFinalLines % 2) ? ODD_PENALTY : 1.0)
* static_cast<double>(myCurrentFrameFinalLines - frameLinesNTSC)
* (static_cast<double>(myCurrentFrameFinalLines) - frameLinesNTSC)
/ static_cast<double>(frameLinesPAL - frameLinesNTSC), 0.0, 1.0);
myPalFrameSum += palFrame;
myNtscFrameSum += 1.0 - palFrame;