The invention provides a method and an apparatus for encoding and decoding excitation patterns. For the quantisation of spectral data in an audio transform encoder psycho-acoustic information is required, i.e. an approximation of the true masking threshold. According to the invention, for each spectrum to be quantised in the audio signal encoding, an excitation pattern is computed and coded for both long and short window/transform lengths. The excitation patterns are grouped together in a variable-size matrix. A pre-determined sorting order with a fixed number of values only is applied to the excitation pattern data matrix values, and by that re-ordering a quadratic matrix is formed to which matrix' bit planes a SPECK encoding is applied.
Method and apparatus for encoding and decoding excitation patterns