2 (c) Copyright 1998-2000 - Tord Jansson
3 ======================================
5 This file is part of the BladeEnc MP3 Encoder, based on
6 ISO's reference code for MPEG Layer 3 compression, and might
7 contain smaller or larger sections that are directly taken
8 from ISO's reference code.
10 All changes to the ISO reference code herein are either
11 copyrighted by Tord Jansson (tord.jansson@swipnet.se)
12 or sublicensed to Tord Jansson by a third party.
14 BladeEnc is free software; you can redistribute this file
15 and/or modify it under the terms of the GNU Lesser General Public
16 License as published by the Free Software Foundation; either
17 version 2.1 of the License, or (at your option) any later version.
21 ------------ Changes ------------
23 2000-12-15 Andre Piotrowski
28 #ifndef __FORMATBITSTREAM2__
29 #define __FORMATBITSTREAM2__
35 #define MAX_CHANNELS 2
36 #define MAX_GRANULES 2
43 /*____ Structure Definitions ________________________________________________*/
56 BitHolderElement *element;
60 typedef struct BF_FrameData
67 BitHolder channelSI[MAX_CHANNELS];
68 BitHolder spectrumSI[MAX_GRANULES][MAX_CHANNELS];
69 BitHolder scaleFactors[MAX_GRANULES][MAX_CHANNELS];
70 BitHolder codedData[MAX_GRANULES][MAX_CHANNELS];
71 BitHolder userSpectrum[MAX_GRANULES][MAX_CHANNELS];
72 BitHolder userFrameData;
76 typedef struct BF_FrameResults
87 /*____ Function Prototypes __________________________________________________*/
89 BitHolder *initBitHolder (BitHolder *wp, int elements);
90 void exitBitHolder (BitHolder *wp);
91 void addBits (BitHolder *wp, unsigned int value, int length);
92 void writeFrame (BF_FrameData *psFrame, BF_FrameResults *results);
93 void initFormatBitstream (void);
94 void exitFormatBitstream (void);
95 void flushFrame (void);
101 #endif /* __FORMATBITSTREAM2__ */