mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Move all definitions of FLAC__U64L to one place.
This commit is contained in:
@@ -68,3 +68,9 @@
|
|||||||
#define restrict __restrict
|
#define restrict __restrict
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define FLAC__U64L(x) x
|
||||||
|
#else
|
||||||
|
#define FLAC__U64L(x) x##LLU
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "private/crc.h"
|
#include "private/crc.h"
|
||||||
#include "private/macros.h"
|
#include "private/macros.h"
|
||||||
#include "FLAC/assert.h"
|
#include "FLAC/assert.h"
|
||||||
|
#include "share/compat.h"
|
||||||
#include "share/endswap.h"
|
#include "share/endswap.h"
|
||||||
|
|
||||||
/* Things should be fastest when this matches the machine word size */
|
/* Things should be fastest when this matches the machine word size */
|
||||||
@@ -72,13 +73,6 @@
|
|||||||
*/
|
*/
|
||||||
static const unsigned FLAC__BITREADER_DEFAULT_CAPACITY = 65536u / FLAC__BITS_PER_WORD; /* in words */
|
static const unsigned FLAC__BITREADER_DEFAULT_CAPACITY = 65536u / FLAC__BITS_PER_WORD; /* in words */
|
||||||
|
|
||||||
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define FLAC__U64L(x) x
|
|
||||||
#else
|
|
||||||
#define FLAC__U64L(x) x##LLU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* WATCHOUT: assembly routines rely on the order in which these fields are declared */
|
/* WATCHOUT: assembly routines rely on the order in which these fields are declared */
|
||||||
struct FLAC__BitReader {
|
struct FLAC__BitReader {
|
||||||
/* any partially-consumed word at the head will stay right-justified as bits are consumed from the left */
|
/* any partially-consumed word at the head will stay right-justified as bits are consumed from the left */
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "private/macros.h"
|
#include "private/macros.h"
|
||||||
#include "FLAC/assert.h"
|
#include "FLAC/assert.h"
|
||||||
#include "share/alloc.h"
|
#include "share/alloc.h"
|
||||||
|
#include "share/compat.h"
|
||||||
#include "share/endswap.h"
|
#include "share/endswap.h"
|
||||||
|
|
||||||
/* Things should be fastest when this matches the machine word size */
|
/* Things should be fastest when this matches the machine word size */
|
||||||
@@ -68,13 +69,6 @@ static const unsigned FLAC__BITWRITER_DEFAULT_INCREMENT = 4096u / sizeof(uint32_
|
|||||||
#define FLAC__WORDS_TO_BITS(words) ((words) * FLAC__BITS_PER_WORD)
|
#define FLAC__WORDS_TO_BITS(words) ((words) * FLAC__BITS_PER_WORD)
|
||||||
#define FLAC__TOTAL_BITS(bw) (FLAC__WORDS_TO_BITS((bw)->words) + (bw)->bits)
|
#define FLAC__TOTAL_BITS(bw) (FLAC__WORDS_TO_BITS((bw)->words) + (bw)->bits)
|
||||||
|
|
||||||
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define FLAC__U64L(x) x
|
|
||||||
#else
|
|
||||||
#define FLAC__U64L(x) x##LLU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct FLAC__BitWriter {
|
struct FLAC__BitWriter {
|
||||||
uint32_t *buffer;
|
uint32_t *buffer;
|
||||||
uint32_t accum; /* accumulator; bits are right-justified; when full, accum is appended to buffer */
|
uint32_t accum; /* accumulator; bits are right-justified; when full, accum is appended to buffer */
|
||||||
|
|||||||
@@ -34,18 +34,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "FLAC/assert.h"
|
#include "FLAC/assert.h"
|
||||||
|
#include "share/compat.h"
|
||||||
#include "private/float.h"
|
#include "private/float.h"
|
||||||
|
|
||||||
#ifdef FLAC__INTEGER_ONLY_LIBRARY
|
#ifdef FLAC__INTEGER_ONLY_LIBRARY
|
||||||
|
|
||||||
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define FLAC__U64L(x) x
|
|
||||||
#else
|
|
||||||
#define FLAC__U64L(x) x##LLU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const FLAC__fixedpoint FLAC__FP_ZERO = 0;
|
const FLAC__fixedpoint FLAC__FP_ZERO = 0;
|
||||||
const FLAC__fixedpoint FLAC__FP_ONE_HALF = 0x00008000;
|
const FLAC__fixedpoint FLAC__FP_ONE_HALF = 0x00008000;
|
||||||
const FLAC__fixedpoint FLAC__FP_ONE = 0x00010000;
|
const FLAC__fixedpoint FLAC__FP_ONE = 0x00010000;
|
||||||
@@ -282,7 +275,7 @@ FLAC__uint32 FLAC__fixedpoint_log2(FLAC__uint32 x, unsigned fracbits, unsigned p
|
|||||||
|
|
||||||
if(x < ONE)
|
if(x < ONE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(precision > LOG2_LOOKUP_PRECISION)
|
if(precision > LOG2_LOOKUP_PRECISION)
|
||||||
precision = LOG2_LOOKUP_PRECISION;
|
precision = LOG2_LOOKUP_PRECISION;
|
||||||
|
|
||||||
|
|||||||
@@ -38,16 +38,10 @@
|
|||||||
#include <string.h> /* for memset() */
|
#include <string.h> /* for memset() */
|
||||||
#include "FLAC/assert.h"
|
#include "FLAC/assert.h"
|
||||||
#include "FLAC/format.h"
|
#include "FLAC/format.h"
|
||||||
|
#include "share/compat.h"
|
||||||
#include "private/format.h"
|
#include "private/format.h"
|
||||||
#include "private/macros.h"
|
#include "private/macros.h"
|
||||||
|
|
||||||
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define FLAC__U64L(x) x
|
|
||||||
#else
|
|
||||||
#define FLAC__U64L(x) x##LLU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* VERSION should come from configure */
|
/* VERSION should come from configure */
|
||||||
FLAC_API const char *FLAC__VERSION_STRING = VERSION;
|
FLAC_API const char *FLAC__VERSION_STRING = VERSION;
|
||||||
|
|
||||||
|
|||||||
@@ -61,13 +61,6 @@
|
|||||||
#include "private/memory.h"
|
#include "private/memory.h"
|
||||||
#include "private/macros.h"
|
#include "private/macros.h"
|
||||||
|
|
||||||
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define FLAC__U64L(x) x
|
|
||||||
#else
|
|
||||||
#define FLAC__U64L(x) x##LLU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* technically this should be in an "export.c" but this is convenient enough */
|
/* technically this should be in an "export.c" but this is convenient enough */
|
||||||
FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC =
|
FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC =
|
||||||
|
|||||||
@@ -21,18 +21,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "FLAC/assert.h"
|
#include "FLAC/assert.h"
|
||||||
|
#include "share/compat.h"
|
||||||
#include "private/bitwriter.h" /* from the libFLAC private include area */
|
#include "private/bitwriter.h" /* from the libFLAC private include area */
|
||||||
#include "bitwriter.h"
|
#include "bitwriter.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h> /* for memcmp() */
|
#include <string.h> /* for memcmp() */
|
||||||
|
|
||||||
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define FLAC__U64L(x) x
|
|
||||||
#else
|
|
||||||
#define FLAC__U64L(x) x##LLU
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WATCHOUT! Since FLAC__BitWriter is a private structure, we use a copy of
|
* WATCHOUT! Since FLAC__BitWriter is a private structure, we use a copy of
|
||||||
* the definition here to get at the internals. Make sure this is kept up
|
* the definition here to get at the internals. Make sure this is kept up
|
||||||
|
|||||||
Reference in New Issue
Block a user