JP4612436B2 - Audio decoding device - Google Patents

Audio decoding device Download PDF

Info

Publication number
JP4612436B2
JP4612436B2 JP2005054632A JP2005054632A JP4612436B2 JP 4612436 B2 JP4612436 B2 JP 4612436B2 JP 2005054632 A JP2005054632 A JP 2005054632A JP 2005054632 A JP2005054632 A JP 2005054632A JP 4612436 B2 JP4612436 B2 JP 4612436B2
Authority
JP
Japan
Prior art keywords
sleep
task
main task
executed
count
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005054632A
Other languages
Japanese (ja)
Other versions
JP2006243016A (en
Inventor
毅志 安藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2005054632A priority Critical patent/JP4612436B2/en
Publication of JP2006243016A publication Critical patent/JP2006243016A/en
Application granted granted Critical
Publication of JP4612436B2 publication Critical patent/JP4612436B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)

Description

本発明は、圧縮されたストリームを復号するオーディオデコード装置に関し、特に、動作中の場合でもCPUが処理する仕事がない状態を適切に検出してスリープ状態に移行することによって、消費電流の削減を可能とするオーディオデコード装置に関する。   The present invention relates to an audio decoding apparatus that decodes a compressed stream, and in particular, reduces current consumption by appropriately detecting a state in which there is no work to be processed by a CPU even during operation and shifting to a sleep state. The present invention relates to an audio decoding device that can be used.

CPUによって制御されるコンピュータ装置の普及により、電力消費を削減する試みがなされてきている。   With the widespread use of computer devices controlled by CPUs, attempts have been made to reduce power consumption.

例えば、マイクロプロセッサに配置されるカウンタの計数に基づいて、マイクロプロセッサの使用度を予測し、その予測された使用度と閾値とを比較することによって、マイクロプロセッサの電力消費を選択的に調整することが提案されている(例えば、特許文献1)。   For example, based on the count of a counter placed in the microprocessor, the microprocessor power consumption is selectively adjusted by predicting the usage of the microprocessor and comparing the predicted usage with a threshold value. Has been proposed (for example, Patent Document 1).

また、DMA転送要求信号が所定時間以上出力されない場合、CPUをスリープモード、或いは、電源停止モードへ遷移するように制御する印刷装置が提案されている(例えば、特許文献2)。   In addition, a printing apparatus has been proposed that controls the CPU to transition to a sleep mode or a power stop mode when a DMA transfer request signal is not output for a predetermined time or longer (for example, Patent Document 2).

更に、マルチタスクOSによるソフトウェア制御システム環境において、時間制約があり且つ付加変動のある複数のタスクを実行させる際に、プロセッサの消費電力を効果的に節減することが提案されている(例えば、特許文献3)。
特開平11−161383号公報 特開2003−337713号公報 特開2001−180083号公報
Furthermore, in a software control system environment using a multitasking OS, it has been proposed to effectively reduce the power consumption of a processor when executing a plurality of tasks with time constraints and additional fluctuations (for example, patents). Reference 3).
Japanese Patent Laid-Open No. 11-161383 JP 2003-337713 A Japanese Patent Laid-Open No. 2001-180083

しかしながら、オーディオデコード装置では、従来、非動作時になったときにのみスリープモードになっていた。その結果、動作中であるにも関わらずCPUが処理する仕事がない場合でもメインループを延々と回っているだけで電流を消費していた。   However, the audio decoding apparatus is conventionally in the sleep mode only when it is not operating. As a result, even when the CPU is in operation and there is no work to be processed by the CPU, current is consumed only by going around the main loop.

本発明は、上述の問題点に鑑みてなされたものであって、動作中であっても、CPUが処理する仕事がない状態を適切に検出してスリープ状態に移行することによって、消費電流の削減を可能とするオーディオデコード装置を提供することを目的とする。   The present invention has been made in view of the above-described problems. Even when the CPU is in operation, the CPU appropriately detects a state where there is no work to be processed, and shifts to a sleep state. An object of the present invention is to provide an audio decoding device that can be reduced.

上記課題を解決するため、開示されるオーディオデコード装置は、圧縮されたストリームを復号するCPUによって該復号に係る主要タスクが実行されたか否かを判断する主要タスク実行判断手段と、前記主要タスクが実行されなかったと判断されると、スリープカウントをインクリメントするスリープカウント手段と、前記スリープカウント手段によって前記スリープカウントがインクリメントされると、前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいか否かを判断する最大回数判断手段と、前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいと判断されると、該回数を該最大回数に代入する最大回数代入手段と、前記主要タスクが実行されたと判断されると、前記スリープカウントをゼロクリアするスリープカウント初期化手段と、前記CPUの現在のステートが動作中であって、かつ、前回のスリープ状態への遷移時での前記主要タスクが連続して実行された前記最大回数をスリープ遷移閾値とし、前記スリープカウントがスリープ遷移閾値を越えているか否かを判断するスリープ判断手段と、前記スリープカウントがスリープ遷移閾値を越えている場合、スリープ状態に遷移するスリープ状態遷移手段と、スリープ状態が解除されると、音声出力するために復号されたストリームを蓄積するバッファが所定容量以上有るか否かを判断するバッファ容量判断手段と、前記バッファが所定容量以上有る場合、前記スリープ遷移閾値に前記主要タスクが連続して実行された最大回数を代入する閾値代入手段とを有するように構成される。 To solve the above problems, the audio decoding apparatus disclosed, a main task execution determining means for determining whether the main task of the said decoding is performed by the CPU to decode the compressed stream, the primary task is When it is determined that the main task is not executed, a sleep count unit that increments a sleep count, and when the sleep count is incremented by the sleep count unit, the number of times that the main task is continuously executed A maximum number of times determination means for determining whether or not the maximum number of times the main task has been executed, and the number of times that the main task has been continuously executed is determined to be greater than the maximum number of times that the main task has been continuously executed. If that, the maximum number assignment unit that assigns a該回number said maximum number, the primary task is If it is determined that the row, and the sleep count initialization means for zero-clearing the sleep count, the state at present even during the operation of the CPU, and is the primary task at the time of transition to a previous sleep state the continuously been executed the maximum number of times a sleep transition threshold, and a sleep judging means for the sleep count to determine whether it exceeds the sleep transition threshold, if the sleep count exceeds the sleep transition threshold, A sleep state transition means for transitioning to a sleep state; a buffer capacity determination means for determining whether or not a buffer for storing a decoded stream for audio output when the sleep state is canceled has a predetermined capacity or more; When the buffer has a predetermined capacity or more, the main task is continuously executed at the sleep transition threshold. Configured to have a threshold assignment means that assigns the maximum number of times.

このようなオーディオデコード装置では、連続して主要タスクが何も実行されない回数が閾値を超えると、CPUのスリープ動作に遷移するように制御可能となる。したがって、低消費電流化を実現することができる。   In such an audio decoding device, when the number of times that no main task is continuously executed exceeds a threshold, control can be performed so as to shift to a sleep operation of the CPU. Therefore, a reduction in current consumption can be realized.

本発明は、連続して主要タスクが実行されない回数をカウントして、その値が閾値を超えると、CPUのスリープ動作に遷移することで、低消費電流のオーディオデコード装置を構成することが可能である。更に、以前に連続して主要タスクが実行された回数をカウントして、この情報に基づいて適応的にスリープ遷移閾値を動的に決定することができる。したがって、効率的にスリープ動作に遷移可能となる。   According to the present invention, it is possible to configure an audio decoding device with low current consumption by counting the number of times that a main task is not executed continuously and, when the value exceeds a threshold value, transitioning to a sleep operation of the CPU. is there. Furthermore, the number of times that the main task has been executed in succession can be counted, and the sleep transition threshold value can be dynamically determined based on this information. Therefore, it is possible to efficiently shift to the sleep operation.

以下、本発明の実施の形態を図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明に係るオーディオ装置の原理を説明するためのブロック図である。図1において、オーディオ装置100は、CPU(Central Processing Unit)及びメインメモリ110と、DMA転送回路120と、SDRAM130と、DMA転送回路及びPCM出力回路140とで構成される。ハードウェア構成としては、DMA転送回路120とDMA転送回路及びPCM出力回路140とは一つである。また、図1では、CPUのファームウェアで処理する部分をタスクとして示している。   FIG. 1 is a block diagram for explaining the principle of an audio apparatus according to the present invention. In FIG. 1, the audio device 100 includes a CPU (Central Processing Unit) and a main memory 110, a DMA transfer circuit 120, an SDRAM 130, a DMA transfer circuit and a PCM output circuit 140. As a hardware configuration, the DMA transfer circuit 120 and the DMA transfer circuit / PCM output circuit 140 are one. Further, in FIG. 1, a portion processed by the CPU firmware is shown as a task.

ストリーム及びデータの処理は次のようになる。   Processing of the stream and data is as follows.

まず、上位CPUからストリームバッファ132へAudio(オーディオ)の圧縮されたストリームが順次格納される。ストリームが溜まり、かつ、バンクバッファとして構成されるPES(Packetized Elementary Stream)バッファ112に1面以上の空きがあると、PES転送タスクTSK1が実行される。これは、アクセス時間の遅いSDRAM130からCPUが高速に処理できるメインメモリへストリームを転送する処理である。   First, an audio (audio) compressed stream is sequentially stored in the stream buffer 132 from the upper CPU. If a stream accumulates and there is one or more free space in a PES (Packetized Elementary Stream) buffer 112 configured as a bank buffer, the PES transfer task TSK1 is executed. This is a process of transferring a stream from the SDRAM 130 having a slow access time to a main memory that can be processed at high speed by the CPU.

このPES転送タスクTSK1によって、256バイト単位でPESバッファ112へデータが転送される。このタスクはDMA転送回路120への起動処理であって、実際の転送はDMA転送(DMA_DS)で行われる。   By this PES transfer task TSK1, data is transferred to the PES buffer 112 in units of 256 bytes. This task is a startup process to the DMA transfer circuit 120, and the actual transfer is performed by DMA transfer (DMA_DS).

1面以上のPESバッファ112があり、かつ1面以上のリングバッファとして構成されるES(Elementary Stream)バッファ114の空きがあると、ES抽出タスクTSK2が実行される。ES抽出タスクTSK2は、PESストリームからAudioのESデータを抽出する処理である。   If there is one or more PES buffers 112 and there is a free ES (Elementary Stream) buffer 114 configured as one or more ring buffers, the ES extraction task TSK2 is executed. The ES extraction task TSK2 is a process of extracting Audio ES data from the PES stream.

ESバッファ114は、1ES以上溜まり、かつ、PCMバッファ134に1面以上の空きがあると、デコード処理タスクTSK3が実行される。デコード処理タスクTSK3は、符号化されたストリームを復号する本体の処理である。復号されたデータは、単一バッファとして構成される一時バッファ116へ一旦格納され、PCM転送タスクTSK4が連動して実行される。PCM転送タスクTSK4は、DMA転送回路120への起動処理で実際の転送は、DMA転送(DMA_ETC)で行われる。   When the ES buffer 114 accumulates 1 ES or more and the PCM buffer 134 has one or more vacancy, the decoding process task TSK3 is executed. The decoding process task TSK3 is a process of the main body for decoding the encoded stream. The decrypted data is temporarily stored in the temporary buffer 116 configured as a single buffer, and the PCM transfer task TSK4 is executed in conjunction with it. The PCM transfer task TSK4 is an activation process to the DMA transfer circuit 120, and the actual transfer is performed by DMA transfer (DMA_ETC).

PCMバッファ134に1面以上存在すると、PCM出力タスクTSK5が実行される。PCM出力タスク5は、デコードしたデータを一定レートでシリアルで外部端子へ転送する。PCM出力タスク5は、DMA転送回路120への起動処理で実際の転送は、DMA転送(DMA_DP)で行われる。   If one or more pages exist in the PCM buffer 134, the PCM output task TSK5 is executed. The PCM output task 5 serially transfers the decoded data to the external terminal at a constant rate. The PCM output task 5 is an activation process to the DMA transfer circuit 120, and actual transfer is performed by DMA transfer (DMA_DP).

一旦、PCM出力タスクTSK5が実行され、PCMが出力され始め動作中になると、PCMバッファ134が枯渇しないように継続的に、上記処理を滞りなく処理していく必要がある。PCMバッファ134が枯渇すると音切れなどの状態になり望ましくない。PCMバッファ134は、SDRAM130に11面確保されて、ストリームが供給され続けると、これが一杯になるまでデコード処理が行われる。このPCMバッファ134を十分に蓄えておくことで、一時的に処理が重くなってもPCM出力が途切れることなく出力できる。   Once the PCM output task TSK5 is executed and the PCM starts to be output, it is necessary to continue the above processing without delay so that the PCM buffer 134 is not exhausted. When the PCM buffer 134 is exhausted, the sound is cut off, which is not desirable. If eleven PCM buffers 134 are secured in the SDRAM 130 and the stream continues to be supplied, the decoding process is performed until the stream becomes full. By sufficiently storing the PCM buffer 134, the PCM output can be output without interruption even if the processing temporarily becomes heavy.

このように、一定時間にデコード処理を行う必要性から、一定処理単位をタスクとして処理を分割し、その前後で並列に処理ができるようにバッファリングする構成になっている。そして、各タスクの実行条件は、入力側と出力側のバッファの状態によって決定される。   As described above, since it is necessary to perform the decoding process at a fixed time, the process is divided by using a fixed processing unit as a task, and buffering is performed so that the processes can be performed in parallel before and after the divided process. The execution condition for each task is determined by the state of the input and output buffers.

これらのバッファの状態は、通常状態ではある程度一定で、これに伴いタスクの動作も予期できるが、ストリームバッファの供給状態、ESストリームの内容、ストリームにエラーが存在した場合、Video(ビデオ)とリップシンクのためにサンプル単位でスキップ又はリピートなどが発生した場合など、あらゆる影響によって、各バッファ状態が変化し、各タスクが動作するタイミングが刻々と変化する。   The state of these buffers is constant to some extent in the normal state, and the operation of the task can be expected accordingly. However, if there is an error in the stream buffer supply state, ES stream contents, or stream, Video (video) and lip Each buffer state changes due to any influence, such as when skip or repeat occurs in units of samples for synchronization, and the timing at which each task operates changes every moment.

図2は、本発明に係るCPUによって実行される処理を説明するためのフローチャート図である。図2において、CPUによって実行される処理を、メイン処理と割り込み処理とに大きく分けて説明する。   FIG. 2 is a flowchart for explaining processing executed by the CPU according to the present invention. In FIG. 2, processing executed by the CPU is roughly divided into main processing and interrupt processing.

メイン処理では、初期化処理(ステップS101)を行ったあと、シーケンス管理タスク(ステップS102)、スリープ動作検出タスク(ステップS103)、PES転送タスクTSK1(ステップS104)、ES抽出タスクTSK2(ステップS105)、デコード処理タスクTSK3(ステップS106)、PCM転送タスクTSK4(ステップS107)、PCM出力タスクTSK5(ステップS108)が、各タスクが評価され実行条件が満足していれば、そのタスクを実行する。   In the main process, after the initialization process (step S101), the sequence management task (step S102), the sleep operation detection task (step S103), the PES transfer task TSK1 (step S104), and the ES extraction task TSK2 (step S105) The decode processing task TSK3 (step S106), the PCM transfer task TSK4 (step S107), and the PCM output task TSK5 (step S108) are executed if the respective tasks are evaluated and the execution conditions are satisfied.

前述の説明のとおり、タスクTSK1から4までは、バッファ状態によって実行判断が決定される。PCM出力タスクTSK5は、最初の1回だけメイン処理から実行され、2回目以降は、割り込み処理から実行される。この理由は、PCM出力を行うDMA転送(DMA_DP)の終了が、次のDMA転送(DMA_DP)の起動トリガに使用されるためである。つまり、PCM出力を途切れることなく割り込みから起動処理する。   As described above, whether to execute tasks TSK1 to TSK4 is determined by the buffer state. The PCM output task TSK5 is executed from the main process only once for the first time, and from the interrupt process for the second time and thereafter. This is because the end of the DMA transfer (DMA_DP) that performs PCM output is used as a trigger for starting the next DMA transfer (DMA_DP). That is, the PCM output is activated from the interrupt without interruption.

シーケンス管理タスク(ステップS102)は、上位CPUからのデコードの開始又は指示コマンドを判断して状態遷移の判断を行う。上位CPUからのこれらのコマンド取得又は解析は、割り込み処理で行われるが、実際の処理は、このタスクで実行される。割り込みには、他にDMA転送(DMA_DS)の完了後の処理を行うPES転送後処理タスクがある。   The sequence management task (step S102) determines the state transition by determining the decoding start or instruction command from the host CPU. The acquisition or analysis of these commands from the host CPU is performed by interrupt processing, but the actual processing is executed by this task. Other interrupts include a PES transfer post-processing task that performs processing after completion of DMA transfer (DMA_DS).

スリープ動作検出タスク(ステップS103)は、タスクの処理状況を判断して、CPUが処理する仕事がなくスリープモードへ移行できるか判断を行い、条件があればスリープ状態となる。通常ならば、図2に示すメイン処理のループを定期的に繰り返し実行しているが、スリープ状態になるとCPUの命令が停止するので、スリープ動作検出タスク内部で完全に停止状態となる。これによって、低消費電流での待機状態となる。このスリープ状態からの復帰は、割り込み信号がアサートされた場合であり、次の条件から復帰できる。上位CPUからストリーム供給コマンドの通知、DMA転送(DMA_DS)転送完了割り込み、DMA転送(DMA_DP)転送完了割り込みがある。これは、割り込み処理でのコマンド取得又は解析タスク(ステップS201)、PES転送後処理タスク(ステップS202)、PCM出力TSK5(ステップS203)にそれぞれ対応する。それ以外にもVideoのVSYNC16.6ms間隔で通知される上位CPUからのデコードの開始又は停止指示コマンドがある。   The sleep operation detection task (step S103) determines the processing status of the task, determines whether there is no work to be processed by the CPU and can shift to the sleep mode, and enters the sleep state if there is a condition. Normally, the loop of the main process shown in FIG. 2 is periodically repeated. However, since the CPU command stops when the sleep state is entered, the sleep operation detection task is completely stopped. As a result, a standby state with low current consumption is established. The return from the sleep state is when the interrupt signal is asserted, and can be recovered from the following conditions. There are a stream supply command notification from the host CPU, a DMA transfer (DMA_DS) transfer completion interrupt, and a DMA transfer (DMA_DP) transfer completion interrupt. This corresponds to the command acquisition or analysis task in interrupt processing (step S201), the PES transfer post-processing task (step S202), and the PCM output TSK5 (step S203). In addition to this, there is a decode start or stop instruction command from the host CPU that is notified at the VSYNC 16.6 ms interval of Video.

図3は、1フレームデコードに着目した処理時間の内訳を示す図である。図3において、通常は、タスクTSK1から4の順に処理が行われる。ES抽出タスクTSK2は、ストリームによっては、1フレームデコードの際に複数回数呼び出される可能性がある。PCM出力タスクTSK5において、ファームウェアでの処理はハードウェアへの起動処理だけで、かつ、PCMバッファ134の内容をハードウェアで外部へDMA転送するだけなので、1フレームデコード処理になんら影響を及ぼさない。したがって、CPUの処理としては無視できるので、内訳には記載していない。また、同時にメイン処理でのシーケンス処理タスク(ステップS102)、スリープ動作検出タスク(ステップS103)および割り込み処理でのコマンド取得又は解析タスク(ステップS201)、PES転送後処理タスク(ステップS202)は、他の処理に比較して十分処理量が少なく無視できるので詳細説明を省略する。   FIG. 3 is a diagram showing a breakdown of processing time focusing on 1-frame decoding. In FIG. 3, processing is normally performed in the order of tasks TSK1 to 4. The ES extraction task TSK2 may be called a plurality of times when one frame is decoded depending on the stream. In the PCM output task TSK5, the processing in the firmware is only the activation processing to the hardware, and the contents of the PCM buffer 134 are simply DMA-transferred to the outside by the hardware, so that one-frame decoding processing is not affected at all. Therefore, since it can be ignored as the processing of the CPU, it is not described in the breakdown. At the same time, the sequence processing task in the main process (step S102), the sleep operation detection task (step S103), the command acquisition or analysis task in the interrupt process (step S201), and the PES transfer post-processing task (step S202) The amount of processing is sufficiently small compared to the above processing and can be ignored, so detailed description thereof will be omitted.

この例は、2chのAudioデコードをする場合の処理時間内訳例であるが、もし、4chのAudioデコードを行う場合は、11ms×2=22ms必要となる。これらの処理が11ms必要とすると、1フレーム時間は24ms必要なので、13msが残りのマージンとなる。つまり、この時間はCPUの空き時間でスリープ対象となる期間である。   This example is an example of processing time breakdown when 2ch audio decoding is performed. However, if 4ch audio decoding is performed, 11 ms × 2 = 22 ms is required. If these processes require 11 ms, one frame time requires 24 ms, so 13 ms is the remaining margin. In other words, this time is a period for which the CPU is idle and becomes a sleep target.

図4は、複数フレームの処理時間タイミングを示す図である。図4において、デコード開始直後は、ストリームバッファに潤沢にストリームが供給され続けたと仮定するとタスクTSK1から4まで(11ms)が連続して処理され、CPUに処理の無駄時間(空き)が発生せずPCMバッファ134が一杯になるまで処理が継続される。11フレームがデコードされ、PCMバッファ134が一杯になると、無駄時間(空き)が発生してくる。   FIG. 4 is a diagram illustrating processing time timings of a plurality of frames. In FIG. 4, immediately after decoding is started, if it is assumed that the stream is continuously supplied to the stream buffer, tasks TSK1 to 4 (11 ms) are continuously processed, and the CPU has no waste of processing time (empty). Processing continues until the PCM buffer 134 is full. When 11 frames are decoded and the PCM buffer 134 is full, dead time (empty) occurs.

また、ストリームの供給が一旦滞る状態によっては、PCMバッファ134が一杯にならない場合でも、ストリーム供給待ちでCPUは待機待ち状態となりえる。   Further, depending on the state in which the supply of the stream is temporarily stopped, even when the PCM buffer 134 is not full, the CPU can be in a standby state waiting for the stream supply.

このように、マージン(空き時間)はバッファ状態を含め各要因で変化する。   Thus, the margin (free time) varies depending on each factor including the buffer state.

本発明では、特定のバッファ状態だけを監視するのではなく、連続して主要タスクが何も実行されない回数をカウントし、それが閾値を越えるとCPUのスリープ動作にする。   In the present invention, instead of monitoring only a specific buffer state, the number of times that no main task is continuously executed is counted, and when it exceeds a threshold, the CPU is put into a sleep operation.

図2に示すメイン処理のうち、タスクTSK1から3の主要タスクがそのタスクを実行したか否かのフラグを一つの共通の変数で用意する。ここで、PCM転送タスクTSK4は、デコード処理タスクTSK3から派生するものであるから、デコード処理タスクTSK3と併用する。   In the main process shown in FIG. 2, a flag indicating whether or not the main tasks of tasks TSK1 to TSK3 have executed the task is prepared as one common variable. Here, since the PCM transfer task TSK4 is derived from the decode processing task TSK3, it is used together with the decode processing task TSK3.

このタスク動作判定フラグは、最初の初期化処理とPES転送タスクTSK1の直前でゼロクリアされる。そして各タスクによって、もし実行されるとこのフラグに1がセットされる。実行されなければなにもしない。結果的に、タスクTSK1から3の主要タスクのどれかが実行されれば1となり、全く実行されなければ0となる。このタスク動作判定フラグをスリープ動作検出タスク(ステップS103)が参照する。   This task operation determination flag is cleared to zero immediately before the initial initialization process and the PES transfer task TSK1. Each task sets this flag to 1 if it is executed. Do nothing to be done. As a result, it is 1 if any of the three main tasks TSK1 to TSK1 is executed, and 0 if it is not executed at all. The task operation determination flag is referred to by the sleep operation detection task (step S103).

図5は、スリープ動作検出タスクによる処理の一例を説明するためのフローチャート図である。まず、現在のステートを確認する(ステップS131)。動作中でなければ、ステップS135へと進む。一方、動作中であれば、タスク動作判定フラグを確認して主要タスクが実行されたか否かを確認する(ステップS132)。主要タスクが実行されていれば、主要タスク連続未実行回数sleep_cntをゼロクリアし(ステップS133)、実行されなければ+1される(ステップS134)。したがって、主要タスク連続未実行回数sleep_cntには、主要タスクが連続して実行されなかった回数がカウントされる。   FIG. 5 is a flowchart for explaining an example of processing by the sleep operation detection task. First, the current state is confirmed (step S131). If not in operation, the process proceeds to step S135. On the other hand, if it is in operation, the task operation determination flag is checked to check whether or not the main task has been executed (step S132). If the main task is being executed, the main task continuous non-execution count sleep_cnt is cleared to zero (step S133), and if not executed, it is incremented by one (step S134). Therefore, the number of times the main task has not been continuously executed is counted in the main task continuous non-execution count sleep_cnt.

次に、現在のステートが停止中か否かを確認し(ステップS135)、停止中である場合、無条件に、CPUのスリープ命令を実行してスリープ状態になり(ステップS137)、スリープ状態からの復帰直後に主要タスク連続未実行回数sleep_cntをゼロクリアして(ステップS138)、CPUは、スリープ動作検出タスクによる処理から復帰する。   Next, it is confirmed whether or not the current state is stopped (step S135). If the current state is stopped, the CPU sleep command is unconditionally executed to enter the sleep state (step S137), and the state is changed from the sleep state. Immediately after the return, the main task continuous non-execution count sleep_cnt is cleared to zero (step S138), and the CPU returns from the processing by the sleep operation detection task.

また、現在のステートが動作中で、かつ、主要タスク連続未実行回数sleep_cntが閾値10を超えた場合、同様に、CPUのスリープ命令を実行してスリープ状態になり(ステップS137)、スリープ状態からの復帰直後に主要タスク連続未実行回数sleep_cntをゼロクリアして(ステップS138)、CPUは、スリープ動作検出タスクによる処理から復帰する。一方、主要タスク連続未実行回数sleep_cntが閾値10を超えていない場合、CPUは、そのままスリープ動作検出タスクによる処理から復帰する。   Further, when the current state is in operation and the number of continuous main task unexecuted sleep_cnt exceeds the threshold value 10, the CPU sleep command is executed similarly to enter the sleep state (step S137). Immediately after the return, the main task continuous non-execution count sleep_cnt is cleared to zero (step S138), and the CPU returns from the processing by the sleep operation detection task. On the other hand, if the main task consecutive non-execution count sleep_cnt does not exceed the threshold value 10, the CPU directly returns from the processing by the sleep operation detection task.

スリープ状態へ遷移するための閾値は、ES抽出タスクTSK2がストリームによっては1フレームデコードの際に複数回呼び出される可能性があるのでこれを考慮して設定される。この理由は、PESバッファ112のサイズが片面256バイトであり、一方、ESバッファ114のサイズが同様に片面2048バイトになっており、単純には複数面のPESバッファ112の内容が、ESバッファ114の1面に相当する。大きくはビットレートに依存するが、ES抽出の境界条件によって一概にはESバッファ114の1面分がPESバッファ112の何面に相当するかは言えない。   The threshold for transitioning to the sleep state is set in consideration of this because the ES extraction task TSK2 may be called a plurality of times when decoding one frame depending on the stream. The reason is that the size of the PES buffer 112 is 256 bytes on one side, while the size of the ES buffer 114 is similarly 2048 bytes on one side. It corresponds to one side. Although it largely depends on the bit rate, it cannot be determined how many sides of the ES buffer 114 correspond to one side of the ES buffer 114 due to the boundary condition of ES extraction.

したがって、この閾値は小さい値にすると、ES抽出タスクTSK2が完全に実行されずにスリープ状態に陥る可能性がある一方、大きくとればスリープ状態への遷移が遅れることになる。   Accordingly, if this threshold value is set to a small value, the ES extraction task TSK2 may not be completely executed and may fall into the sleep state. On the other hand, if the threshold value is set large, the transition to the sleep state is delayed.

このような問題を解決するために、スリープ動作検出タスクに、以前に連続してタスクが実行された場合をカウントして、この情報を元に新たな閾値を算出し、常にフィードバックをかけることで最適な状態でスリープモードに遷移する仕組みを持たせるようにする。このように、閾値を動的に変更する仕組みについて図6で説明する。   In order to solve such a problem, the sleep operation detection task is counted when the task has been executed continuously before, a new threshold is calculated based on this information, and feedback is always applied. Provide a mechanism for transitioning to sleep mode in an optimal state. A mechanism for dynamically changing the threshold value will be described with reference to FIG.

図6は、スリープ動作検出タスクによる処理の他の例を説明するためのフローチャート図である。図6において、図5に示す処理と同様に、主要タスク連続未実行回数sleep_cntには、連続して実行されなかった回数がカウントされる。新たに、連続してタスクが実行された値をカウントする主要タスク連続実行回数task_cntを設ける。   FIG. 6 is a flowchart for explaining another example of processing by the sleep operation detection task. In FIG. 6, as in the process shown in FIG. 5, the main task consecutive non-execution count sleep_cnt counts the number of times the task has not been continuously executed. A main task continuous execution count task_cnt that counts the value of continuous execution of tasks is newly provided.

まず、現在のステートを確認する(ステップS151)。動作中でなければ、ステップS157へと進む。一方、動作中であれば、タスク動作判定フラグを確認して主要タスクが実行されたか否かを確認する(ステップS152)。主要タスクが実行されていれば、主要タスク連続未実行回数sleep_cntをゼロクリアし、主要タスク連続実行回数task_cntを1インクリメントして(ステップS153)、ステップS157へと進む。   First, the current state is confirmed (step S151). If not in operation, the process proceeds to step S157. On the other hand, if it is in operation, the task operation determination flag is checked to check whether the main task has been executed (step S152). If the main task is being executed, the main task continuous non-execution count sleep_cnt is cleared to zero, the main task continuous execution count task_cnt is incremented by 1 (step S153), and the process proceeds to step S157.

主要タスクが実行されていなければ、主要タスク連続未実行回数sleep_cntを1インクリメントして(ステップS154)、主要タスク連続実行回数task_cntを今までの最大カウントを示す主要タスク最大実行回数max_task_cnt と比較する(ステップS155)。主要タスク連続実行回数task_cntが主要タスク最大実行回数max_task_cnt以下である場合、ステップS157へと進む。一方、主要タスク連続実行回数task_cntが主要タスク最大実行回数max_task_cntより大きい場合、主要タスク最大実行回数max_task_cntに主要タスク連続実行回数task_cntを代入して、主要タスク連続実行回数task_cntをゼロクリアする(ステップS156)。同様の処理をスリープ状態になるまで繰り返すと、結果的に主要タスク最大実行回数max_task_cntに連続して実行したタスクの最大回数が記録されることになる。   If the main task is not executed, the main task continuous non-execution count sleep_cnt is incremented by 1 (step S154), and the main task continuous execution count task_cnt is compared with the main task maximum execution count max_task_cnt indicating the maximum count so far ( Step S155). When the main task continuous execution count task_cnt is less than or equal to the main task maximum execution count max_task_cnt, the process proceeds to step S157. On the other hand, if the main task continuous execution count task_cnt is larger than the main task maximum execution count max_task_cnt, the main task continuous execution count task_cnt is substituted for the main task maximum execution count max_task_cnt, and the main task continuous execution count task_cnt is cleared to zero (step S156). . If the same processing is repeated until the sleep state is entered, as a result, the maximum number of tasks executed continuously is recorded in the main task maximum execution count max_task_cnt.

次に、現在のステートが停止中か否かを確認し(ステップS157)、停止中である場合、無条件に、CPUのスリープ命令を実行するため、ステップS159へと進む。また、停止中でない場合、現在のステートが動作中で、かつ、主要タスク連続未実行回数sleep_cntが閾値task_thresholdを超えたか否かを判断する(ステップS158)。現在のステートが動作中で、かつ、主要タスク連続未実行回数sleep_cntが閾値task_thresholdを超えた場合、同様に、CPUのスリープ命令を実行するためステップS159へと進む。ステップS159では、CPUのスリープ命令を実行してスリープ状態になる。   Next, it is confirmed whether or not the current state is stopped (step S157). If the current state is stopped, the process proceeds to step S159 in order to unconditionally execute the CPU sleep instruction. If it is not stopped, it is determined whether or not the current state is in operation and the main task continuous non-execution count sleep_cnt exceeds a threshold value task_threshold (step S158). When the current state is in operation and the number of consecutive main task unexecuted sleep_cnt exceeds the threshold value task_threshold, the process similarly proceeds to step S159 to execute the CPU sleep instruction. In step S159, a CPU sleep command is executed to enter a sleep state.

スリープ状態からの復帰直後、PCMバッファ134は2面以上あるか否かを判断する(ステップS160)。2面以上ある場合、スリープ遷移閾値task_thresholdに主要タスク最大実行回数max_task_cntを代入し(ステップS161)、ステップS163へと進む。一方、2面以上ない場合、スリープ遷移閾値task_thresholdに値10を代入して(ステップS162)、ステップS163へと進む。ステップS163では、主要タスク最大実行回数max_task_cnt、主要タスク連続未実行回数sleep_cnt、及び主要タスク連続実行回数task_cntをゼロクリアする。その後、CPUは、スリープ動作検出タスクによる処理から復帰する。   Immediately after returning from the sleep state, it is determined whether there are two or more PCM buffers 134 (step S160). If there are two or more, the main task maximum execution count max_task_cnt is substituted for the sleep transition threshold task_threshold (step S161), and the process proceeds to step S163. On the other hand, if there are no more than two faces, the value 10 is substituted into the sleep transition threshold task_threshold (step S162), and the process proceeds to step S163. In step S163, the main task maximum execution count max_task_cnt, the main task continuous non-execution count sleep_cnt, and the main task continuous execution count task_cnt are cleared to zero. Thereafter, the CPU returns from the processing by the sleep operation detection task.

一方、ステップS158において、主要タスク連続未実行回数sleep_cntが閾値task_thresholdを超えていない場合、スリープ動作検出タスクによる処理から復帰する。   On the other hand, in step S158, if the number of consecutive main task unexecuted sleep_cnt does not exceed the threshold value task_threshold, the process returns from the processing by the sleep operation detection task.

上記処理において、スリープ状態への遷移条件は、図5の固定閾値に対して、スリープ遷移閾値task_thresholdの変数に置き換えられる。そしてこれを超えるとCPUのスリープ命令を実行してスリープ状態になるスリープ遷移閾値task_thresholdの初期値は、図5と同様に、固定値10から開始される。   In the above processing, the transition condition to the sleep state is replaced with a variable of the sleep transition threshold task_threshold with respect to the fixed threshold of FIG. When the value exceeds this value, the initial value of the sleep transition threshold value task_threshold that causes the CPU to execute the sleep command and enter the sleep state starts from a fixed value 10 as in FIG.

また、上述より、スリープ遷移閾値task_thresholdの更新は、スリープ状態からの復帰直後に行われ、PCMバッファ134の蓄積量を判定し、あまりPCMバッファ134に余裕が無ければスリープ遷移閾値task_thresholdを初期値の10と余裕ある値にする。これは、PCMバッファ134に余裕があまり無いときには、極限のスリープ遷移閾値task_thresholdを回避することで、PCMバッファ134の破綻の可能性を極力排除する配慮である。   Further, as described above, the sleep transition threshold task_threshold is updated immediately after returning from the sleep state, and the accumulated amount of the PCM buffer 134 is determined. If there is not enough room in the PCM buffer 134, the sleep transition threshold task_threshold is set to the initial value. A value with a margin of 10 is set. This is a consideration that avoids the extreme sleep transition threshold value task_threshold when the PCM buffer 134 has little room, thereby eliminating the possibility of failure of the PCM buffer 134 as much as possible.

また、図5及び図6に示す処理の例では、連続してタスクが実行されたことを直前のスリープ状態の結果だけから判断しているが、いくつかのスリープ状態を累積した平均をとることもできる。つまり、急激なスリープ遷移閾値の変化を発生させないような配慮が可能である。   Further, in the processing examples shown in FIGS. 5 and 6, it is determined that the task is continuously executed from only the result of the previous sleep state, but an average of several sleep states is taken. You can also. That is, it is possible to take care not to cause a sudden change in the sleep transition threshold.

なお、VideoのVSYNCは、16.6ms間隔で定期的に入力されるので、1フレーム24ms以内に1度は割り込みが入りスリープから解除される仕組みとなっている。したがって、スリープ遷移閾値を前回の処理量の状況に応じて自己学習し、最適なスリープ遷移閾値を求める仕組みによって、極限のスリープ遷移閾値にしても、デコード処理が遅れPCMバッファ134が枯渇してしまうなどの破綻は回避される。   Since the VSYNC of Video is periodically input at 16.6 ms intervals, an interrupt is generated once within 24 ms of one frame to release from sleep. Therefore, even if the sleep transition threshold is set to the extreme sleep transition threshold by self-learning the sleep transition threshold according to the previous processing amount and obtaining the optimum sleep transition threshold, the decoding process is delayed and the PCM buffer 134 is depleted. Such failures are avoided.

次に、図5及び図6に示すスリープ動作検出タスクによる夫々の処理を実行した場合のスリープ状態の例について図7及び図8で説明する。   Next, an example of the sleep state when the respective processes by the sleep operation detection task shown in FIGS. 5 and 6 are executed will be described with reference to FIGS.

図7は、図5に示すスリープ動作検出タスクによる処理を実行した場合のスリープ状態の例を示す図である。図7において、ビット列はスリープ状態になるまでのタスク動作判定フラグの値を示し、loop(i)はスリープ状態になるまで図5に示すススリープ動作検出タスクが実行された回数を示し、スリープ遷移閾値task_thresholdは固定の値10を示し、主要タスク連続未実行回数sleep_cntはスリープ状態になるまでの主要タスクが連続して実行されなかった回数を示す。スリープ状態が解除されると、loop(i)はゼロクリアされ、また、スリープ状態になるまでカウントされる。   FIG. 7 is a diagram illustrating an example of a sleep state when processing by the sleep operation detection task illustrated in FIG. 5 is executed. In FIG. 7, the bit string indicates the value of the task operation determination flag until the sleep state is entered, loop (i) indicates the number of times the sleep operation detection task shown in FIG. 5 is executed until the sleep state is entered, and the sleep transition threshold value task_threshold indicates a fixed value 10, and the main task continuous non-execution count sleep_cnt indicates the number of times that the main task has not been continuously executed until the sleep state is entered. When the sleep state is released, loop (i) is cleared to zero and is counted until the sleep state is entered.

図7に示すように、図5に示すスリープ動作検出タスクによる処理では、スリープ遷移閾値task_thresholdが固定であるので、主要タスク連続未実行回数sleep_cntの値が11をカウントするとスリープ状態になっていることが判る。   As shown in FIG. 7, in the processing by the sleep operation detection task shown in FIG. 5, the sleep transition threshold task_threshold is fixed. Therefore, when the value of the main task continuous non-execution count sleep_cnt counts 11, I understand.

図8は、図6に示すスリープ動作検出タスクによる処理を実行した場合のスリープ状態の例を示す図である。図8において、ビット列はスリープ状態になるまでのタスク動作判定フラグの値を示し、loop(i)はスリープ状態になるまで図に示すスリープ動作検出タスクが実行された回数を示し、スリープ遷移閾値task_thresholdは初期値10から自己学習によって変動し、主要タスク連続未実行回数sleep_cntはスリープ状態になるまでの主要タスクが連続して実行されなかった回数を示し、主要タスク最大実行回数max_task_cntはスリープ状態になるまでに主要タスクが連続して実行された最大回数を示し、主要タスク連続実行回数task_cntはスリープ状態になる前に主要タスクが連続して実行された回数を示している。主要タスク最大実行回数max_task_cntは、スリープ状態解除後にスリープ遷移閾値task_thresholdに設定される。
FIG. 8 is a diagram illustrating an example of a sleep state when processing by the sleep operation detection task illustrated in FIG. 6 is executed. In FIG. 8, the bit string indicates the value of the task operation determination flag until the sleep state is entered, loop (i) indicates the number of times the sleep operation detection task shown in FIG. 6 is executed until the sleep state is entered, and the sleep transition threshold value task_threshold fluctuates by self-learning from the initial value 10, main task continuous non-execution count sleep_cnt indicates the number of times the main task has not been executed continuously until it enters the sleep state, and main task maximum execution count max_task_cnt enters the sleep state The maximum number of times the main task has been continuously executed until the main task is executed, and the main task continuous execution count task_cnt indicates the number of times the main task has been continuously executed before going into the sleep state. The main task maximum execution count max_task_cnt is set to the sleep transition threshold task_threshold after the sleep state is canceled.

図8に示すように、スリープ遷移閾値task_thresholdが変動することによって、スリープ状態になるまでの主要タスク連続未実行回数sleep_cntが変化していることが判る。   As shown in FIG. 8, it can be understood that the sleep task threshold value task_threshold fluctuates, so that the main task consecutive non-execution count sleep_cnt until the sleep state is changed.

図7及び図8に示す例で判るように、連続して主要タスクが何も実行されない回数をカウントして、その値が閾値を超えるとCPUのスリープ動作に遷移することで、低消費電流のオーディオデコード装置を構成することが可能となる。更に、以前に連続してタスクが実行された場合をカウントして、この情報に基づいて適応的にスリープ遷移閾値を決定することによって、効率的にスリープ動作に遷移することが可能となる。   As can be seen from the examples shown in FIGS. 7 and 8, the number of times that no main task is continuously executed is counted, and when the value exceeds the threshold, the CPU shifts to the sleep operation, thereby reducing the current consumption. An audio decoding device can be configured. Furthermore, it is possible to efficiently shift to the sleep operation by counting the case where the task has been executed continuously before and adaptively determining the sleep transition threshold based on this information.

本発明は、例えば、DVDプレーヤ、デジタルTVをはじめ、特に、携帯性の高いムービーレコーダなどに適応することができる。   The present invention can be applied to, for example, a DVD player, a digital TV, and particularly a highly portable movie recorder.

以上の説明に関し、更に以下の項を開示する。
(付記1)
圧縮されたストリームの復号に係る主要タスクが実行されたか否かを判断する主要タスク実行判断手段と、
前記主要タスクが実行されなかったと判断されると、スリープカウントをインクリメントするスリープカウント手段と、
前記主要タスクが実行されたと判断されると、前記スリープカウントをゼロクリアするスリープカウント初期化手段と、
ステートが動作中であって、かつ、前記スリープカウントがスリープ遷移閾値を越えているか否かを判断するスリープ判断手段と、
前記スリープカウントがスリープ遷移閾値を越えている場合、スリープ状態に遷移するスリープ状態遷移手段とを有することを特徴とするオーディオデコード装置。
(付記2)
前記スリープ判断手段は、前回のスリープ状態への遷移時での前記主要タスクが連続して実行された最大回数をスリープ遷移閾値として用いることを特徴とする付記1記載のオーディオデコード装置。
(付記3)
前記スリープカウント手段によって前記スリープカウントがインクリメントされると、前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいか否かを判断する最大回数判断手段と、
前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいと判断されると、該回数を該最大回数に代入する最大回数代入手段とを有することを特徴とする付記2記載のオーディオデコード装置。
(付記4)
スリープ状態が解除されると、音声出力するために復号されたストリームを蓄積するバッファが所定容量以上有るか否かを判断するバッファ容量判断手段と、
前記バッファが所定容量以上有る場合、前記スリープ遷移閾値に前記主要タスクが連続して実行された最大回数を代入する閾値代入手段とを有することを特徴とする付記3記載のオーディオデコード装置。
(付記5)
前記バッファが所定容量以上ない場合、前記スリープ遷移閾値に定値を代入する所定値代入手段とを有する付記4記載のオーディオデコード装置。
(付記6)
上記主要タスクは、PES転送タスク、ES抽出タスク、及びデコード処理タスクを含むことを特徴とする付記1乃至5のいずれか一項記載のオーディオデコード装置。
(付記7)
圧縮されたストリームの復号に係る主要タスクが実行されたか否かを判断する主要タスク実行判断手順と、
前記主要タスクが実行されなかったと判断されると、スリープカウントをインクリメントするスリープカウント手順と、
前記主要タスクが実行されたと判断されると、前記スリープカウントをゼロクリアするスリープカウント初期化手順と、
ステートが動作中であって、かつ、前記スリープカウントがスリープ遷移閾値を越えているか否かを判断するスリープ判断手順と、
前記スリープカウントがスリープ遷移閾値を越えている場合、スリープ状態に遷移するスリープ状態遷移手順とを有することを特徴とするスリープ制御方法。
(付記8)
圧縮されたストリームの復号に係る主要タスクが連続して所定回数実行されなかった場合、スリープ状態に遷移するスリープ状態遷移手段を有することを特徴とするオーディオデコード装置。
Regarding the above description, the following items are further disclosed.
(Appendix 1)
Main task execution determination means for determining whether a main task related to decoding of the compressed stream has been executed;
A sleep count means for incrementing a sleep count when it is determined that the main task has not been executed;
When it is determined that the main task has been executed, sleep count initialization means for clearing the sleep count to zero,
Sleep determination means for determining whether the state is in operation and the sleep count exceeds a sleep transition threshold;
An audio decoding device comprising: sleep state transition means for transitioning to a sleep state when the sleep count exceeds a sleep transition threshold.
(Appendix 2)
The audio decoding apparatus according to claim 1, wherein the sleep determination unit uses, as a sleep transition threshold, the maximum number of times that the main task is continuously executed at the time of transition to the previous sleep state.
(Appendix 3)
When the sleep count is incremented by the sleep count means, the maximum number of times determination means for determining whether or not the number of times that the main task is continuously executed is larger than the maximum number of times that the main task is continuously executed. When,
When it is determined that the number of times that the main task has been executed continuously is greater than the maximum number of times that the main task has been executed continuously, the system has a maximum number substituting unit that assigns the number of times to the maximum number of times. The audio decoding device according to supplementary note 2, which is characterized.
(Appendix 4)
When the sleep state is canceled, a buffer capacity determination unit that determines whether or not a buffer for storing the decoded stream for outputting audio has a predetermined capacity or more;
4. The audio decoding apparatus according to claim 3, further comprising threshold value substituting means for substituting the maximum number of times the main task has been executed continuously into the sleep transition threshold value when the buffer has a predetermined capacity or more.
(Appendix 5)
The audio decoding device according to appendix 4, further comprising predetermined value substitution means for substituting a constant value into the sleep transition threshold when the buffer is not larger than a predetermined capacity.
(Appendix 6)
The audio decoding apparatus according to any one of appendices 1 to 5, wherein the main tasks include a PES transfer task, an ES extraction task, and a decoding processing task.
(Appendix 7)
A main task execution determination procedure for determining whether a main task related to decoding of a compressed stream has been executed;
A sleep count procedure for incrementing a sleep count if it is determined that the primary task has not been executed;
When it is determined that the main task has been executed, a sleep count initialization procedure for clearing the sleep count to zero;
A sleep determination procedure for determining whether the state is in operation and the sleep count exceeds a sleep transition threshold;
A sleep control method comprising: a sleep state transition procedure for transitioning to a sleep state when the sleep count exceeds a sleep transition threshold.
(Appendix 8)
An audio decoding device comprising sleep state transition means for transitioning to a sleep state when a main task related to decoding of a compressed stream is not continuously executed a predetermined number of times.

本発明は、具体的に開示された実施例に限定されるものではなく、特許請求の範囲から逸脱することなく、種々の変形や変更が可能である。   The present invention is not limited to the specifically disclosed embodiments, and various modifications and changes can be made without departing from the scope of the claims.

本発明に係るオーディオ装置の原理を説明するためのブロック図である。It is a block diagram for demonstrating the principle of the audio apparatus which concerns on this invention. 本発明に係るCPUによって実行される処理を説明するためのフローチャート図である。It is a flowchart figure for demonstrating the process performed by CPU which concerns on this invention. 1フレームデコードに着目した処理時間の内訳を示す図である。It is a figure which shows the breakdown of the processing time which paid its attention to 1 frame decoding. 複数フレームの処理時間タイミングを示す図である。It is a figure which shows the processing time timing of several frames. スリープ動作検出タスクによる処理の一例を説明するためのフローチャート図である。It is a flowchart figure for demonstrating an example of the process by a sleep operation | movement detection task. スリープ動作検出タスクによる処理の他の例を説明するためのフローチャート図である。It is a flowchart for demonstrating the other example of the process by a sleep operation | movement detection task. 図5に示すスリープ動作検出タスクによる処理を実行した場合のスリープ状態の例を示す図である。It is a figure which shows the example of a sleep state at the time of performing the process by the sleep operation | movement detection task shown in FIG. 図6に示すスリープ動作検出タスクによる処理を実行した場合のスリープ状態の例を示す図である。It is a figure which shows the example of the sleep state at the time of performing the process by the sleep operation | movement detection task shown in FIG.

符号の説明Explanation of symbols

110 CPU及びメインメモリ
112 PESバッファ
114 ESバッファ
116 一時バッファ
120 DMA転送回路
130 SDRAM
TSK1 PES転送タスク
TSK2 ES抽出タスク
TSK3 デコード処理タスク
TSK4 PCM転送タスク
TSK5 PCM出力タスク
110 CPU and main memory 112 PES buffer 114 ES buffer 116 Temporary buffer 120 DMA transfer circuit 130 SDRAM
TSK1 PES transfer task TSK2 ES extraction task TSK3 decode processing task TSK4 PCM transfer task TSK5 PCM output task

Claims (4)

圧縮されたストリームを復号するCPUによって該復号に係る主要タスクが実行されたか否かを判断する主要タスク実行判断手段と、
前記主要タスクが実行されなかったと判断されると、スリープカウントをインクリメントするスリープカウント手段と、
前記スリープカウント手段によって前記スリープカウントがインクリメントされると、前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいか否かを判断する最大回数判断手段と、
前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいと判断されると、該回数を該最大回数に代入する最大回数代入手段と、
前記主要タスクが実行されたと判断されると、前記スリープカウントをゼロクリアするスリープカウント初期化手段と、
前記CPUの現在のステートが動作中であって、かつ、前回のスリープ状態への遷移時での前記主要タスクが連続して実行された前記最大回数をスリープ遷移閾値とし、前記スリープカウントがスリープ遷移閾値を越えているか否かを判断するスリープ判断手段と、
前記スリープカウントがスリープ遷移閾値を越えている場合、スリープ状態に遷移するスリープ状態遷移手段と
スリープ状態が解除されると、音声出力するために復号されたストリームを蓄積するバッファが所定容量以上有るか否かを判断するバッファ容量判断手段と、
前記バッファが所定容量以上有る場合、前記スリープ遷移閾値に前記主要タスクが連続して実行された最大回数を代入する閾値代入手段と
を有することを特徴とするオーディオデコード装置。
A main task execution determining means for determining whether the main task of the said decoding is performed by the CPU to decode the compressed stream,
A sleep count means for incrementing a sleep count when it is determined that the main task has not been executed;
When the sleep count is incremented by the sleep count means, the maximum number of times determination means for determining whether or not the number of times that the main task is continuously executed is larger than the maximum number of times that the main task is continuously executed. When,
When it is determined that the number of times that the main task has been continuously executed is greater than the maximum number of times that the main task has been executed continuously, maximum number substituting means for substituting the number of times into the maximum number of times,
When it is determined that the main task has been executed, sleep count initialization means for clearing the sleep count to zero,
The current state is a during the operation of the CPU, and the maximum number of times the main task was run continuously at the time of transition to a previous sleep state to the sleep transition threshold, the sleep count is the sleep Sleep determination means for determining whether or not the transition threshold is exceeded;
A sleep state transition means for transitioning to a sleep state when the sleep count exceeds a sleep transition threshold ;
When the sleep state is canceled, a buffer capacity determination unit that determines whether or not a buffer for storing the decoded stream for outputting audio has a predetermined capacity or more;
An audio decoding device comprising: threshold value substitution means for substituting the maximum number of times the main task has been continuously executed into the sleep transition threshold value when the buffer has a predetermined capacity or more .
前記バッファが所定容量以上ない場合、前記スリープ遷移閾値に定値を代入する所定値代入手段とを有する請求項1記載のオーディオデコード装置。The audio decoding device according to claim 1, further comprising: a predetermined value substituting unit that substitutes a constant value into the sleep transition threshold when the buffer does not have a predetermined capacity or more. 上記主要タスクは、PES転送タスク、ES抽出タスク、及びデコード処理タスクを含むことを特徴とする請求項1又は2記載のオーディオデコード装置。3. The audio decoding apparatus according to claim 1, wherein the main tasks include a PES transfer task, an ES extraction task, and a decoding processing task. 圧縮されたストリームを復号するCPUによって該復号に係る主要タスクが実行されたか否かを判断する主要タスク実行判断手順と、
前記主要タスクが実行されなかったと判断されると、スリープカウントをインクリメントするスリープカウント手順と、
前記スリープカウント手順によって前記スリープカウントがインクリメントされると、前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいか否かを判断する最大回数判断手順と、
前記主要タスクが連続して実行された回数が前記主要タスクが連続して実行された最大回数より大きいと判断されると、該回数を該最大回数に代入する最大回数代入手順と、
前記主要タスクが実行されたと判断されると、前記スリープカウントをゼロクリアするスリープカウント初期化手順と、
前記CPUの現在のステートが動作中であって、かつ、前回のスリープ状態への遷移時での前記主要タスクが連続して実行された前記最大回数をスリープ遷移閾値とし、前記スリープカウントが該スリープ遷移閾値を越えているか否かを判断するスリープ判断手順と、
前記スリープカウントがスリープ遷移閾値を越えている場合、スリープ状態に遷移するスリープ状態遷移手順と、
スリープ状態が解除されると、音声出力するために復号されたストリームを蓄積するバッファが所定容量以上有るか否かを判断するバッファ容量判断手順と、
前記バッファが所定容量以上有る場合、前記スリープ遷移閾値に前記主要タスクが連続して実行された最大回数を代入する閾値代入手順とを有することを特徴とするオーディオデコード装置におけるスリープ制御方法。
A main task execution determination procedure for determining whether or not a main task related to the decoding has been executed by a CPU that decodes the compressed stream;
A sleep count procedure for incrementing a sleep count if it is determined that the primary task has not been executed;
When the sleep count is incremented by the sleep count procedure, the maximum number of times determination procedure for determining whether the number of times that the main task is continuously executed is larger than the maximum number of times that the main task is continuously executed When,
If it is determined that the number of times that the main task has been continuously executed is greater than the maximum number of times that the main task has been continuously executed, a maximum number of times substitution procedure for substituting the number of times into the maximum number of times,
When it is determined that the main task has been executed, a sleep count initialization procedure for clearing the sleep count to zero;
The maximum number of times the main task is continuously executed when the current state of the CPU is in operation and the previous transition to the sleep state is defined as a sleep transition threshold, and the sleep count is the sleep count. A sleep determination procedure for determining whether or not the transition threshold is exceeded;
A sleep state transition procedure for transitioning to a sleep state if the sleep count exceeds a sleep transition threshold; and
When the sleep state is released, a buffer capacity determination procedure for determining whether or not the buffer for storing the decoded stream for audio output has a predetermined capacity or more;
A sleep control method in an audio decoding device, comprising: a threshold value substituting procedure for substituting the maximum number of times the main task has been continuously executed into the sleep transition threshold value when the buffer has a predetermined capacity or more .
JP2005054632A 2005-02-28 2005-02-28 Audio decoding device Expired - Fee Related JP4612436B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005054632A JP4612436B2 (en) 2005-02-28 2005-02-28 Audio decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005054632A JP4612436B2 (en) 2005-02-28 2005-02-28 Audio decoding device

Publications (2)

Publication Number Publication Date
JP2006243016A JP2006243016A (en) 2006-09-14
JP4612436B2 true JP4612436B2 (en) 2011-01-12

Family

ID=37049533

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005054632A Expired - Fee Related JP4612436B2 (en) 2005-02-28 2005-02-28 Audio decoding device

Country Status (1)

Country Link
JP (1) JP4612436B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4757836B2 (en) * 2007-05-11 2011-08-24 パナソニック株式会社 Data processing device
JP5094427B2 (en) * 2008-01-09 2012-12-12 アルパイン株式会社 Audio reproduction method and multi-process system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07230347A (en) * 1994-01-28 1995-08-29 Compaq Computer Corp Power-down device for scsi-disk-drive

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07230347A (en) * 1994-01-28 1995-08-29 Compaq Computer Corp Power-down device for scsi-disk-drive

Also Published As

Publication number Publication date
JP2006243016A (en) 2006-09-14

Similar Documents

Publication Publication Date Title
US7584312B2 (en) Data processing apparatus having improved buffer management
JP3810449B2 (en) Queue device
US7836291B2 (en) Method, medium, and apparatus with interrupt handling in a reconfigurable array
JP2007058601A (en) Task execution device and method
CN101953151B (en) Imaging device, imaging method, and program
KR20150144690A (en) Computing system with adaptive back-up mechanism and method of operation thereof
JPWO2012001835A1 (en) Multiprocessor system
JP2009110156A (en) Log output device and log output program
JP2007251380A (en) Storage device, processing method of storage device, and processing method
EP1662794A1 (en) Video encoding device, video encoding control method, and video encoding control program
JP2006525578A (en) Threshold for unblocking processing nodes that are blocked by the path of the data packet
JP4612436B2 (en) Audio decoding device
JP2008262437A (en) Processor system and exception handling method
JP3703439B2 (en) Data transfer control device and method
JP3989493B2 (en) Queue device
JP2019160155A (en) Information processing device, information processing method, and program
JP4567586B2 (en) Processing equipment
JP2007299126A (en) Controller and program for controller
JP2008084043A (en) Interruption processing method
JPWO2010125616A1 (en) Coded stream decoding apparatus
JP3981059B2 (en) Image processing apparatus, control method thereof, and control program thereof
JP2008204011A (en) Multi-thread system and thread operation failure detecting method
US20220415405A1 (en) Memory-control circuit and method for controlling erasing operation of flash memory
JP2009100206A (en) Image coding and data-decoding device
JP2005292375A (en) Audio-reproducing device and clock-frequency control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071221

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100615

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100811

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101005

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101015

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131022

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4612436

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees