diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-03-19 03:04:21 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-03-19 03:04:21 +0000 |
commit | 07d16e2ecfb7da976ef56829c4fd6f93ca94b00e (patch) | |
tree | 7405a89ceefe40f86faf665063d2b8f0a02f1145 /libavcodec/flacenc.c | |
parent | bb504ac45ec5cf3cb114895cf721950b5fcda34c (diff) | |
download | ffmpeg-07d16e2ecfb7da976ef56829c4fd6f93ca94b00e.tar.gz |
share some constants between the FLAC encoder and FLAC decoder
Originally committed as revision 18041 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r-- | libavcodec/flacenc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 748906ea72..7ddaf7ed81 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -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 @@ typedef struct FlacSubframe { } 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 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) return -1; } - if(channels < 1 || channels > FLAC_MAX_CH) { + if(channels < 1 || channels > FLAC_MAX_CHANNELS) { return -1; } s->channels = channels; |