diff options
| author | 2014-03-05 18:53:53 +0000 | |
|---|---|---|
| committer | 2014-03-05 18:53:53 +0000 | |
| commit | f6b0b18ad4f8eaba97f04a79322b8564f66ced9a (patch) | |
| tree | 2493f74bfadcf127c0ab2003859bdedd619a271b /src | |
| parent | 1103ab2af2db8892db88d874a5503ebded1a6d6b (diff) | |
changed casing of FLAC folders to match official source distribution (nw)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/lib.mak | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/all.h (renamed from src/lib/libflac/include/flac/all.h) | 0 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/assert.h (renamed from src/lib/libflac/include/flac/assert.h) | 0 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/callback.h (renamed from src/lib/libflac/include/flac/callback.h) | 0 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/export.h (renamed from src/lib/libflac/include/flac/export.h) | 4 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/format.h (renamed from src/lib/libflac/include/flac/format.h) | 7 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/metadata.h (renamed from src/lib/libflac/include/flac/metadata.h) | 3 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/ordinals.h (renamed from src/lib/libflac/include/flac/ordinals.h) | 0 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/stream_decoder.h (renamed from src/lib/libflac/include/flac/stream_decoder.h) | 8 | ||||
| -rw-r--r-- | src/lib/libflac/include/FLAC/stream_encoder.h (renamed from src/lib/libflac/include/flac/stream_encoder.h) | 6 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/bitmath.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/bitreader.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/bitwriter.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/cpu.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/crc.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/fixed.h | 50 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/float.h | 24 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/format.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/lpc.h | 174 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/md5.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/memory.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/metadata.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/stream_encoder_framing.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/private/window.h | 14 | ||||
| -rw-r--r-- | src/lib/libflac/include/protected/stream_decoder.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/include/protected/stream_encoder.h | 2 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/bitmath.c (renamed from src/lib/libflac/libflac/bitmath.c) | 2 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/bitreader.c (renamed from src/lib/libflac/libflac/bitreader.c) | 19 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/bitwriter.c (renamed from src/lib/libflac/libflac/bitwriter.c) | 4 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/cpu.c (renamed from src/lib/libflac/libflac/cpu.c) | 0 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/crc.c (renamed from src/lib/libflac/libflac/crc.c) | 0 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/fixed.c (renamed from src/lib/libflac/libflac/fixed.c) | 2 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/float.c (renamed from src/lib/libflac/libflac/float.c) | 4 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/format.c (renamed from src/lib/libflac/libflac/format.c) | 4 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/lpc.c (renamed from src/lib/libflac/libflac/lpc.c) | 116 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/md5.c (renamed from src/lib/libflac/libflac/md5.c) | 16 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/memory.c (renamed from src/lib/libflac/libflac/memory.c) | 2 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/metadata_iterators.c (renamed from src/lib/libflac/libflac/metadata_iterators.c) | 8 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/metadata_object.c (renamed from src/lib/libflac/libflac/metadata_object.c) | 4 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/stream_decoder.c (renamed from src/lib/libflac/libflac/stream_decoder.c) | 8 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/stream_encoder.c (renamed from src/lib/libflac/libflac/stream_encoder.c) | 18 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/stream_encoder_framing.c (renamed from src/lib/libflac/libflac/stream_encoder_framing.c) | 2 | ||||
| -rw-r--r-- | src/lib/libflac/libFLAC/window.c (renamed from src/lib/libflac/libflac/window.c) | 4 | ||||
| -rw-r--r-- | src/lib/util/flac.h | 2 |
44 files changed, 274 insertions, 257 deletions
diff --git a/src/lib/lib.mak b/src/lib/lib.mak index f462fdbdd8f..1decfc38209 100644 --- a/src/lib/lib.mak +++ b/src/lib/lib.mak @@ -370,7 +370,7 @@ LIBFLACOBJS = \ $(OBJ)/libflac.a: $(LIBFLACOBJS) -$(LIBOBJ)/libflac/%.o: $(LIBSRC)/libflac/libflac/%.c | $(OSPREBUILD) +$(LIBOBJ)/libflac/%.o: $(LIBSRC)/libflac/libFLAC/%.c | $(OSPREBUILD) @echo Compiling $<... $(CC) $(CDEFS) $(CONLYFLAGS) $(CCOMFLAGS) $(FLACOPTS) -I$(LIBSRC)/libflac/include -c $< -o $@ diff --git a/src/lib/libflac/include/flac/all.h b/src/lib/libflac/include/FLAC/all.h index c542c0d5def..c542c0d5def 100644 --- a/src/lib/libflac/include/flac/all.h +++ b/src/lib/libflac/include/FLAC/all.h diff --git a/src/lib/libflac/include/flac/assert.h b/src/lib/libflac/include/FLAC/assert.h index 3fc03f316a5..3fc03f316a5 100644 --- a/src/lib/libflac/include/flac/assert.h +++ b/src/lib/libflac/include/FLAC/assert.h diff --git a/src/lib/libflac/include/flac/callback.h b/src/lib/libflac/include/FLAC/callback.h index c9541210b4f..c9541210b4f 100644 --- a/src/lib/libflac/include/flac/callback.h +++ b/src/lib/libflac/include/FLAC/callback.h diff --git a/src/lib/libflac/include/flac/export.h b/src/lib/libflac/include/FLAC/export.h index e8295b86eac..a525f29c1e5 100644 --- a/src/lib/libflac/include/flac/export.h +++ b/src/lib/libflac/include/FLAC/export.h @@ -61,9 +61,9 @@ #else #ifdef FLAC_API_EXPORTS -#define FLAC_API _declspec(dllexport) +#define FLAC_API _declspec(dllexport) #else -#define FLAC_API _declspec(dllimport) +#define FLAC_API _declspec(dllimport) #endif #endif diff --git a/src/lib/libflac/include/flac/format.h b/src/lib/libflac/include/FLAC/format.h index 2c838f34f8e..77e2d0130e5 100644 --- a/src/lib/libflac/include/flac/format.h +++ b/src/lib/libflac/include/FLAC/format.h @@ -84,8 +84,8 @@ extern "C" { /* - Most of the values described in this file are defined by the FLAC - format specification. There is nothing to tune here. + Most of the values described in this file are defined by the FLAC + format specification. There is nothing to tune here. */ /** The largest legal metadata type code. */ @@ -211,6 +211,7 @@ extern FLAC_API const char * const FLAC__EntropyCodingMethodTypeString[]; /** Contents of a Rice partitioned residual */ typedef struct { + unsigned *parameters; /**< The Rice parameters for each context. */ @@ -229,6 +230,7 @@ typedef struct { /** Header for a Rice partitioned residual. (c.f. <A HREF="../format.html#partitioned_rice">format specification</A>) */ typedef struct { + unsigned order; /**< The partition order, i.e. # of contexts = 2 ^ \a order. */ @@ -484,6 +486,7 @@ typedef struct { /** An enumeration of the available metadata block types. */ typedef enum { + FLAC__METADATA_TYPE_STREAMINFO = 0, /**< <A HREF="../format.html#metadata_block_streaminfo">STREAMINFO</A> block */ diff --git a/src/lib/libflac/include/flac/metadata.h b/src/lib/libflac/include/FLAC/metadata.h index 879b0b40a63..fff90b0bafd 100644 --- a/src/lib/libflac/include/flac/metadata.h +++ b/src/lib/libflac/include/FLAC/metadata.h @@ -306,6 +306,7 @@ typedef struct FLAC__Metadata_SimpleIterator FLAC__Metadata_SimpleIterator; * The iterator's current status can be obtained by calling FLAC__metadata_simple_iterator_status(). */ typedef enum { + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK = 0, /**< The iterator is in the normal OK state */ @@ -762,7 +763,7 @@ typedef enum { FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH, /**< FLAC__metadata_chain_write() was called on a chain read by * FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(), - * or + * or * FLAC__metadata_chain_write_with_callbacks()/FLAC__metadata_chain_write_with_callbacks_and_tempfile() * was called on a chain read by * FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(). diff --git a/src/lib/libflac/include/flac/ordinals.h b/src/lib/libflac/include/FLAC/ordinals.h index 96ed4f8961f..96ed4f8961f 100644 --- a/src/lib/libflac/include/flac/ordinals.h +++ b/src/lib/libflac/include/FLAC/ordinals.h diff --git a/src/lib/libflac/include/flac/stream_decoder.h b/src/lib/libflac/include/FLAC/stream_decoder.h index 1d44a36f204..9ac159474af 100644 --- a/src/lib/libflac/include/flac/stream_decoder.h +++ b/src/lib/libflac/include/FLAC/stream_decoder.h @@ -199,6 +199,7 @@ extern "C" { * The decoder's state can be obtained by calling FLAC__stream_decoder_get_state(). */ typedef enum { + FLAC__STREAM_DECODER_SEARCH_FOR_METADATA = 0, /**< The decoder is ready to search for metadata. */ @@ -252,6 +253,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderStateString[]; /** Possible return values for the FLAC__stream_decoder_init_*() functions. */ typedef enum { + FLAC__STREAM_DECODER_INIT_STATUS_OK = 0, /**< Initialization was successful. */ @@ -289,6 +291,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderInitStatusString[]; /** Return values for the FLAC__StreamDecoder read callback. */ typedef enum { + FLAC__STREAM_DECODER_READ_STATUS_CONTINUE, /**< The read was OK and decoding can continue. */ @@ -319,6 +322,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderReadStatusString[]; /** Return values for the FLAC__StreamDecoder seek callback. */ typedef enum { + FLAC__STREAM_DECODER_SEEK_STATUS_OK, /**< The seek was OK and decoding can continue. */ @@ -341,6 +345,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderSeekStatusString[]; /** Return values for the FLAC__StreamDecoder tell callback. */ typedef enum { + FLAC__STREAM_DECODER_TELL_STATUS_OK, /**< The tell was OK and decoding can continue. */ @@ -363,6 +368,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderTellStatusString[]; /** Return values for the FLAC__StreamDecoder length callback. */ typedef enum { + FLAC__STREAM_DECODER_LENGTH_STATUS_OK, /**< The length call was OK and decoding can continue. */ @@ -385,6 +391,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderLengthStatusString[]; /** Return values for the FLAC__StreamDecoder write callback. */ typedef enum { + FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE, /**< The write was OK and decoding can continue. */ @@ -417,6 +424,7 @@ extern FLAC_API const char * const FLAC__StreamDecoderWriteStatusString[]; * a future encoder. */ typedef enum { + FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC, /**< An error in the stream caused the decoder to lose synchronization. */ diff --git a/src/lib/libflac/include/flac/stream_encoder.h b/src/lib/libflac/include/FLAC/stream_encoder.h index f533d8c8430..dbbbb23ee11 100644 --- a/src/lib/libflac/include/flac/stream_encoder.h +++ b/src/lib/libflac/include/FLAC/stream_encoder.h @@ -238,6 +238,7 @@ extern "C" { * must be deleted with FLAC__stream_encoder_delete(). */ typedef enum { + FLAC__STREAM_ENCODER_OK = 0, /**< The encoder is in the normal OK state and samples can be processed. */ @@ -289,6 +290,7 @@ extern FLAC_API const char * const FLAC__StreamEncoderStateString[]; /** Possible return values for the FLAC__stream_encoder_init_*() functions. */ typedef enum { + FLAC__STREAM_ENCODER_INIT_STATUS_OK = 0, /**< Initialization was successful. */ @@ -358,6 +360,7 @@ extern FLAC_API const char * const FLAC__StreamEncoderInitStatusString[]; /** Return values for the FLAC__StreamEncoder read callback. */ typedef enum { + FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE, /**< The read was OK and decoding can continue. */ @@ -383,6 +386,7 @@ extern FLAC_API const char * const FLAC__StreamEncoderReadStatusString[]; /** Return values for the FLAC__StreamEncoder write callback. */ typedef enum { + FLAC__STREAM_ENCODER_WRITE_STATUS_OK = 0, /**< The write was OK and encoding can continue. */ @@ -402,6 +406,7 @@ extern FLAC_API const char * const FLAC__StreamEncoderWriteStatusString[]; /** Return values for the FLAC__StreamEncoder seek callback. */ typedef enum { + FLAC__STREAM_ENCODER_SEEK_STATUS_OK, /**< The seek was OK and encoding can continue. */ @@ -424,6 +429,7 @@ extern FLAC_API const char * const FLAC__StreamEncoderSeekStatusString[]; /** Return values for the FLAC__StreamEncoder tell callback. */ typedef enum { + FLAC__STREAM_ENCODER_TELL_STATUS_OK, /**< The tell was OK and encoding can continue. */ diff --git a/src/lib/libflac/include/private/bitmath.h b/src/lib/libflac/include/private/bitmath.h index a0819dd6a8e..87fa0facd6b 100644 --- a/src/lib/libflac/include/private/bitmath.h +++ b/src/lib/libflac/include/private/bitmath.h @@ -32,7 +32,7 @@ #ifndef FLAC__PRIVATE__BITMATH_H #define FLAC__PRIVATE__BITMATH_H -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" unsigned FLAC__bitmath_ilog2(FLAC__uint32 v); unsigned FLAC__bitmath_ilog2_wide(FLAC__uint64 v); diff --git a/src/lib/libflac/include/private/bitreader.h b/src/lib/libflac/include/private/bitreader.h index e22bf210689..fd0f6aac6ce 100644 --- a/src/lib/libflac/include/private/bitreader.h +++ b/src/lib/libflac/include/private/bitreader.h @@ -33,7 +33,7 @@ #define FLAC__PRIVATE__BITREADER_H #include <stdio.h> /* for FILE */ -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" #include "cpu.h" /* diff --git a/src/lib/libflac/include/private/bitwriter.h b/src/lib/libflac/include/private/bitwriter.h index 11eee199a1d..aa5c4f74fcb 100644 --- a/src/lib/libflac/include/private/bitwriter.h +++ b/src/lib/libflac/include/private/bitwriter.h @@ -33,7 +33,7 @@ #define FLAC__PRIVATE__BITWRITER_H #include <stdio.h> /* for FILE */ -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" /* * opaque structure definition diff --git a/src/lib/libflac/include/private/cpu.h b/src/lib/libflac/include/private/cpu.h index f73b6ab26b3..b0526352695 100644 --- a/src/lib/libflac/include/private/cpu.h +++ b/src/lib/libflac/include/private/cpu.h @@ -32,7 +32,7 @@ #ifndef FLAC__PRIVATE__CPU_H #define FLAC__PRIVATE__CPU_H -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" #if HAVE_CONFIG_H #include <config.h> diff --git a/src/lib/libflac/include/private/crc.h b/src/lib/libflac/include/private/crc.h index 2f2a55742b2..0b67fb4be5d 100644 --- a/src/lib/libflac/include/private/crc.h +++ b/src/lib/libflac/include/private/crc.h @@ -32,7 +32,7 @@ #ifndef FLAC__PRIVATE__CRC_H #define FLAC__PRIVATE__CRC_H -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" /* 8 bit CRC generator, MSB shifted first ** polynomial = x^8 + x^2 + x^1 + x^0 diff --git a/src/lib/libflac/include/private/fixed.h b/src/lib/libflac/include/private/fixed.h index de585914b9c..f5b2cda616b 100644 --- a/src/lib/libflac/include/private/fixed.h +++ b/src/lib/libflac/include/private/fixed.h @@ -37,19 +37,19 @@ #endif #include "private/float.h" -#include "flac/format.h" +#include "FLAC/format.h" /* - * FLAC__fixed_compute_best_predictor() - * -------------------------------------------------------------------- - * Compute the best fixed predictor and the expected bits-per-sample + * FLAC__fixed_compute_best_predictor() + * -------------------------------------------------------------------- + * Compute the best fixed predictor and the expected bits-per-sample * of the residual signal for each order. The _wide() version uses * 64-bit integers which is statistically necessary when bits-per- * sample + log2(blocksize) > 30 * - * IN data[0,data_len-1] - * IN data_len - * OUT residual_bits_per_sample[0,FLAC__MAX_FIXED_ORDER] + * IN data[0,data_len-1] + * IN data_len + * OUT residual_bits_per_sample[0,FLAC__MAX_FIXED_ORDER] */ #ifndef FLAC__INTEGER_ONLY_LIBRARY unsigned FLAC__fixed_compute_best_predictor(const FLAC__int32 data[], unsigned data_len, FLAC__float residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]); @@ -67,30 +67,30 @@ unsigned FLAC__fixed_compute_best_predictor_wide(const FLAC__int32 data[], unsig #endif /* - * FLAC__fixed_compute_residual() - * -------------------------------------------------------------------- - * Compute the residual signal obtained from sutracting the predicted - * signal from the original. + * FLAC__fixed_compute_residual() + * -------------------------------------------------------------------- + * Compute the residual signal obtained from sutracting the predicted + * signal from the original. * - * IN data[-order,data_len-1] original signal (NOTE THE INDICES!) - * IN data_len length of original signal - * IN order <= FLAC__MAX_FIXED_ORDER fixed-predictor order - * OUT residual[0,data_len-1] residual signal + * IN data[-order,data_len-1] original signal (NOTE THE INDICES!) + * IN data_len length of original signal + * IN order <= FLAC__MAX_FIXED_ORDER fixed-predictor order + * OUT residual[0,data_len-1] residual signal */ void FLAC__fixed_compute_residual(const FLAC__int32 data[], unsigned data_len, unsigned order, FLAC__int32 residual[]); /* - * FLAC__fixed_restore_signal() - * -------------------------------------------------------------------- - * Restore the original signal by summing the residual and the - * predictor. + * FLAC__fixed_restore_signal() + * -------------------------------------------------------------------- + * Restore the original signal by summing the residual and the + * predictor. * - * IN residual[0,data_len-1] residual signal - * IN data_len length of original signal - * IN order <= FLAC__MAX_FIXED_ORDER fixed-predictor order - * *** IMPORTANT: the caller must pass in the historical samples: - * IN data[-order,-1] previously-reconstructed historical samples - * OUT data[0,data_len-1] original signal + * IN residual[0,data_len-1] residual signal + * IN data_len length of original signal + * IN order <= FLAC__MAX_FIXED_ORDER fixed-predictor order + * *** IMPORTANT: the caller must pass in the historical samples: + * IN data[-order,-1] previously-reconstructed historical samples + * OUT data[0,data_len-1] original signal */ void FLAC__fixed_restore_signal(const FLAC__int32 residual[], unsigned data_len, unsigned order, FLAC__int32 data[]); diff --git a/src/lib/libflac/include/private/float.h b/src/lib/libflac/include/private/float.h index 3b451d8914b..5e1293bb55f 100644 --- a/src/lib/libflac/include/private/float.h +++ b/src/lib/libflac/include/private/float.h @@ -36,7 +36,7 @@ #include <config.h> #endif -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" /* * These typedefs make it easier to ensure that integer versions of @@ -74,21 +74,21 @@ extern const FLAC__fixedpoint FLAC__FP_E; #define FLAC__fixedpoint_div(x, y) ( (FLAC__fixedpoint) ( ( ((FLAC__int64)(x)<<32) / (FLAC__int64)(y) ) >> 16 ) ) /* - * FLAC__fixedpoint_log2() - * -------------------------------------------------------------------- - * Returns the base-2 logarithm of the fixed-point number 'x' using an - * algorithm by Knuth for x >= 1.0 + * FLAC__fixedpoint_log2() + * -------------------------------------------------------------------- + * Returns the base-2 logarithm of the fixed-point number 'x' using an + * algorithm by Knuth for x >= 1.0 * - * 'fracbits' is the number of fractional bits of 'x'. 'fracbits' must - * be < 32 and evenly divisible by 4 (0 is OK but not very precise). + * 'fracbits' is the number of fractional bits of 'x'. 'fracbits' must + * be < 32 and evenly divisible by 4 (0 is OK but not very precise). * - * 'precision' roughly limits the number of iterations that are done; - * use (unsigned)(-1) for maximum precision. + * 'precision' roughly limits the number of iterations that are done; + * use (unsigned)(-1) for maximum precision. * - * If 'x' is less than one -- that is, x < (1<<fracbits) -- then this - * function will punt and return 0. + * If 'x' is less than one -- that is, x < (1<<fracbits) -- then this + * function will punt and return 0. * - * The return value will also have 'fracbits' fractional bits. + * The return value will also have 'fracbits' fractional bits. */ FLAC__uint32 FLAC__fixedpoint_log2(FLAC__uint32 x, unsigned fracbits, unsigned precision); diff --git a/src/lib/libflac/include/private/format.h b/src/lib/libflac/include/private/format.h index c54e7b75f15..7f5cc9360dc 100644 --- a/src/lib/libflac/include/private/format.h +++ b/src/lib/libflac/include/private/format.h @@ -32,7 +32,7 @@ #ifndef FLAC__PRIVATE__FORMAT_H #define FLAC__PRIVATE__FORMAT_H -#include "flac/format.h" +#include "FLAC/format.h" unsigned FLAC__format_get_max_rice_partition_order(unsigned blocksize, unsigned predictor_order); unsigned FLAC__format_get_max_rice_partition_order_from_blocksize(unsigned blocksize); diff --git a/src/lib/libflac/include/private/lpc.h b/src/lib/libflac/include/private/lpc.h index f0a6b113d9a..501d5758da1 100644 --- a/src/lib/libflac/include/private/lpc.h +++ b/src/lib/libflac/include/private/lpc.h @@ -37,34 +37,34 @@ #endif #include "private/float.h" -#include "flac/format.h" +#include "FLAC/format.h" #ifndef FLAC__INTEGER_ONLY_LIBRARY /* - * FLAC__lpc_window_data() - * -------------------------------------------------------------------- - * Applies the given window to the data. + * FLAC__lpc_window_data() + * -------------------------------------------------------------------- + * Applies the given window to the data. * OPT: asm implementation * - * IN in[0,data_len-1] - * IN window[0,data_len-1] - * OUT out[0,lag-1] - * IN data_len + * IN in[0,data_len-1] + * IN window[0,data_len-1] + * OUT out[0,lag-1] + * IN data_len */ void FLAC__lpc_window_data(const FLAC__int32 in[], const FLAC__real window[], FLAC__real out[], unsigned data_len); /* - * FLAC__lpc_compute_autocorrelation() - * -------------------------------------------------------------------- - * Compute the autocorrelation for lags between 0 and lag-1. - * Assumes data[] outside of [0,data_len-1] == 0. - * Asserts that lag > 0. + * FLAC__lpc_compute_autocorrelation() + * -------------------------------------------------------------------- + * Compute the autocorrelation for lags between 0 and lag-1. + * Assumes data[] outside of [0,data_len-1] == 0. + * Asserts that lag > 0. * - * IN data[0,data_len-1] - * IN data_len - * IN 0 < lag <= data_len - * OUT autoc[0,lag-1] + * IN data[0,data_len-1] + * IN data_len + * IN 0 < lag <= data_len + * OUT autoc[0,lag-1] */ void FLAC__lpc_compute_autocorrelation(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]); #ifndef FLAC__NO_ASM @@ -80,44 +80,44 @@ void FLAC__lpc_compute_autocorrelation_asm_ia32_3dnow(const FLAC__real data[], u #endif /* - * FLAC__lpc_compute_lp_coefficients() - * -------------------------------------------------------------------- - * Computes LP coefficients for orders 1..max_order. - * Do not call if autoc[0] == 0.0. This means the signal is zero - * and there is no point in calculating a predictor. + * FLAC__lpc_compute_lp_coefficients() + * -------------------------------------------------------------------- + * Computes LP coefficients for orders 1..max_order. + * Do not call if autoc[0] == 0.0. This means the signal is zero + * and there is no point in calculating a predictor. * - * IN autoc[0,max_order] autocorrelation values - * IN 0 < max_order <= FLAC__MAX_LPC_ORDER max LP order to compute - * OUT lp_coeff[0,max_order-1][0,max_order-1] LP coefficients for each order - * *** IMPORTANT: - * *** lp_coeff[0,max_order-1][max_order,FLAC__MAX_LPC_ORDER-1] are untouched - * OUT error[0,max_order-1] error for each order (more - * specifically, the variance of - * the error signal times # of - * samples in the signal) + * IN autoc[0,max_order] autocorrelation values + * IN 0 < max_order <= FLAC__MAX_LPC_ORDER max LP order to compute + * OUT lp_coeff[0,max_order-1][0,max_order-1] LP coefficients for each order + * *** IMPORTANT: + * *** lp_coeff[0,max_order-1][max_order,FLAC__MAX_LPC_ORDER-1] are untouched + * OUT error[0,max_order-1] error for each order (more + * specifically, the variance of + * the error signal times # of + * samples in the signal) * - * Example: if max_order is 9, the LP coefficients for order 9 will be - * in lp_coeff[8][0,8], the LP coefficients for order 8 will be - * in lp_coeff[7][0,7], etc. + * Example: if max_order is 9, the LP coefficients for order 9 will be + * in lp_coeff[8][0,8], the LP coefficients for order 8 will be + * in lp_coeff[7][0,7], etc. */ void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[]); /* - * FLAC__lpc_quantize_coefficients() - * -------------------------------------------------------------------- - * Quantizes the LP coefficients. NOTE: precision + bits_per_sample - * must be less than 32 (sizeof(FLAC__int32)*8). + * FLAC__lpc_quantize_coefficients() + * -------------------------------------------------------------------- + * Quantizes the LP coefficients. NOTE: precision + bits_per_sample + * must be less than 32 (sizeof(FLAC__int32)*8). * - * IN lp_coeff[0,order-1] LP coefficients - * IN order LP order - * IN FLAC__MIN_QLP_COEFF_PRECISION < precision - * desired precision (in bits, including sign - * bit) of largest coefficient - * OUT qlp_coeff[0,order-1] quantized coefficients - * OUT shift # of bits to shift right to get approximated - * LP coefficients. NOTE: could be negative. - * RETURN 0 => quantization OK - * 1 => coefficients require too much shifting for *shift to + * IN lp_coeff[0,order-1] LP coefficients + * IN order LP order + * IN FLAC__MIN_QLP_COEFF_PRECISION < precision + * desired precision (in bits, including sign + * bit) of largest coefficient + * OUT qlp_coeff[0,order-1] quantized coefficients + * OUT shift # of bits to shift right to get approximated + * LP coefficients. NOTE: could be negative. + * RETURN 0 => quantization OK + * 1 => coefficients require too much shifting for *shift to * fit in the LPC subframe header. 'shift' is unset. * 2 => coefficients are all zero, which is bad. 'shift' is * unset. @@ -125,17 +125,17 @@ void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_o int FLAC__lpc_quantize_coefficients(const FLAC__real lp_coeff[], unsigned order, unsigned precision, FLAC__int32 qlp_coeff[], int *shift); /* - * FLAC__lpc_compute_residual_from_qlp_coefficients() - * -------------------------------------------------------------------- - * Compute the residual signal obtained from sutracting the predicted - * signal from the original. + * FLAC__lpc_compute_residual_from_qlp_coefficients() + * -------------------------------------------------------------------- + * Compute the residual signal obtained from sutracting the predicted + * signal from the original. * - * IN data[-order,data_len-1] original signal (NOTE THE INDICES!) - * IN data_len length of original signal - * IN qlp_coeff[0,order-1] quantized LP coefficients - * IN order > 0 LP order - * IN lp_quantization quantization of LP coefficients in bits - * OUT residual[0,data_len-1] residual signal + * IN data[-order,data_len-1] original signal (NOTE THE INDICES!) + * IN data_len length of original signal + * IN qlp_coeff[0,order-1] quantized LP coefficients + * IN order > 0 LP order + * IN lp_quantization quantization of LP coefficients in bits + * OUT residual[0,data_len-1] residual signal */ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 *data, unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 residual[]); void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 *data, unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 residual[]); @@ -151,19 +151,19 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx(const FLAC__i #endif /* !defined FLAC__INTEGER_ONLY_LIBRARY */ /* - * FLAC__lpc_restore_signal() - * -------------------------------------------------------------------- - * Restore the original signal by summing the residual and the - * predictor. + * FLAC__lpc_restore_signal() + * -------------------------------------------------------------------- + * Restore the original signal by summing the residual and the + * predictor. * - * IN residual[0,data_len-1] residual signal - * IN data_len length of original signal - * IN qlp_coeff[0,order-1] quantized LP coefficients - * IN order > 0 LP order - * IN lp_quantization quantization of LP coefficients in bits - * *** IMPORTANT: the caller must pass in the historical samples: - * IN data[-order,-1] previously-reconstructed historical samples - * OUT data[0,data_len-1] original signal + * IN residual[0,data_len-1] residual signal + * IN data_len length of original signal + * IN qlp_coeff[0,order-1] quantized LP coefficients + * IN order > 0 LP order + * IN lp_quantization quantization of LP coefficients in bits + * *** IMPORTANT: the caller must pass in the historical samples: + * IN data[-order,-1] previously-reconstructed historical samples + * OUT data[0,data_len-1] original signal */ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]); void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]); @@ -182,30 +182,30 @@ void FLAC__lpc_restore_signal_asm_ppc_altivec_16_order8(const FLAC__int32 residu #ifndef FLAC__INTEGER_ONLY_LIBRARY /* - * FLAC__lpc_compute_expected_bits_per_residual_sample() - * -------------------------------------------------------------------- - * Compute the expected number of bits per residual signal sample - * based on the LP error (which is related to the residual variance). + * FLAC__lpc_compute_expected_bits_per_residual_sample() + * -------------------------------------------------------------------- + * Compute the expected number of bits per residual signal sample + * based on the LP error (which is related to the residual variance). * - * IN lpc_error >= 0.0 error returned from calculating LP coefficients - * IN total_samples > 0 # of samples in residual signal - * RETURN expected bits per sample + * IN lpc_error >= 0.0 error returned from calculating LP coefficients + * IN total_samples > 0 # of samples in residual signal + * RETURN expected bits per sample */ FLAC__double FLAC__lpc_compute_expected_bits_per_residual_sample(FLAC__double lpc_error, unsigned total_samples); FLAC__double FLAC__lpc_compute_expected_bits_per_residual_sample_with_error_scale(FLAC__double lpc_error, FLAC__double error_scale); /* - * FLAC__lpc_compute_best_order() - * -------------------------------------------------------------------- - * Compute the best order from the array of signal errors returned - * during coefficient computation. + * FLAC__lpc_compute_best_order() + * -------------------------------------------------------------------- + * Compute the best order from the array of signal errors returned + * during coefficient computation. * - * IN lpc_error[0,max_order-1] >= 0.0 error returned from calculating LP coefficients - * IN max_order > 0 max LP order - * IN total_samples > 0 # of samples in residual signal - * IN overhead_bits_per_order # of bits overhead for each increased LP order - * (includes warmup sample size and quantized LP coefficient) - * RETURN [1,max_order] best order + * IN lpc_error[0,max_order-1] >= 0.0 error returned from calculating LP coefficients + * IN max_order > 0 max LP order + * IN total_samples > 0 # of samples in residual signal + * IN overhead_bits_per_order # of bits overhead for each increased LP order + * (includes warmup sample size and quantized LP coefficient) + * RETURN [1,max_order] best order */ unsigned FLAC__lpc_compute_best_order(const FLAC__double lpc_error[], unsigned max_order, unsigned total_samples, unsigned overhead_bits_per_order); diff --git a/src/lib/libflac/include/private/md5.h b/src/lib/libflac/include/private/md5.h index 8178ff9c3d4..e5f675a830a 100644 --- a/src/lib/libflac/include/private/md5.h +++ b/src/lib/libflac/include/private/md5.h @@ -26,7 +26,7 @@ * Still in the public domain, with no warranty. */ -#include "flac/ordinals.h" +#include "FLAC/ordinals.h" typedef struct { FLAC__uint32 in[16]; diff --git a/src/lib/libflac/include/private/memory.h b/src/lib/libflac/include/private/memory.h index 7ed315f435a..0e622c277cb 100644 --- a/src/lib/libflac/include/private/memory.h +++ b/src/lib/libflac/include/private/memory.h @@ -39,7 +39,7 @@ #include <stdlib.h> /* for size_t */ #include "private/float.h" -#include "flac/ordinals.h" /* for FLAC__bool */ +#include "FLAC/ordinals.h" /* for FLAC__bool */ /* Returns the unaligned address returned by malloc. * Use free() on this address to deallocate. diff --git a/src/lib/libflac/include/private/metadata.h b/src/lib/libflac/include/private/metadata.h index 3529ade492d..b5268c9552e 100644 --- a/src/lib/libflac/include/private/metadata.h +++ b/src/lib/libflac/include/private/metadata.h @@ -32,7 +32,7 @@ #ifndef FLAC__PRIVATE__METADATA_H #define FLAC__PRIVATE__METADATA_H -#include "flac/metadata.h" +#include "FLAC/metadata.h" /* WATCHOUT: all malloc()ed data in the block is free()ed; this may not * be a consistent state (e.g. PICTURE) or equivalent to the initial diff --git a/src/lib/libflac/include/private/stream_encoder_framing.h b/src/lib/libflac/include/private/stream_encoder_framing.h index a27e7d668d4..4865c16c8a9 100644 --- a/src/lib/libflac/include/private/stream_encoder_framing.h +++ b/src/lib/libflac/include/private/stream_encoder_framing.h @@ -32,7 +32,7 @@ #ifndef FLAC__PRIVATE__STREAM_ENCODER_FRAMING_H #define FLAC__PRIVATE__STREAM_ENCODER_FRAMING_H -#include "flac/format.h" +#include "FLAC/format.h" #include "bitwriter.h" FLAC__bool FLAC__add_metadata_block(const FLAC__StreamMetadata *metadata, FLAC__BitWriter *bw); diff --git a/src/lib/libflac/include/private/window.h b/src/lib/libflac/include/private/window.h index d1c4df5f956..2be90bc65cd 100644 --- a/src/lib/libflac/include/private/window.h +++ b/src/lib/libflac/include/private/window.h @@ -37,18 +37,18 @@ #endif #include "private/float.h" -#include "flac/format.h" +#include "FLAC/format.h" #ifndef FLAC__INTEGER_ONLY_LIBRARY /* - * FLAC__window_*() - * -------------------------------------------------------------------- - * Calculates window coefficients according to different apodization - * functions. + * FLAC__window_*() + * -------------------------------------------------------------------- + * Calculates window coefficients according to different apodization + * functions. * - * OUT window[0,L-1] - * IN L (number of points in window) + * OUT window[0,L-1] + * IN L (number of points in window) */ void FLAC__window_bartlett(FLAC__real *window, const FLAC__int32 L); void FLAC__window_bartlett_hann(FLAC__real *window, const FLAC__int32 L); diff --git a/src/lib/libflac/include/protected/stream_decoder.h b/src/lib/libflac/include/protected/stream_decoder.h index d77d51c0f8a..9108ca78f22 100644 --- a/src/lib/libflac/include/protected/stream_decoder.h +++ b/src/lib/libflac/include/protected/stream_decoder.h @@ -32,7 +32,7 @@ #ifndef FLAC__PROTECTED__STREAM_DECODER_H #define FLAC__PROTECTED__STREAM_DECODER_H -#include "flac/stream_decoder.h" +#include "FLAC/stream_decoder.h" #if FLAC__HAS_OGG #include "private/ogg_decoder_aspect.h" #endif diff --git a/src/lib/libflac/include/protected/stream_encoder.h b/src/lib/libflac/include/protected/stream_encoder.h index 7cd9649e856..4101ee55288 100644 --- a/src/lib/libflac/include/protected/stream_encoder.h +++ b/src/lib/libflac/include/protected/stream_encoder.h @@ -32,7 +32,7 @@ #ifndef FLAC__PROTECTED__STREAM_ENCODER_H #define FLAC__PROTECTED__STREAM_ENCODER_H -#include "flac/stream_encoder.h" +#include "FLAC/stream_encoder.h" #if FLAC__HAS_OGG #include "private/ogg_encoder_aspect.h" #endif diff --git a/src/lib/libflac/libflac/bitmath.c b/src/lib/libflac/libFLAC/bitmath.c index d2b54c105e9..27e25f0f7ac 100644 --- a/src/lib/libflac/libflac/bitmath.c +++ b/src/lib/libflac/libFLAC/bitmath.c @@ -34,7 +34,7 @@ #endif #include "private/bitmath.h" -#include "flac/assert.h" +#include "FLAC/assert.h" /* An example of what FLAC__bitmath_ilog2() computes: * diff --git a/src/lib/libflac/libflac/bitreader.c b/src/lib/libflac/libFLAC/bitreader.c index 36850538254..10fbbade729 100644 --- a/src/lib/libflac/libflac/bitreader.c +++ b/src/lib/libflac/libFLAC/bitreader.c @@ -33,14 +33,13 @@ # include <config.h> #endif - #include <stdlib.h> /* for malloc() */ #include <string.h> /* for memcpy(), memset() */ #include "private/bitmath.h" #include "private/bitreader.h" #include "private/crc.h" -#include "flac/assert.h" +#include "FLAC/assert.h" /* Things should be fastest when this matches the machine word size */ /* WATCHOUT: if you change this you must also change the following #defines down to COUNT_ZERO_MSBS below to match */ @@ -295,13 +294,13 @@ FLAC__BitReader *FLAC__bitreader_new(void) FLAC__BitReader *br = (FLAC__BitReader*)calloc(1, sizeof(FLAC__BitReader)); /* calloc() implies: - memset(br, 0, sizeof(FLAC__BitReader)); - br->buffer = 0; - br->capacity = 0; - br->words = br->bytes = 0; - br->consumed_words = br->consumed_bits = 0; - br->read_callback = 0; - br->client_data = 0; + memset(br, 0, sizeof(FLAC__BitReader)); + br->buffer = 0; + br->capacity = 0; + br->words = br->bytes = 0; + br->consumed_words = br->consumed_bits = 0; + br->read_callback = 0; + br->client_data = 0; */ return br; } @@ -829,6 +828,7 @@ FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[ cwords = br->consumed_words; while(1) { + /* read unary part */ while(1) { while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */ @@ -1011,6 +1011,7 @@ break2: ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits; while(1) { + /* read unary part */ while(1) { while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */ diff --git a/src/lib/libflac/libflac/bitwriter.c b/src/lib/libflac/libFLAC/bitwriter.c index 430d3b99b67..25d314049cf 100644 --- a/src/lib/libflac/libflac/bitwriter.c +++ b/src/lib/libflac/libFLAC/bitwriter.c @@ -33,8 +33,6 @@ # include <config.h> #endif - - #include <stdlib.h> /* for malloc() */ #include <string.h> /* for memcpy(), memset() */ @@ -43,7 +41,7 @@ #endif #include "private/bitwriter.h" #include "private/crc.h" -#include "flac/assert.h" +#include "FLAC/assert.h" #include "share/alloc.h" /* Things should be fastest when this matches the machine word size */ diff --git a/src/lib/libflac/libflac/cpu.c b/src/lib/libflac/libFLAC/cpu.c index 60b73bff143..60b73bff143 100644 --- a/src/lib/libflac/libflac/cpu.c +++ b/src/lib/libflac/libFLAC/cpu.c diff --git a/src/lib/libflac/libflac/crc.c b/src/lib/libflac/libFLAC/crc.c index 463ab65ef83..463ab65ef83 100644 --- a/src/lib/libflac/libflac/crc.c +++ b/src/lib/libflac/libFLAC/crc.c diff --git a/src/lib/libflac/libflac/fixed.c b/src/lib/libflac/libFLAC/fixed.c index 5871b1f5f5d..1a3aac090f6 100644 --- a/src/lib/libflac/libflac/fixed.c +++ b/src/lib/libflac/libFLAC/fixed.c @@ -37,7 +37,7 @@ #include <string.h> #include "private/bitmath.h" #include "private/fixed.h" -#include "flac/assert.h" +#include "FLAC/assert.h" #ifndef M_LN2 /* math.h in VC++ doesn't seem to have this (how Microsoft is that?) */ diff --git a/src/lib/libflac/libflac/float.c b/src/lib/libflac/libFLAC/float.c index 108880af7c3..8e19280207b 100644 --- a/src/lib/libflac/libflac/float.c +++ b/src/lib/libflac/libFLAC/float.c @@ -33,7 +33,7 @@ # include <config.h> #endif -#include "flac/assert.h" +#include "FLAC/assert.h" #include "private/float.h" @@ -282,7 +282,7 @@ FLAC__uint32 FLAC__fixedpoint_log2(FLAC__uint32 x, unsigned fracbits, unsigned p if(x < ONE) return 0; - + if(precision > LOG2_LOOKUP_PRECISION) precision = LOG2_LOOKUP_PRECISION; diff --git a/src/lib/libflac/libflac/format.c b/src/lib/libflac/libFLAC/format.c index 42c8b201436..fcc104b7d82 100644 --- a/src/lib/libflac/libflac/format.c +++ b/src/lib/libflac/libFLAC/format.c @@ -36,8 +36,8 @@ #include <stdio.h> #include <stdlib.h> /* for qsort() */ #include <string.h> /* for memset() */ -#include "flac/assert.h" -#include "flac/format.h" +#include "FLAC/assert.h" +#include "FLAC/format.h" #include "private/format.h" #ifndef FLaC__INLINE diff --git a/src/lib/libflac/libflac/lpc.c b/src/lib/libflac/libFLAC/lpc.c index 99179aef9cc..7785b389a3f 100644 --- a/src/lib/libflac/libflac/lpc.c +++ b/src/lib/libflac/libFLAC/lpc.c @@ -34,8 +34,8 @@ #endif #include <math.h> -#include "flac/assert.h" -#include "flac/format.h" +#include "FLAC/assert.h" +#include "FLAC/format.h" #include "private/bitmath.h" #include "private/lpc.h" #if defined DEBUG || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE @@ -305,10 +305,10 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 *data, u /* Here's a slower but clearer version: for(i = 0; i < data_len; i++) { - sum = 0; - for(j = 0; j < order; j++) - sum += qlp_coeff[j] * data[i-j-1]; - residual[i] = data[i] - (sum >> lp_quantization); + sum = 0; + for(j = 0; j < order; j++) + sum += qlp_coeff[j] * data[i-j-1]; + residual[i] = data[i] - (sum >> lp_quantization); } */ } @@ -516,18 +516,18 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 *data, u case 15: sum += qlp_coeff[14] * data[i-15]; case 14: sum += qlp_coeff[13] * data[i-14]; case 13: sum += qlp_coeff[12] * data[i-13]; - sum += qlp_coeff[11] * data[i-12]; - sum += qlp_coeff[10] * data[i-11]; - sum += qlp_coeff[ 9] * data[i-10]; - sum += qlp_coeff[ 8] * data[i- 9]; - sum += qlp_coeff[ 7] * data[i- 8]; - sum += qlp_coeff[ 6] * data[i- 7]; - sum += qlp_coeff[ 5] * data[i- 6]; - sum += qlp_coeff[ 4] * data[i- 5]; - sum += qlp_coeff[ 3] * data[i- 4]; - sum += qlp_coeff[ 2] * data[i- 3]; - sum += qlp_coeff[ 1] * data[i- 2]; - sum += qlp_coeff[ 0] * data[i- 1]; + sum += qlp_coeff[11] * data[i-12]; + sum += qlp_coeff[10] * data[i-11]; + sum += qlp_coeff[ 9] * data[i-10]; + sum += qlp_coeff[ 8] * data[i- 9]; + sum += qlp_coeff[ 7] * data[i- 8]; + sum += qlp_coeff[ 6] * data[i- 7]; + sum += qlp_coeff[ 5] * data[i- 6]; + sum += qlp_coeff[ 4] * data[i- 5]; + sum += qlp_coeff[ 3] * data[i- 4]; + sum += qlp_coeff[ 2] * data[i- 3]; + sum += qlp_coeff[ 1] * data[i- 2]; + sum += qlp_coeff[ 0] * data[i- 1]; } residual[i] = data[i] - (sum >> lp_quantization); } @@ -778,18 +778,18 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 *da case 15: sum += qlp_coeff[14] * (FLAC__int64)data[i-15]; case 14: sum += qlp_coeff[13] * (FLAC__int64)data[i-14]; case 13: sum += qlp_coeff[12] * (FLAC__int64)data[i-13]; - sum += qlp_coeff[11] * (FLAC__int64)data[i-12]; - sum += qlp_coeff[10] * (FLAC__int64)data[i-11]; - sum += qlp_coeff[ 9] * (FLAC__int64)data[i-10]; - sum += qlp_coeff[ 8] * (FLAC__int64)data[i- 9]; - sum += qlp_coeff[ 7] * (FLAC__int64)data[i- 8]; - sum += qlp_coeff[ 6] * (FLAC__int64)data[i- 7]; - sum += qlp_coeff[ 5] * (FLAC__int64)data[i- 6]; - sum += qlp_coeff[ 4] * (FLAC__int64)data[i- 5]; - sum += qlp_coeff[ 3] * (FLAC__int64)data[i- 4]; - sum += qlp_coeff[ 2] * (FLAC__int64)data[i- 3]; - sum += qlp_coeff[ 1] * (FLAC__int64)data[i- 2]; - sum += qlp_coeff[ 0] * (FLAC__int64)data[i- 1]; + sum += qlp_coeff[11] * (FLAC__int64)data[i-12]; + sum += qlp_coeff[10] * (FLAC__int64)data[i-11]; + sum += qlp_coeff[ 9] * (FLAC__int64)data[i-10]; + sum += qlp_coeff[ 8] * (FLAC__int64)data[i- 9]; + sum += qlp_coeff[ 7] * (FLAC__int64)data[i- 8]; + sum += qlp_coeff[ 6] * (FLAC__int64)data[i- 7]; + sum += qlp_coeff[ 5] * (FLAC__int64)data[i- 6]; + sum += qlp_coeff[ 4] * (FLAC__int64)data[i- 5]; + sum += qlp_coeff[ 3] * (FLAC__int64)data[i- 4]; + sum += qlp_coeff[ 2] * (FLAC__int64)data[i- 3]; + sum += qlp_coeff[ 1] * (FLAC__int64)data[i- 2]; + sum += qlp_coeff[ 0] * (FLAC__int64)data[i- 1]; } residual[i] = data[i] - (FLAC__int32)(sum >> lp_quantization); } @@ -835,10 +835,10 @@ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, c /* Here's a slower but clearer version: for(i = 0; i < data_len; i++) { - sum = 0; - for(j = 0; j < order; j++) - sum += qlp_coeff[j] * data[i-j-1]; - data[i] = residual[i] + (sum >> lp_quantization); + sum = 0; + for(j = 0; j < order; j++) + sum += qlp_coeff[j] * data[i-j-1]; + data[i] = residual[i] + (sum >> lp_quantization); } */ } @@ -1046,18 +1046,18 @@ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, c case 15: sum += qlp_coeff[14] * data[i-15]; case 14: sum += qlp_coeff[13] * data[i-14]; case 13: sum += qlp_coeff[12] * data[i-13]; - sum += qlp_coeff[11] * data[i-12]; - sum += qlp_coeff[10] * data[i-11]; - sum += qlp_coeff[ 9] * data[i-10]; - sum += qlp_coeff[ 8] * data[i- 9]; - sum += qlp_coeff[ 7] * data[i- 8]; - sum += qlp_coeff[ 6] * data[i- 7]; - sum += qlp_coeff[ 5] * data[i- 6]; - sum += qlp_coeff[ 4] * data[i- 5]; - sum += qlp_coeff[ 3] * data[i- 4]; - sum += qlp_coeff[ 2] * data[i- 3]; - sum += qlp_coeff[ 1] * data[i- 2]; - sum += qlp_coeff[ 0] * data[i- 1]; + sum += qlp_coeff[11] * data[i-12]; + sum += qlp_coeff[10] * data[i-11]; + sum += qlp_coeff[ 9] * data[i-10]; + sum += qlp_coeff[ 8] * data[i- 9]; + sum += qlp_coeff[ 7] * data[i- 8]; + sum += qlp_coeff[ 6] * data[i- 7]; + sum += qlp_coeff[ 5] * data[i- 6]; + sum += qlp_coeff[ 4] * data[i- 5]; + sum += qlp_coeff[ 3] * data[i- 4]; + sum += qlp_coeff[ 2] * data[i- 3]; + sum += qlp_coeff[ 1] * data[i- 2]; + sum += qlp_coeff[ 0] * data[i- 1]; } data[i] = residual[i] + (sum >> lp_quantization); } @@ -1308,18 +1308,18 @@ void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_l case 15: sum += qlp_coeff[14] * (FLAC__int64)data[i-15]; case 14: sum += qlp_coeff[13] * (FLAC__int64)data[i-14]; case 13: sum += qlp_coeff[12] * (FLAC__int64)data[i-13]; - sum += qlp_coeff[11] * (FLAC__int64)data[i-12]; - sum += qlp_coeff[10] * (FLAC__int64)data[i-11]; - sum += qlp_coeff[ 9] * (FLAC__int64)data[i-10]; - sum += qlp_coeff[ 8] * (FLAC__int64)data[i- 9]; - sum += qlp_coeff[ 7] * (FLAC__int64)data[i- 8]; - sum += qlp_coeff[ 6] * (FLAC__int64)data[i- 7]; - sum += qlp_coeff[ 5] * (FLAC__int64)data[i- 6]; - sum += qlp_coeff[ 4] * (FLAC__int64)data[i- 5]; - sum += qlp_coeff[ 3] * (FLAC__int64)data[i- 4]; - sum += qlp_coeff[ 2] * (FLAC__int64)data[i- 3]; - sum += qlp_coeff[ 1] * (FLAC__int64)data[i- 2]; - sum += qlp_coeff[ 0] * (FLAC__int64)data[i- 1]; + sum += qlp_coeff[11] * (FLAC__int64)data[i-12]; + sum += qlp_coeff[10] * (FLAC__int64)data[i-11]; + sum += qlp_coeff[ 9] * (FLAC__int64)data[i-10]; + sum += qlp_coeff[ 8] * (FLAC__int64)data[i- 9]; + sum += qlp_coeff[ 7] * (FLAC__int64)data[i- 8]; + sum += qlp_coeff[ 6] * (FLAC__int64)data[i- 7]; + sum += qlp_coeff[ 5] * (FLAC__int64)data[i- 6]; + sum += qlp_coeff[ 4] * (FLAC__int64)data[i- 5]; + sum += qlp_coeff[ 3] * (FLAC__int64)data[i- 4]; + sum += qlp_coeff[ 2] * (FLAC__int64)data[i- 3]; + sum += qlp_coeff[ 1] * (FLAC__int64)data[i- 2]; + sum += qlp_coeff[ 0] * (FLAC__int64)data[i- 1]; } data[i] = residual[i] + (FLAC__int32)(sum >> lp_quantization); } diff --git a/src/lib/libflac/libflac/md5.c b/src/lib/libflac/libFLAC/md5.c index f958cb51106..003a61097e9 100644 --- a/src/lib/libflac/libflac/md5.c +++ b/src/lib/libflac/libFLAC/md5.c @@ -2,8 +2,8 @@ # include <config.h> #endif -#include <stdlib.h> /* for malloc() */ -#include <string.h> /* for memcpy() */ +#include <stdlib.h> /* for malloc() */ +#include <string.h> /* for memcpy() */ #include "private/md5.h" #include "share/alloc.h" @@ -47,7 +47,7 @@ /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f,w,x,y,z,in,s) \ - (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x) + (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to @@ -143,7 +143,7 @@ static void byteSwap(FLAC__uint32 *buf, unsigned words) { register FLAC__uint32 x; do { - x = *buf; + x = *buf; x = ((x << 8) & 0xff00ff00) | ((x >> 8) & 0x00ff00ff); *buf++ = (x >> 16) | (x << 16); } while (--words); @@ -186,9 +186,9 @@ static void FLAC__MD5Update(FLAC__MD5Context *ctx, FLAC__byte const *buf, unsign t = ctx->bytes[0]; if ((ctx->bytes[0] = t + len) < t) - ctx->bytes[1]++; /* Carry from low to high */ + ctx->bytes[1]++; /* Carry from low to high */ - t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */ + t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */ if (t > len) { memcpy((FLAC__byte *)ctx->in + 64 - t, buf, len); return; @@ -237,7 +237,7 @@ void FLAC__MD5Init(FLAC__MD5Context *ctx) */ void FLAC__MD5Final(FLAC__byte digest[16], FLAC__MD5Context *ctx) { - int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */ + int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */ FLAC__byte *p = (FLAC__byte *)ctx->in + count; /* Set the first char of padding to 0x80. There is always room. */ @@ -246,7 +246,7 @@ void FLAC__MD5Final(FLAC__byte digest[16], FLAC__MD5Context *ctx) /* Bytes of padding needed to make 56 bytes (-8..55) */ count = 56 - 1 - count; - if (count < 0) { /* Padding forces an extra block */ + if (count < 0) { /* Padding forces an extra block */ memset(p, 0, count + 8); byteSwapX16(ctx->in); FLAC__MD5Transform(ctx->buf, ctx->in); diff --git a/src/lib/libflac/libflac/memory.c b/src/lib/libflac/libFLAC/memory.c index 0ce1e8f21bd..7946390c232 100644 --- a/src/lib/libflac/libflac/memory.c +++ b/src/lib/libflac/libFLAC/memory.c @@ -34,7 +34,7 @@ #endif #include "private/memory.h" -#include "flac/assert.h" +#include "FLAC/assert.h" #include "share/alloc.h" void *FLAC__memory_alloc_aligned(size_t bytes, void **aligned_address) diff --git a/src/lib/libflac/libflac/metadata_iterators.c b/src/lib/libflac/libFLAC/metadata_iterators.c index 5038cda291b..6ee7bccb986 100644 --- a/src/lib/libflac/libflac/metadata_iterators.c +++ b/src/lib/libflac/libFLAC/metadata_iterators.c @@ -59,8 +59,8 @@ #include "private/metadata.h" -#include "flac/assert.h" -#include "flac/stream_decoder.h" +#include "FLAC/assert.h" +#include "FLAC/stream_decoder.h" #include "share/alloc.h" #ifdef max @@ -1835,8 +1835,8 @@ FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(void) FLAC__Metadata_Iterator *iterator = (FLAC__Metadata_Iterator*)calloc(1, sizeof(FLAC__Metadata_Iterator)); /* calloc() implies: - iterator->current = 0; - iterator->chain = 0; + iterator->current = 0; + iterator->chain = 0; */ return iterator; diff --git a/src/lib/libflac/libflac/metadata_object.c b/src/lib/libflac/libFLAC/metadata_object.c index 5ded5a5c681..a1465f5bb51 100644 --- a/src/lib/libflac/libflac/metadata_object.c +++ b/src/lib/libflac/libFLAC/metadata_object.c @@ -38,7 +38,7 @@ #include "private/metadata.h" -#include "flac/assert.h" +#include "FLAC/assert.h" #include "share/alloc.h" @@ -1330,7 +1330,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_from_name_value_pa memcpy(entry->entry+nn+1, field_value, nv); entry->entry[entry->length] = '\0'; } - + return true; } diff --git a/src/lib/libflac/libflac/stream_decoder.c b/src/lib/libflac/libFLAC/stream_decoder.c index 8fa8c13e931..0d0568237e6 100644 --- a/src/lib/libflac/libflac/stream_decoder.c +++ b/src/lib/libflac/libFLAC/stream_decoder.c @@ -46,7 +46,7 @@ #define ftello ftell #endif #endif -#include "flac/assert.h" +#include "FLAC/assert.h" #include "share/alloc.h" #include "protected/stream_decoder.h" #include "private/bitreader.h" @@ -3145,11 +3145,11 @@ FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 s } /* our last move backwards wasn't big enough, try again */ approx_bytes_per_frame = approx_bytes_per_frame? approx_bytes_per_frame * 2 : 16; - continue; + continue; } /* allow one seek over upper bound, so we can get a correct upper_bound_sample for streams with unknown total_samples */ first_seek = false; - + /* make sure we are not seeking in corrupted stream */ if (this_frame_sample < lower_bound_sample) { decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR; @@ -3189,7 +3189,7 @@ FLAC__bool seek_to_absolute_sample_ogg_(FLAC__StreamDecoder *decoder, FLAC__uint FLAC__bool did_a_seek; unsigned iteration = 0; - /* In the first iterations, we will calculate the target byte position + /* In the first iterations, we will calculate the target byte position * by the distance from the target sample to left_sample and * right_sample (let's call it "proportional search"). After that, we * will switch to binary search. diff --git a/src/lib/libflac/libflac/stream_encoder.c b/src/lib/libflac/libFLAC/stream_encoder.c index 5462e5d5e14..78fc330e275 100644 --- a/src/lib/libflac/libflac/stream_encoder.c +++ b/src/lib/libflac/libFLAC/stream_encoder.c @@ -46,8 +46,8 @@ #define ftello ftell #endif #endif -#include "flac/assert.h" -#include "flac/stream_decoder.h" +#include "FLAC/assert.h" +#include "FLAC/stream_decoder.h" #include "share/alloc.h" #include "protected/stream_encoder.h" #include "private/bitwriter.h" @@ -90,7 +90,7 @@ * parameter estimation in this encoder is very good, almost always * yielding compression within 0.1% of the optimal parameters. */ -#undef ENABLE_RICE_PARAMETER_SEARCH +#undef ENABLE_RICE_PARAMETER_SEARCH typedef struct { @@ -226,7 +226,7 @@ static unsigned evaluate_lpc_subframe_( #endif static unsigned evaluate_verbatim_subframe_( - FLAC__StreamEncoder *encoder, + FLAC__StreamEncoder *encoder, const FLAC__int32 signal[], unsigned blocksize, unsigned subframe_bps, @@ -827,7 +827,7 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_( metadata_picture_has_type1 = true; /* standard icon must be 32x32 pixel PNG */ if( - m->data.picture.type == FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD && + m->data.picture.type == FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD && ( (strcmp(m->data.picture.mime_type, "image/png") && strcmp(m->data.picture.mime_type, "-->")) || m->data.picture.width != 32 || @@ -1174,7 +1174,7 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_stream( /*is_ogg=*/true ); } - + static FLAC__StreamEncoderInitStatus init_FILE_internal_( FLAC__StreamEncoder *encoder, FILE *file, @@ -1236,7 +1236,7 @@ static FLAC__StreamEncoderInitStatus init_FILE_internal_( return init_status; } - + FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE( FLAC__StreamEncoder *encoder, FILE *file, @@ -1246,7 +1246,7 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE( { return init_FILE_internal_(encoder, file, progress_callback, client_data, /*is_ogg=*/false); } - + FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_FILE( FLAC__StreamEncoder *encoder, FILE *file, @@ -4126,7 +4126,7 @@ unsigned get_wasted_bits_(FLAC__int32 signal[], unsigned samples) if(shift > 0) { for(i = 0; i < samples; i++) - signal[i] >>= shift; + signal[i] >>= shift; } return shift; diff --git a/src/lib/libflac/libflac/stream_encoder_framing.c b/src/lib/libflac/libFLAC/stream_encoder_framing.c index 664b963bb62..939955bf2d6 100644 --- a/src/lib/libflac/libflac/stream_encoder_framing.c +++ b/src/lib/libflac/libFLAC/stream_encoder_framing.c @@ -37,7 +37,7 @@ #include <string.h> /* for strlen() */ #include "private/stream_encoder_framing.h" #include "private/crc.h" -#include "flac/assert.h" +#include "FLAC/assert.h" #ifdef max #undef max diff --git a/src/lib/libflac/libflac/window.c b/src/lib/libflac/libFLAC/window.c index b290d9b970e..cd689c573d4 100644 --- a/src/lib/libflac/libflac/window.c +++ b/src/lib/libflac/libFLAC/window.c @@ -34,8 +34,8 @@ #endif #include <math.h> -#include "flac/assert.h" -#include "flac/format.h" +#include "FLAC/assert.h" +#include "FLAC/format.h" #include "private/window.h" #ifndef FLAC__INTEGER_ONLY_LIBRARY diff --git a/src/lib/util/flac.h b/src/lib/util/flac.h index febed0b22f2..6a3f4e6b39c 100644 --- a/src/lib/util/flac.h +++ b/src/lib/util/flac.h @@ -17,7 +17,7 @@ #include "corefile.h" #ifdef FLAC__NO_DLL -#include "../../lib/libflac/include/flac/all.h" +#include "../../lib/libflac/include/FLAC/all.h" #else #include <FLAC/all.h> #endif |
