From 07d16e2ecfb7da976ef56829c4fd6f93ca94b00e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Thu, 19 Mar 2009 03:04:21 +0000 Subject: share some constants between the FLAC encoder and FLAC decoder Originally committed as revision 18041 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/flacenc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'libavcodec/flacenc.c') 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; -- cgit v1.2.3