JP2005003912A - Audio signal encoding system, audio signal encoding method, and program - Google Patents

Audio signal encoding system, audio signal encoding method, and program Download PDF

Info

Publication number
JP2005003912A
JP2005003912A JP2003166899A JP2003166899A JP2005003912A JP 2005003912 A JP2005003912 A JP 2005003912A JP 2003166899 A JP2003166899 A JP 2003166899A JP 2003166899 A JP2003166899 A JP 2003166899A JP 2005003912 A JP2005003912 A JP 2005003912A
Authority
JP
Japan
Prior art keywords
block length
auditory
frame
history
audio signal
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.)
Pending
Application number
JP2003166899A
Other languages
Japanese (ja)
Inventor
Masanobu Funakoshi
正伸 船越
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2003166899A priority Critical patent/JP2005003912A/en
Publication of JP2005003912A publication Critical patent/JP2005003912A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an audio encoding technique capable of forming a bit stream of good sound quality by suitably suppressing preechoes while maintaining encoding efficiency. <P>SOLUTION: The audio signal encoding system has a frame dividing section (1) which divides an audio input signal to frames of processing units, an auditory psychology arithmetic section (3) which outputs an auditory entropy value by analyzing a frame divided audio input signal, a block length decision section (4) which determines the conversion block length of the frame based on the auditory entropy value and auditory entropy threshold outputted by the auditory psychology arithmetic section, and a filter bank (2) which blocks the frame according to the block length determined by the block length decision section and converts the blocks to frequency spectra. The block length decision section determines the auditory entropy threshold according to the genre of the audio input signal. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、オーディオ信号の符号化技術に関し、特に、変換ブロック長の変更が可能な変換符号化技術を利用したオーディオ信号符号化技術に関する。
【0002】
【従来の技術】
近年、高音質、かつ高効率なオーディオ信号符号化技術は、DVD−Videoの音声トラックや、半導体メモリやHDDなどを利用した携帯オーディオプレイヤー、インターネットを介した音楽配信、家庭内LANにおけるホームサーバなどに広く利用され、幅広く普及するとともにその重要性も増している。
【0003】
このようなオーディオ信号符号化技術の多くは、変換符号化技術を利用して時間周波数変換を行っている。例えば、MPEG2−AACやDolby Digital(AC−3)などでは、MDCTなどの直交変換単体でフィルタバンクを構成しており、MPEG1 Audio Layer3(MP3)やATRAC(MD)では、QMFなどのサブバンド分割フィルタと直交変換を多段接続してフィルタバンクを構成している。
【0004】
これらの高効率オーディオ符号化技術では、人間の聴覚特性を利用したマスキング分析を行うことによって、マスキングされると判断したスペクトル成分を取り除くことにより、圧縮効率を高めている。
【0005】
これらの高効率オーディオ符号化技術で用いられているマスキング分析は、主に、静寂時の可聴周波数領域によるマスキングと、臨界帯域におけるマスカーによる周波数マスキングである。
【0006】
上記マスキング分析により、人間に感知できないと判断される信号は主に高周波域の信号になるため、通常の場合、高周波成分の量子化誤差は多少大きくなってもマスキングされうる。
【0007】
ところが、変換符号化方式では、オーディオ入力信号に急激な変化がある、いわゆる過渡状態の場合、急激な変化が起こっている部分の高周波成分の量子化誤差が、急激な変化の直前や直後の信号にまで影響を与えるため、リンギングノイズが生じる。
【0008】
人間の聴覚特性として、大きな音が発生した場合、その直前と直後の時間は音が聞こえづらくなる。これを時間マスキング効果という。大きな音の後に聞こえなくなる時間は、個人差はあるが約100msec程度と比較的長い。しかしながら、直前に働くマスキング効果の時間は約5〜6msecと短い。従って、リンギングノイズが生じると、大きな音の前のノイズは感知されやすくなってしまう。これは一般にプリエコーと呼ばれる現象である。
【0009】
以下、この現象を図を用いて説明する。
【0010】
図10は、急激に変化しているオーディオ入力信号の一例である。この信号を、MPEG−2 AACの通常のブロック長の場合の変換単位である2048 サンプルで符号化・復号化したオーディオ信号の例を図11に示している。図示したように急激な信号の変化の部分で生じている高周波域の量子化誤差が、ブロック全域に渡って影響している。
【0011】
前述したように、振幅が急激に変化する部分の直前では、時間マスキング効果によって人間はノイズを感知できない。しかしながら、入力信号が音楽用CDに用いられているPCM信号と同様な44.1KHzサンプリング周波数を用いていると仮定して、変換単位を時間に換算すると、2048サンプルの時間は2048÷44100×1000=約46.44msとなるため、この前半の時間にノイズが生じているとしてもプリマスキング時間をはみだしてしまい、人間はプリエコーを感知してしまう。
【0012】
これを抑制するための一方法として、種々のオーディオ符号化方式では、入力信号の急激な変化を検知して変換ブロック長を短くすることにより、急激な変化による高周波成分の量子化誤差が、変化直前の部分に及ばないようにすることで、プリエコーの発生を抑制している。
【0013】
図12では、MPEG−2 AACにおけるショートブロック長の場合の変換単位である256サンプルで図10に示すオーディオ信号を符号化、復号化した場合の時間領域信号を示している。この場合、入力信号の急激な変化による高周波数域の量子化誤差の影響は、変化が発生している256サンプルブロックの中に閉じ込められてしまう。先ほどと同様に、このブロック長を44.1KHzサンプリング周波数で時間に換算すると、約5.80msとなるため、プリマスキング効果によりこのノイズを人間はほぼ感知できなくなり、結果としてプリエコーは消える。
【0014】
なお、実際の処理では、変換によって生じる折り返し歪みを除去するために、変換兆単位のウィンドウ掛けを行った上で変換長の50%ずつ入力サンプルをずらして変換を行ない、その結果の重ねあわせを行なうが、この手続きは本図では説明の便宜上省略している。
【0015】
ところが、一般にブロック長を短くすると、周波数分解能が落ちることによりマスキング分析の精度が落ちるばかりでなく、量子化時に使用する各周波数帯域ごとの正規化係数(以下、スケールファクタ)がブロックの数だけ増大するために、そこで消費される情報量が増えてしまい、量子化時に本来ならスペクトル情報に割り当てるべきビットがスケールファクタに消費されてしまうため、符号化効率が低下する。その結果、特に低ビットレート時には量子化誤差が厳密にマスキングできなくなるため、ブロック長が長い場合に比較して、ノイズが感知されやすくなる恐れがある。
【0016】
そこで、実際のブロック長を決定する場合は、プリエコーの抑制と符号化効率の低下によって発生するノイズとのバランスを適宜考慮して決める必要がある。
【0017】
このブロック長選択方法として、MP3やMPEG−2 AACなどのMPEG Audio符号化方式では、当該ブロック毎に聴覚エントロピー(以下PE)を算出し、予め定められたPE閾値よりも大きい場合に、短いブロック長を選択することになっている。
【0018】
なお、このようなオーディオ符号化データに関するメタ情報(楽曲名、アーティスト名、アルバム名、ジャンル、作成年、著作権情報など)を格納するためのデータ形式の一つとして、ID3タグが提案されている。ID3タグは、特にMP3ファイルにおいて一般的に使用されており、MP3ビットストリームの末尾に付加される。
【0019】
ID3タグの表示、編集は、一般的なオーディオ符号化・復号化アプリケーションの一機能として実装されているため、ユーザは容易にID3タグの内容を編集することが可能である。
【0020】
一方、近年では、オーディオ信号そのものを分析し、上記ジャンルなどのメタ情報を自動的に抽出する技術の研究も盛んに行われている。下記の特許文献1では、音楽信号の低域の周波数分析結果と、予め音楽ジャンルごとに求められた複数の低周波成分パターンを比較することにより、当該音楽信号の音楽ジャンルを判定している。また、下記の特許文献2では、ジャンルごとのリズム、テンポ、調整などのパターンを学習したニューラルネットワークを用いて音楽信号の音楽ジャンルを判定している。
【0021】
また、下記の特許文献3では、PEの最大値から最小値を引いた差分と閾値を比較することによってブロック長の切り替えを判断する技術が開示されている。
【0022】
また、下記の特許文献4では、聴覚エントロピーの計算は行わずに、入力PCM信号をブロック長よりも短いセグメントに分割し、振幅の急激な変化を検知し、急激な変化を検知した場合、その前のセグメントにおける量子化ノイズとそれ以前のセグメントのマスキング値を推定し、マスキングできない量子化ノイズが発生する場合に短いブロック長を選択するという方式が開示されている。
【0023】
【特許文献1】
特開平8−37700号公報
【特許文献2】
特開平10−161654号公報
【特許文献3】
特開2000−276198号公報
【特許文献4】
特開2001−142493号公報
【0024】
【発明が解決しようとする課題】
上記のように、例えばMPEG−2 AAC規格書(ISO/IEC13818−7:1997)に記載されているブロック長判定方法では、ブロック毎のPEと固定のPE閾値との比較のみでブロック長を決定している。ところが、このPE閾値は実際には機器の実装や入力信号により変化するため、固定のPE閾値をあらゆる場合に適用すると、楽曲によってはブロック長の決定が正しくないことが度々生じ、往々にして符号化効率が下がったり、プリエコーが生じたりして音質劣化する場合がある。
【0025】
例えば、従来の固定のPE閾値によってあらゆるジャンルのオーディオ信号のブロック長選択を行うと、ハードロックのような変化が激しい音楽では、短いブロック長が多用されることになるため、符号化効率が落ち、結果としてマスクされないノイズが増え、音質劣化する。逆に、クラシックのような大人しい音楽では、適切に短いブロック長が選択されずに、プリエコーが生じてしまう。
【0026】
本発明は、上記問題点に鑑みて考案されたものであり、入力オーディオ信号のジャンルによってPE閾値を適宜変更することにより、適切なブロック選択を可能にすることで、必要以上に短いブロック長が選択されることを防止して、符号化効率を保ちながらプリエコーを適宜抑制し、音質の良いビットストリームを作成することができるオーディオ符号化技術を提供することを目的とする。
【0027】
【課題を解決するための手段】
本発明の一観点によれば、オーディオ入力信号を処理単位のフレームに分割するフレーム分割部と、前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算部と、前記聴覚心理演算部が出力する聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定部と、前記ブロック長判定部が決定したブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換するフィルタバンクとを有し、前記ブロック長判定部は、オーディオ入力信号のジャンルに応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化装置が提供される。
本発明の他の観点によれば、オーディオ入力信号を処理単位のフレームに分割するフレーム分割部と、前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算部と、前記聴覚心理演算部が出力する聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定部と、前記ブロック長判定部が決定したブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換するフィルタバンクと、前記聴覚心理演算部により出力される各フレームの聴覚エントロピー値の履歴を保存するための履歴保存部とを有し、前記ブロック長判定部は、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化装置が提供される。
本発明のさらに他の観点によれば、オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ステップと、前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップとを有し、前記ブロック長判定ステップは、オーディオ入力信号のジャンルに応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化方法が提供される。
本発明のさらに他の観点によれば、オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ステップと、前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップと、前記聴覚心理演算ステップにより出力された各フレームの聴覚エントロピー値の履歴を履歴保存部に保存する履歴保存ステップとを有し、前記ブロック長判定ステップは、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化方法が提供される。
本発明のさらに他の観点によれば、オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ブロックと、前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップとをコンピュータに実行させるためのプログラムであって、前記ブロック長判定ステップは、オーディオ入力信号のジャンルに応じて、前記聴覚エントロピー閾値を決定することを特徴とするプログラムが提供される。
本発明のさらに他の観点によれば、オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ステップと、前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップと、前記聴覚心理演算ステップにより出力された各フレームの聴覚エントロピー値の履歴を履歴保存部に保存する履歴保存ステップとをコンピュータに実行させるためのプログラムであって、前記ブロック長判定ステップは、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とするプログラムが提供される。
【0028】
本発明によれば、オーディオ入力信号のジャンルに応じて、変換ブロック長決定の際に参照する聴覚エントロピー閾値を決定するため、プリエコーの発生を避けながら符号化効率の良い符号化処理が可能となり、特に低ビットレート時に音質の良い符号化処理を実現することができる。
【0029】
【発明の実施の形態】
(第1の実施形態)
以下図面を参照しながら本発明を詳細に説明する。
図1は、本発明の第1の実施形態におけるオーディオ符号化装置の一構成例である。
【0030】
図示の構成において、1はオーディオ入力信号を処理単位であるフレームに分割するフレーム分割器である。ここで分割されたフレームは後述するフィルタバンク2と聴覚心理演算器3へ送出される。
【0031】
2はフィルタバンクであり、フレームに分割された入力時間信号をブロック長判定器4によって指定された長さのブロック長で周波数スペクトルに変換する。
【0032】
3は聴覚心理演算器であり、オーディオ入力信号をフレーム単位に分析し、聴覚エントロピー値の算出と、量子化単位となる分割周波数帯域ごとのマスキング計算を行う。この演算の結果、聴覚エントロピー(PE)値がブロック長判定器4に、また、各分割周波数帯域ごとの信号対マスク比(Signal Mask Ratio:SMR)がビット割当て器5にそれぞれ出力される。
【0033】
4はブロック長判定器であり、外部から送出されるジャンル情報によりPE閾値を変更して保持し、聴覚心理演算器3から送出されるPEとPE閾値とを比較して変換ブロック長を判定し、フィルタバンク2に通知する。
【0034】
5はビット割当て器であり、聴覚心理演算器3より送出される分割周波数帯域ごとのSMR値や周波数スペクトルを参考にして、各分割周波数帯域ごとに割り当てるビット量を決定する。
【0035】
6は量子化器であり、フィルタバンク2が出力する周波数スペクトルの正規化係数(スケールファクタ)を各周波数帯域毎に算出し、ビット割当て器5が出力する、各周波数帯域ごとのビット量に従って周波数スペクトルを量子化する。
【0036】
7はビット整形器であり、量子化器6が出力するスケールファクタと量子化スペクトルを適宜規定のフォーマットに整形してビットストリームを作成し、出力する。
【0037】
上記構成によるオーディオ信号符号化装置におけるオーディオ信号の処理動作を以下に説明する。
【0038】
なお、本実施形態では説明の便宜のために符号化方式としてMPEG2−AACを例にとって説明するが、MP3など、PEによってブロック長切り替え判定を行うその他の符号化方式についても全く同様な方法で実現可能である。
【0039】
まず、処理に先立ち、各部の初期化を行う。このとき、ブロック長判定器4では、外部から入力されたオーディオ信号のジャンル情報によって、PE閾値を変更する。PE閾値の変更は、ジャンルごとのPE閾値を格納したテーブルを参照し、ジャンルによって選択することによって変更しても良いし、ジャンルごとのPE補正値を格納したテーブルを参照して、PE閾値の基準となる値にジャンルごとの補正値を加えても良い。図3にPE閾値テーブルの構成例、図4にPE補正値テーブルの模倣図を示す。なお、図4のPE補正値テーブルを用いる場合のPEの基準値は1800である。本実施形態において、これらのテーブルはブロック長判定器4に格納されている。
【0040】
オーディオPCM信号などの入力オーディオ信号はフレーム分割器1によってフレーム単位に分割され、フィルタバンク2と聴覚心理演算器3に送出される。MPEG2−AAC LC(Low−Complexity)プロファイルの場合、1フレームは1024サンプルのPCM信号で構成される。
【0041】
入力オーディオ信号はフレーム毎に聴覚心理演算器3によって聴覚エントロピーと各周波数帯域ごとのマスキング計算が行われる。算出された聴覚エントロピー値はブロック長判定器4によって、予めジャンル情報によって変更されたPE閾値と比較される。ここで、PE閾値よりも当該フレームのPE値が大きい場合は、短いブロック長を使用することが判定され、そうでない場合は、長いブロック長を使用することが判定される。フィルタバンク2では、この判定に沿ったブロック長で、入力信号を周波数スペクトルへ変換する。
【0042】
なお、MPEG2−AACでは、フィルタバンク2において直交変換によるエイリアシングを除去するために、MDCTによる重複変換が行われる。その都合上、時間周波数変換では、処理対象フレームとその直前のフレームを合わせた2048サンプルを一単位として入力し、1024個の周波数スペクトルを得る。このとき、長いブロック長を用いる場合は、入力信号の2048サンプルを一つのブロックとして直交変換を行い、1024個の周波数スペクトルを出力する。短いブロック長を用いる場合は、入力信号の256サンプルを一つのブロックとして128個の周波数スペクトルを出力する変換を、入力信号を128サンプルずつずらしながら都合8回の変換を行う。
【0043】
フィルタバンク2から出力された周波数スペクトルと、聴覚心理演算器3から出力されたSMR値によって、ビット割当て器5は各周波数帯域にビットを割り当て、量子化器6は各周波数帯域ごとにスケールファクタを算出し、各周波数帯域に割当てられたビットに従って周波数スペクトルを量子化する。
【0044】
各周波数帯域ごとのスケールファクタと量子化スペクトルはビット整形器7によって定められた書式に従ってビットストリームに整形されて、出力される。
【0045】
(第2の実施形態)
本発明の第2の実施形態は、汎用的なパーソナルコンピュータ(PC)上で動作するソフトウェアプログラムとして実施することができる。以下、この場合について図面を用いて説明する。
【0046】
図5は、本発明の第2の実施形態におけるオーディオ信号符号化装置の構成例である。
【0047】
図示の構成において、100はCPUであり、オーディオ信号符号化処理のための演算、論理判断等を行い、102のバスを介して、バスに接続された各構成要素を制御する。
【0048】
101はメモリであり、本実施形態の構成例における基本I/Oプログラムや、実行しているプログラムコード、プログラム処理時に必要なデータなどを格納する。
【0049】
102はバスであり、CPU100の制御の対象とする構成要素を指示するアドレス信号を転送し、CPU100の制御の対象とする各構成要素のコントロール信号を転送し、各構成機器相互間のデータ転送を行う。
【0050】
103は端末であり、装置の起動、各種条件や入力信号の設定、符号化開始の指示を行う。
【0051】
104は外部記憶装置であり、データやプログラム等を記憶するための外部記憶領域である。データやプログラム等は必要に応じて保管され、また、保管されたデータやプログラムは必要な時に呼び出される。
【0052】
105はメディアドライブであり、記録媒体に記録されているプログラムやデータ、デジタルオーディオ信号などはこのメディアドライブ105が読み取ることにより本オーディオ信号符号化装置にロードされる。また、外部記憶装置104に蓄えられた各種データや実行プログラムを、記録媒体に書き込むことができる。
【0053】
106はマイクであり、音を集音してオーディオ信号に変換する。
【0054】
107はスピーカーであり、任意のオーディオ信号データを実際の音にして出力することができる。
【0055】
108は通信網であり、LAN、公衆回線、無線回線、放送電波などで構成されている。
【0056】
109は通信インターフェースであり、通信網108に接続されている。本実施形態のオーディオ信号符号化装置はこの機器を介して通信網を経由し、外部機器と通信し、データやプログラムを送受信することができる。
【0057】
かかる各構成要素からなる本実施形態のオーディオ信号符号化装置においては、端末103からの各種の入力に応じて作動するものであって、端末103からの入力が供給されると、インターラプト信号がCPU100に送られることによって、CPU100がメモリ101内に記憶してある各種の制御信号を読出し、それらの制御信号に従って、各種の制御が行われる。
【0058】
本実施形態の装置は、基本I/Oプログラム、OS、および本オーディオ信号符号化処理プログラムをCPU100が実行することによって動作する。基本I/Oプログラムはメモリ101中に書き込まれており、OSは外部記憶装置104に書き込まれている。そして、本装置の電源がONにされると、基本I/Oプログラム中のIPL(イニシャルプログラムローディング)機能により外部記憶装置104からOSがメモリ101に読み込まれ、OSの動作が開始される。
【0059】
本オーディオ信号符号化処理プログラムは、図2に示されるオーディオ信号符号化処理手順のフローチャートに基づいてプログラムコード化されたものである。
【0060】
図6は、本オーディオ信号符号化処理プログラムおよび関連データを記録媒体に記録したときの内容構成図である。
【0061】
本実施形態において、本オーディオ信号符号化処理プログラムおよび関連データは記録媒体に記録されている。図示したように記録媒体の先頭領域には、この記録媒体のディレクトリ情報が記録されており、その後にこの記録媒体のコンテンツである本オーディオ信号符号化処理プログラムと、オーディオ信号符号化処理関連データがファイルとして記録されている。
【0062】
図7は本オーディオ信号符号化装置に、本オーディオ信号符号化処理プログラムを導入する模式図である。記録媒体に記録されたオーディオ信号符号化処理プログラムおよび関連データは、図7に示したようにメディアドライブ105を通じて本装置にロードすることができる。この記録媒体110をパーソナルコンピュータのメディアドライブ105にセットすると、OS及び基本I/Oプログラムの制御のもとに本オーディオ信号符号化処理プログラムおよび関連データが記録媒体から読み出され、外部記憶装置104に格納される。その後、再起動時にこれらの情報がメモリ101にロードされて動作可能となる。
【0063】
図8は、本オーディオ信号符号化装置処理プログラムがメモリ101にロードされ実行可能となった状態のメモリマップを示す。メモリ101には、基本I/Oプログラム、OS、オーディオ信号符号化処理プログラム、関連データ及びワークエリアが格納される。このとき、メモリ101のワークエリアには、PE閾値と、図3で示したPE閾値テーブルが格納されている。
【0064】
以下、本実施形態においてCPU100で実行されるオーディオ信号符号化処理をフローに従って説明する。
【0065】
図2は、本実施形態におけるオーディオ信号符号化処理のフローチャートである。
【0066】
まず、ステップS1は、符号化する入力オーディオ信号とそのジャンルをユーザが端末103を用いて指定する処理である。本実施形態において、符号化するオーディオ信号は、外部記憶装置104に格納されているオーディオPCMファイルでも良いし、マイク106で捉えたリアルタイムの音声信号をアナログ・デジタル変換した信号でも良い。処理を終えると、ステップS2へ進む。
【0067】
ステップS2は、ステップS1で指定された符号化するオーディオ入力信号のジャンルによって、メモリ101上のPE閾値テーブルを検索し、メモリ101上のPE閾値を変更する処理である。例えば、ステップS1で入力されたジャンルが「ロック」の場合、図3で図示したPE閾値テーブルを検索した結果、PE閾値として2000がメモリ101上の所定領域に格納される。処理を終えると、ステップS3へ進む。
【0068】
ステップS3は、符号化する入力オーディオ信号が終了したかどうかを判定する処理である。入力信号が終了している場合は、ステップS12へ処理が進む。未終了の場合は、ステップS4へ処理が進む。
【0069】
ステップS4は、入力信号をチャンネルごとに処理単位であるフレームに分割する処理である。第1の実施形態での説明同様、例えば、MPEG2−AACの場合、チャンネルごとに1024サンプルのフレームに分割する。処理を終えると、ステップS5へ処理が進む。
【0070】
ステップS5は、符号化対象となっているフレームの聴覚心理演算を行う処理である。この演算の結果、処理対象フレームの聴覚エントロピー(PE)と、量子化単位である分割周波数帯域ごとのSMR値が算出される。処理を終えると、ステップS6へ処理が進む。
【0071】
ステップS6は、ステップS5で算出された処理対象フレームのPE値と、ステップS2によって格納されたPE閾値とを比較し、変換ブロック長を判定する処理である。処理対象フレームのPE値がPE閾値よりも大きい場合は、ステップS7へ処理が進む。そうでない場合は、ステップS8へ処理が進む。
【0072】
ステップS7では、ステップS6で行われた判定に基づき、処理対象フレームに対してショートブロック(短いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、128の周波数成分に分割されたスペクトルの組が8組得られる。処理を終えると、ステップS9に処理が進む。
【0073】
ステップS8では、ステップS6で行われた判定に基づき、処理対象フレームに対してロングブロック(長いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、1024の周波数成分に分割されたスペクトルの組が一組だけ得られる。処理を終えると、ステップS9に処理が進む。
【0074】
ステップS9は、ステップS5で算出される分割周波数帯域ごとのSMR値と、ステップS7やステップS8で得られる周波数スペクトルと、符号化ビットレートより、各分割周波数帯域に割り当てるビット量を決定する処理である。このような処理は本実施形態のような変換符号化方法において一般的であるので、詳細は説明しない。処理を終えると、ステップS10へ処理が進む。
【0075】
ステップS10は、各分割周波数帯域ごとのスケールファクタを算出するとともに、ステップS9で割り当てられたビット量に従って、周波数スペクトルを量子化する処理である。処理を終えると、ステップS11へ処理が進む。
【0076】
ステップS11は、ステップS10で算出されたスケールファクタと量子化スペクトルを、符号化方式によって定められたフォーマットに従って整形し、ビットストリームとして出力する処理である。本実施形態において、この処理によって出力されるビットストリームは、外部記憶装置104に格納されても良いし、あるいは、通信インターフェース109を介して回線網108に繋がっている外部機器に出力されても良い。処理を終えると、ステップS3へ処理が進む。
【0077】
ステップS12は、聴覚心理演算や直交変換などで生じる遅延によってまだ出力されていない量子化スペクトルがメモリ上に残っているため、それらをビットストリームに整形して出力する処理である。処理を終えると、オーディオ信号符号化処理を終了する。
【0078】
以上説明したように、本実施形態におけるオーディオ信号符号化処理では、オーディオ入力信号のジャンルによって、ブロック長判定の際に参照するPE閾値を適宜設定するため、プリエコーの発生を避けながら符号化効率の良い符号化処理が可能となり、特に低ビットレート時に音質の良い符号化処理を実現することができる。例えば、入力信号のジャンルがクラシックの場合、PE閾値が低めに設定されるため、短いブロック長を選択すべき部分で適切に短いブロック長が選択されるため、プリエコーの発生を低減することが可能となり、逆に、ジャンルがロックの場合、PE閾値を高めに設定することによって、短いブロック長が過多に適用されて符号化効率が落ち結果として音質が劣化することを防ぐことができる。
【0079】
(第3の実施形態)
本発明の第3の実施形態では、ユーザが入力したID3タグ中のジャンルによってPE閾値が決定される場合を説明する。
【0080】
図13は、本発明の第3の実施形態におけるオーディオ信号符号化装置の一構成例である。
【0081】
図示したように、本実施形態におけるオーディオ信号符号化装置は、図1に示した構成例に、8のID3タグ入力器を付加したものである。
【0082】
1から7までの構成要素は第1の実施形態で示したものと同様であるので、説明を省略する。
【0083】
8は、ID3タグ入力器であり、ユーザのID3タグ情報の入力を受け付け、その内容を保持する。
【0084】
上記構成によるオーディオ信号符号化装置におけるオーディオ信号の処理動作を、前述の第1の実施形態の動作と異なる部分を中心に以下に説明する。
【0085】
まず、処理に先立ち、各部の初期化を行う。
【0086】
次に、ユーザによって符号化するオーディオ入力信号が指定されるとともに、入力信号に関するID3タグ情報の入力がID3タグ入力器8に対して行われる。このとき、ブロック長判定器4では、入力されたID3タグのジャンルに従って、PE閾値を変更する。PE閾値の変更は、ジャンルごとのPE閾値を格納したテーブルを参照し、ID3タグのジャンルNo(番号)によって選択することによって変更しても良いし、ジャンルごとのPE補正値を格納したテーブルをID3タグのジャンルNoによって検索し、PE閾値の基準となる値にジャンルごとの補正値を加えても良い。図15にこの場合のPE閾値テーブルの模倣図、図16にPE補正値テーブルの模倣図を示す。なお、本実施形態において、図16のPE補正値テーブルを用いる場合のPEの基準値は1800である。本実施形態において、これらのテーブルはブロック長判定器4に格納されている。
【0087】
その後は、第1の実施形態で前述したように、入力されたオーディオ信号はフレーム分割器1によって分割後、聴覚心理演算器3で分析されてPE値とSMRが算出される。ブロック長判定器4においてPE値とPE閾値が比較され、その結果によってブロック長が決定される。フレーム分割されたオーディオ入力信号は、フィルタバンク2において、決定されたブロック長で周波数スペクトルに変換され、ビット割当て器5が聴覚心理演算器4から出力されたSMR値にしたがって、各周波数帯域にビットを割り当て、量子化器6は各周波数帯域ごとに正規化係数を算出し、各周波数帯域に割当てられたビットに従って周波数スペクトルを量子化し、ビット整形器7によって定められた書式に応じてビットストリームに整形され、出力される。
【0088】
全ての入力信号の符号化が終了すると、ID3タグ入力器8に保持されているID3タグの各情報が、ビット整形器7によってビットストリームの末尾に付加される。
【0089】
以下、同様な処理を汎用的なPC上で実装する場合について説明する。
【0090】
図5に示すオーディオ符号化装置の構成によって、この場合においても前述した第2の実施形態と同様に実施することが可能である。なお、図5に示す構成において、図15で図示したPE閾値テーブルがメモリ101上のワークエリアに予め格納されている。
【0091】
以下、CPU100において行われる処理の詳細を、図14に示すフローに従って説明する。
【0092】
まず、ステップS101は、符号化する入力オーディオ信号をユーザが端末103を用いて指定する処理である。本実施形態において、符号化するオーディオ信号は、外部記憶装置104に格納されているオーディオPCMファイルでも良いし、マイク106で捉えたリアルタイムの音声信号をアナログ・デジタル変換した信号でも良い。処理を終えると、ステップS102へ進む。
【0093】
ステップS102は、ID3タグをユーザが端末103を用いて指定する処理である。この処理の結果、ID3タグの一部として、入力オーディオ信号のID3ジャンルNoが指定される。処理を終えると、ステップS103へ進む。
【0094】
ステップS103は、ステップS102で指定された符号化するオーディオ入力信号のID3ジャンルNoによって、メモリ101上のPE閾値テーブルを検索し、メモリ101上のPE閾値を変更する処理である。例えば、ステップS102で指定されたID3ジャンルNoが「2」の場合、図15で図示したPE閾値テーブルを検索した結果、PE閾値として1600がメモリ101上の所定領域に格納される。処理を終えると、ステップS104へ進む。
【0095】
ステップS104は、符号化する入力オーディオ信号が終了したかどうかを判定する処理である。入力信号が終了している場合は、ステップS113へ処理が進む。未終了の場合は、ステップS105へ処理が進む。
【0096】
ステップS105は、入力信号をチャンネルごとに処理単位であるフレームに分割する処理である。第1の実施形態での説明同様、例えば、MPEG2−AACの場合、チャンネルごとに1024サンプルのフレームに分割する。処理を終えると、ステップS106へ処理が進む。
【0097】
ステップS106は、符号化対象となっているフレームの聴覚心理演算を行う処理である。この演算の結果、処理対象フレームの聴覚エントロピー(PE)と、量子化単位である分割周波数帯ごとのSMR値が算出される。処理を終えると、ステップS107へ処理が進む。
【0098】
ステップS107は、ステップS106で算出された処理対象フレームのPE値と、ステップS103によって格納されたPE閾値とを比較し、変換ブロック長を判定する処理である。処理対象フレームのPE値がPE閾値よりも大きい場合は、ステップS108へ処理が進む。そうでない場合は、ステップS109へ処理が進む。
【0099】
ステップS108では、ステップS107で行われた判定に基づき、処理対象フレームに対してショートブロック(短いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、128個の周波数成分に分割されたスペクトルの組が8組得られる。処理を終えると、ステップS110に処理が進む。
【0100】
ステップS109では、ステップS107で行われた判定に基づき、処理対象フレームに対してロングブロック(長いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、1024の周波数成分に分割されたスペクトルの組が一組だけ得られる。処理を終えると、ステップS110に処理が進む。
【0101】
ステップS110は、ステップS106で算出される分割周波数帯域ごとのSMR値と、ステップS108もしくはステップS109で得られる周波数スペクトルと、符号化ビットレートより、各分割周波数帯域に割り当てるビット量を決定する処理である。処理を終えると、ステップS111へ処理が進む。
【0102】
ステップS111は、各分割周波数帯域ごとのスケールファクタを算出するとともに、ステップS110で割り当てられたビット量に従って、周波数スペクトルを量子化する処理である。処理を終えると、ステップS112へ処理が進む。
【0103】
ステップS112は、ステップS111で算出されたスケールファクタと量子化スペクトルを、符号化方式によって定められたフォーマットに従って整形し、ビットストリームとして出力する処理である。本実施形態において、この処理によって出力されるビットストリームは、外部記憶装置に格納されても良いし、あるいは、通信インターフェースを介して回線網に繋がっている外部機器に出力されても良い。処理を終えると、ステップS104へ処理が進む。
【0104】
ステップS113は、聴覚心理演算や直交変換などで生じる遅延によってまだ出力されていない量子化スペクトルがメモリ上に残っているため、それらをビットストリームに整形して出力する処理である。処理を終えると、ステップS114へ処理が進む。
【0105】
ステップS114は、作成された符号化ビットストリームの末尾に、ステップS102で入力されたID3タグ情報を適宜コード化して付加する処理である。これによって、この符号化データを復号化する際に、このデータのID3タグ情報にアクセスすることが可能となり、様々な情報を復号処理側で利用することが可能となる。処理を終えると、オーディオ信号符号化処理を終了する。
【0106】
上記説明したように、本実施形態においては、オーディオ符号化データの標準的なメタデータであるID3タグを入力することによって、適宜PE閾値が変更されることにより、予め定められているジャンルからユーザはジャンルを選択すればよいため、符号化時のユーザの利便性が向上し、かつ音質の良い符号化データを得ることができる。
【0107】
(第4の実施形態)
本発明の第4の実施形態では、PE閾値をPE履歴によって調整する場合の例を示す。
【0108】
図17は、本発明の第4の実施形態におけるオーディオ信号符号化装置の一構成例である。
【0109】
図示したように、本実施形態におけるオーディオ信号符号化装置は、図1に示した構成例に、9のPE履歴記憶部を付加したものである。
【0110】
1から7までの構成要素は第1の実施形態で示したものと同様であるので、説明を省略する。
【0111】
9はPE履歴一時記憶器であり、聴覚心理演算器3によってオーディオ入力信号を解析した結果出力される各フレームのPE値と、その結果ブロック長判定器4によって決定されたブロック長の組を、新しいものから予め決められた数だけ順次格納する。本実施形態においては、100フレーム分のPE履歴を格納することができる。PE履歴一時記憶器9に格納されるPE履歴テーブルの模倣図を図18に示す。
【0112】
上記構成によるオーディオ信号符号化装置におけるオーディオ信号の処理動作を、前述の第1の実施形態の動作と異なる部分を中心にして以下に説明する。
【0113】
なお、本実施形態では説明の便宜のために符号化方式としてMPEG2−AACを例にとって説明するが、MP3など、PEによってブロック長切り替え判定を行うその他の符号化方式についても全く同様な方法で実現可能である。
【0114】
まず、処理に先立ち、各部の初期化を行う。このとき、ブロック長判定器4では、外部から入力されたオーディオ信号のジャンル情報によって、ブロック長判定器4内部のPE閾値テーブルを参照し、初期のPE閾値を設定する。
【0115】
オーディオPCM信号などの入力オーディオ信号はフレーム分割器1によってフレーム単位に分割され、フィルタバンク2と聴覚心理演算器3に送出される。
【0116】
入力オーディオ信号はフレーム毎に聴覚心理演算器3によって聴覚エントロピー(PE)と各周波数帯域ごとのマスキング計算が行われる。算出された聴覚エントロピー値はブロック長判定器4に送出される。
【0117】
ブロック長判定器4は、PE閾値の入力をトリガとして、PE閾値の補正を開始する。本実施形態におけるPE閾値の補正処理は、図20のフローを用いて後述する。この間、ブロック長判定器4は、処理に必要な履歴情報を逐次PE履歴一時記憶器9にアクセスして取り出すことが可能である。
【0118】
PE閾値の補正が終了すると、ブロック長判定器4は入力PE値と補正後のPE閾値とを比較する。PE閾値よりも当該フレームのPE値が大きい場合は、短いブロック長を使用することが判定され、そうでない場合は、長いブロック長を使用することが判定される。ブロック長が決定されると、ブロック長判定器4はPE値と選択ブロック長をPE履歴一時記憶器9に送出する。PE履歴一時記憶器9は、最新のPEと決定ブロック長をPE履歴テーブルに保存する。このとき、履歴情報の数が予め定められた数を超えた場合は、最も古い履歴を削除する。例えば、図18に図示したPE履歴テーブルの場合、最新の履歴を追加する場合は、最も古い履歴である、No.100の行がテーブルより削除され、図中の最も上の行に新規履歴となるPE値とブロック種別が格納され、No.が振りなおされる。
【0119】
その後は、第1の実施形態で前述したように、オーディオ入力信号はフィルタバンク2において、決定されたブロック長で、周波数スペクトルに変換され、ビット割当て器5が聴覚心理演算器4から出力されたSMR値にしたがって、各周波数帯域にビットを割り当て、量子化器6は各周波数帯域ごとに正規化係数を算出し、各周波数帯域に割当てられたビットに従って周波数スペクトルを量子化し、ビット整形器7によって定められた書式に応じてビットストリームに整形され、出力される。
【0120】
以下、同様な処理を汎用的なPC上で実装する場合について説明する。
【0121】
図5に示すオーディオ符号化装置の構成によって、この場合においても前述した第2の実施形態と同様に実施することが可能である。なお、図5に示す構成において、図18に示すPE閾値履歴テーブルは、メモリ101上のワークエリアに格納されている。
【0122】
以下、CPU100において行われる処理の詳細を、図19に示すフローに従って説明する。
【0123】
ステップS201は、ユーザが符号化するオーディオ入力信号と、そのジャンルを指定する処理である。処理を終えると、ステップS202へ進む。
【0124】
ステップS202は、ステップS201で指定されたジャンルに従って、PE閾値テーブルを検索し、PE閾値を変更する処理である。処理を終えると、ステップS203へ進む。
【0125】
ステップS203は、オーディオ入力信号が終了したかどうかを判定する処理である。入力信号が終了している場合は、ステップS214へ進む。入力信号が未終了である場合は、ステップS204へ処理が進む。
【0126】
ステップS204は、符号化単位である1フレーム分のオーディオ入力信号をメモリ101上に読み出す処理である。処理を終えると、ステップS205へ進む。
【0127】
ステップS205は、符号化対象となっているフレームの聴覚心理演算を行う処理である。この演算の結果、処理対象フレームの聴覚エントロピー(PE)と、量子化単位である分割周波数帯ごとのSMR値が算出される。処理を終えると、ステップS206へ進む。
【0128】
ステップS206は、ステップS205で算出された処理対象フレームのPE値と、ステップS202によって格納されたPE閾値とを比較し、変換ブロック長を判定する処理である。処理対象フレームのPE値がPE閾値よりも大きい場合は、ステップS207へ処理が進む。そうでない場合は、ステップS208へ処理が進む。
【0129】
ステップS207では、ステップS206で行われた判定に基づき、処理対象フレームに対してショートブロック(短いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、128の周波数成分に分割されたスペクトルの組が8組得られる。処理を終えると、ステップS209に処理が進む。
【0130】
ステップS208では、ステップS206で行われた判定に基づき、処理対象フレームに対してロングブロック(長いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、1024の周波数成分に分割されたスペクトルの組が一組だけ得られる。処理を終えると、ステップS209に処理が進む。
【0131】
ステップS209は、ステップS205で算出される分割周波数帯域ごとのSMR値と、ステップS207やステップS208で得られる周波数スペクトルと、符号化ビットレートより、各分割周波数帯域に割り当てるビット量を決定する処理である。処理を終えると、ステップS210へ処理が進む。
【0132】
ステップS210は、各分割周波数帯域ごとのスケールファクタを算出するとともに、ステップS209で割り当てられたビット量に従って、周波数スペクトルを量子化する処理である。処理を終えると、ステップS211へ処理が進む。
【0133】
ステップS211は、ステップS210で算出されたスケールファクタと量子化スペクトルを、符号化方式によって定められたフォーマットに従って整形し、ビットストリームとして出力する処理である。本実施形態において、この処理によって出力されるビットストリームは、外部記憶装置104に格納されても良いし、あるいは、通信インターフェース109を介して回線網108に繋がっている外部機器に出力されても良い。処理を終えると、ステップS212へ処理が進む。
【0134】
ステップS212は、処理中のフレームのPE値と選択ブロックを、メモリ101中のPE履歴テーブルに格納する処理である。なお、PE履歴テーブルが一杯になっている場合、最も古い履歴を削除して、このフレームの履歴を格納する。処理を終えると、ステップS213へ進む。
【0135】
ステップS213は、PE履歴テーブルに格納されている履歴によって、PE閾値を補正する処理である。この処理の詳細は、図20を用いて後述する。処理を終えると、ステップS203へ進む。
【0136】
ステップS214は、聴覚心理演算や直交変換などで生じる遅延によってまだ出力されていない量子化スペクトルがメモリ101上に残っているため、それらをビットストリームに整形して出力する処理である。処理を終えると、オーディオ信号符号化処理を終了する。
【0137】
図20は、本実施形態におけるステップS213の履歴によるPE補正処理を詳細化したフローである。
【0138】
ステップS301は、PE履歴テーブルにショートブロックがあるかどうかを検索する処理である。PE履歴テーブルにショートブロックが一つでもある場合は、ステップS302へ処理が進む。そうでない場合は、ステップS311へ処理が進む。
【0139】
ステップS302は、PE履歴テーブルを参照して、履歴に残っているロングブロックの平均PE値(以下、Long_PE)を算出する処理である。処理を終えると、ステップS303へ処理が進む。
【0140】
ステップS303は、PE履歴テーブルを参照してショートブロックの平均PE値(以下、Short_PE)を算出する処理である。処理を終えると、ステップS304へ処理が進む。
【0141】
ステップS304は、平均PE値、すなわち、(Long_PE+Short_PE)/2を算出する処理である。本実施形態において、平均PE値としてこのような演算を行うのは、一つのオーディオ入力信号(楽曲)においても、PE値が高い部分とPE値が低い部分、すなわち、ショートブロックとして処理するフレームの出現する頻度が異なる場合があるためである。このような場合、PE平均値を全てのフレームの平均値とすると、同じオーディオ入力信号を符号化する処理の途中でPE平均値が乱高下して、その後の補正処理で妥当な補正ができなくなり、結果として作成されたビットストリームの音質が安定しない恐れがある。よって、このような計算方法を取っている。処理を終えると、ステップS305へ処理が進む。
【0142】
ステップS305は、ステップS304で求めた平均PE値が現在のPE閾値よりも大きいかどうかを判定する処理である。この判定の結果、平均PE値の方が大きい場合はステップS306に処理が進む。そうでない場合は、ステップS307へ処理が進む。
【0143】
ステップS306は、現在のPE閾値に10を加えてPE閾値を補正する処理である。すなわち、ステップS304で算出した平均PE値が現在のPE閾値よりも大きい場合は、PE閾値をプラス(+)方向に補正する。このようにすることで、PE値が高めに推移している楽曲に対して適切にPE閾値を補正することができる。処理を終えると、ステップS309へ処理が進む。
【0144】
ステップS307は、ステップS304で求めた平均PE値が現在のPE閾値よりも小さいかどうかを判定する処理である。この判定の結果、平均PE値の方が小さい場合は、ステップS308に処理が進む。そうでない場合は、ステップS309へ進む。
【0145】
ステップS308は、現在のPE閾値から10を引いてPE閾値を補正する処理である。すなわち、ステップS304で算出した平均PE値が現在のPE閾値よりも小さい場合は、PE閾値をマイナス方向に補正する。このようにすることで、PE値が低めに推移している楽曲に対して適切にPE閾値を補正することができる。処理を終えると、ステップS309へ処理が進む。
【0146】
ステップS309は、PE履歴テーブル中にショートブロックとなった履歴の数をカウントし、20を超えているかどうかを判定する処理である。判定の結果、ショートブロックの履歴が20以上ある場合はステップS310に処理が進む。そうでない場合は、履歴によるPE補正処理を終了し、リターンする。
【0147】
ステップS310は、PE閾値に10を加えてPE閾値を補正する処理である。すなわち、100フレームの履歴中に20以上ものショートブロックが存在する場合は、明らかにショートブロックを多用しすぎて符号化効率が低下していると考えられるため、PE閾値をプラス方向に補正する。このようにすることで、PE閾値が低いことによる符号化効率の低下を抑制する制御が可能になる。処理を終えると、履歴によるPE補正処理を終了し、リターンする。
【0148】
ステップS311は、現在のPE閾値が閾値下限に達しているかどうかを判定する処理である。判定の結果、PE閾値が閾値下限に達している場合は履歴によるPE補正処理を終了し、リターンする。そうでない場合は、ステップS312に処理が進む。
【0149】
ステップS312は、PE閾値から10を引いてPE閾値を補正する処理である。すなわち、履歴が全てロングブロックで構成されている場合は、入力信号に対してPE閾値が高めに設定され、本来ショートブロックで符号化されるべきフレームを見落としている恐れがあるため、マイナス方向に補正する。ただし、予め設定した閾値下限を超えない程度に補正を行う。これは、ほぼ変化のないような静かな楽曲の場合、PE閾値が極端に下がってしまうと本来ロングブロックで符号化すべき箇所までショートブロックで符号化され、符号化効率が下がってしまう現象を防ぐためである。処理を終えると、補正処理を終了してリターンする。
【0150】
以上説明したように、本実施形態では、PE履歴を用いてPE閾値の補正を処理中に適宜行うことによって、同じジャンルの楽曲でも入力信号に応じたPE閾値を適宜補正することができるため、更に適切なブロック判定を行うことが可能になり、その結果、更に音質の良いビットストリームを作成することができる。
【0151】
(第5の実施形態)
本発明の第5の実施形態では、入力信号を解析してジャンルを自動判定する場合の例を示す。
【0152】
図21は、本発明の第5の実施形態におけるオーディオ信号符号化装置の一構成例である。
【0153】
図示したように、本実施形態におけるオーディオ信号符号化装置は、図1に示した構成例に、10のジャンル自動判定器を付加したものである。
【0154】
1から7までの構成要素は第1の実施形態で示したものと同様であるので、説明を省略する。
【0155】
10は、ジャンル判定器であり、オーディオ入力信号を解析して、そのジャンルを判定する。
【0156】
上記構成によるオーディオ信号符号化装置におけるオーディオ信号の処理動作を、前述の第1の実施形態の動作と異なる部分を中心に以下に説明する。
【0157】
まず、処理に先立ち、各部の初期化を行う。
【0158】
次に、ユーザによって符号化するオーディオ入力信号が指定される。
【0159】
次に、ジャンル判定器10は、指定された入力信号を解析して、自動的にジャンルを判定し、ブロック長判定器4に送出する。このジャンル判定方法の詳細については、図23を用いて後述する。ブロック長判定器4は、受け取ったジャンルに従って、PE閾値を変更する。PE閾値の変更は、ジャンルごとのPE閾値を格納したテーブルを参照することによって変更しても良いし、ジャンルごとのPE補正値を格納したテーブルを検索し、PE閾値の基準となる値にジャンルごとの補正値を加えても良い。図3にこの場合のPE閾値テーブルの構成例、図4にPE補正値テーブルの構成例を示す。なお、本実施形態において、図4の補正値テーブルを用いる場合のPEの基準値は1800である。本実施形態において、これらのテーブルはブロック長判定器4に格納されている。
【0160】
その後は、第1の実施形態で前述したように、入力されたオーディオ信号はフレーム分割器1によって分割後、聴覚心理演算器3で分析されてPE値とSMRが算出される。ブロック長判定器4においてPE値とPE閾値が比較され、その結果によってブロック長が決定される。フレーム分割されたオーディオ入力信号は、フィルタバンク2において、決定されたブロック長で周波数スペクトルに変換され、ビット割当て器5が聴覚心理演算器3から出力されたSMR値にしたがって、各周波数帯域にビットを割り当て、量子化器6は各周波数帯域ごとに正規化係数を算出し、各周波数帯域に割当てられたビットに従って周波数スペクトルを量子化し、ビット整形器7によって定められた書式に応じてビットストリームに整形され、出力される。
【0161】
以下、同様な処理を汎用的なPC上で実装する場合について説明する。
【0162】
図5に示すオーディオ符号化装置の構成によって、この場合においても前述した第2の実施形態と同様に実施することが可能である。
【0163】
以下、CPU100において行われる処理の詳細を、図22に示すフローに従って説明する。
【0164】
図22は、本実施形態におけるオーディオ信号符号化処理のフローである。
【0165】
まず、ステップS401は、符号化する入力オーディオ信号をユーザが端末103を用いて指定する処理である。本実施形態において、符号化するオーディオ信号は、外部記憶装置104に格納されているオーディオPCMファイルでも良いし、マイク106で捉えたリアルタイムの音声信号をアナログ・デジタル変換した信号でも良い。処理を終えると、ステップS402へ進む。
【0166】
ステップS402は、入力オーディオ信号のジャンルを自動判定する処理である。この処理の詳細は図23を用いて後述する。処理を終えると、ステップS403へ進む。
【0167】
ステップS403は、ステップS402で判定された符号化するオーディオ入力信号のジャンルによって、メモリ101上のPE閾値テーブルを検索し、メモリ101上のPE閾値を変更する処理である。処理を終えると、ステップS404へ進む。
【0168】
ステップS404は、符号化する入力オーディオ信号が終了したかどうかを判定する処理である。入力信号が終了している場合は、ステップS413へ処理が進む。未終了の場合は、ステップS405へ処理が進む。
【0169】
ステップS405は、入力信号をチャンネルごとに処理単位であるフレームに分割する処理である。第1の実施形態での説明同様、例えば、MPEG2−AACの場合、チャンネルごとに1024サンプルのフレームに分割する。処理を終えると、ステップS406へ処理が進む。
【0170】
ステップS406は、符号化対象となっているフレームの聴覚心理演算を行う処理である。この演算の結果、処理対象フレームの聴覚エントロピー(PE)と、量子化単位である分割周波数帯ごとのSMR値が算出される。処理を終えると、ステップS407へ処理が進む。
【0171】
ステップS407は、ステップS406で算出された処理対象フレームのPE値と、ステップS403によって格納されたPE閾値とを比較し、変換ブロック長を判定する処理である。処理対象フレームのPE値がPE閾値よりも大きい場合は、ステップS408へ処理が進む。そうでない場合は、ステップS409へ処理が進む。
【0172】
ステップS408では、ステップS107で行われた判定に基づき、処理対象フレームに対してショートブロック(短いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、128個の周波数成分に分割されたスペクトルの組が8組得られる。処理を終えると、ステップS410に処理が進む。
【0173】
ステップS409では、ステップS407で行われた判定に基づき、処理対象フレームに対してロングブロック(長いブロック長)による直交変換を行う。MPEG2−AACの場合、この結果、1024の周波数成分に分割されたスペクトルの組が一組だけ得られる。処理を終えると、ステップS410に処理が進む。
【0174】
ステップS410は、ステップS406で算出される分割周波数帯域ごとのSMR値と、ステップS408もしくはステップS409で得られる周波数スペクトルと、符号化ビットレートより、各分割周波数帯域に割り当てるビット量を決定する処理である。このような処理は本実施形態のような変換符号化方法において一般的であるので、詳細は説明しない。処理を終えると、ステップS411へ処理が進む。
【0175】
ステップS411は、各分割周波数帯域ごとのスケールファクタを算出するとともに、ステップS410で割り当てられたビット量に従って、周波数スペクトルを量子化する処理である。処理を終えると、ステップS412へ処理が進む。
【0176】
ステップS412は、ステップS411で算出されたスケールファクタと量子化スペクトルを、符号化方式によって定められたフォーマットに従って整形し、ビットストリームとして出力する処理である。本実施形態において、この処理によって出力されるビットストリームは、外部記憶装置104に格納されても良いし、あるいは、通信インターフェース109を介して回線網108に繋がっている外部機器に出力されても良い。処理を終えると、ステップS404へ処理が進む。
【0177】
ステップS413は、聴覚心理演算や直交変換などで生じる遅延によってまだ出力されていない量子化スペクトルがメモリ上に残っているため、それらをビットストリームに整形して出力する処理である。処理を終えると、オーディオ信号符号化処理を終了する。
【0178】
図23は、本実施形態におけるステップS402のジャンル自動判定処理を詳細化したフローである。
【0179】
ステップS501は、オーディオ入力信号の振幅の強弱と繰り返しパターンを検知することにより、オーディオ入力信号のリズムを抽出する処理である。処理を終えると、ステップS502へ処理が進む。
【0180】
ステップS502は、ステップS501で抽出されたリズムと、入力オーディオ信号のサンプリングレートより、入力信号のテンポを算出する処理である。処理を終えると、ステップS503へ処理が進む。
【0181】
ステップS503は、FFTなどの直交変換を用いて、オーディオ入力信号を周波数スペクトルに変換し、純音成分の分析などを行う処理である。処理を終えると、ステップS504へ処理が進む。
【0182】
ステップS504は、ステップS503で行った周波数解析結果を基に、楽曲のメロディや和音構成、コード進行等を分析して曲調の抽出を行う処理である。処理を終えると、ステップS505へ処理が進む。
【0183】
ステップS505は、ここまでに抽出されたリズム、テンポ、曲調を綜合的に分析して、入力信号のジャンルを判定する処理である。この判定方法としては、例えばこれらの特徴とジャンルが格納されたデータベースを検索し、もっとも近似しているパターンを持つジャンルを選択することによってジャンルを判定する、あるいは、ジャンルごとの楽曲の特徴を学習したニューラルネットワーク回路によって判定するなどの手法があるが、これらは全て公知であるため、詳述しない。この判定の結果、ジャンルが判定不可能である場合はステップS506へ処理が進む。ジャンル判定ができた場合は、ステップS507へ処理が進む。
【0184】
ステップS506は、ジャンル情報としてデフォルトジャンルを選択する処理である。本実施形態において、デフォルトジャンルとは、ジャンル判定不可能な入力信号に与えられるジャンルであり、この情報がジャンルとして設定されると、図22のステップS403において、PE閾値としてデフォルトの値が設定される。処理を終えると、ステップS507へ処理が進む。
【0185】
ステップS507は、ステップS505やステップS506で選択されたジャンル情報をメモリ101上のワークエリアに格納する処理である。処理を終えると、ジャンル自動判定処理を終了してリターンする。
【0186】
以上説明したように、本実施形態においては、ユーザはオーディオ入力信号を指定するだけで、自動的にジャンルが判定され、適宜ジャンルに応じたPE閾値が設定されるため、ユーザに余計な手間をかけることなく音質の良いビットストリームを得ることが可能となる。
【0187】
(その他の実施形態)
なお、本発明は上述した実施形態に限定されるものではない。
【0188】
上述の第2の実施形態では、図3のPE閾値テーブルを検索することによって、ジャンルによるPE閾値変更を行っているが、これは、図4のPE閾値補正テーブルを検索することでも実現可能である。図9は、この場合のメモリマップ構成図である。このメモリマップは、基本的には図8のメモリマップと同じであるが、ワークエリアにはPE閾値、PE基準値及びPE閾値補正テーブルが格納される。
【0189】
また、上述の第2の実施形態では、メモリマップ上にPE閾値を格納しているが、その代わりに、PE閾値テーブル上の値を指すポインタを格納しても同様の処理が実現可能である。
【0190】
また、上述の実施形態では、特に記録媒体に関して言及していないが、これは、FD、HDD、CD、DVD、MO、半導体メモリなど、どのような記録媒体を用いても適用可能である。
【0191】
また、上述の第4の実施形態では、PE履歴テーブルを通常の表形式のデータとして構成しているが、これは予め定められた数のリストを格納できるリングバッファを用いて構成しても適用可能である。
【0192】
また、上述の第4の実施形態では、1フレームの処理を行う度にPE閾値の補正を行っているが、これは数フレーム、もしくは数十フレーム単位の頻度で行ってもよい。
【0193】
以上説明したように、上記実施形態によれば、オーディオ入力信号のジャンルによって、ブロック長判定の際に参照するPE閾値を適宜設定するため、プリエコーの発生を避けながら符号化効率の良い符号化処理が可能となり、特に低ビットレート時に音質の良い符号化処理を実現することができる。例えば、入力信号のジャンルがクラシックの場合、PE閾値が低めに設定されるため、短いブロック長を選択すべき部分で適切に短いブロック長が選択されるため、プリエコーの発生を低減することが可能となり、逆に、ジャンルがロックの場合、短いブロック長が過多に適用されて符号化効率が落ち、結果として音質が劣化することを防ぐことができる。すなわち、入力信号の特性に応じた適切なブロック長選択が可能になり、符号化効率の低下を防止しつつ、プリエコーの発生を抑えて高音質なビットストリームを作成することができる。
【0194】
更に、上記実施形態によれば、符号化オーディオデータにおいて一般的に利用されているメタデータであるID3タグのジャンル情報によってPE閾値を変更することによって、ユーザに意識させることなく適宜PE閾値を設定することが可能になり、ユーザに余計な手間をかけることなく音質の良いビットストリームを得ることができる。すなわち、ユーザに余計な手間をかけることなく入力信号のジャンルに応じた適切なブロック長の選択が可能になる。
【0195】
更に、上記実施形態によれば、過去のPE値とブロック選択情報の履歴によって、PE閾値を適宜補正することによって、入力信号に応じたPE閾値の補正が可能になり、ジャンル選択だけでは細かな調整が行えなかったブロック選択が適宜行われるようにすることが可能となり、更に音質の良いビットストリームが得られる。すなわち、入力信号に応じて適切にブロック長選択を制御することが可能になり、更に高品質なビットストリームを提供することができる。
【0196】
更に、上記実施形態によれば、入力信号のジャンルを自動的に判断し、それによってPE閾値を変更することによって、ユーザに意識させることなく入力信号のジャンルに応じたPE閾値の設定が可能となり、ユーザの利便性が向上する。
【0197】
本実施形態は、コンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体又はかかるプログラムを伝送するインターネット等の伝送媒体も本発明の実施形態として適用することができる。また、上記のプログラムを記録したコンピュータ読み取り可能な記録媒体等のコンピュータプログラムプロダクトも本発明の実施形態として適用することができる。上記のプログラム、記録媒体、伝送媒体及びコンピュータプログラムプロダクトは、本発明の範疇に含まれる。記録媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
【0198】
なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。
【0199】
【発明の効果】
以上説明したように、本発明によれば、オーディオ入力信号のジャンルに応じて、変換ブロック長決定の際に参照する聴覚エントロピー閾値を決定するため、プリエコーの発生を避けながら符号化効率の良い符号化処理が可能となり、特に低ビットレート時に音質の良い符号化処理を実現することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態におけるオーディオ信号符号化装置の一構成例を示す図である。
【図2】本発明の第2の実施形態におけるオーディオ信号符号化処理のフローチャートである。
【図3】本発明の第1の実施形態におけるPE閾値テーブルの模式図である。
【図4】本発明の第1の実施形態におけるPE補正値テーブルの模式図である。
【図5】本発明の第2の実施形態におけるオーディオ信号符号化装置の一構成例を示す図である。
【図6】本発明の第2の実施形態におけるオーディオ信号符号化処理プログラムを格納した記憶媒体の内容構成例を示す図である。
【図7】本発明の第2の実施形態におけるオーディオ信号符号化処理をパーソナルコンピュータに導入する模式図である。
【図8】本発明の第2の実施形態におけるメモリマップ構成図である。
【図9】本発明の他の実施形態におけるメモリマップ構成図である。
【図10】オーディオ信号の模倣図である。
【図11】図10で示されるオーディオ信号を2048サンプル単位で符号化、復号化した場合のオーディオ信号の模倣図である。
【図12】図10で示されるオーディオ信号を256サンプル単位で符号化、復号化した場合のオーディオ信号の模倣図である。
【図13】本発明の第3の実施形態におけるオーディオ信号符号化装置の一構成例を示す図である。
【図14】本発明の第3の実施形態におけるオーディオ信号符号化処理のフローチャートである。
【図15】本発明の第3の実施形態におけるPE閾値テーブルの模式図である。
【図16】本発明の第3の実施形態におけるPE補正値テーブルの模式図である。
【図17】本発明の第4の実施形態におけるオーディオ信号符号化装置の一構成例を示す図である。
【図18】本発明の第4の実施形態におけるPE履歴テーブルの模倣図である。
【図19】本発明の第4の実施形態におけるオーディオ信号符号化処理のフローチャートである。
【図20】本発明の第4の実施形態におけるPE閾値補正処理のフローチャートである。
【図21】本発明の第5の実施形態におけるオーディオ信号符号化装置の一構成例を示す図である。
【図22】本発明の第5の実施形態におけるオーディオ信号符号化処理のフローチャートである。
【図23】本発明の第5の実施形態におけるジャンル自動判定処理のフローチャートである。
【符号の説明】
1 フレーム分割器
2 フィルタバンク
3 聴覚心理演算器
4 ブロック長判定器
5 ビット割当て器
6 量子化器
7 ビット整形器
8 ID3タグ入力器
9 PE履歴一時保存器
10 ジャンル自動判定器
100 CPU
101 メモリ
102 バス
103 端末
104 外部記憶装置
105 メディアドライブ
106 マイク
107 スピーカー
108 通信回線
109 通信インターフェース
110 記憶媒体
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an audio signal encoding technique, and more particularly, to an audio signal encoding technique using a transform coding technique capable of changing the transform block length.
[0002]
[Prior art]
In recent years, high-quality and high-efficiency audio signal encoding technology has been developed for DVD-Video audio tracks, portable audio players using semiconductor memory, HDD, etc., music distribution via the Internet, home servers in home LAN, etc. It is widely used and widely spread, and its importance is increasing.
[0003]
Many of such audio signal encoding techniques perform time-frequency conversion using a conversion encoding technique. For example, in MPEG2-AAC and Dolby Digital (AC-3), a filter bank is configured by a single orthogonal transform such as MDCT, and in MPEG1 Audio Layer 3 (MP3) and ATRAC (MD), subband division such as QMF is performed. A filter bank is configured by connecting filters and orthogonal transforms in multiple stages.
[0004]
In these high-efficiency audio encoding techniques, the compression efficiency is increased by removing the spectral components determined to be masked by performing masking analysis using human auditory characteristics.
[0005]
The masking analysis used in these high-efficiency audio coding techniques is mainly masking by an audible frequency region in silence and frequency masking by a masker in a critical band.
[0006]
Since the signal determined to be undetectable by humans by the masking analysis is mainly a signal in a high frequency range, in general, the quantization error of the high frequency component can be masked even if it becomes a little larger.
[0007]
However, in the transform coding method, in the case of a so-called transient state in which there is a sudden change in the audio input signal, the quantization error of the high-frequency component in the part where the sudden change occurs is the signal immediately before or immediately after the sudden change. Therefore, ringing noise occurs.
[0008]
As a human auditory characteristic, when a loud sound is generated, it becomes difficult to hear the sound immediately before and immediately after that. This is called a time masking effect. The amount of time that can be heard after a loud sound is relatively long, about 100 msec, although there are individual differences. However, the time of the masking effect that works immediately before is as short as about 5 to 6 msec. Therefore, when ringing noise is generated, noise before a loud sound is easily detected. This is a phenomenon generally called pre-echo.
[0009]
Hereinafter, this phenomenon will be described with reference to the drawings.
[0010]
FIG. 10 is an example of an audio input signal that is changing rapidly. FIG. 11 shows an example of an audio signal obtained by encoding and decoding this signal with 2048 samples, which is a conversion unit in the case of a normal block length of MPEG-2 AAC. As shown in the figure, a quantization error in a high frequency region that occurs in a sudden signal change portion affects the entire block.
[0011]
As described above, immediately before the portion where the amplitude changes abruptly, a human cannot sense noise due to the time masking effect. However, assuming that the input signal uses the same 44.1 KHz sampling frequency as the PCM signal used for the music CD, the conversion unit is converted into time, and the time of 2048 samples is 2048 ÷ 44100 × 1000. = About 46.44 ms, so even if noise occurs in the first half of the time, the pre-masking time will be over and human will perceive the pre-echo.
[0012]
As a method for suppressing this, in various audio encoding methods, by detecting a sudden change in the input signal and shortening the transform block length, the quantization error of the high frequency component due to the sudden change is changed. The occurrence of pre-echo is suppressed by making it not reach the immediately preceding portion.
[0013]
FIG. 12 shows a time domain signal when the audio signal shown in FIG. 10 is encoded and decoded with 256 samples, which is a conversion unit in the case of a short block length in MPEG-2 AAC. In this case, the influence of the quantization error in the high frequency region due to the rapid change of the input signal is confined in the 256 sample block in which the change occurs. As before, when this block length is converted to time at the 44.1 KHz sampling frequency, it becomes approximately 5.80 ms, and thus the human cannot substantially perceive this noise due to the premasking effect, and as a result, the pre-echo disappears.
[0014]
In the actual processing, in order to remove aliasing distortion caused by conversion, the conversion is performed by shifting the input sample by 50% of the conversion length after performing conversion in units of conversion trillions, and superimposing the results. Although this procedure is carried out, this procedure is omitted in the figure for convenience of explanation.
[0015]
However, in general, shortening the block length not only reduces the accuracy of masking analysis due to a decrease in frequency resolution, but also increases the normalization coefficient (hereinafter referred to as scale factor) for each frequency band used for quantization by the number of blocks. Therefore, the amount of information consumed there increases, and bits that should be allocated to spectrum information at the time of quantization are consumed for the scale factor, so that the coding efficiency is lowered. As a result, the quantization error cannot be strictly masked particularly at a low bit rate, and noise may be detected more easily than when the block length is long.
[0016]
Therefore, when determining the actual block length, it is necessary to appropriately determine the balance between suppression of pre-echo and noise generated by a decrease in coding efficiency.
[0017]
As this block length selection method, in MPEG Audio encoding schemes such as MP3 and MPEG-2 AAC, an auditory entropy (hereinafter referred to as PE) is calculated for each block, and if the block length is larger than a predetermined PE threshold, a short block is selected. The length is to be selected.
[0018]
Note that an ID3 tag has been proposed as one of data formats for storing meta information (music title, artist name, album name, genre, creation year, copyright information, etc.) regarding such audio encoded data. Yes. The ID3 tag is generally used particularly in the MP3 file, and is added to the end of the MP3 bit stream.
[0019]
Since the display and editing of the ID3 tag is implemented as a function of a general audio encoding / decoding application, the user can easily edit the contents of the ID3 tag.
[0020]
On the other hand, in recent years, research on techniques for analyzing audio signals themselves and automatically extracting meta information such as genres has been actively conducted. In Patent Document 1 below, the music genre of the music signal is determined by comparing the low-frequency analysis result of the music signal with a plurality of low-frequency component patterns obtained in advance for each music genre. In Patent Document 2 below, the music genre of a music signal is determined using a neural network that has learned patterns such as rhythm, tempo, and adjustment for each genre.
[0021]
Patent Document 3 below discloses a technique for determining block length switching by comparing a threshold value with a difference obtained by subtracting a minimum value from a maximum value of PE.
[0022]
Further, in Patent Document 4 below, when the entropy of auditory entropy is not calculated, the input PCM signal is divided into segments shorter than the block length, a sudden change in amplitude is detected, and a sudden change is detected. A method of estimating the quantization noise in the previous segment and the masking value of the previous segment and selecting a short block length when quantization noise that cannot be masked occurs is disclosed.
[0023]
[Patent Document 1]
JP-A-8-37700
[Patent Document 2]
Japanese Patent Laid-Open No. 10-161654
[Patent Document 3]
JP 2000-276198 A
[Patent Document 4]
JP 2001-142493 A
[0024]
[Problems to be solved by the invention]
As described above, for example, in the block length determination method described in the MPEG-2 AAC standard (ISO / IEC 13818-7: 1997), the block length is determined only by comparing the PE for each block with a fixed PE threshold. is doing. However, since this PE threshold actually changes depending on the device implementation and input signal, when a fixed PE threshold is applied in all cases, the block length is often determined incorrectly depending on the music. The sound quality may be deteriorated due to a decrease in efficiency or a pre-echo.
[0025]
For example, if the block length selection of audio signals of all genres is performed using a conventional fixed PE threshold, a short block length is frequently used in music that is drastically changing, such as hard rock. As a result, unmasked noise increases and sound quality deteriorates. On the other hand, in an adult music such as classical music, a pre-echo occurs without an appropriate short block length being selected.
[0026]
The present invention has been devised in view of the above problems, and by appropriately changing the PE threshold depending on the genre of the input audio signal, by enabling appropriate block selection, a block length shorter than necessary can be achieved. An object of the present invention is to provide an audio encoding technique capable of preventing a selection, appropriately suppressing pre-echo while maintaining encoding efficiency, and creating a bit stream with good sound quality.
[0027]
[Means for Solving the Problems]
According to an aspect of the present invention, a frame dividing unit that divides an audio input signal into frames of processing units, an auditory psychological operation unit that analyzes the audio input signal divided into frames and outputs an auditory entropy value, Based on the auditory entropy value and auditory entropy threshold output by the auditory psychological calculation unit, a block length determination unit that determines a conversion block length of the frame, and the frame according to the block length determined by the block length determination unit An audio signal encoding device, wherein the block length determination unit determines the auditory entropy threshold according to a genre of an audio input signal. Provided.
According to another aspect of the present invention, a frame dividing unit that divides an audio input signal into frames of processing units, an auditory psychological operation unit that analyzes the audio input signal divided into frames and outputs an auditory entropy value, Based on the auditory entropy value and the auditory entropy threshold output by the auditory psychological calculation unit, a block length determination unit that determines a conversion block length of the frame, and a block length determined by the block length determination unit, A filter bank that blocks a frame and converts it into a frequency spectrum, and a history storage unit for storing a history of auditory entropy values of each frame output by the auditory psychological operation unit, the block length determination unit The auditory entropy threshold is set according to the history of auditory entropy values stored in the history storage unit. Audio signal encoding apparatus characterized by a constant is provided.
According to still another aspect of the present invention, a frame dividing step of dividing an audio input signal into frames of processing units, an auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value, A block length determination step for determining a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold, and the frame is blocked according to the determined block length, and a frequency spectrum The audio signal encoding method is characterized in that the block length determination step determines the auditory entropy threshold according to the genre of the audio input signal.
According to still another aspect of the present invention, a frame dividing step of dividing an audio input signal into frames of processing units, an auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value, A block length determination step for determining a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold, and the frame is blocked according to the determined block length, and a frequency spectrum And a history storage step of storing a history of auditory entropy values of each frame output by the auditory psychological calculation step in a history storage unit, wherein the block length determination step includes the history storage unit According to the history of auditory entropy values stored in Audio signal encoding method characterized by determining a Toropi threshold is provided.
According to still another aspect of the present invention, a frame dividing step of dividing an audio input signal into frames of processing units, an auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value, A block length determination block that determines a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold, and blocks the frame according to the determined block length, and a frequency spectrum A program for causing a computer to execute a conversion step for converting into a block, wherein the block length determination step determines the auditory entropy threshold according to a genre of an audio input signal. The
According to still another aspect of the present invention, a frame dividing step of dividing an audio input signal into frames of processing units, an auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value, A block length determination step for determining a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold, and the frame is blocked according to the determined block length, and a frequency spectrum A program for causing a computer to execute a conversion step of converting into a history storage step of storing a history of auditory entropy values of each frame output by the auditory psychological calculation step in a history storage unit, the block length The determination step is stored in the history storage unit. Depending on the history of the objective entropy value, the program and determines the aural entropy threshold is provided.
[0028]
According to the present invention, in order to determine the auditory entropy threshold to be referred to when determining the transform block length according to the genre of the audio input signal, it is possible to perform coding processing with good coding efficiency while avoiding the occurrence of pre-echo, Particularly, encoding processing with good sound quality can be realized at a low bit rate.
[0029]
DETAILED DESCRIPTION OF THE INVENTION
(First embodiment)
Hereinafter, the present invention will be described in detail with reference to the drawings.
FIG. 1 is a configuration example of an audio encoding device according to the first embodiment of the present invention.
[0030]
In the illustrated configuration, reference numeral 1 denotes a frame divider that divides an audio input signal into frames as processing units. The divided frames are sent to a filter bank 2 and an auditory psychological calculator 3 described later.
[0031]
Reference numeral 2 denotes a filter bank, which converts an input time signal divided into frames into a frequency spectrum with a block length of a length designated by the block length determiner 4.
[0032]
An auditory psychological calculator 3 analyzes an audio input signal for each frame, calculates an auditory entropy value, and performs masking calculation for each divided frequency band serving as a quantization unit. As a result of this calculation, the auditory entropy (PE) value is output to the block length determiner 4, and the signal-to-mask ratio (Signal Mask Ratio: SMR) for each divided frequency band is output to the bit allocator 5.
[0033]
Reference numeral 4 denotes a block length determiner, which changes and holds the PE threshold according to genre information sent from the outside, and compares the PE sent from the auditory psychological calculator 3 with the PE threshold to determine the converted block length. , Notify the filter bank 2.
[0034]
A bit allocator 5 determines the bit amount to be allocated to each divided frequency band with reference to the SMR value and frequency spectrum for each divided frequency band transmitted from the auditory psychological calculator 3.
[0035]
Reference numeral 6 denotes a quantizer, which calculates a normalization coefficient (scale factor) of the frequency spectrum output from the filter bank 2 for each frequency band and outputs a frequency according to the bit amount for each frequency band output from the bit allocator 5. Quantize the spectrum.
[0036]
A bit shaper 7 forms a bit stream by appropriately shaping the scale factor and quantized spectrum output from the quantizer 6 into a prescribed format and outputs the bit stream.
[0037]
An audio signal processing operation in the audio signal encoding apparatus having the above configuration will be described below.
[0038]
In the present embodiment, MPEG2-AAC is described as an example of an encoding method for convenience of explanation, but other encoding methods such as MP3 that perform block length switching determination by PE are also realized in exactly the same manner. Is possible.
[0039]
First, prior to processing, each unit is initialized. At this time, the block length determiner 4 changes the PE threshold according to the genre information of the audio signal input from the outside. The PE threshold value can be changed by referring to a table storing PE threshold values for each genre and selecting by genre, or referring to a table storing PE correction values for each genre. A correction value for each genre may be added to the reference value. FIG. 3 shows a configuration example of the PE threshold value table, and FIG. 4 shows a mimic diagram of the PE correction value table. The reference value of PE when the PE correction value table of FIG. In the present embodiment, these tables are stored in the block length determiner 4.
[0040]
An input audio signal such as an audio PCM signal is divided into frames by the frame divider 1 and sent to the filter bank 2 and the psychoacoustic calculator 3. In the case of the MPEG2-AAC LC (Low-Complexity) profile, one frame is composed of 1024 sample PCM signals.
[0041]
The input audio signal is subjected to auditory entropy and masking calculation for each frequency band by the auditory psychological calculator 3 for each frame. The calculated auditory entropy value is compared with the PE threshold value previously changed by the genre information by the block length determiner 4. Here, when the PE value of the frame is larger than the PE threshold, it is determined to use a short block length, and otherwise, it is determined to use a long block length. In the filter bank 2, the input signal is converted into a frequency spectrum with a block length according to this determination.
[0042]
In MPEG2-AAC, in order to eliminate aliasing due to orthogonal transformation in the filter bank 2, overlapping transformation by MDCT is performed. For this reason, in the time-frequency conversion, 2048 samples including the processing target frame and the immediately preceding frame are input as one unit, and 1024 frequency spectra are obtained. At this time, when a long block length is used, 2048 samples of the input signal are orthogonally transformed as one block, and 1024 frequency spectra are output. When a short block length is used, the conversion for outputting 128 frequency spectra with 256 samples of the input signal as one block is performed 8 times while shifting the input signal by 128 samples.
[0043]
Based on the frequency spectrum output from the filter bank 2 and the SMR value output from the psychoacoustic operator 3, the bit allocator 5 allocates bits to each frequency band, and the quantizer 6 determines the scale factor for each frequency band. Calculate and quantize the frequency spectrum according to the bits assigned to each frequency band.
[0044]
The scale factor and the quantized spectrum for each frequency band are shaped into a bit stream according to the format determined by the bit shaper 7 and output.
[0045]
(Second Embodiment)
The second embodiment of the present invention can be implemented as a software program that runs on a general-purpose personal computer (PC). Hereinafter, this case will be described with reference to the drawings.
[0046]
FIG. 5 is a configuration example of an audio signal encoding device according to the second embodiment of the present invention.
[0047]
In the configuration shown in the figure, reference numeral 100 denotes a CPU, which performs operations for audio signal encoding processing, logical determination, and the like, and controls each component connected to the bus via the bus 102.
[0048]
A memory 101 stores a basic I / O program in the configuration example of the present embodiment, a program code being executed, data necessary for program processing, and the like.
[0049]
Reference numeral 102 denotes a bus, which transfers an address signal indicating a component to be controlled by the CPU 100, transfers a control signal of each component to be controlled by the CPU 100, and transfers data between the components. Do.
[0050]
Reference numeral 103 denotes a terminal for instructing device activation, setting of various conditions and input signals, and encoding start.
[0051]
Reference numeral 104 denotes an external storage device, which is an external storage area for storing data, programs, and the like. Data, programs, and the like are stored as necessary, and the stored data and programs are called up when necessary.
[0052]
Reference numeral 105 denotes a media drive. Programs, data, digital audio signals, and the like recorded on the recording medium are loaded into the audio signal encoding apparatus by the media drive 105 reading. In addition, various data and execution programs stored in the external storage device 104 can be written to the recording medium.
[0053]
A microphone 106 collects sound and converts it into an audio signal.
[0054]
Reference numeral 107 denotes a speaker, which can output arbitrary audio signal data as an actual sound.
[0055]
Reference numeral 108 denotes a communication network, which includes a LAN, a public line, a wireless line, a broadcast wave, and the like.
[0056]
Reference numeral 109 denotes a communication interface, which is connected to the communication network 108. The audio signal encoding apparatus according to the present embodiment can communicate with an external device via the communication network via this device and transmit / receive data and programs.
[0057]
In the audio signal encoding apparatus according to the present embodiment including such components, the apparatus operates in response to various inputs from the terminal 103. When an input from the terminal 103 is supplied, an interrupt signal is generated. By being sent to the CPU 100, the CPU 100 reads out various control signals stored in the memory 101, and various controls are performed in accordance with those control signals.
[0058]
The apparatus according to the present embodiment operates when the CPU 100 executes the basic I / O program, the OS, and the audio signal encoding processing program. The basic I / O program is written in the memory 101, and the OS is written in the external storage device 104. When the power of the apparatus is turned on, the OS is read from the external storage device 104 into the memory 101 by the IPL (Initial Program Loading) function in the basic I / O program, and the operation of the OS is started.
[0059]
This audio signal encoding processing program is a program code based on the flowchart of the audio signal encoding processing procedure shown in FIG.
[0060]
FIG. 6 is a content configuration diagram when the audio signal encoding processing program and related data are recorded on a recording medium.
[0061]
In the present embodiment, the audio signal encoding processing program and related data are recorded on a recording medium. As shown in the figure, directory information of the recording medium is recorded in the head area of the recording medium, and thereafter, the audio signal encoding processing program which is the content of the recording medium and the audio signal encoding processing related data are stored. It is recorded as a file.
[0062]
FIG. 7 is a schematic diagram for introducing the audio signal encoding processing program into the audio signal encoding apparatus. The audio signal encoding processing program and related data recorded on the recording medium can be loaded into this apparatus through the media drive 105 as shown in FIG. When the recording medium 110 is set in the media drive 105 of the personal computer, the audio signal encoding processing program and related data are read from the recording medium under the control of the OS and the basic I / O program, and the external storage device 104 is read out. Stored in After that, these information are loaded into the memory 101 at the time of restart and can be operated.
[0063]
FIG. 8 shows a memory map in a state where the audio signal encoding device processing program is loaded into the memory 101 and becomes executable. The memory 101 stores a basic I / O program, an OS, an audio signal encoding processing program, related data, and a work area. At this time, the PE threshold and the PE threshold table shown in FIG. 3 are stored in the work area of the memory 101.
[0064]
Hereinafter, an audio signal encoding process executed by the CPU 100 in the present embodiment will be described according to a flow.
[0065]
FIG. 2 is a flowchart of audio signal encoding processing in the present embodiment.
[0066]
First, step S <b> 1 is a process in which the user designates an input audio signal to be encoded and its genre using the terminal 103. In the present embodiment, the audio signal to be encoded may be an audio PCM file stored in the external storage device 104 or a signal obtained by analog / digital conversion of a real-time audio signal captured by the microphone 106. When the process is finished, step S2 follows.
[0067]
Step S2 is a process of searching the PE threshold value table on the memory 101 and changing the PE threshold value on the memory 101 according to the genre of the audio input signal to be encoded specified in step S1. For example, when the genre input in step S1 is “lock”, 2000 is stored as a PE threshold in a predetermined area on the memory 101 as a result of searching the PE threshold table shown in FIG. When the process is finished, step S3 follows.
[0068]
Step S3 is a process for determining whether or not the input audio signal to be encoded has been completed. If the input signal has ended, the process proceeds to step S12. If not completed, the process proceeds to step S4.
[0069]
Step S4 is a process of dividing the input signal into frames which are processing units for each channel. Similar to the description in the first embodiment, for example, in the case of MPEG2-AAC, each channel is divided into 1024 sample frames. When the process is finished, the process proceeds to step S5.
[0070]
Step S5 is a process of performing auditory psychological calculation of the frame to be encoded. As a result of this calculation, the auditory entropy (PE) of the processing target frame and the SMR value for each divided frequency band that is a quantization unit are calculated. When the process is finished, the process proceeds to step S6.
[0071]
Step S6 is a process of comparing the PE value of the processing target frame calculated in step S5 with the PE threshold stored in step S2 to determine the transform block length. If the PE value of the processing target frame is larger than the PE threshold, the process proceeds to step S7. Otherwise, the process proceeds to step S8.
[0072]
In step S7, based on the determination made in step S6, orthogonal transform using a short block (short block length) is performed on the processing target frame. In the case of MPEG2-AAC, as a result, eight sets of spectra divided into 128 frequency components are obtained. When the process is finished, the process proceeds to step S9.
[0073]
In step S8, orthogonal transform using a long block (long block length) is performed on the processing target frame based on the determination made in step S6. In the case of MPEG2-AAC, as a result, only one set of spectra divided into 1024 frequency components is obtained. When the process is finished, the process proceeds to step S9.
[0074]
Step S9 is a process of determining the bit amount to be allocated to each divided frequency band from the SMR value for each divided frequency band calculated in step S5, the frequency spectrum obtained in step S7 or step S8, and the encoding bit rate. is there. Such processing is common in the transform coding method as in the present embodiment, and therefore will not be described in detail. When the process is finished, the process proceeds to step S10.
[0075]
Step S10 is a process of calculating a scale factor for each divided frequency band and quantizing the frequency spectrum according to the bit amount assigned in step S9. When the process is finished, the process proceeds to step S11.
[0076]
Step S11 is a process of shaping the scale factor and the quantized spectrum calculated in step S10 according to a format determined by the encoding method and outputting it as a bit stream. In the present embodiment, the bit stream output by this processing may be stored in the external storage device 104, or may be output to an external device connected to the network 108 via the communication interface 109. . When the process is finished, the process proceeds to step S3.
[0077]
Step S12 is a process of shaping the quantized spectrum that has not yet been output due to the delay caused by the psychoacoustic operation or orthogonal transformation, etc., into the bit stream and outputting it. When the process is finished, the audio signal encoding process is finished.
[0078]
As described above, in the audio signal encoding process according to the present embodiment, the PE threshold value to be referred to when determining the block length is appropriately set according to the genre of the audio input signal. A good encoding process is possible, and an encoding process with good sound quality can be realized particularly at a low bit rate. For example, when the genre of the input signal is classic, the PE threshold is set low, so that a short block length is appropriately selected at a portion where a short block length is to be selected, so that the occurrence of pre-echo can be reduced. On the other hand, when the genre is rock, by setting the PE threshold value higher, it is possible to prevent the sound quality from being deteriorated as a result of the excessively short block length being applied and the encoding efficiency being lowered.
[0079]
(Third embodiment)
In the third embodiment of the present invention, the case where the PE threshold is determined by the genre in the ID3 tag input by the user will be described.
[0080]
FIG. 13 is a configuration example of an audio signal encoding device according to the third embodiment of the present invention.
[0081]
As shown in the figure, the audio signal encoding apparatus according to the present embodiment is obtained by adding 8 ID3 tag input devices to the configuration example shown in FIG.
[0082]
Since the constituent elements 1 to 7 are the same as those shown in the first embodiment, the description thereof will be omitted.
[0083]
Reference numeral 8 denotes an ID3 tag input device that accepts input of user ID3 tag information and holds the contents thereof.
[0084]
An audio signal processing operation in the audio signal encoding apparatus having the above configuration will be described below with a focus on differences from the operation of the first embodiment.
[0085]
First, prior to processing, each unit is initialized.
[0086]
Next, an audio input signal to be encoded is designated by the user, and ID3 tag information related to the input signal is input to the ID3 tag input unit 8. At this time, the block length determiner 4 changes the PE threshold according to the input ID3 tag genre. The PE threshold value may be changed by referring to a table storing the PE threshold value for each genre and selecting by the genre number (number) of the ID3 tag, or a table storing the PE correction value for each genre. A search may be made according to the genre number of the ID3 tag, and a correction value for each genre may be added to a value serving as a reference for the PE threshold. FIG. 15 shows a mimic diagram of the PE threshold value table in this case, and FIG. 16 shows a mimic diagram of the PE correction value table. In the present embodiment, the PE reference value when the PE correction value table of FIG. In the present embodiment, these tables are stored in the block length determiner 4.
[0087]
Thereafter, as described above in the first embodiment, the input audio signal is divided by the frame divider 1 and then analyzed by the auditory psychological calculator 3 to calculate the PE value and the SMR. The block length determiner 4 compares the PE value with the PE threshold, and the block length is determined based on the result. The audio input signal that has been divided into frames is converted into a frequency spectrum by the determined block length in the filter bank 2, and the bit allocator 5 applies a bit to each frequency band according to the SMR value output from the psychoacoustic operator 4. The quantizer 6 calculates a normalization coefficient for each frequency band, quantizes the frequency spectrum according to the bits assigned to each frequency band, and converts the frequency spectrum into a bit stream according to the format determined by the bit shaper 7. Formatted and output.
[0088]
When encoding of all input signals is completed, each information of the ID3 tag held in the ID3 tag input unit 8 is added to the end of the bit stream by the bit shaper 7.
[0089]
Hereinafter, a case where similar processing is implemented on a general-purpose PC will be described.
[0090]
The configuration of the audio encoding device shown in FIG. 5 can be implemented in this case as in the second embodiment described above. In the configuration shown in FIG. 5, the PE threshold table shown in FIG. 15 is stored in advance in the work area on the memory 101.
[0091]
Hereinafter, the details of the processing performed in the CPU 100 will be described according to the flow shown in FIG.
[0092]
First, step S <b> 101 is processing in which the user designates an input audio signal to be encoded using the terminal 103. In the present embodiment, the audio signal to be encoded may be an audio PCM file stored in the external storage device 104 or a signal obtained by analog / digital conversion of a real-time audio signal captured by the microphone 106. When the process is finished, step S102 follows.
[0093]
Step S102 is processing in which the user designates the ID3 tag using the terminal 103. As a result of this processing, the ID3 genre No. of the input audio signal is specified as a part of the ID3 tag. When the process is finished, step S 103 follows.
[0094]
Step S103 is a process of searching the PE threshold value table on the memory 101 and changing the PE threshold value on the memory 101 based on the ID3 genre No. of the audio input signal to be encoded specified in step S102. For example, when the ID3 genre No specified in step S102 is “2”, as a result of searching the PE threshold table shown in FIG. 15, 1600 is stored as a PE threshold in a predetermined area on the memory 101. When the process is finished, step S 104 follows.
[0095]
Step S104 is processing for determining whether or not the input audio signal to be encoded has been completed. If the input signal has ended, the process proceeds to step S113. If not completed, the process proceeds to step S105.
[0096]
Step S105 is processing for dividing the input signal into frames, which are processing units, for each channel. Similar to the description in the first embodiment, for example, in the case of MPEG2-AAC, each channel is divided into 1024 sample frames. When the process is finished, the process proceeds to step S106.
[0097]
Step S <b> 106 is processing for performing psychoacoustic calculation of the frame to be encoded. As a result of this calculation, the auditory entropy (PE) of the processing target frame and the SMR value for each divided frequency band that is a quantization unit are calculated. When the process is finished, the process proceeds to step S107.
[0098]
Step S107 is a process of comparing the PE value of the processing target frame calculated in step S106 with the PE threshold stored in step S103 to determine the transform block length. If the PE value of the processing target frame is larger than the PE threshold, the process proceeds to step S108. Otherwise, the process proceeds to step S109.
[0099]
In step S108, based on the determination made in step S107, orthogonal transform using a short block (short block length) is performed on the processing target frame. In the case of MPEG2-AAC, as a result, eight sets of spectra divided into 128 frequency components are obtained. When the process is finished, the process proceeds to step S110.
[0100]
In step S109, based on the determination made in step S107, orthogonal transform using a long block (long block length) is performed on the processing target frame. In the case of MPEG2-AAC, as a result, only one set of spectra divided into 1024 frequency components is obtained. When the process is finished, the process proceeds to step S110.
[0101]
Step S110 is a process of determining the bit amount to be allocated to each divided frequency band from the SMR value for each divided frequency band calculated in step S106, the frequency spectrum obtained in step S108 or step S109, and the encoding bit rate. is there. When the process is finished, the process proceeds to step S111.
[0102]
Step S111 is a process of calculating a scale factor for each divided frequency band and quantizing the frequency spectrum according to the bit amount allocated in step S110. When the process is finished, the process proceeds to step S112.
[0103]
Step S112 is processing for shaping the scale factor and the quantized spectrum calculated in step S111 according to a format determined by the encoding method and outputting the result as a bit stream. In this embodiment, the bit stream output by this processing may be stored in an external storage device, or may be output to an external device connected to a line network via a communication interface. When the process is finished, the process proceeds to step S104.
[0104]
Step S113 is a process of shaping the quantized spectrum that has not yet been output due to the delay caused by the psychoacoustic calculation or orthogonal transformation, etc., into the bit stream and outputting it. When the process is finished, the process proceeds to step S114.
[0105]
Step S114 is processing for appropriately encoding and adding the ID3 tag information input in step S102 to the end of the generated encoded bitstream. As a result, when this encoded data is decoded, the ID3 tag information of this data can be accessed, and various information can be used on the decoding processing side. When the process is finished, the audio signal encoding process is finished.
[0106]
As described above, in this embodiment, by inputting an ID3 tag that is standard metadata of audio encoded data, the PE threshold is appropriately changed, so that the user can be changed from a predetermined genre. Since it is sufficient to select the genre, the convenience of the user at the time of encoding is improved, and encoded data with good sound quality can be obtained.
[0107]
(Fourth embodiment)
In the fourth embodiment of the present invention, an example in which the PE threshold is adjusted by the PE history is shown.
[0108]
FIG. 17 is a configuration example of an audio signal encoding device according to the fourth embodiment of the present invention.
[0109]
As shown in the figure, the audio signal encoding apparatus according to this embodiment is obtained by adding nine PE history storage units to the configuration example shown in FIG.
[0110]
Since the constituent elements 1 to 7 are the same as those shown in the first embodiment, the description thereof will be omitted.
[0111]
9 is a PE history temporary storage, and a set of the PE value of each frame output as a result of analyzing the audio input signal by the psychoacoustic operator 3 and the block length determined by the block length determiner 4 as a result, A predetermined number is sequentially stored from a new one. In the present embodiment, the PE history for 100 frames can be stored. A mimetic diagram of the PE history table stored in the PE history temporary storage 9 is shown in FIG.
[0112]
An audio signal processing operation in the audio signal encoding apparatus having the above-described configuration will be described below with a focus on differences from the operation of the first embodiment.
[0113]
In the present embodiment, MPEG2-AAC is described as an example of an encoding method for convenience of explanation, but other encoding methods such as MP3 that perform block length switching determination by PE are also realized in exactly the same manner. Is possible.
[0114]
First, prior to processing, each unit is initialized. At this time, the block length determiner 4 sets an initial PE threshold by referring to the PE threshold table inside the block length determiner 4 according to the genre information of the audio signal input from the outside.
[0115]
An input audio signal such as an audio PCM signal is divided into frames by the frame divider 1 and sent to the filter bank 2 and the psychoacoustic calculator 3.
[0116]
The input audio signal is subjected to auditory entropy (PE) and masking calculation for each frequency band by the psychoacoustic calculator 3 for each frame. The calculated auditory entropy value is sent to the block length determiner 4.
[0117]
The block length determination unit 4 starts correction of the PE threshold value with the input of the PE threshold value as a trigger. The PE threshold correction processing in this embodiment will be described later using the flow of FIG. During this time, the block length determiner 4 can sequentially retrieve the history information necessary for processing by accessing the PE history temporary storage 9.
[0118]
When the correction of the PE threshold is completed, the block length determiner 4 compares the input PE value with the corrected PE threshold. When the PE value of the frame is larger than the PE threshold, it is determined to use a short block length, and when not, it is determined to use a long block length. When the block length is determined, the block length determination unit 4 sends the PE value and the selected block length to the PE history temporary storage unit 9. The PE history temporary storage 9 stores the latest PE and the determined block length in the PE history table. At this time, if the number of history information exceeds a predetermined number, the oldest history is deleted. For example, in the case of the PE history table shown in FIG. 100 rows are deleted from the table, and the PE value and block type as a new history are stored in the top row in the figure. Is shaken again.
[0119]
Thereafter, as described above in the first embodiment, the audio input signal is converted into the frequency spectrum with the determined block length in the filter bank 2, and the bit allocator 5 is output from the psychoacoustic operator 4. A bit is assigned to each frequency band according to the SMR value, and the quantizer 6 calculates a normalization coefficient for each frequency band, quantizes the frequency spectrum according to the bit assigned to each frequency band, and the bit shaper 7 It is formatted into a bitstream according to the specified format and output.
[0120]
Hereinafter, a case where similar processing is implemented on a general-purpose PC will be described.
[0121]
The configuration of the audio encoding device shown in FIG. 5 can be implemented in this case as in the second embodiment described above. In the configuration shown in FIG. 5, the PE threshold value history table shown in FIG. 18 is stored in the work area on the memory 101.
[0122]
Hereinafter, the details of the processing performed in the CPU 100 will be described according to the flow shown in FIG.
[0123]
Step S201 is processing for designating an audio input signal to be encoded by the user and its genre. When the process is finished, step S 202 follows.
[0124]
Step S202 is processing for searching the PE threshold value table and changing the PE threshold value according to the genre specified in step S201. When the process is finished, step S203 follows.
[0125]
Step S203 is a process for determining whether or not the audio input signal is finished. If the input signal has ended, the process proceeds to step S214. If the input signal is not completed, the process proceeds to step S204.
[0126]
Step S <b> 204 is processing for reading an audio input signal for one frame, which is an encoding unit, onto the memory 101. When the process is finished, step S 205 follows.
[0127]
Step S205 is processing for performing auditory psychological calculation of a frame to be encoded. As a result of this calculation, the auditory entropy (PE) of the processing target frame and the SMR value for each divided frequency band that is a quantization unit are calculated. When the process is finished, step S206 follows.
[0128]
Step S206 is processing for comparing the PE value of the processing target frame calculated in step S205 with the PE threshold stored in step S202 to determine the transform block length. If the PE value of the processing target frame is larger than the PE threshold, the process proceeds to step S207. Otherwise, the process proceeds to step S208.
[0129]
In step S207, based on the determination made in step S206, orthogonal transform is performed on the processing target frame using a short block (short block length). In the case of MPEG2-AAC, as a result, eight sets of spectra divided into 128 frequency components are obtained. When the process is finished, the process proceeds to step S209.
[0130]
In step S208, based on the determination made in step S206, orthogonal transform using a long block (long block length) is performed on the processing target frame. In the case of MPEG2-AAC, as a result, only one set of spectra divided into 1024 frequency components is obtained. When the process is finished, the process proceeds to step S209.
[0131]
Step S209 is a process of determining the bit amount to be allocated to each divided frequency band from the SMR value for each divided frequency band calculated in step S205, the frequency spectrum obtained in step S207 or step S208, and the encoding bit rate. is there. When the process is finished, the process proceeds to step S210.
[0132]
Step S210 is a process of calculating a scale factor for each divided frequency band and quantizing the frequency spectrum according to the bit amount allocated in step S209. When the process is finished, the process proceeds to step S211.
[0133]
Step S211 is processing for shaping the scale factor and the quantized spectrum calculated in step S210 according to a format determined by the encoding method and outputting the result as a bit stream. In the present embodiment, the bit stream output by this processing may be stored in the external storage device 104, or may be output to an external device connected to the network 108 via the communication interface 109. . When the process is finished, the process proceeds to step S212.
[0134]
Step S212 is processing for storing the PE value and selected block of the frame being processed in the PE history table in the memory 101. When the PE history table is full, the oldest history is deleted and the history of this frame is stored. When the process is finished, step S213 follows.
[0135]
Step S213 is processing for correcting the PE threshold based on the history stored in the PE history table. Details of this processing will be described later with reference to FIG. When the process is finished, step S203 follows.
[0136]
Step S214 is a process of shaping the quantized spectrum that has not yet been output due to the delay caused by the psychoacoustic calculation or orthogonal transform, etc., on the memory 101, and outputting it after converting it into a bit stream. When the process is finished, the audio signal encoding process is finished.
[0137]
FIG. 20 is a detailed flow of the PE correction process based on the history in step S213 in the present embodiment.
[0138]
Step S301 is a process of searching for a short block in the PE history table. If there is even one short block in the PE history table, the process proceeds to step S302. Otherwise, the process proceeds to step S311.
[0139]
Step S302 refers to processing for calculating an average PE value (hereinafter, Long_PE) of long blocks remaining in the history with reference to the PE history table. When the process is finished, the process proceeds to step S303.
[0140]
Step S303 is processing for calculating an average PE value of short blocks (hereinafter, Short_PE) with reference to the PE history table. When the process is finished, the process proceeds to step S304.
[0141]
Step S304 is processing to calculate an average PE value, that is, (Long_PE + Short_PE) / 2. In the present embodiment, such calculation is performed as an average PE value because, even in one audio input signal (music), a portion having a high PE value and a portion having a low PE value, that is, a frame to be processed as a short block. This is because the frequency of appearance may be different. In such a case, if the PE average value is the average value of all the frames, the PE average value fluctuates in the middle of the process of encoding the same audio input signal, and the subsequent correction process cannot perform a proper correction. As a result, the sound quality of the created bitstream may not be stable. Therefore, such a calculation method is taken. When the process is finished, the process proceeds to step S305.
[0142]
Step S305 is processing for determining whether or not the average PE value obtained in step S304 is larger than the current PE threshold value. As a result of the determination, if the average PE value is larger, the process proceeds to step S306. Otherwise, the process proceeds to step S307.
[0143]
Step S306 is processing for correcting the PE threshold by adding 10 to the current PE threshold. That is, when the average PE value calculated in step S304 is larger than the current PE threshold value, the PE threshold value is corrected in the plus (+) direction. By doing in this way, PE threshold value can be appropriately corrected with respect to the music in which PE value is changing high. When the process is finished, the process proceeds to step S309.
[0144]
Step S307 is processing for determining whether or not the average PE value obtained in step S304 is smaller than the current PE threshold value. As a result of the determination, if the average PE value is smaller, the process proceeds to step S308. Otherwise, the process proceeds to step S309.
[0145]
Step S308 is processing for correcting the PE threshold by subtracting 10 from the current PE threshold. That is, when the average PE value calculated in step S304 is smaller than the current PE threshold, the PE threshold is corrected in the negative direction. By doing in this way, PE threshold value can be appropriately corrected with respect to music whose PE value transitions low. When the process is finished, the process proceeds to step S309.
[0146]
Step S309 is a process of counting the number of histories that have become short blocks in the PE history table and determining whether or not the number exceeds 20. As a result of the determination, if there are 20 or more short block histories, the process proceeds to step S310. Otherwise, the PE correction process based on the history is terminated and the process returns.
[0147]
Step S310 is processing for correcting the PE threshold by adding 10 to the PE threshold. That is, when there are 20 or more short blocks in the history of 100 frames, it is considered that coding efficiency is lowered due to excessive use of short blocks, and therefore the PE threshold value is corrected in the positive direction. By doing in this way, the control which suppresses the fall of the encoding efficiency by having a low PE threshold value is attained. When the process is finished, the PE correction process based on the history is finished and the process returns.
[0148]
Step S311 is processing for determining whether or not the current PE threshold value has reached the threshold lower limit. As a result of the determination, if the PE threshold value has reached the threshold lower limit, the PE correction process based on the history is terminated and the process returns. Otherwise, the process proceeds to step S312.
[0149]
Step S312 is a process of correcting the PE threshold by subtracting 10 from the PE threshold. In other words, when the history is entirely composed of long blocks, the PE threshold is set higher for the input signal, and there is a possibility that frames that should originally be encoded with short blocks may be overlooked. to correct. However, the correction is performed to such an extent that the preset threshold lower limit is not exceeded. In the case of a quiet song that has almost no change, if the PE threshold value is extremely lowered, the portion that should be encoded with the long block is encoded with the short block, thereby preventing the phenomenon that the encoding efficiency decreases. Because. When the process is finished, the correction process is finished and the process returns.
[0150]
As described above, in the present embodiment, the PE threshold value can be appropriately corrected during processing by using the PE history, so that the PE threshold value corresponding to the input signal can be corrected appropriately. Furthermore, it is possible to perform appropriate block determination, and as a result, it is possible to create a bit stream with better sound quality.
[0151]
(Fifth embodiment)
The fifth embodiment of the present invention shows an example in which an input signal is analyzed to automatically determine a genre.
[0152]
FIG. 21 is a configuration example of an audio signal encoding device according to the fifth embodiment of the present invention.
[0153]
As shown in the figure, the audio signal encoding apparatus according to the present embodiment is obtained by adding ten genre automatic determiners to the configuration example shown in FIG.
[0154]
Since the constituent elements 1 to 7 are the same as those shown in the first embodiment, the description thereof will be omitted.
[0155]
Reference numeral 10 denotes a genre determiner, which analyzes an audio input signal and determines its genre.
[0156]
An audio signal processing operation in the audio signal encoding apparatus having the above configuration will be described below with a focus on differences from the operation of the first embodiment.
[0157]
First, prior to processing, each unit is initialized.
[0158]
Next, an audio input signal to be encoded is designated by the user.
[0159]
Next, the genre determiner 10 analyzes the designated input signal, automatically determines the genre, and sends it to the block length determiner 4. Details of this genre determination method will be described later with reference to FIG. The block length determiner 4 changes the PE threshold according to the received genre. The PE threshold value may be changed by referring to a table storing the PE threshold value for each genre, or a table storing the PE correction value for each genre is searched, and the genre is set as a reference value for the PE threshold value. A correction value for each may be added. FIG. 3 shows a configuration example of the PE threshold value table in this case, and FIG. 4 shows a configuration example of the PE correction value table. In the present embodiment, the PE reference value when the correction value table of FIG. In the present embodiment, these tables are stored in the block length determiner 4.
[0160]
Thereafter, as described above in the first embodiment, the input audio signal is divided by the frame divider 1 and then analyzed by the auditory psychological calculator 3 to calculate the PE value and the SMR. The block length determiner 4 compares the PE value with the PE threshold, and the block length is determined based on the result. The frame-divided audio input signal is converted into a frequency spectrum with the determined block length in the filter bank 2, and the bit allocator 5 is assigned a bit in each frequency band according to the SMR value output from the auditory psychological calculator 3. , The quantizer 6 calculates a normalization coefficient for each frequency band, quantizes the frequency spectrum according to the bits allocated to each frequency band, and converts the frequency spectrum into a bit stream according to the format determined by the bit shaper 7. Formatted and output.
[0161]
Hereinafter, a case where similar processing is implemented on a general-purpose PC will be described.
[0162]
The configuration of the audio encoding device shown in FIG. 5 can be implemented in this case as in the second embodiment described above.
[0163]
Hereinafter, the details of the processing performed in the CPU 100 will be described according to the flow shown in FIG.
[0164]
FIG. 22 is a flow of audio signal encoding processing in the present embodiment.
[0165]
First, step S <b> 401 is processing in which the user designates an input audio signal to be encoded using the terminal 103. In the present embodiment, the audio signal to be encoded may be an audio PCM file stored in the external storage device 104 or a signal obtained by analog / digital conversion of a real-time audio signal captured by the microphone 106. When the process is finished, step S 402 follows.
[0166]
Step S402 is processing for automatically determining the genre of the input audio signal. Details of this processing will be described later with reference to FIG. When the process is finished, step S 403 follows.
[0167]
Step S403 is a process of searching the PE threshold value table on the memory 101 and changing the PE threshold value on the memory 101 according to the genre of the audio input signal to be encoded determined in step S402. When the process is finished, step S 404 follows.
[0168]
Step S404 is processing for determining whether or not the input audio signal to be encoded has been completed. If the input signal has ended, the process proceeds to step S413. If not completed, the process proceeds to step S405.
[0169]
Step S405 is processing for dividing the input signal into frames which are processing units for each channel. Similar to the description in the first embodiment, for example, in the case of MPEG2-AAC, each channel is divided into 1024 sample frames. When the process is finished, the process proceeds to step S406.
[0170]
Step S406 is processing for performing psychoacoustic calculation of the frame to be encoded. As a result of this calculation, the auditory entropy (PE) of the processing target frame and the SMR value for each divided frequency band that is a quantization unit are calculated. When the process is finished, the process advances to step S407.
[0171]
Step S407 is processing for comparing the PE value of the processing target frame calculated in step S406 with the PE threshold stored in step S403 to determine the transform block length. If the PE value of the processing target frame is larger than the PE threshold, the process proceeds to step S408. Otherwise, the process proceeds to step S409.
[0172]
In step S408, based on the determination made in step S107, orthogonal transform using a short block (short block length) is performed on the processing target frame. In the case of MPEG2-AAC, as a result, eight sets of spectra divided into 128 frequency components are obtained. When the process is finished, the process proceeds to step S410.
[0173]
In step S409, based on the determination made in step S407, orthogonal transform using a long block (long block length) is performed on the processing target frame. In the case of MPEG2-AAC, as a result, only one set of spectra divided into 1024 frequency components is obtained. When the process is finished, the process proceeds to step S410.
[0174]
Step S410 is a process of determining the bit amount to be assigned to each divided frequency band from the SMR value for each divided frequency band calculated in step S406, the frequency spectrum obtained in step S408 or step S409, and the encoding bit rate. is there. Such processing is common in the transform coding method as in the present embodiment, and therefore will not be described in detail. When the process is finished, the process advances to step S411.
[0175]
Step S411 is a process of calculating the scale factor for each divided frequency band and quantizing the frequency spectrum according to the bit amount allocated in step S410. When the process is finished, the process advances to step S412.
[0176]
Step S412 is a process of shaping the scale factor and the quantized spectrum calculated in step S411 according to a format determined by the encoding method and outputting it as a bit stream. In the present embodiment, the bit stream output by this processing may be stored in the external storage device 104, or may be output to an external device connected to the network 108 via the communication interface 109. . When the process is finished, the process proceeds to step S404.
[0177]
Step S413 is a process of shaping the quantized spectrum that has not yet been output due to the delay caused by the psychoacoustic operation or orthogonal transformation, etc., into the bit stream and outputting it. When the process is finished, the audio signal encoding process is finished.
[0178]
FIG. 23 is a flow detailing the genre automatic determination process in step S402 in the present embodiment.
[0179]
Step S501 is processing for extracting the rhythm of the audio input signal by detecting the amplitude of the audio input signal and the repetition pattern. When the process is finished, the process proceeds to step S502.
[0180]
Step S502 is a process of calculating the tempo of the input signal from the rhythm extracted in step S501 and the sampling rate of the input audio signal. When the process is finished, the process advances to step S503.
[0181]
Step S503 is processing for converting an audio input signal into a frequency spectrum using orthogonal transform such as FFT and analyzing a pure tone component. When the process is finished, the process advances to step S504.
[0182]
Step S504 is a process of extracting the melody by analyzing the melody, chord composition, chord progression, etc. of the music based on the frequency analysis result performed in step S503. When the process is finished, the process advances to step S505.
[0183]
Step S505 is a process of comprehensively analyzing the rhythm, tempo, and music tone extracted so far to determine the genre of the input signal. As this determination method, for example, a database storing these features and genres is searched, and a genre is determined by selecting a genre having the most similar pattern, or a feature of music for each genre is learned. There are techniques such as determination using a neural network circuit, but these are all known and will not be described in detail. As a result of this determination, if the genre cannot be determined, the process proceeds to step S506. If the genre can be determined, the process proceeds to step S507.
[0184]
Step S506 is processing for selecting a default genre as genre information. In this embodiment, the default genre is a genre given to an input signal whose genre cannot be determined. When this information is set as a genre, a default value is set as the PE threshold value in step S403 of FIG. The When the process is finished, the process advances to step S507.
[0185]
Step S507 is processing to store the genre information selected in step S505 or step S506 in the work area on the memory 101. When the process is finished, the genre automatic determination process is finished and the process returns.
[0186]
As described above, according to the present embodiment, the user simply specifies the audio input signal, the genre is automatically determined, and the PE threshold corresponding to the genre is appropriately set. It is possible to obtain a bit stream with good sound quality without being applied.
[0187]
(Other embodiments)
In addition, this invention is not limited to embodiment mentioned above.
[0188]
In the second embodiment described above, the PE threshold value is changed according to the genre by searching the PE threshold value table of FIG. 3, but this can also be realized by searching the PE threshold value correction table of FIG. is there. FIG. 9 is a memory map configuration diagram in this case. This memory map is basically the same as the memory map of FIG. 8, but the PE threshold value, the PE reference value, and the PE threshold value correction table are stored in the work area.
[0189]
In the second embodiment described above, the PE threshold value is stored on the memory map, but the same processing can be realized by storing a pointer indicating a value on the PE threshold table instead. .
[0190]
In the above-described embodiment, no particular reference is made to the recording medium, but this is applicable to any recording medium such as FD, HDD, CD, DVD, MO, and semiconductor memory.
[0191]
In the fourth embodiment described above, the PE history table is configured as normal tabular data, but this is applicable even when configured using a ring buffer capable of storing a predetermined number of lists. Is possible.
[0192]
In the fourth embodiment described above, the PE threshold value is corrected every time one frame is processed. However, this correction may be performed at a frequency of several frames or tens of frames.
[0193]
As described above, according to the above-described embodiment, the PE threshold to be referred to when determining the block length is appropriately set according to the genre of the audio input signal. In particular, it is possible to realize encoding processing with good sound quality at a low bit rate. For example, when the genre of the input signal is classic, the PE threshold is set low, so that a short block length is appropriately selected at a portion where a short block length is to be selected, so that the occurrence of pre-echo can be reduced. On the other hand, when the genre is rock, it is possible to prevent a short block length from being applied excessively, resulting in a decrease in encoding efficiency and consequently deterioration in sound quality. In other words, it is possible to select an appropriate block length according to the characteristics of the input signal, and it is possible to create a high-quality bitstream while suppressing the occurrence of pre-echo while preventing a decrease in encoding efficiency.
[0194]
Furthermore, according to the above embodiment, the PE threshold value is appropriately set without making the user aware of it by changing the PE threshold value according to the genre information of the ID3 tag which is metadata generally used in the encoded audio data. Therefore, it is possible to obtain a bit stream with good sound quality without extra user effort. In other words, it is possible to select an appropriate block length according to the genre of the input signal without extra user effort.
[0195]
Furthermore, according to the above-described embodiment, the PE threshold value can be corrected according to the input signal by appropriately correcting the PE threshold value based on the past PE value and the history of block selection information. It is possible to appropriately select a block that could not be adjusted, and a bit stream with better sound quality can be obtained. That is, block length selection can be appropriately controlled according to the input signal, and a higher quality bit stream can be provided.
[0196]
Furthermore, according to the above-described embodiment, by automatically determining the genre of the input signal and thereby changing the PE threshold, it is possible to set the PE threshold according to the genre of the input signal without making the user aware of it. , User convenience is improved.
[0197]
This embodiment can be realized by a computer executing a program. Also, means for supplying a program to a computer, for example, a computer-readable recording medium such as a CD-ROM recording such a program, or a transmission medium such as the Internet for transmitting such a program is also applied as an embodiment of the present invention. Can do. A computer program product such as a computer-readable recording medium in which the above program is recorded can also be applied as an embodiment of the present invention. The above program, recording medium, transmission medium, and computer program product are included in the scope of the present invention. As the recording medium, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0198]
The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
[0199]
【The invention's effect】
As described above, according to the present invention, the auditory entropy threshold value to be referred to when determining the transform block length is determined according to the genre of the audio input signal. Encoding processing is possible, and encoding processing with good sound quality can be realized particularly at low bit rates.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration example of an audio signal encoding device according to a first embodiment of the present invention.
FIG. 2 is a flowchart of an audio signal encoding process in the second embodiment of the present invention.
FIG. 3 is a schematic diagram of a PE threshold value table according to the first embodiment of the present invention.
FIG. 4 is a schematic diagram of a PE correction value table according to the first embodiment of the present invention.
FIG. 5 is a diagram illustrating a configuration example of an audio signal encoding device according to a second embodiment of the present invention.
FIG. 6 is a diagram showing a content configuration example of a storage medium storing an audio signal encoding processing program according to the second embodiment of the present invention.
FIG. 7 is a schematic diagram for introducing an audio signal encoding process according to the second embodiment of the present invention into a personal computer.
FIG. 8 is a configuration diagram of a memory map in a second embodiment of the present invention.
FIG. 9 is a configuration diagram of a memory map according to another embodiment of the present invention.
FIG. 10 is a mimic diagram of an audio signal.
11 is a mimic diagram of an audio signal when the audio signal shown in FIG. 10 is encoded and decoded in units of 2048 samples. FIG.
12 is a mimic diagram of an audio signal when the audio signal shown in FIG. 10 is encoded and decoded in units of 256 samples.
FIG. 13 is a diagram illustrating a configuration example of an audio signal encoding device according to a third embodiment of the present invention.
FIG. 14 is a flowchart of audio signal encoding processing according to the third embodiment of the present invention.
FIG. 15 is a schematic diagram of a PE threshold value table according to the third embodiment of the present invention.
FIG. 16 is a schematic diagram of a PE correction value table according to the third embodiment of the present invention.
FIG. 17 is a diagram illustrating a configuration example of an audio signal encoding device according to a fourth embodiment of the present invention.
FIG. 18 is a mimic diagram of a PE history table according to the fourth embodiment of the present invention.
FIG. 19 is a flowchart of audio signal encoding processing in the fourth embodiment of the present invention;
FIG. 20 is a flowchart of PE threshold value correction processing according to the fourth embodiment of the present invention.
FIG. 21 is a diagram illustrating a configuration example of an audio signal encoding device according to a fifth embodiment of the present invention.
FIG. 22 is a flowchart of audio signal encoding processing in the fifth embodiment of the present invention;
FIG. 23 is a flowchart of genre automatic determination processing in the fifth embodiment of the present invention;
[Explanation of symbols]
1 Frame divider
2 filter banks
3 auditory psychological calculator
4 Block length detector
5-bit allocator
6 Quantizer
7-bit shaper
8 ID3 tag input device
9 PE history temporary storage
10 Genre automatic judgment device
100 CPU
101 memory
102 bus
103 terminals
104 External storage device
105 media drive
106 microphone
107 Speaker
108 Communication line
109 Communication interface
110 Storage media

Claims (21)

オーディオ入力信号を処理単位のフレームに分割するフレーム分割部と、
前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算部と、
前記聴覚心理演算部が出力する聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定部と、
前記ブロック長判定部が決定したブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換するフィルタバンクとを有し、
前記ブロック長判定部は、オーディオ入力信号のジャンルに応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化装置。
A frame dividing unit that divides the audio input signal into frames of processing units;
An auditory psychological operation unit that analyzes the audio input signal divided into frames and outputs an auditory entropy value;
Based on the auditory entropy value and auditory entropy threshold output by the auditory psychological calculation unit, a block length determination unit that determines a conversion block length of the frame;
According to the block length determined by the block length determination unit, the frame is blocked and converted to a frequency spectrum, and a filter bank,
The audio signal encoding apparatus, wherein the block length determination unit determines the auditory entropy threshold according to a genre of an audio input signal.
さらに、前記フィルタバンクによって変換される周波数スペクトルを複数の周波数帯域に分割して、前記聴覚心理演算部が演算する信号対マスク比に応じて各周波数帯域に割り当てるビット量を決定するビット割当て部と、
前記ビット割当て部によって決定されたビット割当てに応じて、前記フィルタバンクによって変換される周波数スペクトルを量子化する量子化部と、
前記量子化部によって量子化された量子化スペクトルを規定のフォーマットに従って整形したビットストリームを生成するビット整形部とを有することを特徴とする請求項1記載のオーディオ信号符号化装置。
A bit allocation unit that divides the frequency spectrum converted by the filter bank into a plurality of frequency bands, and determines a bit amount to be allocated to each frequency band according to a signal-to-mask ratio calculated by the auditory psychological calculation unit; ,
A quantization unit that quantizes a frequency spectrum transformed by the filter bank according to the bit allocation determined by the bit allocation unit;
The audio signal encoding apparatus according to claim 1, further comprising: a bit shaping unit that generates a bit stream obtained by shaping the quantized spectrum quantized by the quantization unit according to a prescribed format.
前記ブロック長判定部は、聴覚エントロピー閾値の基準値に、ジャンル毎の補正値を加算又は減算することによって前記聴覚エントロピー閾値を決定することを特徴とする請求項1又は2記載のオーディオ信号符号化装置。The audio signal encoding according to claim 1 or 2, wherein the block length determination unit determines the auditory entropy threshold by adding or subtracting a correction value for each genre to a reference value of the auditory entropy threshold. apparatus. 前記オーディオ入力信号のジャンルは、ユーザが指定することを特徴とする請求項1〜3のいずれか1項に記載のオーディオ信号符号化装置。The audio signal encoding apparatus according to claim 1, wherein a genre of the audio input signal is designated by a user. さらに、ID3タグを入力するためのID3タグ入力部を有し、
前記ブロック長判定部は、前記ID3タグ入力部で入力されたID3タグのジャンルに応じて前記聴覚エントロピー閾値を決定することを特徴とする請求項1〜4のいずれか1項に記載のオーディオ信号符号化装置。
Furthermore, it has an ID3 tag input unit for inputting an ID3 tag,
The audio signal according to any one of claims 1 to 4, wherein the block length determination unit determines the auditory entropy threshold according to a genre of an ID3 tag input by the ID3 tag input unit. Encoding device.
さらに、前記聴覚心理演算部により出力される各フレームの聴覚エントロピー値の履歴を保存するための履歴保存部を有し、
前記ブロック長判定部は、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とする請求項1〜5のいずれか1項に記載のオーディオ信号符号化装置。
Furthermore, a history storage unit for storing a history of auditory entropy values of each frame output by the auditory psychological calculation unit,
The said block length determination part determines the said auditory entropy threshold value according to the log | history of the auditory entropy value preserve | saved at the said log | history preservation | save part, The any one of Claims 1-5 characterized by the above-mentioned. Audio signal encoding device.
前記履歴保存部は、聴覚エントロピー値の履歴とともに前記変換ブロック長の履歴を保存し、
前記ブロック長判定部は、前記聴覚エントロピー値の履歴及び前記変換ブロック長の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とする請求項6記載のオーディオ信号符号化装置。
The history storage unit stores the history of the transform block length together with the history of auditory entropy values,
The audio signal encoding apparatus according to claim 6, wherein the block length determination unit determines the auditory entropy threshold according to the history of the auditory entropy value and the history of the transform block length.
前記ブロック長判定部は、前記変換ブロック長としてロングブロック長又はショートブロック長のいずれかを選択して決定することを特徴とする請求項7記載のオーディオ信号符号化装置。8. The audio signal encoding apparatus according to claim 7, wherein the block length determination unit selects and determines either a long block length or a short block length as the transform block length. 前記ブロック長判定部は、前記履歴保存部に保存されている履歴を参照し、ロングブロック長選択時の聴覚エントロピー値の平均値とショートブロック長選択時の聴覚エントロピー値の平均値とに応じて、前記聴覚エントロピー閾値を決定することを特徴とする請求項8記載のオーディオ信号符号化装置。The block length determination unit refers to the history stored in the history storage unit, according to the average value of the auditory entropy value when the long block length is selected and the average value of the auditory entropy value when the short block length is selected. 9. The audio signal encoding apparatus according to claim 8, wherein the auditory entropy threshold is determined. 前記ブロック長判定部は、ショートブロック長選択回数に応じて前記聴覚エントロピー閾値を決定することを特徴とする請求項8又は9記載のオーディオ信号符号化装置。The audio signal encoding apparatus according to claim 8 or 9, wherein the block length determination unit determines the auditory entropy threshold according to the number of short block length selections. さらに、オーディオ入力信号のジャンルを判定するためのジャンル判定器を有し、
前記ブロック長判定部は、前記ジャンル判定器が判定したジャンルに応じて前記聴覚エントロピー閾値を決定することを特徴とする請求項1又は2記載のオーディオ信号符号化装置。
Furthermore, it has a genre determiner for determining the genre of the audio input signal,
The audio signal encoding apparatus according to claim 1 or 2, wherein the block length determination unit determines the auditory entropy threshold according to the genre determined by the genre determiner.
オーディオ入力信号を処理単位のフレームに分割するフレーム分割部と、
前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算部と、
前記聴覚心理演算部が出力する聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定部と、
前記ブロック長判定部が決定したブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換するフィルタバンクと、
前記聴覚心理演算部により出力される各フレームの聴覚エントロピー値の履歴を保存するための履歴保存部とを有し、
前記ブロック長判定部は、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化装置。
A frame dividing unit that divides the audio input signal into frames of processing units;
An auditory psychological operation unit that analyzes the audio input signal divided into frames and outputs an auditory entropy value;
Based on the auditory entropy value and auditory entropy threshold output by the auditory psychological calculation unit, a block length determination unit that determines a conversion block length of the frame;
A filter bank that blocks the frame according to the block length determined by the block length determination unit and converts it into a frequency spectrum;
A history storage unit for storing a history of auditory entropy values of each frame output by the auditory psychological calculation unit;
The audio signal encoding apparatus, wherein the block length determination unit determines the auditory entropy threshold according to a history of auditory entropy values stored in the history storage unit.
さらに、前記フィルタバンクによって変換される周波数スペクトルを複数の周波数帯域に分割して、前記聴覚心理演算部が演算する信号対マスク比に応じて各周波数帯域に割り当てるビット量を決定するビット割当て部と、
前記ビット割当て部によって決定されたビット割当てに応じて、前記フィルタバンクによって変換される周波数スペクトルを量子化する量子化部と、
前記量子化部によって量子化された量子化スペクトルを規定のフォーマットに従って整形したビットストリームを生成するビット整形部とを有することを特徴とする請求項12記載のオーディオ信号符号化装置。
A bit allocation unit that divides the frequency spectrum converted by the filter bank into a plurality of frequency bands, and determines a bit amount to be allocated to each frequency band according to a signal-to-mask ratio calculated by the auditory psychological calculation unit; ,
A quantization unit that quantizes a frequency spectrum transformed by the filter bank according to the bit allocation determined by the bit allocation unit;
13. The audio signal encoding apparatus according to claim 12, further comprising: a bit shaping unit that generates a bit stream obtained by shaping the quantized spectrum quantized by the quantization unit according to a prescribed format.
前記履歴保存部は、聴覚エントロピー値の履歴とともに前記変換ブロック長の履歴を保存し、
前記ブロック長判定部は、前記聴覚エントロピー値の履歴及び前記変換ブロック長の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とする請求項12又は13記載のオーディオ信号符号化装置。
The history storage unit stores the history of the transform block length together with the history of auditory entropy values,
The audio signal encoding apparatus according to claim 12 or 13, wherein the block length determination unit determines the auditory entropy threshold according to the history of the auditory entropy value and the history of the transform block length.
前記ブロック長判定部は、前記変換ブロック長としてロングブロック長又はショートブロック長のいずれかを選択して決定することを特徴とする請求項14記載のオーディオ信号符号化装置。15. The audio signal encoding apparatus according to claim 14, wherein the block length determination unit selects and determines either a long block length or a short block length as the transform block length. 前記ブロック長判定部は、前記履歴保存部に保存されている履歴を参照し、ロングブロック長選択時の聴覚エントロピー値の平均値とショートブロック長選択時の聴覚エントロピー値の平均値とに応じて、前記聴覚エントロピー閾値を決定することを特徴とする請求項15記載のオーディオ信号符号化装置。The block length determination unit refers to the history stored in the history storage unit, according to the average value of the auditory entropy value when the long block length is selected and the average value of the auditory entropy value when the short block length is selected. The audio signal encoding apparatus according to claim 15, wherein the auditory entropy threshold is determined. 前記ブロック長判定部は、ショートブロック長選択回数に応じて前記聴覚エントロピー閾値を決定することを特徴とする請求項15又は16記載のオーディオ信号符号化装置。The audio signal encoding apparatus according to claim 15 or 16, wherein the block length determination unit determines the auditory entropy threshold according to the number of short block length selections. オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、
前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、
前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ステップと、
前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップとを有し、
前記ブロック長判定ステップは、オーディオ入力信号のジャンルに応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化方法。
A frame dividing step for dividing the audio input signal into frames of processing units;
An auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value;
A block length determination step for determining a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold;
And converting the frame into a frequency spectrum according to the determined block length,
The audio signal encoding method, wherein the block length determination step determines the auditory entropy threshold according to a genre of an audio input signal.
オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、
前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、
前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ステップと、
前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップと、
前記聴覚心理演算ステップにより出力された各フレームの聴覚エントロピー値の履歴を履歴保存部に保存する履歴保存ステップとを有し、
前記ブロック長判定ステップは、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とするオーディオ信号符号化方法。
A frame dividing step for dividing the audio input signal into frames of processing units;
An auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value;
A block length determination step for determining a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold;
According to the determined block length, converting the frame into a frequency spectrum;
A history storage step of storing a history of auditory entropy values of each frame output by the auditory psychological calculation step in a history storage unit;
The audio signal encoding method, wherein the block length determining step determines the auditory entropy threshold according to a history of auditory entropy values stored in the history storage unit.
オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、
前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、
前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ブロックと、
前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップとをコンピュータに実行させるためのプログラムであって、
前記ブロック長判定ステップは、オーディオ入力信号のジャンルに応じて、前記聴覚エントロピー閾値を決定することを特徴とするプログラム。
A frame dividing step for dividing the audio input signal into frames of processing units;
An auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value;
A block length determination block for determining a transform block length of the frame based on the output auditory entropy value and auditory entropy threshold;
A program for causing a computer to execute a conversion step of blocking the frame according to the determined block length and converting the frame into a frequency spectrum,
The block length determination step determines the auditory entropy threshold according to a genre of an audio input signal.
オーディオ入力信号を処理単位のフレームに分割するフレーム分割ステップと、
前記フレーム分割されたオーディオ入力信号を分析して聴覚エントロピー値を出力する聴覚心理演算ステップと、
前記出力された聴覚エントロピー値と聴覚エントロピー閾値とを基に、前記フレームの変換ブロック長を決定するブロック長判定ステップと、
前記決定されたブロック長に応じて、前記フレームをブロック化し、周波数スペクトルに変換する変換ステップと、
前記聴覚心理演算ステップにより出力された各フレームの聴覚エントロピー値の履歴を履歴保存部に保存する履歴保存ステップとをコンピュータに実行させるためのプログラムであって、
前記ブロック長判定ステップは、前記履歴保存部に保存されている聴覚エントロピー値の履歴に応じて、前記聴覚エントロピー閾値を決定することを特徴とするプログラム。
A frame dividing step for dividing the audio input signal into frames of processing units;
An auditory psychological calculation step of analyzing the frame-divided audio input signal and outputting an auditory entropy value;
A block length determination step for determining a transform block length of the frame based on the output auditory entropy value and an auditory entropy threshold;
According to the determined block length, converting the frame into a frequency spectrum;
A program for causing a computer to execute a history storage step of storing a history of auditory entropy values of each frame output by the auditory psychological calculation step in a history storage unit,
The block length determination step determines the auditory entropy threshold according to a history of auditory entropy values stored in the history storage unit.
JP2003166899A 2003-06-11 2003-06-11 Audio signal encoding system, audio signal encoding method, and program Pending JP2005003912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003166899A JP2005003912A (en) 2003-06-11 2003-06-11 Audio signal encoding system, audio signal encoding method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003166899A JP2005003912A (en) 2003-06-11 2003-06-11 Audio signal encoding system, audio signal encoding method, and program

Publications (1)

Publication Number Publication Date
JP2005003912A true JP2005003912A (en) 2005-01-06

Family

ID=34092910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003166899A Pending JP2005003912A (en) 2003-06-11 2003-06-11 Audio signal encoding system, audio signal encoding method, and program

Country Status (1)

Country Link
JP (1) JP2005003912A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140136A (en) * 2005-11-18 2007-06-07 Mitsubishi Electric Corp Music analysis device and music search device
EP2270800A2 (en) * 2005-02-07 2011-01-05 Sony Corporation Recording/reproducing apparatus, recording/reproducing apparatus and program
JP4794452B2 (en) * 2003-09-29 2011-10-19 ソニー エレクトロニクス インク Window type determination method based on MDCT data in audio coding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4794452B2 (en) * 2003-09-29 2011-10-19 ソニー エレクトロニクス インク Window type determination method based on MDCT data in audio coding
EP2270800A2 (en) * 2005-02-07 2011-01-05 Sony Corporation Recording/reproducing apparatus, recording/reproducing apparatus and program
JP2007140136A (en) * 2005-11-18 2007-06-07 Mitsubishi Electric Corp Music analysis device and music search device
JP4668039B2 (en) * 2005-11-18 2011-04-13 三菱電機株式会社 Music analysis device and music search device

Similar Documents

Publication Publication Date Title
JP4478183B2 (en) Apparatus and method for stably classifying audio signals, method for constructing and operating an audio signal database, and computer program
US8073684B2 (en) Apparatus and method for automatic classification/identification of similar compressed audio files
KR20010021226A (en) A digital acoustic signal coding apparatus, a method of coding a digital acoustic signal, and a recording medium for recording a program of coding the digital acoustic signal
US8687818B2 (en) Method for dynamically adjusting the spectral content of an audio signal
JP2000276197A (en) Device and method for coding digital acoustic signals and medium which records digital acoustic signal coding program
JP2007525715A (en) Method and apparatus for determining an estimate
JP2002196792A (en) Audio coding system, audio coding method, audio coder using the method, recording medium, and music distribution system
JP2001343997A (en) Method and device for encoding digital acoustic signal and recording medium
JP2004206129A (en) Improved method and device for audio encoding and/or decoding using time-frequency correlation
US6128592A (en) Signal processing apparatus and method, and transmission medium and recording medium therefor
EP1259956A1 (en) Method of and apparatus for converting an audio signal between data compression formats
US6128593A (en) System and method for implementing a refined psycho-acoustic modeler
US20080059201A1 (en) Method and Related Device for Improving the Processing of MP3 Decoding and Encoding
JP2005003912A (en) Audio signal encoding system, audio signal encoding method, and program
US7305346B2 (en) Audio processing method and audio processing apparatus
JP2004334160A (en) Characteristic amount extraction device
JP2931059B2 (en) Speech synthesis method and device used for the same
JP2006126372A (en) Audio signal coding device, method, and program
JP2005165056A (en) Device and method for encoding audio signal
JP2005003835A (en) Audio signal encoding system, audio signal encoding method, and program
JP4441989B2 (en) Encoding apparatus and encoding method
JP4556866B2 (en) High efficiency encoding program and high efficiency encoding apparatus
JP2993324B2 (en) Highly efficient speech coding system
JP2000137497A (en) Device and method for encoding digital audio signal, and medium storing digital audio signal encoding program
JP4165424B2 (en) Digital audio signal compression apparatus and compression method