Merge from upstream CVS.

This commit is contained in:
Erik de Castro Lopo 2007-06-28 09:55:17 +10:00
parent 522af16bec
commit 7296f49096
4 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2007-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/FLAC/*
Merge from upstream CVS.
2007-06-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/FLAC/*

View File

@ -540,7 +540,7 @@ FLAC__bool FLAC__bitwriter_write_rice_signed_block(FLAC__BitWriter *bw, const FL
while(nvals) {
/* fold signed to unsigned; actual formula is: negative(v)? -2v-1 : 2v */
uval = (*vals<<1) ^ (*vals>>31);
uval = (*vals<<1) ^ (*vals>>31);
msbits = uval >> parameter;

View File

@ -1471,6 +1471,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncod
value = sizeof(compression_levels_)/sizeof(compression_levels_[0]) - 1;
ok &= FLAC__stream_encoder_set_do_mid_side_stereo (encoder, compression_levels_[value].do_mid_side_stereo);
ok &= FLAC__stream_encoder_set_loose_mid_side_stereo (encoder, compression_levels_[value].loose_mid_side_stereo);
#ifndef FLAC__INTEGER_ONLY_LIBRARY
#if 0
/* was: */
ok &= FLAC__stream_encoder_set_apodization (encoder, compression_levels_[value].apodization);
@ -1479,6 +1480,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncod
encoder->protected_->num_apodizations = 1;
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_TUKEY;
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5;
#endif
#endif
ok &= FLAC__stream_encoder_set_max_lpc_order (encoder, compression_levels_[value].max_lpc_order);
ok &= FLAC__stream_encoder_set_qlp_coeff_precision (encoder, compression_levels_[value].qlp_coeff_precision);
@ -3758,7 +3760,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
if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) { /* very slightly pessimistic but still catches all common cases */
/* 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 */
if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) {
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;
}
@ -3767,7 +3771,9 @@ void precompute_partition_info_sums_(
/* first do max_partition_order */
{
unsigned partition, residual_sample, end = (unsigned)(-(int)predictor_order);
if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) { /* very slightly pessimistic but still catches all common cases */
/* 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 */
if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) {
FLAC__uint32 abs_residual_partition_sum;
for(partition = residual_sample = 0; partition < partitions; partition++) {

View File

@ -438,7 +438,7 @@ int main(int argc, char *argv[])
count = strtoul(argv[2], 0, 10);
if (argc > 3)
#ifdef _MSC_VER
samples = local__strtoull(argv[4]);
samples = local__strtoull(argv[3]);
#else
samples = strtoull(argv[3], 0, 10);
#endif