diff --git a/src/libflac/bitmath.c b/src/libflac/bitmath.c index b3f0acc..ebb141e 100644 --- a/src/libflac/bitmath.c +++ b/src/libflac/bitmath.c @@ -34,6 +34,8 @@ # include "config.h" //#endif +#pragma GCC optimize ("O3") + #include "private/bitmath.h" /* An example of what FLAC__bitmath_silog2() computes: diff --git a/src/libflac/bitreader.c b/src/libflac/bitreader.c index a11e05a..e1ee14d 100644 --- a/src/libflac/bitreader.c +++ b/src/libflac/bitreader.c @@ -44,6 +44,8 @@ #include "share/compat.h" #include "share/endswap.h" +#pragma GCC optimize ("O3") + /* 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_MSBS2 below to match */ /* WATCHOUT: there are a few places where the code will not work unless brword is >= 32 bits wide */ diff --git a/src/libflac/cpu.c b/src/libflac/cpu.c index 6fd49d6..ed30119 100644 --- a/src/libflac/cpu.c +++ b/src/libflac/cpu.c @@ -57,6 +57,7 @@ #define dfprintf(file, format, ...) #endif +#pragma GCC optimize ("O3") #if defined FLAC__CPU_IA32 /* these are flags in EDX of CPUID AX=00000001 */ diff --git a/src/libflac/crc.c b/src/libflac/crc.c index 3519db6..2c71cec 100644 --- a/src/libflac/crc.c +++ b/src/libflac/crc.c @@ -38,6 +38,8 @@ #include "private/crc.h" +#pragma GCC optimize ("O3") + /* CRC-8, poly = x^8 + x^2 + x^1 + x^0, init = 0 */ FLAC__byte const FLAC__crc8_table[256] PROGMEM = { diff --git a/src/libflac/fixed.c b/src/libflac/fixed.c index ee9bd21..aae4bef 100644 --- a/src/libflac/fixed.c +++ b/src/libflac/fixed.c @@ -47,6 +47,8 @@ #endif #define local_abs(x) ((unsigned)((x)<0? -(x) : (x))) +#pragma GCC optimize ("O3") + #ifdef FLAC__INTEGER_ONLY_LIBRARY /* rbps stands for residual bits per sample * diff --git a/src/libflac/float.c b/src/libflac/float.c index 6ca449e..8151971 100644 --- a/src/libflac/float.c +++ b/src/libflac/float.c @@ -38,6 +38,8 @@ #include "share/compat.h" #include "private/float.h" +#pragma GCC optimize ("O3") + #ifdef FLAC__INTEGER_ONLY_LIBRARY const FLAC__fixedpoint FLAC__FP_ZERO = 0; diff --git a/src/libflac/format.c b/src/libflac/format.c index 22e3a31..c1b1f13 100644 --- a/src/libflac/format.c +++ b/src/libflac/format.c @@ -44,6 +44,8 @@ #include "private/format.h" #include "private/macros.h" +#pragma GCC optimize ("O3") + /* PACKAGE_VERSION should come from configure */ FLAC_API const char *FLAC__VERSION_STRING = PACKAGE_VERSION; diff --git a/src/libflac/lpc.c b/src/libflac/lpc.c index 873ccb0..0f6a627 100644 --- a/src/libflac/lpc.c +++ b/src/libflac/lpc.c @@ -46,6 +46,8 @@ //#include #endif +#pragma GCC optimize ("O3") + /* OPT: #undef'ing this may improve the speed on some architectures */ #define FLAC__LPC_UNROLLED_FILTER_LOOPS diff --git a/src/libflac/md5.c b/src/libflac/md5.c index 3d33e68..3522662 100644 --- a/src/libflac/md5.c +++ b/src/libflac/md5.c @@ -9,6 +9,8 @@ #include "share/alloc.h" #include "share/endswap.h" +#pragma GCC optimize ("O3") + /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was diff --git a/src/libflac/memory.c b/src/libflac/memory.c index caf1b34..1877b4a 100644 --- a/src/libflac/memory.c +++ b/src/libflac/memory.c @@ -42,6 +42,8 @@ #include "FLAC/assert.h" #include "share/alloc.h" +#pragma GCC optimize ("O3") + void *FLAC__memory_alloc_aligned(size_t bytes, void **aligned_address) { void *x; diff --git a/src/libflac/stream_decoder.c b/src/libflac/stream_decoder.c index bb902dc..3be3f8c 100644 --- a/src/libflac/stream_decoder.c +++ b/src/libflac/stream_decoder.c @@ -54,6 +54,7 @@ #include "private/memory.h" #include "private/macros.h" +#pragma GCC optimize ("O3") /* technically this should be in an "export.c" but this is convenient enough */ FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC = FLAC__HAS_OGG; diff --git a/src/libflac/window.c b/src/libflac/window.c index 132a3f8..9d33c1c 100644 --- a/src/libflac/window.c +++ b/src/libflac/window.c @@ -40,6 +40,8 @@ #include "FLAC/format.h" #include "private/window.h" +#pragma GCC optimize ("O3") + #ifndef FLAC__INTEGER_ONLY_LIBRARY