Mercurial > libavcodec.hg
diff flacenc.c @ 9188:f534d0cca450 libavcodec
share some constants between the FLAC encoder and FLAC decoder
author | jbr |
---|---|
date | Thu, 19 Mar 2009 03:04:21 +0000 |
parents | 7a463923ecd1 |
children | 443f056ba7e7 |
line wrap: on
line diff
--- a/flacenc.c Wed Mar 18 20:10:09 2009 +0000 +++ b/flacenc.c Thu Mar 19 03:04:21 2009 +0000 @@ -27,10 +27,7 @@ #include "dsputil.h" #include "golomb.h" #include "lpc.h" - -#define FLAC_MAX_CH 8 -#define FLAC_MIN_BLOCKSIZE 16 -#define FLAC_MAX_BLOCKSIZE 65535 +#include "flac.h" #define FLAC_SUBFRAME_CONSTANT 0 #define FLAC_SUBFRAME_VERBATIM 1 @@ -43,8 +40,6 @@ #define FLAC_CHMODE_RIGHT_SIDE 9 #define FLAC_CHMODE_MID_SIDE 10 -#define FLAC_STREAMINFO_SIZE 34 - #define MAX_FIXED_ORDER 4 #define MAX_PARTITION_ORDER 8 #define MAX_PARTITIONS (1 << MAX_PARTITION_ORDER) @@ -82,7 +77,7 @@ } FlacSubframe; typedef struct FlacFrame { - FlacSubframe subframes[FLAC_MAX_CH]; + FlacSubframe subframes[FLAC_MAX_CHANNELS]; int blocksize; int bs_code[2]; uint8_t crc8; @@ -185,7 +180,7 @@ return -1; } - if(channels < 1 || channels > FLAC_MAX_CH) { + if(channels < 1 || channels > FLAC_MAX_CHANNELS) { return -1; } s->channels = channels;