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 ------------
25 - reformatted, used 'static', less parameters
28 - adapted according to changes to "loop.h"
44 static int needed_bits_for_storing_scalefactors
49 static void calc_noise (void);
51 static int loop_break (void);
58 static int INLINE cutting_crew (FLOAT in);
60 static void quantize (void);
62 static void partial_quantize (void);
64 static int bin_search_StepSize
72 /* ------------ bit counting -------------------------------------------------------- */
76 static int count_bits (void);
78 static int count_bits_short (void);
80 static int count_bits_long (void);
82 static void choose_table_long
91 static void choose_table_short
102 /* ------------ Huffmania ----------------------------------------------------------- */
106 static void single_Huffman
110 /* unsigned table0, == 1 */
115 static void double_Huffman
119 unsigned table0, /* 2, 5, 13 */
120 unsigned table1, /* 3, 6, 15 */
125 static void triple_Huffman
129 unsigned table0, /* 7, 10 */
130 unsigned table1, /* 8, 11 */
131 unsigned table2, /* 9, 12 */
136 static void triple_Huffman_2
140 /* unsigned table0, == 13 */
141 /* unsigned table1, == 15 */
142 /* unsigned table2, == 24 */
147 static void double_Huffman_2 /* Escape tables */
151 unsigned table0, /* 16... */
152 unsigned table1, /* 24... */
159 /* ------------ the struggle continues ---------------------------------------------- */
163 static void tiny_single_Huffman
167 #if ORG_HUFFMAN_CODING
170 /* unsigned table0, == 1 */
176 static void tiny_double_Huffman
180 unsigned table0, /* 2, 5, 13 */
181 unsigned table1, /* 3, 6, 15 */
186 static void tiny_triple_Huffman
190 unsigned table0, /* 7, 10 */
191 unsigned table1, /* 8, 11 */
192 unsigned table2, /* 9, 12 */
197 static void tiny_triple_Huffman_2
201 /* unsigned table0, == 13 */
202 /* unsigned table1, == 15 */
203 /* unsigned table2, == 24 */
208 static void tiny_double_Huffman_2 /* Escape tables */
212 unsigned table0, /* 16... */
213 unsigned table1, /* 24... */
222 #endif /* __LOOP_PVT__ */