1. A fast bit allocation method for audio coding, comprising: initializing a parameter; using a Trellis-based method to optimize the scale factor parameter using the predetermined Huffman codebook to obtain a set of optimized scale factor parameters; using said optimized scale factor parameter and said Trellis-based method to optimize the Huffman codebook parameter to obtain a set of optimized Huffman codebook parameters; using said optimized scale factor parameter and said optimized Huffman codebook parameter to calculate the total bit rate required for coding; and adjusting said parameter when said total bit rate is higher than a predetermined bit rate.