stream_encoder/decoder : Comment fixes.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 14 Mar 2014 04:29:54 +0000 (15:29 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 14 Mar 2014 04:33:11 +0000 (15:33 +1100)
Patch-from: lvqcl <lvqcl.mail@gmail.com>

src/libFLAC/stream_decoder.c
src/libFLAC/stream_encoder.c

index cd41b5e..ddce8d6 100644 (file)
@@ -664,7 +664,7 @@ FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder)
        if(decoder->protected_->state == FLAC__STREAM_DECODER_UNINITIALIZED)
                return true;
 
-       /* see the comment in FLAC__seekable_stream_decoder_reset() as to why we
+       /* see the comment in FLAC__stream_decoder_reset() as to why we
         * always call FLAC__MD5Final()
         */
        FLAC__MD5Final(decoder->private_->computed_md5sum, &decoder->private_->md5context);
index 86ce7f2..289846c 100644 (file)
@@ -3842,8 +3842,9 @@ void precompute_partition_info_sums_(
        FLAC__ASSERT(default_partition_samples > predictor_order);
 
 #if defined(FLAC__CPU_IA32) && !defined FLAC__NO_ASM && defined FLAC__HAS_NASM && 0
-       /* slightly pessimistic but still catches all common cases */
        /* WATCHOUT: "+ bps" is an assumption that the average residual magnitude will not be more than "bps" bits */
+       /* previously the condition was: if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) */
+       /* see http://git.xiph.org/?p=flac.git;a=commit;h=6f7ec60c7e7f05f5ab0b1cf6b7b0945e44afcd4b */
        if(bps <= 16) {
                FLAC__precompute_partition_info_sums_32bit_asm_ia32_(residual, abs_residual_partition_sums, residual_samples + predictor_order, predictor_order, min_partition_order, max_partition_order);
                return;
@@ -3853,8 +3854,9 @@ void precompute_partition_info_sums_(
        /* first do max_partition_order */
        {
                unsigned partition, residual_sample, end = (unsigned)(-(int)predictor_order);
-               /* slightly pessimistic but still catches all common cases */
                /* WATCHOUT: "+ bps" is an assumption that the average residual magnitude will not be more than "bps" bits */
+               /* previously the condition was: if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) */
+               /* see http://git.xiph.org/?p=flac.git;a=commit;h=6f7ec60c7e7f05f5ab0b1cf6b7b0945e44afcd4b */
                if(bps <= 16) {
                        FLAC__uint32 abs_residual_partition_sum;