# Patent

## Title
Medical record forming and storing apparatus and medical record and method

## Abstract

A method of implementing a dual-mode audio decoder and filter is provided. The inverse modified discrete cosine transform (IMDCT) method and circuit for a dual-mode audio decoder perform the IMDCT with respect to a signal encoded using either the MPEG or Dolby AC-3 standard by utilizing a shared fast Fourier transform (FFT) circuit thereby simplifying the necessary hardware construction. Also, the number of IMDCT outputs used for windowing is reduced by utilizing the properties of the IMDCT outputs of the MPEG bit stream and thus the size of memory necessary for storing the IMDCT outputs is reduced. The invented method includes identifying an AC-3 or MPEG bit stream; forming either an AC-3 sequence or an MPEG sequence; (a) multiplying the AC-3 sequence by a predetermined pre-twiddling factor, performing an inverse FFT on the pre-twiddled AC-3; and multiplying by a predetermined post-twiddling factor; or (b) performing an FFT on the MPEG sequence and multiplying by a predetermined twiddling factor; and rearranging the twiddled MPEG function. Forming the MPEG sequence preferably includes adding a mirror image of the MPEG bit stream to the received MPEG bit stream. An IMDCT circuit includes storage for the bit streams and the IMDCT output signals; a butterfly module for Fourier transforming; a ROM for storing Fourier transform coefficients; storage for the bit streams, the real parts, and the imaginary parts of the sequences; generating addresses of the storage and the ROM; and a state machine for generating control signals for controlling the butterfly module, the address generator, and the storage. Briefly, storage of the IMDCT outputs is reduced by applying stored window coefficients to an array of IMDCT output blocks, whereby alternate multiplication and storage of ranges of IMDCT outputs and window coefficients are stored in successive ranges of the window, shifting the array by one block, inputting new IMDCT outputs, and overlapping and adding the multiplied ranges of stored IMDCT outputs.

## Background
1. Field of the Invention

The present invention relates generally to an audio decoder. In particular, the present invention relates to a method and circuit for implementing a dual-mode audio decoder which performs an inverse modified discrete cosine transform (IMDCT) on a signal encoded using the Moving Picture Experts Group (MPEG) standard and the Dolby.RTM. AC-3 standard. The IMDCT transform is performed using a common Fast Fourier Transform (FFT) circuit. The audio decoder reduces the size of necessary memory by reducing the number of IMDCT outputs used in windowing and by utilizing the properties of the IMDSCT outputs.

2. Description of the Related Art

As the processing of digital audio has increased in the video and multimedia fields, so has the demand for effective compression algorithms. Effective compression algorithms are necessary because digital audio occupies a considerable portion of the signal bandwidth. Representative compression algorithms are MPEG and Dolby AC-3. Those of skill in the art will appreciate that the MPEG and AC-33 algorithms are well known, evolving standards. Accordingly, reference herein to these standards will be understood to mean the standards as they existed at the time of the earliest effective filing date of the present application, and as they have evolved to date, and as they continue to evolve over the term of any patent that issues herefrom. Applicant notes that an instructive earlier version of the AC-3 standard is described in detail in "Multi-Channel Digital Audio Compression System," Dolby Laboratories Information, Feb. 22, 1994.

Those of skill in the art will appreciate that the MPEG and AC-3 algorithms are well known, evolving standards. Accordingly, reference herein to these standards will be understood to mean the standards as they existed at the time of the earliest effective filing date of the present application, and as they have evolved to date, and as they continue to evolve over the term of any patent that issues herefrom. Applicant notes that an instructive earlier version of the AC-3 standard is described in detail in "Multi-Channel Digital Audio Compression System," Dolby Laboratories normation, Feb. 22, 1994.

The MPEG compression algorithm is the first international audio compression standard. According to the MPEG standard, effective compression can be obtained utilizing the human psychoacoustic recognition characteristic which responds differently depending on the frequency band. The AC-3 standard was adopted as the audio standard for North American High-Definition Television (HDTV) systems. The AC-3 standard has recently been applied to Digital Video Disk (DVD), Direct Broadcasting System (DBS), Set Top Box (STB), digital cable, etc. The AC-3 compression algorithm also uses the human psychoacoustic characteristic as a basis for audio compression. Both the MPEG and AC-3 standards are not limited to specific types of input signals and thus can be used for compressing speech, high-quality audio signals, and the like.

Recently, dual-mode audio decoders capable of decoding both the AC-3 audio stream and MPEG audio stream have been designed and introduced into the marketplace. To achieve such dual-mode audio decoders, it is necessary to unify the hardware blocks of the two audio standards. An audio decoder may be divided into a bit-allocation component and a reconstruction filter component for restoring a time-domain signal. Practically, the bit-allocation component for the MPEG standard is quite different from the bit allocation component of the AC-3 standard. Thus it is almost impossible to design bit allocation blocks having the same function as the MPEG-specific and AC-3-specific bit-allocation components. In contrast, the reconstruction filter components have similar functional blocks including inverse transform blocks, window blocks, and overlap and add blocks. The inverse transform blocks of MPEG and AC-3 are particularly suited for combination by properly modifying different transform equations adopted in the MPEG and AC-3 standards. Specifically, the MPEG and AC-3 standards adopt a subband structure which is efficient in processing audio signals. The subband structure of the MPEG and AC-3 standards are discussed in detail in P. P. Vaidyanathan, MULTIRATE SYSTEMS AND FILTER BANKS, Prentice Hall (1993) which is incorporated herein by reference. The frequency characteristic of each subband is expressed by a simple transform equation termed IMDCT. The IMDCT transform is discussed in further detail in J. P. Prinven and A. B. Bradley, Analysis/synthesis filter bank design based on time domain aliasing cancellation, IEEE Trans. Assp-34, Vol. No. 5, 1153-61 (Oct. 1986). The AC-3 standard supports three kinds of transform equations. One of the three transform equations is selected at the encoding stage according to the input signal characteristics. Thereafter, the selected transform equation is manipulated so that the FFT structure reduces the amount of computation. The MPEG standard, on the other hand, uses one transform equation which is different from the three types of AC-3 transform equations. Although the IMDCT of the MPEG standard is different from the IMDCT of the AC-3 standard, the IMDCT of the MPEG standard becomes the subset of the IMDCT of the AC-3 standard when the FFT is used. Accordingly, it is preferable to implement a dual-mode audio decoder which has an IMDCT circuit based on the same FFT structure. By doing so, the FFT structure can be shared by the MPEG and AC-3 specific components thereby reducing the overall decoder cost.

At the same time, a conventional IMDCT windowing method outputting MPEG data can be used with a more efficient memory structure since all 64 IMDCT outputs need not be simultaneously stored in memory.

It is an object of the present invention to provide a method and circuit for dual-mode audio decoding which overcomes the disadvantages associated with prior art dual-mode decoders.

It is another object of the present invention to provide a method for a dual-mode audio decoding which performs the IMDCT transform of an MPEG file using the FFT transform of the IMDCT component of the AC-3 specific hardware.

It is yet another object of the present invention to provide an IMDCT circuit for a dual-mode audio decoder which can implement the IMDCT transform of the MPEG standard using the FFT transform of the AC-3 standard.

It is still another object of the present invention to provide a windowing method for a dual-mode audio decoder which can reduce the size of a memory for storing IMDCT outputs according to MPEG IMDCT output characteristics. In one aspect of the present invention, there is provided an IMDCT method for a dual-mode audio decoder, comprising receiving a bit stream and identifying the received bit stream as an AC-3 bit stream or an MPEG bit stream. If an AC-3 bit stream is received, an AC-3 sequence is formed and then multiplied by a predetermined pre-twiddling factor. The pre-twiddled AC-3 sequence is then fast Fourier transformed and then multiplied by a predetermined post-twiddling factor. If an MPEG bit stream is received, an MPEG sequence is formed, fast Fourier transformed, multiplied by a predetermined twiddling factor, and rearranged.

In another aspect of the present invention, there is provided an IMDCT circuit for a dual-mode audio decoder, comprising first storage means for storing AC-3 and MPEG bit streams and IMDCT AC-3 and MPEG output signals. A butterfly module is coupled to the first storage means for Fourier transforming the AC-3 and MPEG bit streams. A ROM is coupled to the butterfly module for storing Fourier transform coefficient values. A second storage and third storage means are also included. The second storage means stores the AC-3 and the MPEG bit streams and the real parts of the AC-3 and MPEG sequences. The third storage means stores the imaginary parts of the AC-3 and MPEG sequences. An address generating means generates addresses for the first, second, and third storage means and the ROM. A state machine is coupled to the butterfly module, the address generator, and the first and second storage means for generating control signals for controlling the butterfly module, the address generator, and the first and second storage means.

The above objects, other features, and advantages of the present invention will become more apparent by describing the preferred embodiments thereof with reference to the accompanying drawings, in which:

FIG. 1 is a flow chart of the IMDCT method for a dual-mode audio decoding according to the present invention.

FIG. 2 is a block diagram of the IMDCT circuit for a dual-mode audio decoder according to the present invention.

FIG. 3 is a diagram of a radix-2 FFT butterfly for real computation of the butterfly module shown in FIG. 2.

FIGS. 4a to 4c are diagrams of the V-array, window, and overlap/add operations for windowing, respectively.

FIG. 5 is a block diagram of the block VB of the array V.

FIGS. 6a and 6b are block diagrams of the array Vp and the window used in the windowing method according to the present invention.

FIGS. 7a and 7b are block diagrams explaining the windowing method for a dual-mode audio decoder according to the present invention.

FIG. 8 is a flow chart of the windowing method for a dual-mode audio decoder according to the present invention.

Modification of the Dolby AC-3 IMDCT method will be explained first followed by an explanation of the modification of the MPEG IMDCT method.

1. The Dolby AC-3 IMDCT method

The Dolby AC-3 standard utilizes three kinds of transforms as mentioned above. If an input signal has no abrupt transition in amplitude and frequency in a unit time domain a so-called long transform is used. If, on the other hand, a transition of the input signal is produced within a unit time domain, two short transforms are used to compensate for the inaccuracy at the transition point produced when the long transform is used. The IMDCT of the AC-3 standard is expressed as equation 1a. Equation 1a represents the three kinds of transforms used in the AC-3 standard. ##EQU1##

Where: analysis window coefficients K, that are greater than or equal to zero and less than or equal to K/2-1; and and 1 for standard is defined in equation 1b. ##EQU2##

The cosine term of the transform given in equation 1a is not a full ranked matrix. Thus, the inverse transform cannot be directly obtained by obtaining the inverse of the forward transform. Rather, the inverse transform is defined as a by-product during the full implementation process.

The modification of the IMDCT for long transform is as follows. ##EQU3##

For computational convenience, the term "-2/K" in equation 1a is ignored. ##EQU4##

At this time, the relational expression Z.sub.m (r)={(g.sub.1 -g'.sub.2))+j(-g.sub.2 -g'.sub.1)} is realized. Equation 1d represents that ##EQU5##

defined as the new sequence, is given by a Discrete Fourier Transform (DFT) of Z.sub.m (r) with scale factors. Accordingly, it is understood that restoring Z.sub.m (r) is possible through the inverse DFT of the new sequence and including a series of scale factors.

The method of restoring the signal Z.sub.m (r) in the time domain from the signal X.sub.k (m) in the frequency domain using an Inverse Fast Fourier Transform (IFFT) for a "long transform" will now be explained.

The method of performing the IMDCT transform of the AC-3 standard is summarized as follows: ##EQU6##

of the new sequence is formed from the signal X.sub.k (m) in the frequency domain, where k=1, 2, . . . , 255 and K=512; ##EQU7##

of the new sequence is multiplied by ##EQU8##

At step 3, a K/4-point IFFT is performed of the signal resulting from step 2; and ##EQU9##

Next, the two short transforms are explained in relation to equation 1d. The IMDCT modification of the short transform with respect to the first block (256 samples) is as follows. In the case of short transform, equation 1a is given by equation 1e. ##EQU10##

In the same manner as the long transform, the odd-numbered sequence and even-numbered sequence of X.sub.k (m) are derived to define the new sequence.

The new sequence is derived as follows: ##EQU11##

where z.sub.fm (r)={(g.sub.1 -g'.sub.2)+j(g.sub.1 -g.sub.2)}. Equation 1f indicates that the new sequence can be express in terms of DFT.

Thus, the method for computing the inverse transform is summarized as follows: ##EQU12##

with given transform coefficients X.sub.K(m) for [k= 0, 2, 4, . . . 126]; ##EQU13##

is multiplied by ##EQU14## 2; and ##EQU15##

The IMDCT modification of the short transform with respect to the second block (256 samples) is as follows. In case of the short transform of the second block, equation 1a is given by equation 1g. ##EQU16##

In the same manner as the long transform, the odd-numbered sequence and the even-numbered sequence of X.sub.k (m) are derived to define the new sequence.

The new sequence is derived as follows: ##EQU17##

The method for computing the inverse transform is summarized as follows: ##EQU18##

is formed from the signal X.sub.k (m) in the frequency domain, where k=1, 3, 5, . . . 127 and K=256; ##EQU19##

of the new sequence is multiplied by ##EQU20## resulting from step 2; and ##EQU21##

Thus, both long and short transforms can be computed with 128- or 64-point inverse FFT preceded by a pre-twiddling factor and followed by a post-twiddling factor, reducing the computational complexity as given in Table 1. AC-3 (long)   AC-3 (short)  MPEG Direct            131,072M      65,536M       2.048M 130,560 A     65,024 A      1.984 A Radix-2 real FFT  2,816M        2,560M        832M 3,200 A       2,816 A       1,184 A Reduction Factor  43.5          24.3          2.0

The 128-point FFT, which is used for the IMDCT of the Dolby AC-3 standard, can also be used for the IMDCT of the MPEG standard by modifying the IMDCT equations.

2. Modification of the MPEG IMDCT

The MPEG IMDCT is expressed as: ##EQU22##

where 0.ltoreq.r.ltoreq.63.

A new sequence is defined as follows: ##EQU23##

The original transform equation 2a can be expressed as follows using the newly defined sequence equation 2b: ##EQU24##

The following relational expression is realized: ##EQU25##

The following properties can be derived from equation 2c.

The property expressed in equation 2e is proven by equations 2g and 2h.

If the new sequence is defined by equation 2g, it is expressed as equation 2h. ##EQU26## ##EQU27## ##EQU28##

Thus, equation 2h can be computed by using equation 2i with a slight scale modification.

The vectorized representation of equation 2h is: ##EQU29##

Accordingly, the vectorized representation of equation 2i is given by D.sub.DCT =ACD.sub.N, and the matrix A is a diagonal matrix whose elements are .alpha.(k). If equation 2j is compared with equation 2i after both sides of equation 2j are multiplied by the matrix A, the relational equation 2k is obtained.

AV"=ACX.sub.k =dct(X.sub.k)

The result of equation 2k represents that the IMDCT of the MPEG standard given by equation 2a can be expressed by the Discrete Cosine Transform (DCT) by modifying the original inverse transform of the MPEG standard. The decoding method for performing the inverse transform using the DCT is summarized as follows: bitstream; of A as is given in equation 2k; equations 2e and 2f; and 2b.

Thus, the FFT used for performing the IMDCT of the AC-3 standard can also be used for performing the IMDCT of the MPEG standard by investigating the relationship between DCT and DFT.

3. Relationship Between the DCT and the DFT

Let the input signal x(n) equal the N-point input sequence x(n) and define a new sequence y(n) as follows: ##EQU30##

Thus, the new sequence y(n) is composed of the input sequence x(n) and a sequence wherein the input sequence x(n) is arranged in reverse order.

The relationship between the DCT and the DFT is as follows: ##EQU31##

From equation 3b, it can be implied that the N-point DCT is implemented by multiplying the 2N-point DFT or FFT by a proper twiddling factor.

Therefore, the implementation of the N-point DCT using the 2N-point FFT can be summarized as follows: from the input sequence x(n); sequence y(n); and ##EQU32##

By performing the above-described computation, equation 3b is obtained except for the .alpha.(k) factor. The signal resulting from step 3 is not multiplied times the .alpha.(k) factor because the value of the .alpha.(k) factor is multiplied by A.sup.-1 and thus eliminated at step 2 of the IMDCT of the MPEG standard. Thus, multiplying the signal resulting from step 3 times the .alpha.(k) factor and performing step 2 of the IMDCT of the MPEG standard can be omitted.

Specifically, by multiplying the twiddling factor ##EQU33##

at step 3, V" of equation 2k is obtained. By performing steps 3 to 5 described in the IMDCT computation of the MPEG standard after performing steps 1 to 3, the desired output can be produced.

The MPEG IMDCT function using the FFT for a dual-mode audio decoder according to the present invention can be summarized as follows: from the input sequence x(n); ##EQU34## based on equations 2e and 2f; and

The AC-3 IMDCT on the 128-point FFT is described in detail in "Multi-Channel Digital Audio Compression System," Dolby Laboratories Information, Feb. 22, 1994. The IMDCT of the AC-3 standard wherein K is equal to 512 can be implemented using the K/4-point FFT and the IMDCT of the MPEG standard can be implemented using the K/8-point FFT. Thus, only the 128-point FFT structure is needed for a dual mode audio decoder.

The IMDCT method and circuit for a dual-mode audio decoder as described above will be explained with reference to the accompanying drawings.

FIG. 1 is a flow chart of the MDCT method for the dual-mode audio decoder according to the present invention. Referring to FIG. 1, at step 100 it is determined whether the input bit stream is an AC-3 or an MPEG bit stream. If the input bit stream is an AC-3 bit stream, a new sequence is formed from given transform coefficients X.sub.k (m) at step 110, and then the new sequence is multiplied by a pre-twiddling factor at step 120. Thereafter, an IFFT is performed using K/4-point FFT at step 130 and the result of step 130 is multiplied by a post-twiddling factor at step 140 to complete the IMDCT for the AC-3 bit stream.

If the input bit stream is an MPEG bit stream, a new sequence for the input signal is formed at step 150. That is, a new sequence is formed having a sequence with a reverse arrangement of the input signal added to the input signal. The K/8-point FFT is performed for the new sequence at step 130. The result of step 130 is multiplied by the twiddling factor ##EQU35##

at step 160. The signal resulting from the twiddling at step 160 is rearranged at step 170. The rearranging step 170 is the method for producing V for V" using the above-described equations. The K/4-point FFT module 130 serves as the main engine of the dual mode filter and subsidiary functional modules such as pre and post AC-3 twiddling or arrangement/rearrangement MPEG modules are all modeled in the previous derivations. The flow chart of FIG. 1 illustrates the above-described IMDCT method and the equations applied to the respective steps can be referred to in understanding the IMDCT method.

FIG. 2 is a block diagram of the IMDCT circuit for a dual-mode audio decoder according to the present invention. Referring to FIG. 2, the IMDCT circuit according to the present invention includes a butterfly module 200, a state machine 210, an address generator 220, two 128.times.24 RAMs 230 and 250, a ROM table 240, and a 512.times.24 IMDCT buffer 260.

Input signals for the IMDCT circuit shown in FIG. 2 are bit streams reproduced in the frequency domain. The 512.times.24 IMDCT buffer 260 stores the post-twiddled output of the AC-3 bit stream and stores a 16-sample block of 32 samples of the MPEG bit stream after the IMDCT is performed. The butterfly module 200 performs pre-twiddling, post-twiddling, and 128-point IFFT where the bit stream is AC-3 data. The butterfly module 200 performs 64-point FFT and twiddling where the bit stream is M?EG data. The ROM table 240 stores therein the values of coefficients required for performing twiddling and FFT. The address generator 220 generates corresponding addresses of the RAMs 230 and 250 for the arrangement/rearrangement of the MPEG samples. The 128.times.24 RAM 230 stores sample values corresponding to the real part sequence among the 256 samples stored in the IMDCT buffer 260 during the IMDCT of the AC-3 bit stream and stores interim resultant values produced during the twiddling and FFT for the stored samples. Also, the 128.times.24 RAM 230 stores samples of real parts of the new sequence during the IMDCT of MPEG and stores interim resultant values produced during the FFT and twiddling for the stored samples and the result of rearrangement. In other words, the 128.times.24 RAM 230 stores interim resultant values produced during the arrangement of the samples of the real parts, FFT, twiddling, and rearrangement. The 128.times.24 RAM 250 stores sample values corresponding to the imaginary part sequence among the 256 samples stored in the IMDCT buffer 26 during the IMDCT of the AC-3 bit stream and stores interim resultant values produced during the twiddling and FFT for the stored samples and the result of rearrangement. Also, the 128-24 RAM 250 stores samples of imaginary parts of the new sequence during the IMDCT of the MPEG bit stream and stores interim resultant values produced during the twiddling and FFT steps. In other words, the 128-24 RAM 250 stores interim resultant values produced during the arrangement of the samples of the imaginary parts, FFT, twiddling, and rearrangement. At this time, the resultant value of the imaginary parts becomes zero after the MPEG IMDCT is performed. The state machine 210 generates control signals for controlling the respective functional blocks.

FIG. 3 shows the structure of the butterfly of radix-2 FFT in the real region of the butterfly module 220 shown in FIG. 2. The sign of the sin .theta. function is changed for the IFFT case. In implementing the 128-point FFT as the radix-2 structure, 64 pairs are required with respect to each of the real parts and the imaginary parts. The structure shown in FIG. 3 requires 7 stages, and each pair requires 2 multiplications and 2 additions.

The windowing and overlap/add method for the IMDCT output data of the MPEG bit stream will be explained. A conventional windowing, and overlap/add method for the IMDCT output data of the MPEG bit stream is as follows:

In order for the dual-mode audio decoder to perform decoding of audio data, windowing is effected after the IMDCT is performed. In decoding the MPEG audio data, a V-array for storing values of IMDCT outputs for 1024 samples and thus the size of a memory for storing the IMDCT outputs should be large enough to store the 1024 samples. Specifically, the IMDCT buffer as shown in FIG. 2 should be large enough to store the 1024 samples. A synthesis window having a size of 512 is multiplied by the V-array according to the current standard. FIG. 4a illustrates the form of the V-array and FIG. 4b illustrates the form of the window. FIG. 4c illustrates the implementation of the MPEG audio decoder for outputting 32 samples completely reproduced.

If new 64 IMDCT outputs of a following audio block are inputted, the elements of the V-array are shifted by 64 samples to the right. The leftmost samples of the V-array are the very recently inputted samples which are indicated as a block "0" in FIG. 4a. The rightmost samples of the V-array are the oldest samples which are indicated as a block "15" in FIG. 4a. Specifically, the numbers 0 to 15 given to the respective blocks of the V-array of FIG. 4a correspond to the order of data input. Each IMDCT output is composed of 64 samples, and the first 32 IMDCT outputs of even-numbered blocks 0, 2, 4, 6, 8, 10, 12, 14 of the V-array and the second 32 IMDCT outputs of odd-numbered blocks 1, 3, 5, 7, 9, 11, 13, 15 of the V-array are used for windowing. As shown in FIG. 4b, the synthesis window is composed of 512 coefficients and the 512 coefficients are divided into 16 blocks. Each block is composed of 32 coefficients. The window blocks are numbered 0 to 15 from left to right. The window coefficients of the even-numbered window blocks 0, 2, 4, 6, 8, 10, 12, and 14 shown in FIG. 4b are multiplied by the first 32 IMDCT outputs of the even-numbered blocks 0, 2, 4, 6, 8, 10, 12, 14 of the V-array, respectively, and the window coefficients of the odd-numbered window blocks 1, 3, 5, 7, 9, 11, 13, and 15 are multiplied by the second 32 IMDCT outputs of the odd-numbered blocks 1, 3, 5, 7, 9, 11, 13, 15 of the V-array, respectively. This operation is still performed even though all the elements are shifted to the right when new 64 IMDCT outputs are stored in the V-array. By the operation described above, the windowing results of the 16 blocks are obtained as shown in FIG. 4c. These 16 results are overlapped and added together to obtain the completely reproduced 32 samples.

According to the present invention, windowing is performed using following properties of the MPEG IMDCT output data. The properties expressed by the following mathematical equations are applied to the 64 samples of the IMDCT block.

v(i)=-v(32-i)for i=0, 1, 2, . . . , 15  Equation 4a

Equation 4a indicates that the progression v(i) for i=0, 1, . . . , 15 can be constructed by the progression v(i) for i=17, 18, . . . , 32, and vice versa

From equation 4b, it can be understood that it is unnecessary to calculate v(16).

Equation 4c indicates that the progression v(i) for i=49, 50, . . . , 63 can be constructed by the progression v(i) for i=33, 34, . . . , 47, and vice versa.

From equation 4d, it can be understood that multiplication is not required for computing v(48).

FIG. 5 is a view explaining the properties of each block V.sub.B of the array wherein the property v(i) for i=15, 14, . . . , and 0 given by equation 4a indicates a negative mirror image of v(i) for i=17, 18, . . . , and 32, and the property v(i) for i=63, 62, . . . , and 49 indicates a positive mirror image of v(i) for i=33, 34, . . . , and 47. It implies that all of the 64 samples do not have to be stored for the windowing process. In other words, the windowing and overlap/add operations can be performed by storing only representative 32 samples of v(i) for i=17, 18, . . . , and 48. Referring to FIG. 5, equation 4a indicates that the samples of portions (1) and (2) are negative images, equation 4b indicates that 17th sample represented by a portion (5) is zero, equation 4c indicates that the samples of portions (3) and (4) are positive mirror images, and equation 4d indicates that the sample of a portion (6) is a negative value of sum of the encoded 32 inputs.

It should be noted in equations 2b, 2e, 2f, and 2i that the 32 IMDCT output sequence v(i), for 17.ltoreq.i.ltoreq.48 corresponds to the negative value of the sequences v"(I), for I=31, 30, . . . , and 0. Accordingly, in the case of performing an IMDCT of the MPEG bit stream for a dual-mode audio decoder, only the above arrangement, FFT, and twiddling are performed without need for the rearranging step. For storing data in the IMDCT buffer shown in FIG. 2, the negative value of the sequence v"(i), for i=31, 30, . . . , 0 may be stored to perform the windowing process using this value.

FIG. 6a illustrates the array V.sub.p used in the windowing method according to the present invention wherein the 17th to 48th IMDCT outputs of each block V.sub.B are stored in the array V of FIG. 4a. In other words, each block of the array V.sub.p is composed of 32 IMDCT outputs. Thus, the size of the IMDCT buffer shown in FIG. 2 should have the size of 1024 to store the array V shown in FIG. 4a but it may have the size of 512 to store the array V.sub.p shown in FIG. 5a. FIG. 6b illustrates a window similar to that shown in FIG. 4b. In FIG. 6a, the first 16 IMDCT outputs of even-numbered blocks of the array V.sub.p that are hatched and the second 16 IMDCT outputs of odd-numbered blocks of the array V.sub.p are samples to be used for windowing. Specifically, even though the values stored in the array V.sub.p may be the final outputs vs of the IMDCT computation, it is preferable that the negative values of the sequence v"(i), for i=31, 30, . . . , and 0, are stored therein.

FIGS. 7a and 7b illustrate a windowing method according to the present invention. FIG. 7a shows the method for windowing the first 16 samples of the even-numbered blocks V.sub.PE (0, 2, 4, 6, 8, 10, 12, 14) of the array V.sub.p in FIG. 6a and the window coefficients of the even-numbered blocks W.sub.E (0, 2, . . . , 14) of the window W shown in FIG. 6b. FIG. 7b shows the method for windowing the second 16 samples of odd-numbered blocks V.sub.PO (1, 3, 5, 7, 9, 11k, 13, 15) of the array V.sub.p in FIG. 6a and the window coefficients of the odd-numbered blocks W.sub.O (1, 3, . . . , 15) of the window W in FIG. 6b.

FIG. 8 is a flow chart explaining the windowing and overlap/add method according to the present invention. The windowing method according to the present invention will be explained with reference to FIGS. 7a and 7b.

Referring to FIG. 7a, the IMDCT outputs "1" of the even-numbered blocks of the array V.sub.PE (1) for 1=32, 31, . . . and 17 wherein denotes time domain bin numbers corresponding to IMDCT outputs, are multiplied by the window coefficients of the even-numbered blocks of the window W.sub.E (1) for 1=0, 1, . . . , and 15 wherein "1" denotes bin numbers corresponding to the respective blocks. The multiplied values are negated and then the resultant values are stored in even-numbered registers R.sub.E (1) for 1=0, 1, . . . , and 15 (step 800), respectively. The hatched region in FIG. 7a indicates that the resultant values in this region should be negated. The IMDCT outputs of the even-numbered blocks of the array V.sub.PE (1), for 1=17, 18, . . . , and 31, are multiplied by the window coefficients of the even-numbered blocks of the window W.sub.E (1), for 1=17, 18, . . . , and 31, and the resultant values are stored in the even-numbered registers R.sub.E (1), for 1=17, 18, . . . , and 31 (step 810), respectively. A zero is stored in the even-numbered register R.sub.E (1) for 1=16 (step 820). The IMDCT outputs of the odd-numbered blocks of the array V.sub.PO (1), for 1=32, 33, . . . , and 48 are multiplied by the window coefficients of the odd-numbered blocks of the window W.sub.O (1), for 1=0, 1, . . . , and 16, and the resultant values are stored in the odd-numbered register R.sub.O (1), for 1=0, 1, . . . , and 16 (step 830), respectively. The IMDCT outputs of the odd-numbered blocks of the array V.sub.PE (1), for 1=47, . . . , and 33 are multiplied by the window coefficients of the odd-numbered blocks of the window W.sub.O (1), for 1=17, . . . , and 31 and the resultant values are stored in the odd-numbered register R.sub.O (1), for 1=17, . . . , and 31 (step 850), respectively. At step 850, the resultant values of windowing for each block V.sub.B of the array V.sub.P are stored in the registers R.sub.E (1) and R.sub.O (1), respectively. That is, the windowing resultant values of 32 samples are stored in the 16 registers, respectively. The values in the registers are overlapped and added together to produce 32 PCM output values which are the final resultant values (step 860). After step 850, the 32 samples of the array V.sub.P are shifted to the right, and new 32 IMDCT outputs are stored (step 870). That is, whenever new 32 IMDCT outputs are inputted, the windowing and overlap/add operations are performed to produce the final 32 PCM outputs.

In the above-described embodiment, the windowing operation for the even-numbered blocks of the array V.sub.PE is simultaneously performed and the results of the windowing are stored in the even-numbered registers. Also, the windowing operation for the odd-numbered blocks of the array V.sub.PO is simultaneously performed, and the results of the windowing are stored in the odd-numbered registers. Thereafter, the resultant values in the registers are overlapped and added together to produce the final results. However, it is also possible that the windowing operation for the odd-numbered blocks of the array is first performed and then the windowing operation for the even-numbered blocks of the array is performed. Registers for storing the computation results for the respective array blocks are separately provided, increasing the size of the registers. To ameliorate this problem, the windowing operation is consecutively performed and the results of the windowing are stored in the registers. The results stored in the registers are then added to the resultant values produced during a subsequent windowing operation to store the interim resultant values.

According to the windowing method for a dual-mode audio decoder of the present invention, only 32 IMDCT outputs for each block may be stored for windowing by utilizing the properties of 64 IMDCT outputs for each block of the MPEG V-array, reducing memory size.

As a result, the IMDCT method and circuit for a dual-mode audio decoder according to the present invention can perform the IMDCT of the signal encoded using the MPEG and Dolby AC-3 standard by utilizing a common FFT circuit, thus reducing the necessary hardware. Also, according to the windowing method for a dual-mode audio decoder of the present invention, the number of IMDCT outputs stored for windowing is reduced by utilizing the properties of the IMDCT outputs of MPEG which in turn reduces memory size.

Having described and illustrated the principles of the invention in a preferred embodiment thereof, it should be apparent that the invention can be modified in arrangement and detail without departing from such principles. I claim all modifications and variations coming within the spirit and scope of the following claims.

## Claims

1. A method for dual-mode audio decoding using an Inverse Modified Discrete Cosine Transform, comprising: sequence to generate an AC-3 function; MPEG function;

2. The method of claim 1 wherein forming an MPEG sequence includes adding a mirror image of the received MPEG bit stream to the received MPEG bit stream.

3. The method of claim 1 wherein performing an inverse fast Fourier transform includes performing a 128-point or a 64-point inverse fast Fourier transform.

4. The method of claim 1 wherein performing an fast Fourier transform includes performing a 64-point fast Fourier transform.

5. An Inverse Modified Discrete Cosine Transform ("IMDCT") method for dual-mode audio decoding, comprising: sequence;

6. The IMDCT method of claim 5 wherein forming an MPEG sequence includes adding a mirror image of the MPEG bit stream to the MPEG bit steam received.

7. The IMDCT method of claim 5 wherein applying an FFT to the pre-twiddled AC-3 sequence includes applying a 128-point or a 64-point IFFT.

8. The IMDCT method of claim 5 wherein applying an FFT to the MPEG sequence includes applying a 64-point FFT to the MPEG sequence.

9. An Inverse Modified Discrete Cosine Transform ("IMDCT") circuit for a dual-mode audio decoder, comprising; and MPEG output signals; transforming the AC-3 and MPEG bit streams; coefficients; parts of AC-3 and MPEG sequences; third storage means and the ROM; and first and second storage means for generating control signals for controlling the butterfly module, the address generator, and the first and second storage means.

10. The IMDCT circuit of claim 9 wherein the butterfly module performs a 128-point or a 64-point IFFT on the AC-3 sequence.

11. The IMDCT circuit of claim 9 wherein the butterfly module performs a 64-point FFT on the MPEG sequence.

12. An Inverse Modified Discrete Cosine Transform ("IMDCT") circuit for a dual-mode audio decoder, comprising; inverse Fourier transforming an AC-3 input bit stream and Fourier transforming and twiddling an MPEG input bit stream; streams and storing a sequence of real parts of an AC-3 and an MPEG sequences; the AC-3 and MPEG sequences; second, and third random access memories; and the read only memory, the address generating circuit, and the first, second, and third random access memories.

13. The IMDCT circuit of claim 12 wherein the butterfly module performs a 128-point or a 64-point inverse fast Fourier transform on the AC-3 sequence.

14. The IMDCT circuit of claim 12 wherein the butterfly module performs a 64-point fast Fourier transform on the MPEG sequence.