Skip to content

CMRT 25: Analyzer: Add QualityScorer for canonical-track selection - #34

Open
Swarnadip-Kar wants to merge 1 commit into
cmrt-dao-mbid-lookupfrom
cmrt-quality-scoring
Open

CMRT 25: Analyzer: Add QualityScorer for canonical-track selection#34
Swarnadip-Kar wants to merge 1 commit into
cmrt-dao-mbid-lookupfrom
cmrt-quality-scoring

Conversation

@Swarnadip-Kar

Copy link
Copy Markdown
Owner

Adds QualityScorer, a static utility that scores a track's audio quality
for CMRT canonical-track selection (CMRT 27/28 use this to decide which
track in a group of duplicate masterings becomes the canonical reference).

Scoring (Quality_Scoring_Ayush_Proposal.txt)

  • Base score by format: FLAC/ALAC/AIFF/WAV = 100/90, down to WMA = 50
  • +5 if samplerate > 44100 Hz
  • +min(5, filesize / 10MB) as a rough bitrate proxy

Not implemented: the proposal's bit-depth bonus

Bit depth has nowhere to be queried from yet -- it only exists inside
track_analysis's audio_quality JSON blob, written by a fake-lossless
detector that hasn't been built. Adding that bonus now would mean parsing
JSON in this PR for a feature that doesn't exist. Left as a comment in
qualityscorer.cpp pointing at whichever PR adds that detector.

Notes for reviewers

  • TrackQualityFields (this PR) and TrackQualityInfo (CMRT 27, in the DAO)
    are two different structs on purpose -- this one is QualityScorer's input
    shape, the other is what TrackFingerprintDao can cheaply SELECT. CMRT 27
    adapts between them.
  • The file-size bonus is the weakest term here (conflates bitrate and
    track length) -- flagged in a comment, not fixed, since that's a tuning
    question once this runs against a real library.

Depends on: cmrt-dao-mbid-lookup (#33)

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 27872363108

Coverage increased (+0.001%) to 30.438%

Details

  • Coverage increased (+0.001%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 116230
Covered Lines: 35378
Line Coverage: 30.44%
Coverage Strength: 59259.89 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants