QUOTE(Subfader @ Dec 27 2005, 03:02 PM)
Hi, i wonder why a wav recorded and mastered at 24 bits only causes a flac compression ratio of 95%+ while the same file at 16 bit is ~75% ?
I made a little test: i had a 24 bit / 48 kHz source file which i saved in 4 different wav's and encoded them in FLAC at level 8:
24/48 - 99,4% compression ratio
24/44 - 99,9%
16/48 - 72,4%
16/44 - 74,2%
was it just good mastering at 24/48 so it "comletely filled all bits"?
First, as Sebi indicated, a well-behaved codec would be expected to compress the 24-bit version somewhat worse, around 83% for the 24/44 file. However, the FLAC format suffers a limitation that severely limits its ability to compress "loud" 24-bit files: the Rice parameter is limited to the range 0-14. If the residuals for a subframe are too large, the encoder is forced to choose between a) using a suboptimal Rice-encoding with k=14, b) using SUBFRAME_VERBATIM (resulting in a slight expansion of the input), or c) using the Rice escape code, which will usually be somewhat suboptimal depending on the distribution of residuals.
A cursory examination of an encoding of the file you posted shows over half the subframes are of type SUBFRAME_VERBATIM, so you are clearly bumping into this limit. Also, the rest of the subframes all have partition_order=0 which is circumstantial evidence that they have saturated the Rice parameter.
Josh: I recall reading somewhere that the Rice escape was disabled in the reference encoder at some point. Can you confirm or deny this? If it was disabled, does the decoder still correctly handle it?
--John