this result, onlythe loudest 20% is used for determining the averageloudness of the loud passages.At the same time, the loudest peak is determined.The DR Value is the difference between the peak and the top20 average RMS measurements (top 20 RMS minus Peak =DR).
... eiher I didn't understood what they do or they did not write the documentation accurate enough.
My read is that you break the file into 300 microseconds long pieces and do an RMS measurement on each, create a histogram from these measurements, discard the lower 80% of the measurements and average the remaining 20%. Compute the peak level for the entire file and subtract this from the average you computed to get the DR value.
I'm curious, what criteria were you using to compare the masters?If you did not normalize loudness before auditioning, you can expect the louder master (lowest DR) will almost always win.
...For comparing the dynamics of different masters of the same recording, I'd just compare the average (or RMS) to the peak. This approach won't work when comparing different-unrelated recordings, but it should tell you which copy of the same recording is more compressed.
It might not be possible to directly calculate the RMS value over the entire song... I think the sum-of-squares number may become unmanagable. It think it's normally done by calculating the RMS values of short time-segments, and then averaging those RMS values.