Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 49dca93196 |
@@ -529,9 +529,12 @@ AudioAnalysisReport AudioAnalyzer::analyzeFile(const QString &path) const {
|
|||||||
const double genuineRatio = static_cast<double>(report.genuineWindows) / report.informativeWindows;
|
const double genuineRatio = static_cast<double>(report.genuineWindows) / report.informativeWindows;
|
||||||
|
|
||||||
const bool hasStrongCdBoundary = report.cutoffKhz > 20.5 && report.rolloffKhz > 18.5 &&
|
const bool hasStrongCdBoundary = report.cutoffKhz > 20.5 && report.rolloffKhz > 18.5 &&
|
||||||
report.spectralFlatness > 0.09 && report.suspectRatio <= 0.20;
|
report.spectralFlatness > 0.06 && report.suspectRatio <= 0.20;
|
||||||
const bool hasCdTopBand = report.veryHighBandRatio > 0.0000005 && report.spectralFlatness > 0.09;
|
const bool hasCdTopBand = report.veryHighBandRatio > 0.0000005 && report.spectralFlatness > 0.09;
|
||||||
const bool hasLossyFlatness = report.spectralFlatness < 0.075;
|
const bool hasLossyFlatness = report.spectralFlatness < 0.075;
|
||||||
|
const bool hasLossyBoundary = report.cutoffKhz < 19.5 || report.rolloffKhz < 17.5;
|
||||||
|
const bool hasStrongLowpassSignature = hasLossyFlatness && hasLossyBoundary;
|
||||||
|
const bool hasSuspectEvidence = report.suspectWindows >= 2 && report.suspectRatio >= 0.45;
|
||||||
const bool hasAacLikeLowpass = report.veryHighBandRatio <= 0.0000005 && report.spectralFlatness < 0.19 &&
|
const bool hasAacLikeLowpass = report.veryHighBandRatio <= 0.0000005 && report.spectralFlatness < 0.19 &&
|
||||||
report.suspectRatio >= 0.55 && report.suspectWindows >= 2;
|
report.suspectRatio >= 0.55 && report.suspectWindows >= 2;
|
||||||
|
|
||||||
@@ -549,7 +552,8 @@ AudioAnalysisReport AudioAnalyzer::analyzeFile(const QString &path) const {
|
|||||||
report.conclusion = QString("CDDA %1").arg(QString::number(confidence) + "%");
|
report.conclusion = QString("CDDA %1").arg(QString::number(confidence) + "%");
|
||||||
report.accuracy = QString::number(confidence) + "%";
|
report.accuracy = QString::number(confidence) + "%";
|
||||||
report.confidence = confidence;
|
report.confidence = confidence;
|
||||||
} else if (hasLossyFlatness || hasAacLikeLowpass || (report.suspectRatio >= 0.72 && report.suspectWindows >= 4)) {
|
} else if (hasAacLikeLowpass || hasStrongLowpassSignature ||
|
||||||
|
(hasSuspectEvidence && (hasLossyFlatness || hasLossyBoundary || report.suspectRatio >= 0.72))) {
|
||||||
const int confidence = std::clamp(static_cast<int>(std::round(55.0 + report.suspectRatio * 45.0)), 55, 100);
|
const int confidence = std::clamp(static_cast<int>(std::round(55.0 + report.suspectRatio * 45.0)), 55, 100);
|
||||||
report.conclusion = QString("MPEG %1").arg(QString::number(confidence) + "%");
|
report.conclusion = QString("MPEG %1").arg(QString::number(confidence) + "%");
|
||||||
report.accuracy = QString::number(confidence) + "%";
|
report.accuracy = QString::number(confidence) + "%";
|
||||||
|
|||||||
Reference in New Issue
Block a user