However, it sometimes happens that a CD contains both HDCD tracks and non-HDCD. (Compilations, you know?) And if the track boundaries are slightly off, you might get HDCD packets in the wrong track. You might have a bit of manual ReplayGain adjustments coming up.
ffmpeg can do some analysis. Which sometimes can go wrong: https://hydrogenaud.io/index.php/topic,121723.0.html
Are you people certain you need to bother with HDCD? In my opinion that tech has always been dead.About 1 in 70 in my collection.