EFFICIENT SPECTRAL ENVELOPE CODING USING VARIABLE TIME/FREQUENCY RESOLUTION AND TIME/FREQUENCY SWITCHING

Abstract: The present invention provides a new method and an apparatus for spectral envelope encoding. The invention teaches how to perform and signal compactly a time/frequency mapping of the envelope representation, and further, encode the spectral envelope data efficiently using adaptive time/frequency directional coding. The method is applicable to both natural audio coding and speech coding systems and is especially suited for coders using SBR [WO 98/57436] or other high frequency reconstruction methods.

Description: EFFICIENT SPECTRAL ENVELOPE CODING USING VARIABLE TIME/FREQUENCY RESOLUTION AND TIME/FREQUENCY SWITCHING TECHNICAL FIELD The present invention relates to a new method and apparatus for efficient coding of spectral envelopes m audio coding systems. The method may be used both for natural audio coding and speech coding and is especially suited for coders using SBR [WO 98/57436] or other high frequency reconstruction methods. BACKGROUND OF THE INVENTION Audio source coding techniques can be divided into two classes: natural audio coding and speech coding. Natural audio coding is commonly used for music or arbitrary signals at medium bitrates, and generally offers wide audio bandwidth. Speech coders are basically limited to speech reproduction but can on the other hand be used at very low bitrates, albeit with low audio bandwidth. In both classes, the signal is generally separated into two major signal components, the "spectral envelope" and the corresponding "residual" signal. Throughout the following descπption, the term "spectral envelope" refers to the coarse spectral distribution of the signal m a general sense, e.g. filter coefficients m an linear prediction based coder or a set of time-frequency averages of subband samples m a subband coder. The term "residual" refers to the fine spectral distribution in a general sense, e.g. the LPC error signal or subband samples normalized using the above time-frequency averages. "Envelope data" refers to the quantized and coded spectral envelope, and "residual data" to the quantized and coded residual. At medium and high bitrates, the residual data constitutes the main part of the bitstream. At very low bitrates, the envelope data constitutes a larger part of the bitstream Hence, it is indeed important to represent the spectral envelope compactly when using lower bitrates. Pπor art audio coders and most speech coders use constant length, relatively short, time segments in the generation of envelope data to achieve good temporal resolution. However, this prevents optimal utilisation of the frequency domain masking known from psycho-acoustics. To improve coding gam through the use of narrow filterbands with steep slopes, and still achieve good temporal resolution during transient passages, modem audio coders employ adaptive window switching, i.e. they switch time segment lengths depending on the signals statistics. Clearly a minimum usage of the short segments is a prerequisite for maximum coding gam. Unfortunately, long transition windows are needed to alter the segment lengths, limiting the switching flexibility. The spectral envelope is a function of two variables: time and frequency. The encodmg can be done by exploiting redundancy m either direction of the time/frequency plane. Generally, codmg of the spectral envelope is performed in the frequency direction, using delta coding (DPCM) or vector quantization (VQ). SUMMARY OF THE INVENTION The present invention provides a new method, and an apparatus for spectral envelope coding. The codmg scheme is designed to meet the special requirements of systems, where the residual signal withm certain frequency regions is excluded from the transmitted data. Examples are systems employing HFR (High Frequency Reconstruction), in particular SBR (Spectral Band Replication), or parametπc coders. In one implementation, non-uniform time and frequency sampling of the spectral envelope is obtained by adaptively grouping subband samples from a fixed size filterbank, into frequency bands and time segments, each of which generates one envelope sample. This allows instantaneous selection of arbitrary time and frequency resolution withm the limits of the filterbank. The system defaults to long time segments and high frequency resolution. In the vicinity of transients, shorter time segments are used, whereby larger frequency steps can be used in order to keep the data size withm limits. In order to maximize the benefits of the non-uniform sampling in time, vaπable length of bitstream frames or granules are used. The variable time/frequency resolution method is also applicable on envelope encoding based on prediction. Instead of grouping of subband samples, predictor coefficients are generated for time segments of varying lengths according to the system. The invention descπbes two schemes for signalling of the time and frequency resolution used. The first scheme allows arbitrary selection, by explicit signalling of time segment borders and frequency resolutions. In order to reduce the signalling overhead, four classes of granules are used, offeπng different cost/flexibility tradeoffs. The second scheme exploits the property of a typical programme mateπal, that transients are separated at least by a time T nmιn , in order to reduce the number of control bits further. Hereby, a transient detector in the encoder, operating on a time interval T_ et <= T nmιn , equal to the nominal granule length, determines the position of the onset of a possible transient The position withm the interval is encoded and sent to the decoder. The encoder and decoder share rules that specify the time/frequency distribution of the spectral envelope samples, given a certain combination of subsequent control signals, ensuring an unambiguous decoding of the envelope data. The present invention presents a new and efficient method for scalefactor redundancy coding. A dirac pulse in the time domain transforms to a constant in the frequency domain, and a dirac in the frequency domain, i.e. a single sinusoid, corresponds to a signal with constant magnitude m the time domain. Simplified, on a short term basis, the signal shows less variations in one domain than the other. Hence, usmg prediction or delta coding, coding efficiency is increased if the spectral envelope is coded in either time- or frequency-direction depending on the signal characteristics. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will now be descπbed by way of illustrative examples, not limiting the scope or spiπt of the invention, with reference to the accompanying drawings, in which: Figs, la - lb illustrate uniform respective non-uniform sampling in time of the spectral envelope. Figs. 2a - 2b define, and illustrate usage of four classes of granules. Figs. 3a - 3b are two examples of granules, and the corresponding control signals. Figs. 4a - 4c illustrate the position signalling system. Fig. 5 illustrates time/frequency switched delta coding. Fig. 6 is a block diagram of an encoder using the envelope coding according to the invention. Fig. 7 is a block diagram of a decoder using the envelope coding according to the invention. DESCRIPTION OF PREFERRED EMBODIMENTS The below -descπbed embodiments are merely illustrative for the pπnciples of the present invention for efficient envelope coding. It is understood that modifications and vaπations of the arrangements and the details descπbed herein will be apparent to others skilled in the art. It is the intent, therefore, to be limited only by the scope of the impending patent claims and not by the specific details presented by way of descπption and explanation of the embodiments herein. Generation of Envelope Data Most audio and speech coders have in common that both envelope data and residual data are transmitted and combined duπng the synthesis at the decoder. Two exceptions are coders employing PNS ["Improving Audio Codecs by Noise Substitution", D. Schultz, JAES, vol. 44, no. 7/8, 1996], and coders employing SBR. In case of SBR, consideπng the highband, only the spectral coarse structure needs to be transmitted since a residual signal is reconstructed from the lowband. This puts higher demands on how to generate envelope data, m particular due to lack of "timing" information contained in the original residual signal. This problem will now be demonstrated by means of an example: Fig. 1 shows the time/frequency representation of a musical signal where sustained chords are combined with sharp transients with mamly high frequency contents. In the lowband the chords have high power and the transient power is low, whereas the opposite is true m the highband. The envelope data that is generated duπng time intervals where transients are present is dominated by the high intermittent transient power. At the SBR process in the decoder, the spectral envelope of the transposed signal is estimated using the same instantaneous time- /frequency resolution as used for the analysis of the onginal highband. An equalization of the transposed signal is then performed, based on dissimilaπties in the spectral envelopes. E.g. amplification factors m an envelope adjusting filterbank are calculated as the square root of the quotients between oπgmal signal and transposed signal average power. For this kind of signal, a problem aπses: The transposed signal has the same "chord-to-transient" power ratio as the lowband. The gams needed in order to adjust the transposed transients to the correct level thus cause the transposed chords to be amplified relative to the oπgmal highband level for the full duration of the envelope data containing transient energy. These momentaπly too loud chord fragments are perceived as pre- and post echoes to the transient, see Fig. la. This kind of distortion will hereinafter be referred to as "gam induced pre- and post echoes" The phenomenon can be eliminated by constantly updating the envelope data at such a high rate that the time between an update and an arbitraπly located transient is guaranteed to be short enough not to be resolved by the human heaπng. However, this approach would drastically increase the amount of data to be transmitted and is thus not feasible. Therefore a new envelope data generation scheme is presented The solution is to maintain a low update rate duπng tonal passages, which make up the major parts of a typical programme mateπal, and by means of a transient detector localize the transient positions, and update the envelope data close to the leading flanks, see Fig lb. This eliminates gam induced pre-echoes In order to represent the decay of the transients well, the update rate is momentaπly increased in a time interval after the transient start. This eliminates gam induced post-echoes. The time segmenting duπng the decay is not as crucial as finding the start of the transient, as will be explained later. In order to compensate for the smaller time steps, larger frequency steps can be used duπng the transient, keeping the data size withm limits. A non- uniform sampling m time and frequency as outlined above is applicable both on filterbank- and linear prediction-based envelope coding. Different predictor orders may be used for transient and quasi- stationary (tonal) segments. In case of prediction based coders, no elaborate time/frequency resolution switching schemes are known from prior art. However, some filterbank based coders employ variable time/frequency resolution. This is commonly achieved through switching of the filterbank size. Such a change m size can not take place immediately, so called transition windows are required, and thus the update points can not be chosen freely When using SBR or any other HFR method, the objective is different - a filterbank can be designed to meet both the highest temporal and highest frequency resolution needed, to extract an adequate envelope representation. Thus, the non-uniform time and frequency sampling of the spectral envelope, can be obtained by adaptive grouping of the subband samples from a fixed size filterbank, into "frequency bands" and "time segments". One envelope sample is then calculated per band and segment. Throughout the descπption below, "frequency resolution" refers to a specific set of frequency bands, LPC coefficients or similar, used in the envelope estimate for a particular time segment. In other words, from an envelope coding perspective, high frequency resolution or high time resolution can be obtained instantaneously. From a syntactical point of view, all practical codec bitstreams comprise data peπods, each of which corresponds to a short time segment of the input signal. The time segment associated with such a data peπod, is hereinafter referred to as a "granule". Typical coders use granules of fixed length. The presence of granule boundaπes imposes constraints on the design of the time segments used for envelope estimation. The algoπthm that generates these time segments, may state that a segment "border" is required at a particular location, and that the subsequent segment should have a certain length. However, if a granule boundary falls withm this interval due to fixed length granules, the segment must be split into two parts. This has two implications: First, the number of segments to encode increases, possibly increasing the amount of data to transmit. Second, forced borders may generate segments that are too short for reliable average power estimates. In order to avoid those shortcomings, the present invention uses vaπable length granules. This requires look-ahead in the encoder, as well as extra buffeπng the decoder. Let the term "gπd" denote the time segments and the corresponding frequency resolutions to use for a particular signal, and "local gπd" denote the gπd of one granule. Clearly, the gπd must be signalled to the decoder for correct decoding of the envelope samples. However, m low bitrate applications the number of bits for this "control signal" must be kept at a minimum. Two signalling schemes are proposed in the present invention. Pπor to descπbmg them m detail, a "baseline system" and some design cπteπa are established. Let the time quantization step for the spectral envelope be T q . Those steps may be viewed as "subgranules", which are grouped into the aforementioned time segments. In the general case, a granule compπses of 5 subgranules, where S vanes from granule to granule. The number of possible segment combinations withm a granule, ranging from one segment for the entire granule to S segments, is given by In order to signal C states, ceil ( In (C) ) = ceil ( ln_ ( 2 s ) ) = S bits are required, corresponding to one bit per subgranule. An arbitrary subdivision of the granule can be signalled by S - 1 bits, representing the consecutive subgranules, stating whether a leading segment border is present at the corresponding subgranule or not. (The first and last granule borders need not be signalled here.) Since S is vaπable it must be signalled, and if this scheme is combined with a fixed length granule lowband codec, the position relative the constant length granules must be signalled as well. The segment frequency resolutions can be signalled with dynamically allocated control bits, e.g. one bit per segment. Clearly, such a straight forward method may lead to an unacceptable high number of control signal bits. As will be shown below, many of the states descπbed by Eq. 1 are not very likely, and would also generate too large amounts of envelope data to be practical at a limited bitrate. The minimum time-span between consecutive transients m music programme mateπal can be estimated in the following way: In musical notation, the rhythmic "pulse" is descπbed by a time signature expressed as a fraction AIB, where A denotes the number of "beats" per bar and XIB is the type of note corresponding to one beat, for example a 1/4 note, commonly referred to as a quarter note. Let t denote the tempo in Beats Per Mmute (BPM) The time per note of type 1/C is then given by r„ = ( 60 / t) * ( 5 / C ) [s] (Eq 2) Most music pieces fall withm the 70 - 160 BPM range, and in 4/4 time signature the fastest rhythmical patterns are for most practical cases made up from 1/32 or 32:nd notes. This yields a minimum time T nm i n = ( 60 / 160 ) * ( 4 / 32 ) = 47 ms. Of course lower time periods than this may occur, but such fast sequences ( > 21 events per second) almost get the character of buzz and need not be fully resolved. The necessary time resolution T q must also be established. In some cases a transient signal has its mam energy in the highband to be reconstructed. This means that the encoded spectral envelope must carry all the "timing" information. The desired timing precision thus determines the resolution needed for encoding of leading flanks. T q is much smaller than the minimum note period T nmιn , since small time deviations withm the peπod clearly can be heard. In most cases however, the transient has significant energy in the lowband. The above descπbed gam-induced pre-echoes must fall withm the so called pre- or backward masking time T m of the human auditory system m order to be inaudible. Hence T q must satisfy two conditions: T q « T nmιn (Eq 3) T q < T m (Eq 4) Obviously T m < T nmιn (otherwise the notes would be so fast that they could not be resolved) and according to ["Modeling the Additivity of Nonsimultaneous Masking", Heaπng Res., vol. 80, pp. 105- 118 (1994)], T m amounts to 10-20 ms. Since T nmιn is in the 50ms range, a reasonable selection of T q according to Eq 3 results in that the second condition is also met. Of course the precision of the transient detection m the encoder and the time resolution of the analysis/synthesis filterbank must also be considered when selecting T q . Tracking of trailing flanks is less crucial, for several reasons: First, the note-off position has little or no effect on the perceived rhythm. Second, most instruments do not exhibit sharp trailing flanks, but rather a smooth decay curve, i.e. a well defined note-off time does not exist. Third, the post- or forward masking time is substantially longer than the pre-maskmg time. To summaπze, the following simplifications can be made with no or little sacπfice of quality for practical signals: 1. Only the transient start position needs to be transmitted with the highest precision T q 2. Only transients separated by T p » T q need to be fully resolved in the envelope data. In order to reduce the signalling overhead, both systems according to the present invention employ two time sampling modes; uniform and non-uniform sampling in time. The uniform mode is used duπng quasi-stationary passages, whereby fixed length segments are used, and little extra signalling is required. In the vicinity of transients, the system switches to non-uniform operation and granules of vaπable length are used, enabling a good fit to the ideal global gπd. Class Signalling System In the first system the granules are divided into four classes, and the control signals are tailored towards the specific needs of each class. The classes are defined m Fig. 2a. Class "FixFix" corresponds to conventional constant length granules Class "FixVar" has a movable stop boundary, which allows the granule length to vary. Class "VarFix" has a vaπable start boundary, whereas the stop border is fixed. The last class. "VarVar", has variable boundaries at both ends. All vaπable boundaries can be offset -a / +b versus the "nominal positions". Fig 2b gives an example of a sequence of granules. The system defaults to class FixFix. A transient detector (or psycho-acoustical model) operates on a time region ahead of the current granule, as outlined in the figure. When a transient is detected, a class FixVar granule is used - the system switches from uniform to non-uniform operation. Typically, this granule is followed by a class VarFix granule, since transients most of the time are separated by a number of granules for all practical selections of granule lengths. In case of transients m consecutive frames, the VarVar class frames may be used. Fig 3a is an example of a class FixVar - VarFix pair, and the corresponding control signal. One transient is present, and the leading flank (quantized to T q ) is denoted by t. The first part of the bitstream is the "class" signal. Since four classes are used, two bits are used for this signal. In case of FixVar or VarFix classes, the next signal descπbes the location of the vaπable boundary, expressed as the offset from the nominal position. This boundary is referred to as the "absolute border". The segment borders withm the granules are descπbed by means of "relative borders": The absolute border is used as a reference, and the other borders are descπbed as cumulative distances to the reference. The number of relative borders is vaπable, and is signalled to the decoder, after the absolute border. A zero number means that the granule compπses one time segment only. Thus, in case of class FixVar, the segment lengths are signalled in a reversed sequence, moving away from the absolute border at the end of the granule. The length of the first segment m a FixVar granule is deπved from the relative borders and the total length, and is not signalled. Class VarFix relative border signals are inserted into the bitsream m a forward sequence, whereby the last segment length is excluded. The bitstream signal order is identical to that of class FixVar, that is: [class, abs. border, number of rel. borders, rel. border 0, rel. border 1 , ... , rel. border N- X] In the figure, the signals are shown in "clear text" instead of the actual binary code words sent m the bitstream. Fig 3b shows an alternative coding of the signal. The vaπable boundary offers versatility when grouping the segments at a given global gπd. Thus some payload control can be performed at this level, e.g. to equalize the number of bits per granule. This may ease the operation of the lowband encoder. Given enough look-ahead, a multipass encoding can be performed, and the optimum combination of local gπds be used. In order to reduce the symbol set for signalling of relative borders, and thereby the number of bits per symbol, those lengths can be quantized to an integer multiple ( >1) of T q , if the absolute border has the precision T q . In this case the absolute border, in addition to the above function, serves to align a group of borders around the transient with the precision T q . In other words, the highest precision is always available for coding of transient leading flanks, and a coarser resolution is used in the tracking of the decay. The VarVar class frames use a combination of the FixVar and VarFix signalling, e.g. interleaved: [class, abs. bord. left, d:o πght, num. rel. bord left, d:o right, [rel. bord. left 0,..., rel. bord. left N - X , [d:o πght]]. This class offers the greatest flexibility m the local gπd selection, at the cost of an increased signalling overhead. Finally, the FixFix class does not require other signals than the class signal per se, m which case for example two (equal length) segments are used. However, it is feasible to add a signal that enables selection withm a set of predefined gπds. For example, the spectral envelope can be calculated for two segments, and if the two envelopes do not differ more than a certain amount, only one set of envelope data is sent. So far, only the segmenting m time has been descπbed. For many reasons, it may be desirable to signal to the decoder which of the borders that corresponds to a transient leading edge. This can be accomplished by sending a "pointer" that points to the relevant border. The reference direction can follow that of the relative borders, and a zero value imply that no transient start is present within the current granule. Furthermore, the frequency resolution (number of power estimates or predictor order) used for the individual segments must also be defined. This can be signalled exphcitely, as m the "baseline system", or implicitely, i.e. the resolution is coupled to the segment lengths, and possibly the pointer position. When using error prone transmission channels, it is important to avoid error propagation. In the above system, the local gπd is fully descπbed by the control signal of the corresponding granule. Hence, no mter-frame dependencies exist in the control signal. This means that the granule boundaπes are "overencoded", since the granule intersections are signalled in both consecutive granules. This redundancy can be used for simple error detection - if the borders do not match up, a transmission error has occurred, and error concealment could be activated. Position Signalling System The second system, hereinafter referred to as the "position-signalling system", is intended for very low bitrate applications. The previously established design rules are used to a greater extent, in order to reduce the number of control signal bits even further. According to the present invention, the transient start information can be used for implicit signalling of segment borders and frequency resolutions in the vicinity of transients. This will now be descπbed, assuming a nominal granule size of N subgranules, selected according to NT q <= T nmιn , i.e. a maximum of one transient is likely to occur withm a granule, see Fig. 4a, where N = 8. A transient detector, operating on intervals of length N, located Ni l ahead of the current granule, is employed, Fig. 4b When a transient is detected, a flag associated with this region is set. In the example, the transient detector has detected a transient in subgranule 2 at time n - X, and a transient m subgranule 3 at time n. These positions, pos(n - 1) and pos( ), as well as the corresponding flags, 7αg(« - 1) are used as input to the gπd generation algoπthm, and the corresponding local gπd for granule n might be as shown in Fig. 4c. As seen from the figure, subgranule 3 of the granule at time n - 1 is included m the time/frequency gπd of granule n. The only signals fed to the bitstream, are flag(n) [1 bit], and pos(n) [ceιl( ln_ (N )) bits] . The gπd algoπthm is also known by the decoder, hence those signals, together with the corresponding signals of the preceding granule n - 1, are sufficient for unambiguous reconstruction of the gπd used by the encoder. When no transient is detected, the position signal is obsolete, and can be replaced, for example by a 1 bit signal, stating whether one or two segments are used. Thus, uniform mode operation is identical to that of the class signalling system. This system may be viewed as a finite state machine, where the above descπbed signals control the transitions from state to state, and the states define the local gπds. Clearly, the states can be represented by tables, stored in both the encoder, and the decoder. Since the gπds are hard coded, the ability to adaptively alter the payload has been sacπficed. A reasonable approach is to keep the time/frequency data matπx size (e.g. number of power estimates) approximately constant. Assuming that the number of scalefactors or coefficients m a high resolution segment is two times that of a low resolution segment, one high resolution segment can be traded for two low resolution segments. Time/Frequency Switched Scalefactor Encoding Utilising a time to frequency transform it can be shown that a pulse m the time domain corresponds to a flat spectrum in the frequency domain, and a "pulse" in the frequency domain, i.e. a single sinusoidal, corresponds to a quasi-stationary signal m the time domain. In other words a signal usually shows more transient properties in one domain than the other. In a spectrogram, l e. a time/frequency matπx display, this property is evident, and can advantageously be used when coding spectral envelopes. A tonal stationary signal can have a very sparse spectrum not suitable for delta codmg in the frequency- direction, but well suited for delta coding m the time -direction, and vice versa. This is displayed in Fig. 5. Throughout the following descπption a vector of scale factors calculated at time no represents the spectral envelope Y(k, n 0 ) = [ a\, d.2, a_, ..., ak, ..., a N ], (Eq 5) where a \ ...ajv are the amplitude values for different frequencies. Common practice is to code the difference between adjacent values m the frequency-direction at a given time, which yields: D(k, «o) = [ a 2 - aι, a 3 - a 2 , ..., a N - a (N . \) . (Eq 6) In order to be able to decode this, the start value a\ needs to be transmitted. As stated above this delta- codmg scheme can prove to be most inefficient if the spectrum only contains a few stationary tones. This can result in a delta coding yielding a higher bit rate than regular PCM coding. In order to deal with this problem, a time/frequency switching method, hereinafter referred to as T/F-codmg, is proposed: The scalefactors are quantized and coded both in the time- and frequency-direction. For both cases, the required number of bits is calculated for a given coding error, or the error is calculated for a given number of bits. Based upon this, the most beneficial coding direction is selected. As an example, DPCM and Huffman redundancy coding can be used. Two vectors are calculated, Df and D t : D f (k, n 0 ) = [ a 2 - aι, a 3 - a 2 , ..., a N - a^ N . \) ], (Eq 7) D l (k, n 0 ) = [ a](n 0 ) - a\(n 0 - l), a 2 (n 0 ) - a 2 (n 0 - 1), .. , a / v(«o) - a;v("o - 1) ] (Eq 8) The corresponding Huffman tables, one for the frequency direction and one for the time direction, state the number of bits required in order to code the vectors. The coded vector requiπng the least number of bits to code represents the preferable coding direction. The tables may initially be generated using some minimum distance as a time/frequency switching cπteπon Start values are transmitted whenever the spectral envelope is coded in the frequency direction but not when coded in the time direction since they are available at the decoder, through the previous envelope. The proposed algoπthm also require extra information to be transmitted, namely a time/frequency flag indicating in which direction the spectral envelope was coded. The T F algoπthm can advantageously be used with several different coding schemes of the scalefactor-envelope representation apart from DPCM and Huffman, such as ADPCM, LPC and vector quantisation The proposed T/F algoπthm gives significant bitrate-reduction for the spectral-envelope data. Practical Implementations An example of the encoder side of the invention is shown m Fig. 6 The analogue input signal is fed to an A D-converter 601, forming a digital signal. The digital audio signal is fed to a perceptual audio encoder 602, where source coding is performed. In addition, the digital signal is fed to a transient detector 603 and to an analysis filterbank 604, which splits the signal into its spectral equivalents (subband signals). The transient detector could operate on the subband signals from the analysis bank, but for generality purposes it is here assumed to operate on the digital time domain samples directly. The transient detector divides the signal into granules and determines, according to the invention, whether subgranules within the granules is to be flagged as transient. This information is sent to the envelope grouping block 605, which specifies the time/frequency grid to be used for the current granule. According to the gπd, the block combines the uniform sampled subband signals, to form the non-uniform sampled envelope values. As an example, these values may represent the average power density of the grouped subband samples. The envelope values are, together with the grouping information, fed to the envelope encoder block 606. This block decides in which direction (time or frequency) to encode the envelope values. The resulting signals, the output from the audio encoder, the wideband envelope information, and the control signals are fed to the multiplexer 607, forming a seπal bitstream that is transmitted or stored. The decoder side of the invention is shown in Fig. 7, using SBR transposition as an example of generation of the missing residual signal. The demultiplexer 701 restores the signals and feeds the appropπate part to an audio decoder 702, which produces a low band digital audio signal. The envelope information is fed from the demultiplexer to the envelope decoding block 703, which, by use of control data, determines m which direction the current envelope are coded and decodes the data. The low band signal from the audio decoder is routed to the transposition module 704, which generates a replicated high band signal from the low band. The high band signal is fed to an analysis filterbank 706, which is of the same type as on the encoder side. The subband signals are combined in the scalefactor grouping unit 707. By use of control data from the demultiplexer, the same type of combination and time/frequency distπbution of the subband samples is adopted as on the encoder side. The envelope information from the demultiplexer and the information from the scalefactor grouping unit is processed in the gam control module 708. The module computes gam factors to be applied to the subband samples before recombination in the synthesis filterbank block 709. The output from the synthesis filterbank is thus an envelope adjusted high band audio signal. This signal is added to the output from the delay unit 705, which is fed with the low band audio signal. The delay compensates for the processing time of the high band signal. Finally, the obtained digital wideband signal is converted to an analogue audio signal in the digital to analogue converter 710.

Claims: CLAIMS 1. A method for spectral envelope coding in a source coding system, where said system compπses an encoder representing all operations performed pπor to storage or transmission, and a decoder representmg all operations performed after storage or transmission, and where a residual signal corresponding to certain frequency regions is excluded from transmitted or stored data and a new residual is synthesised in said decoder, characterised by: at said encoder, perform a statistical analysis of the input signal, based on the outcome of said analysis, select the gπd to be used in the spectral envelope representation, using said gπd, generate data representing said spectral envelope, transmit said data together with a control signal describing said grid, and at said decoder, using said control signal and said data in the synthesis of the output signal. 2. A method according to claim 1, characterised in that said instantaneous time and frequency resolution is obtained by grouping of elements in a time/frequency representation of said input signal, and calculating a scalefactor for every one of said groups. 3. A method according to claim 2, characterised in that said time/frequency representation is generated by a filterbank. 4. A method according to claim 3, characterised in that said filterbank is of fixed size. 5. A method according to claim 1, characterised in that said data is generated by a linear predictor. 6. A method according to claim 1, characterised in that said analysis employs a transient detector. 7. A method according to claim 6, characterised in that said instantaneous resolution is switched from a default combination of higher frequency resolution and lower time resolution to a combination of lower frequency resolution and higher time resolution at the onset of a transient. 8. A method according to claim 1, characterised in that said control signal descπbes positions withm a granule of constant update rate, generated by said analysis, and said instantaneous resolution is chosen based on the positions withm current and neighbouπng granules, by the use of rules available to both said encoder and said decoder. 9. A method according to claim 8, characterised in that at most one position per granule is signalled. 10. A method according to claim 1, characterised in that granules of vaπable length are used. 11. A method according to claim 10, characterised in that four classes of granules are used, whereby the first class has fixed position granule boundaπes, and the length L, the second class has a fixed position start boundary, and a vaπable position stop boundary, the third class has a vaπable position start boundary, and a fixed position stop boundary, the fourth class has vaπable position start and stop boundaπes, and said fixed positions coincide with reference positions, separated by the distance L, and said vaπable positions can be offset [-a,b] versus said reference positions. 12. A method according to claim 2, characterised in that said scalefactors are coded both in the time and frequency direction, the momentaπly most beneficial direction is determined, said most beneficial direction is used for said transmission. 13. A method according to claim 12, characterised in that the direction which generates the least coding error for a given number of bits is chosen. 14. A method according to claim 12, characterised in that the direction which generates the least number of bits for a given coding error is chosen. 15. A method according to claim 14, characterised in that lossless coding is employed and separate tables are used for said time and frequency directions, in particular where said tables are used for selection of coding direction. 16. An apparatus for encoding of a spectral envelope of a signal to be decoded by a decoder, characterised by: means for performing a statistical analysis of the input signal, means for selection of the instantaneous time and frequency resolution to be used in a spectral envelope representation of said input signal, based on the outcome of said analysis, means for generation of data representing said spectral envelope, using said resolution, and means for transmission of said data together with a control signal descπbmg said resolution. 17. An apparatus for decoding of a spectral envelope of a signal encoded by an encoder, characterised by: means for interpretation of a received control signal in order to determine the instantaneous time and frequency resolution used in a spectral envelope representation of an encoded signal, means for decoding of received envelope data based on said spectral envelope representation, using said control signal, and means for using said decoded envelope data in the synthesis of the output signal.

Inventors: EKSTRAND PER, HENN FREDRIK, KJOERLING KRISTOFER, LILJERYD LARS GUSTAF, EKSTRAND, PER, HENN, FREDRIK, KJOERLING, KRISTOFER, LILJERYD, LARS, GUSTAF
Applicants: EKSTRAND PER, HENN FREDRIK, KJOERLING KRISTOFER, LILJERYD LARS GUSTAF, EKSTRAND, PER, HENN, FREDRIK, KJOERLING, KRISTOFER, LILJERYD, LARS, GUSTAF
Application year: 2000
Main classification: G10L19
IPC codes: G10L19