From 8534bbe4e92300609fd6dc289d882130b69d48cd Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 28 Feb 2007 01:10:21 +0000 Subject: [PATCH] minor comments --- src/libFLAC/stream_decoder.c | 3 +++ src/libFLAC/stream_encoder.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index a33b8e3..f377080 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -2634,6 +2634,9 @@ FLAC__bool read_subframe_lpc_(FLAC__StreamDecoder *decoder, unsigned channel, un /* decode the subframe */ if(do_full_decode) { memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); + /*@@@@@@ technically not pessimistic enough, should be more like + if( (FLAC__uint64)order * ((((FLAC__uint64)1)<qlp_coeff_precision)-1) < (((FLAC__uint64)-1) << 32) ) + */ if(bps + subframe->qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32) if(bps <= 16 && subframe->qlp_coeff_precision <= 16) { if(order <= 8) diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index ef13ad6..800e958 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -4042,6 +4042,7 @@ void precompute_partition_info_escapes_( rmax = 0; for(partition_sample = 0; partition_sample < partition_samples; partition_sample++) { r = residual[residual_sample++]; + /* OPT: maybe faster: rmax |= r ^ (r>>31) */ if(r < 0) rmax |= ~r; else -- 2.7.4