摘要 |
Embodiments of the present invention provide a signal processing method and apparatus. The method includes: determining a total quantity of to-be-allocated bits corresponding to a current frame; implementing primary bit allocation on to-be-processed sub-bands; performing a primary information unit quantity determining operation for each sub-band that has undergone the primary bit allocation, so as to obtain a quantity of information units corresponding to each sub-band of the to-be-processed sub-bands and a total quantity of surplus bits; selecting sub-bands for secondary bit allocation from the to-be-processed sub-bands according to at least one of a sub-band characteristic of each sub-band of the to-be-processed sub-bands or the total quantity of surplus bits; implementing secondary bit allocation on the sub-bands for secondary bit allocation; and performing, according to the quantities of primarily allocated bits and quantities of secondarily allocated bits of the sub-bands for secondary bit allocation, a secondary information unit quantity determining operation for each sub-band of the sub-bands for secondary bit allocation, so as to re-obtain a quantity of information units corresponding to each sub-band of the sub-bands for secondary bit allocation. In the embodiments of the present invention, a waste of bits can be avoided, and encoding and decoding quality can be improved. |