JP2009177353A - Encoder, method of controlling the same, and computer program - Google Patents

Encoder, method of controlling the same, and computer program Download PDF

Info

Publication number
JP2009177353A
JP2009177353A JP2008011928A JP2008011928A JP2009177353A JP 2009177353 A JP2009177353 A JP 2009177353A JP 2008011928 A JP2008011928 A JP 2008011928A JP 2008011928 A JP2008011928 A JP 2008011928A JP 2009177353 A JP2009177353 A JP 2009177353A
Authority
JP
Japan
Prior art keywords
macroblock
quantization
quantization parameter
encoding
variance
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.)
Granted
Application number
JP2008011928A
Other languages
Japanese (ja)
Other versions
JP5111128B2 (en
JP2009177353A5 (en
Inventor
Fumitaka Nakayama
文貴 中山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2008011928A priority Critical patent/JP5111128B2/en
Publication of JP2009177353A publication Critical patent/JP2009177353A/en
Publication of JP2009177353A5 publication Critical patent/JP2009177353A5/ja
Application granted granted Critical
Publication of JP5111128B2 publication Critical patent/JP5111128B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an encoder for suppressing deterioration in image quality in the boundary of an object by simple processing and a small bus rate. <P>SOLUTION: The encoder divides an image into a plurality of macroblocks for encoding. The encoder has: a generation means for generating a setting instruction for designating a quantization parameter for each of the plurality of macroblocks; a decision means for deciding the quantization parameters of macroblocks based on the setting instruction generated by the generation means; a conversion means for performing orthogonal transformation of the macroblocks and quantization using the decided quantization parameters; and an encoding means for subjecting the result of the conversion means to variable length encoding. The encoder calculates dispersion for a subblock composing the macroblocks, and generates the setting instruction of the quantization parameters based on the dispersion of the subblocks composing the macroblocks and that of the subblocks adjacent to the macroblocks. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、符号化装置、符号化装置の制御方法及びコンピュータプログラムに関する。   The present invention relates to an encoding apparatus, an encoding apparatus control method, and a computer program.

近年のマルティメディアの発展に伴い様々な動画像圧縮符号化方式が提案されている。その代表的なものに、MPEG−1,2,4やH.264といったものがある。これらの圧縮符号化の処理は、動画像に含まれる原画像(画像)をブロックと呼ばれる所定の領域に分割し、この分割したブロックを単位にして動き補償予測やDCT変換処理を施すものである。また、動き補償予測を行う場合、既に符号化済みの画像データを局所復号化して得られた画像を参照画像としていることで、符号化を行う際にも復号化処理が必要となる。   With the recent development of multimedia, various video compression encoding methods have been proposed. Typical examples are MPEG-1, 2, 4 and H.264. There is something like H.264. In these compression encoding processes, an original image (image) included in a moving image is divided into predetermined regions called blocks, and motion compensation prediction and DCT conversion processing are performed in units of the divided blocks. . In addition, when performing motion compensation prediction, an image obtained by local decoding of already encoded image data is used as a reference image, so that a decoding process is required even when encoding is performed.

また、MPEG方式に準拠して画像の圧縮、符号化を行う場合、その符号量は、画像自体の特性である空間周波数特性やシーン及び量子化スケール値に応じて大きく異なる場合が多い。このような符号化特性を有する符号化装置を実現する上で良好な画質の復号画像を得ることができるようにするための重要な技術が符号量制御である。   In addition, when compressing and encoding an image in accordance with the MPEG system, the amount of code often varies greatly depending on the spatial frequency characteristics, which are characteristics of the image itself, the scene, and the quantization scale value. An important technique for realizing a decoded image with good image quality in realizing an encoding apparatus having such encoding characteristics is code amount control.

この符号量制御アルゴリズムの1つとして、TM5(Test Model 5)が一般的に使用されている。このTM5による符号量制御アルゴリズムは、以下に説明する3つのステップから構成され、GOP(Group Of Picture)毎にビットレートが一定になるように以下に挙げる3ステップで符号量が制御される。   TM5 (Test Model 5) is generally used as one of the code amount control algorithms. The code amount control algorithm according to TM5 is composed of the following three steps, and the code amount is controlled in the following three steps so that the bit rate is constant for each GOP (Group Of Picture).

(STEP1)
今から符号化を行うピクチャの目標符号量を決定する。現在のGOPにおいて利用可能な符号量であるRgopが以下の(1)式により演算される。
Rgop = (ni+np+nb)*(bits_rate/picture_rate) ・・・(1)
ここで、ni,np,nbはそれぞれI、P、Bピクチャの現GOPにおける残りのピクチャ数であり、bits_rateは目標ビットレート、picture_rateはピクチャレートを表す。
(STEP1)
The target code amount of the picture to be encoded from now is determined. Rgop, which is a code amount that can be used in the current GOP, is calculated by the following equation (1).
Rgop = (ni + np + nb) * (bits_rate / picture_rate) (1)
Here, ni, np, and nb are the number of remaining pictures in the current GOP of I, P, and B pictures, bits_rate represents the target bit rate, and picture_rate represents the picture rate.

更に、I、P、Bピクチャ毎に符号化結果からピクチャの複雑度を以下の(2)式で求めている。
Xi = Ri*Qi
Xp = Rp*Qp ・・・(2)
Xb = Rb*Qb
ここで、Xi、Xp、Xbはコンプレキシティ(Complexity)とも呼ばれる。また、Ri、Rp及びRbはそれぞれI、P、Bピクチャを符号化した結果得られる符号量である。さらに、Qi、Qp及びQbはそれぞれI、P、Bピクチャ内のすべてのマクロブロックにおけるQスケールの平均値である。式(1)及び式(2)から、I、P、Bピクチャそれぞれについての目標符号量Ti、Tp及びTbは、以下の(3)式で求めることができる。 Ti= max{(Rgop/(1+ ((Np*Xp)/(Xi*Kp)) + ((Nb*Xb)/(Xi*Kb)))) , (bit_rate/(8*picture_rate))}
Tp=max{(Rgop/(Np+ (Nb*Kp*Xb)/(Kb*Xp))) , (bit_rate/(8*picture_rate))}
Tb=max{(Rgop/(Nb+ (Np*Kb*Xp)/(Kp*Xb))) , (bit_rate/(8*picture_rate))}
・・・(3)
ただし、Np及びNbは現GOP内のそれぞれP及びBピクチャの残りの枚数、また定数Kp=1.0及びKb=1.4である。
Further, the complexity of the picture is obtained from the encoding result for each of the I, P, and B pictures by the following equation (2).
Xi = Ri * Qi
Xp = Rp * Qp (2)
Xb = Rb * Qb
Here, Xi, Xp, and Xb are also called complexity. Ri, Rp, and Rb are code amounts obtained as a result of encoding I, P, and B pictures, respectively. Further, Qi, Qp and Qb are average values of Q scales in all macroblocks in the I, P and B pictures, respectively. From the equations (1) and (2), the target code amounts Ti, Tp, and Tb for each of the I, P, and B pictures can be obtained by the following equation (3). Ti = max {(Rgop / (1 + ((Np * Xp) / (Xi * Kp)) + ((Nb * Xb) / (Xi * Kb)))), (bit_rate / (8 * picture_rate))}
Tp = max {(Rgop / (Np + (Nb * Kp * Xb) / (Kb * Xp))), (bit_rate / (8 * picture_rate))}
Tb = max {(Rgop / (Nb + (Np * Kb * Xp) / (Kp * Xb))), (bit_rate / (8 * picture_rate))}
... (3)
Np and Nb are the remaining number of P and B pictures in the current GOP, respectively, and constants Kp = 1.0 and Kb = 1.4.

(STEP2)
I、P及びBピクチャ毎に3つの仮想バッファを使用し、式(3)で求めた目標符号量と発生符号量との差分を管理する。仮想バッファのデータ蓄積量をフィードバックし、そのデータ蓄積量に基づいて実際の発生符号量が目標符号量に近づくように、次にエンコードするマクロブロックについて、Qスケールの参照値が設定される。例えば、現在のピクチャタイプがPピクチャの場合には、目標符号量と発生符号量との差分は、次の(4)式に従う演算処理により求めることができる。
(STEP2)
Three virtual buffers are used for each of the I, P, and B pictures, and the difference between the target code amount and the generated code amount obtained by Expression (3) is managed. The data accumulation amount of the virtual buffer is fed back, and the reference value of the Q scale is set for the macroblock to be encoded next so that the actual generated code amount approaches the target code amount based on the data accumulation amount. For example, when the current picture type is a P picture, the difference between the target code amount and the generated code amount can be obtained by arithmetic processing according to the following equation (4).

dp,j = dp,0 + Bp,j-1 −((Tp*(j-1))/MB_cnt) ・・・(4)
ここで、添字jはピクチャ内のマクロブロックの番号であり、dp,0は仮想バッファの初期フルネスを示し、Bp,jはj番目のマクロブロックまでの総符号量、MB_cntはピクチャ内のマクロブロック数を示す。次にdp,j(以後、「dj」と記載する。) を用いて、j番目のマクロブロックにおけるQスケールの参照値を求めると、(5)式のようになる。
dp, j = dp, 0 + Bp, j−1 − ((Tp * (j−1)) / MB_cnt) (4)
Here, the subscript j is the number of the macroblock in the picture, dp, 0 indicates the initial fullness of the virtual buffer, Bp, j is the total code amount up to the jth macroblock, and MB_cnt is the macroblock in the picture Indicates a number. Next, when the reference value of the Q scale in the j-th macroblock is obtained using dp, j (hereinafter referred to as “dj”), equation (5) is obtained.

Qj = (dj*31) / r ・・・(5)
ここで、r = 2*bits_rate/picture_rate ・・・(6)
である。
Qj = (dj * 31) / r (5)
Where r = 2 * bits_rate / picture_rate (6)
It is.

(STEP3)
視覚特性、即ち、復号画像の画質が良好になるように、エンコード対象のマクロブロックの空間アクティビティに基づいて、量子化スケールを最終的に決定する処理を実行する。
(STEP3)
A process of finally determining the quantization scale is executed based on the spatial activity of the macroblock to be encoded so that the visual characteristics, that is, the image quality of the decoded image is improved.

ACTj = 1+ min(vblk1, vblk2,……,vblk8) ・・・(7)
(7)式中において、vblk1〜vblk4はフレーム構造のマクロブロックにおける8x8のサブブロックにおける空間アクティビティを示す。また、vblk5〜vblk8はフィールド構造のマクロブロックにおける8×8サブブロックの空間アクティビティを示す。ここで、空間アクティビチィの演算は次の(8)、(9)式により求めることが可能である。
vblk = Σ(Pi−Pbar)2 ・・・(8)
Pbar = (1/64 )* ΣPi ・・・(9)
ここで、Piはi番目のマクロブロックにおける画素値であり、式(8)、(9)中のΣはi=1〜64の演算である。次に(7)式で求めたACTjを以下の(10)式によって正規化を行う。
ACTj = 1+ min (vblk1, vblk2, ..., vblk8) (7)
In the equation (7), vblk1 to vblk4 indicate spatial activities in 8 × 8 sub-blocks in the macroblock of the frame structure. Further, vblk5 to vblk8 indicate spatial activities of 8 × 8 sub-blocks in the field-structure macroblock. Here, the calculation of the space activity can be obtained by the following equations (8) and (9).
vblk = Σ (Pi−Pbar) 2 (8)
Pbar = (1/64) * ΣPi (9)
Here, Pi is a pixel value in the i-th macroblock, and Σ in equations (8) and (9) is an operation of i = 1 to 64. Next, ACTj obtained by the equation (7) is normalized by the following equation (10).

N_ACTj = (2*ACTj +AVG_ACT)/ (ACTj + AVG_ACT) ・・・(10)
ここで、AVG_ACTは以前に符号化したピクチャにおけるACTjの参照値であり、最終的に量子化スケール(Qスケール値)MQUANTjは以下の(11)式により求められる。
N_ACTj = (2 * ACTj + AVG_ACT) / (ACTj + AVG_ACT) (10)
Here, AVG_ACT is a reference value of ACTj in a previously encoded picture, and finally a quantization scale (Q scale value) MQUANTj is obtained by the following equation (11).

MQUANTj = Qj * N_ACTj ・・・(11)
以上のTM5のアルゴリズムによれば、STEP1の処理によりIピクチャに対して多くの符号量を割り当ており、更にピクチャ内においては視覚的に劣化の目立ちやすい平坦部(空間アクティビティが低い)に符号量が多く配分されるようになる。よって、予め定めたビットレート内で、画質の劣化を抑えた符号量制御ならびに量子化制御を行うことが可能となる。
MQUANTj = Qj * N_ACTj (11)
According to the above TM5 algorithm, a large amount of code is allocated to the I picture by the processing of STEP1, and the code amount is in a flat portion (low spatial activity) that is visually noticeable in the picture. A lot will be allocated. Therefore, it is possible to perform code amount control and quantization control while suppressing deterioration in image quality within a predetermined bit rate.

また、TM5と同様に画像の特徴に応じて量子化制御を行う手法は他にも提案されており、視覚的向上を実現できている(例えば、特許文献1参照)。
特開2005−323312号公報
Also, other techniques for performing quantization control according to image characteristics as in TM5 have been proposed, and visual improvement can be realized (see, for example, Patent Document 1).
JP 2005-323312 A

前述したTM5方式は、マクロブロック単位で特徴を抽出し、その特徴に基づいて量子化パラメータを変化させることで、あらかじめ定められた目標符号量になるような量子化制御を行っている。   The TM5 method described above performs quantization control so as to obtain a predetermined target code amount by extracting features in units of macroblocks and changing quantization parameters based on the features.

しかしながら、分散が高い画像には物体の境界といった人間の視覚的に目立ちやすい領域も含んでいるため、そのような領域に対して量子化を粗くしてしまうと物体の境界部分で視覚的な劣化が発生してしまうという問題がある。   However, since images with high dispersion include areas that are visually noticeable to humans, such as object boundaries, if the quantization is coarsened for such areas, visual degradation will occur at the object boundary. There is a problem that occurs.

また、特許文献1における手法も同様な課題に対する解決策を提示してあるが、符号化に先立って量子化パラメータの対応付けを行っているので処理量やバスレートが高くなるといった問題が存在する。   The method in Patent Document 1 also presents a solution to the same problem, but there is a problem that the processing amount and the bus rate increase because the quantization parameter is associated prior to encoding. .

本発明は、上述した問題点に鑑みたものであり、簡単な処理と少ないバスレートで物体の境界における画質劣化を抑えることを可能にした符号化装置を提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an encoding apparatus that can suppress image quality deterioration at an object boundary with simple processing and a low bus rate.

上記課題を解決するための本発明は、画像を複数のマクロブロックに分割して符号化を行う符号化装置であって、
前記複数のマクロブロックのそれぞれについて、量子化に用いる量子化パラメータを指定する設定指示を生成する生成手段と、
前記生成手段により生成された前記設定指示に基づいて、前記マクロブロックの量子化パラメータを決定する決定手段と、
前記マクロブロックの直交変換と、決定された前記量子化パラメータを用いた量子化とを行う変換手段と、
前記変換手段による変換結果を、可変長符号化する符号化手段と、
を備え、
前記生成手段は、前記マクロブロックを構成するサブブロックについて分散を算出し、前記マクロブロックを構成するサブブロックの分散と、該マクロブロックに隣接するサブブロックの分散とに基づいて、前記量子化パラメータの設定指示を生成することを特徴とする。
The present invention for solving the above-described problem is an encoding apparatus that performs encoding by dividing an image into a plurality of macroblocks,
Generating means for generating a setting instruction for specifying a quantization parameter used for quantization for each of the plurality of macroblocks;
Determining means for determining a quantization parameter of the macroblock based on the setting instruction generated by the generating means;
Transform means for performing orthogonal transformation of the macroblock and quantization using the determined quantization parameter;
Encoding means for variable-length encoding the conversion result by the conversion means;
With
The generating means calculates a variance for subblocks constituting the macroblock, and based on the variance of subblocks constituting the macroblock and the variance of subblocks adjacent to the macroblock, the quantization parameter A setting instruction is generated.

本発明によれば、簡単な処理と少ないバスレートで物体の境界における画質劣化を抑えることを可能にした符号化装置を提供することができる。   According to the present invention, it is possible to provide an encoding apparatus capable of suppressing image quality deterioration at an object boundary with simple processing and a low bus rate.

以下、添付する図面を参照して発明の実施形態を説明する。   Embodiments of the invention will be described below with reference to the accompanying drawings.

[第1の実施形態]
第1の実施形態を図1、図2に基づいて説明する。図1は第1の実施形態おける全体システム構成図であり、図2は特徴抽出を説明する図である。
[First Embodiment]
A first embodiment will be described with reference to FIGS. FIG. 1 is an overall system configuration diagram in the first embodiment, and FIG. 2 is a diagram for explaining feature extraction.

図1において、入力信号101は符号化装置への入力信号であり、所定の複数のブロックに分割された状態で入力される。該ブロックは、例えばMPEGでは16×16、8×8を始めとしたブロックであり符号化方式に応じてサイズが決まる。なお今後説明の中でマクロブロックと呼ぶこととする。   In FIG. 1, an input signal 101 is an input signal to an encoding device, and is input in a state of being divided into a plurality of predetermined blocks. The block is, for example, a block such as 16 × 16 or 8 × 8 in MPEG, and the size is determined according to the encoding method. In the following description, it will be called a macroblock.

符号化装置は、また、加減算部102、直交変換(DCT)部103、量子化部104、逆量子化部105、逆直交変換(逆DCT)部106、動き推定部107、動き補償部108、フレームメモリ109、可変長符号化部110を備える。さらに、量子化制御部112、特徴抽出部113を備え、出力信号116を出力する。   The encoding apparatus also includes an addition / subtraction unit 102, an orthogonal transform (DCT) unit 103, a quantization unit 104, an inverse quantization unit 105, an inverse orthogonal transform (inverse DCT) unit 106, a motion estimation unit 107, a motion compensation unit 108, A frame memory 109 and a variable length encoding unit 110 are provided. Further, a quantization control unit 112 and a feature extraction unit 113 are provided, and an output signal 116 is output.

本符号化装置の動作を説明する。複数のブロックに分割された入力信号101は、符号化ピクチャがフレーム内符号化(イントラ符号化)ピクチャの時は、直交変換部103においてマクロブロック内の信号に対して直交変換処理を行う。そして、量子化部104で、直交変換部103での変換結果としてのDCT係数を量子化する。   The operation of this encoding apparatus will be described. The input signal 101 divided into a plurality of blocks is subjected to orthogonal transform processing on the signals in the macroblock in the orthogonal transform unit 103 when the coded picture is an intra-frame coded (intra coded) picture. Then, the quantization unit 104 quantizes the DCT coefficient as the transformation result in the orthogonal transformation unit 103.

また、符号化ピクチャがフレーム間符号化ピクチャ(インター符号化)ピクチャの時は、符号化されたピクチャに対して逆量子化部105で逆量子化、逆直交変換部106で逆直交変換処理を行ったローカルデコード画像が作成される。そして、符号化対象のピクチャとの動き推定を動き推定部107で、動き補償を動き補償部108で行い、ローカルデコード画像との差分値を加減算部102で算出する。差分値は、直交変換部103においてマクロブロック内の信号に対して直交変換処理を行い、量子化部104でDCT係数を量子化する。   When the encoded picture is an inter-frame encoded picture (inter-coded) picture, the inverse quantization unit 105 performs inverse quantization on the encoded picture, and the inverse orthogonal transform unit 106 performs inverse orthogonal transform processing. The performed local decoded image is created. Then, motion estimation with the coding target picture is performed by the motion estimation unit 107, motion compensation is performed by the motion compensation unit 108, and a difference value from the local decoded image is calculated by the addition / subtraction unit 102. The difference value is subjected to orthogonal transformation processing on the signal in the macroblock in the orthogonal transformation unit 103, and the quantization unit 104 quantizes the DCT coefficient.

フレーム内符号化、フレーム間符号化に関わらず量子化部104で量子化された量子化信号は可変長符号化部110で符号化が行われ符号化された信号が出力信号116として出力される。   Regardless of intra-frame coding or inter-frame coding, the quantized signal quantized by the quantizing unit 104 is encoded by the variable-length encoding unit 110, and the encoded signal is output as the output signal 116. .

次に、符号量制御部111、量子化制御部112について説明する。符号量制御部111は、GOP内の各ピクチャに対する割り当てビット量を、割り当て対象ピクチャを含めGOP内でまだ符号化されていないピクチャに対するビット量を基に配分する。この配分をGOP内の符号化ピクチャ順に繰り返し、ピクチャごとにピクチャ目標符号量を設定する。   Next, the code amount control unit 111 and the quantization control unit 112 will be described. The code amount control unit 111 distributes the allocated bit amount for each picture in the GOP based on the bit amount for a picture that has not been encoded in the GOP including the allocation target picture. This distribution is repeated in the order of the encoded pictures in the GOP, and a picture target code amount is set for each picture.

次に、量子化制御部112は、各ピクチャに対する目標符号量と実際の発生符号量とを一致させるため、仮想バッファの容量を基に、量子化スケールの参照値を求める。より具体的に、可変長符号化部110から出力されるマクロブロック単位の発生符号量としてフィードバック制御で求める。量子化部104で使用する量子化パラメータは、量子化スケールの参照値に対して特徴抽出部113からの量子化パラメータの設定指示をもとに式(11)を用いて決定される。なお以上の動作は背景技術で述べたステップ1〜3に相当する。   Next, the quantization control unit 112 obtains a quantization scale reference value based on the capacity of the virtual buffer in order to match the target code amount for each picture with the actual generated code amount. More specifically, the amount of generated code for each macroblock output from the variable length coding unit 110 is obtained by feedback control. The quantization parameter used in the quantization unit 104 is determined using Expression (11) based on the quantization parameter setting instruction from the feature extraction unit 113 with respect to the reference value of the quantization scale. The above operation corresponds to steps 1 to 3 described in the background art.

ここで、特徴抽出部113の動作を、図2を用いて詳細に説明する。図2において、太枠で囲んだ領域200は符号化対象マクロブロックである。また、領域201から204は、マクロブロック200を構成するサブブロックであり、マクロブロックが16×16であればサブブロックは8×8となる。   Here, the operation of the feature extraction unit 113 will be described in detail with reference to FIG. In FIG. 2, a region 200 surrounded by a thick frame is a macroblock to be encoded. Regions 201 to 204 are subblocks constituting the macroblock 200. If the macroblock is 16 × 16, the subblock is 8 × 8.

特徴抽出部113は、高周波成分を多く含む領域のための第1の種別の量子化パラメータと、平坦部やエッジ部を含む領域のための第2の種別の量子化パラメータとのいずれかを指定した設定指示を生成する。ここで、第1の種別の量子化パラメータと、第2の種別の量子化パラメータとでは量子化スケールが異なり、第2の種別の量子化パラメータの方が量子化スケールがより小さく設定されるようになっている。   The feature extraction unit 113 designates either the first type of quantization parameter for a region containing a lot of high-frequency components or the second type of quantization parameter for a region containing a flat part or an edge part. Generated setting instructions. Here, the first type of quantization parameter and the second type of quantization parameter have different quantization scales, and the second type of quantization parameter is set to have a smaller quantization scale. It has become.

領域205から212は、符号化対象マクロブロック200に隣接するサブブロックであり、サブブロック201から204と同じサイズである。また図2は、色づけされた部分はテクスチャのような視覚的劣化が目立ちにくい領域を示す。また、色づけされていない部分は平坦のような視覚的劣化が目立ちやすい領域を示す。よって、符号化対象マクロブロック200には、視覚的劣化が目立ちやすいエッジが存在することを表している。   Regions 205 to 212 are subblocks adjacent to the encoding target macroblock 200 and have the same size as the subblocks 201 to 204. Further, FIG. 2 shows an area where the colored portion is hardly noticeable visually such as a texture. In addition, the uncolored portion indicates a region where visual deterioration such as flatness is easily noticeable. Therefore, this indicates that the encoding target macroblock 200 has an edge where visual degradation is conspicuous.

特徴抽出部113は、符号化対象マクロブロック200に含まれる201から204の各サブブロックについて、複雑さである分散を算出する。ここで、分散値とは、ブロック内における画素値のバラツキ度合いを示す値である。例えば、サブブロック内の画素値がほぼ等しい場合は分散は小さくなる。一方、サブブロック内の画素値のバラツキが大きい場合は、分散が大きくなる。また、画素値のレベルが低い値を取るほど、ブロック内の画素値の分散が少なくなり、該ブロックが平坦画像の傾向が高いことを示す。   The feature extraction unit 113 calculates the variance that is complexity for each of the sub-blocks 201 to 204 included in the encoding target macroblock 200. Here, the variance value is a value indicating the degree of variation in pixel values within a block. For example, when the pixel values in the sub-block are almost equal, the variance is small. On the other hand, when the variation in pixel values in the sub-block is large, the variance is large. Further, the lower the pixel value level, the smaller the variance of the pixel values in the block, indicating that the block has a higher tendency for a flat image.

また、符号化対象マクロブロック200に隣接するサブブロック205から212に対しても分散を算出する。なお、画像を左上からラスタ順で処理していくものとすれば、205から210は既に符号化が終了したマクロブロックに含まれるサブブロックであるので、符号化時に分散を保持しておけば再計算する必要はない。サブブロック211、212は符号化が終了してないので先読みを行って計算しておく必要がある。   Also, the variance is calculated for the subblocks 205 to 212 adjacent to the encoding target macroblock 200. If the image is to be processed in raster order from the upper left, 205 to 210 are sub-blocks included in a macroblock that has already been encoded. There is no need to calculate. Since the sub-blocks 211 and 212 have not been encoded, it is necessary to perform pre-reading and calculation.

サブブロック201から212の分散値の中から最小値を決定し、その最小値が予め定められた閾値(後述する第2の閾値Th2)より小さい場合、符号化対象マクロブロック200は視覚的劣化が目立ち易い平坦かエッジの可能性があると判断される。なお、平坦とエッジを分離する必要があれば、サブブロック201から204の分散値がすべて小さいものは平坦、それ以外はエッジとして判断すればよい。   When the minimum value is determined from the variance values of the sub-blocks 201 to 212 and the minimum value is smaller than a predetermined threshold value (second threshold value Th2 described later), the encoding target macroblock 200 is visually degraded. It is determined that there is a possibility of a noticeable flatness or an edge. If it is necessary to separate the flat and the edge, it is possible to determine that all of the dispersion values of the sub-blocks 201 to 204 are small and that the other is an edge.

また、算出されたサブブロック201から212の分散値について最大値と最小値とを決定し、該最大値と最小値との差が所定の閾値(後述する第1の閾値Th1)以上であれば、符号化対象マクロブロック200を、エッジ部分と判定できる。   Further, the maximum value and the minimum value are determined for the calculated dispersion values of the sub-blocks 201 to 212, and if the difference between the maximum value and the minimum value is equal to or greater than a predetermined threshold (first threshold Th1 described later) The encoding target macroblock 200 can be determined as the edge portion.

TM5のように、符号化対象マクロブロック200に含まれるサブブロック201から204の分散だけで判断する手法では、符号化対象マクロブロック200は視覚的劣化の目立ちにくいテクスチャと誤判定する可能性がある。これに対して、本実施形態のように符号化対象マクロブロック200に隣接するサブブロックの分散も加味することで、誤判定を起こさず正確にエッジを捉えることが可能となる。   With a technique such as TM5, in which the determination is made only by the distribution of the sub-blocks 201 to 204 included in the encoding target macroblock 200, there is a possibility that the encoding target macroblock 200 is erroneously determined as a texture that is not easily noticeable visually. . On the other hand, by taking into account the dispersion of subblocks adjacent to the encoding target macroblock 200 as in the present embodiment, it is possible to accurately capture an edge without causing erroneous determination.

このようにエッジと判断されたブロックは視覚的劣化が目立ちやすいブロックであるため、第2の種別の量子化パラメータを設定するような指示を量子化制御部112へ送る。情報の送信形式はアクティビティと同じでよい。また、符号化対象マクロブロックが平坦と判断された場合も、第2の種別の量子化パラメータを指定した設定指示を量子化制御部112へ送る。   Since the block determined to be an edge in this manner is a block in which visual degradation is conspicuous, an instruction to set the second type of quantization parameter is sent to the quantization control unit 112. The information transmission format may be the same as the activity. Also, even when it is determined that the encoding target macroblock is flat, a setting instruction specifying the second type of quantization parameter is sent to the quantization control unit 112.

一方、サブブロック201から212の分散値の最小値が第2の閾値以上である場合、マクロブロックは視覚的劣化が目立ちにくい、高周波成分を多く含むブロックと判断できる。そこで、量子化スケールがより大きな第1の種別の量子化パラメータを設定するような指示を量子化制御部112へ送る。   On the other hand, when the minimum value of the variance values of the sub-blocks 201 to 212 is equal to or greater than the second threshold value, it can be determined that the macroblock is a block containing a lot of high-frequency components that is hardly visually degraded. Therefore, an instruction to set the first type of quantization parameter having a larger quantization scale is sent to the quantization control unit 112.

図3は、以上の量子化パラメータの決定処理の一例を示すフローチャートである。以下、図3のフローチャートに対応した処理の流れを説明する。当該処理は、対応する処理プログラムを特徴抽出部113が実行することにより実現される。   FIG. 3 is a flowchart showing an example of the quantization parameter determination process described above. Hereinafter, the flow of processing corresponding to the flowchart of FIG. 3 will be described. This processing is realized by the feature extraction unit 113 executing a corresponding processing program.

まず、ステップS301では、処理対象マクロブロックを選択する。図2では、該処理対象マクロブロックとしてマクロブロック200を選択することとなる。次に、ステップS302では、選択されたマクロブロックに隣接するサブブロックを決定する。図2の場合では、マクロブロック200に隣接するサブブロック205乃至212が隣接サブブロックに決定される。   First, in step S301, a processing target macroblock is selected. In FIG. 2, the macro block 200 is selected as the processing target macro block. Next, in step S302, a subblock adjacent to the selected macroblock is determined. In the case of FIG. 2, subblocks 205 to 212 adjacent to the macroblock 200 are determined as adjacent subblocks.

次に、ステップS303では、マクロブロックに含まれるサブブロックと、ステップS303で決定されたサブブロックの分散を算出する。図2の例では、サブブロック201から212の分散がそれぞれ算出されることとなる。続くステップS304では、算出されたサブブロックの分散について、最小値と最大値とを決定する。また、最大値と最小値との差分を算出する。   Next, in step S303, the variance of the subblock included in the macroblock and the subblock determined in step S303 is calculated. In the example of FIG. 2, the variances of the sub-blocks 201 to 212 are calculated. In subsequent step S304, a minimum value and a maximum value are determined for the calculated distribution of sub-blocks. Also, the difference between the maximum value and the minimum value is calculated.

続くステップS305では、ステップS304で算出した差分が第1の閾値Th1よりも大きいか否かを判定する。もし、該差分が第1の閾値Th1よりも大きい場合は(ステップS305において「YES」)、ステップS307に移行する。一方、該差分が第1の閾値Th1以下の場合は(ステップS305において「NO」)、ステップS306に移行する。   In a succeeding step S305, it is determined whether or not the difference calculated in the step S304 is larger than the first threshold Th1. If the difference is larger than the first threshold Th1 (“YES” in step S305), the process proceeds to step S307. On the other hand, when the difference is equal to or smaller than the first threshold Th1 (“NO” in step S305), the process proceeds to step S306.

ステップS306では、ステップS304で決定した最小値が第2の閾値Th2よりも小さい否かを判定する。もし、該最小値が第2の閾値Th2よりも小さい場合は(ステップS306において「YES」)、ステップS307に移行する。一方、該最小値が閾値Th2以上の場合は(ステップS306において「NO」)、ステップS308に移行する。   In step S306, it is determined whether or not the minimum value determined in step S304 is smaller than the second threshold Th2. If the minimum value is smaller than the second threshold Th2 (“YES” in step S306), the process proceeds to step S307. On the other hand, when the minimum value is equal to or greater than the threshold Th2 (“NO” in step S306), the process proceeds to step S308.

ステップS307では、第2の種別の量子化パラメータを設定する指示を量子化制御部112へ送信し、処理を終える。ステップS308では、第1の種別の量子化パラメータを設定する指示を量子化制御部112へ送信し、処理を終える。   In step S307, an instruction to set the second type of quantization parameter is transmitted to the quantization control unit 112, and the process ends. In step S308, an instruction to set the first type of quantization parameter is transmitted to the quantization control unit 112, and the process ends.

なお、量子化パラメータの設定基準は、上述の説明内容に限定されるものではない。例えば、サブブロック201から204のいずれかのサブブロックの分散が第2の閾値よりも小さいと判断されたが、隣接サブブロック205から212の分散値が全て所定の第3の閾値より大きな値を算出していた場合も考えられる。ここで該第2の閾値よりも小さい分散を有するサブブロックは、テクスチャの中に存在する孤立した平坦部と判断でき、視覚的な劣化は目立ちにくいと言える。そこで、このような場合は、量子化パラメータを大きく設定するような指示を量子化制御部112へ送ることができる。   Note that the quantization parameter setting criteria are not limited to the above description. For example, it is determined that the variance of any of the sub-blocks 201 to 204 is smaller than the second threshold value, but the variance values of the adjacent sub-blocks 205 to 212 are all greater than the predetermined third threshold value. The case where it was calculated is also considered. Here, a sub-block having a variance smaller than the second threshold can be determined to be an isolated flat portion existing in the texture, and it can be said that visual deterioration is not noticeable. Therefore, in such a case, an instruction to set a large quantization parameter can be sent to the quantization control unit 112.

なお、上述の各閾値の具体的な値は、該値自体が本発明の本質的な技術的思想を構成するものではないので、特に限定しない。即ち、各閾値は発明の実施に際して当業者が好適な値に設定すればよく、係る値の設定自体は、当業者の通常の創作能力の範囲内の行為である。   The specific values of the above-mentioned threshold values are not particularly limited because the values themselves do not constitute the essential technical idea of the present invention. That is, each threshold value may be set to a suitable value by those skilled in the art when carrying out the invention, and the setting of the value itself is an action within the ordinary creative ability of those skilled in the art.

以上のように、第1の実施形態によれば、符号化対象マクロブロックと隣接するサブブロックの情報からエッジを含むブロックを検出し、そのようなブロックに対して量子化を細かくする量子化パラメータを決定することができる。これにより、視覚的劣化の目立ちやすいブロックに対する画質向上を行うことが可能となる。   As described above, according to the first embodiment, a quantization parameter for detecting a block including an edge from information of a sub-block adjacent to an encoding target macroblock and finely quantizing such a block. Can be determined. As a result, it is possible to improve the image quality of blocks that are prominent in visual deterioration.

[第2の実施形態]
次に、第2の実施形態を図4乃至図6に基づいて説明する。第2の実施形態は符号化処理をパイプライン化し、本発明による特徴抽出を効率良く行えるようにしたものである。図4は発明の第2の実施形態おける全体システム構成の一例を示す図である。図5は、発明の第2の実施形態におけるシステムの処理動作を説明するための図である。図6は図2と同様の図である。
[Second Embodiment]
Next, a second embodiment will be described with reference to FIGS. In the second embodiment, the encoding process is pipelined so that feature extraction according to the present invention can be performed efficiently. FIG. 4 is a diagram showing an example of the entire system configuration in the second embodiment of the invention. FIG. 5 is a diagram for explaining the processing operation of the system according to the second embodiment of the invention. FIG. 6 is a view similar to FIG.

図4は図1に対して処理のパイプライン化を考慮した構成となっている。入力信号401は符号化装置への入力信号でありマクロブロックに分割されて入力される。
符号化装置は、加減算部402、直交変換(DCT)部403、量子化部404、逆量子化部405、逆直交変換(逆DCT)部406、動き推定部407、動き補償部408、フレームメモリ409を備えて構成される。また、可変長符号化部410、符号量制御部411、量子化制御部412、特徴抽出部413、414及び415を備え、出力信号416を出力する。
FIG. 4 has a configuration in which processing is pipelined with respect to FIG. An input signal 401 is an input signal to the encoding device and is divided into macro blocks and input.
The encoding device includes an addition / subtraction unit 402, an orthogonal transform (DCT) unit 403, a quantization unit 404, an inverse quantization unit 405, an inverse orthogonal transform (inverse DCT) unit 406, a motion estimation unit 407, a motion compensation unit 408, and a frame memory. 409. Further, it includes a variable length coding unit 410, a code amount control unit 411, a quantization control unit 412, and feature extraction units 413, 414, and 415, and outputs an output signal 416.

以下、本実施形態に対応する符号化装置の動作を説明する。ブロックに分割された入力信号401は、符号化ピクチャがフレーム内符号化(イントラ符号化)ピクチャの時は、直交変換部403においてマクロブロック内の信号に対して直交変換処理を行い、量子化部404でDCT係数を量子化する。   The operation of the encoding device corresponding to this embodiment will be described below. When the coded picture is an intra-frame coded (intra-coded) picture, the orthogonal transform unit 403 performs orthogonal transform processing on the input signal 401 divided into blocks, and the quantized unit. At 404, the DCT coefficients are quantized.

また、符号化ピクチャがフレーム間符号化(インター符号化)ピクチャの時は、符号化されたピクチャに対して逆量子化部405で逆量子化、逆直交変換部406で逆直交変換処理を行ったローカルデコード画像を作成する。また、符号化対象のピクチャとの動き推定を動き推定部407で、動き補償を動き補償部408で行い、ローカルデコード画像との差分値を加減算部402で算出する。差分値は、直交変換部403においてマクロブロック内の信号に対して直交変換処理を行い、量子化部404でDCT係数を量子化する。   When the encoded picture is an inter-frame encoded (inter-coded) picture, the inverse quantization unit 405 performs inverse quantization on the encoded picture, and the inverse orthogonal transform unit 406 performs inverse orthogonal transform processing. Create a local decoded image. The motion estimation unit 407 performs motion estimation with the encoding target picture, the motion compensation unit 408 performs motion compensation, and the addition / subtraction unit 402 calculates a difference value from the local decoded image. The difference value is subjected to orthogonal transform processing on the signal in the macroblock in the orthogonal transform unit 403, and the DCT coefficient is quantized in the quantization unit 404.

フレーム内符号化、フレーム間符号化に関わらず量子化部404で量子化された量子化信号は、可変長符号化部410で符号化が行われ符号化された信号が出力信号416として出力される。   Regardless of intra-frame coding or inter-frame coding, the quantized signal quantized by the quantizing unit 404 is encoded by the variable length coding unit 410 and the encoded signal is output as an output signal 416. The

次に、符号量制御部411、量子化制御部412、特徴抽出部413の動作を説明する。   Next, operations of the code amount control unit 411, the quantization control unit 412, and the feature extraction unit 413 will be described.

符号量制御部411は、GOP内の各ピクチャに対する割り当てビット量を、割り当て対象ピクチャを含めGOP内でまだ符号化されていないピクチャに対するビット量を基に配分する。この配分をGOP内の符号化ピクチャ順に繰り返し、ピクチャごとにピクチャ目標符号量を設定する。   The code amount control unit 411 distributes the allocated bit amount for each picture in the GOP based on the bit amount for a picture that has not been encoded in the GOP including the allocation target picture. This distribution is repeated in the order of the encoded pictures in the GOP, and a picture target code amount is set for each picture.

次に、量子化制御部412は、各ピクチャに対する目標符号量と実際の発生符号量とを一致させるため、仮想バッファの容量を基に、量子化スケールの参照値を求める。具体的には、可変長符号化部410から出力されるマクロブロック単位の発生符号量としてフィードバック制御で求める。量子化部404で使用する量子化パラメータは、量子化スケールの参照値に対して特徴抽出部413からの設定指示をもとに式(11)を用いて決定される。なお以上の動作は背景技術で述べたステップ1〜3に相当する。   Next, the quantization control unit 412 obtains a reference value of the quantization scale based on the capacity of the virtual buffer in order to match the target code amount for each picture with the actual generated code amount. Specifically, the amount of generated code for each macroblock output from the variable length coding unit 410 is obtained by feedback control. The quantization parameter used in the quantization unit 404 is determined using Expression (11) based on the setting instruction from the feature extraction unit 413 with respect to the reference value of the quantization scale. The above operation corresponds to steps 1 to 3 described in the background art.

また、本実施形態に対応する符号化装置は、全体として3段のパイプライン構成で動作している。1段目(図4の420)は特徴抽出部413、2段目(図3の421)は特徴抽出部414及び動き推定部407である。3段目(図4の422)は、特徴抽出部415、量子化制御部412、動き補償部408、直交変換部403、量子化部404、可変長符号化部410、逆量子化部405、逆直交変換部406である。   Also, the coding apparatus corresponding to the present embodiment operates as a whole with a three-stage pipeline configuration. The first stage (420 in FIG. 4) is a feature extraction unit 413, and the second stage (421 in FIG. 3) is a feature extraction unit 414 and a motion estimation unit 407. The third stage (422 in FIG. 4) includes a feature extraction unit 415, a quantization control unit 412, a motion compensation unit 408, an orthogonal transformation unit 403, a quantization unit 404, a variable length coding unit 410, an inverse quantization unit 405, This is an inverse orthogonal transform unit 406.

このようなパイプライン構成をとった理由は以下のとおりである。   The reason for adopting such a pipeline configuration is as follows.

動き推定部407には、サーチ範囲の広さにも依存するが、莫大な演算量が要求される。バスレート等を考慮すれば、マクロブロックを処理するため許容されている時間の大部分を使用する可能性もある。一方、動き補償部408は、動き推定部407で決定された動きベクトルを基に参照フレームから画像データを読み出すため、動きベクトルがなければ処理を開始できない。   The motion estimation unit 407 is required to have an enormous amount of calculation although it depends on the size of the search range. Considering the bus rate, etc., it is possible to use most of the time allowed for processing the macroblock. On the other hand, since the motion compensation unit 408 reads image data from the reference frame based on the motion vector determined by the motion estimation unit 407, the process cannot be started without the motion vector.

よって、動き補償部408の開始時に動きベクトルが決定されていることが望ましく、図4では、動き推定部407が動き補償部408よりも1段早く処理を行う構成となっている。なお、3段目に属している動き補償部408以外のモジュールは、処理量を考慮して同じ段に入れているが、さらに1段遅らした構成でも構わない。例えば、H.264/AVCであれば可変長符号化にCABACを用いているが、処理量が入力される信号によって様々でありサイクル数を正確に見積もれない可能性があるので1段遅らすか、または別の処理系統にしてもよい。   Therefore, it is desirable that the motion vector is determined at the start of the motion compensation unit 408. In FIG. 4, the motion estimation unit 407 is configured to perform processing one step earlier than the motion compensation unit 408. The modules other than the motion compensation unit 408 belonging to the third stage are put in the same stage in consideration of the processing amount, but may be configured to be further delayed by one stage. For example, H.M. In the case of H.264 / AVC, CABAC is used for variable-length coding. However, the processing amount varies depending on the input signal, and the number of cycles may not be accurately estimated. It may be a system.

特徴抽出部413は、量子化制御部412で量子化を行うための量子化パラメータを決定するための特徴量を量子化に先立って算出するため、特徴抽出部413も量子化制御部412よりも早く処理する構成をとっている。また、今回の構成では1段ではなく2段早い構成となっているがこれは図5とあわせて説明する。   Since the feature extraction unit 413 calculates the feature quantity for determining the quantization parameter for performing the quantization in the quantization control unit 412 prior to the quantization, the feature extraction unit 413 is also more than the quantization control unit 412. It is configured to process quickly. Further, in this configuration, the configuration is two steps earlier than the first step, which will be described in conjunction with FIG.

図5において、(a)は、量子化対象マクロブロックをN番目とすると、(N+2)番目のマクロブロックの処理(図4の420)を行っていることを示す。また、(b)は、(N+1)番目のマクロブロックの処理(図4の421)を、(c)は(N)番目のマクロブロックの処理(図4の422)を行っていることを示す。   In FIG. 5, (a) indicates that the processing of the (N + 2) -th macroblock (420 in FIG. 4) is performed when the quantization target macroblock is N-th. (B) shows that the (N + 1) -th macroblock processing (421 in FIG. 4) is being performed, and (c) shows that the (N) -th macroblock processing (422 in FIG. 4) is being performed. .

図6において、601が符号化対象マクロブロックであり、600が1つ前のマクロブロック(N−1マクロブロック)、602が1つ後のマクロブロック(N+1マクロブロック)である。603から620は各サブブロックである。   In FIG. 6, reference numeral 601 denotes an encoding target macroblock, 600 is the previous macroblock (N-1 macroblock), and 602 is the next macroblock (N + 1 macroblock). Reference numerals 603 to 620 denote sub-blocks.

符号化対象マクロブロック601の左側のマクロブロック600が本符号化装置に入力されると1段目420の特徴抽出部413では、サブブロック603から606の分散を計算する。   When the macro block 600 on the left side of the encoding target macro block 601 is input to the encoding apparatus, the feature extraction unit 413 in the first stage 420 calculates the variance of the sub blocks 603 to 606.

処理が1マクロブロック進むと、1段目420の特徴抽出部413には、符号化対象マクロブロック601が入力され、サブブロック607から610の分散値を計算する。また、2段目の特徴抽出部414には、特徴抽出部413から取得した、マクロブロック600のサブブロック603から606の分散値が保持される。また、動き推定部407では、マクロブロック600について動きベクトルを決定するための処理が行われている。   When the process proceeds by one macroblock, the encoding target macroblock 601 is input to the feature extraction unit 413 in the first stage 420, and the variance values of the subblocks 607 to 610 are calculated. Also, the second stage feature extraction unit 414 holds the variance values of the sub-blocks 603 to 606 of the macroblock 600 acquired from the feature extraction unit 413. Further, the motion estimation unit 407 performs processing for determining a motion vector for the macroblock 600.

さらに処理が1マクロブロック進むと、1段目の特徴抽出部413には符号化対象マクロブロック601の右側のマクロブロック602が入力され、サブブロック611から614の分散値を計算する。また、2段目の特徴抽出部414には、特徴抽出部413から取得した符号化対象マクロブロック601内のサブブロック607から610の分散が保持される。3段目の特徴抽出部415は、マクロブロック600のサブブロック603から606の分散が保持される。   When the processing further advances by one macroblock, the macroblock 602 on the right side of the encoding target macroblock 601 is input to the first-stage feature extraction unit 413, and the variance values of the subblocks 611 to 614 are calculated. In addition, the second stage feature extraction unit 414 holds the variances of the sub-blocks 607 to 610 in the encoding target macroblock 601 acquired from the feature extraction unit 413. The third stage feature extraction unit 415 holds the distribution of the sub-blocks 603 to 606 of the macroblock 600.

この時点で符号化対象マクロブロック601内のサブブロック607から610と、左に隣接しているサブブロック604、606、右に隣接しているサブブロック611、613の分散値が準備できる。   At this time, the dispersion values of the subblocks 607 to 610 in the encoding target macroblock 601, the subblocks 604 and 606 adjacent to the left, and the subblocks 611 and 613 adjacent to the right can be prepared.

そこで、処理が1マクロブロック進んで特徴抽出部415では、これらのサブブロックと、予め保持しているサブブロック616から619の分散の中から最小値、最大値を算出する。また、符号化対象マクロブロック601が平坦部やエッジに属するか否かを判定する。さらに、判定結果に従い、量子化制御部412に対する量子化パラメータの設定指示を生成する。係る量子化パラメータの設定指示は、量子化制御部412に与えられる
なお、量子化パラメータの設定指示の生成処理については、第1の実施形態で図3のフローチャートを参照して説明したのと同様であるので、詳細な説明は省略する。
Therefore, the process proceeds by one macroblock, and the feature extraction unit 415 calculates the minimum value and the maximum value from the variances of these subblocks and the subblocks 616 to 619 held in advance. Also, it is determined whether or not the encoding target macroblock 601 belongs to a flat part or an edge. Further, according to the determination result, a quantization parameter setting instruction is generated for the quantization control unit 412. The quantization parameter setting instruction is given to the quantization control unit 412. Note that the quantization parameter setting instruction generation processing is the same as that described with reference to the flowchart of FIG. 3 in the first embodiment. Therefore, detailed description is omitted.

以上のように、本実施形態によれば、第1の実施形態では1つに集約されていた特徴抽出部の機能を3段のパイプライン構成とした。これにより、量子化制御部412で量子化パラメータを決定する処理に先だって、サブブロックの分散を計算して、量子化パラメータの設定指示を生成できるので、処理効率を高めることができる。また、演算量が多い動きベクトルの算出処理を動き補償部408での処理に先行して行うことで、処理効率を高めることができる。   As described above, according to the present embodiment, the function of the feature extraction unit, which has been integrated into one in the first embodiment, has a three-stage pipeline configuration. Thereby, prior to the process of determining the quantization parameter by the quantization control unit 412, the distribution of sub-blocks can be calculated to generate a quantization parameter setting instruction, so that the processing efficiency can be improved. Further, the processing efficiency can be increased by performing the motion vector calculation process with a large amount of calculation prior to the process in the motion compensation unit 408.

[その他の実施形態]
本発明の目的は、前述した機能を実現するコンピュータプログラムのコードを記録した記憶媒体を、システムに供給し、そのシステムがコンピュータプログラムのコードを読み出し実行することによっても達成される。この場合、記憶媒体から読み出されたコンピュータプログラムのコード自体が前述した実施形態の機能を実現し、そのコンピュータプログラムのコードを記憶した記憶媒体は本発明を構成する。また、そのプログラムのコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した機能が実現される場合も含まれる。
[Other Embodiments]
The object of the present invention can also be achieved by supplying a storage medium in which a computer program code for realizing the above-described functions is recorded to a system, and the system reads and executes the computer program code. In this case, the computer program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the computer program code constitutes the present invention. In addition, the operating system (OS) running on the computer performs part or all of the actual processing based on the code instruction of the program, and the above-described functions are realized by the processing. .

さらに、以下の形態で実現しても構わない。すなわち、記憶媒体から読み出されたコンピュータプログラムコードを、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込む。そして、そのコンピュータプログラムのコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行って、前述した機能が実現される場合も含まれる。   Furthermore, you may implement | achieve with the following forms. That is, the computer program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer. Then, based on the instruction of the code of the computer program, the above-described functions are realized by the CPU or the like provided in the function expansion card or function expansion unit performing part or all of the actual processing.

本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するコンピュータプログラムのコードが格納されることになる。   When the present invention is applied to the above storage medium, the computer program code corresponding to the flowchart described above is stored in the storage medium.

発明の第1の実施形態おける全体システム構成の一例を示す図である。It is a figure which shows an example of the whole system configuration | structure in the 1st Embodiment of invention. 発明の第1の実施形態に対応する特徴抽出を説明するための図である。It is a figure for demonstrating the feature extraction corresponding to the 1st Embodiment of invention. 発明の第1の実施形態おける特徴抽出部113の処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process of the feature extraction part 113 in the 1st Embodiment of invention. 発明の第2の実施形態おける全体システム構成の一例を示す図である。It is a figure which shows an example of the whole system configuration | structure in the 2nd Embodiment of invention. 発明の第2の実施形態におけるシステムの処理動作を説明するための図である。It is a figure for demonstrating the processing operation of the system in the 2nd Embodiment of invention. 第2の実施形態に対応する特徴抽出を説明するための図である。It is a figure for demonstrating the feature extraction corresponding to 2nd Embodiment.

符号の説明Explanation of symbols

101・・・入力部(入力信号)
102・・・加減算
103・・・直交変換部
104・・・量子化部
105・・・逆量子化部
106・・・逆直交変換部
107・・・動き推定部
108・・・動き補償部
109・・・フレームメモリ
110・・・可変長符号化部
111・・・符号量制御部
112・・・量子化制御部
113・・・特徴抽出部
116・・・出力部(出力信号、ストリーム)
101 ... Input unit (input signal)
102 ... Addition / subtraction 103 ... Orthogonal transformation unit 104 ... Quantization unit 105 ... Inverse quantization unit 106 ... Inverse orthogonal transformation unit 107 ... Motion estimation unit 108 ... Motion compensation unit 109 ... Frame memory 110 ... Variable length encoding unit 111 ... Code amount control unit 112 ... Quantization control unit 113 ... Feature extraction unit 116 ... Output unit (output signal, stream)

Claims (7)

画像を複数のマクロブロックに分割して符号化を行う符号化装置であって、
前記複数のマクロブロックのそれぞれについて、量子化に用いる量子化パラメータを指定する設定指示を生成する生成手段と、
前記生成手段により生成された前記設定指示に基づいて、前記マクロブロックの量子化パラメータを決定する決定手段と、
前記マクロブロックの直交変換と、決定された前記量子化パラメータを用いた量子化とを行う変換手段と、
前記変換手段による変換結果を、可変長符号化する符号化手段と、
を備え、
前記生成手段は、前記マクロブロックを構成するサブブロックについて分散を算出し、前記マクロブロックを構成するサブブロックの分散と、該マクロブロックに隣接するサブブロックの分散とに基づいて、前記量子化パラメータの設定指示を生成することを特徴とする符号化装置。
An encoding device that performs encoding by dividing an image into a plurality of macroblocks,
Generating means for generating a setting instruction for specifying a quantization parameter used for quantization for each of the plurality of macroblocks;
Determining means for determining a quantization parameter of the macroblock based on the setting instruction generated by the generating means;
Transform means for performing orthogonal transformation of the macroblock and quantization using the determined quantization parameter;
Encoding means for variable-length encoding the conversion result by the conversion means;
With
The generating means calculates a variance for subblocks constituting the macroblock, and based on the variance of subblocks constituting the macroblock and the variance of subblocks adjacent to the macroblock, the quantization parameter An encoding device that generates a setting instruction.
前記設定指示では、
高周波成分を多く含むマクロブロックの量子化のための第1の種別の量子化パラメータと、
前記第1の種別の量子化パラメータよりも量子化スケールの小さい第2の種別の量子化パラメータとの
いずれかが指定されることを特徴とする請求項1に記載の符号化装置。
In the setting instruction,
A first type of quantization parameter for quantization of a macroblock containing a lot of high frequency components;
2. The encoding apparatus according to claim 1, wherein one of a second type quantization parameter having a quantization scale smaller than the first type quantization parameter is designated.
前記生成手段は、マクロブロックを構成するサブブロックの分散と、該マクロブロックに隣接するサブブロックの分散とのうち、最小値と最大値とを決定し、該最大値と最小値との差分が第1の閾値より大きい場合に、前記第2の種別の量子化パラメータを指定する設定指示を生成することを特徴とする請求項2に記載の符号化装置。   The generating means determines a minimum value and a maximum value among a variance of subblocks constituting the macroblock and a variance of subblocks adjacent to the macroblock, and a difference between the maximum value and the minimum value is determined. The encoding apparatus according to claim 2, wherein a setting instruction that specifies the second type of quantization parameter is generated when greater than a first threshold value. 前記生成手段は、マクロブロックを構成するサブブロックの分散と、該マクロブロックに隣接するサブブロックの分散とのうち、最小値を決定し、
該最小値が第2の閾値より小さい場合に、前記第2の種別の量子化パラメータを指定する設定指示を生成し、
該最小値が第2の閾値より小さくない場合に、前記第1の種別の量子化パラメータを指定する設定指示を生成することを特徴とする請求項2又は3に記載の符号化装置。
The generating means determines a minimum value among a variance of subblocks constituting a macroblock and a variance of subblocks adjacent to the macroblock;
When the minimum value is smaller than a second threshold, a setting instruction for specifying the second type of quantization parameter is generated;
4. The encoding apparatus according to claim 2, wherein when the minimum value is not smaller than the second threshold, a setting instruction for specifying the first type of quantization parameter is generated. 5.
前記生成手段は、前記マクロブロックを構成するサブブロックのいずれかの分散が前記第2の閾値より小さく、かつ、前記マクロブロックに隣接するサブブロックの分散が第3の閾値より大きい場合に、前記第2の種別の量子化パラメータを指定する設定指示を生成することを特徴とする請求項4に記載の符号化装置。   The generating means, when the variance of any of the sub-blocks constituting the macro block is smaller than the second threshold and the variance of the sub-blocks adjacent to the macro block is larger than a third threshold, The encoding apparatus according to claim 4, wherein a setting instruction for specifying a second type of quantization parameter is generated. 画像を複数のマクロブロックに分割して符号化を行う符号化装置の制御方法であって、
前記複数のマクロブロックのそれぞれについて、量子化に用いる量子化パラメータを指定する設定指示を生成する生成工程と、
前記生成工程において生成された前記設定指示に基づいて、前記マクロブロックの量子化パラメータを決定する決定工程と、
前記マクロブロックの直交変換と、決定された前記量子化パラメータを用いた量子化とを行う変換工程と、
前記変換工程における変換結果を、可変長符号化する符号化工程と、
を備え、
前記生成工程では、前記マクロブロックを構成するサブブロックについて分散を算出し、前記マクロブロックを構成するサブブロックの分散と、該マクロブロックに隣接するサブブロックの分散とに基づいて、前記量子化パラメータの設定指示を生成することを特徴とする符号化装置の制御方法。
A method for controlling an encoding device that performs encoding by dividing an image into a plurality of macroblocks,
For each of the plurality of macroblocks, a generation step for generating a setting instruction that specifies a quantization parameter used for quantization;
A determination step of determining a quantization parameter of the macroblock based on the setting instruction generated in the generation step;
A transform step for performing orthogonal transformation of the macroblock and quantization using the determined quantization parameter;
An encoding step for variable-length encoding the conversion result in the conversion step;
With
In the generating step, a variance is calculated for subblocks constituting the macroblock, and the quantization parameter is calculated based on a variance of subblocks constituting the macroblock and a variance of subblocks adjacent to the macroblock. A control method for an encoding device, characterized in that a setting instruction is generated.
コンピュータを、請求項1乃至5のいずれか1項に記載の符号化装置として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as the encoding device according to any one of claims 1 to 5.
JP2008011928A 2008-01-22 2008-01-22 Encoding apparatus, encoding apparatus control method, and computer program Active JP5111128B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008011928A JP5111128B2 (en) 2008-01-22 2008-01-22 Encoding apparatus, encoding apparatus control method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008011928A JP5111128B2 (en) 2008-01-22 2008-01-22 Encoding apparatus, encoding apparatus control method, and computer program

Publications (3)

Publication Number Publication Date
JP2009177353A true JP2009177353A (en) 2009-08-06
JP2009177353A5 JP2009177353A5 (en) 2011-02-03
JP5111128B2 JP5111128B2 (en) 2012-12-26

Family

ID=41032018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008011928A Active JP5111128B2 (en) 2008-01-22 2008-01-22 Encoding apparatus, encoding apparatus control method, and computer program

Country Status (1)

Country Link
JP (1) JP5111128B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018515016A (en) * 2015-04-13 2018-06-07 クゥアルコム・インコーポレイテッドQualcomm Incorporated Complex region detection for display stream compression
US10244255B2 (en) 2015-04-13 2019-03-26 Qualcomm Incorporated Rate-constrained fallback mode for display stream compression
US10284849B2 (en) 2015-04-13 2019-05-07 Qualcomm Incorporated Quantization parameter (QP) calculation for display stream compression (DSC) based on complexity measure
US10356428B2 (en) 2015-04-13 2019-07-16 Qualcomm Incorporated Quantization parameter (QP) update classification for display stream compression (DSC)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000350211A (en) * 1999-06-07 2000-12-15 Toshiba Corp Method and device for encoding moving picture
JP2001251627A (en) * 2000-03-03 2001-09-14 Matsushita Electric Ind Co Ltd Coder, coding method and recording medium recorded with program
JP2003250160A (en) * 2002-02-22 2003-09-05 Nippon Hoso Kyokai <Nhk> Apparatus and method for reducing the number of video frames
JP2004015340A (en) * 2002-06-05 2004-01-15 Kddi R & D Laboratories Inc Quantization control method for encoding moving picture
JP2007228519A (en) * 2006-02-27 2007-09-06 Renesas Technology Corp Image encoding device and image encoding method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000350211A (en) * 1999-06-07 2000-12-15 Toshiba Corp Method and device for encoding moving picture
JP2001251627A (en) * 2000-03-03 2001-09-14 Matsushita Electric Ind Co Ltd Coder, coding method and recording medium recorded with program
JP2003250160A (en) * 2002-02-22 2003-09-05 Nippon Hoso Kyokai <Nhk> Apparatus and method for reducing the number of video frames
JP2004015340A (en) * 2002-06-05 2004-01-15 Kddi R & D Laboratories Inc Quantization control method for encoding moving picture
JP2007228519A (en) * 2006-02-27 2007-09-06 Renesas Technology Corp Image encoding device and image encoding method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018515016A (en) * 2015-04-13 2018-06-07 クゥアルコム・インコーポレイテッドQualcomm Incorporated Complex region detection for display stream compression
US10244255B2 (en) 2015-04-13 2019-03-26 Qualcomm Incorporated Rate-constrained fallback mode for display stream compression
US10284849B2 (en) 2015-04-13 2019-05-07 Qualcomm Incorporated Quantization parameter (QP) calculation for display stream compression (DSC) based on complexity measure
US10356428B2 (en) 2015-04-13 2019-07-16 Qualcomm Incorporated Quantization parameter (QP) update classification for display stream compression (DSC)

Also Published As

Publication number Publication date
JP5111128B2 (en) 2012-12-26

Similar Documents

Publication Publication Date Title
KR101228109B1 (en) Motion prediction apparatus and method and image encoding apparatus and method employing the same
JP5267655B2 (en) Image coding apparatus, image coding control method, and image coding program
JP2011523300A (en) Method and system for simultaneous optimization of video coder and decoder
KR101737861B1 (en) Apparatus and method for dct size decision based on transform depth
JP2010130558A (en) Video encoding apparatus and video encoding method
KR101462637B1 (en) Method and apparatus for image encoding/decoding
JP5004180B2 (en) Video encoding apparatus and decoding apparatus
JP5111128B2 (en) Encoding apparatus, encoding apparatus control method, and computer program
JP5078837B2 (en) Encoding apparatus, encoding apparatus control method, and computer program
JP4824705B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs
WO2012096184A1 (en) Image encoding apparatus, image encoding method, program, image decoding apparatus, image decoding method, and program
JP2015211386A (en) Dynamic image encoding device, dynamic image encoding method, and computer program for dynamic image encoding
JP6946979B2 (en) Video coding device, video coding method, and video coding program
JP4942208B2 (en) Encoder
JP2015027097A (en) Moving picture decoding method
JP4857243B2 (en) Image encoding apparatus, control method therefor, and computer program
WO2020008858A1 (en) Moving-image encoding device, moving-image encoding method, and program
JP2007300557A (en) Image encoding device and image encoding method
JP4906458B2 (en) Image coding apparatus and image coding method
JP4034793B2 (en) Video compression apparatus and method for generating complementary video and using it for deblocking processing
JP2009118096A (en) Image encoder, method of controlling the same, and computer program
JP2014003587A (en) Image encoder and encoding method
JP2005175621A (en) Motion picture encoder and encoding method
JP4902553B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs
JP4847423B2 (en) Moving picture encoding apparatus and computer program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101215

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111107

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111111

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120106

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: 20120910

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121009

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

Free format text: PAYMENT UNTIL: 20151019

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5111128

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20151019

Year of fee payment: 3