QUOTE(greynol @ Apr 22 2007, 23:27)

QUOTE(Lyx @ Apr 22 2007, 13:10)

This is interesting, because it means that there is potential to significantly increase the RG-gain (and thus increase loudness) of lossy files, without any perceivable quality loss.
Where did you get the idea that Alex B was talking about clipping caused by a significant increase in volume?
He's only talking about peaks clipped by just a few samples...
Yes, I was talking only about the decoder clipping that often results some clipped samples if the lossless source was near full range.
QUOTE
Reduced volume? Don't you mean increased volume? I'm not sure I follow this last sentence.
For example,
- lossless: replaygain -6.1 dB, peak 0.99
- after converting to lossy: replaygain -6.1 dB, peak 1.19
Both files can be played also without a replay gain adjustment just fine. The "lossy peaks" are inaudible, but naturally the file volume cannot be increased without causing audible clipping distortion.
If the volume level is not reduced about 1.5 dB before changing the format to integer PCM (using a floating point decoder that can reproduce peaks and adjust the volume) the lossy peaks would be clipped to the full scale (1.0) so the peaks would essentially be somewhat attenuated. I have no idea how that would affect the audio quality during those particular moments (which are often less than 1/10 of a millisecond). Possibly the peaks are just ugly artifacts (in theory) so wouldn't it be better if the peaks are clipped a bit?
QUOTE(Lyx @ Apr 22 2007, 23:50)

Well, how do you expect the peak-value in replaygain to work during playback, hmm? It is used to ADDITIONALLY decrease the volume, if the RG-preamp would cause clipping. Since apparently, with some lossy files, some high peak values are practially irrelevant/unperceivable, this logically means that there is room for loudness increase with some files (and in some setups, even a better working equal-loudness, since it is actually undesirable do reduce volume because of the peak-value - because it means going below the RG-target).
- Lyx
Often the replay gain adjustment reduces the volume level quite a bit and that is enough for keeping the lossy peaks under 1.0 without any additional clip prevention. There are exceptions, like some highly dynamic classical recordings that can have a positive replay gain value and still have near full-scale peaks. These will audibly clip already in the lossless format if no peak prevention is used with the replay gain correction.
If the replay gain is close to zero dB (but not over) you can "safely" avoid the additional volume level reduction by simply using replay gain without clipping prevention. However, the change would often be only about 1-2 dB with near transparent lossy files. The peaking increases gradually when the quality settings & bitrates are lowered. I have seen 48 kbps files that produce over 2.0 peaks. That means an about 6 dB volume level reduction when the peak prevention is used.
QUOTE(greynol @ Apr 23 2007, 00:08)

Are you able to tell us on the average how many samples are getting clipped when your peaks are 1.2? Excuse my ignorance, but do you mean 20% over full-scale, 1.2 dB or something else, hmm?
The amount of these peaks seem to vary a lot. Some files contain only a couple of them, some have hundreds. However, the peeks seem to always be very short. The 1/10 of a millisecond duration I mentioned is about the longest that I have seen. If the peak value is 1.2 (20% over full scale) that means an about 1.5 dB difference to the 1.0 value. A 6 dB volume level increase to a 1.0 peak produces a 2.0 peak (exactly).
Edit
These lossy peaks are an interesting matter, but a bit OT here. I may start a new thread because I have seen some contradictory information about the decoder clipping. I may have some interesting file analysis data to publish.