JP4101123B2 - Encoding apparatus and encoding method - Google Patents
Encoding apparatus and encoding method Download PDFInfo
- Publication number
- JP4101123B2 JP4101123B2 JP2003175002A JP2003175002A JP4101123B2 JP 4101123 B2 JP4101123 B2 JP 4101123B2 JP 2003175002 A JP2003175002 A JP 2003175002A JP 2003175002 A JP2003175002 A JP 2003175002A JP 4101123 B2 JP4101123 B2 JP 4101123B2
- Authority
- JP
- Japan
- Prior art keywords
- block
- signal
- gain
- information
- amplitude
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、高能率符号化によって入力信号の符号化を行う符号化装置に関するものである。
【0002】
【従来の技術】
デジタルオーディオ信号の符号化装置における高能率符号化の方法としては、各サンプルが多値で表される時間軸上の入力信号をNサンプルからなる時間単位でブロック化してブロックごとに時間軸上の信号を周波数軸上の信号に変換、すなわちスペクトル変換して複数の周波数領域に分割し、各周波数領域ごとに符号化する変換符号化方式や、時間軸上の入力信号をブロック化せずに複数の周波数帯域に分割して符号化する帯域分割符号化方式などを挙げることができる。また、帯域分割符号化方式と変換符号化方式とを組み合わせた方式も考えられている。
【0003】
上述の帯域分割符号化方式で用いられる帯域分割フィルタには、例えばQMF(Quadrature Mirror Filter) などのフィルタがある。また、変換符号化方式のスペクトル変換には、例えばモディファイド離散コサイン変換(MDCT)などがあり、このような変換を行うことにより、時間軸上の信号を周波数軸上の信号に変換することができる。
【0004】
ここで、スペクトル変換としてMDCTを使用した場合、ブロック間の接続歪みを軽減するために、前のブロックと合わせて計2N個のサンプルデータを用いてスペクトル変換を行い、独立したN個の実数データ、すなわちMDCT係数データを得るようにしているため、平均してN個のサンプルデータに対してN個の実数データが得られることになり、スペクトル変換として離散フーリエ変換(DFT)や離散コサイン変換(DCT)を使用した場合よりも効率のよい符号化を行うことが可能である。
【0005】
以上のようにして、帯域ごとに分割され、周波数軸上に変換された信号を量子化することにより、量子化雑音が発生する帯域を制御することができ、マスキング効果などの性質を利用して聴覚的に好ましく、且つ、高能率な符号化を行うことができる。なお、上述のMDCTによるスペクトル変換を行い、得られた実数データを量子化して符号化した符号化データを復号化して再生信号を再現する場合には、符号化データを復号化して逆量子化を行い、得られた実数データに対して逆MDCT変換による逆スペクトル変換を施し、同じブロック内の要素を加え合わせることにより、入力信号を再構成することになる。
【0006】
このように、入力信号をブロック化してブロックごとにスペクトル成分に分解する処理を行い、得られたスペクトル成分を量子化して符号化する方法を用いると、その符号化されたスペクトル成分信号を復号化してブロックごとに合成して得られた信号には量子化雑音が発生する。特に、入力信号に無音や弱振幅状態から強振幅状態へ移行する際に現れるアタック部が存在する場合、この信号をブロック化してブロックごとにスペクトル成分に分解する処理を行い、得られたスペクトル成分を量子化して符号化する方法を用いると、復号化してブロックごとに合成して得られた信号には、アタック部の時間的に前の部分にアタック部に起因する大きな量子化雑音が目立つことになる。この量子化雑音は一般にプリエコーと呼ばれ、聴感上の障害になる。一例として、図9に、アタック部が存在する1ブロック(フレーム)分の入力信号A9と、量子化雑音C9とを示す。同図では、アタック部の前の無音の状態であるべきところに、量子化雑音C9によるプリエコーが発生する。
【0007】
特に、長いブロックで分割した入力信号をスペクトル変換した場合は、長い時間にわたってプリエコーが発生してしまうことがある。そこで、ブロックの長さを短くすれば、量子化雑音の発生期間も短くなる。このため、アタック部の近辺で、スペクトル変換するブロックの長さを短くとれば、プリエコーが発生する期間を短くすることができ、プリエコーによる聴感上の障害を軽減することができる。
【0008】
一方、アタック部のような急激にレベルが変化する信号以外の信号に対しても同様にブロックを短くすると、周波数分解能が低下して符号化効率が低下する。このため、これらの部分に対しては、ブロックを長くする方が、特定のスペクトル成分に対してエネルギーが集中することになり符号化効率が高くなるので望ましい。
【0009】
これらのことから、実際には、入力信号の各部分の性質に応じてスペクトル変換のためのブロックの長さを選択的に切り換えることが行われる。ところが、この方法を実際の構成上で実現しようとすると、異なる長さのブロックでのスペクトル変換に対応したスペクトル変換手段を符号化装置に設ける必要があり、また、復号化装置側にも異なる長さのブロックに対応した逆スペクトル変換が可能な逆スペクトル変換手段を設ける必要がある。従って、符号化装置、復号化装置とも構成が複雑になってしまうという欠点がある。
【0010】
また、入力信号に、強振幅状態から無音の準定常状態へと移行する際に現れるリリース部が存在する場合、この信号を同様に符号化した後に復号化して得られた信号には、リリース部の時間的に後の部分にリリース部に起因する大きな量子化雑音が現れることになる。この量子化雑音は一般にポストエコーと呼ばれ、やはり聴感上の障害になる。一例として、図10に、リリース部が存在する1ブロック(フレーム)分の入力信号A10と、量子化雑音C10とを示す。同図では、リリース部の後の無音の準定常状態であるべきところに、量子化雑音C10によるポストエコーが発生する。
【0011】
そこで、スペクトル変換のためのブロックの長さを十分な周波数分解能が確保できる一定の長さに保ったまま、プリエコーおよびポストエコーの発生を以下のようにして防止する技術が開示されている(例えば、特許文献1参照)。即ち、特許文献1に記載の従来技術は、入力信号を時間軸上で複数のサンプルデータからなる複数のブロックに切り出し、さらにこのブロックにウィンドウ関数を掛けた後、ブロックごとに切り出された入力信号を時間軸上で複数のサブブロックに分割してアタック部を検出する。次いで、入力信号の特性に応じて複数通りの中から適応的にゲイン制御量を選択する。そして、例えば、プリエコー対策の場合、アタック部の前のサブブロックの信号成分に対してはアタック部以後の選択された所定倍のゲインでゲイン制御を施し、アタック部直前の小振幅波形の信号を増幅するという手段をとり、さらに、このゲイン制御を施した信号をDFTやDCTなどを用いたスペクトル変換によってスペクトル成分を得て、これを符号化する。そして、これに対する復号化の際には、復号化されたスペクトル成分に逆DFTや逆DCTなどによる逆スペクトル変換を施してから、符号化の際にアタック部直前の信号を増幅したことに対する補正処理を施すというものである。この方式により復号化された再生波形の量子化雑音は、アタック部による同時マスキングによって遮蔽されるため、プリエコーの発生が防止されるようになる。同様にしてポストエコーの発生も防止される。
【0012】
また、次回ブロック処理時の先頭サブブロックに擬似的なゲインを与え、且つ、実際のサンプルデータにはゲインの処理を行わず、結果的に今回ブロック相当時間のプリエコーを抑えるようにしたものもある(例えば、特許文献2参照)。
【0013】
【特許文献1】
特開平8−237132号公報
【特許文献2】
特開2003−5799号公報
【0014】
【発明が解決しようとする課題】
しかしながら、特許文献1に記載の従来技術では、アタック部の検出範囲をそのアタック部が含まれる1つのブロックのみを用いて行おうとすると、アタック部が先頭サブブロックに存在する場合にはアタック部を検出することができず、ゲイン補正を施すことができなくなってしまう。従って、このような場合にプリエコーが発生してしまう。即ち、ブロックの先頭にアタック部が存在する場合には、ゲイン制御を施すことが困難であるためにプリエコーを容易に防止することができないという問題があった。また、ブロックの先頭にリリース部が存在する場合についても、同様にゲイン制御を施すことが困難であるために、ポストエコーを容易に防止することができないという問題があった。
【0015】
また、特許文献1には、既に処理したブロックの次のブロックの先頭にアタック部が生じるような場合に備えて、アタック部の検出範囲を当該次のブロックの先頭のサブブロックにまで広げておくことも可能であると記載されている。この場合、そのようにして検出されたアタック部を基にゲイン補正を施すと、次のブロックの先頭のサブブロックにもゲイン補正を施すことになる。即ち、先頭のサブブロックは、現在ブロック処理時と前回ブロック処理時との両方でゲイン補正を施される結果、1つのサブブロックに対して2度のゲイン補正が施されることになり、符号化処理が複雑になるという問題があった。
【0016】
また、特許文献2に記載の従来技術を使用すると、擬似的なゲインを与えた部分が再生時に擬似的なゲイン分歪むことになり、再生音に違和感が出てくるといった問題が生じてしまう。また、的確なアタック部やリリース部でないところにゲイン制御をほどこすと信号圧縮〜伸長した場合に音質に違和感が出ることがあるので、ゲイン制御は適切なところだけにするのが好ましいと考えられる。即ち、現在ブロックと前回ブロックだけからゲイン情報を決定したり、現在ブロックと次回ブロックだけからゲイン情報を決定すると、十分なプリエコーやポストエコーの対策ができなかったり、プリエコーやポストエコーの対策をする必要のないアタック部やリリース部を検出してしまったり、適切な対応ができなかったりして、音質に違和感が出てしまうことがあるという問題があった。また、ゲインの目標値(ゲイン制御後の値がどうなるように決定するか)を的確に決定しない場合、不自然な音になる可能性があるという問題があった。
【0017】
本発明は、上記の問題点に鑑み、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出するとともに、プリエコーやポストエコーの防止のために符号化する信号に与えるゲイン情報を適切に決定することができる符号化装置を提供することを目的とする。
【0018】
【課題を解決するための手段】
上記目的を達成するために本発明は、時間軸上の信号を単位時間ごとにブロック化して得た各ブロックの信号を各ブロックに関する復号化までに使用されるゲイン情報に基づいてゲイン制御し、該ゲイン制御された信号をスペクトル変換して得た周波数軸上の信号を符号化する符号化装置において、前記各ブロックの信号の振幅情報を検出する振幅情報検出手段と、該振幅情報検出手段により検出された各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定するゲイン情報決定手段を設け、前記振幅情報検出手段は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定手段は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うものである。
【0019】
このようにすると、ゲイン情報が決定される今回処理ブロックの信号の振幅情報のみならず、その直前、直後のブロックの信号の振幅情報を用いることにより、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出することができ、プリエコー及びポストエコー対策としてのゲイン情報を的確に決定することができる。
【0020】
また、例えば、各サンプルが多値で表される時間軸上の信号を単位時間ごとにブロック化するブロック化手段と、該ブロック化手段により作成された各ブロックの信号の振幅情報を検出する振幅情報検出手段と、各ブロックに関する復号化までに使用されるゲイン情報を決定するゲイン情報決定手段と、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報と前記ゲイン情報決定手段により決定されたゲイン情報とに基づいて前記各ブロックの信号にゲイン制御を行うゲイン制御手段と、該ゲイン制御手段によりゲイン制御が行われた各ブロックの信号を周波数軸上の信号にスペクトル変換するスペクトル変換手段と、該スペクトル変換手段によって得られた周波数軸上の信号を符号化して前記ゲイン情報を含む符号化情報を出力する符号化手段とを備える符号化装置において、前記ゲイン情報決定手段は、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定し、前記振幅情報検出手段は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定手段は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御手段は、前記サブブロック単位で前記ゲイン制御を行うと良い。
【0021】
このようにすると、ゲイン情報が決定される今回処理ブロックの信号の振幅情報のみならず、その直前、直後のブロックの信号の振幅情報を用いることにより、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出することができ、プリエコー及びポストエコー対策としてのゲイン情報を的確に決定することができる。
【0023】
このようにすると、サブブロック単位で前記振幅情報を管理することができ、この振幅情報に基づいて前記ゲイン情報をサブブロック単位でをきめ細かく決定できる。
【0024】
また、例えば、前記今回処理ブロックと前記前回処理ブロックと前記次回処理ブロックの信号の振幅情報は、それぞれのブロックの信号の振幅の最大値から成るようにすると、各ブロックの信号の振幅の最大値の変化からプリエコーやポストエコーの原因となるアタック部やリリース部を容易に検出することができる。
【0025】
また、例えば、前記今回処理ブロックと前記前回処理ブロックの信号の振幅情報は、それぞれのブロックの信号の振幅の最大値から成り、前記次回処理ブロックの信号の振幅情報は、前記次回処理ブロックの先頭を含む所定時間内の信号の振幅の最大値から成るようにすると、前記次回処理ブロックの先頭にプリエコーやポストエコーの原因となるアタック部やリリース部がある場合でも、的確に検出することができる。
【0026】
また、例えば、前記今回処理ブロックと前記前回処理ブロックの信号の振幅情報は、それぞれのブロックの信号の振幅の最大値から成り、前記次回処理ブロックの信号の振幅情報は、前記次回処理ブロックの先頭のサブブロックの信号の振幅の最大値から成るようにすると、前記次回処理ブロックの先頭サブブロックにプリエコーやポストエコーの原因となるアタック部やリリース部がある場合でも、的確に検出することができる。
【0027】
また、例えば、前記最大値を所定の幅で丸めた値にすると、振幅情報の管理や、この振幅情報に基づく処理を簡単にすることができ、符号化装置を簡素化できる。
【0028】
また、例えば、各サンプルが多値で表される時間軸上の信号を単位時間ごとにブロック化するブロック化手段と、該ブロック化手段により作成された各ブロックの信号の振幅情報を検出する振幅情報検出手段と、各ブロックに関する復号化までに使用されるゲイン情報を決定するゲイン情報決定手段と、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報と前記ゲイン情報決定手段により決定されたゲイン情報とに基づいて前記各ブロックの信号にゲイン制御を行うゲイン制御手段と、該ゲイン制御手段によりゲイン制御が行われた各ブロックの信号を周波数軸上の信号にスペクトル変換するスペクトル変換手段と、該スペクトル変換手段によって得られた周波数軸上の信号を符号化して前記ゲイン情報を含む符号化情報を出力する符号化手段とを備える符号化装置において、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報は、前記各ブロックの信号の振幅の平均値であり、前記ゲイン情報決定手段は前記平均値に基づいて前記各ブロックのゲイン情報を決定すると良い。
【0029】
このようにすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の大きいところを小さくするゲイン量を振幅の大きさに応じて的確に決定することができる。
【0030】
また、例えば、各サンプルが多値で表される時間軸上の信号を単位時間ごとにブロック化するブロック化手段と、該ブロック化手段により作成された各ブロックの信号の振幅情報を検出する振幅情報検出手段と、各ブロックに関する復号化までに使用されるゲイン情報を決定するゲイン情報決定手段と、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報と前記ゲイン情報決定手段により決定されたゲイン情報とに基づいて前記各ブロックの信号にゲイン制御を行うゲイン制御手段と、該ゲイン制御手段によりゲイン制御が行われた各ブロックの信号を周波数軸上の信号にスペクトル変換するスペクトル変換手段と、該スペクトル変換手段によって得られた周波数軸上の信号を符号化して前記ゲイン情報を含む符号化情報を出力する符号化手段とを備える符号化装置において、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報は、前記各ブロックの信号の振幅の最大値と平均値であり、前記ゲイン情報決定手段は前記最大値と平均値に基づいて前記各ブロックのゲイン情報を決定すると良い。
【0031】
このようにすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の大きいところを小さくするゲイン量を前記最大値と平均値との差に基づいて的確に決定することができる。
【0032】
また、例えば、前記平均値は、前記各ブロック内の信号であって前記各ブロック内の信号の振幅が最大値になるときより後方の信号の振幅の平均値にすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の変化量を小さくするゲイン量を振幅の大きさに応じて的確に決定することができる。
【0033】
また、例えば、前記振幅情報検出手段は、前記各ブロックを時間軸上で複数のサブブロックに分割し、前記平均値は、前記各ブロックの信号の振幅の最大値を含むサブブロックより時間的に後方のサブブロックの信号の振幅の平均値であり、前記ゲイン情報決定手段は、前記サブブロック毎の信号の振幅の最大値と前記平均値とに基づいて前記サブブロック毎にゲイン情報を決定し、前記ゲイン制御手段は、前記サブブロック単位で前記ゲイン制御を行うようにすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の変化量を小さくするゲイン量をサブブロック単位で的確に決定することができる。
【0034】
また、例えば、前記各ブロックの信号の振幅の最大値が複数のサブブロックに存在する場合に、該複数のサブブロックの中で時間的に最も後方のサブブロックを前記各ブロックの信号の振幅の最大値を含むサブブロックとすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の変化量を小さくするゲイン量をより的確に決定することができる。
【0035】
また、例えば、前記ゲイン情報決定手段は、前記サブブロック毎の信号の振幅の最大値が前記平均値より大きいサブブロックにゲイン情報を与えるようにすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の大きいところを小さくして振幅の変化量を小さくできる。
【0036】
また、例えば、前記最大値を所定の幅で丸めた値にすると、振幅情報の管理や、この振幅情報に基づく処理を簡単にすることができ、符号化装置を簡素化できる。
【0037】
また、例えば、時間軸上の信号を単位時間ごとにブロック化して得た各ブロックの信号を各ブロックに関する復号化までに使用されるゲイン情報に基づいてゲイン制御し、該ゲイン制御された信号をスペクトル変換して得た周波数軸上の信号を符号化する符号化方法において、前記各ブロックの信号の振幅情報を検出し、検出された前記各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定し、前記振幅情報検出は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うと良い。
【0038】
このようにすると、ゲイン情報が決定される今回処理ブロックの信号の振幅情報のみならず、その直前、直後のブロックの信号の振幅情報を用いることにより、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出することができ、プリエコー及びポストエコー対策としてのゲイン情報を的確に決定することができる。
【0039】
また、例えば、各サンプルが多値で表される時間軸上の信号を単位時間ごとにブロック化し、各ブロックの信号の振幅情報を検出し、前記各ブロックに関する復号化までに使用されるゲイン情報を決定し、検出された各ブロックの信号の振幅情報と決定されたゲイン情報とに基づいて前記各ブロックの信号にゲイン制御を行い、ゲイン制御が行われた前記各ブロックの信号を周波数軸上の信号にスペクトル変換して得られた周波数軸上の信号を符号化して前記ゲイン情報を含む符号化情報を出力する符号化方法において、ゲイン情報を決定する今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定し、前記振幅情報検出は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うと良い。
【0040】
このようにすると、ゲイン情報が決定される今回処理ブロックの信号の振幅情報のみならず、その直前、直後のブロックの信号の振幅情報を用いることにより、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出することができ、プリエコー及びポストエコー対策としてのゲイン情報を的確に決定することができる。
【0041】
また、例えば、前記今回処理ブロックと前記前回処理ブロックと前記次回処理ブロックの信号の振幅情報として、それぞれのブロックの信号の振幅の最大値を検出するようにすると、各ブロックの信号の振幅の最大値の変化からプリエコーやポストエコーの原因となるアタック部やリリース部を容易に検出することができる。
【0042】
また、例えば、各サンプルが多値で表される時間軸上の信号を単位時間ごとにブロック化し、各ブロックの信号の振幅情報を検出し、前記各ブロックに関する復号化までに使用されるゲイン情報を決定し、検出された各ブロックの信号の振幅情報と決定されたゲイン情報とに基づいて前記各ブロックの信号にゲイン制御を行い、ゲイン制御が行われた前記各ブロックの信号を周波数軸上の信号にスペクトル変換して得られた周波数軸上の信号を符号化して前記ゲイン情報を含む符号化情報を出力する符号化方法において、前記各ブロックの信号の振幅情報として前記各ブロックの信号の振幅の平均値を検出し、検出された前記平均値に基づいて前記各ブロックのゲイン情報を決定すると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の大きいところを小さくするゲイン量を振幅の大きさに応じて的確に決定することができる。
【0043】
また、例えば、各サンプルが多値で表される時間軸上の信号を単位時間ごとにブロック化し、各ブロックの信号の振幅情報を検出し、前記各ブロックに関する復号化までに使用されるゲイン情報を決定し、検出された各ブロックの信号の振幅情報と決定されたゲイン情報とに基づいて前記各ブロックの信号にゲイン制御を行い、ゲイン制御が行われた前記各ブロックの信号を周波数軸上の信号にスペクトル変換して得られた周波数軸上の信号を符号化して前記ゲイン情報を含む符号化情報を出力する符号化方法において、前記各ブロックの信号の振幅情報として前記各ブロックの信号の振幅の最大値と平均値を検出し、検出された前記最大値と平均値に基づいて前記各ブロックのゲイン情報を決定すると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の大きいところを小さくするゲイン量を前記最大値と平均値との差に基づいて的確に決定することができる。
【0044】
また、例えば、前記各ブロックを時間軸上で複数のサブブロックに分割し、前記平均値を前記各ブロックの信号の振幅の最大値を含むサブブロックより時間的に後方のサブブロックの信号の振幅の平均値とし、前記サブブロック毎の信号の振幅の最大値と前記平均値とに基づいて前記サブブロック毎にゲイン情報を決定し、前記サブブロック単位で前記ゲイン制御を行うようにすると、プリエコー及びポストエコー対策として、各ブロックの信号の振幅の変化量を小さくするゲイン量をサブブロック単位で的確に決定することができる。
【0045】
【発明の実施の形態】
以下に、本発明の実施形態を図面を参照して説明する。図8は、本発明の実施形態に係る符号化装置の電気的構成を示すブロック図である。図8において、1は符号化装置を示し、符号化装置1は、周波数帯域分割部2、アタック/リリース部検出部4、ゲイン制御部5、ウィンドウ部3、時間周波数変換部6、量子化部7、およびパッキング部8を備えている。
【0046】
周波数帯域分割部(ブロック化手段)2は、各サンプルが多値で表される時間軸上のデジタルオーディオ信号として与えられる入力信号を、Nサンプルからなる所定の単位時間ごとにブロック化し、QMFフィルタを用いて複数の周波数帯域に分割する。上記単位時間は、例えば、MD用の圧縮を行う場合には23.2msecといった時間である。アタック/リリース部検出部(振幅情報検出手段、ゲイン情報決定手段)4は、各ブロック内の前記入力信号の振幅情報を検出し、その振幅情報から各ブロック内に存在する振幅変化部としてのアタック部やリリース部を検出し、検出結果に基づいて各ブロックに関する復号化までに使用されるゲイン情報を決定する。また、ゲイン制御部(ゲイン制御手段)5は、アタック/リリース部検出部4のアタック部およびリリース部の検出結果と、アタック/リリース部検出部4により決定されたゲイン情報とに基づいて各ブロックの信号にゲイン制御を行う。そして、ウィンドウ部3は周波数帯域ごとのゲイン制御後の各ブロックの時間軸上の信号にウィンドウ係数をかける。
【0047】
また、時間周波数変換部(スペクトル変換手段)6は、MDCTを用いてスペクトル変換を行い、ウィンドウ部3によってウィンドウ係数をかけられた時間軸上の信号を周波数軸上の信号に変換し、量子化部7は、時間周波数変換部6によって得られた周波数軸上の信号を量子化する。そして、パッキング部8は、アタック/リリース部検出部4によって決定されたゲイン情報と、量子化部7によって得られた量子化情報および量子化信号とのパッキングを行って符号化情報として出力する。また、量子化部7およびパッキング部8は、時間周波数変換部6によって得られた周波数軸上の信号を符号化してゲイン情報を含む符号化情報を出力する符号化手段を構成している。そして、パッキング部8によって得られた符号化情報は、MDなどの磁気記録メディアや、フラッシュメモリなどの半導体メディアといった記録メディア9に記録される。
【0048】
次に、上記構成の符号化装置1による、プリエコーやポストエコーを防止するためのゲイン情報を決定するアタック/リリース部検出部4の動作について説明する。アタック/リリース部検出部4は、上述したように、入力信号の振幅情報を検出する振幅情報検出動作と、復合化までに使用されるゲイン情報を決定するゲイン情報決定動作を行う。
【0049】
先ず、アタック/リリース部検出部4の振幅情報検出動作を説明する。アタック/リリース部検出部4は、周波数帯域分割部2で分割されたブロックであって、現在、処理するブロックである今回ゲイン処理フレームを、時間軸上で先頭付近を分離することのできる程度の間隔で複数のサブブロック、例えば、8個のサブブロックに分割する。また、今回ゲイン処理フレームの直前のブロックを前回ゲイン処理フレーム、直後のブロックを次回ゲイン処理フレームと呼ぶ。次いで、各サブブロックにおける入力信号の最大値を算出する。この最大値は各サブブロックにおける入力信号の最大の振幅であり、例えば6dB刻みの幅に丸めても良い。
【0050】
そして、今回ゲイン処理フレーム内の各サブブロックの最大値の中で最大のものをもとめ、これを今回ゲイン処理フレーム内の最大値として保存しておく。上述のように、各サブブロックの最大値を丸めたために、複数のサブブロックの最大値が同じ値になる場合は、最も時間的に後方にあるサブブロックの最大値を今回ゲイン処理フレーム内の最大値とする。この最大値が次回のフレーム処理で前回ゲイン処理フレームの最大値となる。尚、ゲイン制御部5によってゲイン制御が施されたものを使用してもよい。また、今回ゲイン処理フレーム内の最大値が含まれるサブブロックより時間的に後方にある全サブブロックの入力信号の平均値を求める。これを「ピーク後方平均値」と呼ぶ。ここで、平均値とは、例えば6dB刻みの幅に丸めた値でもよい。
【0051】
また、次回ゲイン処理フレームの時間的に先頭のサブブロックの最大値を求め、これを次回ゲイン処理フレームの最大値とする。尚、先頭のサブブロックとしたが、先頭のサブブロックを含む複数のサブブロックとしてもよいし、1フレーム分の最大値を求めてもよい。
【0052】
次に、プリエコー、ポストエコーを防止するための対策としてのアタック/リリース部検出部4のゲイン情報決定動作を、上述のようにして得た各ブロックの信号の振幅情報に応じた複数の場合に分けて説明する。
【0053】
(1)次回ゲイン処理フレームの先頭にアタック部がある場合のプリエコー対策
図1に示すように、入力信号A1において、前回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が大きいか、または、同じであり、且つ、次回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が小さい場合、次回ゲイン処理フレームの先頭にアタック部があると判断し、ゲインB1のように、今回ゲイン処理フレーム内の全体に1より大きいゲインを決定する。このゲインの大きさは、(次回ゲイン処理フレームの最大値/今回ゲイン処理フレームの最大値)とする。即ち、ゲイン制御を行った後の今回ゲイン処理フレームの最大値が次回ゲイン処理フレームの最大値と等しくなるように決定する。但し、規格上などの制限があれば、それに従うものとする。また、前回ゲイン処理フレームの最大値と今回ゲイン処理フレームの最大値との比較において、大、小、同じの判断を所定のスレッショルド値を用いて行うようにしても良い(以後、最大値の比較に関しては同様である)。
【0054】
そして、時間周波数変換部6はスペクトル変換としてMDCTを用い、今回周波数変換処理として前回ゲイン処理フレームの信号と今回ゲイン処理フレームの信号との2N個のサンプルを用いてスペクトル変換を行ってN個のサンプルの周波数軸上の信号を得るようにしているので、2つのフレームのレベル差を無くすために、上記ゲインはB11に示すように前回ゲイン処理フレームにも与えられ、前回ゲイン処理フレームのゲインが今回ゲイン処理フレームの先頭のサブブロックのゲインと等しくなるようにする。従って、前回ゲイン処理フレームのゲインも、(次回ゲイン処理フレームの最大値/今回ゲイン処理フレームの最大値)となる。そして、このゲインが今回ゲイン処理フレームに関するゲイン情報となる。この処理により、量子化雑音はC11のように抑制され、プリエコーを防止できる。
【0055】
また、点線で示すB12は次回周波数変換処理のために決定されるゲインであり、同じく点線で示すC12は次回周波数変換処理後の量子化雑音である。いずれも次回ゲイン処理フレームの更に次のゲイン処理フレームを参照して次回周波数変換処理を行わなければ決定しないものであるが、入力信号A1の次回ゲイン処理フレームの更に次のゲイン処理フレームにおける振幅が次回ゲイン処理フレームと大差ない場合、即ち、アタック部もリリース部もない場合のゲイン及び量子化雑音を例として示したものである。
【0056】
(2)今回ゲイン処理フレーム内にアタック部とリリース部がある場合のプリエコー、ポストエコー対策
図2に示すように、入力信号A2において、前回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が大きいか、または、同じであり、且つ、次回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が大きい場合、今回ゲイン処理フレーム内にアタック部とリリース部があると判断し、ゲインB2のように、今回ゲイン処理フレーム内の各サブブロック毎にサブブロックの最大値と「ピーク後方平均値」とを比較し、「ピーク後方平均値」より大きいサブブロックに対して、1より小さいゲイン(小さくなるようなゲイン)を決定する。このゲインの大きさは、(「ピーク後方平均値」/該当する各サブブロックの最大値)とする。即ち、ゲイン制御を行った後の該当する各サブブロックの最大値が「ピーク後方平均値」と等しくなるように決定する。但し、規格上などの制限があれば、それに従うものとする。または、今回ゲイン処理フレーム内の全てのサブブロックに対して、上記の大きさのゲインを決定してもよい。この場合は、ゲイン制御を行った後の各サブブロックの最大値は、「ピーク後方平均値」と等しくなる。
【0057】
そして、前回ゲイン処理フレームと今回ゲイン処理フレームのレベル差を無くすために、B21のように前回ゲイン処理フレームに今回ゲイン処理フレームの先頭のサブブロックのゲインが与えられる。そして、このゲインが今回ゲイン処理フレームに関するゲイン情報となる。この処理により、量子化雑音はC21のように抑制され、プリエコー、ポストエコーを防止できる。
【0058】
また、点線で示すB22は次回周波数変換処理のために決定されるゲインであり、同じく点線で示すC22は次回周波数変換処理後の量子化雑音である。いずれも次回ゲイン処理フレームの更に次のゲイン処理フレームを参照して次回周波数変換処理を行わなければ決定しないものであるが、入力信号A2の次回ゲイン処理フレームの更に次のゲイン処理フレームにおける振幅が次回ゲイン処理フレームと大差ない場合、即ち、アタック部もリリース部もない場合のゲイン及び量子化雑音を例として示したものである。
【0059】
図3は、上述のゲイン決定動作を説明するための図である。図3において、A3は今回ゲイン処理フレームの入力信号の振幅情報を示し、B3は決定されたゲインを示す。また、今回ゲイン処理フレームは、8個のサブブロックe0〜e7に分割されている。振幅情報A3は、サブブロックe2〜e5の振幅がピークであるので、ピーク後方平均値はサブブロックe6、e7の振幅の平均値(破線)となる。この平均値をゲイン調整の基準値とし、今回ゲイン処理フレーム内の全てのサブブロックに対して、(「ピーク後方平均値」/該当する各サブブロックの最大値)の大きさのゲインが与えられる。即ち、サブブロックe2〜e6には1より小さいゲインが与えられ、サブブロックe0、e1、e7には1より大きいゲインが与えられる。
【0060】
(3)前回ゲイン処理フレーム内にアタック部があり、今回ゲイン処理フレーム内にリリース部がある場合のポストエコー対策
図4に示すように、入力信号A4において、前回ゲイン処理フレーム内にプリエコー対策を施し、且つ、前回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が小さいか、または、同じであり、且つ、次回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が大きい場合、前回ゲイン処理フレーム内にアタック部があり、今回ゲイン処理フレーム内にリリース部があると判断し、ゲインB4のように、今回ゲイン処理フレーム内の各サブブロック毎にサブブロックの最大値と「ピーク後方平均値」とを比較し、「ピーク後方平均値」より大きいサブブロックに対して、1より小さいゲイン(小さくなるようなゲイン)を決定する。このゲインの大きさは、(「ピーク後方平均値」/該当する各サブブロックの最大値)とする。即ち、ゲイン制御を行った後の該当する各サブブロックの最大値が「ピーク後方平均値」と等しくなるように決定する。但し、規格上などの制限があれば、それに従うものとする。
【0061】
そして、前回ゲイン処理フレームと今回ゲイン処理フレームのレベル差を無くすために、B41のように前回ゲイン処理フレームに今回ゲイン処理フレームの先頭のサブブロックのゲインが与えられる。そして、このゲインが今回ゲイン処理フレームに関するゲイン情報となる。この処理により、量子化雑音はC41のように抑制され、ポストエコーを防止できる。
【0062】
また、点線で示すB42は次回周波数変換処理のために決定されるゲインであり、同じく点線で示すC42は次回周波数変換処理後の量子化雑音である。いずれも次回ゲイン処理フレームの更に次のゲイン処理フレームを参照して次回周波数変換処理を行わなければ決定しないものであるが、入力信号A4の次回ゲイン処理フレームの更に次のゲイン処理フレームにおける振幅が次回ゲイン処理フレームと大差ない場合、即ち、アタック部もリリース部もない場合のゲイン及び量子化雑音を例として示したものである。
【0063】
(4)前回ゲイン処理フレーム内にアタック部とリリース部がある場合のポストエコー対策
図5に示すように、入力信号A5において、前回ゲイン処理フレーム内にプリエコー対策を施し、且つ、前回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が小さく、且つ、次回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が小さいか、または、同じ場合、前回ゲイン処理フレーム内にアタック部とリリース部があると判断し、ゲインB5のように、今回ゲインフレーム内の先頭のサブブロックに対して、1より小さいゲイン(小さくなるようなゲイン)を決定する。このゲインの大きさは、(今回ゲイン処理フレームの最大値/前回ゲイン処理フレームの最大値)とする。この処理は、該当するサブブロックのゲインを調整するためではなく、一緒に周波数変換が行われる前回ゲイン処理フレームのゲインを調整して今回フレームの最大値と等しくなるように決定する。但し、規格上などの制限があればそれに従う。
【0064】
即ち、B51のように、前回ゲイン処理フレームと今回ゲイン処理フレームとに与えられるゲインが調整され、前回ゲイン処理フレームと今回ゲイン処理フレームのレベル差を無くしている。そして、このゲインが今回ゲイン処理フレームに関するゲイン情報となる。この処理により、量子化雑音はC51のように抑制され、ポストエコーを防止できる。
【0065】
また、点線で示すB52は次回周波数変換処理のために決定されるゲインであり、同じく点線で示すC52は次回周波数変換処理後の量子化雑音である。いずれも次回ゲイン処理フレームの更に次のゲイン処理フレームを参照して次回周波数変換処理を行わなければ決定しないものであるが、入力信号A5の次回ゲイン処理フレームの更に次のゲイン処理フレームにおける振幅が次回ゲイン処理フレームと大差ない場合、即ち、アタック部もリリース部もない場合のゲイン及び量子化雑音を例として示したものである。
【0066】
(5)今回フレーム内にアタック部がある場合のプリエコー対策
図6に示すように、入力信号A6において、前回フレームの最大値より今回フレームの最大値が大きい場合、今回フレーム内にアタック部があると判断し、今回フレーム内のサブブロックのうち、その最大値が今回フレーム内の最大値と一致し、且つ、最も前方のサブブロックであるサブブロックを検出する。そして、B6のように、そのサブブロックより前の各サブブロックに対して、1より大きいゲインを決定する。このゲインの大きさは、(今回フレームの最大値/該当する各サブブロックの最大値)とする。即ち、ゲイン制御を行った後の該当する各サブブロック内の最大値が今回フレームの最大値と等しくなるように決定する。但し、規格上などの制限があればそれに従う。
【0067】
そして、前回ゲイン処理フレームと今回ゲイン処理フレームのレベル差を無くすために、ゲインB61のように、前回ゲイン処理フレームに今回ゲイン処理フレームの先頭のサブブロックのゲインが与えられる。そして、このゲインが今回ゲイン処理フレームに関するゲイン情報となる。この処理により、量子化雑音はC61のように抑制され、プリエコーを防止できる。
【0068】
また、この(5)の処理は、上述の(1)、(2)、(3)の処理と同時に行っても良い。例えば、(2)の今回ゲイン処理フレーム内にアタック部とリリース部がある場合のプリエコー、ポストエコー対策に、更に、この(5)のプリエコー対策を行った例を図7に示す。
【0069】
図7に示すように、入力信号A7(図2に示す入力信号A2と同じ)において、前回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が大きいか、または、同じであり、且つ、次回ゲイン処理フレームの最大値より今回ゲイン処理フレームの最大値が大きい場合、今回ゲイン処理フレーム内にアタック部とリリース部があると判断し、B7のように、今回ゲイン処理フレーム内の各サブブロック毎にサブブロックの最大値と「ピーク後方平均値」とを比較し、「ピーク後方平均値」より大きいサブブロックに対して、1より小さいゲイン(小さくなるようなゲイン)を決定する。このゲインの大きさは、(「ピーク後方平均値」/該当する各サブブロックの最大値)とする。即ち、ゲイン制御を行った後の該当する各サブブロックの最大値が「ピーク後方平均値」と等しくなるように決定する。但し、規格上などの制限があれば、それに従うものとする。または、今回ゲイン処理フレーム内の全てのサブブロックに対して、上記の大きさのゲインを決定してもよい。この場合は、ゲイン制御を行った後の各サブブロックの最大値は、「ピーク後方平均値」と等しくなる。
【0070】
更に、今回フレーム内のサブブロックのうち、その最大値が今回フレーム内の最大値と一致し、且つ、最も前方のサブブロックであるサブブロックを検出する。そして、B7のように、そのサブブロックより前の各サブブロックに対して、1より大きいゲインを決定する。このゲインの大きさは、(今回フレームの最大値/該当する各サブブロックの最大値)とする。即ち、ゲイン制御を行った後の該当する各サブブロック内の最大値が今回フレームの最大値と等しくなるように決定する。図7においては、今回ゲイン処理フレームの先頭のサブブロックのゲインが1より大きくなっている。
【0071】
そして、前回ゲイン処理フレームと今回ゲイン処理フレームのレベル差を無くすために、B71のように前回ゲイン処理フレームに今回ゲイン処理フレームの先頭のサブブロックのゲインが与えられる。そして、このゲインが今回ゲイン処理フレームに関するゲイン情報となる。この処理により、量子化雑音はC71のように抑制され、(5)の対策のみ施した場合より更にプリエコーを防止できる。
【0072】
以上説明したように、本発明の実施形態に係る符号化装置1によれば、アタック/リリース部検出部4で検出した今回ゲイン処理フレームと前回ゲイン処理フレームと次回ゲイン処理フレームの3つのフレームの信号の振幅の最大値を用いて、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出することが可能となる。これにより、前後の関係からきめ細やかな、的確なゲイン制御を行うことができ、プリエコーやポストエコーを的確に抑えることが可能となる。
【0073】
また、今回ゲイン処理フレームの信号の振幅の平均値を検出し、この平均値に基づいて今回ゲイン処理フレームのゲイン情報を決定するので、プリエコー、ポストエコー対策として、今回ゲイン処理フレームの信号の振幅の大きいところを小さくするゲイン量を振幅の大きさに応じて的確に決定することができる。これにより、今回ゲイン処理フレーム内の振幅を平坦にし、周波数変換後のデータ量が小さくてもプリエコーやポストエコーの発生を抑えることが可能となる。
【0074】
【発明の効果】
以上のように、本発明によると、時間軸上の信号を単位時間ごとにブロック化して得た各ブロックの信号を各ブロックに関する復号化までに使用されるゲイン情報に基づいてゲイン制御し、該ゲイン制御された信号をスペクトル変換して得た周波数軸上の信号を符号化する符号化装置において、前記各ブロックの信号の振幅情報を検出する振幅情報検出手段と、該振幅情報検出手段により検出された各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定するゲイン情報決定手段を設け、前記振幅情報検出手段は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定手段は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うので、今回処理ブロックと前回処理ブロックと次回処理ブロックの3つのブロックの振幅情報を用いて、プリエコーやポストエコーの原因となるアタック部やリリース部を的確に検出することが可能となる。これにより、前後の関係からきめ細やかな、的確なゲイン制御を行うことができ、プリエコーやポストエコーを的確に抑えることが可能となる。
【0075】
また、各ブロックの信号の振幅の平均値を検出し、この平均値に基づいて各ブロックのゲイン情報を決定するので、プリエコー、ポストエコー対策として、各ブロックの信号の振幅の大きいところを小さくするゲイン量を振幅の大きさに応じて的確に決定することができる。これにより、ブロック内の信号の振幅を平坦にし、周波数変換後のデータ量が小さくてもプリエコーやポストエコーの発生を抑えることが可能となる。
【図面の簡単な説明】
【図1】は、本発明の実施形態に係る符号化装置のプリエコーの防止を説明するための説明図である。
【図2】は、本発明の実施形態に係る符号化装置のプリエコーとポストエコーの防止を説明するための説明図である。
【図3】は、本発明の実施形態に係る符号化装置のゲイン決定動作を説明するための説明図である。
【図4】は、本発明の実施形態に係る符号化装置のポストエコーの防止を説明するための説明図である。
【図5】は、本発明の実施形態に係る符号化装置のポストエコーの防止を説明するための説明図である。
【図6】は、本発明の実施形態に係る符号化装置のプリエコーの防止を説明するための説明図である。
【図7】は、本発明の実施形態に係る符号化装置のプリエコーとポストエコーの防止を説明するための説明図である。
【図8】は、本発明の実施形態に係る符号化装置の電気的構成を示すブロック図である。
【図9】は、従来の符号化装置のプリエコー発生を説明するための説明図である。
【図10】は、従来の符号化装置のポストエコー発生を説明するための説明図である。
【符号の説明】
1 符号化装置
2 周波数帯域分割部(ブロック化手段)
3 ウィンドウ部
4 アタック/リリース部検出部(振幅情報検出手段、ゲイン情報決定手段)
5 ゲイン制御部(ゲイン制御手段)
6 時間周波数変換部(スペクトル変換手段)
7 量子化部
8 パッキング部
9 記録メディア
A1〜A7、A9、A10 入力信号
B1〜B7、B11、B12、B21、B22、B41、B42、B51、B52、B61、B71、B72 ゲイン
C9〜C12、C21、C22、C41、C42、C51、C52、C61、C71、C72 量子化誤差
e0〜e7 サブブロック[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an encoding device that encodes an input signal by high-efficiency encoding.
[0002]
[Prior art]
As a high-efficiency encoding method in a digital audio signal encoding apparatus, an input signal on a time axis in which each sample is represented by multiple values is blocked in units of time consisting of N samples, and each block is on the time axis. Transforms signals into signals on the frequency axis, that is, transforms the spectrum into multiple frequency domains and encodes each frequency domain, and multiple input signals on the time axis without blocking There can be mentioned a band-division encoding method in which encoding is performed by dividing the frequency band. Bandwidth tally A scheme combining a coding scheme and a transform coding scheme is also considered.
[0003]
Examples of the band division filter used in the above-described band division encoding method include a filter such as a QMF (Quadrature Mirror Filter). In addition, for example, there is a modified discrete cosine transform (MDCT) in the transform coding method, and a signal on the time axis can be converted into a signal on the frequency axis by performing such conversion. .
[0004]
Here, when MDCT is used as spectrum conversion, in order to reduce connection distortion between blocks, spectrum conversion is performed using a total of 2N sample data together with the previous block, and independent N real data That is, since MDCT coefficient data is obtained, on average, N pieces of real number data are obtained for N pieces of sample data. As a spectral transformation, a discrete Fourier transform (DFT) or a discrete cosine transform ( It is possible to perform encoding more efficiently than when DCT) is used.
[0005]
As described above, by quantizing the signal divided for each band and converted on the frequency axis, the band where the quantization noise is generated can be controlled, and the characteristics such as the masking effect can be utilized. It is audibly preferable and highly efficient encoding can be performed. In addition, when performing the above-mentioned spectrum conversion by MDCT and decoding the encoded data obtained by quantizing the obtained real data and decoding the reproduced signal, the encoded data is decoded and dequantized. The input signal is reconstructed by performing inverse spectral transformation by inverse MDCT transformation on the obtained real number data and adding elements in the same block.
[0006]
In this way, when a method is used in which the input signal is blocked and decomposed into spectral components for each block, and the obtained spectral components are quantized and encoded, the encoded spectral component signals are decoded. Thus, quantization noise is generated in the signal obtained by combining each block. In particular, if there is an attack part that appears when the input signal transitions from silence or from a weak amplitude state to a strong amplitude state, this signal is blocked and processed into spectral components for each block. When using the method of quantizing and encoding, the signal obtained by decoding and synthesizing for each block has a large amount of quantization noise due to the attack part in the temporally preceding part of the attack part. become. This quantization noise is generally called pre-echo and becomes an obstacle to hearing. As an example, FIG. 9 shows an input signal A9 for one block (frame) in which an attack portion exists and a quantization noise C9. In the figure, a pre-echo due to the quantization noise C9 occurs where it should be silent before the attack portion.
[0007]
In particular, when an input signal divided by a long block is subjected to spectrum conversion, pre-echo may occur for a long time. Therefore, if the block length is shortened, the generation period of the quantization noise is also shortened. For this reason, if the length of the block subjected to spectrum conversion is shortened in the vicinity of the attack portion, the period during which the pre-echo occurs can be shortened, and the auditory disturbance due to the pre-echo can be reduced.
[0008]
On the other hand, if the block is shortened in the same manner for signals other than the signal whose level changes abruptly such as an attack portion, the frequency resolution is lowered and the coding efficiency is lowered. For this reason, it is desirable to lengthen the block for these portions because energy is concentrated on a specific spectral component and the encoding efficiency is increased.
[0009]
From these facts, in practice, the length of the block for spectrum conversion is selectively switched according to the property of each part of the input signal. However, if this method is to be realized in an actual configuration, it is necessary to provide a spectral conversion means corresponding to the spectral conversion with different length blocks in the encoding device, and the decoding device also has a different length. It is necessary to provide inverse spectrum conversion means capable of inverse spectrum conversion corresponding to the block. Therefore, both the encoding device and the decoding device have a drawback that the configuration becomes complicated.
[0010]
Also, if the input signal has a release part that appears when transitioning from a strong amplitude state to a silent quasi-stationary state, the signal obtained by decoding the signal after encoding it in the same manner Thus, a large quantization noise due to the release portion appears in the later portion of. This quantization noise is generally referred to as post-echo and is also an audible obstacle. As an example, FIG. 10 shows an input signal A10 for one block (frame) in which a release portion exists and a quantization noise C10. In the figure, a post-echo due to the quantization noise C10 occurs where it should be in a silent quasi-stationary state after the release portion.
[0011]
Therefore, a technique for preventing the occurrence of pre-echo and post-echo as follows while maintaining the length of the block for spectrum conversion at a constant length that can ensure sufficient frequency resolution is disclosed (for example, , See Patent Document 1). That is, the prior art described in
[0012]
In some cases, a pseudo gain is given to the first sub-block at the next block processing, and the actual sample data is not subjected to gain processing, and as a result, the pre-echo for the current block equivalent time is suppressed. (For example, refer to Patent Document 2).
[0013]
[Patent Document 1]
JP-A-8-237132
[Patent Document 2]
JP 2003-5799 A
[0014]
[Problems to be solved by the invention]
However, in the prior art described in
[0015]
In
[0016]
In addition, when the conventional technique described in
[0017]
In view of the above problems, the present invention accurately detects an attack part and a release part that cause pre-echo and post-echo, and appropriately applies gain information to a signal to be encoded to prevent pre-echo and post-echo. It is an object of the present invention to provide an encoding device that can be determined as follows.
[0018]
[Means for Solving the Problems]
In order to achieve the above object, the present invention controls the gain of each block signal obtained by blocking the signal on the time axis for each unit time based on gain information used until decoding for each block, In an encoding apparatus for encoding a signal on a frequency axis obtained by performing spectrum conversion on the gain-controlled signal, amplitude information detecting means for detecting amplitude information of the signal of each block, and the amplitude information detecting means The amplitude information of the signal of the current processing block for which the gain information is determined, which is the amplitude information of the detected signal of each block, the amplitude information of the signal of the previous processing block immediately before the current processing block, and immediately after the current processing block Gain information determining means for determining the gain information of the current processing block based on the amplitude information of the signal of the next processing block The amplitude information detecting means divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-block, and the gain information determining means includes the sub-block The gain information is determined in units, and the gain control is performed in units of the sub-blocks. Is.
[0019]
In this way, by using not only the amplitude information of the signal of the current processing block for which the gain information is determined, but also the amplitude information of the signal of the block immediately before and immediately after that, the attack part that causes pre-echo and post-echo, The release part can be accurately detected, and gain information for pre-echo and post-echo countermeasures can be accurately determined.
[0020]
In addition, for example, a blocking unit that blocks a signal on the time axis in which each sample is expressed in multiple values for each unit time, and an amplitude that detects amplitude information of the signal of each block created by the blocking unit Information detecting means, gain information determining means for determining gain information used until decoding for each block, amplitude information of signals of each block detected by the amplitude information detecting means and gain information determining means Gain control means for performing gain control on the signal of each block based on the gain information obtained, and spectrum conversion for spectrally converting the signal of each block subjected to gain control by the gain control means to a signal on the frequency axis And encoding information including the gain information by encoding a signal on the frequency axis obtained by the spectrum conversion unit. The gain information determining means is the amplitude information of the signal of each block detected by the amplitude information detecting means and the signal of the current processing block for which the gain information is determined. Gain information of the current processing block is determined based on the amplitude information of the current processing block, the amplitude information of the signal of the previous processing block immediately before the current processing block, and the amplitude information of the signal of the next processing block immediately after the current processing block The amplitude information detecting means divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-block, and the gain information determining means The gain information is determined on a block basis, and the gain control means performs the gain control on a sub block basis. And good.
[0021]
In this way, by using not only the amplitude information of the signal of the current processing block for which the gain information is determined, but also the amplitude information of the signal of the block immediately before and immediately after that, the attack part that causes pre-echo and post-echo, The release part can be accurately detected, and gain information for pre-echo and post-echo countermeasures can be accurately determined.
[0023]
In this way, the amplitude information can be managed in units of sub-blocks, and the gain information can be determined finely in units of sub-blocks based on the amplitude information.
[0024]
Further, for example, if the amplitude information of the signal of the current processing block, the previous processing block, and the next processing block is composed of the maximum value of the amplitude of the signal of each block, the maximum value of the amplitude of the signal of each block From this change, it is possible to easily detect an attack part and a release part that cause pre-echo and post-echo.
[0025]
Further, for example, the amplitude information of the signal of the current processing block and the previous processing block is composed of the maximum value of the signal amplitude of each block, and the amplitude information of the signal of the next processing block is the head of the next processing block. If it is made up of the maximum value of the amplitude of the signal within a predetermined time including, even if there is an attack part or a release part that causes pre-echo or post-echo at the head of the next processing block, it can be accurately detected .
[0026]
Further, for example, the amplitude information of the signal of the current processing block and the previous processing block is composed of the maximum value of the signal amplitude of each block, and the amplitude information of the signal of the next processing block is the head of the next processing block. If the first sub-block of the next processing block has an attack part or a release part that causes pre-echo or post-echo, it can be accurately detected. .
[0027]
For example, if the maximum value is rounded to a predetermined width, management of amplitude information and processing based on this amplitude information can be simplified, and the encoding device can be simplified.
[0028]
In addition, for example, a blocking unit that blocks a signal on the time axis in which each sample is expressed in multiple values for each unit time, and an amplitude that detects amplitude information of the signal of each block created by the blocking unit Information detecting means, gain information determining means for determining gain information used until decoding for each block, amplitude information of signals of each block detected by the amplitude information detecting means and gain information determining means Gain control means for performing gain control on the signal of each block based on the gain information obtained, and spectrum conversion for spectrally converting the signal of each block subjected to gain control by the gain control means to a signal on the frequency axis And encoding information including the gain information by encoding a signal on the frequency axis obtained by the spectrum conversion unit. In the encoding device comprising the encoding means for outputting, the amplitude information of the signal of each block detected by the amplitude information detecting means is an average value of the amplitude of the signal of each block, and the gain information determining means is The gain information of each block may be determined based on the average value.
[0029]
In this way, as a countermeasure for pre-echo and post-echo, the gain amount for reducing the large amplitude of the signal of each block can be accurately determined according to the amplitude.
[0030]
In addition, for example, a blocking unit that blocks a signal on the time axis in which each sample is expressed in multiple values for each unit time, and an amplitude that detects amplitude information of the signal of each block created by the blocking unit Information detecting means, gain information determining means for determining gain information used until decoding for each block, amplitude information of signals of each block detected by the amplitude information detecting means and gain information determining means Gain control means for performing gain control on the signal of each block based on the gain information obtained, and spectrum conversion for spectrally converting the signal of each block subjected to gain control by the gain control means to a signal on the frequency axis And encoding information including the gain information by encoding a signal on the frequency axis obtained by the spectrum conversion unit. In the encoding device including the encoding means, the amplitude information of the signal of each block detected by the amplitude information detection means is a maximum value and an average value of the amplitude of the signal of each block, and the gain information The determining means may determine the gain information of each block based on the maximum value and the average value.
[0031]
In this way, as a pre-echo and post-echo countermeasure, a gain amount for reducing the large amplitude of the signal of each block can be accurately determined based on the difference between the maximum value and the average value.
[0032]
Further, for example, if the average value is a signal value in each block and the amplitude of the signal in the block becomes a maximum value, the average value of the signal behind the signal is used as a countermeasure for pre-echo and post-echo. The amount of gain that reduces the amount of change in the amplitude of the signal of each block can be determined accurately according to the magnitude of the amplitude.
[0033]
Further, for example, the amplitude information detection unit divides each block into a plurality of sub-blocks on a time axis, and the average value is temporally more than a sub-block including the maximum value of the signal amplitude of each block. It is an average value of the amplitude of the signal of the rear sub-block, and the gain information determining means determines gain information for each sub-block based on the maximum value of the amplitude of the signal for each sub-block and the average value. When the gain control means performs the gain control in units of sub-blocks, as a countermeasure for pre-echo and post-echo, a gain amount for reducing the amount of change in the amplitude of each block signal is accurately determined in units of sub-blocks. can do.
[0034]
Also, for example, when the maximum value of the amplitude of the signal of each block exists in a plurality of subblocks, the subblock that is temporally backward among the plurality of subblocks is set to the amplitude of the signal of the block. Assuming that the sub-block includes the maximum value, it is possible to more accurately determine the amount of gain that reduces the amount of change in the amplitude of the signal of each block as a pre-echo and post-echo countermeasure.
[0035]
Further, for example, when the gain information determination means gives the gain information to the sub-block whose maximum amplitude of the signal for each sub-block is larger than the average value, the signal of each block is used as a pre-echo and post-echo countermeasure. The amount of change in amplitude can be reduced by reducing the portion where the amplitude is large.
[0036]
For example, if the maximum value is rounded to a predetermined width, management of amplitude information and processing based on this amplitude information can be simplified, and the encoding device can be simplified.
[0037]
Also, for example, gain control is performed on the signal of each block obtained by blocking the signal on the time axis for each unit time based on gain information used until decoding for each block, and the gain-controlled signal is In an encoding method for encoding a signal on a frequency axis obtained by spectrum conversion, amplitude information of the signal of each block is detected, and gain information is determined by detecting the amplitude information of the signal of each block detected The current processing block based on the amplitude information of the signal of the current processing block, the amplitude information of the signal of the previous processing block immediately before the current processing block, and the amplitude information of the signal of the next processing block immediately after the current processing block Determine gain information for The amplitude information detection divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-blocks, and determines the gain information in units of the sub-blocks. The gain information is determined by the gain control, and the gain control is performed in units of the sub-blocks. And good.
[0038]
In this way, by using not only the amplitude information of the signal of the current processing block for which the gain information is determined, but also the amplitude information of the signal of the block immediately before and immediately after that, the attack part that causes pre-echo and post-echo, The release part can be accurately detected, and gain information for pre-echo and post-echo countermeasures can be accurately determined.
[0039]
In addition, for example, a signal on the time axis in which each sample is represented by multiple values is blocked for each unit time, amplitude information of the signal of each block is detected, and gain information used until decoding for each block The gain control is performed on the signal of each block based on the detected amplitude information of the signal of each block and the determined gain information, and the signal of each block on which the gain control has been performed is performed on the frequency axis. In the encoding method for encoding the signal on the frequency axis obtained by performing the spectrum conversion to the signal and outputting the encoded information including the gain information, the amplitude information of the signal of the current processing block for determining the gain information, and the Based on the amplitude information of the signal of the previous processing block immediately before the current processing block and the amplitude information of the signal of the next processing block immediately after the current processing block, the current processing block. Determine the gain information of the block The amplitude information detection divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-blocks, and determines the gain information in units of the sub-blocks. The gain information is determined by the gain control, and the gain control is performed in units of the sub-blocks. And good.
[0040]
In this way, by using not only the amplitude information of the signal of the current processing block for which the gain information is determined, but also the amplitude information of the signal of the block immediately before and immediately after that, the attack part that causes pre-echo and post-echo, The release part can be accurately detected, and gain information for pre-echo and post-echo countermeasures can be accurately determined.
[0041]
Further, for example, when the maximum value of the amplitude of the signal of each block is detected as the amplitude information of the signal of the current processing block, the previous processing block, and the next processing block, the maximum amplitude of the signal of each block is detected. It is possible to easily detect an attack part and a release part that cause pre-echo and post-echo from the change in value.
[0042]
In addition, for example, a signal on the time axis in which each sample is represented by multiple values is blocked for each unit time, amplitude information of the signal of each block is detected, and gain information used until decoding for each block The gain control is performed on the signal of each block based on the detected amplitude information of the signal of each block and the determined gain information, and the signal of each block on which the gain control has been performed is performed on the frequency axis. In the encoding method for encoding the signal on the frequency axis obtained by performing the spectrum conversion to the signal of and outputting the encoded information including the gain information, the amplitude information of the signal of each block is used as the amplitude information of the signal of each block. When the average value of the amplitude is detected and the gain information of each block is determined based on the detected average value, each block is used as a pre-echo and post-echo countermeasure. It can be determined accurately in accordance with the amount of gain to reduce the place of the amplitude of the signal large magnitude of the amplitude.
[0043]
In addition, for example, a signal on the time axis in which each sample is represented by multiple values is blocked for each unit time, amplitude information of the signal of each block is detected, and gain information used until decoding for each block The gain control is performed on the signal of each block based on the detected amplitude information of the signal of each block and the determined gain information, and the signal of each block on which the gain control has been performed is performed on the frequency axis. In the encoding method for encoding the signal on the frequency axis obtained by performing the spectrum conversion to the signal of and outputting the encoded information including the gain information, the amplitude information of the signal of each block is used as the amplitude information of the signal of each block. When the maximum value and average value of the amplitude are detected, and gain information of each block is determined based on the detected maximum value and average value, pre-echo and post-echo countermeasures are obtained. Te can be determined accurately based on the gain amount of the small places with a large amplitude of the signal of each block to the difference between the average value and the maximum value.
[0044]
Also, for example, each block is divided into a plurality of sub-blocks on the time axis, and the average value is the amplitude of the signal of the sub-block temporally behind the sub-block including the maximum value of the signal amplitude of each block. If the gain information is determined for each subblock based on the maximum value of the amplitude of the signal for each subblock and the average value, and the gain control is performed in units of subblocks, pre-echo As a countermeasure against post-echo, a gain amount for reducing the amount of change in the amplitude of the signal of each block can be accurately determined in units of sub-blocks.
[0045]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. FIG. 8 is a block diagram showing an electrical configuration of the encoding apparatus according to the embodiment of the present invention. In FIG. 8,
[0046]
The frequency band dividing unit (blocking means) 2 blocks an input signal given as a digital audio signal on the time axis in which each sample is expressed in multiple values for each predetermined unit time consisting of N samples, and performs QMF filtering Is divided into a plurality of frequency bands. The unit time is, for example, 23.2 msec when MD compression is performed. An attack / release unit detection unit (amplitude information detection unit, gain information determination unit) 4 detects amplitude information of the input signal in each block, and an attack as an amplitude change unit existing in each block from the amplitude information. And a release part are detected, and gain information used before decoding for each block is determined based on the detection result. The gain control unit (gain control means) 5 is configured to detect each block based on the detection results of the attack unit and the release unit of the attack / release
[0047]
The time-frequency conversion unit (spectrum conversion means) 6 performs spectrum conversion using MDCT, converts the signal on the time axis multiplied by the window coefficient by the
[0048]
Next, the operation of the attack / release
[0049]
First, the amplitude information detection operation of the attack / release
[0050]
Then, the maximum value among the maximum values of the respective sub-blocks in the current gain processing frame is obtained and stored as the maximum value in the current gain processing frame. As described above, when the maximum value of a plurality of sub-blocks becomes the same value because the maximum value of each sub-block is rounded, the maximum value of the sub-block that is the most temporally backward is set in the current gain processing frame. Maximum value. This maximum value becomes the maximum value of the previous gain processing frame in the next frame processing. In addition, you may use what was gain-controlled by the
[0051]
In addition, the maximum value of the first sub-block in the next gain processing frame is obtained, and this is set as the maximum value of the next gain processing frame. Although the head subblock is used, a plurality of subblocks including the head subblock may be used, or the maximum value for one frame may be obtained.
[0052]
Next, as a measure for preventing pre-echo and post-echo, the attack / release
[0053]
(1) Pre-echo countermeasures when there is an attack part at the beginning of the next gain processing frame
As shown in FIG. 1, in the input signal A1, the maximum value of the current gain processing frame is greater than or equal to the maximum value of the previous gain processing frame, and the current gain processing is greater than the maximum value of the next gain processing frame. If the maximum value of the frame is small, it is determined that there is an attack portion at the beginning of the next gain processing frame, and a gain larger than 1 is determined for the entire gain processing frame as in the gain B1. The magnitude of this gain is (maximum value of the next gain processing frame / maximum value of the current gain processing frame). That is, the maximum value of the current gain processing frame after gain control is determined to be equal to the maximum value of the next gain processing frame. However, if there are restrictions in the standard, etc., they shall be followed. Further, in the comparison between the maximum value of the previous gain processing frame and the maximum value of the current gain processing frame, the same determination may be made using a predetermined threshold value (hereinafter, the maximum value comparison). It is the same for).
[0054]
Then, the time-
[0055]
B12 indicated by a dotted line is a gain determined for the next frequency conversion process, and C12 indicated by a dotted line is a quantization noise after the next frequency conversion process. In any case, it is determined without referring to the next gain processing frame of the next gain processing frame unless the next frequency conversion processing is performed, but the amplitude in the next gain processing frame of the next gain processing frame of the input signal A1 is determined. The gain and quantization noise when there is no significant difference from the next gain processing frame, that is, when there is no attack part and no release part, are shown as an example.
[0056]
(2) Pre-echo and post-echo measures when there are attack and release parts in the current gain processing frame
As shown in FIG. 2, in the input signal A2, the maximum value of the current gain processing frame is greater than or equal to the maximum value of the previous gain processing frame, and the current gain processing is greater than the maximum value of the next gain processing frame. If the maximum value of the frame is large, it is determined that there are an attack part and a release part in the current gain processing frame, and the maximum value of the sub block and the “peak” are obtained for each sub block in the current gain processing frame, such as gain B2. A “backward average value” is compared, and a gain smaller than 1 (a gain that decreases) is determined for a sub-block larger than the “peak backward average value”. The magnitude of this gain is ("peak backward average value" / maximum value of each corresponding sub-block). That is, the maximum value of each corresponding sub-block after gain control is determined to be equal to the “peak backward average value”. However, if there are restrictions in the standard, etc., they shall be followed. Or you may determine the gain of said magnitude | size with respect to all the subblocks in a present gain process frame. In this case, the maximum value of each sub-block after gain control is equal to the “peak backward average value”.
[0057]
In order to eliminate the level difference between the previous gain processing frame and the current gain processing frame, the gain of the first sub-block of the current gain processing frame is given to the previous gain processing frame as in B21. This gain is gain information regarding the current gain processing frame. By this processing, quantization noise is suppressed as in C21, and pre-echo and post-echo can be prevented.
[0058]
B22 indicated by a dotted line is a gain determined for the next frequency conversion process, and C22 indicated by the dotted line is a quantization noise after the next frequency conversion process. In any case, it is not determined unless the next frequency conversion process is performed with reference to the next gain processing frame of the next gain processing frame. However, the amplitude in the next gain processing frame of the next gain processing frame of the input signal A2 is determined. The gain and quantization noise when there is no significant difference from the next gain processing frame, that is, when there is no attack part and no release part, are shown as an example.
[0059]
FIG. 3 is a diagram for explaining the above-described gain determination operation. In FIG. 3, A3 indicates amplitude information of the input signal of the current gain processing frame, and B3 indicates the determined gain. Further, the current gain processing frame is divided into eight sub-blocks e0 to e7. In the amplitude information A3, since the amplitude of the sub-blocks e2 to e5 is a peak, the peak backward average value is the average value (dashed line) of the amplitudes of the sub-blocks e6 and e7. Using this average value as a reference value for gain adjustment, a gain having a magnitude of ("peak back average value" / maximum value of each corresponding sub-block) is given to all sub-blocks in the current gain processing frame. . That is, a gain smaller than 1 is given to the sub-blocks e2 to e6, and a gain larger than 1 is given to the sub-blocks e0, e1, and e7.
[0060]
(3) Post-echo countermeasures when there is an attack part in the previous gain processing frame and a release part in the current gain processing frame
As shown in FIG. 4, in the input signal A4, pre-echo measures are taken in the previous gain processing frame, and the maximum value of the current gain processing frame is smaller than or equal to the maximum value of the previous gain processing frame. If the maximum value of the current gain processing frame is larger than the maximum value of the next gain processing frame, it is determined that there is an attack portion in the previous gain processing frame and a release portion is present in the current gain processing frame, and the gain B4 For each subblock in the current gain processing frame, the maximum value of the subblock and the “peak backward average value” are compared. Is determined). The magnitude of this gain is ("peak backward average value" / maximum value of each corresponding sub-block). That is, the maximum value of each corresponding sub-block after gain control is determined to be equal to the “peak backward average value”. However, if there are restrictions in the standard, etc., they shall be followed.
[0061]
In order to eliminate the level difference between the previous gain processing frame and the current gain processing frame, the gain of the first sub-block of the current gain processing frame is given to the previous gain processing frame as in B41. This gain is gain information regarding the current gain processing frame. By this processing, the quantization noise is suppressed as in C41, and post-echo can be prevented.
[0062]
B42 indicated by a dotted line is a gain determined for the next frequency conversion process, and C42 indicated by the dotted line is a quantization noise after the next frequency conversion process. In any case, it is determined without referring to the next gain processing frame of the next gain processing frame unless the next frequency conversion processing is performed, but the amplitude in the next gain processing frame of the next gain processing frame of the input signal A4 is determined. The gain and quantization noise when there is no significant difference from the next gain processing frame, that is, when there is no attack part and no release part, are shown as an example.
[0063]
(4) Countermeasures for post-echo when there is an attack part and a release part in the previous gain processing frame
As shown in FIG. 5, in the input signal A5, pre-echo measures are taken in the previous gain processing frame, the maximum value of the current gain processing frame is smaller than the maximum value of the previous gain processing frame, and the next gain processing frame If the maximum value of the current gain processing frame is smaller than or equal to the maximum value, it is determined that there are an attack part and a release part in the previous gain processing frame, and the first sub-frame in the current gain frame is determined as gain B5. A gain smaller than 1 (a gain that decreases) is determined for the block. The magnitude of this gain is (maximum value of current gain processing frame / maximum value of previous gain processing frame). This process is not performed to adjust the gain of the corresponding sub-block, but is determined to be equal to the maximum value of the current frame by adjusting the gain of the previous gain processing frame in which frequency conversion is performed together. However, if there are restrictions in the standards, etc., they will be followed.
[0064]
That is, as in B51, the gain given to the previous gain processing frame and the current gain processing frame is adjusted, and the level difference between the previous gain processing frame and the current gain processing frame is eliminated. This gain is gain information regarding the current gain processing frame. By this processing, the quantization noise is suppressed as in C51, and post-echo can be prevented.
[0065]
B52 indicated by a dotted line is a gain determined for the next frequency conversion process, and C52 also indicated by a dotted line is a quantization noise after the next frequency conversion process. In any case, it is not determined unless the next frequency conversion process is performed with reference to the next gain processing frame of the next gain processing frame. However, the amplitude in the next gain processing frame of the next gain processing frame of the input signal A5 is determined. The gain and quantization noise when there is no significant difference from the next gain processing frame, that is, when there is no attack part and no release part, are shown as an example.
[0066]
(5) Pre-echo countermeasures when there is an attack part in the current frame
As shown in FIG. 6, when the maximum value of the current frame is larger than the maximum value of the previous frame in the input signal A6, it is determined that there is an attack portion in the current frame, and the maximum of the sub-blocks in the current frame is A sub-block whose value matches the maximum value in the current frame and is the foremost sub-block is detected. Then, as in B6, a gain greater than 1 is determined for each sub-block before that sub-block. The magnitude of this gain is (maximum value of the current frame / maximum value of the corresponding sub-block). That is, the maximum value in each corresponding sub-block after gain control is determined to be equal to the maximum value of the current frame. However, if there are restrictions in the standards, etc., they will be followed.
[0067]
Then, in order to eliminate the level difference between the previous gain processing frame and the current gain processing frame, the gain of the first sub-block of the current gain processing frame is given to the previous gain processing frame as gain B61. This gain is gain information regarding the current gain processing frame. By this processing, the quantization noise is suppressed as in C61, and pre-echo can be prevented.
[0068]
The process (5) may be performed simultaneously with the processes (1), (2), and (3) described above. For example, FIG. 7 shows an example in which the pre-echo countermeasure of (5) is further performed in addition to the pre-echo and post-echo countermeasures when there are an attack portion and a release portion in the current gain processing frame of (2).
[0069]
As shown in FIG. 7, in the input signal A7 (same as the input signal A2 shown in FIG. 2), the maximum value of the current gain processing frame is greater than or equal to the maximum value of the previous gain processing frame, and If the maximum value of the current gain processing frame is larger than the maximum value of the next gain processing frame, it is determined that there are an attack portion and a release portion in the current gain processing frame, and each sub-block in the current gain processing frame is as shown in B7. Each time, the maximum value of the sub-block and the “peak backward average value” are compared, and a gain smaller than 1 (a gain that decreases) is determined for a sub-block larger than the “peak backward average value”. The magnitude of this gain is ("peak backward average value" / maximum value of each corresponding sub-block). That is, the maximum value of each corresponding sub-block after gain control is determined to be equal to the “peak backward average value”. However, if there are restrictions in the standard, etc., they shall be followed. Or you may determine the gain of said magnitude | size with respect to all the subblocks in a present gain process frame. In this case, the maximum value of each sub-block after gain control is equal to the “peak backward average value”.
[0070]
Further, among the sub-blocks in the current frame, the maximum value in the current frame matches the maximum value in the current frame, and the sub-block that is the foremost sub-block is detected. Then, as in B7, a gain larger than 1 is determined for each sub-block before that sub-block. The magnitude of this gain is (maximum value of the current frame / maximum value of the corresponding sub-block). That is, the maximum value in each corresponding sub-block after gain control is determined to be equal to the maximum value of the current frame. In FIG. 7, the gain of the first sub-block of the current gain processing frame is greater than 1.
[0071]
In order to eliminate the level difference between the previous gain processing frame and the current gain processing frame, the gain of the first sub-block of the current gain processing frame is given to the previous gain processing frame as in B71. This gain is gain information regarding the current gain processing frame. By this processing, the quantization noise is suppressed as in C71, and pre-echo can be further prevented as compared with the case where only the measure (5) is applied.
[0072]
As described above, according to the
[0073]
Further, since the average value of the amplitude of the signal of the current gain processing frame is detected and the gain information of the current gain processing frame is determined based on this average value, the amplitude of the signal of the current gain processing frame is used as a pre-echo and post-echo countermeasure. The amount of gain for reducing the large portion can be accurately determined according to the amplitude. This makes it possible to flatten the amplitude in the current gain processing frame and suppress the occurrence of pre-echo and post-echo even if the data amount after frequency conversion is small.
[0074]
【The invention's effect】
As described above, according to the present invention, gain control is performed on the signal of each block obtained by blocking the signal on the time axis for each unit time based on the gain information used until decoding for each block, In an encoding apparatus for encoding a signal on a frequency axis obtained by performing spectrum conversion on a gain-controlled signal, amplitude information detecting means for detecting amplitude information of the signal of each block, and detection by the amplitude information detecting means The amplitude information of the signal of the current processing block in which the gain information is determined, the amplitude information of the signal of the previous processing block immediately before the current processing block, and the signal immediately after the current processing block Gain information determining means for determining gain information of the current processing block based on amplitude information of a signal of the next processing block is provided The amplitude information detecting means divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-block, and the gain information determining means includes the sub-block The gain information is determined in units, and the gain control is performed in units of the sub-blocks. Therefore, it becomes possible to accurately detect an attack part and a release part that cause pre-echo and post-echo using the amplitude information of the three blocks of the current process block, the previous process block, and the next process block. As a result, fine and precise gain control can be performed based on the relationship between the front and back, and pre-echo and post-echo can be accurately suppressed.
[0075]
In addition, since the average value of the amplitude of the signal of each block is detected and the gain information of each block is determined based on this average value, as a countermeasure against pre-echo and post-echo, the portion where the amplitude of the signal of each block is large is reduced The gain amount can be accurately determined according to the magnitude of the amplitude. This makes it possible to flatten the amplitude of the signal in the block and suppress the occurrence of pre-echo and post-echo even if the data amount after frequency conversion is small.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram for explaining prevention of pre-echo in an encoding device according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram for explaining prevention of pre-echo and post-echo of the encoding apparatus according to the embodiment of the present invention.
FIG. 3 is an explanatory diagram for explaining a gain determination operation of the encoding device according to the embodiment of the present invention.
FIG. 4 is an explanatory diagram for explaining prevention of post-echo in the encoding device according to the embodiment of the present invention.
FIG. 5 is an explanatory diagram for explaining prevention of post-echo in the encoding device according to the embodiment of the present invention.
FIG. 6 is an explanatory diagram for explaining prevention of pre-echo in the encoding device according to the embodiment of the present invention.
FIG. 7 is an explanatory diagram for explaining prevention of pre-echo and post-echo of the encoding apparatus according to the embodiment of the present invention.
FIG. 8 is a block diagram showing an electrical configuration of the encoding apparatus according to the embodiment of the present invention.
FIG. 9 is an explanatory diagram for explaining pre-echo generation in a conventional encoding device.
FIG. 10 is an explanatory diagram for explaining post-echo generation in a conventional encoding device.
[Explanation of symbols]
1 Encoder
2 Frequency band division unit (blocking means)
3 Window part
4 Attack / release detection unit (amplitude information detection means, gain information determination means)
5 Gain controller (gain control means)
6 Time frequency converter (spectrum conversion means)
7 Quantization part
8 Packing part
9 Recording media
A1-A7, A9, A10 Input signal
B1-B7, B11, B12, B21, B22, B41, B42, B51, B52, B61, B71, B72 Gain
C9 to C12, C21, C22, C41, C42, C51, C52, C61, C71, C72 Quantization error
e0 to e7 sub-block
Claims (19)
前記各ブロックの信号の振幅情報を検出する振幅情報検出手段と、該振幅情報検出手段により検出された各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定するゲイン情報決定手段を設け、
前記振幅情報検出手段は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定手段は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うことを特徴とする符号化装置。Gain control of the signal of each block obtained by blocking the signal on the time axis for each unit time based on gain information used until decoding for each block, and spectrum conversion of the gain-controlled signal In an encoding device for encoding the obtained signal on the frequency axis,
Amplitude information detection means for detecting amplitude information of the signal of each block, and amplitude information of the signal of the current processing block for which gain information is determined, which is amplitude information of the signal of each block detected by the amplitude information detection means Information determining means for determining gain information of the current processing block based on the amplitude information of the signal of the previous processing block immediately before the current processing block and the amplitude information of the signal of the next processing block immediately after the current processing block Provided ,
The amplitude information detection means divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-blocks, and the gain information determination means includes the sub-block units. The encoding apparatus according to claim 1 , wherein the gain information is determined in step (b), and the gain control is performed in units of the sub-block .
前記ゲイン情報決定手段は、前記振幅情報検出手段により検出された各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定し、
前記振幅情報検出手段は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定手段は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御手段は、前記サブブロック単位で前記ゲイン制御を行うことを特徴とする符号化装置。Blocking means for blocking a signal on the time axis in which each sample is expressed in multiple values for each unit time, amplitude information detecting means for detecting amplitude information of the signal of each block created by the blocking means, Gain information determining means for determining gain information used until decoding for each block; amplitude information of signals of each block detected by the amplitude information detecting means; and gain information determined by the gain information determining means Gain control means for performing gain control on the signal of each block based on the above, a spectrum conversion means for spectrum-converting the signal of each block subjected to gain control by the gain control means to a signal on the frequency axis, and Coding that encodes a signal on the frequency axis obtained by the spectrum conversion means and outputs coding information including the gain information In the encoding apparatus and a stage,
The gain information determination means is the amplitude information of the signal of each block detected by the amplitude information detection means and the amplitude information of the signal of the current processing block for which gain information is determined, and the previous processing immediately before the current processing block Determining the gain information of the current processing block based on the amplitude information of the signal of the block and the amplitude information of the signal of the next processing block immediately after the current processing block ;
The amplitude information detection means divides each block into a plurality of sub-blocks on a time axis, detects amplitude information of the signal of each block in units of the sub-blocks, and the gain information determination means includes the sub-block units. The encoding apparatus is characterized in that the gain information is determined in step (a), and the gain control means performs the gain control in units of sub-blocks .
前記振幅情報検出手段により検出された各ブロックの信号の振幅情報は、前記各ブロックの信号の振幅の平均値であり、前記ゲイン情報決定手段は、前記平均値に基づいて前記各ブロックのゲイン情報を決定することを特徴とする符号化装置。Blocking means for blocking a signal on the time axis in which each sample is expressed in multiple values for each unit time, amplitude information detecting means for detecting amplitude information of the signal of each block created by the blocking means, Gain information determining means for determining gain information used until decoding for each block; amplitude information of signals of each block detected by the amplitude information detecting means; and gain information determined by the gain information determining means Gain control means for performing gain control on the signal of each block based on the above, a spectrum conversion means for spectrum-converting the signal of each block subjected to gain control by the gain control means to a signal on the frequency axis, and Coding that encodes a signal on the frequency axis obtained by the spectrum conversion means and outputs coding information including the gain information In the encoding apparatus and a stage,
The amplitude information of the signal of each block detected by the amplitude information detecting means is an average value of the amplitude of the signal of each block, and the gain information determining means is the gain information of each block based on the average value. An encoding device characterized by determining
前記振幅情報検出手段により検出された各ブロックの信号の振幅情報は、前記各ブロックの信号の振幅の最大値と平均値であり、前記ゲイン情報決定手段は、前記最大値と平均値に基づいて前記各ブロックのゲイン情報を決定することを特徴とする符号化装置。Blocking means for blocking a signal on the time axis in which each sample is expressed in multiple values for each unit time, amplitude information detecting means for detecting amplitude information of the signal of each block created by the blocking means, Gain information determining means for determining gain information used until decoding for each block; amplitude information of signals of each block detected by the amplitude information detecting means; and gain information determined by the gain information determining means Gain control means for performing gain control on the signal of each block based on the above, a spectrum conversion means for spectrum-converting the signal of each block subjected to gain control by the gain control means to a signal on the frequency axis, and Coding that encodes a signal on the frequency axis obtained by the spectrum conversion means and outputs coding information including the gain information In the encoding apparatus and a stage,
The amplitude information of the signal of each block detected by the amplitude information detection means is the maximum value and the average value of the amplitude of the signal of each block, and the gain information determination means is based on the maximum value and the average value. An encoding apparatus for determining gain information of each block.
前記各ブロックの信号の振幅情報を検出し、検出された前記各ブロックの信号の振幅情報であってゲイン情報が決定される今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定し、
前記振幅情報検出は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うことを特徴とする符号化方法。Gain control of the signal of each block obtained by blocking the signal on the time axis for each unit time based on gain information used until decoding for each block, and spectrum conversion of the gain-controlled signal In the encoding method for encoding the obtained signal on the frequency axis,
The amplitude information of the signal of each block is detected, the amplitude information of the detected signal of each block and the gain information is determined, and the amplitude information of the signal of the current processing block and the previous processing immediately before the current processing block Determining the gain information of the current processing block based on the amplitude information of the signal of the block and the amplitude information of the signal of the next processing block immediately after the current processing block ;
In the amplitude information detection, each block is divided into a plurality of sub-blocks on a time axis, and amplitude information of the signal of each block is detected in units of the sub-blocks. The gain information determination is performed in units of the sub-blocks. An encoding method , wherein gain information is determined, and the gain control is performed for each sub-block .
ゲイン情報を決定する今回処理ブロックの信号の振幅情報と前記今回処理ブロックの直前の前回処理ブロックの信号の振幅情報と前記今回処理ブロックの直後の次回処理ブロックの信号の振幅情報とに基づいて前記今回処理ブロックのゲイン情報を決定し、
前記振幅情報検出は、前記各ブロックを時間軸上で複数のサブブロックに分割し該サブブロック単位で前記各ブロックの信号の振幅情報を検出し、前記ゲイン情報決定は、前記サブブロック単位で前記ゲイン情報を決定し、前記ゲイン制御は、前記サブブロック単位で前記ゲイン制御を行うことを特徴とする符号化方法。Block the signal on the time axis where each sample is expressed in multiple values for each unit time, detect the amplitude information of the signal of each block, determine the gain information used until decoding for each block, Based on the detected amplitude information of the signal of each block and the determined gain information, gain control is performed on the signal of each block, and the signal of each block subjected to gain control is spectrum-converted into a signal on the frequency axis. In the encoding method for encoding the signal on the frequency axis obtained by conversion and outputting the encoded information including the gain information,
Based on the amplitude information of the signal of the current processing block for determining the gain information, the amplitude information of the signal of the previous processing block immediately before the current processing block, and the amplitude information of the signal of the next processing block immediately after the current processing block Determine the gain information of the processing block this time ,
In the amplitude information detection, each block is divided into a plurality of sub-blocks on a time axis, and amplitude information of the signal of each block is detected in units of the sub-blocks. The gain information determination is performed in units of the sub-blocks. An encoding method , wherein gain information is determined, and the gain control is performed for each sub-block .
前記各ブロックの信号の振幅情報として前記各ブロックの信号の振幅の平均値を検出し、検出された前記平均値に基づいて前記各ブロックのゲイン情報を決定することを特徴とする符号化方法。Block the signal on the time axis where each sample is expressed in multiple values for each unit time, detect the amplitude information of the signal of each block, determine the gain information used until decoding for each block, Based on the detected amplitude information of the signal of each block and the determined gain information, gain control is performed on the signal of each block, and the signal of each block subjected to gain control is spectrum-converted into a signal on the frequency axis. In the encoding method for encoding the signal on the frequency axis obtained by conversion and outputting the encoded information including the gain information,
An encoding method comprising: detecting an average value of the amplitude of the signal of each block as amplitude information of the signal of each block, and determining gain information of each block based on the detected average value.
前記各ブロックの信号の振幅情報として前記各ブロックの信号の振幅の最大値と平均値を検出し、検出された前記最大値と平均値に基づいて前記各ブロックのゲイン情報を決定することを特徴とする符号化方法。Block the signal on the time axis where each sample is expressed in multiple values for each unit time, detect the amplitude information of the signal of each block, determine the gain information used until decoding for each block, Based on the detected amplitude information of the signal of each block and the determined gain information, gain control is performed on the signal of each block, and the signal of each block subjected to gain control is spectrum-converted into a signal on the frequency axis. In the encoding method for encoding the signal on the frequency axis obtained by conversion and outputting the encoded information including the gain information,
A maximum value and an average value of the amplitude of the signal of each block are detected as amplitude information of the signal of each block, and gain information of each block is determined based on the detected maximum value and average value. The encoding method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003175002A JP4101123B2 (en) | 2003-06-19 | 2003-06-19 | Encoding apparatus and encoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003175002A JP4101123B2 (en) | 2003-06-19 | 2003-06-19 | Encoding apparatus and encoding method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005012543A JP2005012543A (en) | 2005-01-13 |
JP4101123B2 true JP4101123B2 (en) | 2008-06-18 |
Family
ID=34098328
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003175002A Expired - Fee Related JP4101123B2 (en) | 2003-06-19 | 2003-06-19 | Encoding apparatus and encoding method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4101123B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4956066B2 (en) * | 2006-06-26 | 2012-06-20 | キヤノン株式会社 | Image forming apparatus |
JP4872711B2 (en) * | 2007-02-26 | 2012-02-08 | ソニー株式会社 | Noise reduction apparatus and noise reduction method |
CN101770776B (en) * | 2008-12-29 | 2011-06-08 | 华为技术有限公司 | Coding method and device, decoding method and device for instantaneous signal and processing system |
JP5295380B2 (en) | 2009-10-20 | 2013-09-18 | パナソニック株式会社 | Encoding device, decoding device and methods thereof |
KR101334580B1 (en) | 2012-12-05 | 2013-11-28 | 신현직 | Manufacturing fabric with unevenness pattern |
-
2003
- 2003-06-19 JP JP2003175002A patent/JP4101123B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005012543A (en) | 2005-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100209099B1 (en) | Quantizing error reducer for audio signal | |
AU2022204314B2 (en) | Method and apparatus for generating from a coefficient domain representation of HOA signals a mixed spatial/coefficient domain representation of said HOA signals | |
JP3307138B2 (en) | Signal encoding method and apparatus, and signal decoding method and apparatus | |
JP3334419B2 (en) | Noise reduction method and noise reduction device | |
JP4579273B2 (en) | Stereo sound signal processing method and apparatus | |
US9008811B2 (en) | Methods and systems for adaptive time-frequency resolution in digital data coding | |
JP2001053617A (en) | Device and method for digital sound single encoding and medium where digital sound signal encoding program is recorded | |
WO1995021489A1 (en) | Data encoding method and apparatus, data decoding method and apparatus, data recording medium, and data transmission method | |
JP5633431B2 (en) | Audio encoding apparatus, audio encoding method, and audio encoding computer program | |
JPH08223049A (en) | Signal coding method and device, signal decoding method and device, information recording medium and information transmission method | |
JP2003233395A (en) | Method and device for encoding audio signal and encoding and decoding system | |
US7466245B2 (en) | Digital signal processing apparatus, digital signal processing method, digital signal processing program, digital signal reproduction apparatus and digital signal reproduction method | |
JP5323084B2 (en) | Voice codec quality improving apparatus and method | |
JP2004198485A (en) | Device and program for decoding sound encoded signal | |
JP4101123B2 (en) | Encoding apparatus and encoding method | |
JP2006018023A (en) | Audio signal coding device, and coding program | |
EP0899892B1 (en) | Signal processing apparatus and method, and information recording apparatus | |
JP3753956B2 (en) | Encoder | |
JP5379871B2 (en) | Quantization for audio coding | |
JP2003280691A (en) | Voice processing method and voice processor | |
JP2003177797A (en) | Digital signal encoding device and digital signal recording device provided with the device | |
JP5238512B2 (en) | Audio signal encoding method and decoding method | |
JP3341440B2 (en) | Information encoding method and apparatus, information decoding method and apparatus, and information recording medium | |
JP3166407B2 (en) | Noise reduction device | |
JP4556866B2 (en) | High efficiency encoding program and high efficiency encoding apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050810 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20070830 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071102 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071106 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071227 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080318 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080318 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110328 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120328 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120328 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130328 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |