Encoder comprising inter-channel phase difference calculator means and method for operating such encoder
Through the combination of global and band-by-band-channel phase difference calculator, the phase difference is steadily calculated and embedded, which solves the problem of phase difference fluctuation between channels in stereo encoding, and improves encoding efficiency and audio quality.
Patent Information
- Application Number
- CN202380084416.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-12-07
- Filing Date
- 2023-12-01
- Publication Date
- 2025-08-08
AI Technical Summary
When the existing stereo encoding technology processes binaural signals, the fluctuation of the phase difference between channels leads to a phase depletion effect, affects the audio quality, and insufficient transmission stability, resulting in low encoding efficiency.
The global inter-channel phase difference calculator and the band-by-band phase difference calculator are used, combined with the average band-by-band phase difference change calculator, by analyzing the global and sub-band phase difference, the inter-channel phase difference is stable and embedded into the audio bit stream to reduce fluctuations.
It effectively reduces fluctuations in the phase difference between channels, improves encoding efficiency and audio quality stability, and ensures accurate reconstruction on the decoder side.
Smart Images

Figure CN120457482A_ABST
Abstract
Description
[0001] manual
[0002] The inter-channel phase difference (IPD) describes how aligned two channels are with respect to the phase of their corresponding signals. The range of inter-channel phase difference is 0 (perfectly phase aligned) to + / -π (perfectly out of phase). The more out of phase two channels are, the more problems this can cause when generating a single downmix channel from these channels, as such phase shifts can cause severe cancellation effects, significantly reducing the energy in the downmix. Therefore, it is advisable to estimate and compensate for inter-channel phase differences for strongly out-of-phase signals to avoid these effects. In audio encoders using parametric stereo methods (i.e., transmitting only a downmix and side information used to upmix the downmix back to a stereo representation), the inter-channel phase difference will typically be part of the side information. The inter-channel phase difference is estimated at the encoder (either wideband or in multiple smaller frequency bands) and then compensated to align the channels for a better downmix. At the decoder, the inter-channel phase difference is ultimately reapplied as part of the upmix to restore the original phase shift between the channels.
[0003] However, in order for inter-channel phase difference compensation to have a positive effect on the final audio quality, the stability of the inter-channel phase difference used plays an important role. If the inter-channel phase difference fluctuates significantly over time, this will most likely cause audible spatial fluctuations in the output, which will have a negative impact on the listener's perception.
[0004] Stereo coding that relies on parametric representation of a single downmix channel and spatial cues is a well-known method for efficient audio data compression of stereo signals. This method has been used in several established techniques, such as binaural cue coding [1] [2] or parametric stereo coding [3] [4].
[0005] For some types of signals (e.g., stereo speech signals recorded with a mid-side microphone setup), it has been shown that using only inter-channel loudness difference (ILD) and inter-channel coherence (IC) as stereo parameters is sufficient to achieve high-quality coding results [5,6]. However, for other types of input, especially binaural signals, it has been shown that considering inter-channel time difference (ITD) and inter-channel phase difference is also important for efficient coding of such signals [7].
[0006] Subsequently, other techniques were developed to improve the use of inter-channel time difference and inter-channel phase difference in audio codecs, such as using full-band inter-channel time difference / inter-channel phase difference for low bit rate scenarios [8], adaptively turning inter-channel phase difference compensation on and off [9], or using it in encoders specifically tailored for conversational speech
[10] .
[0007] For inputs with strongly frequency-dependent phase differences, such as binaural input, using large bands to estimate inter-channel phase differences can lead to large variations in the estimated values over short periods of time, depending on the spectral distribution of the signal in a given frame, even if the actual phase differences remain more or less constant. This effect can be minimized by estimating the inter-channel phase differences in smaller bands where the inter-channel phase differences are more stable over time. However, transmitting a larger number of inter-channel phase differences for smaller bands also requires spending more bits on the inter-channel phase differences, which reduces the number of available bits for everything else. Furthermore, compensating for a large number of inter-channel phase differences across a large number of different small bands simultaneously also carries the risk of introducing instabilities. Therefore, it is desirable to keep the number of transmitted inter-channel phase differences relatively low while also avoiding strong fluctuations in the inter-channel phase differences of a signal that is actually relatively stable over time. To achieve this, a stabilization mechanism based on more refined phase analysis is needed.
[0008] The problem to be solved is to provide an improved encoder for stereo coding that relies on a single downmix channel and a parametric representation of spatial cues.
[0009] This problem is solved by an encoder for generating an audio bitstream from a stereo audio signal and a method for operating an encoder for generating an audio bitstream from a stereo audio signal according to the independent claims.
[0010] In a first aspect, the present invention provides an encoder for generating an audio bitstream from a stereo audio signal. The encoder comprises:
[0011] a downmixer configured to downmix the stereo audio signal to produce a mono audio signal;
[0012] an inter-channel phase difference calculator device configured to calculate an inter-channel phase difference for each of a plurality of consecutive time periods of the stereo audio signal; and
[0013] A bitstream generator configured to generate an audio bitstream in the following manner: embedding a mono audio signal and an inter-channel phase difference of a plurality of consecutive time periods into the audio bitstream;
[0014] wherein the inter-channel phase difference calculator means comprises a global inter-channel phase difference calculator configured to calculate, for each of a plurality of consecutive time periods, a global inter-channel phase difference based on a frequency band of the stereo audio signal;
[0015] wherein the frequency band comprises a plurality of sub-bands, wherein the inter-channel phase difference calculator means comprises a band-by-band inter-channel phase difference calculator, the band-by-band inter-channel phase difference calculator being configured to calculate, for each of the subset of sub-bands, a band-by-band inter-channel phase difference for each of the plurality of consecutive time periods;
[0016] wherein the inter-channel phase difference calculator device comprises a band-by-band inter-channel phase difference variation calculator, the band-by-band inter-channel phase difference variation calculator being configured to: for each of the plurality of consecutive time periods, for each of the subset of sub-bands, calculate a band-by-band inter-channel phase difference variation based on the band-by-band inter-channel phase difference of a current time period in the plurality of consecutive time periods of the corresponding sub-band and the inter-channel phase difference of at least one previous time period in the plurality of consecutive time periods;
[0017] wherein the inter-channel phase difference calculator device comprises an average band-by-band inter-channel phase difference variation calculator, the average band-by-band inter-channel phase difference variation calculator being configured to: calculate, for each of the plurality of consecutive time periods, an average band-by-band inter-channel phase difference variation based on the band-by-band inter-channel phase difference variation of each of the subset of sub-bands;
[0018] The inter-channel phase difference calculator device includes an inter-channel phase difference calculator, wherein the inter-channel phase difference calculator is configured to calculate the inter-channel phase difference according to the global inter-channel phase difference of the current time period and the average band-by-band inter-channel phase difference change of the current time period.
[0019] A downmixer is a device capable of generating a mono audio signal from a stereo audio signal. The downmixer may include or may be a processor. The two audio signals may be digital audio signals.
[0020] The term processor refers to an electronic device that is configured to perform a specific task. A processor can include hardware or a combination of hardware and software. Different processors can share hardware components and / or software components.
[0021] The inter-channel phase difference calculator is a device capable of calculating and outputting an inter-channel phase difference for each of a plurality of time periods of stereo audio received by the inter-channel phase difference calculator. The time period may be a frame of a digital stereo audio signal. The time period may have a length between 10 ms and 1 s. The inter-channel phase difference calculator may include or may be a processor.
[0022] The bitstream generator is a device capable of generating a digital bitstream containing the mono audio signal received from the downmixer and the associated inter-channel phase differences received from the inter-channel phase difference calculator device. The inter-channel bitstream generator may include or may be a processor.
[0023] The global inter-channel phase difference calculator is a device capable of calculating a global inter-channel phase difference based on a frequency band of a stereo audio signal for each of a plurality of consecutive time periods. The frequency band may be a broadband frequency band ranging from at least 40 Hz to 4 kHz, particularly from at least 20 Hz to 8 kHz. The global inter-channel phase difference calculator may include or may be a processor.
[0024] A frequency band includes multiple sub-bands. The number of sub-bands may vary depending on usage conditions. For example, the number of sub-bands may range from 4 to 16.
[0025] The band-by-band channel phase difference calculator is a device capable of calculating the band-by-band channel phase difference for each of the plurality of consecutive time periods and for each of the plurality of sub-bands. The band-by-band channel phase difference calculator may include or may be a processor.
[0026] The band-by-band channel phase difference change calculator is a device capable of calculating, for each of a plurality of consecutive time periods and for each of a plurality of sub-bands, a band-by-band channel phase difference change based on the band-by-band channel phase difference of a current time period in the plurality of consecutive time periods for the corresponding sub-band and the band-by-band channel phase difference of at least one previous time period in the plurality of consecutive time periods. The band-by-band channel phase difference change calculator may include or may be a processor.
[0027] The average band-by-band inter-channel phase difference variation calculator is a device capable of calculating, for each of a plurality of consecutive time periods, an average band-by-band inter-channel phase difference variation based on the band-by-band inter-channel phase difference variation for a corresponding time period of each of a plurality of sub-bands. The average band-by-band inter-channel phase difference variation calculator may include or may be a processor.
[0028] The inter-channel phase difference calculator is a device that receives the global inter-channel phase difference and the average band-by-band inter-channel phase difference change for the current time period, and is capable of calculating the inter-channel phase difference for the current time period based on the global inter-channel phase difference and the average band-by-band inter-channel phase difference change for the current time period. The inter-channel phase difference calculator may include or may be a processor.
[0029] The present invention minimizes undesirable fluctuations in inter-channel phase differences embedded in an audio bitstream by analyzing global inter-channel phase differences derived from a larger frequency band and by analyzing band-by-band inter-channel phase differences derived from smaller sub-bands within the larger frequency band. For each of the sub-bands, a measure of the variation in the band-by-band inter-channel phase difference is derived from the current band-by-band inter-channel phase difference in the sub-band for the current time segment and from one or more of the following: the band-by-band inter-channel phase difference for the previous time segment in the same band.
[0030] The individual band-by-band inter-channel phase difference variations are then averaged for the different sub-bands to obtain an average band-by-band inter-channel phase difference variation, which is a measure of stability for the entire frequency band. Simultaneously, a global inter-channel phase difference estimate is calculated for the entire frequency band. The inter-channel phase difference to be embedded in the audio bitstream for the current time segment is then calculated based on the global inter-channel phase difference for the current time segment and the average band-by-band inter-channel phase difference variation for the current time segment.
[0031] If the average band-by-band inter-channel phase difference variation is sufficiently small (indicating high stability in the frequency band), strong fluctuations in the inter-channel phase difference estimation can be prevented, for example, by limiting the maximum variation in the inter-channel phase difference from the previous time period to the current time period or even by forcing the current inter-channel phase difference to be the same as the inter-channel phase difference in the previous time period. Then, at the decoder side, the stable inter-channel phase difference is used to align the channels of the reconstructed stereo audio signal throughout the given frequency band.
[0032] By these features, strong fluctuations of the inter-channel phase difference can be avoided.In addition, for each time segment, only one inter-channel phase difference value needs to be embedded in the audio bitstream.
[0033] In summary, the present invention provides an innovative way to use and transmit inter-channel phase differences in an efficient manner while minimizing undesirable fluctuation effects.
[0034] According to some embodiments of the present invention, the inter-channel phase difference calculator is configured such that the inter-channel phase difference is an element of a closed interval, which is bounded by the global inter-channel phase difference of the current time period and the inter-channel phase difference of the previous time period. A closed interval is an interval that includes both an upper limit and a lower limit. Use of this interval reduces fluctuations in the inter-channel phase difference.
[0035] According to some embodiments of the present invention, the inter-channel phase difference calculator is configured to use the inter-channel phase difference of the previous time period as the inter-channel phase difference of the current time period if the average band-by-band inter-channel phase difference change is less than a preset value. This feature further reduces fluctuations in the inter-channel phase difference.
[0036] According to some embodiments of the present invention, the inter-channel phase difference calculator includes a global inter-channel phase difference difference calculator, and the global inter-channel phase difference difference calculator is configured to calculate, for each time period, a modulus of a difference between the inter-channel phase difference of a previous time period and the global inter-channel phase difference of a current time period;
[0037] The inter-channel phase difference calculator is configured to use the global inter-channel phase difference of the current time period as the inter-channel phase difference of the current time period when the average band-by-band inter-channel phase difference change is equal to or greater than a preset value and when the modulus of the difference between the inter-channel phase difference of the previous time period and the global inter-channel phase difference of the current time period is equal to or less than the average band-by-band inter-channel phase difference change.
[0038] The global inter-channel phase difference calculator is a device capable of calculating, for each time period, the modulus of the difference between the inter-channel phase difference of the previous time period and the global inter-channel phase difference of the current time period. The global inter-channel phase difference calculator may include or may be a processor.
[0039] In this particular case, using the global inter-channel phase difference of the current time period as the inter-channel phase difference of the current time period further reduces the fluctuation of the inter-channel phase difference.
[0040] According to some embodiments of the present invention, the inter-channel phase difference calculator is configured to, if the average band-by-band inter-channel phase difference change is equal to or greater than a preset value and if the modulus of the difference between the inter-channel phase difference of the previous time period and the global inter-channel phase difference of the current time period is greater than the average band-by-band inter-channel phase difference change, use the following as the inter-channel phase difference for the current time period:
[0041] If the global inter-channel phase difference of the current time period is greater than the inter-channel phase difference of the previous time period, the sum of the inter-channel phase difference of the previous time period and the average per-band inter-channel phase difference change is used, or
[0042] If the global inter-channel phase difference in the current time period is less than the inter-channel phase difference in the previous time period, the difference between the inter-channel phase difference in the previous time period and the average per-band inter-channel phase difference change is used.
[0043] In this particular case, the sum or difference between the inter-channel phase difference of the previous time period and the average band-by-band inter-channel phase difference variation is used as the inter-channel phase difference of the current time period to further reduce the fluctuation of the inter-channel phase difference.
[0044] According to some embodiments of the present invention, the inter-channel phase difference calculator means comprises a band-by-band average inter-channel phase difference calculator configured to calculate, for each of a plurality of consecutive time periods, a band-by-band average inter-channel phase difference based on a plurality of previous band-by-band inter-channel phase differences for the corresponding sub-band, for each of the subset of sub-bands;
[0045] The band-by-band channel phase difference change calculator is configured to: for each time period in a plurality of consecutive time periods, for each of the subset of subbands, calculate the band-by-band channel phase difference change based on the band-by-band channel phase difference of the current time period and based on the band-by-band average channel phase difference of the corresponding subband.
[0046] The band-by-band average inter-channel phase difference calculator is capable of calculating, for each of a plurality of sub-bands, a band-by-band average inter-channel phase difference based on a plurality of previous band-by-band inter-channel phase differences of the corresponding sub-band for each of a plurality of consecutive time periods. The band-by-band average inter-channel phase difference calculator may include or may be a processor.
[0047] The calculation of the band-by-band inter-channel phase difference variation detailed here further reduces the fluctuation of the inter-channel phase difference.
[0048] According to some embodiments of the present invention, the inter-channel phase difference calculator is configured in the following manner: the preset value is equal to or greater than 0.2, and the preset value is equal to or less than 0.4. This feature further reduces fluctuations in the inter-channel phase difference.
[0049] In a second aspect, the present invention provides a method for operating an encoder for generating an audio bitstream from a stereo audio signal, wherein the method comprises the following steps:
[0050] using a downmixer of the encoder for downmixing the stereo audio signal to produce a mono audio signal;
[0051] using an inter-channel phase difference calculator means of the encoder for calculating an inter-channel phase difference for each of a plurality of consecutive time segments of the stereo audio signal;
[0052] A bitstream generator using an encoder is configured to generate an audio bitstream in the following manner: embedding a mono audio signal and a plurality of consecutive time segments of inter-channel phase differences into the audio bitstream;
[0053] using a global inter-channel phase difference calculator of the inter-channel phase difference calculator device for calculating a global inter-channel phase difference based on a frequency band of the stereo audio signal for each of a plurality of consecutive time periods, wherein the frequency band includes a plurality of sub-bands;
[0054] using a band-by-band inter-channel phase difference calculator of the inter-channel phase difference calculator means for calculating, for each of the subset of sub-bands, a band-by-band inter-channel phase difference for each of the plurality of consecutive time periods;
[0055] using a band-by-band inter-channel phase difference variation calculator of the inter-channel phase difference calculator device for calculating, for each of the subset of subbands, for each of the plurality of consecutive time periods, a band-by-band inter-channel phase difference variation based on the band-by-band inter-channel phase difference of a current time period in the plurality of consecutive time periods for the corresponding subband and the inter-channel phase difference of at least one previous time period in the plurality of consecutive time periods;
[0056] using an average band-by-band inter-channel phase difference variation calculator of the inter-channel phase difference calculator device for calculating, for each of the plurality of consecutive time periods, an average band-by-band inter-channel phase difference variation based on the band-by-band inter-channel phase difference variation for each of the subset of sub-bands;
[0057] The inter-channel phase difference calculator of the inter-channel phase difference calculator device is used to calculate the inter-channel phase difference according to the global inter-channel phase difference of the current time period and according to the average band-by-band inter-channel phase difference change of the current time period.
[0058] In a third aspect, the present invention provides a computer program for performing the method according to the present invention when run on a processor.
[0059] Preferred embodiments of the present invention are discussed below with reference to the accompanying drawings, in which:
[0060] Figure 1 An embodiment of an encoder for generating an audio bitstream from a stereo audio signal according to the present invention is schematically illustrated;
[0061] Figure 2 A schematic diagram illustrates an embodiment of an inter-channel phase difference calculator device according to the present invention, wherein the inter-channel phase difference calculator device is configured to calculate an inter-channel phase difference for each of a plurality of consecutive time segments of a stereo audio signal;
[0062] Figure 3 an exemplary graph showing a global inter-channel phase difference over time, the global inter-channel phase difference originating from a frequency band of a stereo audio signal;
[0063] Figure 4 an illustrative graph showing band-by-band inter-channel phase differences over time, each of the band-by-band inter-channel phase differences originating from one of the sub-bands of a frequency band of an audio signal;
[0064] Figure 5an illustrative graph showing inter-channel phase difference over time, wherein the value of the inter-channel phase difference for a current time period is derived from the global inter-channel phase difference for the current time period, the global inter-channel phase difference for a previous time period, and the average band-by-band inter-channel phase difference change for a subset of frequency bands for the current time period; and
[0065] Figure 6 Results of listening tests are plotted, showing the perceptual quality of the playback of a stereo audio signal encoded with a prior art encoder and the perceptual quality of the playback of a stereo audio signal encoded with an encoder according to the invention.
[0066] Identical or equivalent components or components having identical or equivalent functionality are indicated by identical or equivalent component symbols in the following description.
[0067] In the following description, a number of details are set forth to provide a more thorough explanation of the embodiments of the present invention. However, it should be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other cases, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention. In addition, unless otherwise specifically indicated, the features of the different embodiments described below may be combined with each other.
[0068] Figure 1 A schematic diagram illustrates an embodiment of an encoder 1 for generating an audio bitstream BS from a stereo audio signal SAS according to the present invention. The encoder 1 comprises:
[0069] a downmixer 2 configured to downmix the stereo audio signal SAS to generate a mono audio signal MAS;
[0070] an inter-channel phase difference calculator means 3 configured to calculate an inter-channel phase difference ICPD for each of a plurality of consecutive time periods of the stereo audio signal SAS; and
[0071] The bitstream generator 4 is configured to generate an audio bitstream BS in the following manner: embedding a mono audio signal MAS and an inter-channel phase difference ICPD of a plurality of consecutive time periods into the audio bitstream;
[0072] wherein the inter-channel phase difference calculator means 3 comprises a global inter-channel phase difference calculator 5 configured to calculate a global inter-channel phase difference GICPD based on a frequency band of the stereo audio signal SAS for each of a plurality of consecutive time periods;
[0073] wherein the frequency band comprises a plurality of sub-bands, wherein the inter-channel phase difference calculator means 3 comprises a band-by-band inter-channel phase difference calculator 6 configured to calculate, for each of the subset of sub-bands, a band-by-band inter-channel phase difference BICPD for each of the plurality of consecutive time periods;
[0074] The inter-channel phase difference calculator device 3 comprises a band-by-band inter-channel phase difference variation calculator 7, which is configured to calculate, for each time period in the plurality of consecutive time periods and for each of the subset of sub-bands, a band-by-band inter-channel phase difference variation BICPDC based on the band-by-band inter-channel phase difference BICPD of a current time period in the plurality of consecutive time periods of the corresponding sub-band and the band-by-band inter-channel phase difference BICPD of at least one previous time period in the plurality of consecutive time periods;
[0075] wherein the inter-channel phase difference calculator means 3 comprises an average band-by-band inter-channel phase difference variation calculator 8, the average band-by-band inter-channel phase difference variation calculator 8 being configured to calculate, for each time period in a plurality of consecutive time periods, an average band-by-band inter-channel phase difference variation MBICPDC based on the band-by-band inter-channel phase difference variation BICPDC for each of the subset of sub-bands;
[0076] The inter-channel phase difference calculator device 3 includes an inter-channel phase difference calculator 9, which is configured to calculate the inter-channel phase difference ICPD of the current time period based on the global inter-channel phase difference GICPD of the current time period and the average band-by-band inter-channel phase difference change MBICPDC of the current time period.
[0077] According to some embodiments of the present invention, the inter-channel phase difference calculator 9 is configured in the following manner: the inter-channel phase difference ICPD is an element of a closed interval, which is constrained by the global inter-channel phase difference GICPD of the current time period and the inter-channel phase difference ICPD of the previous time period.
[0078] In another aspect, the invention provides a method for operating an encoder 1 for generating an audio bitstream BS from a stereo audio signal SAS, wherein the method comprises the following steps:
[0079] using the downmixer 2 of the encoder 1 for downmixing the stereo audio signal SAS to generate a mono audio signal MAS;
[0080] using the inter-channel phase difference calculator means 3 of the encoder 1 for calculating the inter-channel phase difference ICPD for each of a plurality of consecutive time segments of the stereo audio signal SAS;
[0081] The bit stream generator 4 of the encoder 1 generates an audio bit stream BS in the following manner: a mono audio signal MAS and an inter-channel phase difference ICPD of a plurality of consecutive time periods are embedded into the audio bit stream BS;
[0082] using a global inter-channel phase difference calculator 5 of the inter-channel phase difference calculator means 3 for calculating, for each of a plurality of consecutive time periods, a global inter-channel phase difference GICPD based on a frequency band of the stereo audio signal SAS, wherein the frequency band comprises a plurality of sub-bands;
[0083] using a band-by-band inter-channel phase difference calculator 6 of the inter-channel phase difference calculator means 3 for calculating, for each of the subset of sub-bands, a band-by-band inter-channel phase difference BICPD for each of a plurality of consecutive time periods;
[0084] using a band-by-band inter-channel phase difference change calculator 7 of the inter-channel phase difference calculator device 3 for calculating, for each of the subset of sub-bands, for each of the plurality of consecutive time periods, a band-by-band inter-channel phase difference change BICPDC based on a band-by-band inter-channel phase difference BICPD of a current time period in the plurality of consecutive time periods for the corresponding sub-band and a band-by-band inter-channel phase difference BICPD of at least one previous time period in the plurality of consecutive time periods;
[0085] using an average band-by-band inter-channel phase difference variation calculator 8 of the inter-channel phase difference calculator means 3 for calculating, for each of a plurality of consecutive time periods, an average band-by-band inter-channel phase difference variation MBICPDC based on the band-by-band inter-channel phase difference variation BICPDC for each of the subset of sub-bands;
[0086] The inter-channel phase difference calculator 9 of the inter-channel phase difference calculator device 3 is used to calculate the inter-channel phase difference ICPD of the current time period according to the global inter-channel phase difference GICPD of the current time period and the average band-by-band inter-channel phase difference change MBICPDC of the current time period.
[0087] In another aspect, the invention provides a computer program for performing the method according to the invention when run on a processor.
[0088] Figure 2 An embodiment of an inter-channel phase difference calculator device 3 according to the present invention is schematically illustrated. The inter-channel phase difference calculator device 3 is configured to calculate an inter-channel phase difference ICPD for each of a plurality of consecutive time segments of a stereo audio signal SAS.
[0089] According to some embodiments of the present invention, the inter-channel phase difference calculator 9 is configured to use the inter-channel phase difference ICPD of the previous time period as the inter-channel phase difference ICPD of the current time period when the average band-by-band inter-channel phase difference variation MICPDC is less than a preset value.
[0090] According to some embodiments of the present invention, the inter-channel phase difference calculator 9 includes a global inter-channel phase difference difference calculator 10, which is configured to calculate, for each time period, a modulus MOD of the difference between the inter-channel phase difference ICPD of the previous time period and the global inter-channel phase difference GICPD of the current time period;
[0091] The inter-channel phase difference calculator 9 is configured to use the global inter-channel phase difference GICPD of the current time period as the inter-channel phase difference ICPD of the current time period when the average band-by-band inter-channel phase difference change MICPDC is equal to or greater than a preset value and when the modulus MOD of the difference between the inter-channel phase difference ICPD of the previous time period and the global inter-channel phase difference GICPD of the current time period is equal to or less than the average band-by-band inter-channel phase difference change MICPDC.
[0092] According to some embodiments of the present invention, the inter-channel phase difference calculator 9 is configured to: when the average band-by-band inter-channel phase difference variation MICPDC is equal to or greater than a preset value and when the modulus of the difference between the inter-channel phase difference ICPD of the previous time period and the global inter-channel phase difference GICPD of the current time period is greater than the average band-by-band inter-channel phase difference variation MICPDC, use the following as the inter-channel phase difference ICPD of the current time period:
[0093] If the global inter-channel phase difference GICPD of the current time period is greater than the inter-channel phase difference ICPD of the previous time period, the sum of the inter-channel phase difference ICPD of the previous time period and the average band-by-band inter-channel phase difference change MICPDC is used, or
[0094] If the global inter-channel phase difference GICPD of the current time period is smaller than the inter-channel phase difference ICPD of the previous time period, the difference between the inter-channel phase difference ICPD of the previous time period and the average band-by-band inter-channel phase difference change MICPDC is used.
[0095] According to some embodiments of the present invention, wherein the inter-channel phase difference calculator means 3 comprises a band-by-band average inter-channel phase difference calculator 11, the band-by-band average inter-channel phase difference calculator 11 being configured to calculate, for each of the subset of sub-bands, a band-by-band average inter-channel phase difference BMICPD based on a plurality of band-by-band inter-channel phase differences BICPD of previous time periods in the time periods of the corresponding sub-band;
[0096] The band-by-band inter-channel phase difference change calculator 7 is configured to calculate, for each time period in a plurality of consecutive time periods, for each of the subset of subbands, based on the band-by-band inter-channel phase difference BICPD of the current time period and based on the band-by-band average inter-channel phase difference BMICPD of the corresponding subband, a band-by-band inter-channel phase difference change BICPDC.
[0097] According to some embodiments of the present invention, the inter-channel phase difference calculator 9 is configured in the following manner: the preset value is equal to or greater than 0.2, and the preset value is equal to or less than 0.4.
[0098] The present invention can be used in different coding schemes. In particular, the present invention can be used in the upcoming audio codec Immersive Voice and Audio Service (IVAS), which includes, among other input and output configurations, a parametric stereo encoder as described in
[11] . At the encoder 1, this parametric encoder performs downmixing of a given input stereo audio signal SAS to a single mono audio signal MAS and extraction of stereo parameters, both of which are transmitted in the bitstream. At the decoder, the mono audio signal MAS is then upmixed back to stereo using the stereo parameters.
[0099] For each time segment (frame), these parameters may include per-band information related to channel shifting via inter-channel loudness differences and decorrelation via inter-channel coherence, as well as individual inter-channel time differences and individual inter-channel phase differences (ICPDs). In this embodiment, a newly designed method for stabilizing individual inter-channel phase differences (ICPDs) is explained in detail.
[0100] The global inter-channel phase difference GICPD can be calculated at the global inter-channel phase difference calculator 5 of the encoder 1 via the following formula over a large frequency band (e.g., a large DFT frequency bin range starting from the first complex frequency bin (excluding the DC component) up to a certain maximum frequency bin):
[0101]
[0102] in
[0103]
[0104] and
[0105]
[0106] wherein gIPD denotes a global inter-channel phase difference GICPD, and wherein L denotes a left channel of the stereo audio signal SAS, and R denotes a right channel of the stereo audio signal SAS.
[0107] In the prior art, this global inter-channel phase difference GICPD is simply quantized and transmitted directly in the audio bitstream BS as the inter-channel phase difference ICPD of the current time frame without further processing.
[0108] For a new stabilization of the inter-channel phase differences ICPD, the estimation of the band-by-band inter-channel phase differences BICPD of the sub-bands within the frequency band calculated by the band-by-band inter-channel phase difference calculator 6 is also considered. This can be expressed as IPD b and for each subband b that can be represented by one of the frequency bins is calculated as
[0109]
[0110] in
[0111]
[0112] and
[0113]
[0114] In addition, in each sub-band, the band-by-band average inter-channel phase difference BMICPD over the previous time period (for example, five time periods in the embodiment) can be calculated by the band-by-band average inter-channel phase difference calculator 11. Since the distance between the phases is ambiguous (there are two possible directions on the circle), it is not always possible to calculate a meaningful band-by-band average inter-channel phase difference BMICPD by standard averaging (only when all phases are within the same semicircle). Instead, the band-by-band average inter-channel phase difference BMICPD (expressed as IPD) of the sub-band is mean,b ) can be initialized with 0 and then iteratively updated using:
[0115]
[0116] Where i = 0, ..., 4 is the index of the previous inter-channel phase difference value of the band. After each iteration, the current result and IPD are calculated. b_prev The distance IPD to the next value in the buffer diff :
[0117] IPD diff =|IPD mean,b -IPD prev,b [i+1]|.
[0118] If IPD diff is greater than π (i.e., more than a semicircle rotation in a given direction), then the IPD mean,b It needs to be temporarily shifted out of the range [-π,π] by adding or subtracting 2π depending on which side of the circle it is on:
[0119] IPD mean,b =IPD mean,b +2π, if IPD mean,b <0
[0120] or
[0121] IPD mean,b =IPD mean,b -2π, if IPD mean,b >0.
[0122] The band-by-band mean inter-channel phase difference BMICPD is then updated with this shifted version, which is now aligned with the IPD prev,b The distance to the next value in is less than π. If after the update, IPD mean,b If π is still outside [-π,π], the shift is reversed before the next iteration.
[0123] Now, the band-by-band inter-channel phase difference change calculator 7 calculates the current band-by-band inter-channel phase difference BICPD (IPD) for each sub-band using the following formula: b ) and the band-by-band average inter-channel phase difference BMICPD(IPD mean,b ) between the channel-by-channel phase difference variation BICPDC (expressed as IPD change,b ):
[0124] IPD change,b =|IPD b -IPD mean,b |
[0125] in
[0126] IPD change,b =2π-IPD change,b , if IPD change,b >π.
[0127] The average band-by-band inter-channel phase difference variation calculator 8 calculates the average band-by-band inter-channel phase difference variation MBICPD (expressed as IPD) on all sub-bands from the individual band-by-band inter-channel phase difference variation BICPDC in each sub-band. change ):
[0128]
[0129] This average band-by-band interchannel phase difference variation MBICPD is considered as an overall indication of the stability of the band-by-band interchannel phase difference BICPD in the current time period and is now used to force the interchannel phase difference ICPD to a similar level of stability.
[0130] For a minimum value of the average band-by-band inter-channel phase difference variation MBICPD (less than 0.3 in the embodiment), the inter-channel phase difference ICPD of the previous time period is used as the inter-channel phase difference ICPD and embedded into the audio bitstream BS of the current time period:
[0131] IPD=IPD prev , if IPD change <0.3,
[0132] Where IPD is the inter-channel phase difference ICPD in the current time period, and IPD prev is the inter-channel phase difference ICPD of the current time period, and is the inter-channel phase difference ICPD of the previous time period.
[0133] For a larger value of the average band-by-band inter-channel phase difference variation MBICPD, the global inter-channel phase difference difference calculator 10 can calculate the modulus MOD (expressed as gIPD) of the difference between the inter-channel phase difference ICPD of the previous time period and the global inter-channel phase difference GICPD of the current time period. diff ):
[0134] gIPD diff =|gIPD-IPD prev |
[0135] in
[0136] gIPD diff =2π-gIPD diff If gIPD diff >π.
[0137] like
[0138] gIPD diff >IPD change ,
[0139] This means that the modulus MOD of the difference between the inter-channel phase difference ICPD of the previous time period and the global inter-channel phase difference GICPD of the current time period is greater than the average band-by-band inter-channel phase difference variation MBICPD, and the maximum allowed variation of the inter-channel phase difference ICPD of the previous time period is limited to the average band-by-band inter-channel phase difference variation MBICPD, so that the inter-channel phase difference ICPD is calculated as:
[0140] IPD=IPD prev +IPD change , if gIPD>IPD prev
[0141] or
[0142] IPD=gIPD prev -IPDchange If gIPD <IPD prev .
[0143] However, if
[0144] gIPD diff ≤IPD change ,
[0145] This means that the modulus MOD of the difference between the inter-channel phase difference ICPD of the previous time period and the global inter-channel phase difference GICPD of the current time period is equal to or less than the average band-by-band inter-channel phase difference variation MBICPD, and the global inter-channel phase difference GICPD of the current time period is used as the inter-channel phase difference ICPD of the current time frame, so that the inter-channel phase difference ICPD can be calculated as:
[0146] IPD=gIPD.
[0147] The stable inter-channel phase difference ICPD described above can now be quantized and transmitted as an auxiliary parameter in the audio bitstream BS.
[0148] Figure 3 An exemplary graph shows the evolution of a global inter-channel phase difference GICPD over time, originating from the entire frequency band, or at least a wide frequency band, of a stereo audio signal SAS. The graph shows the value of the global inter-channel phase difference GICPD estimated over a large frequency band. Clearly, this global inter-channel phase difference GICPD is far from stable, fluctuating wildly between 0.3 and -π. Therefore, simply using this global inter-channel phase difference GICPD as the inter-channel phase difference ICPD to be embedded in the audio bitstream BS without further processing will result in poor playback quality of the reconstructed stereo audio signal at the decoder.
[0149] Figure 4 An exemplary graph showing a band-by-band inter-channel phase difference BICPD over time, each of which is derived from Figure 3 Here it can be seen that the band-by-band interchannel phase difference BICPD varies between the subbands, but is generally much more stable over time than the global interchannel phase difference GICPD of the entire frequency band.
[0150] Figure 5 An exemplary curve of the inter-channel phase difference ICPD over time is shown, wherein the value of the inter-channel phase difference ICPD of the current time period is derived from the global inter-channel phase difference GICPD of the current time period and the average band-by-band inter-channel phase difference variation MBICPDC of the subset of frequency bands of the current time period. Due to the stability of the band-by-band inter-channel phase difference BICPD, compared with Figure 3The global inter-channel phase difference GICPD shown in now also forces the inter-channel phase difference ICPD to remain stable.
[0151] Figure 6 Results of listening tests showing the perceptual quality of playback of a stereo audio signal encoded with a prior art encoder and the perceptual quality of playback of a stereo audio signal encoded with an encoder according to the present invention are plotted.
[0152] The listening test was conducted as the MUSHRA listening test, using the IVAS stereo codec at 24.4 kbps for binaural clear speech input. MUSHRA stands for Multiple Stimuli with Hidden Reference and Anchor and is a method for conducting codec listening tests to assess the perceptual quality of the output from lossy audio compression algorithms. It is defined in ITU-R Recommendation BS.1534-3.
[0153] Seven expert listeners have evaluated the audio playback quality from an audio bitstream that has been encoded using unstable wideband inter-channel phase differences according to the prior art and from an audio bitstream that has been encoded using stable inter-channel phase differences according to the present invention.
[0154] The results show that the stabilized version has a clear improvement compared to the version without any inter-channel phase difference stabilization.
[0155] Depending on certain implementation requirements, embodiments of the apparatus and system of the present invention may be implemented in hardware and / or software. Implementation may be performed using a digital storage medium, such as a floppy disk, DVD, Blu-ray disc, CD, ROM, PROM, EPROM, EEPROM, or flash memory, on which electronically readable control signals are stored, which cooperate (or are capable of cooperating) with a programmable computer system to perform one or more or all of the functions of the apparatus or system of the present invention.
[0156] In some embodiments, a programmable logic device (e.g., a field programmable gate array) may be used to perform one or more or all of the functions of the apparatus and systems described herein. In some embodiments, the field programmable gate array may cooperate with a microprocessor to perform one or more or all of the functions of the apparatus and systems described herein.
[0157] Although some aspects have been described in the context of an apparatus, it is clear that these aspects also represent a description of a corresponding method, where a block or device corresponds to a method step or a feature of a method step. Similarly, aspects described in the context of a method step also represent a description of a corresponding block or item or a feature of a corresponding apparatus.
[0158] Depending on certain implementation requirements, an apparatus comprising hardware and / or software may be used to implement embodiments of the method of the present invention. Implementation may be performed using a digital storage medium, such as a floppy disk, DVD, Blu-ray disc, CD, ROM, PROM, EPROM, EEPROM, or flash memory, on which electronically readable control signals are stored, which cooperate (or are capable of cooperating) with a programmable computer system in order to perform the corresponding method.
[0159] Depending on certain implementation requirements, embodiments of the method according to the invention may be implemented using a device comprising hardware and / or software.
[0160] Some or all of the method steps may be performed by (or using) a hardware device, such as a microprocessor, a programmable computer or an electronic circuit. One or more of the most important method steps may be performed by this device.
[0161] Some embodiments according to the invention comprise a data carrier having electronically readable control signals, which are capable of cooperating with a programmable computer system, such that one of the methods described herein is performed.
[0162] Generally speaking, embodiments of the present invention can be implemented as a computer program product with a program code, when the computer program product runs on a computer, the program code is operative for performing one of the methods. For example, the program code can be stored on a machine-readable carrier.
[0163] Other embodiments comprise the computer program for performing one of the methods described herein, stored on a machine readable carrier or a non-transitory storage medium.
[0164] A further embodiment comprises processing means, for example a computer or a programmable logic device, in particular comprising a hardware processor, configured or adapted to perform one of the methods described herein.
[0165] A further embodiment comprises a computer having installed thereon the computer program for performing one of the methods described herein.
[0166] In general, the methods are advantageously performed by any apparatus comprising hardware and or software.
[0167] Although the present invention has been described with respect to several embodiments, there are modifications, permutations, and equivalents that fall within the scope of the present invention. It should also be noted that there are many alternative ways of implementing the methods and compositions of the present invention. Therefore, it is intended that the following claims be interpreted as including all modifications, permutations, and equivalents that fall within the true spirit and scope of the present invention.
[0168] Reference numerals
[0169] 1 Encoder
[0170] 2 Downmixer
[0171] 3-channel phase difference calculator device
[0172] 4-bit stream generator
[0173] 5 Global Channel Phase Difference Calculator
[0174] 6-band channel-to-channel phase difference calculator
[0175] 7 Band-by-band channel phase difference variation calculator
[0176] 8-channel average phase difference variation calculator
[0177] 9-channel phase difference calculator
[0178] 10 Global Channel Phase Difference Calculator
[0179] 11 Band-by-band average channel phase difference calculator
[0180] BS audio bitstream
[0181] SAS stereo audio signal
[0182] MAS mono audio signal
[0183] ICPD Inter-channel Phase Difference
[0184] GICPD Global Inter-Channel Phase Difference
[0185] BICPD Band-by-band inter-channel phase difference
[0186] BICPDC Band-by-band inter-channel phase difference variation
[0187] MBICPDC average channel-to-channel phase difference variation
[0188] MOD The modulus of the difference between the inter-channel phase difference of the previous time period and the global inter-channel phase difference of the current time period.
[0189] BMICPD Band-by-band mean inter-channel phase difference
[0190] References:
[0191] [1]F.Baumgarte and C.Faller,"Binaural Cue Coding-Part I:Psycho-acoustic fundamentals and design principles,"IEEE Trans.on Speech and AudioProc.,,vol.11,no.6,pp.pp.509-519,2003.
[0192] [2]F.Baumgarte and C.Faller,"Binaural Cue Coding-Part II:Schemes andapplications,"IEEE Trans.on Speech and Audio Proc.,vol.11,no.6,pp.pp.520-531,2003.
[0193] [3]E.Schuijers,W.Oomen,B.Brinker and J.Breebaart,"Advances inParametric Coding for High-Quality Audio,"in Preprint 5852,114th AESconvention,Amsterdam,2003.
[0194] [4]J.Breebaart,S.v.d.Par,A.Kohlrausch and E.Schuijers,"ParametricCoding of Stereo Audio,"EURASIP Journal on Applied Signal Processing,pp.1305-1322,September 2005.
[0195] [5]J.Blauert,Spatial Hearing:The Psychoacoustics of Human SoundLocalization,Cambridge,USA:MIT Press,1997.
[0196] [6]T.Hoang,S.Ragot,B.Kovesi and P.Scalart,"Parametric stereoextension of ITU-T G.722based on a new downmixing scheme,"in Proc.IEEE MMSP,St Malo,France,2010.
[0197] [7]C.Tournery and C.Faller,"Improved time delay analysis / synthesisfor parametric stereo audio coding,"in Preprint 120th Conv.Aud.Eng.Soc.,2006.
[0198] [8]W.Wu,L.Miao,Y.Lang and D.Virette,"Parametric stereo coding schemewith a new downmix method and whole band inter channel time / phasedifferences,"in IEEE International Conference on Acoustics,Speech and SignalProcessing,Vancouver,BC,Canada,2013.
[0199] [9]M.Neusinger,J.Hilpert,B.Grill,J.Robilliard and M.Luis Valero,"Efficient Use Of Phase Information In Audio Encoding And Decoding".WO PatentWO10003575,30 06 2009.
[0200]
[10] S.Bayer,E.Fotopoulou,M.Multrus,G.Fuchs,E.Ravelli,M.Schnell,S. W.Jaegers,M.Dietz and G.Markovic,"Apparatus and method for encoding ordecoding a multi-channel signal using a broadband alignment parameter and aplurality of narrowband alignment parameters".WO Patent WO2017125558A1,27072017.
[0201]
[11] S.Bayer,M.Dietz,S. E.Fotopoulou,G.Fuchs,W.Jaegers,G.Markovic,M.Multrus,E.Ravelli and M.Schnell,"APPARATUS AND METHOD FOR ESTIMATING ANINTER-CHANNEL TIME DIFFERENCE".Patent WO17125563,27 07 2017.
Claims
1. An encoder for generating an audio bitstream (BS) from a stereo audio signal (SAS), wherein the encoder (1) comprises: a downmixer (2) configured to downmix the stereo audio signal (SAS) to generate a mono audio signal (MAS); inter-channel phase difference calculator means (3) configured to calculate an inter-channel phase difference (ICPD) for each of a plurality of consecutive time periods of the stereo audio signal (SAS); and A bitstream generator (4) is configured to generate the audio bitstream (BS) in the following manner: embedding the mono audio signal (MAS) and the inter-channel phase differences (ICPD) of the plurality of consecutive time segments into the audio bitstream; wherein the inter-channel phase difference calculator means (3) comprises a global inter-channel phase difference calculator (5), the global inter-channel phase difference calculator (5) being configured to calculate a global inter-channel phase difference (GICPD) based on a frequency band of the stereo audio signal (SAS) for each of the plurality of consecutive time periods; wherein the frequency band comprises a plurality of sub-bands, wherein the inter-channel phase difference calculator means (3) comprises a band-by-band inter-channel phase difference calculator (6), the band-by-band inter-channel phase difference calculator (6) being configured to calculate, for each of the subset of the sub-bands, a band-by-band inter-channel phase difference (BICPD); wherein the inter-channel phase difference calculator means (3) comprises a band-by-band inter-channel phase difference variation calculator (7), the band-by-band inter-channel phase difference variation calculator (7) being configured to calculate, for each of the plurality of consecutive time periods, for each of the subset of sub-bands, a band-by-band inter-channel phase difference variation (BICPDC) based on the band-by-band inter-channel phase difference (BICPD) of a current time period in the plurality of consecutive time periods of the corresponding sub-band and the band-by-band inter-channel phase difference (BICPD) of at least one previous time period in the plurality of consecutive time periods; wherein the inter-channel phase difference calculator means (3) comprises an average band-by-band inter-channel phase difference variation calculator (8), the average band-by-band inter-channel phase difference variation calculator (8) being configured to calculate, for each of the plurality of consecutive time periods, an average band-by-band inter-channel phase difference variation (MBICPDC) based on the band-by-band inter-channel phase difference variation (BICPDC) for each of the subset of sub-bands; The inter-channel phase difference calculator device (3) includes an inter-channel phase difference calculator (9), and the inter-channel phase difference calculator (9) is configured to calculate the inter-channel phase difference (ICPD) of the current time period based on the global inter-channel phase difference (GICPD) of the current time period and based on the average band-by-band inter-channel phase difference variation (MBICPDC) of the current time period.
2. An encoder as claimed in the preceding claim, wherein the inter-channel phase difference calculator (9) is configured in such a way that the inter-channel phase difference (ICPD) is an element of a closed interval, which is constrained by the global inter-channel phase difference (GICPD) of the current time period and the inter-channel phase difference (ICPD) of the previous time period.
3. An encoder as claimed in any one of the preceding claims, wherein the inter-channel phase difference calculator (9) is configured to use the inter-channel phase difference (ICPD) of the previous time period as the inter-channel phase difference (ICPD) of the current time period when the average band-by-band inter-channel phase difference variation (MICPDC) is less than a preset value.
4. The encoder according to claim 1 , wherein the inter-channel phase difference calculator (9) comprises a global inter-channel phase difference difference calculator (10), the global inter-channel phase difference difference calculator (10) being configured to calculate, for each of the time periods, a modulus (MOD) of a difference between the inter-channel phase difference (ICPD) of the previous time period and the global inter-channel phase difference (GICPD) of the current time period; The inter-channel phase difference calculator (9) is configured to use the global inter-channel phase difference (GICPD) of the current time period as the inter-channel phase difference (ICPD) of the current time period when the average band-by-band inter-channel phase difference variation (MICPDC) is equal to or greater than the preset value and when the modulus (MOD) of the difference between the inter-channel phase difference of the previous time period and the global inter-channel phase difference of the current time period is equal to or less than the average band-by-band inter-channel phase difference variation (MICPDC).
5. The encoder according to claim 1 , wherein the inter-channel phase difference calculator ( 9 ) is configured to, if the average band-by-band inter-channel phase difference variation (MICPDC) is equal to or greater than the preset value, and if the modulus of the difference between the inter-channel phase difference (ICPD) of the previous time period and the global inter-channel phase difference (GICPD) of the current time period is greater than the average band-by-band inter-channel phase difference variation (MICPDC), use as the inter-channel phase difference (ICPD) of the current time period: If the global inter-channel phase difference (GICPD) of the current time period is greater than the inter-channel phase difference (ICPD) of the previous time period, the sum of the inter-channel phase difference (ICPD) of the previous time period and the mean band-by-band inter-channel phase difference change (MICPDC) is used, or If the global inter-channel phase difference (GICPD) of the current time period is less than the inter-channel phase difference (ICPD) of the previous time period, the difference between the inter-channel phase difference (ICPD) of the previous time period and the mean band-by-band inter-channel phase difference variation (MICPDC) is used.
6. Encoder according to one of the preceding claims, wherein the inter-channel phase difference calculator means (3) comprises a band-by-band average inter-channel phase difference calculator (11) configured to calculate, for each of the subset of sub-bands, for each of the plurality of consecutive time periods, a band-by-band average inter-channel phase difference (BMICPD) based on a plurality of the band-by-band inter-channel phase differences (BICPD) of preceding time periods in the time period of the corresponding sub-band; The band-by-band inter-channel phase difference variation calculator (7) is configured to calculate, for each of the plurality of consecutive time periods, a band-by-band inter-channel phase difference variation (BICPDC) based on the band-by-band inter-channel phase difference (BICPD) of the current time period and based on the band-by-band mean inter-channel phase difference (BMICPD) of the corresponding sub-band for each of the subset of sub-bands.
7. The encoder according to one of claims 3 to 6, wherein the inter-channel phase difference calculator (9) is configured in such a way that the preset value is equal to or greater than 0.2, and the preset value is equal to or less than 0.
4.
8. A method for operating an encoder (1) for generating an audio bitstream (BS) from a stereo audio signal (SAS), wherein the method comprises the following steps: using a downmixer (2) of the encoder (1) for downmixing the stereo audio signal (SAS) to generate a mono audio signal (MAS); using an inter-channel phase difference calculator means (3) of the encoder (1) for calculating an inter-channel phase difference (ICPD) for each of a plurality of consecutive time segments of the stereo audio signal (SAS); The bitstream generator (4) of the encoder (1) generates the audio bitstream (BS) in the following manner: embedding the mono audio signal (MAS) and the inter-channel phase differences (ICPD) of the plurality of consecutive time segments into the audio bitstream (BS); using a global inter-channel phase difference calculator (5) of the inter-channel phase difference calculator means (3) for calculating a global inter-channel phase difference (GICPD) based on a frequency band of the stereo audio signal (SAS), for each of the plurality of consecutive time periods, wherein the frequency band comprises a plurality of sub-bands; using a band-by-band inter-channel phase difference calculator (6) of the inter-channel phase difference calculator means (3) for calculating, for each of the plurality of consecutive time periods, a band-by-band inter-channel phase difference (BICPD) for each of the subset of sub-bands; using a band-by-band inter-channel phase difference variation calculator (7) of the inter-channel phase difference calculator means (3) for calculating, for each of the subset of sub-bands, for each of the plurality of consecutive time periods, a band-by-band inter-channel phase difference variation (BICPDC) based on the band-by-band inter-channel phase difference (BICPD) of a current time period in the plurality of consecutive time periods for the corresponding sub-band and the band-by-band inter-channel phase difference (BICPD) of at least one previous time period in the plurality of consecutive time periods; using a mean band-by-band inter-channel phase difference variation calculator (8) of the inter-channel phase difference calculator means (3) for calculating, for each of the plurality of consecutive time periods, a mean band-by-band inter-channel phase difference variation (MBICPDC) based on the band-by-band inter-channel phase difference variation (BICPDC) for each of the subset of sub-bands; An inter-channel phase difference calculator (9) of the inter-channel phase difference calculator device (3) is used to calculate the inter-channel phase difference (ICPD) of the current time period based on the global inter-channel phase difference (GICPD) of the current time period and based on the mean band-by-band inter-channel phase difference variation (MBICPDC) of the current time period.
9. A computer program for performing the method as claimed in the preceding claim when run on a processor.