Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present invention. In the preferred embodiments of the present invention, specific technical terminologies are used for the clarity of the contents. It is to be understood, however, that the present invention is not limited to the specific terminologies and each specific terminology includes all technical synonyms operating in a similar way in order to accomplish similar objects.
FIG. 1 is a block diagram showing the construction of an audio system including an audio data processing apparatus according to an exemplary embodiment of the present invention.
Referring to FIG. 1, the audio system 100 can receive an encoded bit stream on a frame basis, process the received bit stream, and output a processing result as an audio signal. The audio system 100 may be configured in the form of a portable device, such as a mobile communication terminal, or may be a fixed system, such as the existing digital hi-fi system.
The audio system 100 can include a decoding unit 10, a domain transform unit 20, a data processing unit 30, and an audio output unit 40.
The decoding unit 10 can receive an external encoded bit stream on a frame basis, decode the received bit stream, and output audio data of the frequency domain. For example, the bit stream can include encoded data of an N (N is an integer greater than 2) number of channels, having the frequency domain. The decoding unit 10 can decode the bit stream on a channel basis and output audio data of an N number of the channels, having the frequency domain.
The domain transform unit 20 can transform the audio data of the frequency domain, received from the decoding unit 10, into audio data of the time domain by inversely transforming the audio data of the frequency domain. For example, the domain transform unit 20 can transform the decoded audio data of an N number of the channels, having the frequency domain, into the audio data of an N number of channels (i.e., N pieces of channel data), having the time domain and transmit the audio data of an N number of the channels to the data processing unit 30.
The data processing unit 30 can receive the N pieces of channel data of the time domain from the domain transform unit 20, perform down-mix and windowing processes on the N pieces of received channel data, and output M (M is an integer less than N) pieces of output channel data. The output channel data can include a number of channel samples.
For example, the data processing unit 30 can perform a windowing operation for accumulating results, generated while sequentially operating the N pieces of channel data for every channel using a down-mix coefficient, and operating the last input channel data for configuring an output channel using the down-mix coefficient. The data processing unit 30 may store the M pieces of output channel data on which the down-mix and windowing processes have been performed in a specific buffer (e.g., a Pulse Code Modulation (PCM) buffer) of the audio output unit 40.
The audio output unit 40 can receive the M pieces of output channel data from the data processing unit 30 and output the processing results through an M number of speakers. For example, the audio output unit 40 can process the M pieces of output channel data stored in the PCM buffer and output the processing results through an M numbers of output speakers corresponding to an M number of the output channels.
FIG. 2 is a block diagram showing the construction of the data processing unit 30 shown in FIG. 1.
Referring to FIGS. 1 and 2, the data processing unit 30 can perform the down-mix and windowing processes on the N pieces of channel data received from the domain transform unit 20 and output the M pieces of output channel data. The data processing unit 30, as shown in FIG. 2, can include memory 36 and an operation unit 31.
The memory 36 stores the N pieces of channel data on a channel basis, received from the domain transform unit 20, and also stores accumulation data calculated by the operation unit 31. The memory 36 can provide the operation unit 31 with each piece of the channel data and each piece of the accumulation data at the request of the operation unit 31.
The memory 36 may also store a down-mix coefficient table for the down-mix operation and a window coefficient table for the windowing operation. The down-mix coefficient table refers to information in which down-mix coefficients by which respective pieces of the channel data will be multiplied when the down-mix operation is performed are configured in the form of a table. Further, the window coefficient table refers to information in which window coefficients according to window types applied to a frame are configured in the form of a table.
The operation unit 31 can refer to an operation apparatus (e.g., a core processor) which is operated according to a predetermined down-mix and windowing algorithm. The down-mix and windowing algorithm can include various pieces of information which can be used to control the processing sequence of channel data, the number of output channels, information about input channels and output channels, and a procedure of the down-mix and windowing operations.
The operation unit 31 can include an arithmetic logic unit (ALU) 33 for performing operations and a register unit 34. The ALU 33 can control the down-mix and windowing processes according to the down-mix and windowing algorithm. The register unit 34 can include a number of registers to be used when the operations of the ALU 33 are performed.
The operation unit 31 can load any one piece of the channel data, from among the N pieces of channel data, and previous accumulation data from the memory 36, operate the loaded channel data using a down-mix coefficient, and determine whether the loaded channel data are the last input channel data for configuring an output channel.
If, as a result of the determination, the loaded channel data are determined to be the last input channel data, the operation unit 31 can operate the operated channel data and the previous accumulation data using a window coefficient. However, if, as a result of the determination, the loaded channel data are determined not to be the last input channel data, the operation unit 31 can add the operated channel data and the previous accumulation data and store the addition result in the memory 36.
The operation unit 31 may also determine whether both the down-mix and windowing processes or only the windowing process will be performed on the N pieces of input channel data by comparing the number of input channel data (i.e., the number of input channels) and the number of output channels M.
FIG. 3 is a flowchart illustrating the operation of the operation unit 31 and it shows a method of processing audio data according to an exemplary embodiment of the present invention.
Referring to FIGS. 1 to 3, first, the operation unit 31 can load any one piece of the channel data, from among the N pieces of channel data, and previous accumulation data from the memory 36 at step S1. The channel data can include a number of channel samples. For example, the operation unit 31 can access the memory 36, fetch a number of channel samples, included in any one piece of the channel data, from the memory 36, and store the fetched channel samples in the register unit 34. Here, the channel samples are stored in the respective registers of the register unit 34.
The operation unit 31 can operate the loaded channel data using a down-mix coefficient at step S2. For example, the operation unit 31 can extract a down-mix coefficient corresponding to the loaded channel data from the down-mix coefficient table by searching for the down-mix coefficient table stored in the memory 36 and multiply each of the channel samples, stored in the register unit 34, by the extracted down-mix coefficient.
Next, the operation unit 31 can determine whether the loaded channel data are the last input channel data for configuring an output channel (i.e., any one of an M number of the output channels) at step S3. The sequence of the down-mix operations for the N pieces of channel data can be previously determined by the down-mix and windowing algorithm. Accordingly, the operation unit 31 can determine whether the current loaded channel data are the last input channel data based on the sequence of the down-mix operations.
For example, it is assumed that the N pieces of input channel data include five pieces of channel data (e.g., a piece of left (L) channel data, a piece of center (C) channel data, a piece of right (R) channel data, a piece of left surround (Ls) channel data, and a piece of right surround (Rs) channel data) and pieces of output channel data include 2 pieces of channel data (e.g., a piece of L output channel data and a piece of R output channel data). In this case, the down-mix and windowing algorithm can instruct the operation unit 31 to perform operations using down-mix coefficients in order of the L channel data, the C channel data, the Ls channel data, and the Rs channel data in order to configure, for example, L output channel data. Here, the operation unit 31 can determine whether the loaded channel data are the last input channel data for configuring the L output channel data by checking whether the current loaded channel data are the Rs channel data.
If, as a result of the determination, the loaded channel data are determined to be the last input channel data for configuring the output channel, the operation unit 31 can operate the channel data, operated using the down-mix coefficient, and the previous accumulation data using a window coefficient at step S4. For example, the operation unit 31 can add the operated channel data to the previous accumulation data using the down-mix coefficient, extract a window coefficient corresponding to a corresponding frame from the window coefficient table stored in the memory 36 by searching for the window coefficient table, and multiply the added accumulation data by the extracted window coefficient. The operation unit 31 can store the resulting data on which the windowing operation has been performed in a specific buffer (e.g., a PCM buffer) in order to transfer the data to the audio output unit 40.
However, if, as a result of the determination, the loaded channel data are determined not to be the last input channel data for configuring the output channel, the operation unit 31 can add the operated channel data to the previous accumulation data using the down-mix coefficient and store the added accumulation data in the memory 36 at step S5. The operation unit 31 can load the accumulation data stored in the memory 36, together with channel data having a next order, as previous accumulation data.
As described above, in the method of processing audio data according to the exemplary embodiment of the present invention, the windowing operation is performed simultaneously with the down-mix process for the last input channel data for configuring an output channel. Accordingly, there are advantages in that the number of access to the memory can be significantly reduced and the computational load can also be reduced.
Another exemplary embodiment of the present invention is described below. In the present embodiment, it is assumed that five pieces of external channel data (e.g., a piece of L channel data, a piece of C channel data, a piece of R channel data, a piece of Ls channel data, and a piece of Rs channel data) are inputted, and two pieces of output channel data (e.g., a piece of L output channel data and a piece of R output channel data) are outputted through the down-mix and windowing processes for the five pieces of channel data.
FIG. 4 is a flowchart illustrating a method of processing audio data according to another exemplary embodiment of the present invention. This figure shows a procedure of performing the down-mix and windowing processes on the four pieces of channel data other than the R channel data, from among the five pieces of external input channel data and outputting the L output channel data. Here, it is assumed that the four pieces of channel data are sequentially processed in order of the L channel data, the C channel data, the Ls channel data, and the Rs channel data according to the down-mix and windowing algorithm.
Referring to FIG. 4, first, the operation unit 31 loads the L channel data that should be first processed from the memory 36 at step S11. For example, the operation unit 31 can fetch channel samples included in the L channel data stored in the memory 36 and store them in the register unit 34. In this case, previous accumulation data do not exist because the L channel data are channel data that should be first processed.
The operation unit 31 extracts a down-mix coefficient, corresponding to the loaded L channel data, from the down-mix coefficient table and multiplies the loaded L channel data by the extracted down-mix coefficient at step S12. For example, the operation unit 31 may multiply each of the channel samples, stored in the register unit 34, by the extracted down-mix coefficient.
Next, the operation unit 31 determines whether the L channel data are the last input channel data (i.e., the Rs channel data) for configuring the L output channel data and stores the L channel data in the memory 34 as first accumulation data because the L channel data are not the last input channel data at step S13.
The process of the steps S11 to S13 can be expressed using the following equation, that is, math figure 1.
Here, L [0, 1, 2, ..., k] can indicate the L channel data having a k (k is an integer greater than 2) number of channel samples. a can indicate the down-mix coefficient corresponding to the L channel data. P1[0, 1, 2, ..., k] can indicate L channel data operated using the down-mix coefficient (i.e., the first accumulation data).
In the steps S11 to S13, the operation of loading data from the memory is performed once, and the operation of storing data in the memory is also performed once. Here, one time may refer to the unit for processing all the k channel samples.
Next, the operation unit 31 loads the C channel data that should be second processed from the memory 36 and previous accumulation data (i.e., the first accumulation data) at step S14. For example, the operation unit 31 can fetch channel samples included in the C channel data stored in the memory and store them in the register unit 34.
The operation unit 31 extracts a down-mix coefficient, corresponding to the loaded C channel data, from the down-mix coefficient table and multiplies the C channel data by the extracted down-mix coefficient at step S15. For example, the operation unit 31 can multiply each of the channel samples, stored in the register unit, by the extracted down-mix coefficient.
Next, the operation unit 31 determines whether the C channel data are the last input channel data for configuring the L output channel data (i.e., the Rs channel data), adds the C channel data to the first accumulation data because the C channel data are not the last input channel data, and stores the added data in the memory 36 as second accumulation data at step S16.
The process of the steps S14 to S16 can be expressed using the following equation, that is, math figure 2.
Here, C[0, 1, 2, ..., k] can indicate the C channel data having a k number of channel samples. b can indicate the down-mix coefficient corresponding to the C channel data. P1[0, 1, 2, ..., k] can indicate the first accumulation data. P2[0, 1, 2, ..., k] can indicate data in which the C channel data, operated using the down-mix coefficient, and the first accumulation data are added (i.e., the second accumulation data).
In the steps S14 to S16, the operation of loading data from the memory is performed twice, and the operation of storing data in the memory is performed once.
Next, the operation unit 31 loads the Ls channel data that should be third processed from the memory 36 and previous accumulation data (i.e., the second accumulation data) at step S17. For example, the operation unit 31 can fetch channel samples included in the Ls channel data stored in the memory 36 and store them in the register unit 34.
The operation unit 31 extracts a down-mix coefficient, corresponding to the loaded Ls channel data, from the down-mix coefficient table and multiplies the Ls channel data by the extracted down-mix coefficient at step S18. For example, the operation unit 31 can multiply each of the channel samples, stored in the register unit 34, by the extracted down-mix coefficient.
Next, the operation unit 31 determines whether the Ls channel data are the last input channel data for configuring the L output channel data (i.e., the Rs channel data), adds the Ls channel data to the second accumulation data because the Ls channel data are not the last input channel data, and stores the added data in the memory 36 as third accumulation data at step S19.
The process of the steps S17 to S19 can be expressed using the following equation, that is, math figure 3.
Here, Ls[0, 1, 2, ..., k] can indicate the Ls channel data having a k number of channel samples. c can indicate the down-mix coefficient corresponding to the Ls channel data. P2[0, 1, 2, ..., k] can indicate the second accumulation data. P3[0, 1, 2, ..., k] can indicate data in which the Ls channel data, operated using the down-mix coefficient, and the second accumulation data are added (i.e., the third accumulation data).
In the steps S17 to S19, the operation of loading data from the memory is performed twice, and the operation of storing data in the memory is performed once.
Next, the operation unit 31 loads the Rs channel data that should be fourth processed from the memory 36 and previous accumulation data (i.e., the third accumulation data) at step S20. For example, the operation unit 31 can fetch channel samples included in the Rs channel data stored in the memory and store them in the register unit 34.
The operation unit 31 extracts a down-mix coefficient, corresponding to the loaded Rs channel data, from the down-mix coefficient table and multiplies the Rs channel data by the extracted down-mix coefficient at step S21. For example, the operation unit 31 can multiply each of the channel samples, stored in the register unit 34, by the extracted down-mix coefficient.
Next, the operation unit 31 determines whether the Rs channel data are the last input channel data for configuring the L output channel data (i.e., the Rs channel data), adds the Rs channel data to the third accumulation data because the Rs channel data are the last input channel data, and operates the added data using a window coefficient at step S22. For example, the operation unit 31 can multiply a value in which the Rs channel data, operated using the down-mix coefficient, and the third accumulation data are added by the window coefficient.
The process of the steps S20 to S22 can be expressed using the following equation, that is math figure 4.
Here, Rs[0, 1, 2, ..., k] can indicate the Rs channel data having a k number of channel samples. d can indicate the down-mix coefficient corresponding to the Rs channel data. P3[0, 1, 2, ..., k] can indicate the third accumulation data. W[0, 1, 2, ..., k] can indicate the window coefficient. Pout[0, 1, 2, ..., k] can indicate data in which the addition of the Rs channel data, operated using the down-mix coefficient, and the third accumulation data are multiplied by the window coefficient (i.e., the L channel output data).
In the steps S20 to S22, the operation of loading data from the memory is performed three times, and the operation of storing data in the memory is performed once.
The process of performing the down-mix and windowing processes on the four channel data and outputting the L channel output data has been described above with reference to FIG. 4. During the process, the operation of loading data from the memory 36 is performed eight times, and the operation of storing data in the memory 36 is performed four times. In the prior art, the down-mix process and the windowing process are separated from each other. Accordingly, the memory 36 must be accessed a lot in order to perform the process of performing the down-mix and windowing processes on the four channel data and outputting the L channel output data according to the exemplary embodiment of the present invention. For example, in the prior art, after the down-mix process is completed, resulting data have to be stored in the memory, and the stored data must be loaded again in order to perform the windowing process. Accordingly, unnecessary access to the memory can be generated.
FIG. 5 is a flowchart illustrating a method of processing audio data according to yet another exemplary embodiment of the present invention. This figure shows a process of down-mixing and windowing the four pieces of channel data other than the L channel data, from among the five pieces of external input channel data, and outputting the R output channel data. Here, it is assumed that the four pieces of channel data are sequentially processed in order of the R channel data, the C channel data, the Ls channel data, and the Rs channel data according to the down-mix and windowing algorithm.
Referring to FIG. 5, the procedure of down-mixing and windowing the four pieces of channel data and outputting the R output channel data can be performed according to the same concept as the procedure of down-mixing and windowing the four pieces of channel data and outputting the L output channel data.
The operation unit 31 loads the R channel data at step S31, operates the R channel data using a down-mix coefficient at step S32, and stores first accumulation data in the memory 36 because the R channel data are the last input channel data at step S33. Next, the operation unit 31 loads the C channel data at step S34, operates the C channel data using a down-mix coefficient at step S35, and stores second accumulation data in the memory 36 because the C channel data are the last input channel data at step S36.
Next, the operation unit 31 loads the Ls channel data at step S37, operates the Ls channel data using a down-mix coefficient at step S38, and stores third accumulation data in the memory 36 because the Ls channel data are not the last input channel data at step S37. Next, the operation unit 31 loads the Rs channel data at step S40, operates the Rs channel data using a down-mix coefficient at step S41, adds the Rs channel data, operated using the down-mix coefficient, and the third accumulation data because the Rs channel data are the last input channel data, and operates the added data using a window coefficient at step S42.
While the invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.