JP6360591B2 - Image encoding apparatus and method - Google Patents

Image encoding apparatus and method Download PDF

Info

Publication number
JP6360591B2
JP6360591B2 JP2017101183A JP2017101183A JP6360591B2 JP 6360591 B2 JP6360591 B2 JP 6360591B2 JP 2017101183 A JP2017101183 A JP 2017101183A JP 2017101183 A JP2017101183 A JP 2017101183A JP 6360591 B2 JP6360591 B2 JP 6360591B2
Authority
JP
Japan
Prior art keywords
encoding
unit
pixel block
code amount
pixel
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
Application number
JP2017101183A
Other languages
Japanese (ja)
Other versions
JP2017200189A (en
Inventor
隆志 渡辺
隆志 渡辺
淳 松村
淳 松村
知也 児玉
知也 児玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2017101183A priority Critical patent/JP6360591B2/en
Publication of JP2017200189A publication Critical patent/JP2017200189A/en
Application granted granted Critical
Publication of JP6360591B2 publication Critical patent/JP6360591B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明の実施形態は、画像を符号化するために用いる画像符号化装置、及びその方法に
関する。
Embodiments described herein relate generally to an image encoding apparatus used for encoding an image and a method thereof.

変換・量子化を用いた画像符号化において所望の符号量にて符号化を行うために、過去
の符号量から適応的に量子化スケールを切り替えるレート制御方式があった。従来のレー
ト制御方式は、所望の符号量へと収束させることを目的としている。そのため、必ずしも
目標の符号量以内に収束することを保証するものではなかった。
In order to perform coding with a desired code amount in image coding using transform / quantization, there has been a rate control method for adaptively switching the quantization scale from a past code amount. The conventional rate control method is intended to converge to a desired code amount. For this reason, it is not always guaranteed to converge within the target code amount.

1パス符号化においては、符号化を行った結果、目標符号量を超過することが考えられ
る。ハードウェアによりエンコーダを構成する際にビットストリームのサイズを予め定義
した場合、目標符号量を超過するとビットストリームが破たんするという問題がある。
In 1-pass encoding, it is conceivable that the target code amount is exceeded as a result of encoding. When the size of the bit stream is defined in advance when the encoder is configured by hardware, there is a problem that the bit stream breaks if the target code amount is exceeded.

ストリームバッファの破たんを回避する符号化方式が開示されている。マクロブロック
単位で最小及び最大符号量を定め、符号化対象であるブロックにおいてもし最大符号量が
発生したら、ストリームバッファが破たんする場合には最小符号量での符号化を行う方式
について述べられている。
An encoding scheme that avoids stream buffer corruption has been disclosed. The minimum and maximum code amounts are determined in units of macro blocks, and a method is described in which encoding is performed with the minimum code amount if the stream buffer breaks if the maximum code amount occurs in a block to be encoded. .

上記方式では、当該ブロックで最大符号量が発生してもストリームバッファが破たんし
ないか否かにより符号化条件を切り替えている。一般的に、最小符号量での符号化は画質
が大きく劣化するため選択されないことが望ましい。一方、上記方式では最大符号量分の
マージンを持っていることに等しいため最小符号量での符号化が選択されやすくなってし
まうという問題がある。
In the above method, the encoding condition is switched depending on whether or not the stream buffer is broken even if the maximum code amount occurs in the block. In general, it is desirable not to select the encoding with the minimum code amount because the image quality greatly deteriorates. On the other hand, since the above method is equivalent to having a margin for the maximum code amount, there is a problem that encoding with the minimum code amount is easily selected.

特開2008−271213号JP 2008-271213 A

“MPEG−2 Test Model 5 (TM5)”, Doc. ISO/IEC−JTC1/SC29/WG11/N0400, Apr. 1993. Chapter10, “Rate Control and Quantization”“MPEG-2 Test Model 5 (TM5)”, Doc. ISO / IEC-JTC1 / SC29 / WG11 / N0400, Apr. 1993. Chapter 10, “Rate Control and Quantization”

本発明が解決しようとする課題は、1パス符号化においてもストリームバッファの破た
んを防ぎつつ、画質の劣化を抑える点にある。
The problem to be solved by the present invention is to prevent degradation of the image quality while preventing the stream buffer from being broken even in one-pass encoding.

本発明は上記の課題を解決するために考案されたものであり、入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化部と、前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化部と、 前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化部と前記第2の符号化部のいずれを用いるかを判定する判定部とを備え前記判定部は、前記複数の画素ブロックのうち一番目に符号化された第1画素ブロックから前記符号化対象画素ブロックの直前に符号化された第2画素ブロックまでの累積符号量と、前記第1の符号化部により符号化された前記符号化対象画素ブロックの符号量と、の和が、前記第1セグメントの目標符号量と前記複数の画素ブロックのうち前記符号化対象画素ブロックより後に符号化される画素ブロックを前記第2の符号化部により符号化することで発生する符号量との差よりも小さい場合には、前記第1の符号化部を用いると判定し、前記第2の符号化部を用いると判定した場合には、前記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分を符号化する画像符号化装置を提供する。
また、入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化部と、前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化部と、前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化部と前記第2の符号化部のいずれを用いるかを判定する判定部と、を備え、前記判定部は、前記複数の画素ブロックのうち一番目に符号化された第1画素ブロックから前記符号化対象画素ブロックの前に符号化された第3画素ブロックまでの累積符号量と、前記第3画素ブロックの後前記符号化対象画素ブロックまでを前記第1の符号化部で符号化した場合の最大符号量と、の和が、前記第1セグメントの目標符号量と前記複数の画素ブロックのうち前記符号化対象画素ブロックより後に符号化される画素ブロックを前記第2の符号化部により符号化することで発生する符号量との差よりも小さい場合には、前記第1の符号化部を用いると判定し、前記第2の符号化部を用いると判定した場合には、記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分が追加符号化する画像符号化装置を提供する。
また同様に、入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化部と、前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化部と、前記複数の画素ブロックそれぞれを予め定められ前記第1符号量よりも大きな第2符号量で符号化可能な第3の符号化部と、前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化部、前記第2の符号化部及び前記第3符号化部のいずれを用いるかを判定する判定部と、を備え、前記判定部は、前記第1の符号化部による前記符号化対象画素ブロックの符号量が前記第3の符号化部による前記符号化対象画素ブロックの符号量を上回る場合には第3の符号化部を用いると判定し、前記第3の符号化部を用いると判定した場合には、記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分が追加符号化する画像符号化装置を提供する。
The present invention has been devised to solve the above problems, and includes a first encoding unit capable of encoding each of a plurality of pixel blocks included in a first segment included in an input image , and the plurality of pixels. A second encoding unit capable of encoding each block with a predetermined first code amount; and the first encoding for an encoding target pixel block that is one of the plurality of pixel blocks. And a determination unit that determines which one of the second encoding units to use, and the determination unit starts from the first pixel block encoded first among the plurality of pixel blocks. The sum of the cumulative code amount up to the second pixel block encoded immediately before the pixel block and the code amount of the encoding target pixel block encoded by the first encoding unit is the first code block. Segment target code When the difference between the amount and the code amount generated by encoding the pixel block encoded after the encoding target pixel block by the second encoding unit among the plurality of pixel blocks is smaller than If it is determined that the first encoding unit is used and it is determined that the second encoding unit is used, pixels to be encoded after the encoding target pixel block among the plurality of pixel blocks At least a part of the encoding target pixel block used for prediction in the block encodes a difference between a pixel value of the local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block. An image encoding device is provided.
In addition, a first encoding unit capable of encoding each of the plurality of pixel blocks included in the first segment included in the input image, and each of the plurality of pixel blocks can be encoded with a predetermined first code amount. Determining whether to use the first encoding unit or the second encoding unit for a second encoding unit and an encoding target pixel block that is one of the plurality of pixel blocks A determination unit that performs the determination from the first pixel block encoded first among the plurality of pixel blocks to the third pixel block encoded before the pixel block to be encoded. And the maximum code amount when the first encoding unit encodes the third pixel block up to the encoding target pixel block is the target code of the first segment. Quantity and said multiple pictures When the pixel block encoded after the encoding target pixel block among the blocks is smaller than the difference from the code amount generated by encoding by the second encoding unit, the first code If it is determined that the encoding unit is to be used and it is determined that the second encoding unit is to be used, among the plurality of pixel blocks, the pixel block encoded after the encoding target pixel block is used for prediction. Image coding in which at least a part of the encoding target pixel block is additionally encoded with a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block Providing equipment.
Similarly, a first encoding unit capable of encoding each of the plurality of pixel blocks included in the first segment of the input image, and encoding each of the plurality of pixel blocks with a predetermined first code amount. A possible second encoding unit, a third encoding unit capable of encoding each of the plurality of pixel blocks in advance with a second code amount larger than the first code amount, and the plurality of pixel blocks A determination unit that determines which one of the first encoding unit, the second encoding unit, and the third encoding unit is used for an encoding target pixel block that is one of The determination unit includes a third unit when a code amount of the encoding target pixel block by the first encoding unit exceeds a code amount of the encoding target pixel block by the third encoding unit. It is determined that the encoding unit is used, and the previous When it is determined that the third encoding unit is to be used, at least one of the encoding target pixel blocks used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. The unit provides an image encoding device that additionally encodes a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block.

1パス符号化においてもストリームバッファの破たんを防ぎつつ、画質の劣化を抑える
ことができる。
Even in the 1-pass encoding, it is possible to suppress degradation of the image quality while preventing the stream buffer from being broken.

符号化/復号処理単位を示す図。The figure which shows an encoding / decoding process unit. 画像符号化装置を示す図。The figure which shows an image coding apparatus. 第1符号化部103を示す図。The figure which shows the 1st encoding part 103. FIG. ローカルデコード生成部を示す図。The figure which shows a local decoding production | generation part. 画像符号化装置の動作例を示すタイミングチャート。The timing chart which shows the operation example of an image coding apparatus. 画像符号化装置の動作例を示すフローチャート。The flowchart which shows the operation example of an image coding apparatus. ユニットにおける符号化データのシンタクスの例を示す図。The figure which shows the example of the syntax of the coding data in a unit. 累積符号量の推移と符号化モード判定の関係を示す図。The figure which shows the relationship of transition of accumulation code amount, and encoding mode determination. 画像符号化装置の別例を示す図。The figure which shows another example of an image coding apparatus. 画像符号化装置の別例の動作例を示すタイミングチャート。The timing chart which shows the operation example of another example of an image coding apparatus. 画像符号化装置の別例の動作例を示すフローチャート。The flowchart which shows the operation example of another example of an image coding apparatus. ユニットにおける符号化データのシンタクスの例を示す図。The figure which shows the example of the syntax of the coding data in a unit. ユニットにおける符号化データのシンタクスの例を示す図。The figure which shows the example of the syntax of the coding data in a unit. 画像符号化装置の別例を示す図。The figure which shows another example of an image coding apparatus. ユニットにおける符号化データのシンタクスの例を示す図。The figure which shows the example of the syntax of the coding data in a unit. ユニットにおける符号化データのシンタクスの例を示す図。The figure which shows the example of the syntax of the coding data in a unit. モード判定部の動作例を示すフローチャート。The flowchart which shows the operation example of a mode determination part. 画像符号化装置の別例を示す図。The figure which shows another example of an image coding apparatus. 画像符号化装置の別例の動作例を示すフローチャート。The flowchart which shows the operation example of another example of an image coding apparatus.

以下、図面を参照しながら本実施形態の画像符号化装置について詳細に説明する。なお
、以下の実施形態では、同一の参照符号を付した部分は同様の動作をするものとして、重
複する説明を適宜省略する。
Hereinafter, the image encoding device of the present embodiment will be described in detail with reference to the drawings. Note that in the following embodiments, the same reference numerals are assigned to the same operations, and duplicate descriptions are omitted as appropriate.

(第1の実施形態)
尚、以下の実施形態においては、図1に示すように処理対象画像(入力画像)において
符号化処理を行う単位をユニット、符号量を保証すべき単位をセグメントと呼ぶ。図1の
例では、ユニットは画素ブロックであり、セグメントは画像の1ユニットラインである。
本実施形態の符号化装置は、各ユニットにおいて発生する符号量についての制限は行わな
いが、セグメント内で発生した総符号量については予め定めた所望の符号量以下となる様
、入力画像の符号化を行う。
(First embodiment)
In the following embodiment, as shown in FIG. 1, a unit for performing an encoding process on a processing target image (input image) is referred to as a unit, and a unit whose code amount should be guaranteed is referred to as a segment. In the example of FIG. 1, the unit is a pixel block, and the segment is one unit line of the image.
The encoding apparatus according to the present embodiment does not limit the code amount generated in each unit, but the code amount of the input image is set so that the total code amount generated in the segment is equal to or less than a predetermined desired code amount. Do.

図2は、本実施形態の画像符号化装置100を示す図である。   FIG. 2 is a diagram illustrating the image encoding device 100 according to the present embodiment.

画像符号化装置100は、スイッチ101、スイッチ102、第1符号化部103、第
2符号化部104、エントロピー符号化部105、符号化モード判定部106、ローカル
デコード生成部107及び符号化制御部108を有する。
The image encoding device 100 includes a switch 101, a switch 102, a first encoding unit 103, a second encoding unit 104, an entropy encoding unit 105, an encoding mode determination unit 106, a local decode generation unit 107, and an encoding control unit. 108.

スイッチ101は、ユニットの入力画像データを受け取り、符号化モード判定部106
より符号化モード情報を受け取る。スイッチ101は、符号化モード情報が第1符号化モ
ードを示す場合には第1符号化部103に入力画像を送る。スイッチ101は、符号化モ
ード情報が、第2符号化モードを示す場合には第2符号化部104に入力画像を送る。
The switch 101 receives the input image data of the unit, and receives an encoding mode determination unit 106.
The encoding mode information is received. The switch 101 sends an input image to the first encoding unit 103 when the encoding mode information indicates the first encoding mode. The switch 101 sends an input image to the second encoding unit 104 when the encoding mode information indicates the second encoding mode.

第1符号化部103は、受け取った符号化対象ユニットに対して、変換・量子化による
符号化処理を行い、第1の符号化データを生成する。符号化処理の詳細については後述す
る。
The first encoding unit 103 performs encoding processing by transform / quantization on the received encoding target unit, and generates first encoded data. Details of the encoding process will be described later.

第2符号化部104は、受け取った符号化対象ユニットに対して、あらかじめ定められ
た符号量となる様な符号化処理を行い、第2の符号化データを生成する。
The second encoding unit 104 performs an encoding process on the received encoding target unit so as to obtain a predetermined code amount, and generates second encoded data.

スイッチ102は、符号化モード判定部106より符号化モード情報を受け取る。符号
化モード情報が、第1符号化モードを示す場合には第1符号化部103より第1の符号化
データを受け取る。符号化モード情報が、第2符号化モードを示す場合には第2符号化部
104より第2の符号化データを受け取る。その後、受け取った符号化データをエントロ
ピー符号化部105及びローカルデコード生成部107へと送る。
The switch 102 receives encoding mode information from the encoding mode determination unit 106. When the encoding mode information indicates the first encoding mode, the first encoded data is received from the first encoding unit 103. When the encoding mode information indicates the second encoding mode, the second encoded data is received from the second encoding unit 104. Thereafter, the received encoded data is sent to the entropy encoding unit 105 and the local decode generation unit 107.

エントロピー符号化部105は、受け取った符号化データに対してエントロピー符号化
処理を行って、ビットストリームを生成する。その際に発生した符号量を示す符号量情報
を符号化モード判定部106へと送る。
The entropy encoding unit 105 performs entropy encoding processing on the received encoded data to generate a bitstream. Code amount information indicating the code amount generated at that time is sent to the encoding mode determination unit 106.

符号化モード判定部106は、エントロピー符号化部105より符号量情報を受け取る
。符号化モード判定部106は、符号量情報に基づいて後続のユニットに対する符号化モ
ード情報を設定してスイッチ101及びスイッチ102に送る。
The encoding mode determination unit 106 receives code amount information from the entropy encoding unit 105. The encoding mode determination unit 106 sets the encoding mode information for the subsequent unit based on the code amount information and sends it to the switch 101 and the switch 102.

ローカルデコード生成部107は、スイッチ102から符号化データを受け取り、符号
化処理に対応する復号処理を行ってローカルデコード画像を生成する。第1の符号化デー
タを受け取った場合には、第1符号化部103が行った符号化処理に対応する復号処理を
行う。第2の符号化データを行った場合には、第2復号化部104がおこなった復号処理
に対応する復号処理を行う。生成されたローカルデコード画像は第1符号化部103及び
第2符号化部104に送られる。ローカルデコード画像は、後続のユニットを符号化処理
する際の予測画像の生成に用いられる。
The local decode generation unit 107 receives encoded data from the switch 102 and performs a decoding process corresponding to the encoding process to generate a local decoded image. When the first encoded data is received, a decoding process corresponding to the encoding process performed by the first encoding unit 103 is performed. When the second encoded data is performed, a decoding process corresponding to the decoding process performed by the second decoding unit 104 is performed. The generated local decoded image is sent to the first encoding unit 103 and the second encoding unit 104. The local decoded image is used to generate a predicted image when the subsequent unit is encoded.

符号化制御部108は、発生符号量のフィードバック制御及び量子化制御、予測方向の
制御などを行なうことで、第1符号化部103及び第2符号化部104の制御を行なう。
The encoding control unit 108 controls the first encoding unit 103 and the second encoding unit 104 by performing feedback control and quantization control of the generated code amount, control of the prediction direction, and the like.

第1符号化部103について図3を参照して詳細に説明する。   The first encoding unit 103 will be described in detail with reference to FIG.

図3は、第1符号化部103の詳細を示す図である。第1符号化部103は、予測画像
生成部109、減算部110及び変換・量子化部111を有する。
FIG. 3 is a diagram showing details of the first encoding unit 103. The first encoding unit 103 includes a predicted image generation unit 109, a subtraction unit 110, and a transform / quantization unit 111.

予測画像生成部109は、ローカルデコード生成部107よりローカルデコード画像を
受け取り、所定の予測処理を行って処理対象ユニットに対応する予測画像を生成する。予
測画像生成部109は、減算部110へ予測画像を送る。予測処理として、どのような手
法を用いても良いが、本実施形態では隣接するユニットからの空間予測を用いる例につい
て説明する。例えば、H.264/AVCなどの既存コーデックと同様に、隣接するユニ
ットの画素を用いて空間予測を行う。その際の空間予測の予測方向は、符号化制御部10
8が設定する。
The predicted image generation unit 109 receives the local decoded image from the local decode generation unit 107, performs a predetermined prediction process, and generates a predicted image corresponding to the processing target unit. The predicted image generation unit 109 sends the predicted image to the subtracting unit 110. Although any method may be used as the prediction process, an example in which spatial prediction from adjacent units is used will be described in the present embodiment. For example, H.M. Similar to existing codecs such as H.264 / AVC, spatial prediction is performed using pixels of adjacent units. The prediction direction of the spatial prediction at that time is the encoding control unit 10.
8 is set.

減算部110は、スイッチ101より入力画像の処理対象ユニットを受け取り、予測画
像生成部109より対応する予測画像を受け取る。減算部110は、入力画像の画素値か
ら、予測画像の画素値を減じることで、予測誤差画像を生成する。生成された予測誤差画
像は、変換・量子化部111へ送られる。
The subtracting unit 110 receives the processing target unit of the input image from the switch 101 and receives the corresponding predicted image from the predicted image generating unit 109. The subtraction unit 110 generates a prediction error image by subtracting the pixel value of the prediction image from the pixel value of the input image. The generated prediction error image is sent to the transform / quantization unit 111.

変換・量子化部111は減算部110より受け取った予測誤差画像に対して変換処理を
行う。変換処理として、例えばDCT(離散コサイン変換)などを用いた直交変換を行い
、変換係数を生成する。なお、ウェーブレット変換や独立成分解析などの手法を用いて変
換係数を生成しても良い。次に、変換・量子化部111は、符号化制御部108にて設定
された量子化パラメータに基づいて、変換係数に対して量子化処理を行い、符号化データ
を生成する。
The transformation / quantization unit 111 performs transformation processing on the prediction error image received from the subtraction unit 110. As the transformation process, for example, orthogonal transformation using DCT (discrete cosine transformation) or the like is performed to generate a transformation coefficient. Note that the transform coefficient may be generated using a method such as wavelet transform or independent component analysis. Next, the transform / quantization unit 111 performs a quantization process on the transform coefficient based on the quantization parameter set by the encoding control unit 108 to generate encoded data.

以上のように、第1符号化部103は予測誤差画像に対して変換・量子化を行う、一般
的な符号化方式により符号化処理を行う。
As described above, the first encoding unit 103 performs an encoding process by a general encoding method that performs transformation and quantization on a prediction error image.

ローカルデコード生成部107について、図4を参照して詳細に説明する。   The local decode generation unit 107 will be described in detail with reference to FIG.

図4は、ローカルデコード生成部107の詳細を示す図である。ローカルデコード生成
部107は、予測誤差画像生成部109、逆量子化・逆変換部112及び加算部113を
有する。
FIG. 4 is a diagram showing details of the local decode generation unit 107. The local decode generation unit 107 includes a prediction error image generation unit 109, an inverse quantization / inverse conversion unit 112, and an addition unit 113.

逆量子化・逆変換部112は、スイッチ102から符号化データを受け取る。逆量子化
・逆変換部112は、符号化データに含まれる量子化後の直交変換係数に対して符号化制
御部108にて設定される量子化パラメータに従って逆量子化を行う。逆量子化・逆変換
部112は、逆量子化によって得られた変換係数に対して変換・量子化部111で行われ
た直交変換に対応する逆変換を行い、予測誤差画像を生成する。得られた予測誤差画像は
加算部113へ送られる。
The inverse quantization / inverse transform unit 112 receives the encoded data from the switch 102. The inverse quantization / inverse transform unit 112 performs inverse quantization on the orthogonal transform coefficient after quantization included in the encoded data according to the quantization parameter set by the encoding control unit 108. The inverse quantization / inverse transform unit 112 performs an inverse transform corresponding to the orthogonal transform performed by the transform / quantization unit 111 on the transform coefficient obtained by the inverse quantization, and generates a prediction error image. The obtained prediction error image is sent to the adding unit 113.

加算部113は、予測画像生成部109より予測画像を受け取り、逆量子化・逆変換部
112より受けとった予測誤差画像と加算し、ローカルデコード画像を生成する。得られ
たローカルデコード画像は第1符号化部103、第2符号化部104に出力されると共に
ローカルデコード生成部107内の予測画像生成部109にも出力され、後続のユニット
において予測処理を行う際に用いられる。
The addition unit 113 receives the prediction image from the prediction image generation unit 109, adds the prediction image received from the inverse quantization / inverse conversion unit 112, and generates a local decoded image. The obtained local decoded image is output to the first encoding unit 103 and the second encoding unit 104 and also output to the predicted image generation unit 109 in the local decode generation unit 107, and a prediction process is performed in the subsequent unit. Used when.

予測画像生成部109は、図3に示した第1符号化部103の予測画像生成部109と
同じ処理を行う。これにより、第1符号化部103及びローカルデコード生成部107で
同一の予測画像を用いることができる。なお、ローカルでコード生成部107が、予測画
像生成部109を有さず、第1符号化部103または第2符号化部104が生成した予測
画像をそのままローカルデコード生成部107に送る構成であっても構わない。
The predicted image generation unit 109 performs the same processing as the predicted image generation unit 109 of the first encoding unit 103 illustrated in FIG. Thereby, the same prediction image can be used in the first encoding unit 103 and the local decode generation unit 107. Note that the code generation unit 107 does not have the prediction image generation unit 109 locally, and sends the prediction image generated by the first encoding unit 103 or the second encoding unit 104 to the local decoding generation unit 107 as it is. It doesn't matter.

次に、本実施形態の画像符号化装置100の動作について図5及び図6を用いて説明す
る。
Next, the operation of the image coding apparatus 100 according to the present embodiment will be described with reference to FIGS.

図5は、画像符号化装置100の動作タイミングチャートを示す。   FIG. 5 shows an operation timing chart of the image encoding device 100.

本実施形態の画像符号化装置100は、入力画像を受け取り、図5に示すタイミングチ
ャートに従ってユニット毎にパイプラインで符号化処理を行う。図5の横軸は、時刻を示
す。縦軸に記したユニット#0〜#3の順に順次符号化処理が行われる。画像符号化装置
100は、ユニット毎に予測方向の決定と符号化モード判定、符号化処理とローカルデコ
ード生成、及びエントロピー符号化の3つの動作をそれぞれNサイクルにて実行する。尚
、以降の処理手順については図6のフローチャートに従って説明する。
The image coding apparatus 100 according to the present embodiment receives an input image and performs coding processing in a pipeline for each unit according to the timing chart shown in FIG. The horizontal axis in FIG. 5 indicates time. Encoding processing is sequentially performed in the order of units # 0 to # 3 indicated on the vertical axis. The image encoding apparatus 100 performs three operations of determining the prediction direction and determining the encoding mode, encoding processing and local decoding, and entropy encoding for each unit in N cycles. The subsequent processing procedure will be described with reference to the flowchart of FIG.

図6は、画像符号化装置100の処理フローの一例を表している。
まず、画像符号化装置100が入力画像中の処理対象ユニットに含まれる画素のデータを
受け取ると、符号化制御部108が第1符号化モードの予測方向を決定する(S601)
。前述したように第1符号化部103は空間予測及び変換・量子化処理による一般的な符
号化を行うものとする。空間予測の予測方向については任意の方法により決定して良い。
本実施形態では、すべての予測方向の内、予測画像と入力画像との誤差が最も小さくなる
予測方向を選択する例について述べる。
FIG. 6 illustrates an example of a processing flow of the image encoding device 100.
First, when the image coding apparatus 100 receives pixel data included in the processing target unit in the input image, the coding control unit 108 determines the prediction direction of the first coding mode (S601).
. As described above, the first encoding unit 103 performs general encoding by spatial prediction and transform / quantization processing. The prediction direction of the spatial prediction may be determined by an arbitrary method.
In the present embodiment, an example will be described in which the prediction direction that minimizes the error between the prediction image and the input image is selected from all prediction directions.

次に、符号化モード判定部106が第1符号化モードと第2符号化モードの何れで符号
化を行うかの判定を行う(S602)。第1符号化モードと第2符号化モードの何れで符
号化を行うかを示す符号化モード情報は、スイッチ101に送られる。尚、符号化モード
判定部106における処理の詳細については後述する。
Next, the encoding mode determination unit 106 determines whether the encoding is performed in the first encoding mode or the second encoding mode (S602). Coding mode information indicating whether encoding is performed in the first encoding mode or the second encoding mode is sent to the switch 101. Details of the processing in the encoding mode determination unit 106 will be described later.

S601、S602を各ユニットの最初のNサイクルにおいて実行する。   S601 and S602 are executed in the first N cycles of each unit.

スイッチ101は、符号化モード情報が第1符号化モードを示す場合には(S603,
yes)、入力画像を第1符号化部103へ送る。
When the coding mode information indicates the first coding mode, the switch 101 (S603,
yes), the input image is sent to the first encoding unit 103.

第1符号化部103の予測画像生成部109は、ローカルデコード画像に含まれる隣接
ユニットの画素値から、符号化制御部108が決定した予測方向に従って予測画像を生成
する(S604)。減算部110は、入力画像から予測画像を減算することで予測誤差画
像を生成する(S605)。変換・量子化部111は、予測誤差画像に対して変換及び量
子化処理を行うことで量子化後の変換係数を生成する(S606)。変換・量子化部11
1は、第1符号化データを生成する(S607)。第1符号化データには、量子化後の変
換係数、第1符号化モードで符号化されたことを示す符号化モード情報、予測方向、量子
化パラメータなどの情報が含まれる。第1符号化データはローカルデコード生成部107
へ送られる。
The predicted image generation unit 109 of the first encoding unit 103 generates a predicted image according to the prediction direction determined by the encoding control unit 108 from the pixel values of adjacent units included in the local decoded image (S604). The subtraction unit 110 generates a prediction error image by subtracting the prediction image from the input image (S605). The transform / quantization unit 111 performs transform and quantization processing on the prediction error image to generate a transform coefficient after quantization (S606). Transformer / quantizer 11
1 generates first encoded data (S607). The first encoded data includes information such as a transform coefficient after quantization, encoding mode information indicating that encoding has been performed in the first encoding mode, a prediction direction, and a quantization parameter. The first encoded data is the local decode generation unit 107.
Sent to.

ローカルデコード生成部107は、第1符号化部103で行われた符号化処理に対応す
る復号処理を第1符号化データに対して行うことでローカルデコード画像を生成する(S
608)。生成されたローカルデコード画像は第1符号化部103及び第2符号化部10
4へと送られる。
The local decode generation unit 107 generates a local decoded image by performing a decoding process corresponding to the encoding process performed by the first encoding unit 103 on the first encoded data (S
608). The generated local decoded image is a first encoding unit 103 and a second encoding unit 10.
4 is sent.

一方、符号化モード情報が第2符号化モードを示す場合には(S603,no)、第2
符号化部104は、第2符号化モードの予測画像を生成する(S609)。本実施形態の
第2符号化部104の動作について詳細に説明する。第2符号化部104は予め定めた符
号量で符号化を行う。第1符号化部103による符号化で所望の符号量を超過する可能性
がある場合には第2符号化部104での符号化へ切り替えることができる。第2符号化部
104における符号化方法としては任意の方法を用いて良いが、前述のように特定の符号
量での符号化が求められる。さらに、第1符号化部103で発生しうる符号量と比較して
十分小さな符号量で符号化できることが望ましい。本実施形態では、例えば量子化後の変
換係数を符号化せず、予測画像をそのままローカルデコード画像とすることで固定長での
符号化を実現する。
On the other hand, when the encoding mode information indicates the second encoding mode (S603, no), the second
The encoding unit 104 generates a prediction image in the second encoding mode (S609). The operation of the second encoding unit 104 of this embodiment will be described in detail. The second encoding unit 104 performs encoding with a predetermined code amount. When there is a possibility that a desired code amount may be exceeded by encoding by the first encoding unit 103, switching to encoding by the second encoding unit 104 can be performed. Although any method may be used as the encoding method in the second encoding unit 104, encoding with a specific code amount is required as described above. Furthermore, it is desirable that encoding can be performed with a sufficiently small code amount as compared with the code amount that can be generated by the first encoding unit 103. In the present embodiment, for example, encoding with a fixed length is realized by encoding a prediction image as it is as a local decoded image without encoding the transform coefficient after quantization.

第2符号化部104は、第2符号化データを生成する(S610)。第2符号化データ
には、第2符号化モードで符号化されたことを示す符号化モード情報が含まれる。なお、
第2符号化部104における処理や第2符号化データの詳細については後述する。ローカ
ルデコード生成部107は、第2符号化部104で行われた符号化処理に対応する復号処
理を第2符号化データに対して行うことでローカルデコード画像を生成する(S611)
。生成されたローカルデコード画像は第1符号化部103及び第2符号化部104へと送
られる。なお、S608及びS611で生成されたローカルデコード画像は、参照画像と
して後続のユニットにおける予測処理で用いられる。
The second encoding unit 104 generates second encoded data (S610). The second encoded data includes encoding mode information indicating that encoding is performed in the second encoding mode. In addition,
Details of the processing in the second encoding unit 104 and the second encoded data will be described later. The local decode generation unit 107 generates a local decoded image by performing a decoding process corresponding to the encoding process performed by the second encoding unit 104 on the second encoded data (S611).
. The generated local decoded image is sent to the first encoding unit 103 and the second encoding unit 104. Note that the local decoded image generated in S608 and S611 is used as a reference image in prediction processing in the subsequent unit.

上記のS604〜S608、または、S609〜S611が、各ユニットの2番目のN
サイクルにおいて実行される。
The above-mentioned S604 to S608 or S609 to S611 is the second N of each unit.
Executed in a cycle.

符号化データはエントロピー符号化部105へ送られる。エントロピー符号化部105
は、第1の符号化データまたは第2の符号化データに対してエントロピー符号化を行って
ビットストリームを生成する(S612)。生成されたビットストリームを出力する(S
613)。処理対象のセグメントに含まれるユニットすべての符号化が終了していない場
合には(S614,no)、エントロピー符号化部105は発生した符号量を示す符号量
情報を生成し、符号化モード判定部106へ出力する(S615)。このとき、詳細は後
述するが、符号化モード判定部106は受け取った符号量情報とセグメント全体に対して
設定された所望の符号量との関係から、次のユニットにおける符号化モードを判定する。
また、符号量情報は符号化制御部108にもフィードバックされ、量子化パラメータの設
定などを行う際に利用される。
The encoded data is sent to the entropy encoding unit 105. Entropy encoding unit 105
Performs entropy encoding on the first encoded data or the second encoded data to generate a bitstream (S612). Output the generated bitstream (S
613). When encoding of all the units included in the segment to be processed has not been completed (S614, no), the entropy encoding unit 105 generates code amount information indicating the generated code amount, and an encoding mode determination unit The data is output to 106 (S615). At this time, although details will be described later, the encoding mode determination unit 106 determines the encoding mode in the next unit from the relationship between the received code amount information and the desired code amount set for the entire segment.
The code amount information is also fed back to the encoding control unit 108 and used when setting quantization parameters.

処理対象のセグメントに含まれるユニットすべての符号化が終わった場合(S614,
yes)、セグメントの符号化処理を終了する。
When encoding of all units included in the segment to be processed has been completed (S614)
yes), the segment encoding process ends.

上記のS612〜S615を最後のNサイクルにおいて実行する。本実施形態における
ユニットの符号化処理は以上の3ステージから構成される。図5に示すように処理順番が
前後のユニットとは1ステージずつタイミングをずらして処理を行って、複数のユニット
をパイプラインで処理する。各サイクルに含まれる処理については上述した例以外の処理
であっても構わない。また、ステージ数も3以外の数であっても構わない。
The above S612 to S615 are executed in the last N cycles. The unit encoding process in this embodiment is composed of the above three stages. As shown in FIG. 5, processing is performed by shifting the timing one stage at a time from the units in the order of processing, and a plurality of units are processed in a pipeline. The processing included in each cycle may be processing other than the example described above. Also, the number of stages may be other than three.

図7は、ユニットの符号化データにおけるシンタクスの一例を示す。図7のシンタクス
では、符号化データの先頭でまず符号化モードを示すcodec_modeが符号化され
る。codec_modeは、例えば1ビットのフラグで表現することができる。
FIG. 7 shows an example of syntax in the encoded data of a unit. In the syntax of FIG. 7, codec_mode indicating the encoding mode is first encoded at the beginning of the encoded data. For example, codec_mode can be expressed by a 1-bit flag.

符号化モード情報が第1符号化部103による符号化を示す場合、つまりcodec_
modeがMODE_1である場合、直前のユニットにおける量子化パラメータと対象ユ
ニットの量子化パラメータの差分であるdelta_qpが符号化される。続いて空間予
測の予測方向を示すpred_modeが符号化される。delta_qp及びpred
_modeは、事前に取りうる値の範囲がわかっているため、例えば固定長での符号化を
行って良い。固定長で符号化することでビットストリームに対する復号処理が簡易になる
ほか、シンタクスの値に偏りがない場合には可変長符号化と比較して符号化効率が向上す
る。最後に、量子化後の変換係数であるcoeffが可変長符号化される。尚、NUM_
COEFFは変換係数の数を示している。
When the encoding mode information indicates encoding by the first encoding unit 103, that is, codec_
When the mode is MODE_1, delta_qp that is the difference between the quantization parameter in the immediately preceding unit and the quantization parameter of the target unit is encoded. Subsequently, pred_mode indicating the prediction direction of spatial prediction is encoded. delta_qp and pred
Since the range of values that can be taken in advance is known, _mode may be encoded with a fixed length, for example. Encoding at a fixed length simplifies the decoding process for the bitstream, and improves encoding efficiency when compared to variable length encoding when there is no bias in the syntax value. Finally, coeff which is a transform coefficient after quantization is variable-length encoded. NUM_
COEFF indicates the number of conversion coefficients.

一方、符号化モード情報が第2符号化部104による符号化を示す場合、即ちcode
c_modeがMODE_2である場合、第1符号化部103による符号化と同様にpr
ed_modeが符号化される。ただし、量子化後の変換係数については符号化しない。
従って量子化パラメータを示すdelta_qpについても符号化する必要はない。
On the other hand, when the encoding mode information indicates encoding by the second encoding unit 104, that is, code.
When c_mode is MODE_2, pr is the same as the encoding by the first encoding unit 103.
ed_mode is encoded. However, the transform coefficient after quantization is not encoded.
Therefore, it is not necessary to encode delta_qp indicating the quantization parameter.

このようなシンタクス構成とすることで、第2符号化部104での符号化は大きな画質
低下を伴うが、第1符号化部103と比較して常に十分小さな符号量で符号化を行うこと
ができる。尚、上記のシンタクスは一例であり、一般的なコーデックと同様にシンタクス
を追加、または一部のシンタクスを削除しても良い。また、画像中のコンポーネントによ
ってシンタクスは変更されても構わない。
With such a syntax configuration, the encoding in the second encoding unit 104 is accompanied by a large image quality degradation, but the encoding can always be performed with a sufficiently small code amount as compared with the first encoding unit 103. it can. The above syntax is an example, and syntax may be added or a part of the syntax may be deleted in the same manner as a general codec. The syntax may be changed depending on the component in the image.

次に、符号化モード判定部106の動作について詳細に説明する。符号化モード判定部
106は、エントロピー符号化部105より発生した符号量を受け取り、セグメント内で
発生した符号量を累積して保持する。保持している累積符号量から、後続のユニットを第
1符号化モードで符号化した場合にセグメントで保証すべき符号量を超過する可能性があ
るか否かの判定を行う。超過する可能性がある場合には第2符号化モード、そうでなけれ
ば第1符号化モードを選択することで符号化モードを切り替える。
Next, the operation of the encoding mode determination unit 106 will be described in detail. The encoding mode determination unit 106 receives the code amount generated from the entropy encoding unit 105 and accumulates and stores the code amount generated in the segment. From the accumulated code amount held, it is determined whether or not there is a possibility of exceeding the code amount to be guaranteed in the segment when the subsequent unit is encoded in the first encoding mode. If there is a possibility of exceeding, the second encoding mode is selected. Otherwise, the first encoding mode is selected to switch the encoding mode.

図8は符号量の推移と符号化モードの判定の関係を示す図である。図8を参照しながら
、具体的な符号化モード判定部106の動作例を説明する。図8の横軸はセグメント内に
おけるユニットの番号を示し、縦軸は累積符号量を示す。実線は、セグメント内の残りユ
ニットをすべて第2符号化モードで符号化することを想定した場合に、ストリームバッフ
ァが破たんしない累積符号量の上限値を示す。細い破線は、目標符号量を示す。一般的に
、CBR(constant bit rate)での符号化を行う場合にはすべてのユニ
ットで均等に符号量が発生することを目標とし、量子化パラメータの制御を行うことで目
標符号量での符号化を図る。ただし、1パス符号化では事前に必ずしも目標の符号量を達
成できない。
FIG. 8 is a diagram showing the relationship between the transition of the code amount and the determination of the encoding mode. A specific operation example of the coding mode determination unit 106 will be described with reference to FIG. The horizontal axis in FIG. 8 indicates the unit number in the segment, and the vertical axis indicates the accumulated code amount. The solid line indicates the upper limit value of the accumulated code amount that the stream buffer does not break when it is assumed that all the remaining units in the segment are encoded in the second encoding mode. A thin broken line indicates the target code amount. In general, when encoding with CBR (constant bit rate), the target is to generate an equal amount of code in all units, and by controlling the quantization parameter, encoding with the target amount of code is performed. Plan However, the target code amount cannot always be achieved in advance by 1-pass encoding.

そのため、図8の、太い破線や、二点鎖線に示したようにユニット毎に符号量がばらつ
く。二点鎖線は、そのセグメント内の残りユニットをすべて第1符号化モードで符号化可
能な場合の累積符号量の一例を示す図である。実際に発生した累積符号量が実線を下回っ
ていれば、符号量を保証することができる。太い破線は、第2符号化モードが必要となる
場合の累積符号量の一例を示す図である。実際に発生した累積符号量が実線を上回ってし
まう場合には、第2符号化モードに切り替えても符号量を保証することができなくなる。
二点鎖線で示した例では、第1符号化モードでの符号化により目標符号量を大きく上回る
符号量が発生してしまっている。残りのユニットにおいて利用可能符号量限界に達するた
め、以降のユニットについてはすべて第2符号化モードで符号化することで符号量の上限
を保証する。
For this reason, the code amount varies from unit to unit as shown by the thick broken line or the two-dot chain line in FIG. The two-dot chain line is a diagram illustrating an example of the accumulated code amount when all the remaining units in the segment can be encoded in the first encoding mode. If the actually generated accumulated code amount is below the solid line, the code amount can be guaranteed. A thick broken line is a diagram illustrating an example of the accumulated code amount when the second encoding mode is required. When the accumulated code amount actually generated exceeds the solid line, the code amount cannot be guaranteed even if the second encoding mode is switched.
In the example indicated by the two-dot chain line, the code amount greatly exceeding the target code amount is generated by the encoding in the first encoding mode. Since the remaining code amount limit is reached in the remaining units, the subsequent units are all encoded in the second encoding mode to guarantee the upper limit of the code amount.

上記の動作を行うため、符号化モード判定部106は式(1)、(2)により符号化モ
ードを判定する。

Figure 0006360591

Figure 0006360591
In order to perform the above operation, the encoding mode determination unit 106 determines the encoding mode according to the equations (1) and (2).
Figure 0006360591

Figure 0006360591

まず、式(1)について説明する。Btargetはセグメントにおける目標符号量で
ある。Bavailableはセグメント内のこれから符号化を行うユニットのうち、符
号化モードの判定を行っているユニット(以下、対象ユニットと記載)を除く残りユニッ
トにおける利用可能符号量である。Btotalは対象ユニットの符号化モード判定時に
フィードバックされている累積符号量を示す。Btargetから、Btotalを減じ
ることでBavailableが算出できる。
First, equation (1) will be described. Btarget is the target code amount in the segment. Available is the available code amount in the remaining units excluding the unit that performs encoding mode determination (hereinafter referred to as the target unit) among the units to be encoded in the segment. Btotal indicates the accumulated code amount fed back when determining the encoding mode of the target unit. Bavailable can be calculated by subtracting Btotal from Btarget.

図5に示したように、本実施形態の符号化装置100は、パイプライン処理を行うため
、符号量のフィードバックには遅延が生じる。即ち、図5の例ではUnit#3の符号化
モードの判定を行う時点ではUnit#0の符号量までしかフィードバックされず、Un
it#1及びUnit#2の発生符号量は不明である。そこで、式(1)では、第1符号
化モードで理論的に発生しうる最大ビット数Bmaxを定義し、対象ユニットを含めて発
生符号量が不明なユニットについては最大ビット数が発生したものとして残りユニットで
利用可能な符号量を算出している。尚、図5に示す例では符号量のフィードバックにおけ
る遅延ユニット数Udelayは2となる。遅延ユニット数は、パイプライン構成や処理
内容に応じて適宜変更される。
As shown in FIG. 5, since the encoding apparatus 100 according to the present embodiment performs pipeline processing, a delay occurs in the feedback of the code amount. That is, in the example of FIG. 5, at the time of determining the encoding mode of Unit # 3, only the code amount of Unit # 0 is fed back.
The generated code amounts of it # 1 and Unit # 2 are unknown. Therefore, in equation (1), the maximum number of bits Bmax that can theoretically be generated in the first encoding mode is defined, and the maximum number of bits is generated for a unit whose generated code amount is unknown, including the target unit. The amount of code that can be used by the remaining units is calculated. In the example shown in FIG. 5, the number of delay units Udelay in the feedback of the code amount is 2. The number of delay units is changed as appropriate according to the pipeline configuration and processing contents.

次に、式(2)について説明する。Bminは第2符号化モードにより発生する符号量
を示す。Uleftは対象ユニット、および遅延ユニットを除く、残りユニットの数を示
している。即ち、符号量フィードバック遅延分のユニット、及び対象ユニットで仮に最大
符号量が発生したとしても利用可能符号量限界を下回る場合には第1符号化モードで符号
化を行う。そうでなければ対象ユニットからは、第2符号化モードで符号化を行うことで
符号量を保証する。以上が画像符号化装置100に関する処理である。
Next, equation (2) will be described. Bmin indicates the amount of code generated in the second encoding mode. Uleft indicates the number of remaining units excluding the target unit and the delay unit. That is, even if the maximum code amount is generated in the code amount feedback delay unit and the target unit, encoding is performed in the first encoding mode if the code amount falls below the available code amount limit. Otherwise, the code amount is guaranteed from the target unit by performing encoding in the second encoding mode. The above is the processing related to the image encoding device 100.

本実施形態では、通常の変換・量子化を行う第1の符号化モードに加え、符号量を一意
に定めることができ、かつ第1の符号化モードと比較して小さな符号量にて符号化を行う
第2の符号化モードを用意し、前記2つの符号化モードを切り替えることで所望の符号量
を上回らないことを保証する。例えば、各符号化処理単位(ユニット)に対して通常は第
1の符号化モードで符号化を行い、符号量を保証する単位(セグメント)において、残り
のユニットをすべて第2の符号化モードで符号化しなければ符号量を保証できなくなるこ
とがわかった時点で第2の符号化モードによる符号化に切り替えることで、確実に符号量
を保証することができる。また、上記のように符号化モードを判定することで、可能な限
り通常の第1符号化モードでの符号化を行い、符号量が不足する場合にのみ第2符号化モ
ードでの符号化を行うことで符号量が不足する直前までは通常の符号化による画質を維持
しつつセグメントにおける累積符号量の上限を保証することができる。
In the present embodiment, in addition to the first encoding mode in which normal conversion / quantization is performed, the code amount can be uniquely determined, and encoding is performed with a smaller code amount than in the first encoding mode. A second encoding mode for performing the above is prepared, and it is ensured that the desired code amount is not exceeded by switching between the two encoding modes. For example, each encoding processing unit (unit) is normally encoded in the first encoding mode, and in the unit (segment) that guarantees the code amount, all the remaining units are all in the second encoding mode. By switching to encoding in the second encoding mode when it is found that the encoding amount cannot be guaranteed unless encoding is performed, the encoding amount can be reliably ensured. Also, by determining the encoding mode as described above, encoding in the normal first encoding mode is performed as much as possible, and encoding in the second encoding mode is performed only when the code amount is insufficient. By doing so, it is possible to guarantee the upper limit of the accumulated code amount in the segment while maintaining the image quality by the normal encoding until immediately before the code amount is insufficient.

(第2の実施形態)
第1の実施形態における画像符号化装置100では符号量のフィードバックに遅延が生
じていたため、式(1)に示すように第1符号化モードで発生しうる最大の符号量を複数
ユニット分加算する必要があった。これは、マージンを持って制御を行っていることに等
しく、圧縮率やセグメントのサイズによってはマージンが大きなオーバーヘッドとなり、
所望の符号量を大きく下回って十分な画質が得られない可能性がある。そこで、本実施形
態では符号量のフィードバック遅延が生じない様な処理を行う点で異なる。
(Second Embodiment)
In the image coding apparatus 100 according to the first embodiment, since a delay has occurred in the feedback of the code amount, the maximum code amount that can be generated in the first encoding mode is added for a plurality of units as shown in Expression (1). There was a need. This is equivalent to controlling with a margin, and depending on the compression ratio and segment size, the margin becomes a large overhead,
There is a possibility that sufficient image quality may not be obtained by far below the desired code amount. Therefore, the present embodiment is different in that processing is performed so as not to cause a feedback delay of the code amount.

図9は、本実施形態の画像符号化装置200を示す図である。画像符号化装置200は
、第1符号化部103、第2符号化部104、エントロピー符号化部105A、エントロ
ピー符号化部105B、ローカルデコード生成部107A、ローカルデコード生成部10
7B、符号化制御部108、スイッチ114、スイッチ115及び符号化モード判定部1
16を有する。
FIG. 9 is a diagram illustrating an image encoding device 200 according to the present embodiment. The image encoding device 200 includes a first encoding unit 103, a second encoding unit 104, an entropy encoding unit 105A, an entropy encoding unit 105B, a local decode generation unit 107A, and a local decode generation unit 10.
7B, encoding control unit 108, switch 114, switch 115, and encoding mode determination unit 1
16

第1符号化部103、第2符号化部104及び符号化制御部108は、画像符号化装置
100と同様の動作を行うため、説明を省略する。また、エントロピー符号化部105A
及び105Bはそれぞれエントロピー符号化部105と同一の動作を行い、ローカルデコ
ード生成部107A及びローカルデコード生成部107Bはそれぞれローカルデコード生
成部107と同一の動作を行うため、これらについても説明を省略する。
The first encoding unit 103, the second encoding unit 104, and the encoding control unit 108 perform the same operations as those of the image encoding device 100, and thus the description thereof is omitted. Further, the entropy encoding unit 105A
And 105B perform the same operation as the entropy encoding unit 105, and the local decode generation unit 107A and the local decode generation unit 107B perform the same operation as the local decode generation unit 107, respectively, and thus description thereof will be omitted.

スイッチ114は、ローカルデコード生成部107Aとローカルデコード生成部107
Bから第1符号化モードと第2符号化モードそれぞれのローカルデコード画像を受け取り
、符号化モード判定部116が決定した符号化モードに従って何れかの符号化データを選
択して第1符号化部103及び第2符号化部104へと送る。送られたローカルデコード
画像は後続のユニットを符号化する際に参照画像として予測に用いられる。
The switch 114 includes a local decode generator 107A and a local decode generator 107.
B receives local decoded images of the first encoding mode and the second encoding mode from B, selects any encoded data according to the encoding mode determined by the encoding mode determination unit 116, and selects the first encoding unit 103. And sent to the second encoding unit 104. The sent local decoded image is used for prediction as a reference image when a subsequent unit is encoded.

スイッチ115は、符号化モード判定部116より符号化モード情報を受け取る。スイ
ッチ115は、符号化モード情報が第1符号化モードを示す場合には、エントロピー符号
化部105Aより第1の符号化モードのビットストリームを受け取る。符号化モード情報
が、第2符号化モードを示す場合には、エントロピー符号化部105Bから第2符号化モ
ードのビットストリームを受け取る。その後、受け取ったビットストリームを出力する。
The switch 115 receives the encoding mode information from the encoding mode determination unit 116. When the coding mode information indicates the first coding mode, the switch 115 receives the bit stream of the first coding mode from the entropy coding unit 105A. When the encoding mode information indicates the second encoding mode, the bit stream of the second encoding mode is received from the entropy encoding unit 105B. Thereafter, the received bit stream is output.

符号化モード判定部116は、エントロピー符号化部105Aから第1符号化モードで
符号化した際に発生した符号量を受け取り、対象ユニットに対する符号化モード情報を設
定してスイッチ114及びスイッチ115に出力する。符号化モード判定部116は、後
続ユニットに対する符号化モードではなく現在の符号化対象ユニットに対する符号化モー
ドを設定する点が符号化モード判定部106と異なる。
The encoding mode determination unit 116 receives the code amount generated when encoding is performed in the first encoding mode from the entropy encoding unit 105A, sets the encoding mode information for the target unit, and outputs it to the switch 114 and the switch 115 To do. The encoding mode determination unit 116 is different from the encoding mode determination unit 106 in that the encoding mode for the current encoding target unit is set instead of the encoding mode for the subsequent unit.

次に、本実施形態の画像符号化装置200の符号化処理について図9、図10及び図1
1を用いて詳細に説明する。
Next, the encoding process of the image encoding device 200 according to the present embodiment will be described with reference to FIGS.
1 will be described in detail.

図10は、画像符号化装置200の動作タイミングチャートである。   FIG. 10 is an operation timing chart of the image encoding device 200.

画像符号化装置200は、入力画像を受け取りユニット毎にパイプラインで符号化処理
を行う。符号化処理は図10に示すタイミングチャートに従うが、画像符号化装置100
とは異なり、第1符号化モードと第2符号化モードでの符号化を両方実行してビットスト
リームを生成し、最後に符号化モード判定を行う。
The image encoding device 200 receives an input image and performs an encoding process in a pipeline for each unit. The encoding process follows the timing chart shown in FIG.
Unlike the above, encoding in both the first encoding mode and the second encoding mode is executed to generate a bitstream, and finally the encoding mode is determined.

図11は、処理のフローチャートの一例を表す図である。   FIG. 11 is a diagram illustrating an example of a flowchart of processing.

画像符号化装置200が入力画像中の処理対象ユニットに対応する画素を受け取ると、
符号化制御部108が第1符号化モードの予測方向を決定する(S1101)。
When the image encoding device 200 receives a pixel corresponding to the processing target unit in the input image,
The encoding control unit 108 determines the prediction direction of the first encoding mode (S1101).

第1符号化部103の予測画像生成部109が、S1101で決定した予測方向に従っ
て、ローカルデコード画像に含まれる隣接ユニットの画素値から予測画像を生成する。減
算部110は、入力画像から予測画像を減算することで予測誤差画像を生成する(S11
03)。
The predicted image generation unit 109 of the first encoding unit 103 generates a predicted image from the pixel values of adjacent units included in the local decoded image according to the prediction direction determined in S1101. The subtraction unit 110 generates a prediction error image by subtracting the prediction image from the input image (S11).
03).

変換・量子化部111は、予測誤差画像に対して変換及び量子化処理を行うことで量子
化後の変換係数を生成する(S1104)。
The transform / quantization unit 111 performs transform and quantization processing on the prediction error image to generate a transform coefficient after quantization (S1104).

変換・量子化部111は、第1符号化データを生成する(S1105)。第1符号化デ
ータには、量子化後の変換係数、第1符号化モードで符号化されたことを示す符号化モー
ド情報、予測方向、量子化パラメータが含まれる。
The transform / quantization unit 111 generates first encoded data (S1105). The first encoded data includes a transform coefficient after quantization, encoding mode information indicating that encoding has been performed in the first encoding mode, a prediction direction, and a quantization parameter.

ローカルデコード生成部107Aは、第1符号化データに対して、行われた符号化処理
に対応する復号処理を行うことでローカルデコード画像を生成する(S1106)。生成
されたローカルデコード画像はスイッチ114へ送られる。エントロピー符号化部105
Aは、第1符号化データに対して、エントロピー符号化を行うことで、ビットストリーム
を生成する(S1107)。
The local decode generation unit 107A generates a local decoded image by performing a decoding process corresponding to the encoding process performed on the first encoded data (S1106). The generated local decoded image is sent to the switch 114. Entropy encoding unit 105
A performs entropy encoding on the first encoded data to generate a bitstream (S1107).

S1101〜1107において、第1符号化モードでの符号化が行われるが、入力画像
は第2符号化部104にも入力され、第2符号化モードでの符号化についても行われる。
図11では、第1の実施形態と同様に第2符号化部104が変換・量子化を行わない例に
ついて述べるが、第2符号化部104の符号化方法はこれに限られるものではない。
In S1101 to 1107, encoding in the first encoding mode is performed, but the input image is also input to the second encoding unit 104, and encoding is also performed in the second encoding mode.
FIG. 11 describes an example in which the second encoding unit 104 does not perform transformation / quantization as in the first embodiment. However, the encoding method of the second encoding unit 104 is not limited to this.

第2符号化部104は、予測画像を生成して第2符号化データを生成する(S1108
)。第2符号化データはローカルデコード生成部107Bへ送られる。
The second encoding unit 104 generates a predicted image and generates second encoded data (S1108).
). The second encoded data is sent to the local decode generation unit 107B.

ローカルデコード生成部107Bは、第2符号化データに対して、行われた符号化処理
に対応する復号処理を行うことでローカルデコード画像を生成する(S1110)。この
例では、予測画像がそのままローカルデコード画像となるため、第2符号化部104から
予測画像を受け取ってそのままローカルデコード画像としても良いし、第2符号化部10
4と同様の予測処理を行っても良い。生成されたローカルデコード画像はスイッチ114
へ送られる。
The local decode generation unit 107B generates a local decoded image by performing a decoding process corresponding to the encoding process performed on the second encoded data (S1110). In this example, since the predicted image becomes a local decoded image as it is, the predicted image may be received from the second encoding unit 104 and used as it is as a local decoded image, or the second encoding unit 10
4 may be performed. The generated local decoded image is displayed on the switch 114.
Sent to.

また、第2符号化データはエントロピー符号化部105Bへ送られる。エントロピー符
号化部105Bは、第2符号化データをエントロピー符号化することで、ビットストリー
ムを生成する(S1111)。
The second encoded data is sent to the entropy encoding unit 105B. The entropy encoding unit 105B generates a bit stream by entropy encoding the second encoded data (S1111).

符号化モード判定部116はエントロピー符号化部105Aより発生符号量を受け取り
、対象ユニットに対する符号化モードの判定を行う(S1112)。符号化モード情報は
、スイッチ114及びスイッチ115に送られる。符号化モード判定部116の処理の詳
細は後述する。
The encoding mode determination unit 116 receives the generated code amount from the entropy encoding unit 105A, and determines the encoding mode for the target unit (S1112). The encoding mode information is sent to the switch 114 and the switch 115. Details of the processing of the encoding mode determination unit 116 will be described later.

符号化モード情報が第1符号化モードを示す場合には(S1113,yes)、スイッ
チ114は、ローカルデコード生成部107Aから受け取った第1符号化モードのローカ
ルデコード画像を、第1符号化部103、第2符号化部104に送る(S1114)。ス
イッチ115は、エントロピー符号化部105Aから受け取った第1符号化モードのビッ
トストリームを出力する(S1115)。
When the encoding mode information indicates the first encoding mode (S1113, yes), the switch 114 converts the local decoding image in the first encoding mode received from the local decoding generation unit 107A into the first encoding unit 103. And sent to the second encoding unit 104 (S1114). The switch 115 outputs the bit stream of the first encoding mode received from the entropy encoding unit 105A (S1115).

符号化モード情報が第2符号化モードを示す場合には(S1113,no)、スイッチ
114は、ローカルデコード生成部107Bから受け取った第2符号化モードのローカル
デコード画像を、第1符号化部103、第2符号化部104に送る(S1116)。スイ
ッチ115は、エントロピー符号化部105Bから受け取った第2符号化モードのビット
ストリームを出力する(S1117)。
When the encoding mode information indicates the second encoding mode (S1113, no), the switch 114 converts the local decoding image in the second encoding mode received from the local decoding generation unit 107B into the first encoding unit 103. And sent to the second encoding unit 104 (S1116). The switch 115 outputs the bit stream of the second encoding mode received from the entropy encoding unit 105B (S1117).

処理対象のセグメントに含まれるユニットすべての符号化が終わっていない場合(S1
118,no)、エントロピー符号化部105A及びエントロピー符号化部105Bは、
発生符号量を、符号化モード判定部116に送る(S1119)。ただし、第2符号化モ
ードは固定符号量による符号化を行うため、必ずしもエントロピー符号化部105Bから
発生符号量を送る必要はない。
When encoding of all units included in the segment to be processed has not been completed (S1
118, no), the entropy encoding unit 105A and the entropy encoding unit 105B,
The generated code amount is sent to the encoding mode determination unit 116 (S1119). However, since the second encoding mode performs encoding with a fixed code amount, it is not always necessary to send the generated code amount from the entropy encoding unit 105B.

処理対象のセグメントに含まれるユニットすべての符号化が終わった場合(S1118
,yes)、セグメントの符号化処理を終了する。
When encoding of all units included in the segment to be processed is completed (S1118)
, Yes), the segment encoding process ends.

符号化モード判定部116の動作について詳細に説明する。符号化モード判定部116
は、エントロピー符号化部105Aより第1符号化モードで発生した符号量を受け取り、
対象ユニットにおける符号化モードの判定を行う。画像符号化装置200は、図10に示
すように各ユニットに対するすべての処理ステージが完了した後に符号化モードを判定す
る点が画像符号化装置100とは異なる。そのため、パイプライン処理を行った場合であ
っても、符号量のフィードバックにおける遅延がなくなる。
The operation of the encoding mode determination unit 116 will be described in detail. Coding mode determination unit 116
Receives the code amount generated in the first encoding mode from the entropy encoding unit 105A,
The encoding mode in the target unit is determined. The image coding apparatus 200 differs from the image coding apparatus 100 in that the coding mode is determined after all processing stages for each unit are completed as shown in FIG. Therefore, even when pipeline processing is performed, there is no delay in code amount feedback.

符号化モード判定部116は、式(3)によって、残りユニットでの利用可能符号量B
availableの算出を行う。

Figure 0006360591
The encoding mode determination unit 116 calculates the available code amount B in the remaining unit according to Equation (3).
The availability is calculated.
Figure 0006360591

ここで、Bcurrentは対象ユニットにおいて第1符号化モードで符号化した場合
に発生する符号量を示す。符号化モード判定部116は、エントロピー符号化部105A
よりBcurrentを受け取る。Btotalは式(1)と同様に対象ユニット符号化
時にフィードバックされている累積符号量を示す。図11に示すように直前のユニットで
発生した符号量が即座にフィードバックできる点が、画像符号化装置100とは異なる。
式(3)により算出したBavailableを用いて式(2)によって符号化モード
の判定を行う。本実施形態では、上記のように符号化モードを判定することで、数ユニッ
ト分の最大符号量に相当するマージンを持たずに符号化モードの判定ができる。そのため
、より画質劣化の少ない符号化を実現できる。 第2符号化部104の動作について詳細
に説明する。画像符号化装置100と同様に、本実施形態の第2符号化部104は予め定
めた符号量以下で符号化を行えば任意の方法を用いて良い。しかしながら、画像符号化装
置200は、画像符号化装置100と比較するとローカルデコード画像の生成に関して制
約が存在する。図10に示すタイミングで処理を行うことで、第1符号化モードと第2符
号化モードによる符号化処理は同時に実行される。パイプライン処理であるため、各ユニ
ットの2番目の処理ステージにおいてローカルデコード画像の一部が確定していなければ
ならない。例えば、Unit#0が3番目の処理ステージを実行するときUnit#1は
2番目の処理ステージで第1の符号化モードによる符号化を実行するため、Unit#1
の予測に用いられるローカルデコード画像が決定されている必要がある。各ユニットにお
ける右端の画素については、予測で用いられるためにローカルデコード画像が第1符号化
処理と第2符号化処理で異なってはならないという制約がある。
Here, Bcurrent indicates a code amount generated when encoding is performed in the first encoding mode in the target unit. The encoding mode determination unit 116 includes an entropy encoding unit 105A.
Bcurrent is received. Btotal indicates the accumulated code amount fed back at the time of encoding the target unit as in the equation (1). As shown in FIG. 11, the point that the amount of code generated in the immediately preceding unit can be immediately fed back is different from the image coding apparatus 100.
The coding mode is determined by Equation (2) using the available value calculated by Equation (3). In this embodiment, by determining the encoding mode as described above, it is possible to determine the encoding mode without having a margin corresponding to the maximum code amount for several units. Therefore, encoding with less image quality deterioration can be realized. The operation of the second encoding unit 104 will be described in detail. Similar to the image encoding device 100, the second encoding unit 104 of the present embodiment may use any method as long as encoding is performed with a predetermined code amount or less. However, the image encoding device 200 has restrictions on the generation of a local decoded image as compared with the image encoding device 100. By performing the processing at the timing shown in FIG. 10, the encoding processing in the first encoding mode and the second encoding mode is executed simultaneously. Since this is pipeline processing, a part of the local decoded image must be determined in the second processing stage of each unit. For example, when Unit # 0 executes the third processing stage, Unit # 1 executes encoding in the first encoding mode at the second processing stage, so Unit # 1
It is necessary to determine a local decoded image to be used for the prediction. Since the rightmost pixel in each unit is used in prediction, there is a restriction that the local decoded image must not differ between the first encoding process and the second encoding process.

図12は、本実施形態におけるユニットの符号化データのシンタクスの例を示す図であ
る。図12に示すシンタクスによって、上記の問題を解決することができる。図12にお
いて、codec_modeがMODE_1である場合、第1の符号化モードにおけるシ
ンタクスは図7と同様である。一方、codec_modeがMODE_2である場合、
第2の符号化モードにおけるシンタクスは図7と異なる。図7におけるシンタクスでは、
予測方向に関する情報のみを符号化するため、ローカルデコード画像は予測画像と等しく
なる。そのため、本実施形態の第1の符号化モードで生成されるローカルデコード画像と
は異なってしまう場合があった。そこで、隣接する直後のユニットの予測に用いられる画
素についてはpixel_valueとして第1の符号化モードで生成されるローカルデ
コード画像の画素値をPCM(pulse code modulation)で符号化す
れば良い。この場合のPCMは、画素値をそのまま出力する処理を指す。NUM_PCM
_PIXELは、pixel_valueによって符号化される画素数を示す。この場合
、図7と比較して第2の符号化モードにおける符号量は大きくなるが、後続ユニットの予
測に関する問題は解決できる。
図13は、本実施形態におけるユニットの符号化データのシンタクスの別の例を示す図で
ある。図13では、第2の符号化モードが選択された場合には追加の情報を符号化せず、
予測方向に制限を設けている。式(3)及び式(2)から、一度第2の符号化モードが選
択された場合には同一セグメントにおいて第1の符号化モードが選択されることはない。
そのため、例えば左ユニットからの予測を禁止することで、後続ユニットの予測に関する
問題を解決することができる。本実施形態では、第2の符号化モードでは常に上からの予
測のみを行う例について述べている。上からの予測は一例であり、後続ユニットの予測に
影響を与えない限りどの方向であっても構わない。 第2の符号化モードによる符号化で
は、画質が大きく劣化する。本実施形態では上記のような符号化モード判定を行うことで
、画像符号化装置100と比較してより第2の符号化モードが選択されないように制御し
、セグメントで発生する累積符号量の上限を保証することができる。
FIG. 12 is a diagram illustrating an example of syntax of encoded data of units in the present embodiment. The above problem can be solved by the syntax shown in FIG. In FIG. 12, when codec_mode is MODE_1, the syntax in the first encoding mode is the same as that in FIG. On the other hand, when codec_mode is MODE_2,
The syntax in the second encoding mode is different from that in FIG. In the syntax in FIG.
Since only the information related to the prediction direction is encoded, the local decoded image becomes equal to the predicted image. Therefore, the local decoded image generated in the first encoding mode of the present embodiment may be different. Therefore, the pixel value of the local decoded image generated in the first encoding mode may be encoded by pixel code (value) as pixel_value for the pixel used for prediction of the immediately adjacent unit. PCM in this case refers to processing for outputting pixel values as they are. NUM_PCM
_PIXEL indicates the number of pixels encoded by pixel_value. In this case, the code amount in the second encoding mode is larger than that in FIG. 7, but the problem relating to the prediction of subsequent units can be solved.
FIG. 13 is a diagram illustrating another example of the syntax of the encoded data of the unit in the present embodiment. In FIG. 13, when the second encoding mode is selected, no additional information is encoded,
There are restrictions on the prediction direction. From equations (3) and (2), once the second encoding mode is selected, the first encoding mode is not selected in the same segment.
Therefore, for example, by prohibiting prediction from the left unit, it is possible to solve the problem related to prediction of the subsequent unit. In this embodiment, an example in which only prediction from above is always performed in the second encoding mode is described. The prediction from above is an example, and any direction may be used as long as it does not affect the prediction of subsequent units. In the encoding by the second encoding mode, the image quality is greatly deteriorated. In the present embodiment, by performing the coding mode determination as described above, the second coding mode is controlled so as not to be selected as compared with the image coding device 100, and the upper limit of the cumulative code amount generated in the segment is controlled. Can be guaranteed.

(第3の実施形態)
画像符号化装置200は、セグメント単位で符号量を保証するために、第1符号化部1
03と第2符号化部104を適応的に切り替えていた。ただし、画像符号化装置200は
、セグメント単位の符号量については保証できるものの、ユニット単位の符号量について
は必ずしも保証することができない。例えば、符号化パラメータによっては、第1符号化
部103が符号化を行うことで入力画像のデータ量よりも大きな符号量の符号化データが
生成される可能性があった。そこで、本実施形態の符号化装置300は、第1符号化部1
03及び第2符号化部104とは異なる方法で符号化を行う第3符号化部117を備える
(Third embodiment)
The image encoding device 200 includes a first encoding unit 1 in order to guarantee the code amount in segment units.
03 and the second encoding unit 104 are adaptively switched. However, the image coding apparatus 200 can guarantee the code amount in the segment unit, but cannot guarantee the code amount in the unit unit. For example, depending on the encoding parameter, there is a possibility that encoded data having a code amount larger than the data amount of the input image is generated by the first encoding unit 103 performing encoding. Therefore, the encoding apparatus 300 of the present embodiment includes the first encoding unit 1
03 and the 3rd encoding part 117 which encodes by the method different from the 2nd encoding part 104 are provided.

図14は、画像符号化装置300を示す図である。   FIG. 14 is a diagram illustrating the image encoding device 300.

画像符号化装置300は、第1符号化部103、第2符号化部104、第3符号化部1
17、エントロピー符号化部105A〜C、モード判定部120、スイッチ118、スイ
ッチ119、ローカルでコード生成部107A〜C、符号化制御部108を備える。画像
符号化装置100、200と同様の動作を行う構成は、以下説明を省略する。 第3符号
化部117は、符号化対象ユニットの画素を受け取り、予め定めた符号量となるよう符号
化処理を行い、第3符号化データを生成する。
The image encoding device 300 includes a first encoding unit 103, a second encoding unit 104, and a third encoding unit 1
17, entropy encoding units 105A to 105C, mode determination unit 120, switch 118, switch 119, local code generation units 107A to 107C, and encoding control unit 108. A description of the configuration that performs the same operation as that of the image encoding devices 100 and 200 will be omitted. The third encoding unit 117 receives the pixels of the encoding target unit, performs an encoding process so as to obtain a predetermined code amount, and generates third encoded data.

スイッチ118は、ローカルデコード生成部107A、ローカルデコード生成部107
B及びローカルデコード生成部107Cから第1符号化モード、第2符号化モード及び第
3符号化モードそれぞれのローカルデコード画像を受け取る。スイッチ118は、符号化
モード判定部120が決定した符号化モードに従って何れかのローカルデコード画像を、
第1符号化部103、第2符号化部104、及び第3符号化部117へと送る。ローカル
デコード画像は後続のユニットを符号化する際に参照画像として予測に用いられる。
The switch 118 includes a local decode generation unit 107A and a local decode generation unit 107.
The local decoding images of the first encoding mode, the second encoding mode, and the third encoding mode are received from the B and local decode generation unit 107C. The switch 118 selects any local decoded image according to the encoding mode determined by the encoding mode determination unit 120.
The data is sent to the first encoding unit 103, the second encoding unit 104, and the third encoding unit 117. The local decoded image is used for prediction as a reference image when a subsequent unit is encoded.

スイッチ119は、エントロピー符号化部105A、エントロピー符号化部105B及
びエントロピー符号化部105Cから第1符号化モード、第2符号化モード及び第3符号
化モードそれぞれのビットストリームを受け取る。スイッチ119は、符号化モード判定
部120が決定した符号化モードに従って何れかのビットストリームを出力する。
The switch 119 receives bit streams of the first encoding mode, the second encoding mode, and the third encoding mode from the entropy encoding unit 105A, the entropy encoding unit 105B, and the entropy encoding unit 105C. The switch 119 outputs any bit stream according to the encoding mode determined by the encoding mode determination unit 120.

符号化モード判定部120は、エントロピー符号化部105Aから第1符号化モードで
符号化した際に発生した符号量を受け取り、対象ユニットに対する符号化モード情報を設
定してスイッチ118及びスイッチ119に出力する。 画像符号化装置300の全体の
処理フローについては図示しての説明を省略する。例えば、図11のS1101〜S11
07,及びS1108〜S1111と同時に第3符号化部117が符号化を行い、選択さ
れた符号化モードに従ったビットストリームを出力すればよい。以下の説明では、画像符
号化装置300が図10のタイミングチャートに従ってパイプライン処理を行う動作につ
いて例示する。なお、別の変形例として、第1の実施形態で示した様に、判定された符号
化モードが第3符号化モードを示す場合に、第3符号化部117が、第3符号化データ及
びローカルデコード画像を生成する構成であってもよい。 第3符号化部117の動作に
ついて詳細に説明する。
The encoding mode determination unit 120 receives the amount of code generated when encoding in the first encoding mode from the entropy encoding unit 105A, sets the encoding mode information for the target unit, and outputs it to the switch 118 and the switch 119 To do. The overall processing flow of the image encoding device 300 will not be described. For example, S1101 to S11 in FIG.
The third encoding unit 117 may perform encoding at the same time as 07 and S1108 to S1111 and output a bit stream according to the selected encoding mode. In the following description, an example in which the image encoding device 300 performs pipeline processing according to the timing chart of FIG. As another modification, as shown in the first embodiment, when the determined encoding mode indicates the third encoding mode, the third encoding unit 117 includes the third encoded data and It may be configured to generate a local decoded image. The operation of the third encoding unit 117 will be described in detail.

図17は、第3符号化部117が符号化モードを判定する動作の詳細を示す図である。
前述のとおり、第1符号化部103による符号化ではユニット単位の符号量については
必ずしも保証することができなかった。一方、第2符号化部104では予め定めた符号量
にて符号化を行うため、ユニット単位でも符号量を保証することができる。しかしながら
、第2符号化部104による符号化は、セグメント単位の目標符号量を超過する場合を想
定しているため著しい画質劣化を伴う。
FIG. 17 is a diagram illustrating details of an operation in which the third encoding unit 117 determines the encoding mode.
As described above, the encoding amount by the first encoding unit 103 cannot always guarantee the unit-unit code amount. On the other hand, since the second encoding unit 104 performs encoding with a predetermined code amount, the code amount can be guaranteed even in units. However, since the encoding by the second encoding unit 104 is assumed to exceed the target code amount for each segment, the image quality is significantly deteriorated.

第3符号化部117は予め定めた符号量以下で符号化を行う。第3符号化部117の符
号量は第2符号化部104の符号量より十分大きいものとする。第1符号化部103によ
り符号化を行った場合に、第3符号化部117の符号量よりも大きな符号量が発生した場
合には第3符号化部117での符号化へ切り替えることで、ユニット単位の最大発生符号
量についても保証することが可能となる。
The third encoding unit 117 performs encoding with a predetermined code amount or less. It is assumed that the code amount of the third encoding unit 117 is sufficiently larger than the code amount of the second encoding unit 104. When encoding is performed by the first encoding unit 103 and a code amount larger than the code amount of the third encoding unit 117 is generated, switching to encoding by the third encoding unit 117 is performed. It is possible to guarantee the maximum generated code amount in units.

第3符号化部117における符号化方法としては任意の方法を用いて良いが、前述のよ
うに特定の符号量以下での符号化が求められる。例えば、PCMモードにより入力画像の
画素値をそのまま出力しても良い。前述のように第1符号化部103による符号化では入
力画像のデータ量を超過する符号化データが生成される場合がある。そこで、第3符号化
モードをPCMとすることで、第1符号化部103で入力画像のデータ量を超過する場合
にはPCMによる符号化を行うことができる。この場合のシンタクス例を図15に示す。
codec_modeがMODE_1及びMODE_2を示す場合については図13と同
一であるが、MODE_3、即ち第3符号化モードである場合にはNUM_PIXEL_
UNITで示されるユニット内の画素数分だけ画素値がinput_pixel_val
ueとして符号化される。
Although any method may be used as the encoding method in the third encoding unit 117, encoding with a specific code amount or less is required as described above. For example, the pixel value of the input image may be output as it is in the PCM mode. As described above, the encoding by the first encoding unit 103 may generate encoded data that exceeds the data amount of the input image. Therefore, by setting the third encoding mode to PCM, when the first encoding unit 103 exceeds the data amount of the input image, encoding by PCM can be performed. An example of syntax in this case is shown in FIG.
The case where codec_mode indicates MODE_1 and MODE_2 is the same as that in FIG. 13, but in the case of MODE_3, that is, in the third encoding mode, NUM_PIXEL_
As many pixel values as the number of pixels in the unit indicated by UNIT are input_pixel_val.
Encoded as ue.

ここではPCMの場合について説明したが、入力画像の画素値に対して量子化を行い、
画素あたりのビット数を削減しても良い。また、第1符号化部103と同様の予測・変換
処理や、隣接画素間の差分をPCM符号化する一般的なDPCM(differenti
alpulse−code modulation)による処理を行って、変換係数や誤
差画像に対して予め定めたパラメータで量子化を行っても良い。
Although the case of PCM has been described here, quantization is performed on the pixel value of the input image,
The number of bits per pixel may be reduced. In addition, a prediction / conversion process similar to that of the first encoding unit 103, or a general DPCM (differentiated) for PCM encoding a difference between adjacent pixels
It is also possible to perform quantization with a predetermined parameter for the transform coefficient and the error image by performing a process based on (alpulse-code modulation).

また、ユニット内の一部またはすべての画素について、入力画像ではなくその他の符号
化モードにより生成されるローカルデコード画像を生成する必要がある場合には、差分デ
ータを付加しても良い。第2符号化モードと同様に第3符号化モードについてもローカル
デコード画像についての制約が存在する。つまり、ユニット内で右端に存在する画素につ
いては第1符号化部103で生成されたものと同一である必要がある。例えば、PCMに
よる符号化を行う場合には、入力画像の画素値をPCMで符号化した上で、ユニットの右
端画素について第1符号化部103で生成されたローカルデコード画像の画素値と入力画
像の画素値との差分値を算出し、差分値を符号化する。それによって、上記の問題を回避
することができる。対応するローカルデコード生成部は、PCMで生成されたストリーム
を復号して得た入力画像の画素値と、復号した前記差分値を加算することでユニット内の
右端の画素を得ることができる。したがって、符号化装置300は第1符号化部103で
生成されたローカルデコード画像の画素を参照画素として予測処理を行えば良い。このと
き第3符号化部117は、第1符号化部103で生成されたローカルデコード画像の画素
値を受け取って処理を行っても良いし、第3符号化部117が生成しても良い。
Further, when it is necessary to generate a local decoded image generated not in the input image but in another encoding mode for some or all pixels in the unit, difference data may be added. Similar to the second encoding mode, there are restrictions on the local decoded image in the third encoding mode. That is, the pixel existing at the right end in the unit needs to be the same as that generated by the first encoding unit 103. For example, when encoding by PCM, the pixel value of the input image is encoded by PCM, and then the pixel value of the local decoded image generated by the first encoding unit 103 and the input image for the rightmost pixel of the unit. The difference value with the pixel value of is calculated, and the difference value is encoded. Thereby, the above problem can be avoided. The corresponding local decode generation unit can obtain the rightmost pixel in the unit by adding the pixel value of the input image obtained by decoding the stream generated by PCM and the decoded difference value. Therefore, the encoding apparatus 300 may perform the prediction process using the pixel of the local decoded image generated by the first encoding unit 103 as a reference pixel. At this time, the third encoding unit 117 may receive and process the pixel value of the local decoded image generated by the first encoding unit 103, or may be generated by the third encoding unit 117.

図16は、シンタクス例を示す図である。図16の例は、第1符号化部103で生成さ
れたローカルデコード画像の画素値と入力画像の画素値との差分値をdiff_pixe
l_valueとして符号化する点が図15の例とは異なる。NUM_REF_PIXE
Lは、参照画素として利用される画素数を示す。本実施形態では、ユニットの右端の画素
のみを対象としている。そのため、NUM_REF_PIXELは、ユニットの高さと同
値である。なお、煩雑な処理を回避するためユニットの下端の画素についても対象として
も良い。
FIG. 16 is a diagram illustrating an example of syntax. In the example of FIG. 16, the difference value between the pixel value of the local decoded image generated by the first encoding unit 103 and the pixel value of the input image is expressed as diff_pixel.
It differs from the example of FIG. 15 in that it is encoded as l_value. NUM_REF_PIXE
L indicates the number of pixels used as reference pixels. In this embodiment, only the rightmost pixel of the unit is targeted. Therefore, NUM_REF_PIXEL has the same value as the unit height. Note that the pixel at the lower end of the unit may be a target in order to avoid complicated processing.

上記の処理については一例を示したものであり、ユニット内の右端画素に関する制約を
満たすものであれば任意の方法を用いて良い。
The above processing is an example, and any method may be used as long as it satisfies the restrictions on the rightmost pixel in the unit.

符号化モード判定部120の動作について詳細に説明する。   The operation of the encoding mode determination unit 120 will be described in detail.

符号化モード判定部120は、エントロピー符号化部105Aより第1符号化モードで
発生した符号量を受け取り、対象ユニットにおける符号化モードの判定を行う。モード判
定部120は、は式(4)に示すように第1符号化モードの符号量BMODE_1と、第
3符号化モードの符号量BMODE_3のうち、小さい方の値をBcurrentとする

Figure 0006360591
The encoding mode determination unit 120 receives the code amount generated in the first encoding mode from the entropy encoding unit 105A, and determines the encoding mode in the target unit. As shown in Expression (4), the mode determination unit 120 sets the smaller value of the code amount BMODE_1 in the first encoding mode and the code amount BMODE_3 in the third encoding mode as Bcurrent.
Figure 0006360591

符号化モード判定部120は、得られたBcurrentを用いて、式(3)によりB
availableを算出する。式(5)により符号化モードを判定する。

Figure 0006360591
The encoding mode determination unit 120 uses the obtained Bcurrent to calculate B according to Equation (3).
Available is calculated. The encoding mode is determined by equation (5).
Figure 0006360591

図17は、符号化モード判定部120の動作を示す図である。   FIG. 17 is a diagram illustrating the operation of the encoding mode determination unit 120.

まず、BMODE_1がBMODE_3以上となる場合には(S1701,yes)、
codec_typeをMODE_3とし、BcurrentをBMODE_3とする(
S1702)。そうでなければ(S1701,no)、codec_typeをMODE
_1とし、BcurrentをBMODE_1とする(S1703)。
First, when BMODE_1 becomes BMODE_3 or more (S1701, yes),
codec_type is MODE_3, and Bcurrent is BMODE_3 (
S1702). Otherwise (S1701, no), codec_type is set to MODE.
_1 and Bcurrent is set to BMODE_1 (S1703).

式(3)に従いBavailableを算出する(S1704)。すでに選択された第
1符号化モードまたは第3符号化モードで符号化してもセグメント内の符号量保証が可能
であるかを式(2)と同様に判定する。このとき符号量が保証されないと判断されれば(
S1705,no)、第2符号化モードを選択する(S1706)。そうでなければ(S
1705,yes)、S1702またはS1703で選択された符号化モードを用いる。
Available is calculated according to equation (3) (S1704). Whether the code amount in the segment can be guaranteed even if encoding is performed in the first encoding mode or the third encoding mode that has already been selected is determined in the same manner as in Expression (2). If it is determined that the code amount is not guaranteed at this time (
S1705, no), the second encoding mode is selected (S1706). Otherwise (S
1705, yes), the encoding mode selected in S1702 or S1703 is used.

以上の処理により、第3符号化モードによりユニット単位の最大符号量を保証しつつ、
セグメント単位の符号量については第2符号化モードにより保証することが可能となる。
With the above processing, while guaranteeing the maximum code amount in units by the third encoding mode,
The code amount in segment units can be guaranteed by the second encoding mode.

ここではユニット単位での符号量を保証する目的で第3符号化モードを利用した。第3
符号化モードは、第2の符号化モードと比較して十分大きな符号量を想定しているため、
例えばPCMを用いる場合など第1符号化モードや第2符号化モードと比較して高画質な
符号化を行うことができる。そこで、例えば式(6)のように、セグメント内の残りすべ
てのユニットを第3符号化モードで符号化しても目標符号量を超過しないことがわかった
時点で第3符号化モードでの符号化に切り替えても良い。

Figure 0006360591
Here, the third coding mode is used for the purpose of guaranteeing the code amount in units. Third
Since the encoding mode assumes a sufficiently large code amount compared to the second encoding mode,
For example, high-quality encoding can be performed as compared with the first encoding mode and the second encoding mode, such as when using PCM. Therefore, for example, as shown in Equation (6), when it is found that even if all the remaining units in the segment are encoded in the third encoding mode, the target code amount is not exceeded, encoding in the third encoding mode is performed. You may switch to
Figure 0006360591

本実施形態の画像符号化装置300によれば、ユニット単位での符号量を保証した符号
化処理を行うことが可能となる。
According to the image encoding device 300 of the present embodiment, it is possible to perform an encoding process that guarantees a code amount in units.

(第4の実施形態)
一般的にはレート制御により適応的に量子化スケールを設定することで所望の符号量へ
と収束させることが可能となる。そこで、本実施形態の画像符号化装置400は、レート
制御を行う。
(Fourth embodiment)
In general, it is possible to converge to a desired code amount by adaptively setting a quantization scale by rate control. Therefore, the image encoding device 400 according to the present embodiment performs rate control.

図18は、画像符号化装置400を示す図である。   FIG. 18 is a diagram illustrating the image encoding device 400.

画像符号化装置400は、レート制御部121をさらに備える。その他の構成要素につ
いては画像符号化装置300と同様の動作を行うため、説明を省略する。
The image encoding device 400 further includes a rate control unit 121. Other components perform the same operations as those of the image encoding device 300, and thus description thereof is omitted.

レート制御部121は、エントロピー符号化部105Aより第1符号化モードの符号量
を、符号化モード判定部120より符号化モード情報をそれぞれ受け取る。レート制御部
121は、符号化制御部108を通じて第1符号化部103の符号化パラメータを適応的
に設定することでレート制御を行う。レート制御については、MPEG−2 TM5で用
いられるような一般的な方法を用いて良い。
The rate control unit 121 receives the code amount of the first coding mode from the entropy coding unit 105 </ b> A and the coding mode information from the coding mode determination unit 120. The rate control unit 121 performs rate control by adaptively setting the encoding parameters of the first encoding unit 103 through the encoding control unit 108. For rate control, a general method such as that used in MPEG-2 TM5 may be used.

レート制御部121の動作について説明する。   The operation of the rate control unit 121 will be described.

図19は、画像符号化装置400の動作例を示す図である。   FIG. 19 is a diagram illustrating an operation example of the image encoding device 400.

画像符号化装置400に対して符号化すべき画像が入力されると、レート制御部121
は、レート制御のパラメータを設定する(S1901)。例えば、レート制御部121が
、前述されたTM5のレート制御を行う場合には、レートバッファの初期値や発生符号量
に対するフィードバック強度を設定する。レート制御のパラメータについては予め定めた
固定値を用いても良い。また、入力された画像のサイズやフォーマットなどの情報に応じ
て設定しても良い。
When an image to be encoded is input to the image encoding device 400, the rate control unit 121
Sets parameters for rate control (S1901). For example, when the rate control unit 121 performs the above-described TM5 rate control, an initial value of the rate buffer and a feedback strength for the generated code amount are set. A predetermined fixed value may be used for the rate control parameter. Further, it may be set according to information such as the size and format of the input image.

レート制御部121は設定されたレート制御のパラメータに基づいて第1符号化モード
で必要となる、量子化パラメータなどの符号化パラメータを設定する(S1902)。第
1符号化部103は、S1902で設定された符号化パラメータに従って、入力画像のユ
ニットに対して第1符号化モードによる符号化を行う(S1903)。第2符号化部10
4及び第3符号化部117はそれぞれ第2符号化モード及び第3符号化モードによる符号
化を行う(S1904、S1905)。これらの符号化処理については画像符号化装置3
00と同一の動作を行うため、説明を省略する。
The rate control unit 121 sets a coding parameter such as a quantization parameter required in the first coding mode based on the set rate control parameter (S1902). The first encoding unit 103 performs encoding in the first encoding mode on the unit of the input image according to the encoding parameter set in S1902 (S1903). Second encoding unit 10
4 and the third encoding unit 117 perform encoding in the second encoding mode and the third encoding mode, respectively (S1904, S1905). For these encoding processes, the image encoding device 3
Since the same operation as 00 is performed, the description is omitted.

これらの符号化結果に基づき、符号化モード判定部120が符号化モードを選択する(
S1906)。スイッチ118は、選択された符号化モードに対応するローカルデコード
画像を送り、スイッチ119は、選択された符号化モードに対応するビットストリームを
出力する(S1907)。セグメント内のすべてのユニットの符号化が終了していない場
合(S1908,no)、エントロピー符号化部105Aは第1符号化モードの符号量を
符号化モード判定部120及びレート制御部121に送り、符号化モード判定部120は
符号化モード情報をレート制御部121に送る(S1909)。なお、第2符号化モード
及び第3符号化モードでは予め定めた符号量で符号化を行うため、発生符号量を送らなく
ても符号化モード情報のみで符号量の判定が可能である。
Based on these encoding results, the encoding mode determination unit 120 selects an encoding mode (
S1906). The switch 118 sends a local decoded image corresponding to the selected encoding mode, and the switch 119 outputs a bitstream corresponding to the selected encoding mode (S1907). When encoding of all units in the segment is not completed (S1908, no), the entropy encoding unit 105A sends the code amount of the first encoding mode to the encoding mode determination unit 120 and the rate control unit 121, The encoding mode determination unit 120 sends the encoding mode information to the rate control unit 121 (S1909). In the second encoding mode and the third encoding mode, encoding is performed with a predetermined code amount, so that it is possible to determine the code amount using only the encoding mode information without sending the generated code amount.

セグメント内のすべてのユニットの符号化が終了し(S1908,yes)、かつ、第
2符号化モードが選択された(S1910,yes)場合、レート制御部121は、次の
セグメントのパラメータを変更する(S1911)。パラメータの変更方法としては、例
えば符号量のフィードバック強度を強くする等を行う。第2符号化モードが選択されたと
いうことは、通常のレート制御では符号量が発生しすぎたために収束できなかったことを
意味する。適応的にレート制御のパラメータを変更することで次のセグメントでは第2符
号化モードが選択されないように安定した制御を行うことができる。
When encoding of all units in the segment is completed (S1908, yes) and the second encoding mode is selected (S1910, yes), the rate control unit 121 changes the parameter of the next segment. (S1911). As a parameter changing method, for example, the feedback strength of the code amount is increased. The fact that the second coding mode has been selected means that the normal rate control cannot be converged because the amount of code is excessive. By changing the rate control parameters adaptively, stable control can be performed so that the second coding mode is not selected in the next segment.

本実施形態では、第2符号化モードが選択された場合の処理について説明したが、符号
量が余ったことにより第3符号化モードが選択された場合には逆に十分符号量を使えてい
ないことを示す。その様な場合には、フィードバック強度を弱めるなどのパラメータ設定
を行うことで安定した画質を得ることが可能となる。
In the present embodiment, the processing when the second coding mode is selected has been described. However, when the third coding mode is selected due to the remaining code amount, a sufficient code amount cannot be used. It shows that. In such a case, it is possible to obtain a stable image quality by setting parameters such as weakening the feedback intensity.

また、ここではセグメント単位でレート制御パラメータを変更する場合について説明し
たが、複数のユニットをまとめた単位やフレーム単位であっても良い。
Although the case where the rate control parameter is changed in units of segments has been described here, a unit in which a plurality of units are combined or a frame unit may be used.

このように、レート制御部121は発生符号量をユニット単位でフィードバックし、レ
ートを制御する。例えば、目標符号量よりも大きな符号量が発生している場合には量子化
パラメータを大きくすることで発生符号量を小さく抑え、目標符号量よりも小さな符号量
が発生している場合には量子化パラメータを小さくすることで発生符号量が大きくなるよ
うに符号化を行うことで目標の符号量への収束を図ることができる。
Thus, the rate control unit 121 feeds back the generated code amount in units and controls the rate. For example, when a code amount larger than the target code amount is generated, the generated code amount is suppressed by increasing the quantization parameter, and when a code amount smaller than the target code amount is generated, the quantum amount is increased. It is possible to achieve convergence to a target code amount by performing encoding so that the generated code amount is increased by reducing the encoding parameter.

なお、本実施形態ではわかりやすさのためレート制御部121を明示的に説明したが、
これらのレート制御処理は符号化制御部108が行っても良い。
In the present embodiment, the rate control unit 121 has been explicitly described for the sake of clarity.
These rate control processes may be performed by the encoding control unit 108.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したも
のであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その
他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の
省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や
要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる
Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

画像符号化装置100、200
スイッチ101、102、
第1符号化部103、
第2符号化部104、
エントロピー符号化部105、105A、105B
符号化モード判定部106、116
ローカルデコード生成部107、107A、107B
予測誤差画像生成部109、逆量子化・逆変換部112、加算部113
符号化制御部108
レート制御部121
Image coding apparatus 100, 200
Switches 101, 102,
First encoding unit 103,
Second encoding unit 104,
Entropy encoding unit 105, 105A, 105B
Coding mode determination unit 106, 116
Local decode generators 107, 107A, 107B
Prediction error image generation unit 109, inverse quantization / inverse transformation unit 112, addition unit 113
Encoding control unit 108
Rate control unit 121

Claims (10)

入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化部と、
前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化部と、
前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化部と前記第2の符号化部のいずれを用いるかを判定する判定部と、
を備え、
前記判定部は、前記複数の画素ブロックのうち一番目に符号化された第1画素ブロックから前記符号化対象画素ブロックの直前に符号化された第2画素ブロックまでの累積符号量と、前記第1の符号化部により符号化された前記符号化対象画素ブロックの符号量と、の和が、前記第1セグメントの目標符号量と前記複数の画素ブロックのうち前記符号化対象画素ブロックより後に符号化される画素ブロックを前記第2の符号化部により符号化することで発生する符号量との差よりも小さい場合には、前記第1の符号化部を用いると判定し、
前記第2の符号化部を用いると判定した場合には、前記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分を符号化する画像符号化装置
A first encoding unit capable of encoding each of a plurality of pixel blocks included in the first segment of the input image;
A second encoding unit capable of encoding each of the plurality of pixel blocks with a predetermined first code amount;
A determination unit that determines which of the first encoding unit and the second encoding unit is used for an encoding target pixel block that is one of the plurality of pixel blocks;
With
The determination unit includes a cumulative code amount from a first pixel block encoded first among the plurality of pixel blocks to a second pixel block encoded immediately before the pixel block to be encoded, and the first The sum of the code amount of the encoding target pixel block encoded by one encoding unit is encoded after the target pixel amount of the first segment and the encoding target pixel block among the plurality of pixel blocks. If less than the difference between the code amount generated by encoding by the pixel block to be of the second encoding unit, and determine the constant with the first encoding unit,
When it is determined that the second encoding unit is used, at least of the encoding target pixel block used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. A part of the image encoding device encodes a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block .
前記判定部は、前記第1の符号化部が前記符号化対象画素ブロックを符号化し前記第2の符号化部が前記符号化対象画素ブロックを符号化した後に、前記符号化対象画素ブロックに対して前記第1の符号化部と前記第2の符号化部のいずれを用いるかを判定する、請求項1に記載の画像符号化装置。   The determination unit encodes the encoding target pixel block after the first encoding unit encodes the encoding target pixel block and the second encoding unit encodes the encoding target pixel block. The image encoding device according to claim 1, wherein it is determined which of the first encoding unit and the second encoding unit is used. 入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化部と、
前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化部と、
前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化部と前記第2の符号化部のいずれを用いるかを判定する判定部と、
を備え、
前記判定部は、前記複数の画素ブロックのうち一番目に符号化された第1画素ブロックから前記符号化対象画素ブロックの前に符号化された第3画素ブロックまでの累積符号量と、前記第3画素ブロックの後前記符号化対象画素ブロックまでを前記第1の符号化部で符号化した場合の最大符号量と、の和が、前記第1セグメントの目標符号量と前記複数の画素ブロックのうち前記符号化対象画素ブロックより後に符号化される画素ブロックを前記第2の符号化部により符号化することで発生する符号量との差よりも小さい場合には、前記第1の符号化部を用いると判定し、
前記第2の符号化部を用いると判定した場合には、記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分が追加符号化する画像符号化装置。
A first encoding unit capable of encoding each of a plurality of pixel blocks included in the first segment of the input image;
A second encoding unit capable of encoding each of the plurality of pixel blocks with a predetermined first code amount;
A determination unit that determines which of the first encoding unit and the second encoding unit is used for an encoding target pixel block that is one of the plurality of pixel blocks;
With
The determination unit includes a cumulative code amount from a first pixel block encoded first among the plurality of pixel blocks to a third pixel block encoded before the pixel block to be encoded, The sum of the maximum code amount when the first encoding unit encodes the pixel block after 3 pixel blocks to the encoding target pixel block is the target code amount of the first segment and the plurality of pixel blocks. When the difference between the pixel block encoded after the encoding target pixel block and the code amount generated by encoding the pixel block by the second encoding unit is smaller than the first encoding unit, Is determined to be used ,
When it is determined that the second encoding unit is used, at least of the encoding target pixel block used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. A part of the image encoding device additionally encodes a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block .
前記第2の符号化部は、前記符号化対象画素ブロックの直前に符号化される画素ブロックの画素を利用した予測を行わない、
請求項1乃至3のいずれか1項に記載の画像符号化装置。
The second encoding unit does not perform prediction using a pixel of a pixel block encoded immediately before the encoding target pixel block;
The image encoding device according to any one of claims 1 to 3.
入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化部と、   A first encoding unit capable of encoding each of a plurality of pixel blocks included in the first segment of the input image;
前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化部と、   A second encoding unit capable of encoding each of the plurality of pixel blocks with a predetermined first code amount;
前記複数の画素ブロックそれぞれを予め定められ前記第1符号量よりも大きな第2符号量で符号化可能な第3の符号化部と、  A third encoding unit capable of encoding each of the plurality of pixel blocks with a second code amount that is predetermined and larger than the first code amount;
前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化部、前記第2の符号化部及び前記第3符号化部のいずれを用いるかを判定する判定部と、  It is determined which of the first encoding unit, the second encoding unit, and the third encoding unit is used for an encoding target pixel block that is one of the plurality of pixel blocks. A determination unit;
を備え、 With
前記判定部は、前記第1の符号化部による前記符号化対象画素ブロックの符号量が前記第3の符号化部による前記符号化対象画素ブロックの符号量を上回る場合には第3の符号化部を用いると判定し、  The determination unit performs third encoding when the code amount of the encoding target pixel block by the first encoding unit exceeds the code amount of the encoding target pixel block by the third encoding unit. Part to use,
前記第3の符号化部を用いると判定した場合には、記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分が追加符号化する画像符号化装置。  If it is determined that the third encoding unit is to be used, at least of the encoding target pixel block used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. A part of the image encoding device additionally encodes a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block.
前記第2の符号化部が前記符号化対象画素ブロックを符号化する場合に、前記第1セグメントに対する符号化における符号量のフィードバック強度よりも、前記入力画像が有する第2セグメントに対する符号化における符号量のフィードバック強度の方が強くなるように、前記第1の符号化部をレート制御するレート制御部を更に備える請求項1乃至のいずれか1項に記載の画像符号化装置。 When the second encoding unit encodes the encoding target pixel block, the code in the encoding for the second segment included in the input image rather than the feedback strength of the code amount in the encoding for the first segment. as towards the amount of feedback intensity increases, the image coding apparatus according to any one of claims 1 to 4, further comprising a rate control unit for rate controlling the first encoding unit. 前記第2の符号化部は、上方向からの予測のみを行い、変換・量子化係数を符号化しな
い、請求項1乃至のいずれか1項に記載の画像符号化装置。
It said second encoding unit performs only predictions from above, do not encode the transform and quantization coefficients, the image coding apparatus according to any one of claims 1 to 4.
入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化ステップと、
前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化ステップと、
前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化ステップと前記第2の符号化ステップのいずれを用いるかを判定する判定ステップと、
を備え、
前記判定ステップでは、前記複数の画素ブロックのうち一番目に符号化された第1画素ブロックから前記符号化対象画素ブロックの直前に符号化された第2画素ブロックまでの累積符号量と、前記第1の符号化ステップにより符号化された前記符号化対象画素ブロックの符号量と、の和が、前記第1セグメントの目標符号量と前記複数の画素ブロックのうち前記符号化対象画素ブロックより後に符号化される画素ブロックを前記第2の符号化ステップにより符号化することで発生する符号量との差よりも小さい場合には、前記第1の符号化ステップを用いると判定し、
前記第2の符号化部を用いると判定した場合には、前記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分を符号化する画像符号化方法。
A first encoding step capable of encoding each of the plurality of pixel blocks included in the first segment of the input image;
A second encoding step capable of encoding each of the plurality of pixel blocks with a predetermined first code amount;
A determination step of determining which of the first encoding step and the second encoding step is used for an encoding target pixel block that is one of the plurality of pixel blocks;
With
In the determination step, a cumulative code amount from a first pixel block encoded first among the plurality of pixel blocks to a second pixel block encoded immediately before the encoding target pixel block, and the first The sum of the code amount of the encoding target pixel block encoded by one encoding step is encoded after the target code amount of the first segment and the encoding target pixel block among the plurality of pixel blocks. If less than the difference between the code amount generated by encoding by the pixel block to be of the second coding step, it determines that use of the first encoding step,
When it is determined that the second encoding unit is used, at least of the encoding target pixel block used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. A part of the method is an image encoding method for encoding a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block.
入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化ステップと、
前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化ステップと、
前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化ステップと前記第2の符号化ステップのいずれを用いるかを判定する判定ステップと、
を備え、
前記判定ステップでは、前記複数の画素ブロックのうち一番目に符号化された第1画素ブロックから前記符号化対象画素ブロックの前に符号化された第3画素ブロックまでの累積符号量と、前記第3画素ブロックの後前記符号化対象画素ブロックまでを前記第1の符号部で符号化した場合の最大符号量と、の和が、前記第1セグメントの目標符号量と前記複数の画素ブロックのうち前記符号化対象画素ブロックより後に符号化される画素ブロックを前記第2の符号化部により符号化することで発生する符号量との差よりも小さい場合には、前記第1の符号化ステップを用いると判定し、
前記第2の符号化部を用いると判定した場合には、前記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分を符号化する画像符号化方法。
A first encoding step capable of encoding each of the plurality of pixel blocks included in the first segment of the input image;
A second encoding step capable of encoding each of the plurality of pixel blocks with a predetermined first code amount;
A determination step of determining which of the first encoding step and the second encoding step is used for an encoding target pixel block that is one of the plurality of pixel blocks;
With
In the determination step, a cumulative code amount from a first pixel block encoded first among the plurality of pixel blocks to a third pixel block encoded before the encoding target pixel block, and the first The sum of the maximum code amount when the first encoding unit encodes the pixel block after 3 pixel blocks to the encoding target pixel block is the target code amount of the first segment and the plurality of pixel blocks. When the pixel block to be encoded after the pixel block to be encoded is smaller than the difference in code amount generated by encoding by the second encoding unit, the first encoding step is performed. It is determined that it will be used,
When it is determined that the second encoding unit is used, at least of the encoding target pixel block used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. A part of the method is an image encoding method for encoding a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block .
入力画像が有する第1セグメントに含まれる複数の画素ブロックそれぞれを符号化可能な第1の符号化ステップと、   A first encoding step capable of encoding each of the plurality of pixel blocks included in the first segment of the input image;
前記複数の画素ブロックそれぞれを予め定められた第1符号量で符号化可能な第2の符号化ステップと、   A second encoding step capable of encoding each of the plurality of pixel blocks with a predetermined first code amount;
前記複数の画素ブロックそれぞれを予め定められ前記第1符号量よりも大きな第2符号量で符号化可能な第3の符号化ステップと、  A third encoding step in which each of the plurality of pixel blocks is predetermined and can be encoded with a second code amount larger than the first code amount;
前記複数の画素ブロックのうちの一つである符号化対象画素ブロックに対して前記第1の符号化ステップ、前記第2の符号化ステップ及び前記第3符号化ステップのいずれを用いるかを判定する判定ステップと、  It is determined which of the first encoding step, the second encoding step, and the third encoding step is used for an encoding target pixel block that is one of the plurality of pixel blocks. A determination step;
を備え、 With
前記判定ステップでは、前記第1の符号化ステップによる前記符号化対象画素ブロックの符号量が前記第3の符号化ステップによる前記符号化対象画素ブロックの符号量を上回る場合には第3の符号化ステップを用いると判定し、  In the determination step, if the code amount of the pixel block to be encoded by the first encoding step exceeds the code amount of the pixel block to be encoded by the third encoding step, a third encoding is performed. Decide to use a step,
前記第3の符号化ステップを用いると判定した場合には、記複数の画素ブロックのうち前記符号化対象画素ブロックの後に符号化される画素ブロックにおいて予測に用いられる前記符号化対象画素ブロックの少なくとも一部は、前記第1の符号化部により生成されるローカルデコード画像の画素値と前記符号化対象画素ブロックの画素値との差分が追加符号化する画像符号化方法。  If it is determined that the third encoding step is used, at least of the encoding target pixel block used for prediction in a pixel block encoded after the encoding target pixel block among the plurality of pixel blocks. A part of the image encoding method, wherein a difference between a pixel value of a local decoded image generated by the first encoding unit and a pixel value of the encoding target pixel block is additionally encoded.
JP2017101183A 2017-05-22 2017-05-22 Image encoding apparatus and method Active JP6360591B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017101183A JP6360591B2 (en) 2017-05-22 2017-05-22 Image encoding apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017101183A JP6360591B2 (en) 2017-05-22 2017-05-22 Image encoding apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013051064A Division JP2014179707A (en) 2013-03-13 2013-03-13 Image encoder, and encoding method

Publications (2)

Publication Number Publication Date
JP2017200189A JP2017200189A (en) 2017-11-02
JP6360591B2 true JP6360591B2 (en) 2018-07-18

Family

ID=60239628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017101183A Active JP6360591B2 (en) 2017-05-22 2017-05-22 Image encoding apparatus and method

Country Status (1)

Country Link
JP (1) JP6360591B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001169281A (en) * 1999-12-13 2001-06-22 Matsushita Electric Ind Co Ltd Device and method for encoding moving image
JP3311731B2 (en) * 2000-04-03 2002-08-05 日本電信電話株式会社 Coding control method, coding control device, and program recording medium for coding control
JP4089753B2 (en) * 2002-03-28 2008-05-28 ソニー株式会社 Image compression encoding apparatus and method, program, and recording medium
JP2008271213A (en) * 2007-04-20 2008-11-06 Hitachi Kokusai Electric Inc Image encoding device
JP5059728B2 (en) * 2008-09-30 2012-10-31 ルネサスエレクトロニクス株式会社 Image coding apparatus and method
WO2010041488A1 (en) * 2008-10-10 2010-04-15 株式会社東芝 Dynamic image encoding device

Also Published As

Publication number Publication date
JP2017200189A (en) 2017-11-02

Similar Documents

Publication Publication Date Title
KR100740381B1 (en) Digital signal encoding device and digital signal decoding device
JP7213264B2 (en) Methods and apparatus and computer programs for decoding or encoding
JP5504336B2 (en) Scalable video encoding method, encoder and computer program
JP6432662B2 (en) Video encoding apparatus, video encoding method, and program
EP2403248B1 (en) Moving picture encoding device, moving picture encoding method, and moving picture encoding computer program
JP5545783B2 (en) Method for decoding a stream of encoded data representing an image sequence and method for encoding an image sequence
KR20090024134A (en) Scalable rate control system for a video encoder
US10205763B2 (en) Method and apparatus for the single input multiple output (SIMO) media adaptation
JP2020167733A (en) Interlayer prediction method and device based on temporal sublayer information
JPWO2009031648A1 (en) Video encoding device, video decoding device, video encoding method, video decoding method, video encoding or decoding program
JP2022516251A (en) Methods, equipment, and computer programs for video coding
KR20150081229A (en) Video decoding method and apparatus using the same
EP3322189B1 (en) Method and system for controlling video transcoding
JP2014179707A (en) Image encoder, and encoding method
CN107040780B (en) The method and apparatus of entropy coding in compression of images
JP2006080925A (en) Moving picture encoding device, moving picture encoding method, and moving picture encoding program
KR102226893B1 (en) Video decoding method and apparatus using the same
US10432946B2 (en) De-juddering techniques for coded video
JP6360591B2 (en) Image encoding apparatus and method
EP3440837A1 (en) Methods, encoder, and transcoder for transcoding
US20220109891A1 (en) Features of range asymmetric number system encoding and decoding
JP2008271213A (en) Image encoding device
JP6265414B2 (en) Video encoding device and video decoding device
US9661323B2 (en) Method of encoding picture and picture encoding device
JP2008283607A (en) Image data transcoding apparatus and transcoding method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180416

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180622

R151 Written notification of patent or utility model registration

Ref document number: 6360591

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151