From: Josh Coalson Date: Fri, 4 Feb 2005 01:34:35 +0000 (+0000) Subject: minor comments X-Git-Tag: 1.2.0~560 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f81b6df7d527bfecbaaec26116b137e7e27a1526;p=platform%2Fupstream%2Fflac.git minor comments --- diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 1263840..33debfc 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -2956,7 +2956,14 @@ FLAC__bool set_partitioned_rice_( mean >>= 1; } #else - /* calc rice_parameter ala LOCO-I */ + /* we are basically calculating the size in bits of the + * average residual magnitude in the partition: + * rice_parameter = floor(log2(mean/partition_samples)) + * 'mean' is not a good name for the variable, it is + * actually the sum of magnitudes of all residual values + * in the partition, so the actual mean is + * mean/partition_samples + */ for(rice_parameter = 0, k = partition_samples; k < mean; rice_parameter++, k <<= 1) ; #endif @@ -3162,7 +3169,14 @@ FLAC__bool set_partitioned_rice_with_precompute_( mean >>= 1; } #else - /* calc rice_parameter ala LOCO-I */ + /* we are basically calculating the size in bits of the + * average residual magnitude in the partition: + * rice_parameter = floor(log2(mean/partition_samples)) + * 'mean' is not a good name for the variable, it is + * actually the sum of magnitudes of all residual values + * in the partition, so the actual mean is + * mean/partition_samples + */ for(rice_parameter = 0, k = partition_samples; k < mean; rice_parameter++, k <<= 1) ; #endif