These and the other objects, advantages and features of the invention will become apparent from the following description thereof taken in conjunction with the accompanying drawings which illustrate a specific embodiment of the invention.
In the drawings:
Hereinafter, the embodiments of the present invention will be described with reference to the accompanying drawings.
An audio signal decoder according to the first embodiment of the present invention includes first and second decoding units which respectively decode first and second encoded audio signals; a memory which stores data under decoding/decoded by the first and second decoding units; a selection unit which selects either one of the first and second decoding units, as a device which has access to the memory. The selection unit switches between the first and second decoding units, in response to a completion notification, from each of the first and second decoding units, indicating that the decoding process for a predetermined unitary amount is completed. This configuration allows the decoding units to share the memory, thereby reducing required memory size.
The prefetch units 105a and 106a fetch first and second encoded audio signals, from a recording medium or from a digital broadcasting tuner, so as to store the signals in the input buffers 105b and 106b, respectively.
The input buffers 105b and 106b temporarily hold the first and second encoded audio signals, respectively.
The decoding unit 101, which serves as a first decoding unit and a first determination unit, decodes the first encoded audio signal held in the input buffer 105b, on a first predetermined unitary amount basis. Specifically, the decoding unit 101 starts decoding when instructed to start decoding by the selection unit 104 and the first predetermined unitary amount of first encoded audio signal is held in the input buffer 105b. When the decoding of the first predetermined unitary amount of the first encoded audio signal is completed, the decoding unit 101 outputs a completion notification. Furthermore, the decoding unit 101 outputs a completion notification without starting decoding, when instructed to starting decoding by the selection unit and the first predetermined unitary amount of the first encoded audio signal is not held in the input buffer 105b. This eliminates idle time caused by underflow which occurs in the input buffer 105b. The first predetermined unitary amount may be defined by the method in which the first encoded audio signal is encoded.
The decoding unit 102, which serves as a second decoding unit and a second determination unit, decodes the second encoded audio signal held in the input buffer 106b on a second predetermined unitary amount basis. Specifically, the decoding unit 102 starts decoding when instructed to start decoding by the selection unit 104 and the second predetermined unitary amount of the second encoded audio signal is held in the input buffer 106b. When the decoding of the second predetermined unitary amount of the second encoded audio signal is completed, the decoding unit 102 outputs a completion notification. Furthermore, the decoding unit 102 outputs a completion notification without starting decoding, when instructed to start decoding by the selection unit and the second encoded audio signal is not held in the input buffer 106b. This eliminates idle time caused by underflow which occurs in the input buffer 106b. The second predetermined unitary amount may be defined by the method in which the second encoded audio signal is encoded.
The memory resource 103 is accessed by either one of the decoding units 101 and 102, selected by the selection unit 104. The memory resource 103 stores data under decoding/decoded by the decoding units 101 and 102. The decoding units 101 and 102 output a completion notification to each unitary frame, thereby minimizing the work area required for holding data under decoding.
The selection unit 104 selects which one of the decoding units 101 and 102 can obtain access to the memory resource 103.
In response to the completion notification from each of the decoding units 101 and 102, the completion notifying unit 107 notifies the selection unit 104 of such fact.
Referring to
On the other hand, when it is determined that a sufficient amount of the audio signal to complete the decoding process is not collected in the input buffer 105b/106b (S303: NO), the decoding unit 101/decoding unit 102, without performing the decoding process (S305), notifies the selection unit 104 through the completion notifying unit 107, that the decoding process has completed (S306). In response to the notification, the selection unit 104 selects either one from the decoding units again.
As shown in
The present embodiment relates to the case in which switching operation is performed between the two decoding units 101 and 102. It is needless to say, however, that switching operation is similarly performed among decoding units of three or larger.
An audio signal decoder according to a second embodiment of the present invention includes a timer unit which outputs a timeout signal periodically. When a timeout signal is outputted from the timer unit, and a completion notification is outputted from one decoding unit instructed to start a decoding process, a selection unit instructs the other decoding unit, different from the decoding unit which has outputted the completion notification, to start a decoding process. This configuration makes it easy to abide by time limits in a decoding process and allows the performance of switching between decoding processes, thereby reducing the required memory size for the system.
A timer unit 405 outputs a timeout signal periodically. This period is preferably set so as to satisfy the deadline by which each of the decoding units 101 and 102 outputs a decoding process result. The timer unit 405 may issue a timer interrupt for input to the selection unit 404.
When a timeout signal is outputted from the timer unit 405, and a completion notification is outputted from one decoding unit most recently instructed to start a decoding process, the selection unit 404 instructs the other decoding unit, different from the decoding unit which has outputted the completion notification, to start a decoding process.
Referring to
Either one of the decoding units 101 and 102, which has been instructed to start a decoding process, performs a decoding process for one frame, and then outputs a completion notification after the decoding process (S604).
As has been described above, according to the audio signal decoder in the present embodiment, the selection unit 404 performs selection in response to the timeout signal generated by the timer unit, so that switching is performed between decoding processes while abiding by time limits in the decoding process, thereby reducing the required memory size for the system.
In the audio signal decoder according to the present embodiment, the configuration may be such that the decoding unit 101 does not determine whether or not the first encoded audio signal for one frame is held in the input buffer 105b before starting a decoding process. This is because the time interval between the timeout signals is set to be long enough to complete decoding for one frame, even when the first encoded audio signal for one frame is not yet held.
The second embodiment relates to the configuration in which the selection unit starts operating in response to the timeout signal outputted by the timer unit 405. However, in addition to the configuration according to the first embodiment, where decoding process is started by a completion notification, decoding process may be started by a specific event such as the completion of inputting the encoded audio signal for one frame. An audio signal decoder according to a third embodiment of the present invention includes a notification unit which outputs an event notification indicating that the first encoded audio signal held in the input buffer 105b has reached a predetermined amount (equivalent to one frame), when the first encoded audio signal held in the input buffer 105b reaches a predetermined amount. The selection unit performs switching in response to the event notification so as to select the decoding unit 101, while in response to the completion notification from the decoding unit 101 so as to select the decoding unit 102. The selection unit thus gives the higher priority to the decoding unit 101 than the decoding unit 102. This configuration allows the decoding unit 101 to perform real time operation, and the decoding unit 102 to perform best-effort operation.
An event notifying unit 905 monitors the data amount of the first encoded audio signal held in the input buffer 105b, so as to output an event notification indicating that the data has reached the amount equivalent to one frame, when the data reaches the amount equivalent to one frame. Note that the second encoded audio signal held in the input buffer 106b is not monitored.
The selection unit 904 selects the decoding unit 101 in response to the event notification outputted from the event notifying unit 905, and selects the decoding unit 102 in response to the completion notification, received from the decoding unit 101, indicating the completion of the decoding of the first encoded audio signal for one frame. In the case where the decoding unit 102 is in the middle of decoding when an event notification is outputted from the event notifying unit 905, the selection unit 904 selects the decoding unit 101 after forcing suspension or completion on the decoding unit 102.
This configuration allows the decoding unit 101 to perform real time operation, and the decoding unit 102 to perform best-effort operation, even in the case where the decoding unit 101 and the decoding unit 102 have low processing capabilities. Taking digital broadcasting as an example, in digital broadcasting, the two types of signals have to be decoded concurrently: an original signal and a data signal. In ordinary cases, while an original signal has to be decoded in real time, a data signal is temporarily held in a storage area and then decoded with best effort. In the present embodiment, selection is switched to original signal decoding in response to the completion of inputting of an original signal, while a data signal is being decoded at the same time. After the completion of original signal decoding, selection is switched again to data signal decoding.
The event at which decoding is started is not limited to the completion of inputting an encoded audio signal for one frame. For example, the event may be the completion of outputting a decoded audio signal for one frame, a few frames ahead of the current frame.
The event notifying unit 905 may monitor the data amount of the second encoded audio signal held in the input buffer 106b, so as to output an event notification indicating that the data has reached the amount equivalent to one frame when the data reaches the amount equivalent to one frame. In the case where the decoding unit 101 and the decoding unit 102 have high processing capabilities, both of the units can perform real time operation.
The above embodiments relate to the case in which the memory is shared as a resource, but the configuration may be such that the decoding units 101 and 102 are shared partially or entirely in addition to the memory.
Although the present invention has been fully described by way of examples with reference to the accompanying drawings, it is to be noted that various changes and modifications will be apparent to those skilled in the art. Therefore, unless otherwise such changes and modifications depart from the scope of the present invention, they should be construed as being included therein.
The present invention is applicable to an audio signal decoder which decodes plural kinds of encoded audio signals, and a resource access control method to be performed using the audio signal decoder. Examples of this application include a digital TV set, a digital broadcasting tuner, and an audio player.
Number | Date | Country | Kind |
---|---|---|---|
2006-281604 | Oct 2006 | JP | national |