An audio coding method comprising partitioning of input vectors of coefficients originating from audio signal for positional encoding of shapes of the input vectors, wherein said positional encoding comprises vector quantization of segments of an input vector individually and wherein a maximum number of bits allowed for quantizing a vector segment is constrained by a vector quantizer, wherein said method comprises: - obtaining the input vector; - segmenting said input vector into an integer number, N SEG, of input vector segments according to a ratio between a total bit-budget for quantizing the input vector and a maximum number of bits allowed for quantizing a vector segment; - determining a representation of a respective relative energy difference between parts of said input vector on each side of each boundary between said input vector segments by: - a) setting said input vector as an upper level input vector; - b) splitting the upper level input vector into left and right parts, each part comprising one or more input vector segments, wherein the upper level input vector is split at the segment boundary between said left and said right part into two lower level input vectors; - c) calculating a representation of a relative energy difference between said two lower level input vectors according to an energy ratio between said lower level input vectors; and - d) repeating said steps b) and c) of splitting and calculating by re-setting said lower level input vectors as a respective upper level input vector, until all boundaries between input vector segments are provided with an associated representation of a relative energy difference; - allocating bits for encoding the shape of each of said input vector segment and for encoding of said representations of said relative energy differences between said input vector segments, wherein bits for encoding the input vector segments are distributed between segments according to relative energy differences between parts of said input vector; and - providing each said input vector segment, said representations of said relative energy differences and allocation information to the quantizer for individual encoding of said input vector segments. - obtaining the input vector; - segmenting said input vector into an integer number, N SEG, of input vector segments according to a ratio between a total bit-budget for quantizing the input vector and a maximum number of bits allowed for quantizing a vector segment; - determining a representation of a respective relative energy difference between parts of said input vector on each side of each boundary between said input vector segments by: - a) setting said input vector as an upper level input vector; - b) splitting the upper level input vector into left and right parts, each part comprising one or more input vector segments, wherein the upper level input vector is split at the segment boundary between said left and said right part into two lower level input vectors; - c) calculating a representation of a relative energy difference between said two lower level input vectors according to an energy ratio between said lower level input vectors; and - d) repeating said steps b) and c) of splitting and calculating by re-setting said lower level input vectors as a respective upper level input vector, until all boundaries between input vector segments are provided with an associated representation of a relative energy difference; - a) setting said input vector as an upper level input vector; - b) splitting the upper level input vector into left and right parts, each part comprising one or more input vector segments, wherein the upper level input vector is split at the segment boundary between said left and said right part into two lower level input vectors; - c) calculating a representation of a relative energy difference between said two lower level input vectors according to an energy ratio between said lower level input vectors; and - d) repeating said steps b) and c) of splitting and calculating by re-setting said lower level input vectors as a respective upper level input vector, until all boundaries between input vector segments are provided with an associated representation of a relative energy difference; - allocating bits for encoding the shape of each of said input vector segment and for encoding of said representations of said relative energy differences between said input vector segments, wherein bits for encoding the input vector segments are distributed between segments according to relative energy differences between parts of said input vector; and - providing each said input vector segment, said representations of said relative energy differences and allocation information to the quantizer for individual encoding of said input vector segments.