JP6549057B2 - Encoding apparatus and encoding method - Google Patents
Encoding apparatus and encoding method Download PDFInfo
- Publication number
- JP6549057B2 JP6549057B2 JP2016051278A JP2016051278A JP6549057B2 JP 6549057 B2 JP6549057 B2 JP 6549057B2 JP 2016051278 A JP2016051278 A JP 2016051278A JP 2016051278 A JP2016051278 A JP 2016051278A JP 6549057 B2 JP6549057 B2 JP 6549057B2
- Authority
- JP
- Japan
- Prior art keywords
- code amount
- length coding
- variable
- unit
- encoding
- 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.)
- Active
Links
Images
Description
本発明の実施形態は、符号化装置および符号化方法に関する。 Embodiments of the present invention relate to an encoding apparatus and an encoding method.
例えば、画像、音声、映像、センサデータ、およびその他1次元または多次元のデジタル信号等の各種の信号を伝送する際、所定の伝送路の通信容量に対して信号の情報量が大きい場合、一般にこれらの信号を符号化することにより情報量を削減して伝送が行われる。この場合に符号化の方法としては、例えば、予測符号化、変換符号化、量子化、もしくは可変長符号化等の各種処理、またはこれらのいずれか2以上を併用した処理が一般に用いられる。このうち可変長符号化の手法を用いた場合、所定の処理単位を符号化した場合に発生する符号量が一定とはならない場合がある。この場合、復号装置の前段に受信バッファを設け、符号化装置から伝送路を介して入力される符号化された信号(符号)を一時的に蓄積するような構成が一般に用いられる。このような構成では、符号化装置が出力する符号の符号量の変動幅に対して十分大きな容量を有する受信バッファを用意し、受信バッファに蓄積された符号の符号量が、受信バッファの容量の所定の割合まで蓄積された後に復号処理を開始する。これによって、復号装置が復号を開始するタイミングにおいて、受信バッファに蓄積された符号が不足する状態、すなわちバッファアンダーフローが発生することを抑制することが可能となる。 For example, when transmitting various signals such as image, voice, video, sensor data, and other one-dimensional or multi-dimensional digital signals, in general, when the signal information amount is larger than the communication capacity of a predetermined transmission path, By encoding these signals, transmission is performed with a reduced amount of information. In this case, as a coding method, for example, various types of processing such as prediction coding, transform coding, quantization, or variable length coding, or processing using any two or more of these in combination is generally used. Among them, when the variable length coding method is used, the code amount generated when a predetermined processing unit is coded may not be constant. In this case, generally, a configuration is used in which a reception buffer is provided in the previous stage of the decoding device and the encoded signal (code) input from the encoding device through the transmission path is temporarily stored. In such a configuration, a reception buffer having a capacity large enough for the fluctuation range of the code amount of the code output from the encoding device is prepared, and the code amount of the code stored in the reception buffer is equal to that of the reception buffer. After being accumulated up to a predetermined rate, the decoding process is started. This makes it possible to suppress a shortage of codes accumulated in the reception buffer, that is, occurrence of buffer underflow, at the timing when the decoding apparatus starts decoding.
また、一般に受信バッファの容量が大きくなると、符号化装置が出力する符号の符号量の変動幅が大きくなってもバッファアンダーフローを抑制することが可能である。一方、受信バッファを容量の所定の割合まで最初に蓄積するまでの時間(初期遅延時間)が長くなることから、伝送システム全体としての遅延時間が大きくなるという問題がある。したがって、初期遅延時間の観点からみると、受信バッファの容量は可能な限り小さいことが望ましい。 Also, in general, when the capacity of the reception buffer is increased, it is possible to suppress the buffer underflow even if the fluctuation range of the code amount of the code output from the coding apparatus is increased. On the other hand, since the time (initial delay time) until the reception buffer is first accumulated to a predetermined ratio of the capacity becomes long, there is a problem that the delay time of the entire transmission system becomes long. Therefore, from the viewpoint of the initial delay time, it is desirable that the capacity of the reception buffer be as small as possible.
以上の観点に基づき、受信バッファの容量を抑えつつバッファアンダーフローの発生を抑制する方法として、符号化装置が出力する符号量を制御することにより符号量の変動幅を抑え、バッファアンダーフローの発生を防ぐ方法が知られている。そのような方法の一例として、例えば、ビデオの符号化において、符号化対象となるフレーム群を2回符号化する方法が知られている。この方法では、1回目の符号化で収集した統計値を用いて2回目の符号化で用いる量子化パラメタを決定することにより出力される符号量を制御し、バッファアンダーフローの発生を抑制している。また、別の方法の例として、ある処理単位を符号化したときの符号量が割り当てられた符号量を上回った場合に、上回った部分の符号化をスキップすることにより発生符号量を抑えるという方法も知られている。 Based on the above viewpoints, as a method of suppressing the occurrence of buffer underflow while suppressing the capacity of the reception buffer, the fluctuation of the code amount is suppressed by controlling the code amount output by the encoding device, and the occurrence of buffer underflow How to prevent is known. As an example of such a method, for example, in video coding, a method of encoding a frame group to be encoded twice is known. In this method, the amount of codes to be output is controlled by determining the quantization parameter used in the second encoding using the statistic value collected in the first encoding, and the occurrence of buffer underflow is suppressed. There is. Also, as an example of another method, when the code amount when encoding a certain processing unit exceeds the allocated code amount, the method of suppressing the generated code amount by skipping the encoding of the exceeded part It is also known.
しかしながら、上述のフレーム群を2回符号化する方法では、符号化処理を2回行う必要があることから、符号化処理にかかる処理量が大きいという問題がある。また、符号量の推定値に基づいて、量子化パラメタを決定して符号化を行うことから、推定値と、実際に発生する符号量との間に乖離が生じる可能性があり、受信バッファが小さい場合にバッファアンダーフローの発生を抑制しきれない可能性が存在する。 However, in the above-described method of encoding a frame group twice, there is a problem that the amount of processing required for the encoding process is large because the encoding process needs to be performed twice. In addition, since the quantization parameter is determined based on the estimated value of the code amount and encoding is performed, there is a possibility that a deviation may occur between the estimated value and the actually generated code amount, and the reception buffer If it is small, there is a possibility that the occurrence of buffer underflow can not be suppressed.
また、上述の符号化をスキップすることにより発生符号量を抑えるという方法では、符号化をスキップした部分において復号した信号の品質の大幅な劣化が発生するという問題がある。 Further, in the method of suppressing the generated code amount by skipping the above-mentioned coding, there is a problem that the quality of the decoded signal is largely deteriorated in the portion where the coding is skipped.
本発明は、上記に鑑みてなされたものであって、少ない処理量でバッファアンダーフローを抑制することができる符号化装置および符号化方法を提供することを目的とする。 The present invention has been made in view of the above, and it is an object of the present invention to provide an encoding apparatus and encoding method that can suppress buffer underflow with a small amount of processing.
実施形態の符号化装置は、入力信号を量子化パラメタに基づいて量子化した量子化値に対して可変長符号化を行う符号化装置であって、選択部と、取得部と、決定部と、量子化部と、符号化部と、を備える。選択部は、入力信号の特性に基づいて、1の可変長符号化テーブルを選択する。取得部は、選択された可変長符号化テーブルに応じて、前記量子化パラメタ毎に発生しうる最大の符号量を取得する。決定部は、量子化パラメタ毎の最大の符号量と、占有符号量により求まる割り当て符号量と、に基づいて量子化パラメタを決定する。量子化部は、量子化パラメタを用いて、入力信号を量子化して量子化値を求める。符号化部は、量子化パラメタに基づいて、1の可変長符号化テーブルを選択し、量子化値に対して可変長符号化を行う。 The encoding apparatus according to the embodiment is an encoding apparatus that performs variable-length encoding on a quantized value obtained by quantizing an input signal based on a quantization parameter, and includes a selection unit, an acquisition unit, and a determination unit. , A quantization unit, and an encoding unit. The selection unit selects one variable-length coding table based on the characteristics of the input signal. An acquisition unit acquires the maximum code amount that can be generated for each of the quantization parameters according to the selected variable length coding table. The determination unit determines the quantization parameter based on the maximum code amount for each quantization parameter and the allocated code amount determined by the occupied code amount. The quantization unit quantizes the input signal using a quantization parameter to obtain a quantization value. The coding unit selects one variable-length coding table based on the quantization parameter, and performs variable-length coding on the quantized value.
以下に、図面を参照しながら、本発明の各実施形態に係る符号化装置および符号化方法を詳細に説明する。ただし、図面は模式的なものであるため、具体的な構成は以下の説明を参酌して判断すべきものである。 Hereinafter, an encoding apparatus and an encoding method according to each embodiment of the present invention will be described in detail with reference to the drawings. However, since the drawings are schematic, specific configurations should be determined in consideration of the following description.
(第1の実施形態)
図1は、第1の実施形態に係る伝送システムの全体構成の一例を示す図である。図1を参照しながら、本実施形態に係る伝送システム1の全体構成について説明する。
First Embodiment
FIG. 1 is a diagram showing an example of the entire configuration of the transmission system according to the first embodiment. The entire configuration of a
図1に示すように、本実施形態に係る伝送システム1は、符号化装置10と、復号装置20と、受信バッファ30と、を含む。符号化装置10から出力される信号(後述する符号ストリーム)は、ネットワーク40を介して、受信バッファ30に蓄積される。なお、符号化装置10から受信バッファ30へ送信される伝送路は、ネットワーク40のような有線の伝送路に限定されるものではなく、符号化装置10から無線通信により信号がネットワーク40に送信されるものとしてもよい。また、図1に示す伝送システム1の構成では、復号装置20と、受信バッファ30とが別体となっている構成を示しているが、これに限定されるものではなく、例えば、復号装置20は、受信バッファ30を含むものとし、復号装置20による復号処理の前段に受信バッファ30が配置されるものとしてもよい。
As shown in FIG. 1, the
符号化装置10は、外部から入力される入力信号を符号化し、その符号を外部(例えば、ネットワーク40)に出力する装置である。具体的には、符号化装置10は、入力信号を量子化し、量子化した信号である量子化値を可変長符号化して出力する。
The
ここで、入力信号としては、例えば、音声、画像、映像、3次元ボリュームデータ、各種センサの出力信号(1次元または多次元の信号)、無線または有線の伝送路における伝送信号(ベースバンド信号)等が挙げられる。なお、入力信号は上述のいずれかの信号に限定されるものではなく、例えば、入力ビット数に対しエントロピーの小さい各種信号、または、後述する予測符号化もしくは変換符号化によりエントロピーが削減された信号を入力信号としてもよい。 Here, examples of the input signal include voice, image, video, three-dimensional volume data, output signals of various sensors (one-dimensional or multi-dimensional signals), and transmission signals (baseband signals) in a wireless or wired transmission path. Etc. Note that the input signal is not limited to any of the above-mentioned signals. For example, various signals having a small entropy with respect to the number of input bits, or a signal whose entropy is reduced by predictive coding or transform coding described later May be used as the input signal.
例えば、符号化装置10は、入力信号に対する前処理として、入力信号を近接サンプルに基づき予測し、その予測値との差分値(予測残差)を求め(予測処理)、この予測残差を入力信号として量子化および可変長符号化するものとしてもよい(いわゆる、予測符号化)。例えば、温度センサ等の出力信号の場合、時間的に近接する信号同士は類似の値を持っている可能性が高く、予測処理により情報量(エントロピー)を削減することが可能となる。
For example, as preprocessing for an input signal, the
また、符号化装置10は、入力信号または上述の予測残差に対して離散フーリエ変換、離散コサイン変換または離散ウェーブレット変換等の変換処理を行い、その変換後の信号を入力信号として量子化および可変長符号化するものとしてもよい(いわゆる、変換符号化)。例えば、画像信号、特に自然画像においては、空間周波数の低い領域に信号が集中する傾向があり、周波数変換処理を行うことにより、空間周波数が高い領域のエントロピーを削減することが可能である。画像信号の場合では、予測処理および変換処理の併用によってさらに高効率にエントロピーを削減する方法が一般に知られている。
Also, the
このように、入力信号に応じた適切な予測処理または変換処理を行うことによりエントロピーを削減し、この信号(またはその量子化値)を可変長符号化することによって高効率な符号化が実現される。本実施形態においては、便宜上、入力ビット数に対しエントロピーの低い入力信号(例えば、予測残差等)を想定し、これを量子化および可変長符号化して出力する符号化装置について説明する。 In this manner, entropy is reduced by performing appropriate prediction processing or conversion processing according to the input signal, and high-efficiency coding is realized by variable-length coding this signal (or its quantized value). Ru. In the present embodiment, for convenience, an encoding apparatus will be described in which an input signal with a low entropy (for example, prediction residual) with respect to the number of input bits is assumed, and this is quantized and variable-length encoded and output.
復号装置20は、符号化装置10から出力された符号化された信号が蓄積された受信バッファ30から、所定時間ごとの復号タイミングに所定単位の符号を引き去り、引き去った符号を復号する装置である。
The decoding device 20 is a device that withdraws a code of a predetermined unit from the
受信バッファ30は、符号化装置10から出力された符号化された信号を一定のレートで蓄積する記憶装置である。また、受信バッファ30は、復号装置20の復号機能の前段に配置されており、復号装置20によって、所定時間ごとの復号タイミングに所定単位の符号が復号のために引き去られる。
The
ネットワーク40は、符号化装置10と受信バッファ30とを接続する無線または有線の伝送路である。
The
図2は、第1の実施形態に係る符号化装置のハードウェア構成の一例を示す図である。図2を参照しながら、本実施形態に係る符号化装置10のハードウェア構成について説明する。
FIG. 2 is a diagram illustrating an example of a hardware configuration of the encoding device according to the first embodiment. The hardware configuration of the
図2に示すように、本実施形態に係る符号化装置10は、入力I/F501と、符号化プロセッサ502と、キャッシュ502aと、RAM(Random Access Memory)503と、出力I/F504と、補助記憶装置505と、を備えている。入力I/F501、符号化プロセッサ502、RAM503、出力I/F504、および補助記憶装置505は、アドレスバスおよびデータバス等のバス506によって互いに通信可能に接続されている。
As shown in FIG. 2, the
入力I/F501は、外部から入力信号を入力するためのインターフェースである。
An input I /
符号化プロセッサ502は、図1に示す符号化装置10の全体の動作を制御する演算装置である。符号化プロセッサ502は、符号化処理を実行する。
The
キャッシュ502aは、符号化プロセッサ502が処理をする際のデータをワークエリアとして一時的に記憶するメモリである。
The cache 502 a is a memory that temporarily stores data when the
RAM503は、符号化プロセッサ502の符号化処理により生成した符号ストリーム等を一時記憶する揮発性記憶装置である。RAM503は、例えば、SRAM(Static RAM)またはDRAM(Dynamic RAM)である。
The
出力I/F504は、符号化プロセッサ502の符号化処理により生成した符号ストリームを外部に出力するためのインターフェースである。
The output I /
補助記憶装置505は、後述する可変長符号化テーブル等を記憶する記憶装置である。補助記憶装置505は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、フラッシュメモリまたは光ディスク等の電気的、磁気的または光学的に記憶可能な記憶装置である。なお、補助記憶装置505は、符号化装置10が備えるものとしているが、これに限定されるものではなく、符号化装置10の外部に設置されているのとしてもよく、この場合、補助記憶装置505に記憶されたデータは、インターフェースを介して符号化装置10と通信されるものとすればよい。また、上述の補助記憶装置505に記憶される情報は、補助記憶装置505に記憶する代わりに処理方法(論理回路またはプログラム)として組み込むものとしてもよい。
The
なお、図2に示す符号化装置10のハードウェア構成は一例であり、その他の構成によって実現されるものとしてもよい。
The hardware configuration of the
図3は、第1の実施形態に係る符号化装置のブロック構成の一例を示す図である。図4は、受信バッファの占有符号量の制御を説明する図である。図3および4を参照しながら、本実施形態に係る符号化装置10のブロック構成および動作について説明する。
FIG. 3 is a diagram showing an example of a block configuration of the coding apparatus according to the first embodiment. FIG. 4 is a diagram for explaining control of the occupied code amount of the reception buffer. The block configuration and operation of the
図3に示すように、本実施形態に係る符号化装置10は、テーブル選択部101(選択部)と、符号量取得部102(取得部)と、パラメタ決定部103(決定部)と、量子化部104と、符号化部105と、符号量制御部106と、記憶部107と、を有する。
As shown in FIG. 3, the
テーブル選択部101は、外部から入力信号を受信し、所定の処理単位毎に、入力信号の特性に基づいて、記憶部107に予め記憶されている1以上の可変長符号化テーブルの中から、1の可変長符号化テーブルを選択する機能部である。ここで、入力信号の特性としては、例えば、入力信号の信号値の絶対値和または分散等であればよい。また、可変長符号化テーブルとは、入力信号を、例えば、ゴロムライス符号、または指数ゴロム符号等の既知の符号に変換(可変長符号化)するためテーブルである。テーブル選択部101は、記憶部107に予め記憶されている1以上の可変長符号化テーブルから、入力信号に対して可変長符号化を行った場合の符号量が小さくなる可変長符号化テーブルを選択する。例えば、ゴロムライス符号の可変長符号化テーブルの場合、テーブル選択部101は、入力信号の分散が小さい場合には、ゴロムライス符号の可変長符号化テーブルを特定するパラメタであるサフィックス長が短い可変長符号化テーブルを選択することにより、その可変長符号化テーブルにより符号化した場合の符号量を削減することが出来る。一方、テーブル選択部101は、入力信号の分散が大きい場合には、サフィックス長が長い可変長符号化テーブルを選択することにより、その可変長符号化テーブルにより符号化した場合の符号量を削減することが出来る。
The
テーブル選択部101は、選択した可変長符号化テーブルを示す情報(以下、テーブルインデックスと称する場合がある)を、符号量取得部102および符号化部105それぞれに送る。例えば、ゴロムライス符号の可変長符号化テーブルの場合、サフィックス長をテーブルインデックスとすればよい。テーブル選択部101は、図2に示す符号化プロセッサ502により実現される。
The
なお、入力信号の特性(絶対値和または分散)と可変長符号化テーブルとの対応関係を予め定めておき、この対応関係を規定する情報(例えば、数式またはルックアップテーブル等)を記憶部107に記憶させておき、テーブル選択部101は、この対応関係を規定する情報を参照することによって、可変長符号化テーブルを選択するものとしてもよい。例えば、ゴロムライス符号の場合、入力信号の絶対値和とサフィックス長とは対数の関係にあることから、テーブル選択部101は、対応関係を規定する情報として、絶対値和からサフィックス長を算出する数式を用い、特性値(絶対値和)から算出したサフィックス長により可変長符号化テーブルを選択するものとすればよい。
Note that the correspondence between the characteristic (absolute value sum or variance) of the input signal and the variable-length coding table is determined in advance, and information (for example, a formula or a look-up table) defining this correspondence is stored in the
また、上述では、1以上の可変長符号化テーブルが予め記憶部107に記憶されているものとしたが、これに限定されるものではなく、テーブル選択部101は、入力信号を特性(絶対値和あるいは分散)に基づいて分類し、各グループに分類された入力信号の出現頻度に基づいて、特定の符号(例えば、ハフマン符号)に符号化する可変長符号化テーブルを作成するものとしてもよい。これによって、入力信号に最適な可変長符号化テーブルを作成することができ、高効率な符号化を実現することができる。また、上述において、1以上の可変長符号化テーブルは、予め記憶部107に記憶されるものとしてが、これに限定されるものではなく、1以上の可変長符号化の処理方法を予め用意しておいてもよい。例えば、ゴロムライス符号の場合、入力信号からプレフィックス長およびサフィックス値の各パラメタを算出し、これら値に基づいて可変長符号を構成することにより、可変長符号化を行うことが可能である。このように所定の演算処理として規定可能な可変長符号化方法を用いる場合、この演算ロジックを符号化装置に用意しておくことにより、記憶部107に可変長符号化テーブルを記憶することの代わりとすることができる。
Furthermore, although one or more variable length coding tables are stored in advance in
また、上述において、入力信号の特性として絶対値和および分散を例に挙げたが、これらに限定されるものではなく、入力信号の特性として、入力信号の平均値を用いるものとしてもよい。一般に、音声または画像等において予測符号化を行う場合、予測後の信号は0を中心に分布する傾向がある。しかし、符号化装置10に0以外を中心に分布するような入力信号が入力される場合には、入力信号の平均値に基づいて可変長符号化テーブルの選択を行うことにより、より高効率な符号化が実現される場合がある。
Further, in the above, although the sum of absolute values and the variance are taken as examples of the characteristics of the input signal, the present invention is not limited to these, and an average value of the input signal may be used as the characteristics of the input signal. In general, when predictive coding is performed on speech or images, signals after prediction tend to be distributed around zero. However, when an input signal having a distribution other than 0 is input to the
また、テーブル選択部101は、記憶部107に記憶された1以上の可変長符号化テーブルから、入力信号の特性に基づいて、1の可変長符号化テーブルを選択するものとしたが、これに限定されるものではなく、記憶部107に記憶された可変長符号化テーブルは単一のテーブルであり、これを用いるものとしてもよい。入力信号の特性がほとんど変化しないような場合、単一の可変長符号化テーブルを用いるものとしても、高効率な符号化が行える場合がある。この場合、1以上の可変長符号化テーブルの中から1の可変長符号化テーブルを選択する必要がないので、符号化装置10はテーブル選択部101を有する必要はない。この場合、符号量取得部102および符号化部105は、この単一の可変長符号化テーブルが選択されているものとみなして後述の処理を行うものとすればよい。
In addition, although the
符号量取得部102は、テーブル選択部101からテーブルインデックスを受け取り、このテーブルインデックスに基づいて、基準符号量を取得する機能部である。符号量取得部102による基準符号量の取得方法については、後述する。符号量取得部102は、取得した基準符号量をパラメタ決定部103へ送る。符号量取得部102は、図2に示す符号化プロセッサ502により実現される。
The code
パラメタ決定部103は、符号量取得部102から基準符号量を受け取り、符号量制御部106から割り当て符号量を受け取り、基準符号量および割り当て符号量に基づいて、量子化パラメタを決定する機能部である。パラメタ決定部103による量子化パラメタの決定方法については、後述する。パラメタ決定部103は、決定した量子化パラメタを量子化部104および符号化部105それぞれに送る。パラメタ決定部103は、図2に示す符号化プロセッサ502により実現される。
The parameter determination unit 103 is a functional unit that receives the reference code amount from the code
量子化部104は、外部から入力信号を受信し、パラメタ決定部103から量子化パラメタを受け取り、入力信号を量子化パラメタにより量子化を行って量子化値を得る機能部である。例えば、量子化部104は、以下の式(1)に基づいて、量子化を行う。
The
x1=round(x0/2q) ・・・(1) x1 = round (x0 / 2 q ) (1)
上述の式(1)において、x0は入力信号を示し、x1は量子化値を示し、qは量子化パラメタを示す。また、round()は小数点以下を四捨五入する関数を示す。この関数round()による処理を行うことによって、復号装置20により符号化された符号を復号する場合に、四捨五入を行わない場合と比較して、復号した信号の誤差を低減することができる。また、上述の式(1)により量子化された量子化値は、量子化幅(式(1)の2q)に応じて小さくなるので分散が小さくなる。量子化部104は、量子化によって得た量子化値を、符号化部105へ送る。量子化部104は、図2に示す符号化プロセッサ502により実現される。
In the above equation (1), x0 represents an input signal, x1 represents a quantization value, and q represents a quantization parameter. Also, round () indicates a function that rounds off the decimal point. By performing the process using this function round (), when decoding the code encoded by the decoding device 20, it is possible to reduce the error of the decoded signal as compared to the case where rounding is not performed. Further, since the quantization value quantized by the above equation (1) becomes smaller according to the quantization width (2 q of equation (1)), the dispersion becomes smaller. The
なお、量子化部104は、上述の式(1)を用いて量子化を行うことに限定されるものではなく、その他の方式に基づいて量子化を行ってもよい。例えば、H.264/MPEG−4 AVC(Advanced Video Coding)等における量子化と同様の処理を行ってもよい。
In addition, the
符号化部105は、テーブル選択部101からテーブルインデックスを受け取り、パラメタ決定部103から量子化パラメタを受け取り、量子化部104から量子化値を受け取り、量子化値に対して可変長符号化を行う機能部である。具体的には、符号化部105は、テーブルインデックスおよび量子化パラメタに基づいて、記憶部107に記憶されている1以上の可変長符号化テーブルの中から、1の可変長符号化テーブルを選択し、その可変長符号化テーブルにより量子化値に対して可変長符号化を行う。上述のように、量子化値は、量子化幅に応じて小さくなるので分散が小さくなることから、符号化部105は、入力信号よりも分散の小さくなった量子化値に対応した可変長符号化テーブルを用いて可変長符号化を行うことにより、発生する符号量を小さくすることができる。
ここで、上述の式(1)を用いて量子化を行い、ゴロムライス符号の可変長符号化テーブルを用いる場合を考える。また、上述のように、ゴロムライス符号のサフィックス長を、可変長符号化テーブルのテーブルインデックスとして考える。符号化部105は、上述のテーブル選択部101により選択された可変長符号化テーブルは、量子化を行わない、すなわち、例えば、式(1)においては、量子化パラメタq=0の場合に最適な可変長符号化テーブルであるので、受け取った量子化パラメタqが「0」である場合、テーブル選択部101が選択した可変長符号化テーブルにより可変長符号化を行うものとすればよい。また、パラメタ決定部103により決定された量子化パラメタqが「1」である場合、上述の式(1)によれば、量子化値は入力信号の約1/2になることから、分散が1/2の信号(量子化値)に対応する可変長符号化テーブルが最適となる。ゴロムライス符号の可変長符号化テーブルの場合、これはサフィックス長が1小さい可変長符号化テーブルに対応する。このことから、テーブル選択部101により選択された可変長符号化テーブルのテーブルインデックスをkとすると、符号化部105は、記憶部107に記憶された、サフィックス長がk−qとなるゴロムライス符号の可変長符号化テーブルにより可変長符号化を行えばよい。なお、ゴロムライス符号のサフィックス長は0以上であることから、例えば、k−qが0未満となる場合、符号化部105は、サフィックス長が0のゴロムライス符号の可変長符号化テーブルを用いて可変長符号化を行うものとすればよい。なお、例えば、式(1)以外の方法によって量子化を行う場合、上述と同様に、各量子化パラメタに対応する分散の変化度合に応じた可変長符号化テーブルを選択するものとしてもよい。
Here, it is assumed that quantization is performed using the above-mentioned equation (1) and a variable-length coding table of Golomb's rice code is used. Further, as described above, the suffix length of the Golomb rice code is considered as a table index of the variable length coding table. The
なお、ハフマン符号の可変長符号化テーブルにより可変長符号化を行う場合も、同様の方法により可変長符号化テーブルを選択して符号化を行ってよい。ハフマン符号の可変長符号化テーブルを利用する場合、予め複数の特性値(信号の絶対値和または分散)に対応するテーブルを用意しておき、テーブル選択部101がいずれかを選択する。符号化部105は、ゴロムライス符号の可変長符号化テーブルを用いる場合と同様、ハフマン符号の可変長符号化テーブルのテーブルインデックスと、量子化パラメタとに基づいて、量子化値の分散(または絶対値和)を取得し、これに対応する、または最も近い可変長符号化テーブルを用いて、量子化値に対して可変長符号化を行うものとすればよい。ここで用いるハフマン符号の可変長符号化テーブルについては、分散または絶対値和ごとに分類された信号の出現頻度に基づいて予め作成されたものであってもよい。
When variable length coding is performed using a variable length coding table of the Huffman code, the variable length coding table may be selected and coded by the same method. In the case of using a variable-length coding table of the Huffman code, a table corresponding to a plurality of characteristic values (sum or variance of absolute values of signals) is prepared in advance, and the
また、例えば、ゴロムライス符号等の符号無し整数を想定した可変長符号化テーブルによる可変長符号化を行う場合、かつ、量子化値が符号付き整数である場合に、符号化部105は、以下の式(2)によって、量子化値を符号無し整数へと変換した後に可変長符号化を行うものとしてもよい。
Also, for example, when performing variable-length coding with a variable-length coding table assuming an unsigned integer such as a Golomb-Rice code, and when the quantization value is a signed integer, the
x2=−2・x1 (if x1≦0)
x2=2・x1+1 (if x1>0) ・・・(2)
x2 = −2 · x1 (if x1 ≦ 0)
x2 = 2 · x1 + 1 (if x1> 0) (2)
上述の式(2)において、x1は符号付きの量子化値を示し、x2は符号無し整数に変換された値を示す。なお、上述の式(2)による変換を行う代わりに、符号ビットを別途符号化し、量子化値の絶対値についてゴロムライス符号の可変長符号化テーブルによる可変長符号化を行ってもよい。 In the above equation (2), x1 represents a signed quantization value, and x2 represents a value converted to an unsigned integer. Note that, instead of performing conversion according to the above equation (2), code bits may be separately encoded, and variable length coding may be performed on the absolute value of the quantization value using a variable length coding table of Golomb's Rice code.
符号化部105は、さらに、復号装置20による復号処理に用いるため、テーブルインデックスおよび量子化パラメタについても符号化する。この場合、テーブルインデックスおよび量子化パラメタは、例えば、予め定められたビット数により固定長で符号化されてもよいし、予め定められた可変長符号化テーブルを用いて可変長符号化を行ってもよい。また、テーブルインデックスおよび量子化パラメタは、予測符号化を行ってもよい。テーブルインデックスおよび量子化パラメタの特性が大きく変化しない場合に、過去に符号化した値(例えば、直前に符号化した値)を用いてこれらの値を予測(例えば、0次予測または1次予測等)し、その予測残差を符号化することにより発生する符号量を削減することが可能である。
The
符号化部105は、以上のように、テーブルインデックス、量子化パラメタおよび量子化値を符号化し、符号ストリームとして外部(例えば、ネットワーク40等)へと出力する。また、符号化部105は、符号化した符号の符号量(発生符号量)を、符号量制御部106へ送る。符号化部105は、図2に示す符号化プロセッサ502により実現される。
As described above, the
符号量制御部106は、符号化部105から発生符号量を受け取り、割り当て符号量を設定する機能部である。符号量制御部106は、受信バッファ30において占有している符号の量(以下、占有符号量という)をモデル化し、受信バッファ30においてバッファアンダーフローが発生しないような符号化部105における発生符号量となるように、割り当て符号量を設定する。
The code
例えば、符号量制御部106は、MPEG−2におけるVBV(Video Buffer Verifier)、または、M.264/MPEG−4 AVCにおけるHRD(Hypothetical Reference Decoder)等のバッファモデルと同一または類似のモデル化を行うことによって、受信バッファ30においてバッファアンダーフローが発生しない割り当て符号量を設定するものとしてもよい。
For example, the code
具体的には、例えば、図4に示すような受信バッファ30の占有符号量のモデル化を行ってもよい。図4において、縦軸は受信バッファ30で占有する符号量(占有符号量)を示し、横軸は時間を示している。図4に示すように、受信バッファ30は、初期状態において占有符号量が「0」の状態にあり、ここから、一定のビットレートで符号化装置10から出力された符号が蓄積される。その後、所定の初期遅延時間が経過すると、復号装置20が復号を開始し、最初の処理単位における符号量に相当する符号が復号装置20によって受信バッファ30から引き去られる。以降は、所定の処理単位毎に、符号化装置10から出力される符号の蓄積と、復号装置20による符号の引き去りとが繰り返される。このような図4に示すモデルにおいて、占有符号量が「0」を下回った場合にバッファアンダーフローが発生する。すなわち、各処理単位において、復号装置20による符号の引き去りのタイミングにおける占有符号量よりも、符号化部105が出力する符号の符号量(発生符号量)が大きい場合に、バッファアンダーフローが発生する。
Specifically, for example, modeling of the occupied code amount of the
そこで、符号量制御部106は、各処理単位における符号の引き去りのタイミングでの占有符号量と同一または小さい符号量を、割り当て符号量として設定する。符号化装置10は、ある処理単位の入力信号の量子化値を、割り当て符号量よりも小さい符号量となるように可変長符号化を行うことによって、バッファアンダーフローの発生を抑制することが可能となる。ここで、割り当て符号量は、各処理単位における符号の引き去りのタイミングでの占有符号量と同一の符号量として設定されてもよいが、これに限定されるものではなく、これよりも小さい符号量として設定されてもよい。
Therefore, the code
また、受信バッファ30の占有符号量が一定以上である状態、すなわち、符号化部105により発生可能な符号量に余裕がある場合に、ある処理単位においてこの余裕分を一度に消費してしまうよりは、後続の複数の処理単位でこの余裕分を分割したほうが、発生符号量が安定しやすい。このことから、特に占有符号量が大きい場合に、占有符号量よりも小さい符号量を割り当て符号量として設定することによって、復号装置20により復号された信号の品質を安定化させることが可能となる。
Also, if the amount of occupied code of the
符号量制御部106は、設定した割り当て符号量を、パラメタ決定部103へ送る。符号量制御部106は、図2に示す符号化プロセッサ502により実現される。
The code
記憶部107は、テーブル選択部101および符号化部105が参照する1以上の可変長符号化テーブル等を記憶する機能部である。記憶部107は、図2に示す補助記憶装置505により実現される。
The
なお、図3に示したテーブル選択部101、符号量取得部102、パラメタ決定部103、量子化部104、符号化部105、符号量制御部106、および記憶部107は、機能を概念的に示したものであって、このような構成に限定されるものではない。例えば、図3で独立した機能部として図示した複数の機能部を、1つの機能部として構成してもよい。一方、図3の1つの機能部が有する機能を複数に分割し、複数の機能部として構成するものとしてもよい。
The
また、図3に示したテーブル選択部101、符号量取得部102、パラメタ決定部103、量子化部104、符号化部105、および符号量制御部106は、いずれも図2に示す符号化プロセッサ502により実現されるものとしたが、これに限定されるものではない。すなわち、上述の各機能部のうち少なくともいずれかが、記憶装置(例えば、図2に示す補助記憶装置505)等の記憶媒体に記憶されているプログラムがCPU(Central Processing Unit)により実行されることによって実現されるものとしてもよい。
Also, the
図5は、各量子化パラメタに対するワースト符号量を示すグラフの一例を示す図である。図3および5を参照しながら、符号量取得部102による基準符号量の取得方法、およびパラメタ決定部103による量子化パラメタの決定方法の詳細について説明する。
FIG. 5 is a diagram showing an example of a graph showing the worst code amount for each quantization parameter. The details of the method of acquiring the reference code amount by the code
上述したように、テーブル選択部101は、外部から受信した入力信号の絶対値和または分散等に基づいて、入力信号に対して可変長符号化を行った場合の符号量が小さくなる可変長符号化テーブルを選択するものとしている。逆に言えば、あるテーブルインデックスが示す可変長符号化テーブルが与えられた場合に、対応する入力信号の取り得る値はある有限の範囲に制限されることになる。例えば、ある可変長符号化テーブルが入力信号の絶対値和≦128に対応するテーブルである場合、この可変長符号化テーブルが与えられれば、処理単位内の入力信号が取り得る値は、その絶対値和が128以下となる任意の数値(入力信号が整数値の場合、任意の整数)群に限定される。入力信号が限定されれば、これらの入力信号を、対応する可変長符号化テーブルで符号化した場合の発生符号量が取得可能であり、例えば、総当たり等の方法によって、この可変長符号化テーブルにより入力信号を符号化した場合の最大の符号量が取得可能である。この取得した符号量は、量子化を行わない場合の最大の符号量であるが、量子化が行われた量子化値についても、同様に、符号化した場合の最大の符号量が取得可能である。この最大の符号量を、予め取得しておいてもよい。
As described above, the
また、量子化パラメタと量子化幅とが単調増加の関係にある場合、量子化パラメタが大きくなるほど、その量子化パラメタで量子化した量子化値を符号化した際の符号量は小さくなる。例えば、上述の式(1)のように、量子化幅が量子化パラメタの指数関数として表現される場合、符号化された符号量は、量子化パラメタに対する一次式で近似することができる。この性質は、上述の最大の符号量についても同様である。そこで、図5に示すように、予め、一次式によって最大の符号量のモデル化を行う。具体的には、あるテーブルインデックスが示す可変長符号化テーブルで符号化する場合に、任意の量子化パラメタを用いた場合の最大の符号量を取得(例えば、総当たりによる)し、図5に示すように、これらの最大の符号量のすべてを上回る一次式を設定する(下記の式(3))。 When the quantization parameter and the quantization width have a monotonically increasing relationship, the larger the quantization parameter, the smaller the code amount at the time of encoding the quantization value quantized by the quantization parameter. For example, when the quantization width is expressed as an exponential function of the quantization parameter as in the above-mentioned equation (1), the encoded code amount can be approximated by a linear expression for the quantization parameter. This property is the same for the above-mentioned maximum code amount. Therefore, as shown in FIG. 5, modeling of the maximum code amount is performed in advance by a linear expression. Specifically, when encoding is performed using a variable-length coding table indicated by a certain table index, the maximum code amount in the case of using an arbitrary quantization parameter is obtained (for example, by round robin), as shown in FIG. As shown, a linear expression that exceeds all of these maximum code amounts is set (Equation (3) below).
WB=C1xq+C2 (C1<0、C2>0) ・・・(3) WB = C 1 xq + C 2 (C 1 <0, C 2 > 0) (3)
上述の式(3)において、C1は、一次式の傾きであり、量子化パラメタqの増加と共に符号量は減少するので負値である。また、C2は、一次式の切片である。そして、WBは、一次式で算出される符号量を示し、以下、ワースト符号量という。すなわち、式(3)は、各量子化パラメタに対するワースト符号量を示す一次式となる。 In the above equation (3), C 1 is the slope of the linear expression, and is a negative value because the code amount decreases with the increase of the quantization parameter q. C 2 is an intercept of a linear expression. Further, WB indicates a code amount calculated by a linear expression, and hereinafter, it is referred to as a worst code amount. That is, Equation (3) is a linear expression indicating the worst code amount for each quantization parameter.
そして、テーブルインデックス毎に、上述の式(3)に示す一次式の傾きC1および切片C2を予め取得しておく。すなわち、テーブルインデックスが決まれば、ワースト符号量を示す一次式が決定されることになる。これによって、各テーブルインデックスについて、特定の量子化パラメタに対するワースト符号量が容易に算出できる。また、このテーブルインデックスと、ワースト符号量を示す一次式(すなわち、傾きC1および切片C2)との対応関係の情報は、例えば、予め記憶部107に記憶されているものとすればよい。そして、符号量取得部102は、記憶部107を参照して、テーブル選択部101から受け取ったテーブルインデックスに対応するワースト符号量を示す一次式を特定し、例えば、その一次式の切片C2を、基準符号量として取得する。なお、一次式の傾きC1についてはテーブルインデックス間で共通としてもよく、この場合はテーブルインデックス毎に切片C2のみを予め記憶しておけばよい。
Then, for each table index, the inclination C 1 and the intercept C 2 of the linear expression shown in the above-mentioned equation (3) are obtained in advance. That is, if the table index is determined, a linear expression indicating the worst code amount is determined. This makes it possible to easily calculate the worst code amount for a specific quantization parameter for each table index. Further, information on the correspondence between the table index and the linear expression (i.e., the slope C 1 and the intercept C 2 ) indicating the worst code amount may be stored in the
パラメタ決定部103は、符号量取得部102により取得された基準符号量を有するワースト符号量を示す一次式を特定し、ワースト符号量が符号量制御部106から受け取った割り当て符号量を超えないように量子化パラメタを決定する。これによって、受信バッファ30におけるバッファアンダーフローの発生を抑制することが可能になる。具体的には、ワースト符号量WBが、上述の式(3)でモデル化されていることから、割り当て符号量Bについて、下記の式(4)が満たされていればよい。
The parameter determination unit 103 specifies a linear expression indicating the worst code amount having the reference code amount acquired by the code
B≧C1xq+C2 ・・・(4) B C C 1 x q + C 2 (4)
また、この式(4)から量子化パラメタqについて整理すると、下記の式(5)が得られる。 Further, when the quantization parameter q is arranged from the equation (4), the following equation (5) is obtained.
q≧(B−C2)/C1 ・・・(5) q ≧ (B−C 2 ) / C 1 (5)
パラメタ決定部103は、この式(5)を満たす量子化パラメタqを決定すればよく、例えば、式(5)を満たす最小の量子化パラメタqを決定して、量子化部104に送る。なお、復号装置20の復号信号の品質の安定化を目的として、量子化パラメタqの変動を抑えるため、上述の式(5)を満たす範囲で、直前までの量子化パラメタに類似する値を量子化パラメタとして決定するものとしてもよい。
The parameter determination unit 103 may determine the quantization parameter q satisfying the equation (5), for example, determines the minimum quantization parameter q satisfying the equation (5), and sends it to the
なお、上述の式(3)に示すワースト符号量を示す一次式は、図5に示すように、各量子化パラメタに対応する最大の符号量の全てを上回る一次式に設定するものとしたが、これに限定されるものではない。例えば、各量子化パラメタに対応する最大の符号量のうち2点を接続するグラフであって、その他の最大符号量と差分の絶対値和が最小となるグラフを示す一次式に設定するものとしてもよい。また、上述のように設定した一次式が示すグラフについて、その切片が所定範囲(例えば、元のグラフの切片の1〜2倍の範囲)でシフトさせたグラフを示す一次式であってもよい。 Note that, as shown in FIG. 5, the linear expression indicating the worst code amount shown in the above-mentioned equation (3) is set to a linear expression that exceeds all of the maximum code amounts corresponding to the respective quantization parameters. Not limited to this. For example, it is a graph connecting two points of the maximum code amount corresponding to each quantization parameter, and is set as a linear expression representing a graph in which the sum of absolute values of other maximum code amounts and differences is minimized. It is also good. In addition, the linear expression may be a linear expression showing a graph in which the intercept is shifted within a predetermined range (for example, a range of 1 to 2 times the intercept of the original graph) for the graph indicated by the linear expression set as described above. .
図6は、第1の実施形態に係る符号化装置の符号化処理の一例を示すフローチャートである。図6を参照しながら、本実施形態に係る符号化装置10の符号化処理の流れを総括的に説明する。
FIG. 6 is a flowchart showing an example of the encoding process of the encoding apparatus according to the first embodiment. The flow of the encoding process of the
<ステップS11>
テーブル選択部101は、外部から入力信号を受信する。そして、ステップS12へ移行する。
<Step S11>
The
<ステップS12>
テーブル選択部101は、所定の処理単位毎に、入力信号の特性(例えば、入力信号の信号値の絶対値和または分散等)に基づいて、記憶部107に予め記憶されている1以上の可変長符号化テーブルの中から、1の可変長符号化テーブルを選択する。テーブル選択部101は、選択した可変長符号化テーブルを示す情報(以下、テーブルインデックスと称する場合がある)を、符号量取得部102および符号化部105それぞれに送る。そして、ステップS13へ移行する。
<Step S12>
The
<ステップS13>
符号量取得部102は、テーブル選択部101からテーブルインデックスを受け取り、このテーブルインデックスに基づいて、基準符号量を取得する。具体的には、符号量取得部102は、記憶部107を参照して、テーブル選択部101から受け取ったテーブルインデックスに対応するワースト符号量を示す一次式を特定し、例えば、その一次式の切片C2を、基準符号量として取得する。符号量取得部102は、取得した基準符号量をパラメタ決定部103へ送る。そして、ステップS14へ移行する。
<Step S13>
The code
<ステップS14>
パラメタ決定部103は、符号量取得部102から基準符号量を受け取り、符号量制御部106から割り当て符号量を受け取り、基準符号量および割り当て符号量に基づいて、量子化パラメタを決定する。具体的には、パラメタ決定部103は、符号量取得部102により取得された基準符号量を有するワースト符号量を示す一次式を特定し、ワースト符号量が符号量制御部106から受け取った割り当て符号量を超えないように量子化パラメタを決定する。パラメタ決定部103は、決定した量子化パラメタを量子化部104および符号化部105それぞれに送る。そして、ステップS15へ移行する。
<Step S14>
The parameter determination unit 103 receives the reference code amount from the code
<ステップS15>
量子化部104は、外部から入力信号を受信し、パラメタ決定部103から量子化パラメタを受け取り、入力信号を量子化パラメタにより量子化を行って量子化値を得る。量子化部104は、量子化によって得た量子化値を、符号化部105へ送る。そして、ステップS16へ移行する。
<Step S15>
The
<ステップS16>
符号化部105は、テーブル選択部101からテーブルインデックスを受け取り、パラメタ決定部103から量子化パラメタを受け取り、量子化部104から量子化値を受け取り、量子化値に対して可変長符号化を行う。例えば、テーブル選択部101により選択された可変長符号化テーブルのテーブルインデックスをkとすると、符号化部105は、記憶部107に記憶された、サフィックス長がk−qとなるゴロムライス符号の可変長符号化テーブルにより可変長符号化を行う。そして、ステップS17へ移行する。
<Step S16>
<ステップS17>
符号量制御部106は、符号化部105から発生符号量を受け取り、割り当て符号量を設定する。符号量制御部106は、受信バッファ30において占有している占有符号量をモデル化し、受信バッファ30においてバッファアンダーフローが発生しないような符号化部105における発生符号量となるように、割り当て符号量を設定する。
<Step S17>
The code
以上のステップS11〜S17に示したように、符号化装置10は、入力した入力信号に対して符号化処理を行う。
As shown in the above steps S11 to S17, the
以上のように、本実施形態に係る符号化装置10では、可変長符号化テーブルを示すテーブルインデックス毎に、ワースト符号量をモデル化することにより、割り当て符号量以下の符号量となる量子化パラメタを、少ない処理量で取得して符号化を行うことができる。これによって、少ない処理量で受信バッファ30のバッファアンダーフローの発生を抑制した信号の符号化を実現することができる。また、バッファアンダーフローの発生が抑制されることから、符号化処理においてスキップ等のバッファアンダーフローの回避手段を含む必要がなく、これによる局所的なSNR(Signal−to−Noise Ratio)の低下を抑制することができる。
As described above, in the
なお、符号化部105は、上述のように、量子化のほかに、テーブルインデックスおよび量子化パラメタについても符号化を行っている。この場合、パラメタ決定部103は、これらの符号量を考慮して量子化パラメタを決定するものとしてもよい。具体的には、例えば、これらのパラメタを固定のビット数により符号化する場合、処理単位毎に、当該ビット数を上述の式(4)における右辺に加算した上で、量子化パラメタの算出を行ってもよい。または、例えば、テーブルインデックスおよび量子化パラメタを予測符号化する場合、処理単位毎に、テーブルインデックスおよび量子化パラメタそれぞれの値における符号量を算出して上述の式(4)に反映してもよく、または、より簡単に、予測符号化した場合の発生しうる最大符号量を予め求めておき、この最大符号量を加算した上で量子化パラメタの算出を行ってもよい。
In addition to the quantization, the
また、本実施形態に係る符号化装置10は、量子化パラメタが大きくなるほど、分散の小さい信号に対応する可変長符号化テーブルを利用して符号化を行うものとしている。しかし、量子化パラメタが所定値以上の場合、量子化パラメタが大きくなっても符号が削減されにくくなる場合がある。例えば、ゴロムライス符号を用いる場合において、量子化パラメタが、テーブル選択部101により選択された可変長符号化テーブルのテーブルインデックスとしてのサフィックス長を上回る場合、それ以上分散の小さいテーブルが用意されていないことにより、量子化パラメタが大きくなっても符号が削減されにくくなる。そこで、テーブル選択部101により選択された可変長符号化テーブル(すなわち、量子化を行わない場合に利用される可変長符号化テーブル)は、予め定められた複数の可変長符号化テーブルのうち、分散の大きい信号に対応する可変長符号化テーブルに限定してもよい。例えば、ゴロムライス符号の可変長符号化テーブルを用いる場合、テーブル選択部101は、サフィックス長が予め定められた所定値より大きい可変長符号化テーブルのみを選択する。この場合、テーブル選択部101は、所定値k0より大きいサフィックス長kを選択する。符号化部105は、量子化パラメタをqとした場合に、サフィックス長k−qの可変長符号化テーブルで符号化を行うが、ここでk−qはk0未満となっても問題ない。このようなテーブル選択部101による可変長符号化テーブルの選択によって、符号化部105が符号化に用いる可変長符号化テーブルが用意されていないような場合(すなわち、k−q<0となるような場合)が発生しにくくなり、ワースト符号量のモデル化がより正確に行えるようになる。
In addition, the
また、上述の式(3)に示すワースト符号量のモデル化の際、各量子化パラメタに対応する最大の符号量をすべて上回る一次式を設定するものとしたが、ワースト符号量が必ずしも直線で正確にモデル化できない場合がある。このような場合に、一部の量子化パラメタに対応する最大の符号量を外れ値とみなし、これを下回るような一次式でモデル化を行うものとしてもよい。この場合、外れ値とみなされた最大の符号量に対応する量子化パラメタを用いた場合、受信バッファ30においてバッファアンダーフローが発生してしまう可能性があるが、他の部分について正確にモデル化していれば、全体として符号化効率を向上させることが可能となる。なお、この場合、バッファアンダーフローの発生を完全に回避することができなくなるため、バッファアンダーフローが発生した場合には、以降の符号化をスキップする等の処理を行う必要がある。ここで、上述のワースト符号量のモデルの外れ値と見なした部分において、モデルに対する最大の符号量のはみ出し部分が十分に小さければ、バッファアンダーフローの発生時の不足ビット数は十分小さい(例えば、数ビット)と見込むことができる。例えば、符号化部105が符号化を行う際、最初に、量子化パラメタおよびテーブルインデックスを符号化し、その後、量子化値を符号化するようにすれば、バッファアンダーフローが発生する部分は、その処理単位の最後の数ビットに相当するため、バッファアンダーフローが発生してもその影響は処理単位内のごく一部(例えば、最後の数シンボル)にとどめることができる。さらに、量子化値の符号化方法についても、最初に処理単位内の各量子化値の符号情報または上位ビット部分の情報を符号化し、その後に下位ビットの情報を符号化すれば、バッファアンダーフローの影響範囲が下位ビット部分にとどまるため、信号の完全な欠落を防ぎ、ある程度まで復号することが可能となる。例えば、ゴロムライス符号の可変長符号化テーブルを用いる場合、信号の符号情報、符号のプレフィックス部分、サフィックス部分の順に符号化を行えばよい。この場合、符号のプレフィックス部分の長さから復号信号の絶対値の値域が制限されるため、この情報からある程度の精度での復号が行える。このような符号化方法により、バッファアンダーフローが発生した場合のSNRの大幅な低下を防ぐことができる。
Further, in modeling of the worst code amount shown in the above equation (3), a linear expression which exceeds all the maximum code amounts corresponding to each quantization parameter is set, but the worst code amount is not necessarily linear. Sometimes it can not be modeled accurately. In such a case, the maximum code amount corresponding to a part of the quantization parameters may be regarded as an outlier, and modeling may be performed using a linear expression that falls below this. In this case, if quantization parameters corresponding to the maximum code amount regarded as outliers are used, buffer underflow may occur in the
また、バッファアンダーフローが発生した場合、符号化部105は、受信バッファ30においてバッファアンダーフローがちょうど発生する符号量まで符号化を行い、処理単位内におけるそれ以降の符号を破棄してもよい。その後、符号化部105は、次の処理単位から符号化を再開する。復号装置20は、受信バッファ30内のすべての符号を読み込み、処理単位内で復号可能な部分まで復号を行う。復号不可能な信号については、予め定められた値(例えば、「0」等)で置き換えを行ってもよい。その後、復号装置20は、次の処理単位において、受信バッファ30の先頭から符号を読み込み、復号を再開することができる。
In addition, when a buffer underflow occurs, the
また、上述の符号化部105による符号化については、受信バッファ30におけるバッファアンダーフローの発生を抑制する方法について説明してきたが、バッファオーバーフローについても同一または類似の方法により、その発生を抑制することが可能である。具体的には、符号量制御部106は割り当て符号量の代わりに、バッファオーバーフローが発生しない最低限の符号量を出力する。符号化装置10はワースト符号量の代わりに、処理単位ごとに各可変長符号化テーブルで最低限発生する符号量を予めモデル化しておく。パラメタ決定部103は、このモデルに基づき、テーブルインデックスと符号量制御部106が出力した符号量とに基づいて、量子化パラメタを設定する。バッファオーバーフローの発生を抑制する場合、上述の式(4)の不等号を反転させた形の数式を満たせばよいことから、量子化パラメタの上限値を得ることができ、この範囲で任意の量子化パラメタを選択すればよい。なお、量子化パラメタの上限値が、予め定められた最低値(上述の式(1)の量子化を行う場合、例えば「0」)を下回る可能性があるが、これは最低値を用いた場合でもバッファオーバーフローが発生する可能性が残ることを意味する。実際に発生する符号量が不足してバッファオーバーフローが発生しそうな場合、処理単位の符号の最後に余剰符号を付加することによって、発生符号量を水増しさせ、バッファオーバーフローの発生を抑制するものとしてもよい(いわゆる、ビット・スタッフィング処理)。
In addition, although the method of suppressing the occurrence of buffer underflow in the
また、上述のバッファオーバーフローの発生を抑制する方法は、上述のバッファアンダーフローの発生を抑制する方法と併用して用いられるものとしてもよい。この場合、パラメタ決定部103は、割り当て符号量および最低限の符号量と、テーブルインデックスとから量子化パラメタの上限値と下限値とを算出し、この範囲に収まる量子化パラメタを設定すればよい。 Also, the method of suppressing the occurrence of buffer overflow described above may be used in combination with the method of suppressing the occurrence of buffer underflow described above. In this case, the parameter determination unit 103 may calculate the upper limit value and the lower limit value of the quantization parameter from the allocated code amount, the minimum code amount, and the table index, and set the quantization parameter within this range. .
また、本実施形態に係る符号化装置10においては、テーブルインデックスおよび量子化パラメタは、処理単位ごとに決定することとしているが、これに限定されるものではない。例えば、量子化パラメタについては第1の処理単位ごとに決定し、テーブルインデックスについては第1の処理単位よりも小さい第2の処理単位ごとに選択するようにしてもよい。例えば、変換符号化を行う場合、変換係数の位置ごとに符号の分散は異なり得る。このような場合に、例えば、前半の係数(例えば、画像の場合における空間周波数が低い信号)と、後半の係数(例えば、画像の場合における空間周波数が高い信号)とで異なるテーブルインデックスを選択することにより、符号化効率を高めることが可能である。この場合、パラメタ決定部103は、第1の処理単位内のそれぞれの第2の処理単位についてワースト符号量をモデル化し、その量子化パラメタに対応するワースト符号量の和が割り当て符号量を下回るように量子化パラメタを設定すればよい。
Further, in the
(第2の実施形態)
第2の実施形態に係る符号化装置について、第1の実施形態に係る符号化装置10と相違する点を中心に説明する。第1の実施形態では、所定の処理単位毎に、可変長符号化テーブルの選択を行って可変長符号化を行う動作を説明した。本実施形態では、前回選択した可変長符号化テーブルの情報を再利用する動作について説明する。なお、本実施形態に係る伝送システムの全体構成、および符号化装置のハードウェア構成は、第1の実施形態で説明した構成と同様である。
Second Embodiment
An encoding apparatus according to the second embodiment will be described focusing on differences from the
図7は、第2の実施形態に係る符号化装置のブロック構成の一例を示す図である。図7を参照しながら、本実施形態に係る符号化装置10aのブロック構成および動作について説明する。
FIG. 7 is a diagram showing an example of a block configuration of the coding apparatus according to the second embodiment. The block configuration and operation of the
図7に示すように、本実施形態に係る符号化装置10aは、テーブル選択部101a(選択部)と、符号量取得部102(取得部)と、パラメタ決定部103a(決定部)と、量子化部104と、符号化部105aと、符号量制御部106と、記憶部107と、を有する。なお、符号量取得部102、量子化部104、符号量制御部106、および記憶部107の動作は、第1の実施形態で説明した内容と同様である。
As shown in FIG. 7, the
テーブル選択部101aは、外部から入力信号を受信し、所定の処理単位毎に、入力信号の特性に基づいて、記憶部107に予め記憶されている1以上の可変長符号化テーブルの中から、1の可変長符号化テーブルを選択する機能部である。なお、入力信号の特性に基づいて、可変長符号化テーブルを選択する方法は、第1の実施形態のテーブル選択部101と同一または類似の動作であってよい。テーブル選択部101aは、さらに、選択情報を生成する。ここで、選択情報とは、その処理単位で選択した可変長符号化テーブル、および以前(例えば、直前)に選択した可変長符号化テーブルのうち、いずれの可変長符号化テーブルを用いるかを示す情報である。
The
入力信号の特性(分散または絶対値和等)が以前と同一または類似であった場合、以前に選択した可変長符号化テーブルを用いることにより、符号化部105aにおいてテーブルインデックスを符号化する必要がなくなり符号量を低減することができる。一方、入力信号の特性が以前と異なる場合には、テーブル選択部101aは、新たに可変長符号化テーブルを選択することにより、符号化効率を向上させることができる。
If the characteristics (such as variance or sum of absolute values) of the input signal are the same or similar as before, it is necessary to encode the table index in the encoding unit 105a by using the previously selected variable length encoding table. Can be eliminated to reduce the amount of code. On the other hand, when the characteristic of the input signal is different from before, the
また、テーブル選択部101aによる選択情報の設定は、例えば以下のように行う。まず、テーブル選択部101aは、各処理単位において、可変長符号化テーブルを選択するために入力信号の特性値(分散値または絶対値和等)を取得する。テーブル選択部101aは、取得した特性値と、以前に選択した可変長符号化テーブルに対応する特性値とを比較し、その差が所定の閾値未満である場合、以前に選択した可変長符号化テーブルを再度選択する。差が所定の閾値より大きい場合、テーブル選択部101aは、その処理単位において、入力信号の特性値に基づき、新たに可変長符号化テーブルを選択する。なお、特性値の比較処理にあたっては、特性値そのものの比較をおこなう代わりに、その対数値の差分について閾値判定をおこなってもよい。一般に符号化時の発生符号量は、特性値の対数に相関することから、このように比較を行うことにより符号化効率の高い可変長符号化テーブルの選択が可能となる。
Further, the setting of the selection information by the
テーブル選択部101aは、選択した可変長符号化テーブルを示すテーブルインデックスを、符号量取得部102および符号化部105aそれぞれに送り、生成した選択情報を、パラメタ決定部103aおよび符号化部105aそれぞれに送る。テーブル選択部101aは、図2に示す符号化プロセッサ502により実現される。
The
パラメタ決定部103aは、符号量取得部102から基準符号量を受け取り、符号量制御部106から割り当て符号量を受け取り、テーブル選択部101aから選択情報を受け取り、量子化パラメタを決定する機能部である。パラメタ決定部103aは、図2に示す符号化プロセッサ502により実現される。パラメタ決定部103aによる量子化パラメタの決定方法は、選択情報がテーブル選択部101aにより新たに可変長符号化テーブルが選択されたことを示す場合、第1の実施形態のパラメタ決定部103の動作と同一または類似の方法によって、量子化パラメタを決定すればよい。一方、選択情報がテーブル選択部101aにより以前に選択した可変長符号化テーブルが選択されたことを示す場合、パラメタ決定部103aは、以下のような動作によって、量子化パラメタを決定する。
The
第1の実施形態では、パラメタ決定部103は、符号量取得部102により取得された基準符号量を有する、上述の式(3)に示すワースト符号量を示す一次式を特定するものとしているが、選択情報がテーブル選択部101aにより以前に選択した可変長符号化テーブルが選択されたことを示す場合、パラメタ決定部103aは、テーブル選択部101aにより以前に選択された可変長符号化テーブルを用いる。この場合、テーブル選択部101aにより新たに選択された可変長符号化テーブル(最適な可変長符号化テーブル)を用いて符号化を行う場合よりも符号量が大きくなる場合がある。この場合、上述の式(3)に示すワースト符号量を示す一次式を利用すると、ワースト符号量の予測精度が悪くなり、その結果、符号化効率が低下するという問題がある。そこで、以下の式(6)に示すように、可変長符号化テーブルの差異による符号量の増加分を別の項として付加して、ワースト符号量のモデル化を行う。
In the first embodiment, the parameter determination unit 103 specifies a linear expression indicating the worst code amount shown in the above equation (3), which has the reference code amount acquired by the code
WB=C1xq+C2+dif[t1,t2] (C1<0、C2>0)・・・(6)
WB = C 1 xq + C 2 + dif [
上述の式(6)において、C1およびC2は、上述の式(3)で対応する値と同一または類似の値でよい。t1は、入力信号の特性値(絶対値和または分散等)に対応した可変長符号化テーブルのテーブルインデックスを示し、t2は、テーブル選択部101aにより以前選択された可変長符号化テーブルのテーブルインデックスを示す。そして、dif[t1,t2]は、テーブルインデックスがt1である場合と、t2である場合とで符号化された符号量の差分を示す。dif[t1,t2]は、t1=t2のとき、「0」であってよく、t1およびt2の可変長符号化テーブルの分散が異なるほど、大きくなっていく。dif[t1,t2]の値は、任意のテーブルインデックスt1に対応する入力信号を、テーブルインデックスt2に対応する可変長符号化テーブルで、例えば、総当たりで符号化を行う等により取得することができる。各t1、t2について総当たりで符号化を行ってワースト符号量を取得し、t1=t2の場合のワースト符号量との差分をとったものがdif[t1,t2]となる。上述の式(6)によりワースト符号量のモデル化を行えば、その後のパラメタ決定部103aによる量子化パラメタの決定方法については、第1の実施形態のパラメタ決定部103の動作と類似である。具体的には、割り当て符号量Bについて、下記の式(7)が満たされていればよい。
In the above equation (6), C 1 and C 2 may be the same as or similar to the corresponding values in the above equation (3). t 1 indicates a table index of a variable-length coding table corresponding to the characteristic value (absolute value sum or variance etc.) of the input signal, and t 2 indicates a variable-length coding table previously selected by the
B≧C1xq+C2+dif[t1,t2] ・・・(7) B C C 1 x q + C 2 + dif [t 1 , t 2 ] (7)
また、この式(7)から量子化パラメタqについて整理すると、下記の式(8)が得られる。 Further, when the quantization parameter q is arranged from the equation (7), the following equation (8) is obtained.
q≧(B−C2−dif[t1,t2])/C1 ・・・(8) q ((B-C 2- dif [t 1 , t 2 ]) / C 1 (8)
パラメタ決定部103aは、この式(8)を満たす量子化パラメタqを決定すればよく、例えば、式(8)を満たす最小の量子化パラメタqを決定して、量子化部104に送る。
The
なお、上述のように、テーブルインデックスが異なる場合のワースト符号量の差分を、2次元のテーブルについての差分dif[t1,t2]としてモデル化していたが、予め用意した可変長符号化テーブルの特性によっては、1次元のテーブルでモデル化を行うことも可能である。例えば、ゴロムライス符号の可変長符号化テーブルを用いる場合、ある可変長符号化テーブル(例えば、サフィックス長=k)と、その隣接する可変長符号化テーブル(例えば、サフィックス長=k+1、k−1)とは、ちょうど絶対値和が2倍または1/2倍の入力信号に対応する。この関係はサフィックス長が2以上の任意の可変長符号化テーブルについて成立し、このことから異なる可変長符号化テーブルを用いた場合のワースト符号量の差分は、各サフィックス長の絶対値にほとんど依存せず、その差分に大きく依存することになる。このことから、式(7)の代わりに、以下の式(9)のようにモデル化を行うことにより、符号化装置10a内部に保持する情報量を削減することができる。
As described above, although the difference between the worst code amounts when the table index is different is modeled as the difference dif [t 1 , t 2 ] for the two-dimensional table, a variable-length coding table prepared in advance is prepared. It is also possible to perform modeling with a one-dimensional table, depending on the characteristics of. For example, when using a variable-length coding table of Golomb's rice code, a certain variable-length coding table (for example, suffix length = k) and its adjacent variable-length coding table (for example, suffix length = k + 1, k-1) And corresponds to an input signal whose sum of absolute values is twice or half. This relationship holds for any variable-length coding table with a suffix length of 2 or more. From this, the difference in the worst code amount when using different variable-length coding tables mostly depends on the absolute value of each suffix length It will depend heavily on the difference. From this, by performing modeling as shown in the following equation (9) instead of the equation (7), it is possible to reduce the amount of information held in the
B≧C1xq+C2+dif[t1−t2] ・・・(9) B C C 1 x q + C 2 + dif [t 1- t 2 ] (9)
また、ゴロムライス符号以外の符号の可変長符号化テーブルを用いる場合においても、用意する可変長符号化テーブルによっては、上述の式(9)と同様のモデル化を行うことができる。例えば、ハフマン符号に基づく可変長符号化テーブルを用意する場合、可変長符号化テーブルの元となる確率分布を、テーブルインデックスごとに所定の割合で変化させた分布とすればよい。具体的には、例えば、テーブルインデックスが「1」増える毎に分散が2倍となる正規分布を用意し、この分布に基づいてハフマン符号の可変長符号化テーブルを構成しておけば、式(9)のようなモデル化を行うことが可能となる。 Further, even in the case of using a variable-length coding table of a code other than Golomb's rice code, the same modeling as the above-mentioned equation (9) can be performed depending on the prepared variable-length coding table. For example, when preparing a variable-length coding table based on the Huffman code, the probability distribution serving as the source of the variable-length coding table may be a distribution in which the table index is changed at a predetermined ratio. Specifically, for example, if a normal distribution is prepared such that the variance is doubled each time the table index increases by “1”, and the variable length coding table of the Huffman code is configured based on this distribution, the formula ( It becomes possible to perform modeling like 9).
パラメタ決定部103aは、決定した量子化パラメタを量子化部104および符号化部105aそれぞれに送る。
The
符号化部105aは、テーブル選択部101aからテーブルインデックスおよび選択情報を受け取り、パラメタ決定部103aから量子化パラメタを受け取り、量子化部104から量子化値を受け取り、量子化値に対して可変長符号化を行う機能部である。具体的には、選択情報がテーブル選択部101aにより以前に選択した可変長符号化テーブルが選択されたことを示す場合、符号化部105aは、内部に保持しておいた以前に符号化した可変長符号化テーブルを用いて、量子化値を可変長符号化する。なお、符号化部105aは、実際に用いる可変長符号化テーブルについて、第1の実施形態の符号化部105と同様に、テーブルインデックス(テーブル選択部101aにより以前に選択した可変長符号化テーブルを示すテーブルインデックス)と、量子化パラメタとに基づき選択するものとしてもよい。一方、選択情報がテーブル選択部101aにより新たに可変長符号化テーブルが選択されたことを示す場合、符号化部105aは、第1の実施形態の符号化部105と同一または類似の動作により可変長符号化を行えばよい。符号化部105aは、後続の処理単位で利用できるようにテーブルインデックスの情報を内部に保持する。符号化部105aは、図2に示す符号化プロセッサ502により実現される。
The encoding unit 105a receives the table index and the selection information from the
符号化部105aは、テーブルインデックスの符号化方法について、第1の実施形態の符号化部105の同方法と異なる方法により符号化を行う。具体的には、符号化部105aは、まず、選択情報(例えば、フラグ)を符号化し、その後、選択情報がその処理単位で選択した可変長符号化テーブルを選択している場合のみ、その可変長符号化テーブルのテーブルインデックスを符号化する。これによって、テーブルインデックスを符号化する際の符号量が削減される。その他の動作において、符号化部105aは、第1の実施形態の符号化部105と同一または類似の動作を行う。符号化部105aは、以上のように、選択情報、テーブルインデックス(必要がある場合)、量子化パラメタおよび量子化値を符号化し、符号ストリームとして外部(例えば、ネットワーク40等)へ出力する。
The encoding unit 105a performs encoding of the table index by a method different from the same method as the
以上のように、本実施形態に係る符号化装置10aは、第1の実施形態に係る符号化装置10と同様に、少ない処理量で受信バッファ30のバッファアンダーフローの発生を抑制する量子化パラメタを設定し、符号化を行うことができる。これによって、符号化処理に要する処理量を低減できるとともに、スキップ等によるバッファアンダーフローの回避手段を含む必要がなく、復号信号の局所的なSNRの低下を抑制することができる。
As described above, the
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これらの新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、および変更を行うことができる。これらの実施形態は、発明の範囲および要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 While certain embodiments of the present invention have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and alterations can be made without departing from the scope of the invention. These embodiments are included in the scope and the gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
1 伝送システム
10、10a 符号化装置
20 復号装置
30 受信バッファ
40 ネットワーク
101、101a テーブル選択部
102 符号量取得部
103、103a パラメタ決定部
104 量子化部
105、105a 符号化部
106 符号量制御部
107 記憶部
501 入力I/F
502 符号化プロセッサ
502a キャッシュ
503 RAM
504 出力I/F
505 補助記憶装置
506 バス
502 Encoding
504 Output I / F
505 Auxiliary storage device 506 bus
Claims (11)
前記入力信号の特性に基づいて、2以上の可変長符号化テーブルの中から1の可変長符号化テーブルを選択する選択部と、
前記選択部により選択された可変長符号化テーブルに応じて、前記量子化パラメタ毎に発生しうる最大の符号量を取得する取得部と、
前記量子化パラメタ毎の前記最大の符号量と、受信バッファの占有符号量により求まる割り当て符号量と、に基づいて前記量子化パラメタを決定する決定部と、
前記決定部により決定された前記量子化パラメタを用いて、前記入力信号を量子化して前記量子化値を求める量子化部と、
前記決定部により決定された前記量子化パラメタに基づいて、前記2以上の可変長符号化テーブルの中から1の可変長符号化テーブルを選択し、該可変長符号化テーブルによって、前記量子化値に対して可変長符号化を行う符号化部と、
を備えた符号化装置。 A coding apparatus that performs variable-length coding on a quantized value obtained by quantizing an input signal based on a quantization parameter, comprising:
A selector configured to select one variable length coding table from among two or more variable length coding tables based on the characteristics of the input signal;
An acquisition unit for acquiring the maximum code amount that may occur for each of the quantization parameters according to the variable-length coding table selected by the selection unit;
A determination unit that determines the quantization parameter based on the maximum code amount for each quantization parameter and an allocated code amount determined by an occupied code amount of a reception buffer;
A quantization unit that quantizes the input signal to obtain the quantization value using the quantization parameter determined by the determination unit;
Based on the quantization parameter determined by the determination unit, one variable-length coding table is selected from the two or more variable-length coding tables, and the quantization value is determined by the variable-length coding table. An encoding unit that performs variable-length encoding on
An encoding device comprising:
前記決定部は、前記関数から得られる前記量子化パラメタ毎の前記最大の符号量と、前記受信バッファの占有符号量により求まる前記割り当て符号量と、に基づいて前記量子化パラメタを決定する請求項1に記載の符号化装置。The determination unit determines the quantization parameter based on the maximum code amount for each quantization parameter obtained from the function and the allocated code amount obtained from the occupied code amount of the reception buffer. The encoding device according to 1.
前記符号化部は、前記決定部により決定された前記量子化パラメタが大きいほど、前記選択部により選択された可変長符号化テーブルに対応する分散よりも小さい分散に対応する可変長符号化テーブルを選択し、
前記取得部が取得する関数は、一次関数である請求項2に記載の符号化装置。 The variable length coding table selected by the coding unit is a table based on Golomb rice code,
The coding unit corresponds to a variable length coding table corresponding to a smaller variance than a variance corresponding to the variable length coding table selected by the selection unit as the quantization parameter determined by the determination unit is larger. selected,
The encoding device according to claim 2 , wherein the function acquired by the acquisition unit is a linear function .
前記関数は、前記量子化パラメタの一次式で表される請求項2に記載の符号化装置。 The quantization width of the quantization by the quantization unit is an exponential function of the quantization parameter,
The function number, the encoding apparatus according to claim 2 represented by a linear equation of the quantization parameter.
前記符号化部は、前記選択部により、以前に選択した可変長符号化テーブルが選択された場合、以前に符号化に用いた可変長符号化テーブルによって、前記量子化値に対して可変長符号化を行う請求項1に記載の符号化装置。 The selection unit may perform variable length coding previously selected when a difference between the value indicating the characteristic of the input signal and the value of the characteristic corresponding to the previously selected variable length coding table is less than a predetermined threshold. Select the table again,
If the variable length coding table previously selected is selected by the selection section, the coding section performs variable length coding on the quantized value according to the variable length coding table previously used for coding. The coding apparatus according to claim 1, wherein
前記決定部は、前記量子化パラメタ毎の前記最大の符号量と、前記差分と、前記受信バッファの占有符号量により求まる前記割り当て符号量と、に基づいて前記量子化パラメタを決定する請求項9に記載の符号化装置。 The acquisition unit is based on the maximum code amount corresponding to the reselected variable length coding table and the characteristics of the input signal when the variable length coding table previously selected by the selection unit is selected again. and it acquired the difference between the maximum code amount corresponding to the variable length coding table,
The determination unit determines the quantization parameter on the basis of the maximum code amount for each quantization parameter, the difference, and the allocated code amount determined by the occupied code amount of the reception buffer. The encoding device according to claim 1.
前記入力信号の特性に基づいて、2以上の可変長符号化テーブルの中から1の可変長符号化テーブルを選択する選択ステップと、
選択した可変長符号化テーブルに応じて、前記量子化パラメタ毎に発生しうる最大の符号量を取得する取得ステップと、
前記量子化パラメタ毎の前記最大の符号量と、受信バッファの占有符号量により求まる割り当て符号量と、に基づいて前記量子化パラメタを決定する決定ステップと、
決定した前記量子化パラメタを用いて、前記入力信号を量子化して前記量子化値を求める量子化ステップと、
決定した前記量子化パラメタに基づいて、前記2以上の可変長符号化テーブルの中から1の可変長符号化テーブルを選択し、該可変長符号化テーブルによって、前記量子化値に対して可変長符号化を行う符号化ステップと、
を有する符号化方法。 A coding method of a coding apparatus for performing variable-length coding on a quantized value obtained by quantizing an input signal based on a quantization parameter, comprising:
A selection step of selecting one variable length coding table from among two or more variable length coding tables based on characteristics of the input signal;
An acquiring step of acquiring a maximum code amount that may be generated for each of the quantization parameters according to the selected variable length coding table;
A determination step of determining the quantization parameter based on the maximum code amount for each quantization parameter and an allocated code amount determined by an occupied code amount of the reception buffer;
Quantizing the input signal using the determined quantization parameter to obtain the quantization value;
Based on the determined quantization parameter, one variable-length coding table is selected from the two or more variable-length coding tables, and the variable-length coding table is used to change the variable length of the quantization value. An encoding step for performing encoding;
Encoding method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016051278A JP6549057B2 (en) | 2016-03-15 | 2016-03-15 | Encoding apparatus and encoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016051278A JP6549057B2 (en) | 2016-03-15 | 2016-03-15 | Encoding apparatus and encoding method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017168985A JP2017168985A (en) | 2017-09-21 |
JP6549057B2 true JP6549057B2 (en) | 2019-07-24 |
Family
ID=59913564
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016051278A Active JP6549057B2 (en) | 2016-03-15 | 2016-03-15 | Encoding apparatus and encoding method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6549057B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63284974A (en) * | 1987-05-15 | 1988-11-22 | Matsushita Electric Works Ltd | Picture compression system |
JPH0541860A (en) * | 1991-08-05 | 1993-02-19 | Oki Electric Ind Co Ltd | Picture compression coder |
JPH08205150A (en) * | 1995-01-26 | 1996-08-09 | Nippon Telegr & Teleph Corp <Ntt> | Image signal encoding device |
JP4264535B2 (en) * | 2003-02-04 | 2009-05-20 | ソニー株式会社 | Image processing apparatus and method, recording medium, and program |
JP5221430B2 (en) * | 2009-03-24 | 2013-06-26 | 株式会社東芝 | Image compression apparatus and image expansion apparatus |
-
2016
- 2016-03-15 JP JP2016051278A patent/JP6549057B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017168985A (en) | 2017-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5045950B2 (en) | Video encoding method, video encoding apparatus, and video encoding program | |
JP5365518B2 (en) | Image processing apparatus and method | |
US7304590B2 (en) | Arithmetic decoding apparatus and method | |
US7688234B2 (en) | Coding apparatus, coding method, program for executing the method, and recording medium storing the program | |
US9363517B2 (en) | Indexed color history in image coding | |
US20120219055A1 (en) | Methods and devices for data compression using offset-based adaptive reconstruction levels | |
JP5524072B2 (en) | Video encoding device | |
US8374451B2 (en) | Image processing device and image processing method for reducing the circuit scale | |
US20120250758A1 (en) | Method and apparatus for frame memory compression | |
TWI827010B (en) | Arithmetic encoders, arithmetic decoders, video encoder, video decoder, methods for encoding, methods for decoding and computer program | |
TWI721396B (en) | Video decoder, video encoder, method for decoding a video content, method for encoding a video content, computer program and video bitstream | |
WO2009157579A1 (en) | Image processing device and image processing method | |
JP6476900B2 (en) | Moving picture coding apparatus, moving picture coding method, and computer program for moving picture coding | |
US9596462B2 (en) | Image processing apparatus, method, and medium with feedback control and quantization search | |
JP5231243B2 (en) | Encoding apparatus and encoding method | |
CN104125460A (en) | Method and apparatus for controlling video bitrates | |
US20140270554A1 (en) | Image encoding apparatus and image decoding apparatus | |
US11412241B2 (en) | Decoding or encoding delta transform coefficients | |
JP6549057B2 (en) | Encoding apparatus and encoding method | |
JP2011023922A (en) | Image coding apparatus and program thereof | |
US20220109891A1 (en) | Features of range asymmetric number system encoding and decoding | |
US20130279818A1 (en) | Image encoding apparatus and method, image decoding apparatus and method, and non-transitory computer readable medium | |
JP5632328B2 (en) | Code amount prediction apparatus and program | |
US9485509B2 (en) | Image compression device, image compression method, image decompression device, and image decompression method | |
JP4911052B2 (en) | Image processing apparatus, image processing method, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190221 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190226 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190507 |
|
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: 20190528 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190626 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6549057 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |