diff --git a/deps/libFLAC/bitreader.c b/deps/libFLAC/bitreader.c index d81dd416ea..a29334985a 100644 --- a/deps/libFLAC/bitreader.c +++ b/deps/libFLAC/bitreader.c @@ -34,6 +34,8 @@ # include #endif +#include + #include #include #include "private/bitmath.h" @@ -516,7 +518,7 @@ FLAC__bool FLAC__bitreader_skip_bits_no_crc(FLAC__BitReader *br, unsigned bits) FLAC__uint32 x; if(n != 0) { - m = flac_min(8-n, bits); + m = MIN(8-n, bits); if(!FLAC__bitreader_read_raw_uint32(br, &x, m)) return false; bits -= m; diff --git a/deps/libFLAC/fixed.c b/deps/libFLAC/fixed.c index 1e2d5b284f..b33f61f716 100644 --- a/deps/libFLAC/fixed.c +++ b/deps/libFLAC/fixed.c @@ -34,6 +34,8 @@ # include #endif +#include + #include #include #include "share/compat.h" @@ -235,11 +237,11 @@ unsigned FLAC__fixed_compute_best_predictor(const FLAC__int32 data[], unsigned d error -= last_error_3; total_error_4 += local_abs(error); last_error_3 = save; } - if(total_error_0 < flac_min(flac_min(flac_min(total_error_1, total_error_2), total_error_3), total_error_4)) + if(total_error_0 < MIN(MIN(MIN(total_error_1, total_error_2), total_error_3), total_error_4)) order = 0; - else if(total_error_1 < flac_min(flac_min(total_error_2, total_error_3), total_error_4)) + else if(total_error_1 < MIN(MIN(total_error_2, total_error_3), total_error_4)) order = 1; - else if(total_error_2 < flac_min(total_error_3, total_error_4)) + else if(total_error_2 < MIN(total_error_3, total_error_4)) order = 2; else if(total_error_3 < total_error_4) order = 3; @@ -297,11 +299,11 @@ unsigned FLAC__fixed_compute_best_predictor_wide(const FLAC__int32 data[], unsig error -= last_error_3; total_error_4 += local_abs(error); last_error_3 = save; } - if(total_error_0 < flac_min(flac_min(flac_min(total_error_1, total_error_2), total_error_3), total_error_4)) + if(total_error_0 < MIN(MIN(MIN(total_error_1, total_error_2), total_error_3), total_error_4)) order = 0; - else if(total_error_1 < flac_min(flac_min(total_error_2, total_error_3), total_error_4)) + else if(total_error_1 < MIN(MIN(total_error_2, total_error_3), total_error_4)) order = 1; - else if(total_error_2 < flac_min(total_error_3, total_error_4)) + else if(total_error_2 < MIN(total_error_3, total_error_4)) order = 2; else if(total_error_3 < total_error_4) order = 3; diff --git a/deps/libFLAC/format.c b/deps/libFLAC/format.c index 145bc3185b..f320807404 100644 --- a/deps/libFLAC/format.c +++ b/deps/libFLAC/format.c @@ -37,6 +37,9 @@ #include #include /* for qsort() */ #include /* for memset() */ + +#include + #include "FLAC/assert.h" #include "FLAC/format.h" #include "share/alloc.h" @@ -538,7 +541,7 @@ unsigned FLAC__format_get_max_rice_partition_order_from_blocksize(unsigned block max_rice_partition_order++; blocksize >>= 1; } - return flac_min(FLAC__MAX_RICE_PARTITION_ORDER, max_rice_partition_order); + return MIN(FLAC__MAX_RICE_PARTITION_ORDER, max_rice_partition_order); } unsigned FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order(unsigned limit, unsigned blocksize, unsigned predictor_order) diff --git a/deps/libFLAC/stream_decoder.c b/deps/libFLAC/stream_decoder.c index 31a0a4b49f..8dab5caa18 100644 --- a/deps/libFLAC/stream_decoder.c +++ b/deps/libFLAC/stream_decoder.c @@ -39,6 +39,9 @@ #include /* for memset/memcpy() */ #include /* for stat() */ #include /* for off_t */ + +#include + #include "share/compat.h" #include "FLAC/assert.h" #include "share/alloc.h" @@ -2758,7 +2761,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne /* invalid predictor and partition orders mush be handled in the callers */ FLAC__ASSERT(partition_order > 0? partition_samples >= predictor_order : decoder->private_->frame.header.blocksize >= predictor_order); - if(!FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size(partitioned_rice_contents, flac_max(6u, partition_order))) { + if(!FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size(partitioned_rice_contents, MAX(6u, partition_order))) { decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR; return false; }