Patent Description:
Parametric spatial audio processing is a field of audio signal processing where the spatial aspect of the sound is described using a set of parameters. For example, in parametric spatial audio capture from microphone arrays, it is a typical and an effective choice to estimate from the microphone array signals a set of parameters such as directions of the sound in frequency bands, and the ratios between the directional and non-directional parts of the captured sound in frequency bands. These parameters are known to well describe the perceptual spatial properties of the captured sound at the position of the microphone array. These parameters can be utilized in synthesis of the spatial sound accordingly, for headphones binaurally, for loudspeakers, or to other formats, such as Ambisonics.

The directions and direct-to-total energy ratios in frequency bands are thus a parameterization that is particularly effective for spatial audio capture.

A parameter set consisting of a direction parameter in frequency bands and an energy ratio parameter in frequency bands (indicating the directionality of the sound) can be also utilized as the spatial metadata (which may also include other parameters such as coherence, spread coherence, number of directions, distance etc) for an audio codec. For example, these parameters can be estimated from microphone-array captured audio signals, and for example a stereo signal can be generated from the microphone array signals to be conveyed with the spatial metadata. The stereo signal could be encoded, for example, with an AAC encoder. A decoder can decode the audio signals into PCM signals and process the sound in frequency bands (using the spatial metadata) to obtain the spatial output, for example a binaural output.

The aforementioned solution is particularly suitable for encoding captured spatial sound from microphone arrays (e.g., in mobile phones, VR cameras, stand-alone microphone arrays). However, it may be desirable for such an encoder to have also other input types than microphone-array captured signals, for example, loudspeaker signals, audio object signals, or Ambisonics signals.

Analysing first-order Ambisonics (FOA) inputs for spatial metadata extraction has been thoroughly documented in scientific literature related to Directional Audio Coding (DirAC) and Harmonic planewave expansion (Harpex). This is since there exist microphone arrays directly providing a FOA signal (more accurately: its variant, the B-format signal), and analysing such an input has thus been a point of study in the field.

A further input for the encoder is also multi-channel loudspeaker input, such as <NUM> or <NUM> channel surround inputs.

However with respect to the directional components of the metadata, which may comprise an elevation, azimuth (and energy ratio which is <NUM>-diffuseness) of a resulting direction, for each considered time/frequency subband. Quantization of these directional components is a current research topic.

<CIT> discloses an approach for quantization and coding/decoding of audio parameters using a coding mode selection bit.

According to a first aspect there is provided an apparatus comprising means configured to: receive encoded spatial audio signal directional metadata parameters for a block of time-frequencies; receive an indicator configured to identify whether the encoded spatial audio signal directional metadata parameters were encoded based on a quantization resolution which always is equal to or less than a determined number of bits; decode the encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on a quantization resolution which always is equal to or less than a determined number of bits when the indicator identifies that the encoded spatial audio signal directional metadata parameters were encoded based on a quantization resolution which always is equal to or less than a determined number of bits; and when the indicator identifies that the encoded spatial audio signal directional metadata parameters were not encoded based on a quantization resolution which always is equal to or less than a determined number of bits, the means is configured to: decode a first part of the encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on a further quantization resolution, the first part comprising entropy encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on the further quantization resolution; decode, when the difference between the determined number of bits and a number of bits used to encode the first part is less than a number of bits required to encode a second part of the encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on the further quantization resolution, the second part comprising fixed rate encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on a reduced bit quantization resolution, else decode the second part comprising fixed rate encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on the further quantization resolution.

The means may further be configured to determine the further quantization resolution for mapping between the values of the spatial audio signal directional metadata parameter and the index value.

The means configured to determine the further quantization resolution for mapping between the values of the spatial audio signal directional metadata parameter and the index value may be configured to determine the further quantization resolution based on an energy ratio value associated with the spatial audio signal directional metadata parameter.

The means may be further configured to determine the reduced bit quantization resolution for mapping between the values of the spatial audio signal directional metadata parameter and the index value.

The means may be configured to generate a mapping from indices associated with the spatial audio signal directional metadata parameters to at least one of an elevation and azimuth value based on the quantization resolution.

According to a second aspect there is provided a method comprising: receiving encoded spatial audio signal directional metadata parameters for a block of time-frequencies; receiving an indicator configured to identify whether the encoded spatial audio signal directional metadata parameters were encoded based on a quantization resolution which always is equal to or less than a determined number of bits; decoding the encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on a quantization resolution which always is equal to or less than a determined number of bits when the indicator identifies that the encoded spatial audio signal directional metadata parameters were encoded based on a quantization resolution which always is equal to or less than a determined number of bits; and when the indicator identifies that the encoded spatial audio signal directional metadata parameters were not encoded based on a quantization resolution which always is equal to or less than a determined number of bits, the method comprises: decoding a first part of the encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on a further quantization resolution, the first part comprising entropy encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on the further quantization resolution; decoding, when the difference between the determined number of bits and a number of bits used to encode the first part is less than a number of bits required to encode a second part of the encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on the further quantization resolution, the second part comprising fixed rate encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on a reduced bit quantization resolution, else decoding the second part comprising fixed rate encoded spatial audio signal directional metadata parameters for the block of time-frequencies based on the further quantization resolution.

The method may further comprise determining the further quantization resolution for mapping between the values of the spatial audio signal directional metadata parameter and the index value.

Determining the further quantization resolution for mapping between the values of the spatial audio signal directional metadata parameter and the index value may comprise determining the further quantization resolution based on an energy ratio value associated with the spatial audio signal directional metadata parameter.

The method may comprise determining the reduced bit quantization resolution for mapping between the values of the spatial audio signal directional metadata parameter and the index value.

The method may comprise generating a mapping from indices associated with the spatial audio signal directional metadata parameters to at least one of an elevation and azimuth value based on the quantization resolution.

The examples of <FIG> specify encoders/encoding methods that are not part of the claimed subject-matter but that are useful for understanding the invention.

The following describes in further detail suitable apparatus and possible mechanisms for the provision of effective spatial analysis derived metadata parameters. In the following discussions multi-channel system is discussed with respect to a multi-channel microphone implementation. However as discussed above the input format may be any suitable input format, such as multi-channel loudspeaker, Ambisonics (FOA/HOA) etc. It is understood that in some embodiments the channel location is based on a location of the microphone or is a virtual location or direction. Furthermore the output of the example system is a multi-channel loudspeaker arrangement. However it is understood that the output may be rendered to the user via means other than loudspeakers. Furthermore the multi-channel loudspeaker signals may be generalised to be two or more playback audio signals.

The metadata consists at least of elevation, azimuth and the energy ratio of a resulting direction, for each considered time/frequency sub-band. The direction parameter components, the azimuth and the elevation are extracted from the audio data and then quantized to a given quantization resolution. The resulting indexes must be further compressed for efficient transmission. For high bitrate, high quality lossless encoding of the metadata is needed.

The concept as discussed hereafter is to improve the quality of encoded and quantized representation of metadata in situations when following initial quantization and encoding of the bitrate obtained is larger than a bitrate allowed by the codec. In such embodiments there is proposed a method of obtaining an intermediary quantization resolution without any re-estimation of entropy coding bits nor any supplementary signalling of the modification. The reduction is therefore performed only for those sub-bands that use fixed rate encoding and the implicit signalling is implemented by reordering of the sub-bands when writing the bitstream to be output.

In some embodiments this can be further implemented with methods which reduce values of the variables to be encoded. The reduction can be implemented in some embodiments for the case when there are a higher number of symbols. The change can be performed by subtracting from the number of symbols available the index to be encoded and encoding the resulting difference. In some embodiments, for an azimuth representation this corresponds to having audio sources situated with a bias to the rear. In addition, the change can also be implemented in some embodiments by checking if all indexes are even or if all indexes are odd and encoding the values divided by two. For an elevation representation, in some embodiments this corresponds to having the audio sources mainly situated on the upper or the lower side of audio scene.

In some embodiments the encoding of the MASA metadata, for example within an IVAS codec, is configured to first estimate the number of bits for the directional data based on the values of the quantized energy ratios for each time frequency tile. Furthermore the entropy encoding of the original quantization resolution is tested. If the resulting sum is larger than the amount of available bits, the number of bits can be proportionally reduced for each time frequency tile such that it fits the available number of bits, however the quantization resolution is not unnecessarily adjusted when the bitrate allows it (for example in higher bitrates).

With respect to <FIG> an example apparatus and system for implementing embodiments of the application are shown. The system <NUM> is shown with an 'analysis' part <NUM> and a 'synthesis' part <NUM>. The 'analysis' part <NUM> is the part from receiving the multi-channel loudspeaker signals up to an encoding of the metadata and downmix signal and the 'synthesis' part <NUM> is the part from a decoding of the encoded metadata and downmix signal to the presentation of the re-generated signal (for example in multi-channel loudspeaker form).

The input to the system <NUM> and the 'analysis' part <NUM> is the multi-channel signals <NUM>. In the following examples a microphone channel signal input is described, however any suitable input (or synthetic multi-channel) format may be implemented in other embodiments. For example in some embodiments the spatial analyser and the spatial analysis may be implemented external to the encoder. For example in some embodiments the spatial metadata associated with the audio signals may be a provided to an encoder as a separate bit-stream. In some embodiments the spatial metadata may be provided as a set of spatial (direction) index values.

The multi-channel signals are passed to a downmixer <NUM> and to an analysis processor <NUM>.

In some embodiments the downmixer <NUM> is configured to receive the multi-channel signals and downmix the signals to a determined number of channels and output the downmix signals <NUM>. For example the downmixer <NUM> may be configured to generate a <NUM> audio channel downmix of the multi-channel signals. The determined number of channels may be any suitable number of channels. In some embodiments the downmixer <NUM> is optional and the multi-channel signals are passed unprocessed to an encoder <NUM> in the same manner as the downmix signal are in this example.

In some embodiments the analysis processor <NUM> is also configured to receive the multi-channel signals and analyse the signals to produce metadata <NUM> associated with the multi-channel signals and thus associated with the downmix signals <NUM>. The analysis processor <NUM> may be configured to generate the metadata which may comprise, for each time-frequency analysis interval, a direction parameter <NUM> and an energy ratio parameter <NUM> (and in some embodiments a coherence parameter, and a diffuseness parameter). The direction and energy ratio may in some embodiments be considered to be spatial audio parameters. In other words the spatial audio parameters comprise parameters which aim to characterize the sound-field created by the multi-channel signals (or two or more playback audio signals in general).

In some embodiments the parameters generated may differ from frequency band to frequency band. Thus for example in band X all of the parameters are generated and transmitted, whereas in band Y only one of the parameters is generated and transmitted, and furthermore in band Z no parameters are generated or transmitted. A practical example of this may be that for some frequency bands such as the highest band some of the parameters are not required for perceptual reasons. The downmix signals <NUM> and the metadata <NUM> may be passed to an encoder <NUM>.

The encoder <NUM> may comprise an audio encoder core <NUM> which is configured to receive the downmix (or otherwise) signals <NUM> and generate a suitable encoding of these audio signals. The encoder <NUM> can in some embodiments be a computer (running suitable software stored on memory and on at least one processor), or alternatively a specific device utilizing, for example, FPGAs or ASICs. The encoding may be implemented using any suitable scheme. The encoder <NUM> may furthermore comprise a metadata encoder/quantizer <NUM> which is configured to receive the metadata and output an encoded or compressed form of the information. In some embodiments the encoder <NUM> may further interleave, multiplex to a single data stream or embed the metadata within encoded downmix signals before transmission or storage shown in <FIG> by the dashed line. The multiplexing may be implemented using any suitable scheme.

In the decoder side, the received or retrieved data (stream) may be received by a decoder/demultiplexer <NUM>. The decoder/demultiplexer <NUM> may demultiplex the encoded streams and pass the audio encoded stream to a downmix extractor <NUM> which is configured to decode the audio signals to obtain the downmix signals. Similarly the decoder/demultiplexer <NUM> may comprise a metadata extractor <NUM> which is configured to receive the encoded metadata and generate metadata. The decoder/demultiplexer <NUM> can in some embodiments be a computer (running suitable software stored on memory and on at least one processor), or alternatively a specific device utilizing, for example, FPGAs or ASICs.

The decoded metadata and downmix audio signals may be passed to a synthesis processor <NUM>.

The system <NUM> 'synthesis' part <NUM> further shows a synthesis processor <NUM> configured to receive the downmix and the metadata and re-creates in any suitable format a synthesized spatial audio in the form of multi-channel signals <NUM> (these may be multichannel loudspeaker format or in some embodiments any suitable output format such as binaural or Ambisonics signals, depending on the use case) based on the downmix signals and the metadata.

Therefore in summary first the system (analysis part) is configured to receive multi-channel audio signals. Then the system (analysis part) is configured to generate a downmix or otherwise generate a suitable transport audio signal (for example by selecting some of the audio signal channels). The system is then configured to encode for storage/transmission the downmix (or more generally the transport) signal. After this the system may store/transmit the encoded downmix and metadata. The system may retrieve/receive the encoded downmix and metadata. Then the system is configured to extract the downmix and metadata from encoded downmix and metadata parameters, for example demultiplex and decode the encoded downmix and metadata parameters.

The system (synthesis part) is configured to synthesize an output multi-channel audio signal based on extracted downmix of multi-channel audio signals and metadata.

With respect to <FIG> an example analysis processor <NUM> and Metadata encoder/quantizer <NUM> (as shown in <FIG>) according to some embodiments is described in further detail.

The analysis processor <NUM> in some embodiments comprises a time-frequency domain transformer <NUM>.

In some embodiments the time-frequency domain transformer <NUM> is configured to receive the multi-channel signals <NUM> and apply a suitable time to frequency domain transform such as a Short Time Fourier Transform (STFT) in order to convert the input time domain signals into a suitable time-frequency signals. These time-frequency signals may be passed to a spatial analyser <NUM> and to a signal analyser <NUM>.

Thus for example the time-frequency signals <NUM> may be represented in the time-frequency domain representation by
si(b, n),
where b is the frequency bin index and n is the time-frequency block (frame) index and i is the channel index. In another expression, n can be considered as a time index with a lower sampling rate than that of the original time-domain signals. These frequency bins can be grouped into sub-bands that group one or more of the bins into a sub-band of a band index k = <NUM>,. Each sub-band k has a lowest bin bk,low and a highest bin bk,high, and the subband contains all bins from bk,low to bk,high. The widths of the sub-bands can approximate any suitable distribution. For example the Equivalent rectangular bandwidth (ERB) scale or the Bark scale.

In some embodiments the analysis processor <NUM> comprises a spatial analyser <NUM>. The spatial analyser <NUM> may be configured to receive the time-frequency signals <NUM> and based on these signals estimate direction parameters <NUM>. The direction parameters may be determined based on any audio based 'direction' determination.

For example in some embodiments the spatial analyser <NUM> is configured to estimate the direction with two or more signal inputs. This represents the simplest configuration to estimate a 'direction', more complex processing may be performed with even more signals.

The spatial analyser <NUM> may thus be configured to provide at least one azimuth and elevation for each frequency band and temporal time-frequency block within a frame of an audio signal, denoted as azimuth φ(k, n) and elevation θ(k, n). The direction parameters <NUM> may be also be passed to a direction analyser/index generator <NUM>.

The spatial analyser <NUM> may also be configured to determine an energy ratio parameter <NUM>. The energy ratio may be the energy of the audio signal considered to arrive from a direction. The direct-to-total energy ratio r(k,n) can be estimated, e.g., using a stability measure of the directional estimate, or using any correlation measure, or any other suitable method to obtain a ratio parameter. The energy ratio may be passed to an energy ratio average generator/quantization resolution determiner <NUM>.

Therefore in summary the analysis processor is configured to receive time domain multichannel or other format such as microphone or Ambisonics audio signals.

Following this the analysis processor may apply a time domain to frequency domain transform (e.g. STFT) to generate suitable time-frequency domain signals for analysis and then apply direction analysis to determine direction and energy ratio parameters.

The analysis processor may then be configured to output the determined parameters.

Although directions and ratios are here expressed for each time index n, in some embodiments the parameters may be combined over several time indices. Same applies for the frequency axis, as has been expressed, the direction of several frequency bins b could be expressed by one direction parameter in band k consisting of several frequency bins b. The same applies for all of the discussed spatial parameters herein.

As also shown in <FIG> an example metadata encoder/quantizer <NUM> is shown according to some embodiments.

As discussed above the audio spatial metadata consists of azimuth, elevation, and energy ratio data for each sub-band. In the MASA format the directional data is represented on <NUM> bits such that the azimuth is approximately represented on <NUM> bits, and the elevation on <NUM> bits. The energy ratio is represented on <NUM> bits. For each frame there are N=<NUM> sub-bands and M=<NUM> time blocks, making that (<NUM>+<NUM>)xMxN bits to be needed to store the uncompressed metadata for each frame. In a higher frequency resolution version, there could be <NUM> or <NUM> frequency sub-bands. Although in the following examples the MASA format bit allocations are used it is understood that other embodiments may be implemented with other bit allocation, or sub-band or time block choices and these are representative examples only.

The metadata encoder/quantizer <NUM> may comprise an energy ratio average generator/quantization resolution determiner <NUM>. The energy ratio average generator/quantization resolution determiner <NUM> may be configured to receive the energy ratios and from the analysis and from this generate a suitable encoding of the ratios. For example to receive the determined energy ratios (for example direct-to-total energy ratios, and furthermore diffuse-to-total energy ratios and remainder-to-total energy ratios) and encode/quantize these. These encoded forms may be passed to the encoder <NUM>.

In some embodiments the energy ratio average generator/quantization resolution determiner <NUM> is configured to encode each energy ratio value using a determined number of bits. For example in the above case where there are N=<NUM> sub-bands <NUM> bits are used to encode each energy ratio value. The energy ratio average generator/quantization resolution determiner <NUM> thus may be configured to apply a scalar non-uniform quantization using <NUM> bits for each sub-band.

Additionally the energy ratio average generator/quantization resolution determiner <NUM> is configured to, rather than controlling the transmitting/storing of all of the energy ratio values for all TF blocks, generate only one weighted average value per sub-band which is passed to the encoder to be transmitted/stored.

In some embodiments this average is computed by taking into account the total energy of each time-frequency block and the weighting applied based on the sub-bands having more energy.

Additionally the energy ratio average generator/quantization resolution determiner <NUM> is configured to determine the quantization resolution for the direction parameters (in other words a quantization resolution for elevation and azimuth values) for all of the time-frequency blocks in the frame. This bit allocation may for example be defined by bits_dir0[<NUM>:N-<NUM>][<NUM>:M-<NUM>] and may be passed to the direction analyser/index generator <NUM>.

As shown in <FIG> the actions of the energy ratio average generator/quantization resolution determiner <NUM> can be summarised. The first step is one of receiving the ratio values as shown in <FIG> by step <NUM>. Then the sub-band loop is started in <FIG> by step <NUM>. The sub-band loop comprises a first action of using a determined number of bits (for example <NUM>) to represent the energy ratio value based on the weighted average of the energy ratio value for all of the values within the time block (where the weighting is determined by the energy value of the audio signal) as shown in <FIG> by step <NUM>. Then the second action is one determined the quantization resolution for the azimuth and elevation for all of the time block of the current sub-band based on the value of the energy ratio as shown in <FIG> by step <NUM>. The loop is closed in <FIG> by step <NUM>.

This can furthermore be represented in pseudocode by the following.

The metadata encoder/quantizer <NUM> may comprise a direction analyser/index generator <NUM>. The direction index generator <NUM> is configured to receive the direction parameters (such as the azimuth φ(k, n) and elevation θ(k, n) <NUM> and the quantization bit allocation and from this generate a quantized output. In some embodiments the quantization is based on an arrangement of spheres forming a spherical grid arranged in rings on a 'surface' sphere which are defined by a look up table defined by the determined quantization resolution. In other words the spherical grid uses the idea of covering a sphere with smaller spheres and considering the centres of the smaller spheres as points defining a grid of almost equidistant directions. The smaller spheres therefore define cones or solid angles about the centre point which can be indexed according to any suitable indexing algorithm. Although spherical quantization is described here any suitable quantization, linear or non-linear may be used.

For example in some embodiments the bits for direction parameters (azimuth and elevation) are allocated according to the table bits_direction[]; if the energy ratio has the index i, the number of bits for the direction is bits_direction[i]. const short bits_direction[] = {
<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>};.

The structure of the direction quantizers for different bit resolutions is given by the following variables:
<IMG>
<IMG>.

'no_theta' corresponds to the number of elevation values in the 'North hemisphere' of the sphere of directions, including the Equator. 'no_phi' corresponds to the number of azimuth values at each elevation for each quantizer.

For instance for <NUM> bits there are <NUM> elevation values corresponding to [<NUM>, <NUM>, <NUM>, <NUM>] and <NUM>-<NUM>=<NUM> negative elevation values [-<NUM>, -<NUM>, -<NUM>]. For the first elevation value, <NUM>, there are <NUM> equidistant azimuth values, for the elevation values <NUM> and - <NUM> there are <NUM> equidistant azimuth values and so on.

All quantization structures with the exception of the structure corresponding to <NUM> bits have the difference between consecutive elevation values given by <NUM> degrees divided by the number of elevation values 'no_theta'. This is an example and any other suitable distribution may be implemented. For example in some embodiments there may be implemented a spherical grid for <NUM> bits that might have no points under the Equator. Similarly the <NUM> bits distribution may be spread on the sphere or restricted to the Equator only. In such a manner the indices can be considered to be a fixed rate encoding of the direction parameters.

Having determined the direction indices the direction analyser/index generator <NUM> can then be configured to entropy encode the azimuth and elevation indices. The entropy coding is implemented for one frequency sub-band at a time, encoding all the time subframes for that sub-band. This means that for instance the best GR order is determined for the <NUM> values corresponding to the time subframes of a current sub-band. Furthermore as discussed herein when there are several methods to encode the values for one sub-band one of the methods is selected as discussed later. The entropy encoding of the azimuth and the elevation indexes in some embodiments may be implemented using a Golomb Rice encoding method with two possible values for the Golomb Rice parameter. In some embodiments the entropy coding may also be implemented using any suitable entropy coding technique (for example Huffman, arithmetic coding.

Having fixed rate and entropy encoded the direction indices (the elevation and azimuth indices in this example) then the direction analyser/index generator <NUM> can then be configured to compare for each of the sub-bands the number of bits used by the entropy coding (EC) method to a fixed rate encoding method and select for each sub-band the encoding method which uses the fewer number of bits. Thus the bits_EC is the sum of the bits used in each sub-band irrespective of whether fixed or variable rate encoding is used. For the sub-bands where fixed rate encoding is used, the number of bits used for each direction is given by bits_dir0[i][j], where "i" is the index of the sub-band and "j" is the index of the time subframe.

Suppose the bits for each sub-band, after the entropy encoding are as follows:.

Then the number of bits used to encode the time-block or frame is then compared to the number of bits available. For example in some embodiments a value delta can be calculated which is the difference between the number of bits used to encode the time-block or frame (bits_EC) and bits available.

In some embodiments the direction analyser/index generator <NUM> is configured to determine whether the difference value (delta) negative. In other words whether the number of bits for Encoded Direction Indices (using both the fixed rate and entropy encoded sub-bands) is more than bits available.

Where the number of bits used is not more than the bits available (or delta is positive or not negative) then the encoder <NUM> is configured to use the (bits_EC) Encoded Direction Indices and signal which subframes are Entropy encoded and which are Fixed rate encoded. For example in some embodiments the encoder is configured to signal <NUM> bit to indicate that the EC+Fixed rate method is used, also <NUM> bit per sub-band to is then used to indicate whether the sub-band is Fixed rate or Entropy encoded. Then the encoded sub-bands are grouped. For example the entropy encoded sub-bands are grouped and then the fixed rate encoded sub-bands follow.

This for example is shown in <FIG> wherein the initial operation following step <NUM> is one of determining Direction Indices (Azimuth and Elevation) based on quantization resolution set by bits_dir0[<NUM>:N-<NUM>][<NUM>:M-<NUM>], in other words performing Fixed rate encoding as shown in <FIG> by step <NUM>.

Having generated the indices the next operation is to entropy encode the direction indices as shown in <FIG> by step <NUM>.

Having generated for all of the sub-bands an entropy encoded and fixed rate encoded form then for each sub-band the option which uses the fewer number of bits is selected, and the used bits for the time-block or frame is determined (as bits_EC) as shown in <FIG> by step <NUM>.

Then the difference between the used bits and bits available is determined (Delta = bits_EC- bits_available) as shown in <FIG> by step <NUM>.

The next operation may be one of determining whether number of bits for Encoded Direction Indices is more than the bits available (in other words is Delta negative?) as shown in <FIG> by step <NUM>.

Where the determination results in the answer that the number of bits for the Encoded Direction Indices is not more than the bits available (in other words the Delta value is not negative or is positive) then the encoded Direction Indices are used and furthermore the selections signalled (in other words indicators generated to signal which subframes are Entropy encoded and which are Fixed rate encoded) as shown in <FIG> by step <NUM>. In some embodiments the using <NUM> bit to signal that the EC selection method is used, using <NUM> bit per sub-band to indicate which are Fixed or Entropy encoded and then grouping the encoded metadata such that all of the entropy encoded sub-bands are packed in the bitstream first and then then the fixed rate encoded sub-bands packed.

In some embodiments where the number of bits for Encoded Direction Indices is more than bits available (or Delta is negative) then the direction analyser/index generator <NUM> is configured to determine whether the number of bits used for the Encoded Direction Indices is more than bits available by a quantization resolution reduction threshold value. The quantization resolution reduction threshold value can in some embodiments be calculated based on the number of fixed rate encoded sub-bands, the number of bits which can be reduced from each time-frequency tile (or block of time-frequencies) before the quality of quantization deteriorates significantly and the number of sub-frames in the block. For example, in some embodiments, the minimum number of bits which can be used is <NUM> (though any other suitable number of minimum bits may be used). This may be represented by is Delta >= FRB*BM*M, where FRB = number of Fixed Rate Sub-bands in the sub-frame, BM = maximum number of bits that can be reduced from each TF tile and M = number of time blocks or time sub-frames.

Where the determination results in the answer that the difference is less than the quantization resolution reduction threshold value then the direction analyser/index generator <NUM> is configured to recalculate the number of bits used for fixed rate encoding by modifying the quantization resolution. In some embodiments the quantization resolution is reduced for each TF tile of the fixed rate encoded subbands upto the maximum BM bit reduction (in other words until the minimum number of bits to be used is reached) and until the number of bits for the frame is reduced to the available number of bits. In some embodiments the reduction is done <NUM> bit per TF at a time, such that the quantization resolution in the TF are uniformly affected. Furthermore in some embodiments the reduction is applied from the lower sub-bands to the higher sub-bands. The reduction is such that at the end of the quantization resolution reduction the number of used bits for the time-block is bits_EC1 rather than bits_EC. In other words the reduction is such that 'bits_EC1' should correspond to 'bits_available'.

After applying the quantization resolution for the fixed rate sub-frames then the encoder <NUM> is configured to use the (bits_EC1) Encoded Direction Indices and signal which subframes are Entropy encoded and which are Fixed rate encoded. For example in some embodiments the encoder is configured to signal <NUM> bit to indicate that the EC+Fixed rate method is used, also <NUM> bit per sub-band to is then used to indicate whether the sub-band is Fixed rate or Entropy encoded. Then the encoded sub-bands are grouped. For example the entropy encoded sub-bands are grouped and then the fixed rate encoded sub-bands follow.

Where the determination results in the answer that the difference is greater than or equal to the quantization resolution reduction threshold value then the direction analyser/index generator <NUM> is configured to reduce an allocation of the number of bits for quantization bits_dir1[<NUM>:N-<NUM>][<NUM>:M-<NUM>] such that such that the sum of the allocated bits equals the number of available bits left after encoding the energy ratios.

Furthermore the direction analyser/index generator <NUM> can then be configured to start a sub-band encoding using the reduced number of available bits after encoding the energy ratios. This differs from the quantization resolution reduction above in that both the fixed rate and the variable (entropy encoded) forms are encoded again.

The reduced rate encoded direction indices and signalled use of fixed rate encoded sub-bands can then be encoded at the encoder <NUM>. In other words a bit can be used to signal whether the sub-band was encoded using the entropy or fixed rate method used and the bits for encoded sub-bands are then sent.

This is shown for example in <FIG> where following from step <NUM> there is the operation of determining whether the difference is more than bits available by a quantization resolution reduction threshold value as shown in <FIG> by step <NUM>.

Where the difference is less than the quantization resolution reduction threshold then the method is configured to recalculate the number of bits for encoding fixed rate sub-bands by modifying the quantization resolution for the fixed rate encoded sub-bands (in other words not changing the entropy encoded sub-bands) as shown in <FIG> by step <NUM>.

Having recalculated the number of bits for encoding the fixed rate sub-bands, then the bits are output where the encoded direction indices are used (with the modified quantization resolution fixed rate sub-frames) and furthermore the selections signalled (in other words indicators generated to signal which subframes are Entropy encoded and which are Fixed rate encoded) as shown in <FIG> by step <NUM>. In some embodiments the using <NUM> bit to signal that the EC selection method is used, using <NUM> bit per sub-band to indicate which are Fixed or Entropy encoded and then grouping the encoded metadata such that all of the entropy encoded sub-bands are packed in the bitstream first and then then the modified resolution fixed rate encoded sub-bands packed after.

In some embodiments the reduced bitrate encoding may be implemented by starting a loop for each sub-band upto the penultimate sub-band N-<NUM>. Within this loop an allowed number of bits for the current sub-band is determined bits_allowed= sum(bits_dir1[i][<NUM>:M-<NUM>]). Then having determined the number of allowed number of bits for the current sub-band the direction analyser/index generator <NUM> can be configured to encode the indices by using fixed rate encoding with the reduced allocated number of bits bits_fixed=bits_allowed.

The direction analyser/index generator <NUM> can then be configured to select either the fixed rate encoding or using entropy coding based on the method which uses fewer bits, i.e. select the lowest of bits_fixed or bits_ec. Furthermore the direction analyser/index generator <NUM> can then be configured to use one bit to indicate which of the two encoding methods have been selected. The number of bits used for the sub-band encoding is therefore nb = min(bits_fixed, bits_ec)+<NUM>.

The direction analyser/index generator <NUM> can then be configured to determine whether there are bits available with respect to the allowed bits, in other words if diff = allowed_bits- nb ><NUM>. Where there is a difference between the number of bits available and the number of bits used in the sub-band then the difference diff can be distributed to the later sub-bands, for example by updating bits_dir1[i+<NUM>:N-<NUM>][0_M-<NUM>], else the direction analyser/index generator <NUM> can be configured to subtract a bit from the next sub-band allocation bits_dir1[i+<NUM>][<NUM>].

For the final sub-band N the direction analyser/index generator <NUM> can be configured to encode the direction indices using the fixed rate encoding method and using bits_dir1[N-<NUM>][<NUM>:M-<NUM>] bits.

As shown in <FIG> these reduced bit rate operations (in other words step <NUM> in <FIG>) can be shown as an example flow diagram. The first step is one of starting a loop for the sub-bands from <NUM> to the penultimate (N-<NUM>) sub-band as shown in <FIG> by step <NUM>.

Within the loop, for the current sub-band, the number of allowed bits for encoding is determined as shown in <FIG> by step <NUM>.

Then a fixed rate encoding method is used to encode the indices using the reduced number of bits as shown in <FIG> by step <NUM>.

Either the fixed rate encoding or the entropy encoding is then selected based on which method uses fewer bits and the selection furthermore can be indicated by a single bit as shown in <FIG> by step <NUM>.

The determination of whether there are any remaining bits available based on the difference between the number of allowed bits and the number of bits used by the selected encoding and the redistribution of the remaining bits to the later sub-band allocations is shown in <FIG> by step <NUM>.

The loop is then completed and may then repeat for the next sub-band as shown in <FIG> by step <NUM>.

Finally the last sub-band is encoded using a fixed rate method using the remaining allocation of bits as shown in <FIG> by step <NUM>.

As such the method may be summarised in the following.

In some implementations the optimisation of the entropy encoding of the elevation and the azimuth values can be performed separately and is described in further detail hereafter with respect to <FIG> and <FIG>.

For example with respect to <FIG> is shown an example wherein in some embodiments a series of index checks and optimisations are applied in order to attempt to reduce the number of bits required to entropy encode the direction indices.

In some embodiments the direction indices determination is started as shown in <FIG> by step <NUM>. In this example the bits required for entropy encoding the indices determination shown is an elevation index determination. However as described later a similar approach may be applied to the azimuth index determination.

In some embodiments a mapping is generated such that the elevation (or azimuth) value of <NUM> has an index of <NUM> and the increasing index values are assigned to increasing positive and negative elevation (azimuth) values as shown in <FIG> by step <NUM>.

Having generated the mapping then the mapping is applied to the audio sources (for example in the form of generating a codeword output based on a lookup table) as shown in <FIG> by step <NUM>.

The indices having been generated, in some embodiments there is a check performed to determine whether all of the indices are located within the same hemisphere as shown in <FIG> by step <NUM>.

Where all of the indices are located within the same hemisphere then the index values can be divided by two (with a rounding up) and an indicator generated indicating which hemisphere the indices were all located within and then entropy encoding these values as shown in <FIG> by step <NUM>.

Where all of the indices are not located within the same hemisphere then a mean removed entropy encoding can be applied to the indices. A mean removed entropy encoding may be configured to remove first the average index value for the subframes to be encoded, then remap the indices to positive ones and then encode them with a suitable entropy encoding, such as Golomb Rice encoding as shown in <FIG> by step <NUM>.

After applying entropy encoding, in some embodiments a check can be applied to determine whether all of the time subframes have the same elevation (azimuth) value or index as shown in <FIG> by step <NUM>.

Where all of the time subframes have the same elevation (azimuth) value or index then an indicator is generated indicating the multiple of elevation (azimuth) value or index as shown in <FIG> by step <NUM> otherwise the method passes directly to step <NUM>.

The next operation is one of providing the number of bits required for the entropy encoded indices and any indicator bits as shown in <FIG> by step <NUM>.

For example with respect to elevation values, the index of the elevation can be determined from a codebook in the domain [-<NUM>; <NUM>] which is formed such that an elevation with a value <NUM> returns a codeword with index zero and alternatively assigns increasing indexes to positive and negative codewords distancing themselves from the zero elevation value.

Thus as an example in some embodiments there is implemented a codebook with the codewords {-<NUM>, -<NUM>, -<NUM>, <NUM>, <NUM>, <NUM>, <NUM>} which produces the indexes {<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>}. This indexing produces lower valued indexes for directions that are more probable in a general sense (where in practical examples the directions are near the Equator). Another observation is that if the audio sources are further away from the Equator, corresponding to higher values indexes, they tend to be all above or all under the Equator. In some embodiments the encoder can be configured to check whether all of the audio sources are above (or all of the audio sources are below) the equator and where this is the case for all time subframes for a subband then dividing the indices by <NUM>, in order to generate smaller valued indices which can be more efficiently encoded.

In some embodiments the estimation of the number of bits for the elevation indices can be implemented in C as follows:
<IMG>
<IMG>.

A special case of same elevation values for all the time subframes is also checked and signalled.

The function mean_removed_GR() in the above example is configured to remove first the average index value for the subframes to be encoded, then remap the indices to positive ones and then encodes them with Golomb Rice encoding.

This can be implemented, for example in C language, by the following:
<IMG>
<IMG>.

The function odd_even_mean_removed_GR() is configured to check first if all indexes are odd or if all are even, signals this occurrence and indicates the type (odd or even) after which it encodes the halved indices. <IMG>
<IMG>
In some embodiments a series of entropy encoding optimisation operations are performed and then the lowest value is selected. This for example can be shown with respect to the encoding of azimuth values and as shown in <FIG>. In some embodiments the direction indices determination is started as shown in <FIG> by step <NUM>.

In some embodiments a mapping is generated such that the azimuth value of <NUM> has an index of <NUM> and the increasing index values are assigned to increasing positive and negative azimuth values as shown in <FIG> by step <NUM>.

In this example, the index of the azimuth can be determined from a further codebook. In this example the zero value for the azimuth corresponds to a reference direction which may be the front direction, and positive values are to the left and negative values to the right. In this example the index of the azimuth value is assigned such that the values (-<NUM>, -<NUM>, -<NUM>, -<NUM>, -<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>) have assigned the following indices (<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>). In some embodiments the odd/even approach can be checked for the azimuth (corresponding to left /right positioning).

In this example the higher index values are assigned to values from the back or rear of the 'capture environment'.

The encoding of the azimuth indexes of a subframe can in some embodiments be performed based on the following:.

In C language the encoding looks like in the following:
<IMG>
<IMG>
<IMG>
<IMG>
<IMG>.

With respect to <FIG> is shown an example metadata extractor <NUM> suitable for decoding the encoded metadata as encoded by the encoder as shown in <FIG>.

The metadata extractor <NUM> in some embodiments comprises a demultiplexer <NUM> configured to receive the encoded signals and output encoded energy ratio values to an energy ratio decoder <NUM>, and output signalling bits to an entropy coding mode detector <NUM> and to a sub-band detector <NUM> and the encoded indices to an index decoder <NUM>.

The metadata extractor <NUM> furthermore may comprise an energy ratio decoder <NUM> configured to receive and decode the encoded energy ratios in order to generate decoded energy ratios. The decoded energy ratios <NUM> may be output. The energy ratio decoder <NUM> may furthermore generate the energy ratio based quantization resolution value <NUM> based on the encoded energy ratio value and pass this to the index decoder and the direction index-direction value (AZ/EL) converter <NUM>.

The metadata extractor <NUM> furthermore may comprise an entropy coding (EC) mode detector <NUM>. The EC mode detector may read the first bit in the block which indicates whether the block has been encoded all in a fixed rate mode (in other whether the block contains the encoded index values and therefore there is no entropy decoding required) or whether the entropy-fixed rate hybrid encoding has been implemented for this block.

The entropy coding mode detector <NUM> may thus be configured to control the index decoder <NUM> based on the first bit (the mode indicator).

The metadata extractor <NUM> furthermore may comprise a sub-band detector <NUM>. The sub-band detector <NUM> may read the next bits (for example where there are <NUM> sub-bands, there are <NUM> bits) in the block which indicates for the block which sub-bands have been encoded according to the fixed rate method and which sub-bands have been encoded according to the entropy method.

The sub-band detector <NUM> may thus be configured to control the index decoder <NUM> based on the read bits (the sub-band indicators).

The metadata extractor <NUM> furthermore may comprise an index decoder <NUM>. The index decoder <NUM> having received the metadata encoded values for the sub-bands can be controlled by the sub-band detector <NUM> and entropy mode detector <NUM>.

Thus for example the index decoder <NUM> can be configured to fixed rate decode the metadata encoded values when the mode indicator indicates that the hybrid mode is disabled.

Additionally the index decoder <NUM> can be configured to decode the entropy encoded sub-bands based on the sub-band indicators. Having read and decoded the entropy values the difference between the bits available and the bits read (the indicator bits and the entropy encoded direction index bits) is determined. The index decoder <NUM> is further configured to determine whether the difference is less than the number of bits required to fixed rate encode the remaining encoded sub-bands based on the energy ratio based quantization resolution value <NUM>. In other words whether the difference (bits_available-bits_read) < sum(bits_dir0[i][j]), where i = index of fixed rate encoded subband, and j=<NUM>:M-<NUM>.

Where the difference is less than the number of bits assigned based on the energy ratio based quantization resolution value <NUM> then the index decoder is configured to determine whether the encoding has been implemented using the quantization resolution modification for the fixed rate sub-bands and the decoding is performed on the fixed rate sub-bands based on the reduced quantization resolutions determined in the same manner as implemented in the encoder. Where the difference is correct then the original resolution is used to decode the fixed rate sub-bands.

The decoded direction parameters <NUM> can then be output.

Thus in some embodiments there may be two reduction levels.

A finer reduction level (when the difference is small enough) which is signalled as follows:
The original number of bits for each time-frequency block is determined by the energy quantized ratio. First there is signalling of sub-band is using EC or fixed rate encoding. The sub-bands that are EC encoded were written first, therefore when reading them it is known how many bits they used. Also it is known the available number of bits and the predetermined number of bits for the fixed rate encoded sub-bands. If the pre-determined number of bits + the bits of the EC encoded sub-bands fit into the available bits, all is good, so there is no reduction; else there is a small reduction.

A coarser or "harsher" reduction where one bit at the beginning is sent to instruct the decoder to whether the bit allocation is reduced to the number of available bit limit or not (corresponding to step <NUM>).

<FIG> for example shows the operation of the metadata extractor as shown in <FIG> as a flow diagram.

Thus the method comprises receiving encoded data as shown in <FIG> by step <NUM>.

The encoded data is demultiplexed as shown in <FIG> by step <NUM>.

The EC mode signalling bit is then read to determine whether the hybrid entropy coding method has been employed and determine whether a fine-EC mode (or coarse-EC mode) encoding has been employed as shown in <FIG> by step <NUM>.

Where the EC mode signalling bit indicates that a coarse rate reduction has been applied the decoding is performed based only on rate reduction based decoding (in some embodiments implementing the coarse rate reduced energy ratio quantization resolution) as shown in <FIG> by step <NUM>.

Where the EC mode signalling bit indicates that a hybrid entropy-fixed rate encoding has been employed and that a fine rate reduction (modification of the quantization resolution only) or no rate reduction was required then the next operation is one of reading the sub-band signalling bits to determine which sub-bands were entropy encoded and which sub-bands where fixed rate encoded as shown in <FIG> by step <NUM>.

The grouped entropy encoded sub-band bits are read and decoded generating direction indices which can be converted to directions based on the original energy ratio quantization resolution as shown in <FIG> by step <NUM>.

The next operation is one of determining whether the difference between the bits available for the block and the bits read (the signalling and EC encoded bits) is less than the number of bits required to encode the remaining fixed rate bits according to the original energy ratio quantization resolution as shown in <FIG> by step <NUM>.

Where the difference is less than the number of bits required then the decoding can be performed on the 'fine' rate reduction encoding based on the modified quantization resolution method as shown in <FIG> by step <NUM>.

Where the difference is not less than (or equal to) the number of bits required then the decoding can be performed on the encoding based on the original quantization resolution method as shown in <FIG> by step <NUM>.

With respect to <FIG> an example electronic device which may be used as the analysis or synthesis device is shown. The device may be any suitable electronics device or apparatus. For example in some embodiments the device <NUM> is a mobile device, user equipment, tablet computer, computer, audio playback apparatus, etc..

In some embodiments the device <NUM> comprises a memory <NUM>. In some embodiments the at least one processor <NUM> is coupled to the memory <NUM>. The memory <NUM> can be any suitable storage means. In some embodiments the memory <NUM> comprises a program code section for storing program codes implementable upon the processor <NUM>. Furthermore in some embodiments the memory <NUM> can further comprise a stored data section for storing data, for example data that has been processed or to be processed in accordance with the embodiments as described herein. The implemented program code stored within the program code section and the data stored within the stored data section can be retrieved by the processor <NUM> whenever needed via the memory-processor coupling.

In some embodiments the device <NUM> comprises a user interface <NUM>. The user interface <NUM> can be coupled in some embodiments to the processor <NUM>. In some embodiments the processor <NUM> can control the operation of the user interface <NUM> and receive inputs from the user interface <NUM>. In some embodiments the user interface <NUM> can enable a user to input commands to the device <NUM>, for example via a keypad. In some embodiments the user interface <NUM> can enable the user to obtain information from the device <NUM>. For example the user interface <NUM> may comprise a display configured to display information from the device <NUM> to the user. The user interface <NUM> can in some embodiments comprise a touch screen or touch interface capable of both enabling information to be entered to the device <NUM> and further displaying information to the user of the device <NUM>. In some embodiments the user interface <NUM> may be the user interface for communicating with the position determiner as described herein.

In some embodiments the device <NUM> comprises an input/output port <NUM>. The input/output port <NUM> in some embodiments comprises a transceiver. The transceiver in such embodiments can be coupled to the processor <NUM> and configured to enable a communication with other apparatus or electronic devices, for example via a wireless communications network. The transceiver or any suitable transceiver or transmitter and/or receiver means can in some embodiments be configured to communicate with other electronic devices or apparatus via a wire or wired coupling.

The transceiver can communicate with further apparatus by any suitable known communications protocol. For example in some embodiments the transceiver can use a suitable universal mobile telecommunications system (UMTS) protocol, a wireless local area network (WLAN) protocol such as for example IEEE <NUM>. X, a suitable short-range radio frequency communication protocol such as Bluetooth, or infrared data communication pathway (IRDA).

The transceiver input/output port <NUM> may be configured to receive the signals and in some embodiments determine the parameters as described herein by using the processor <NUM> executing suitable code.

of Mountain View, California and Cadence Design, of San Jose, California automatically route conductors and locate components on a semiconductor chip using well established rules of design as well as libraries of pre-stored design modules.

Claim 1:
An apparatus comprising means configured to:
receive encoded spatial audio signal directional metadata parameters for time-frequency tiles of an audio frame;
receive an indicator configured to identify whether the encoded spatial audio signal directional metadata parameters were encoded based on a quantization resolution which is equal to or less than a determined number of bits;
decode the encoded spatial audio signal directional metadata parameters for the time-frequency tiles of the audio frame based on the quantization resolution which is equal to or less than the determined number of bits when the indicator identifies that the encoded spatial audio signal directional metadata parameters were encoded based on the quantization resolution which is equal to or less than the determined number of bits; and
when the indicator identifies that the encoded spatial audio signal directional metadata parameters were not encoded based on the quantization resolution which is equal to or less than the determined number of bits, the means is configured to:
decode a first part of the encoded spatial audio signal directional metadata parameters for the time-frequency tiles of the audio frame based on a further quantization resolution, the first part comprising entropy encoded spatial audio signal directional metadata parameters for the time-frequency tiles of the audio frame based on the further quantization resolution;
decode, when the difference between the determined number of bits and a number of bits used to encode the first part is less than a number of bits required to encode a second part of the encoded spatial audio signal directional metadata parameters for the time-frequency tiles of the audio frame based on the further quantization resolution, the second part comprising fixed rate encoded spatial audio signal directional metadata parameters for the time-frequency tiles of the audio frame based on a reduced bit quantization resolution, else
decode the second part comprising fixed rate encoded spatial audio signal directional metadata parameters for the time-frequency tiles of the audio frame based on the further quantization resolution.