JP5194082B2 - Image encoding device - Google Patents

Image encoding device Download PDF

Info

Publication number
JP5194082B2
JP5194082B2 JP2010204953A JP2010204953A JP5194082B2 JP 5194082 B2 JP5194082 B2 JP 5194082B2 JP 2010204953 A JP2010204953 A JP 2010204953A JP 2010204953 A JP2010204953 A JP 2010204953A JP 5194082 B2 JP5194082 B2 JP 5194082B2
Authority
JP
Japan
Prior art keywords
unit
encoding
data
output
motion vector
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
JP2010204953A
Other languages
Japanese (ja)
Other versions
JP2010279081A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2010204953A priority Critical patent/JP5194082B2/en
Publication of JP2010279081A publication Critical patent/JP2010279081A/en
Application granted granted Critical
Publication of JP5194082B2 publication Critical patent/JP5194082B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、動画像に関するデータを符号化する画像符号化装置に関し、特に、H.264/AVCの符号化装置に関する。   The present invention relates to an image encoding apparatus that encodes data relating to a moving image. The present invention relates to an H.264 / AVC encoding apparatus.

デジタル技術の発展と共に、映像を符号化する技術も進化、発展してきている。しかし、映像情報、特に動画像の情報は、そのデータ量が非常に大きく、デジタル映像を符号化したものを放送やDVD等のメディアで転送する場合、転送量が非常に大きくなってしまう。得に、最近実用化されているハイビジョン放送では、従来のSD(Standard Definition)映像と比べて、6倍のデータ量となっている。   Along with the development of digital technology, the technology for encoding video has also evolved and developed. However, the amount of data of video information, particularly moving image information, is very large. When a digital video encoded data is transferred by a medium such as a broadcast or a DVD, the transfer amount becomes very large. In particular, in high-definition broadcasting that has recently been put into practical use, the data amount is six times that of conventional SD (Standard Definition) video.

デジタル映像技術の発展と共に、増大するデータ量を処理するために、データを圧縮する技術がデジタル映像データに使用され、発展してきている。その発展は、映像データの特性を生かした映像データに特化した圧縮技術となって現れている。また、コンピュータやその他機器の情報処理能力の向上に伴い、圧縮技術における複雑な演算も可能となり、映像データの圧縮率は大幅に高められてきている。例えば、衛星、地上波デジタルハイビジョン放送で採用されている圧縮技術はMPEG2と呼ばれる方式であり、衛星デジタルハイビジョン放送はMPEG2によって映像データを約1/30に圧縮している。   With the development of digital video technology, in order to process the increasing amount of data, a technology for compressing data is used and developed for digital video data. The development has emerged as a compression technique specialized for video data that takes advantage of the characteristics of video data. In addition, with the improvement of information processing capabilities of computers and other devices, complex computations in compression techniques are possible, and the compression rate of video data has been greatly increased. For example, a compression technique employed in satellite and terrestrial digital high-definition broadcasting is a method called MPEG2, and satellite digital high-definition broadcasting compresses video data to about 1/30 by MPEG2.

MPEG2の次の映像圧縮技術として規格化されたAVC/H.264は、MPEG2の2倍前後の圧縮率を実現する規格である。AVC/H.264では、多くの圧縮化技術を実装し、それらを組み合わせることで高い圧縮率を実現している。そのため、演算量も大幅に増加している。   AVC / H.standardized as the next video compression technology of MPEG2. H.264 is a standard that realizes a compression rate about twice that of MPEG2. AVC / H. H.264 implements many compression technologies and combines them to achieve a high compression ratio. For this reason, the amount of calculation is also greatly increased.

AVC/H.264で実装されている圧縮化技術の一つにエントロピー符号化(可変長符号化)がある。エントロピー符号化の方式として、CAVLCとCABACという2つの方式が用意されている。CAVLCは、Context−based Adaptive Variable Length Coding(コンテキスト適応型可変長符号化方式)の略であり、DCT係数を符号化する際、連続する0の長さであるランとレベルを可変長符号化テーブルを用いてスキャンの方向と反対の方向から符号化を行なう方式である。   AVC / H. One compression technique implemented in H.264 is entropy coding (variable length coding). Two systems, CAVLC and CABAC, are prepared as entropy encoding systems. CAVLC is an abbreviation for Context-based Adaptive Variable Length Coding (context-adaptive variable-length coding system), and when coding DCT coefficients, a run and level that is a length of consecutive 0s and levels are variable-length coding tables. In this method, encoding is performed from the direction opposite to the scanning direction using.

CABACは、Context−based Adaptive Binary Arithmetic Coding(コンテキスト適応型2値算術符号化方式)の略で、時間とともに変化する符号化対象の出現頻度を変化させる方式で、一般に算術符号化と呼ばれる方式である。CABACでは、通常の算術符号化のほかに、圧縮すべき符号ごとにコンテキストを付け、そのコンテキストごとに出現頻度の変更を行なっている。   CABAC is an abbreviation for Context-based Adaptive Binary Arithmetic Coding (context-adaptive binary arithmetic coding), and is a method generally called arithmetic coding. . In CABAC, in addition to normal arithmetic coding, a context is assigned to each code to be compressed, and the appearance frequency is changed for each context.

CABACでの符号化は主に2つの処理に分けられる。1つ目は、Syntaxと呼ばれる符号化すべき多値情報を2値データに変換する2値化(binarization)と呼ばれる処理であり、2つ目は、2値化によって変換された2値データに対してコンテキストを算出し算術符号化を行なう処理である。   The encoding in CABAC is mainly divided into two processes. The first is a process called binarization that converts multi-value information to be encoded, called “Syntax”, into binary data. The second is a process for binary data converted by binarization. The context is calculated and arithmetic coding is performed.

算術符号化は、2値データのビット毎に0/1の出現確率を求めて符号化の処理を行ない、出現確率の更新も同時に行なう。そのため、ビット毎の処理となり、演算スピードは、通常1ビット/1クロックとなる。また、出現確率は、ビット毎に適応的に切り替えられ、ビットの値によって更新されるため、出力符号量を符号化前に正確に知ることは難しい。   In arithmetic coding, 0/1 appearance probability is obtained for each bit of binary data, encoding processing is performed, and appearance probability is simultaneously updated. Therefore, processing is performed for each bit, and the operation speed is normally 1 bit / 1 clock. Moreover, since the appearance probability is adaptively switched for each bit and updated by the value of the bit, it is difficult to accurately know the output code amount before encoding.

また、AVC/H.264において、マクロブロックの最大符号量は、4−2−0フォーマット、bit_depth8ビットの場合で3200ビットに制限されている。マクロブロックを符号化した結果、符合量が3200ビットを超える場合は、そのマクロブロックの符号化の条件を変更して再度符号化を行なわなければならない。また、mb_typeをI_PCMにして、符号化データの代わりにI_PCMデータをビットストリームとして保存する方法もある。CABACで出力される符号量は、実際に符号化して符号化データを出力するまで正確に知ることは困難であるため、マクロブロックの最大符号量制限が満たされているかどうかの判定は、CABAC符号化後に行なわれている。   In addition, AVC / H. In H.264, the maximum code amount of a macroblock is limited to 3200 bits in the case of 4-2-0 format and bit_depth 8 bits. As a result of encoding a macroblock, if the code amount exceeds 3200 bits, it is necessary to change the encoding condition of the macroblock and perform encoding again. There is also a method in which mb_type is set to I_PCM and I_PCM data is stored as a bit stream instead of encoded data. Since it is difficult to accurately know the code amount output by CABAC until the encoded data is actually output after being encoded, whether or not the maximum code amount limit of the macroblock is satisfied is determined by the CABAC code. It is done after conversion.

一方、算術符号化回路に入力されるデータ量を監視し、このデータ量がある単位内で一定量を超えた場合はこの入力データを符号化データとせず、違うパラメータで符号化したデータもしくは非圧縮データを入力データとする技術も開示されている(例えば、特許文献1)。   On the other hand, the amount of data input to the arithmetic coding circuit is monitored, and when this amount of data exceeds a certain amount within a certain unit, this input data is not used as encoded data, but is encoded with different parameters or not. A technique using compressed data as input data is also disclosed (for example, Patent Document 1).

図15は、従来の画像符号化装置の機能的な構成を示す機能ブロック図である。   FIG. 15 is a functional block diagram showing a functional configuration of a conventional image encoding device.

図15に示す画像符号化装置50は、入力された画像データを符号化し、ビットストリームとして出力する従来の画像符号化装置の一例である。画像符号化装置50の動作の概要を以下に説明する。   An image encoding device 50 shown in FIG. 15 is an example of a conventional image encoding device that encodes input image data and outputs it as a bit stream. An outline of the operation of the image encoding device 50 will be described below.

なお、画像データとは、動画像を構成するマクロブロックのデータ等の実体的なデータや、マクロブロックタイプ(mb_type)等の制御情報、その他の属性情報など、動画像に関するデータである。   Note that the image data is data relating to a moving image, such as substantive data such as macroblock data constituting the moving image, control information such as a macroblock type (mb_type), and other attribute information.

符号化対象の動画像のデータが入力されると、動き予測部51と面内予測部52とI_PCMデータバッファ53とに入力される。動き予測部51は、他のピクチャから、符号化対象ブロックと似ているブロックを検出し、符号化対象ブロックと検出された他のピクチャのブロックとの差分画像を求め、その差分画像と動きベクトルを出力する。面内予測部52は、画面内の符号化対象のブロックの画像を、隣接するブロックの画像を用いて予測し、符号化対象ブロックの画像と予測された画像の差分画像を求め、その差分画像と予測の方式を表す情報を出力する。また、I_PCMデータバッファ53は、入力される動画像の原画データであるI_PCMデータを格納するバッファである。   When moving image data to be encoded is input, the data is input to the motion prediction unit 51, the in-plane prediction unit 52, and the I_PCM data buffer 53. The motion prediction unit 51 detects a block similar to the encoding target block from other pictures, obtains a difference image between the encoding target block and the detected block of the other picture, the difference image and the motion vector Is output. The in-plane prediction unit 52 predicts an image of an encoding target block in the screen using an image of an adjacent block, obtains a difference image between the image of the encoding target block and the predicted image, and calculates the difference image. And information indicating the prediction method is output. The I_PCM data buffer 53 is a buffer for storing I_PCM data that is original image data of an input moving image.

動き予測部51または面内予測部52から出力されたデータは、入力選択部54に選択されることにより、直交変換の一種である離散コサイン変換(DCT)を行なう直交変換部55に入力される。直交変換部55はDCTによって得られるDCT係数を量子化部56に出力し、量子化部56によって量子化される。量子化されたDCT係数は、2値化器57に入力され2値データとなってCABAC符号化器59によって符号化される。符号化されたデータは出力バッファ61を経て出力選択部61に入力される。   The data output from the motion prediction unit 51 or the in-plane prediction unit 52 is selected by the input selection unit 54 and is input to the orthogonal transformation unit 55 that performs discrete cosine transformation (DCT), which is a kind of orthogonal transformation. . The orthogonal transform unit 55 outputs the DCT coefficient obtained by DCT to the quantization unit 56 and is quantized by the quantization unit 56. The quantized DCT coefficient is input to the binarizer 57 and converted into binary data, which is encoded by the CABAC encoder 59. The encoded data is input to the output selection unit 61 through the output buffer 61.

ここで、I_PCM判定部58は、上記のデータの流れにおいて、2値化器57からの出力データ量を監視し、2値化されたデータのデータ量から、ビットストリームとして出力するデータを、CABAC符号化器59により符号化されたデータとするか、I_PCMデータバッファ53に格納されているI_PCMデータとするかを判定することができる。または、CABAC符号化器59からの出力データ量を監視し、実際の符号化後のデータ量である符号量が3200ビットを越えるか否かで、ビットストリームとして出力するデータを、I_PCMデータとするか符号化されたデータとするかを決定することができる。出力選択部61は、I_PCM判定部58の決定に従い、符号化されたデータまたはI_PCMデータを出力する。   Here, the I_PCM determination unit 58 monitors the output data amount from the binarizer 57 in the above-described data flow, and uses the data amount of the binarized data to output data to be output as a bit stream from CABAC. Whether the data is encoded by the encoder 59 or the I_PCM data stored in the I_PCM data buffer 53 can be determined. Alternatively, the output data amount from the CABAC encoder 59 is monitored, and the data output as a bit stream is determined as I_PCM data depending on whether or not the code amount that is the actual encoded data amount exceeds 3200 bits. Or encoded data can be determined. The output selection unit 61 outputs encoded data or I_PCM data according to the determination of the I_PCM determination unit 58.

特開2004−135251号公報JP 2004-135251 A

ここで、AVC/H.264では、面内予測、動き予測等に、前のマクロブロックの情報を用いている。従って、上記従来の技術のように、マクロブロックの最大符号量制限が満たされているかどうかの判定をCABAC後に行なっていたのでは、そのマクロブロックのCABAC符号化が終了するまで次のマクロブロックの面内予測、動き予測を行なうことができない。   Here, AVC / H. In H.264, information of the previous macroblock is used for in-plane prediction, motion prediction, and the like. Therefore, if the determination as to whether or not the maximum code amount limit of the macroblock is satisfied is performed after CABAC as in the above-described conventional technique, the next macroblock until the CABAC encoding of the macroblock is completed. In-plane prediction and motion prediction cannot be performed.

本発明は、上記課題を考慮し、2値化したデータをエントロピー符号化する画像符号化装置であって、画像データをより高速に処理するための画像符号化装置を提供することを目的とする。   In view of the above-described problems, an object of the present invention is to provide an image encoding apparatus that entropy-encodes binarized data and that processes image data at higher speed. .

本発明の画像符号化装置は、画像データを符号化する画像符号化手段と、前記画像符号化手段によって得られた符号化データを2値化しエントロピー符号化するエントロピー符号化手段と、前記エントロピー符号化手段が前記符号化データを2値化する前に、所定の単位の符号化データから得られる情報に基づき、前記所定の単位の符号化データがエントロピー符号化された場合の符号量に対応する予測値を求める予測手段と、前記予測手段によって求められた前記予測値と所定の閾値とを比較する比較手段と、前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記所定の単位の符号化データをエントロピー符号化する前のデータであるI_PCMデータを出力すると判定する判定手段と、前記判定手段により、前記I_PCMデータを出力すると判定された場合、前記I_PCMデータを出力し、前記I_PCMデータを出力すると判定されなかった場合、前記エントロピー符号化手段によりエントロピー符号化されたデータを出力する出力手段とを備える。   The image encoding device of the present invention includes an image encoding unit that encodes image data, an entropy encoding unit that binarizes and entropy-encodes encoded data obtained by the image encoding unit, and the entropy code Before the encoding unit binarizes the encoded data, it corresponds to a code amount when the encoded data of the predetermined unit is entropy-encoded based on information obtained from the encoded data of the predetermined unit. A prediction means for obtaining a prediction value; a comparison means for comparing the prediction value obtained by the prediction means with a predetermined threshold; and as a result of comparison by the comparison means, if the prediction value is greater than the threshold, the predetermined value A determination unit that determines to output I_PCM data that is data before entropy encoding of encoded data in units of If it is determined that outputs the _PCM data, the I_PCM outputs data, the I_PCM if it is not determined that the output data, and output means for outputting the entropy-coded data by the entropy coding means.

この構成により、画像符号化装置は、所定の単位の符号化データが2値化される前に、出力するデータをI_PCMデータとするか否かを判定できる。つまり、エントロピー符号化に係る処理を行なう前に、上記判定を行なうことにより画像データの処理の高速化が可能となる。   With this configuration, the image encoding apparatus can determine whether or not the output data is I_PCM data before the encoded data of a predetermined unit is binarized. That is, it is possible to speed up the processing of image data by performing the above determination before performing the processing related to entropy coding.

また、本発明の画像符号化装置において、前記所定の単位はマクロブロックであり、前記画像符号化手段は、符号化対象マクロブロックに隣接する隣接マクロブロックの情報を用いて前記符号化対象マクロブロックの予測動きベクトルmvpを算出する動き予測手段を有し、前記動き予測手段は、カレントマクロブロックと、符号化順で次に符号化される、次のマクロブロックとが隣接しているとき、前記カレントマクロブロックについての前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記次のマクロブロックの隣接マクロブロックの情報を修正して、前記次のマクロブロックの予測動きベクトルmvpの算出を行なうとしてもよい。   Further, in the image encoding device of the present invention, the predetermined unit is a macroblock, and the image encoding means uses the information of adjacent macroblocks adjacent to the encoding target macroblock to encode the encoding target macroblock. Motion prediction means for calculating a predicted motion vector mvp of the current macroblock, and when the current macroblock and the next macroblock to be coded next in coding order are adjacent to each other, the motion prediction means As a result of the comparison by the comparison means for the current macroblock, if the predicted value is larger than the threshold value, the information of the adjacent macroblock of the next macroblock is corrected, and the predicted motion vector mvp of the next macroblock is changed. Calculation may be performed.

また、本発明の画像符号化装置において、前記所定の単位はマクロブロックであり、前記画像符号化手段は、(1)符号化対象マクロブロックに隣接する隣接マクロブロックの情報を用いて前記符号化対象マクロブロックの予測動きベクトルmvpを算出し、(2)前記予測動きベクトルmvpを用いて前記符号化対象マクロブロックの動きベクトルmvを算出し、(3)前記予測動きベクトルmvpと前記動きベクトルmvとの差分mvdを算出する動き予測手段を有し、前記動き予測手段は、カレントマクロブロックと、符号化順で次に符号化される、次のマクロブロックとが隣接しているとき、前記次のマクロブロックに対して前記(1)(2)(3)の手順で予測動きベクトルmvp、動きベクトルmv、差分mvdの算出を行い、前記カレントマクロブロックについての前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記次のマクロブロックの隣接マクロブロックの情報を修正して、前記(1)の手順にて前記次のマクロブロックの予測動きベクトルmvpを再度算出し、再度算出した前記予測動きベクトルmvpと前記(2)の手順で求められている前記動きベクトルmvとを用いて、前記次のマクロブロックの差分mvdを再度算出するとしてもよい。   In the image encoding device of the present invention, the predetermined unit is a macroblock, and the image encoding means (1) uses the information of an adjacent macroblock adjacent to the encoding target macroblock to perform the encoding. A prediction motion vector mvp of the target macroblock is calculated, (2) a motion vector mv of the encoding target macroblock is calculated using the prediction motion vector mvp, and (3) the prediction motion vector mvp and the motion vector mv The motion prediction means calculates the difference mvd between the current macroblock and the next macroblock that is next encoded in the encoding order and is adjacent to the next macroblock. The predicted motion vector mvp, the motion vector mv, and the difference mvd are calculated with respect to the macroblock in the procedure (1), (2), and (3) As a result of the comparison by the comparison means for the current macroblock, if the predicted value is larger than the threshold value, the information on the adjacent macroblock of the next macroblock is corrected, and the next macroblock is corrected by the procedure (1). The predicted motion vector mvp of the next macroblock is calculated again, and the difference mvd of the next macroblock is calculated using the calculated motion vector mvp calculated again and the motion vector mv obtained in the procedure (2). May be calculated again.

また、本発明の画像符号化装置において、前記所定の単位はマクロブロックであり、前記画像符号化手段は、(1)符号化対象マクロブロックに隣接する隣接マクロブロックの情報を用いて前記符号化対象マクロブロックの予測動きベクトルmvpを算出し、(2)前記予測動きベクトルmvpを用いて前記符号化対象マクロブロックの動きベクトルmvを算出し、(3)前記予測動きベクトルmvpと前記動きベクトルmvとの差分mvdを算出する動き予測手段を有し、前記動き予測手段は、カレントマクロブロックと、符号化順で次に符号化される、次のマクロブロックとが隣接しているとき、前記次のマクロブロックに対して前記(1)(2)の手順で予測動きベクトルmvpおよび動きベクトルmvの算出を行い、前記比較手段は、前記動き予測手段により、前記(3)の手順で前記次のマクロブロックに対しての差分mvdが算出される前に、前記カレントマクロブロックについて比較を実施し、前記動き予測手段はさらに、カレントマクロブロックに対する前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記次のマクロブロックの隣接マクロブロックの情報を修正して、前記(1)の手順にて前記次のマクロブロックの予測動きベクトルmvpを再度算出し、再度算出した前記予測動きベクトルmvpと前記(2)の手順で求められている前記動きベクトルmvとを用いて、前記次のマクロブロックの差分mvdを算出するとしてもよい。   In the image encoding device of the present invention, the predetermined unit is a macroblock, and the image encoding means (1) uses the information of an adjacent macroblock adjacent to the encoding target macroblock to perform the encoding. A prediction motion vector mvp of the target macroblock is calculated, (2) a motion vector mv of the encoding target macroblock is calculated using the prediction motion vector mvp, and (3) the prediction motion vector mvp and the motion vector mv The motion prediction means calculates the difference mvd between the current macroblock and the next macroblock that is next encoded in the encoding order and is adjacent to the next macroblock. The prediction motion vector mvp and the motion vector mv are calculated for the macroblock in the steps (1) and (2). Before the difference mvd for the next macroblock is calculated by the motion prediction means in the procedure of (3), the current macroblock is compared, and the motion prediction means further includes the current macroblock. As a result of the comparison by the comparison means for the block, when the predicted value is larger than the threshold, the information of the adjacent macroblock of the next macroblock is corrected, and the next macroblock of the next macroblock is corrected by the procedure of (1). A predicted motion vector mvp is calculated again, and the difference mvd of the next macroblock is calculated using the calculated motion vector mvp calculated again and the motion vector mv obtained in the procedure (2). Also good.

また、本発明の画像符号化装置は、入力された画像データのうち、少なくとも符号化対象のマクロブロックであるカレントマクロブロックを構成する画像データを記憶する記憶部と、前記カレントマクロブロックに隣接するマクロブロックのうちの所定のマクロブロックの動きベクトルを用いて、前記カレントマクロブロックを構成する画像データの動きベクトルを算出するベクトル算出部と、前記ベクトル算出部において算出された動きベクトルを基に、前記カレントマクロブロックを構成する画像データを符号化する画像符号化部と、前記記憶部で記憶されている前記カレントマクロブロックを前記画像符号化部において符号化する前の画像データ、または、前記画像符号化部で符号化された画像データのいずれかを選択して出力する出力選択部と、を備え、前記出力選択部が、前記カレントマクロブロックについて、前記記憶部で記憶されている画像データを選択して出力した場合、前記ベクトル算出部は、前記カレントマクロブロックの動きベクトルを用いずに、前記カレントマクロブロックに対して符号化順で次のマクロブロックの予測動きベクトルを算出するとしてもよい。   In addition, the image encoding device of the present invention is adjacent to the current macroblock, and a storage unit that stores at least the image data constituting the current macroblock that is the macroblock to be encoded among the input image data. Based on the motion vector calculated by the vector calculation unit, the vector calculation unit for calculating the motion vector of the image data constituting the current macro block, using the motion vector of a predetermined macro block of the macro block, An image encoding unit that encodes image data constituting the current macroblock, and image data before the current encoding unit stores the current macroblock stored in the storage unit, or the image Selects and outputs one of the image data encoded by the encoding unit A selection unit, and when the output selection unit selects and outputs image data stored in the storage unit for the current macroblock, the vector calculation unit is configured to output a motion vector of the current macroblock. The predicted motion vector of the next macroblock may be calculated in the coding order with respect to the current macroblock.

また、本発明の画像符号化装置は、入力された画像データのうち、少なくとも符号化対象のマクロブロックであるカレントマクロブロックを構成する画像データを記憶する記憶部と、前記カレントマクロブロックに隣接するマクロブロックのうちの所定のマクロブロックの動きベクトルを用いて、前記カレントマクロブロックを構成する画像データの動きベクトルを算出するベクトル算出部と、前記ベクトル算出部において算出された動きベクトルを基に、前記カレントマクロブロックを構成する画像データを符号化する画像符号化部と、前記記憶部で記憶されている前記カレントマクロブロックを前記画像符号化部において符号化する前の画像データ、または、前記画像符号化部で符号化された画像データのいずれかを選択して出力する出力選択部と、を備え、前記出力選択部が、前記カレントマクロブロックについて、前記記憶部で記憶されている画像データを選択して出力した場合、前記ベクトル算出部は、当該カレントマクロブロックを構成する画像データの動きベクトルを用いずに、前記カレントマクロブロックに対して符号化順で次のマクロブロックを構成する画像データの動きベクトルを予測し、予測した動きベクトルと前記ベクトル算出部が算出した前記カレントマクロブロックの動きベクトルとの差分値である差分ベクトルを算出し、前記画像符号化部は、前記カレントマクロブロックを構成する符号化後の画像データに前記差分ベクトルを紐付けて出力するとしてもよい。   In addition, the image encoding device of the present invention is adjacent to the current macroblock, and a storage unit that stores at least the image data constituting the current macroblock that is the macroblock to be encoded among the input image data. Based on the motion vector calculated by the vector calculation unit, the vector calculation unit for calculating the motion vector of the image data constituting the current macro block, using the motion vector of a predetermined macro block of the macro block, An image encoding unit that encodes image data constituting the current macroblock, and image data before the current encoding unit stores the current macroblock stored in the storage unit, or the image Selects and outputs one of the image data encoded by the encoding unit A selection unit, and when the output selection unit selects and outputs the image data stored in the storage unit for the current macroblock, the vector calculation unit configures the current macroblock Without using the motion vector of the image data, the motion vector of the image data constituting the next macroblock in the encoding order with respect to the current macroblock is predicted, and the predicted motion vector and the vector calculation unit calculated A difference vector that is a difference value from a motion vector of a current macroblock is calculated, and the image encoding unit outputs the difference vector linked to the encoded image data that constitutes the current macroblock. Good.

また、前記所定の単位はマクロブロックであり、前記画像符号化手段は、前記画像データを直交変換する直交変換手段と、前記直交変換手段によって得られた係数を量子化する量子化手段とを有し、前記予測手段は、前記量子化手段によって得られた量子化後係数を、前記量子化後係数が2値化された場合のビット数に変換する係数変換手段と、マクロブロック毎に前記係数変換手段によって得られたビット数を加算し、加算により得られた値を前記予測値とする加算手段とを有するとしてもよい。   The predetermined unit is a macroblock, and the image encoding unit includes an orthogonal transform unit that orthogonally transforms the image data, and a quantization unit that quantizes the coefficient obtained by the orthogonal transform unit. The predicting means includes coefficient converting means for converting the quantized coefficient obtained by the quantizing means into the number of bits when the quantized coefficient is binarized, and the coefficient for each macroblock. There may be provided addition means for adding the number of bits obtained by the conversion means and using the value obtained by the addition as the predicted value.

また、前記画像符号化手段は、更に、前記マクロブロックの動きベクトルを求める演算手段を有し、前記予測手段は、更に、前記演算手段によって得られた動きベクトルを、前記動きベクトルが2値化された場合のビット数に変換する動き変換手段を有し、前記加算手段は、マクロブロック毎に、前記係数変換手段によって得られたビット数と、前記動き変換手段によって得られたビット数とを加算し、加算により得られた値を前記予測値とするとしてもよい。   In addition, the image encoding unit further includes a calculation unit that obtains a motion vector of the macroblock, and the prediction unit further binarizes the motion vector obtained by the calculation unit. Motion conversion means for converting into the number of bits in the case of being performed, and the addition means, for each macroblock, the number of bits obtained by the coefficient conversion means and the number of bits obtained by the motion conversion means The values obtained by the addition may be used as the predicted values.

また、前記演算手段は、更に、前記マクロブロックの前記動きベクトル以外の符号化情報を求め、前記予測手段は、更に、前記演算手段よって得られた前記符号化情報を、前記符号化情報が2値化された場合のビット数に変換する符号化情報変換手段を有し、前記加算手段は、マクロブロック毎に、前記係数変換手段によって得られたビット数と、前記動き変換手段によって得られたビット数と、前記符号化情報変換手段によって得られたビット数とを加算し、加算により得られた値を前記予測値とするとしてもよい。   Further, the calculation means further obtains encoded information other than the motion vector of the macroblock, and the prediction means further determines the encoded information obtained by the calculation means to be 2 Coding information converting means for converting the number of bits into a number of bits when converted into a value, and the adding means is obtained for each macroblock by the number of bits obtained by the coefficient converting means and the motion converting means. The number of bits and the number of bits obtained by the encoded information conversion unit may be added, and a value obtained by the addition may be used as the predicted value.

また、前記所定の単位はマクロブロックであり、前記画像符号化手段は、前記画像データを直交変換する直交変換手段と、前記直交変換手段によって得られた係数を量子化する量子化手段とを有し、前記予測手段は、前記量子化手段によって得られた量子化後係数を、前記量子化後係数がエントロピー符号化された場合の符号量に変換する係数変換手段と、マクロブロック毎に前記係数変換手段によって得られた符号量を加算し、加算した値を前記予測値とする加算手段とを有するとしてもよい。   The predetermined unit is a macroblock, and the image encoding unit includes an orthogonal transform unit that orthogonally transforms the image data, and a quantization unit that quantizes the coefficient obtained by the orthogonal transform unit. The predicting means converts the quantized coefficient obtained by the quantizing means into a code amount when the quantized coefficient is entropy-encoded, and the coefficient for each macroblock. An addition unit that adds the code amounts obtained by the conversion unit and uses the added value as the predicted value may be included.

また、前記画像符号化手段は、更に、前記マクロブロックの動きベクトルを求める演算手段を有し、前記予測手段は、更に、前記演算手段によって得られた動きベクトルを、前記動きベクトルがエントロピー符号化された場合の符号量に変換する動き変換手段を有し、前記加算手段は、マクロブロック毎に、前記係数変換手段によって得られた符号量と、前記動き変換手段によって得られた符号量とを加算し、加算した値を前記予測値とするとしてもよい。   In addition, the image encoding unit further includes a calculation unit for obtaining a motion vector of the macroblock, and the prediction unit further encodes the motion vector obtained by the calculation unit with the motion vector being entropy encoded. Motion conversion means for converting into a code amount in the case of being performed, the adding means, for each macroblock, the code amount obtained by the coefficient conversion means and the code amount obtained by the motion conversion means It is good also considering adding and making the added value the said predicted value.

また、前記演算手段は、更に、前記マクロブロックの前記動きベクトル以外の符号化情報を求め、前記予測手段は、更に、前記演算手段によって得られた前記符号化情報を、前記符号化情報がエントロピー符号化された場合の符号量に変換する符号化情報変換手段を有し、前記加算手段は、マクロブロック毎に、前記係数変換手段によって得られた符号量と、前記動き変換手段によって得られた符号量と、前記符号化情報変換手段によって得られた符号量とを加算し、加算した値を前記予測値とするとしてもよい。   In addition, the calculation means further obtains encoded information other than the motion vector of the macroblock, and the prediction means further calculates the encoded information obtained by the calculation means, and the encoding information is entropy. Coding information converting means for converting into a code amount in the case of encoding, and the adding means is obtained for each macroblock by the code amount obtained by the coefficient converting means and the motion converting means. The code amount and the code amount obtained by the encoded information conversion means may be added, and the added value may be used as the predicted value.

また、前記所定の単位はマクロブロックであり、前記予測手段は、更に、前記マクロブロックをエントロピー符号化する際の条件となる符号化条件を取得し、前記符号化条件に応じて前記予測値を補正する補正手段を有するとしてもよい。   Further, the predetermined unit is a macroblock, and the predicting means further obtains an encoding condition as a condition for entropy encoding the macroblock, and calculates the predicted value according to the encoding condition. You may have a correction | amendment means to correct | amend.

また、前記画像符号化手段は、前記画像データを直交変換する直交変換手段と、前記直交変換手段によって得られた係数を量子化する量子化手段とを有し、前記符号化条件は、前記マクロブロックが含まれるピクチャの種類、前記量子化手段が量子化する際の量子化パラメータの値、前記画像符号化装置から出力されるデータの出力レートの値、および、エントロピー符号化するresidual_blockの種類の少なくとも1つであるとしてもよい。   The image encoding means includes orthogonal transform means for orthogonally transforming the image data, and quantization means for quantizing a coefficient obtained by the orthogonal transform means, wherein the encoding condition is the macro The type of picture in which the block is included, the value of the quantization parameter when the quantization means quantizes, the value of the output rate of the data output from the image encoding device, and the type of residual_block for entropy encoding It may be at least one.

また、前記画像符号化手段は、前記符号化データを直交変換する直交変換手段と、前記直交変換手段によって得られた係数を量子化する量子化手段と、前記量子化手段によって得られた量子化後係数を逆量子化する逆量子化手段と、前記逆量子化手段によって得られた値を逆直交変換することでローカルデコード画を得る逆直交変換手段とを備え、前記I_PCMデータは、前記ローカルデコード画であるとしてもよい。   The image encoding means includes an orthogonal transform means for orthogonally transforming the encoded data, a quantization means for quantizing a coefficient obtained by the orthogonal transform means, and a quantization obtained by the quantization means. Inverse quantization means for inversely quantizing the post coefficients, and inverse orthogonal transform means for obtaining a local decoded image by inverse orthogonal transform of the value obtained by the inverse quantization means, wherein the I_PCM data is the local It may be a decoded image.

また、前記I_PCMデータは、前記画像符号化装置に入力される画像データであるとしてもよい。   The I_PCM data may be image data input to the image encoding device.

また、前記所定の単位はマクロブロックであり、前記閾値は、AVC/H.264で規定されるマクロブロックの最大の符号量であるとしてもよい。   The predetermined unit is a macroblock, and the threshold value is AVC / H. The maximum code amount of a macroblock defined by H.264 may be used.

また、前記所定の単位はマクロブロックであり、前記閾値符号量が、AVC/H.264で規定されるマクロブロックの最大の符号量から所定のマージン値を引いた値であるとしてもよい。   The predetermined unit is a macroblock, and the threshold code amount is AVC / H. The maximum code amount of the macroblock defined by H.264 may be a value obtained by subtracting a predetermined margin value.

また、前記エントロピー符号化は、Context−based Adaptive Binary Arithmetic Coding(CABAC)であるとしてもよい。   The entropy encoding may be Context-based Adaptive Binary Arithmetic Coding (CABAC).

また、本発明は、本発明の画像符号化装置が備える特徴的な構成部を有する集積回路として実現することもできる。また、本発明は、本発明の画像符号化装置が実行する特徴的な処理を含む画像符号化方法、および、当該画像符号化方法をコンピュータに実行させるプログラムとして実現することもできる。   The present invention can also be realized as an integrated circuit having characteristic components included in the image coding apparatus of the present invention. The present invention can also be realized as an image encoding method including characteristic processing executed by the image encoding apparatus of the present invention, and a program for causing a computer to execute the image encoding method.

本発明によれば、エントロピー符号化のための2値化処理を行なう前に、I_PCMデータを出力するか否かの判定が行なわれる。これにより、画像データの処理を高速化することが可能となる。例えば、所定の単位をマクロブロックとした場合、マクロブロックの直交変換および量子化が完了したらすぐに、次の面内予測、動き予測の処理を行なうことが可能になる。従って、マクロブロック毎のパイプライン処理が容易になり、処理の高速化が可能となる。   According to the present invention, it is determined whether or not to output I_PCM data before performing binarization processing for entropy coding. Thereby, it is possible to speed up the processing of the image data. For example, when the predetermined unit is a macroblock, the next in-plane prediction and motion prediction processing can be performed as soon as the orthogonal transformation and quantization of the macroblock are completed. Therefore, pipeline processing for each macroblock is facilitated, and the processing speed can be increased.

本発明の実施の形態の画像符号化装置の機能的な構成概要を示す機能ブロック図である。It is a functional block diagram which shows the functional structure outline | summary of the image coding apparatus of embodiment of this invention. 図1に示す画像符号化装置の機能的な構成概要の別の一例を示す機能ブロック図である。It is a functional block diagram which shows another example of the functional structure outline | summary of the image coding apparatus shown in FIG. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例1を示す機能ブロック図である。It is a functional block diagram which shows the specific example 1 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例2を示す機能ブロック図である。It is a functional block diagram which shows the specific example 2 of a functional structure of the image coding apparatus of embodiment of this invention. 量子化後係数の値をビット数に変換するための変換テーブルの一例である。It is an example of the conversion table for converting the value of the coefficient after quantization into the number of bits. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例3を示す機能ブロック図である。It is a functional block diagram which shows the specific example 3 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例4を示す機能ブロック図である。It is a functional block diagram which shows the specific example 4 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例5を示す機能ブロック図である。It is a functional block diagram which shows the specific example 5 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例6を示す機能ブロック図である。It is a functional block diagram which shows the specific example 6 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例7を示す機能ブロック図である。It is a functional block diagram which shows the specific example 7 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例8を示す機能ブロック図である。It is a functional block diagram which shows the specific example 8 of a functional structure of the image coding apparatus of embodiment of this invention. 本発明の実施の形態の画像符号化装置の機能的な構成の具体例9を示す機能ブロック図である。It is a functional block diagram which shows the specific example 9 of a functional structure of the image coding apparatus of embodiment of this invention. 符号化対象のマクロブロックの動き予測に係る処理の効率化の一例を説明するための図である。It is a figure for demonstrating an example of the efficiency improvement of the process which concerns on the motion prediction of the macroblock to be encoded. mvdの算出に係る処理のタイムチャートを示す図である。It is a figure which shows the time chart of the process which concerns on calculation of mvd. 従来の画像符号化装置の機能的な構成を示す機能ブロック図である。It is a functional block diagram which shows the functional structure of the conventional image coding apparatus.

以下、本発明を実施するための最良の形態について図面を用いて説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

図1は、本発明の実施の形態の画像符号化装置の機能的な構成概要を示す機能ブロック図である。まず、図1および図2を用いて本発明の実施の形態の画像符号化装置の構成および動作の概要を説明し、その後に、図3以降を用いて具体的な構成および動作を説明する。   FIG. 1 is a functional block diagram showing an outline of a functional configuration of an image encoding device according to an embodiment of the present invention. First, the outline of the configuration and operation of the image coding apparatus according to the embodiment of the present invention will be described with reference to FIGS. 1 and 2, and then the specific configuration and operation will be described with reference to FIG.

図1に示す画像符号化装置1は、画像データを符号化しビットストリームとして出力する装置である。   An image encoding apparatus 1 shown in FIG. 1 is an apparatus that encodes image data and outputs it as a bit stream.

図1に示すように、画像符号化装置1は、画像符号化部10と、I_PCMデータバッファ4と、出力選択部8と、出力部9と、符号量予測部20と、I_PCM判定部30と、エントロピー符号化部40とを備える。   As illustrated in FIG. 1, the image encoding device 1 includes an image encoding unit 10, an I_PCM data buffer 4, an output selection unit 8, an output unit 9, a code amount prediction unit 20, and an I_PCM determination unit 30. And an entropy encoding unit 40.

画像符号化部10は、入力される画像データを符号化する処理部であり、動き予測部2と、面内予測部3と、入力選択部5と、直交変換部6と、量子化部7とを有している。   The image encoding unit 10 is a processing unit that encodes input image data, and includes a motion prediction unit 2, an in-plane prediction unit 3, an input selection unit 5, an orthogonal transformation unit 6, and a quantization unit 7. And have.

また、エントロピー符号化部40は、画像符号化部10によって得られた符号化データに対しCABAC符号化処理を行なう処理部であり、2値化器41と、CABAC符号化器42とを有している。   The entropy encoding unit 40 is a processing unit that performs CABAC encoding processing on the encoded data obtained by the image encoding unit 10, and includes a binarizer 41 and a CABAC encoder 42. ing.

なお、逆量子化および逆直交変換を行なう構成部等、画像符号化装置が本来有する構成部の図示については図の簡略化のために省略している。   It should be noted that illustration of components inherent in the image coding apparatus, such as components that perform inverse quantization and inverse orthogonal transform, is omitted for the sake of simplicity.

画像符号化装置1に符号化対象の画像のデータが入力されると、動き予測部2と面内予測部3とI_PCMデータバッファ4とに入力される。つまり、I_PCMデータバッファ4には原画データがI_PCMデータとして格納される。動き予測部2または面内予測部3から出力されたデータは、入力選択部5に選択されることにより、離散コサイン変換(DCT)を行なう直交変換部6に入力される。直交変換部6はDCTによって得られるDCT係数を量子化部7に出力し、量子化部7によって量子化される。   When image data to be encoded is input to the image encoding device 1, the data is input to the motion prediction unit 2, the in-plane prediction unit 3, and the I_PCM data buffer 4. That is, the original image data is stored as I_PCM data in the I_PCM data buffer 4. The data output from the motion prediction unit 2 or the in-plane prediction unit 3 is input to the orthogonal transform unit 6 that performs discrete cosine transform (DCT) by being selected by the input selection unit 5. The orthogonal transform unit 6 outputs the DCT coefficient obtained by DCT to the quantization unit 7 and is quantized by the quantization unit 7.

以上の動作の流れは、従来の画像符号化装置と同様である。しかし、本発明の実施の形態の画像符号化装置1は、符号量予測部20が、量子化部7から出力される量子化後のDCT係数(以下、「量子化後係数」という。)等の符号化データのマクロブロック毎の値から、マクロブロック毎のCABAC符号化後の符号量の予測値を求めることができる。   The above operation flow is the same as that of the conventional image encoding apparatus. However, in the image encoding device 1 according to the embodiment of the present invention, the code amount prediction unit 20 uses the quantized DCT coefficients output from the quantization unit 7 (hereinafter referred to as “quantized coefficients”) or the like. From the value for each macroblock of the encoded data, a predicted value of the code amount after CABAC encoding for each macroblock can be obtained.

また、符号量予測部20へ入力されるデータは、量子化部の出力に限らず、符号量が予測可能である符号化データであれば何でもよい。   The data input to the code amount prediction unit 20 is not limited to the output of the quantization unit, and any data that can predict the code amount can be used.

図2は、図1に示す画像符号化装置の機能的な構成概要の別の一例を示す機能ブロック図である。   FIG. 2 is a functional block diagram illustrating another example of a functional configuration outline of the image encoding device illustrated in FIG. 1.

例えば、図2に示す画像符号化装置のように、入力選択部5により選択されたデータを、符号量予測部20の入力データとすることもできる。入力選択部5の出力は、直交変換部、量子化部によって、ほぼ一意のデータに変換されるので、符号量予測部20に、入力選択部5の出力を入力しても、同じ結果を得ることが可能である。ただし、符号量予測部20に、入力選択部5の出力を入力する場合と、量子化部7の出力を入力する場合とでは、符号量予測部20の内部は変える必要がある。   For example, the data selected by the input selection unit 5 can be used as the input data of the code amount prediction unit 20 as in the image encoding device shown in FIG. Since the output of the input selection unit 5 is converted into substantially unique data by the orthogonal transformation unit and the quantization unit, the same result is obtained even if the output of the input selection unit 5 is input to the code amount prediction unit 20. It is possible. However, it is necessary to change the inside of the code amount prediction unit 20 when the output of the input selection unit 5 is input to the code amount prediction unit 20 and when the output of the quantization unit 7 is input.

なお、入力選択部5から出力されるデータも、本発明の画像符号化装置における符号化データの一例である。   The data output from the input selection unit 5 is also an example of encoded data in the image encoding device of the present invention.

更に、I_PCM判定部30は、符号量についての設定された閾値を有しており、予測値と閾値との比較を行なうことができる。   Furthermore, the I_PCM determination unit 30 has a set threshold for the code amount, and can compare the predicted value with the threshold.

I_PCM判定部30は、比較の結果に基づき出力選択部8に指示を行なう。具体的には、予測値が閾値より大きい場合、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、画像符号化部10から出力される符号化データを選択する指示を行なう。   The I_PCM determination unit 30 instructs the output selection unit 8 based on the comparison result. Specifically, when the predicted value is larger than the threshold value, an instruction to select I_PCM data is issued. Further, when the predicted value is equal to or less than the threshold value, an instruction to select encoded data output from the image encoding unit 10 is issued.

また、I_PCM判定部30は、動き予測部2に対してもI_PCM判定の結果を通知する。この通知を受けた動き予測部の動作については、後述する具体例10および具体例11において説明する。   Also, the I_PCM determination unit 30 notifies the motion prediction unit 2 of the result of the I_PCM determination. The operation of the motion prediction unit that has received this notification will be described in specific examples 10 and 11 described later.

出力選択部8は、I_PCMデータを選択する指示を受けると、I_PCMデータバッファ4からI_PCMデータを取得し、出力部9に出力する。また、“mb_type=I_PCM”とした制御情報をエントロピー符号化部40に出力する。   When receiving an instruction to select I_PCM data, the output selection unit 8 acquires I_PCM data from the I_PCM data buffer 4 and outputs it to the output unit 9. Also, the control information “mb_type = I_PCM” is output to the entropy encoding unit 40.

エントロピー符号化部40は、入力された制御情報のみを2値化器41とCABAC符号化器42により符号化し、出力部9に出力する。   The entropy encoding unit 40 encodes only the input control information by the binarizer 41 and the CABAC encoder 42 and outputs the encoded information to the output unit 9.

出力部9は、出力選択部8が出力するI_PCMデータと、エントロピー符号化部40が出力する符号化された制御情報とをビットストリームとして外部に出力する。   The output unit 9 outputs the I_PCM data output from the output selection unit 8 and the encoded control information output from the entropy encoding unit 40 to the outside as a bit stream.

また、出力選択部8は、符号化データを選択する指示を受けると、量子化部7から量子化後係数データを取得し、エントロピー符号化部40に出力する。   When receiving an instruction to select encoded data, the output selection unit 8 acquires quantized coefficient data from the quantization unit 7 and outputs the acquired coefficient data to the entropy encoding unit 40.

エントロピー符号化部40は、2値化器41とCABAC符号化器42とにより、入力された量子化後係数データを符号化し、出力部9に出力する。出力部9は、エントロピー符号化部40が出力する符号化されたデータをビットストリームとして外部に出力する。つまり、出力選択部8と出力部9とにより、本発明の画像符号化装置における出力手段が有する、I_PCM判定に基づきデータを出力する機能が発揮される。   The entropy encoding unit 40 encodes the input quantized coefficient data by the binarizer 41 and the CABAC encoder 42 and outputs the encoded coefficient data to the output unit 9. The output unit 9 outputs the encoded data output from the entropy encoding unit 40 to the outside as a bit stream. That is, the output selection unit 8 and the output unit 9 exhibit the function of outputting data based on the I_PCM determination that the output unit in the image encoding device of the present invention has.

このように、本発明の画像符号化装置1は、エントロピー符号化のための処理の前に、出力するビットストリームをI_PCMデータとするか、エントロピー符号化処理を行なった符号化データとするかを決定することができる。   As described above, the image encoding device 1 according to the present invention determines whether the output bit stream is the I_PCM data or the encoded data subjected to the entropy encoding process before the entropy encoding process. Can be determined.

つまり、I_PCMデータをビットストリームとして出力するか否かの判定(以下、「I_PCM判定」という。)をマクロブロック毎に行なうが、この判定のタイミングをより早く行なうことができる。また、最終的に、原画データであるI_PCMデータがビットストリームとして出力される場合、エントロピー符号化のための処理を行なう必要がない。つまり、必要な動作の決定をより早いタイミングで行なうことにより、処理速度が向上する。   That is, whether or not to output I_PCM data as a bit stream (hereinafter referred to as “I_PCM determination”) is performed for each macroblock, but the timing of this determination can be made earlier. Finally, when I_PCM data that is original image data is output as a bit stream, it is not necessary to perform processing for entropy coding. In other words, the processing speed is improved by determining the necessary operation at an earlier timing.

以下、画像符号化装置1について、符号量予測部20およびI_PCM判定部30の具体的な構成および動作を中心に、その動作と構成の具体例を説明する。   Hereinafter, specific examples of operations and configurations of the image encoding device 1 will be described focusing on the specific configurations and operations of the code amount prediction unit 20 and the I_PCM determination unit 30.

(具体例1)
図3は、画像符号化装置1の機能的な構成の具体例1を示す機能ブロック図である。
(Specific example 1)
FIG. 3 is a functional block diagram illustrating a specific example 1 of the functional configuration of the image encoding device 1.

図3に示すように、I_PCM判定部30は、符号量比較部31と閾値記憶部32とを有している。その他の構成部は、図1に示す画像符号化装置と同じである。   As illustrated in FIG. 3, the I_PCM determination unit 30 includes a code amount comparison unit 31 and a threshold storage unit 32. Other components are the same as those of the image encoding apparatus shown in FIG.

閾値記憶部32は、I_PCM判定のための基準値となる、符号量の閾値を記憶する記憶部である。   The threshold value storage unit 32 is a storage unit that stores a code amount threshold value that serves as a reference value for I_PCM determination.

符号量比較部31は、符号量予測部20から出力されるマクロブロック毎の符号量の予測値と閾値記憶部32に記憶されている閾値とを比較する処理部である。比較の結果、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される量子化後係数と符号化情報とを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 is a processing unit that compares the prediction value of the code amount for each macroblock output from the code amount prediction unit 20 with the threshold value stored in the threshold value storage unit 32. As a result of the comparison, if the predicted value is larger than the threshold value, the output selection unit 8 is instructed to select I_PCM data. Further, when the predicted value is equal to or less than the threshold value, the output selection unit 8 is instructed to select the quantized coefficient output from the image encoding unit 10 and the encoding information. The subsequent data flow is as described with reference to FIG.

ここで、閾値記憶部32に記憶されている閾値は、例えば、AVC/H.264に規定されるマクロブロックの最大符号量である3200ビットである。つまり、画像符号化装置1において、符号量が3200ビットを越えると予測されたマクロブロックについては、I_PCMデータがビットストリームとして出力される。   Here, the threshold value stored in the threshold value storage unit 32 is, for example, AVC / H. H.264 is 3200 bits, which is the maximum code amount of a macroblock defined in H.264. That is, in the image encoding device 1, I_PCM data is output as a bit stream for a macroblock whose code amount is predicted to exceed 3200 bits.

なお、閾値記憶部32に記憶されている閾値は、AVC/H.264に規定されるマクロブロックの最大符号量と同一の値ではなく、より安全に判定を行なうために、最大符号量から一定のマージン値を引いた値でもよい。また、一定のマージン値を引いた値を閾値として閾値記憶部32に記憶しておくのではなく、符号量比較部31が、最大符号量である閾値から所定のマージン値を引いて、予測値との比較を行なってもよい。   The threshold value stored in the threshold value storage unit 32 is AVC / H. The value is not the same as the maximum code amount of the macroblock defined in H.264, but may be a value obtained by subtracting a certain margin value from the maximum code amount in order to make a safer determination. In addition, instead of storing a value obtained by subtracting a certain margin value as a threshold value in the threshold value storage unit 32, the code amount comparison unit 31 subtracts a predetermined margin value from the threshold value that is the maximum code amount to obtain a predicted value. You may compare with.

また、I_PCM判定をマクロブロックの単位で行わなくてもよく、より大きな単位でもよく、また、より小さな単位でもよい。例えば、エントロピー符号化の規格等に応じて変更してもよい。   In addition, the I_PCM determination may not be performed in units of macroblocks, and may be in larger units or in smaller units. For example, you may change according to the standard of entropy encoding.

(具体例2)
図4は、画像符号化装置1の機能的な構成の具体例2を示す機能ブロック図である。
(Specific example 2)
FIG. 4 is a functional block diagram illustrating a specific example 2 of the functional configuration of the image encoding device 1.

図4に示すように、符号量予測部20は係数ビット数変換部21と加算部25とを有している。また、画像符号化装置1において、動き予測部2と面内予測部3と、入力選択部5とにより符号化方式演算部10aが構成されている。更に、マージ部11を備えている。   As shown in FIG. 4, the code amount prediction unit 20 includes a coefficient bit number conversion unit 21 and an addition unit 25. In the image encoding device 1, the motion prediction unit 2, the in-plane prediction unit 3, and the input selection unit 5 constitute an encoding method calculation unit 10 a. Further, a merge unit 11 is provided.

符号化方式演算部10aは、入力された画像データから得られる符号化情報と、画素の差分データとを分けて出力する。画素の差分データは直交変換部6と量子化部7とを経て、マージ部11に入力される。マージ部11は、符号化方式演算部10aから出力される符号化情報と、量子化部7から得られる量子化後係数データとをマージする。   The encoding method calculation unit 10a separately outputs encoding information obtained from input image data and pixel difference data. The pixel difference data is input to the merge unit 11 via the orthogonal transform unit 6 and the quantization unit 7. The merge unit 11 merges the encoding information output from the encoding method calculation unit 10a and the quantized coefficient data obtained from the quantization unit 7.

符号化情報とは、符号化対象のマクロブロックの動きベクトル、mb_type、イントラ予測方向等の情報であり。マクロブロックの符号化に関する情報である。   Encoding information is information such as a motion vector, mb_type, and intra prediction direction of a macroblock to be encoded. This is information relating to encoding of macroblocks.

その他の構成部は、図3に示す画像符号化装置1と同じであり、I_PCM判定部30は、符号量比較部31と閾値記憶部32とを有している。   Other components are the same as those of the image encoding device 1 illustrated in FIG. 3, and the I_PCM determination unit 30 includes a code amount comparison unit 31 and a threshold storage unit 32.

係数ビット数変換部21は、本発明の画像符号化装置における係数変換手段の一例であり、量子化部7から出力される量子化後係数の値を、その量子化後係数が2値化器41で2値化された場合の2値データのビット数に変換する処理部である。   The coefficient bit number conversion unit 21 is an example of a coefficient conversion unit in the image encoding device of the present invention, and the quantized coefficient value output from the quantization unit 7 is converted into a binarizer. This is a processing unit for converting into the number of bits of binary data when binarized at 41.

具体的には、係数ビット数変換部21は、図5に示す変換テーブルを有しており、その変換テーブルを用い量子化後係数の値をビット数に変換する。   Specifically, the coefficient bit number conversion unit 21 has the conversion table shown in FIG. 5, and converts the value of the quantized coefficient into the number of bits using the conversion table.

図5は、量子化後係数の値をビット数に変換するための変換テーブルの一例である。図5に示すように、量子化後係数の値が分かれば2値データのビット数は決定される。   FIG. 5 is an example of a conversion table for converting the value of the quantized coefficient into the number of bits. As shown in FIG. 5, if the value of the quantized coefficient is known, the number of bits of binary data is determined.

係数ビット数変換部21から出力されるビット数は、加算部25においてマクロブロック毎に加算され、I_PCM判定部30に出力される。この加算部25においてマクロブロック毎に加算され出力されるビット数を、以下、「係数ビット数」という。つまり、係数ビット数は、予測値としてI_PCM判定部30に出力される。   The number of bits output from the coefficient bit number conversion unit 21 is added for each macroblock in the addition unit 25 and output to the I_PCM determination unit 30. The number of bits added and output for each macroblock in the adding unit 25 is hereinafter referred to as “coefficient bit number”. That is, the number of coefficient bits is output to the I_PCM determination unit 30 as a predicted value.

I_PCM判定部30において、閾値記憶部32には、符号量予測部20から出力される係数ビット数を用いて、I_PCM判定を行なうための閾値が記憶されている。つまり、符号量予測部20から出力される予測値は、マクロブロック毎のCABAC符号化後の符号量の予測値ではなく、マクロブロック毎の算術符号化前の段階の2値データのビット数である。そのため、そのビット数に対応する閾値を有している。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the number of coefficient bits output from the code amount prediction unit 20. That is, the prediction value output from the code amount prediction unit 20 is not the prediction value of the code amount after CABAC encoding for each macroblock, but the number of bits of binary data before the arithmetic encoding for each macroblock. is there. Therefore, it has a threshold value corresponding to the number of bits.

符号量比較部31は、符号量予測部20から受け取った係数ビット数である予測値と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the prediction value, which is the number of coefficient bits received from the code amount prediction unit 20, with the threshold value stored in the threshold value storage unit 32. If the prediction value is larger than the threshold value, the output selection unit 8 is instructed to select I_PCM data. When the predicted value is less than or equal to the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図4に示す画像符号化装置1は、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数を2値データにした場合のビット数を予測値として求めることができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   As described above, the image encoding device 1 illustrated in FIG. 4 can obtain the number of bits as a predicted value when all the quantized coefficients included in one encoding target macroblock are converted into binary data. . Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

なお、係数ビット数変換部21は、図5に示す変換テーブルを用い量子化後係数の値をビット数に変換するとした。しかしながら変換テーブル以外の手段で変換してもよく、例えば同じ変換結果が得られる関数を用いて変換してもよい。以下の説明において、変換テーブルを用いて変換する場合も同様である。   Note that the coefficient bit number conversion unit 21 converts the value of the quantized coefficient into the number of bits using the conversion table shown in FIG. However, the conversion may be performed by means other than the conversion table, for example, using a function that can obtain the same conversion result. In the following description, the same applies to conversion using a conversion table.

(具体例3)
図6は、画像符号化装置1の機能的な構成の具体例3を示す機能ブロック図である。
(Specific example 3)
FIG. 6 is a functional block diagram illustrating a specific example 3 of the functional configuration of the image encoding device 1.

図6に示す画像符号化装置1の機能的な構成は、図4に示す画像符号化装置1が有する構成部に加え、動きベクトルビット数変換部22と加算部27とを符号量予測部20に有する構成である。   The functional configuration of the image encoding device 1 illustrated in FIG. 6 includes a motion vector bit number converting unit 22 and an adding unit 27 in addition to the components included in the image encoding device 1 illustrated in FIG. It is the structure which has.

動きベクトルビット数変換部22は、本発明の画像符号化装置における動き変換手段の一例であり、符号化方式演算部10aから出力される符号化情報の中から動きベクトルを取得し、動きベクトルが2値化器41で2値化された場合の2値データのビット数に変換する処理部である。この変換には、図5に示す変換テーブル同様の変換テーブルが用いられる。つまり、動きベクトルビット数変換部22は、1つの動きベクトルから1つの2値データのビット数が得られる変換テーブルを有しており、この変換テーブルを用いて、動きベクトルが2値化器41で2値化された場合の2値データのビット数に変換する。   The motion vector bit number conversion unit 22 is an example of a motion conversion unit in the image encoding device of the present invention. The motion vector bit number conversion unit 22 acquires a motion vector from the encoding information output from the encoding method calculation unit 10a. This is a processing unit that converts the number of bits of binary data when binarized by the binarizer 41. For this conversion, a conversion table similar to the conversion table shown in FIG. 5 is used. That is, the motion vector bit number conversion unit 22 has a conversion table for obtaining the number of bits of one binary data from one motion vector, and the motion vector is converted into a binarizer 41 using this conversion table. Is converted into the number of bits of binary data when binarized.

動きベクトルビット数変換部22から出力されるビット数は、加算部27においてマクロブロック毎に加算される。この図6に示す加算部27においてマクロブロック毎に加算され出力されるビット数を、以下、「動きベクトルビット数」という。また、係数ビット数変換部21から出力されるビット数も加算部25においてマクロブロック毎に加算される。更に、加算部25と加算部27とから出力される係数ビット数と動きベクトルビット数との和が、I_PCM判定部30に出力される。つまり、係数ビット数と動きベクトルビット数との和は、予測値としてI_PCM判定部30に出力される。   The number of bits output from the motion vector bit number conversion unit 22 is added for each macroblock in the addition unit 27. The number of bits added and output for each macroblock in the adding unit 27 shown in FIG. 6 is hereinafter referred to as “motion vector bit number”. The number of bits output from the coefficient bit number conversion unit 21 is also added for each macroblock in the addition unit 25. Further, the sum of the number of coefficient bits and the number of motion vector bits output from the addition unit 25 and the addition unit 27 is output to the I_PCM determination unit 30. That is, the sum of the number of coefficient bits and the number of motion vector bits is output to the I_PCM determination unit 30 as a predicted value.

I_PCM判定部30において、閾値記憶部32には、係数ビット数と動きベクトルビット数との和を用いて、I_PCM判定を行なうための閾値が記憶されている。つまり、予測値として符号量予測部20から出力される係数ビット数と動きベクトルビット数との和に対応する閾値を有している。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the sum of the number of coefficient bits and the number of motion vector bits. That is, it has a threshold value corresponding to the sum of the number of coefficient bits and the number of motion vector bits output from the code amount prediction unit 20 as a prediction value.

符号量比較部31は、符号量予測部20から受け取った係数ビット数と動きベクトルビット数との和である予測値と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the prediction value that is the sum of the coefficient bit number and the motion vector bit number received from the code amount prediction unit 20 with the threshold value stored in the threshold value storage unit 32, and the prediction value is If it is larger than the threshold value, the output selection unit 8 is instructed to select I_PCM data. When the predicted value is less than or equal to the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図6に示す画像符号化装置1は、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数を2値データにした場合のビット数と、そのマクロブロックの全ての動きベクトルを2値データにした場合のビット数とを加算し、加算した値を予測値とする。これにより、図4に示す画像符号化装置1と比べて、実際に符号化対象のマクロブロックを2値化した際のビット数により近い値を予測値とすることができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   As described above, the image encoding device 1 shown in FIG. 6 has the number of bits when all the quantized coefficients included in one encoding target macroblock are converted to binary data, and all the macroblocks. The number of bits when the motion vector is converted to binary data is added, and the added value is used as a predicted value. Thereby, as compared with the image encoding device 1 shown in FIG. 4, a value closer to the number of bits when the encoding target macroblock is actually binarized can be set as the predicted value. Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

(具体例4)
図7は、画像符号化装置1の機能的な構成の具体例4を示す機能ブロック図である。
(Specific example 4)
FIG. 7 is a functional block diagram showing a specific example 4 of the functional configuration of the image encoding device 1.

図7に示す画像符号化装置1の機能的な構成は、図6に示す画像符号化装置1の構成において、動きベクトルビット数変換部22に換えて符号化情報ビット数変換部23を符号量予測部20に有する構成である。   The functional configuration of the image encoding device 1 illustrated in FIG. 7 is the same as the configuration of the image encoding device 1 illustrated in FIG. 6 except that the encoded information bit number conversion unit 23 is replaced with a code amount in place of the motion vector bit number conversion unit 22. This is a configuration included in the prediction unit 20.

符号化情報ビット数変換部23は、符号化方式演算部10aから出力される符号化情報を取得し、動きベクトルを含む符号化情報が2値化器41で2値化された場合の2値データのビット数に変換する処理部である。つまり、動きベクトルが2値化された場合のビット数と、動きベクトル以外の符号化情報が2値化された場合のビット数とを出力する処理部である。従って、図6に示す、動きベクトルビット数変換部22の役割も兼ねている処理部である。   The encoding information bit number conversion unit 23 acquires the encoding information output from the encoding method calculation unit 10a, and is binary when the encoding information including the motion vector is binarized by the binarizer 41. It is a processing unit that converts data into the number of bits. That is, the processing unit outputs the number of bits when the motion vector is binarized and the number of bits when the encoded information other than the motion vector is binarized. Therefore, this processing unit also serves as the motion vector bit number conversion unit 22 shown in FIG.

なお、符号化情報ビット数変換部23により、本発明の画像符号化装置における動き変換手段と符号化情報変換手段とがそれぞれ有する、対象となるデータから2値化後のビット数を得る機能が実現される。   Note that the encoded information bit number conversion unit 23 has a function of obtaining the number of bits after binarization from the target data, which each of the motion conversion unit and the encoded information conversion unit in the image encoding device of the present invention has. Realized.

この符号化情報の変換には、図5に示す変換テーブルと同様の変換テーブルが用いられる。つまり、符号化情報ビット数変換部23は、符号化情報に含まれる1つの動きベクトルや1つのmb_type等の情報のそれぞれから1つの2値データのビット数がそれぞれ得られる1つ以上の変換テーブルを有しており、この変換テーブルを用いて、符号化情報が2値化器41で2値化された場合の2値データのビット数に変換する。   For the conversion of the encoded information, a conversion table similar to the conversion table shown in FIG. 5 is used. In other words, the encoded information bit number conversion unit 23 is one or more conversion tables in which the number of bits of one binary data is obtained from each piece of information such as one motion vector and one mb_type included in the encoded information. Using this conversion table, the encoded information is converted into the number of bits of binary data when binarized by the binarizer 41.

符号化情報ビット数変換部23から出力されるビット数は、加算部27においてマクロブロック毎に加算される。この図7に示す加算部27においてマクロブロック毎に加算され出力されるビット数を、以下、「符号化情報ビット数」という。また、係数ビット数変換部21から出力されるビット数も加算部25においてマクロブロック毎に加算される。   The number of bits output from the encoded information bit number converting unit 23 is added by the adding unit 27 for each macroblock. The number of bits added and output for each macroblock in the adding unit 27 shown in FIG. 7 is hereinafter referred to as “the number of encoded information bits”. The number of bits output from the coefficient bit number conversion unit 21 is also added for each macroblock in the addition unit 25.

更に、加算部25と加算部27とから出力される係数ビット数と符号化情報ビット数との和が、I_PCM判定部30に出力される。つまり、係数ビット数と符号化情報ビット数との和は、予測値としてI_PCM判定部30に出力される。   Furthermore, the sum of the number of coefficient bits and the number of encoded information bits output from the addition unit 25 and the addition unit 27 is output to the I_PCM determination unit 30. That is, the sum of the number of coefficient bits and the number of encoded information bits is output to the I_PCM determination unit 30 as a predicted value.

つまり、図6に示す画像符号化装置1では、量子化後係数および動きベクトルのマクロブロック毎の2値化後の2値データのビット数の和を予測値としているが、図7に示す画像符号化装置1では、更に、動きベクトル以外のmb_type等の符号化情報も2値化後の2値データのビット数に変換し、マクロブロック毎に予測値に加えている。   That is, in the image encoding device 1 shown in FIG. 6, the sum of the number of bits of binary data after binarization of each quantized coefficient and motion vector for each macroblock is used as a predicted value. The encoding apparatus 1 further converts encoding information such as mb_type other than the motion vector into the number of bits of binary data after binarization, and adds it to the prediction value for each macroblock.

I_PCM判定部30において、閾値記憶部32には、係数ビット数と符号化情報ビット数との和を用いて、I_PCM判定を行なうための閾値が記憶されている。つまり、予測値として符号量予測部20から出力される係数ビット数と符号化情報ビット数との和に対応する閾値を有している。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the sum of the number of coefficient bits and the number of encoded information bits. That is, it has a threshold value corresponding to the sum of the number of coefficient bits output from the code amount prediction unit 20 and the number of encoded information bits as a predicted value.

符号量比較部31は、符号量予測部20から受け取った係数ビット数と符号化情報ビット数との和である予測値と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the prediction value, which is the sum of the number of coefficient bits received from the code amount prediction unit 20 and the number of encoded information bits, with the threshold value stored in the threshold value storage unit 32, and calculates the prediction value. Is larger than the threshold value, the output selection unit 8 is instructed to select I_PCM data. When the predicted value is equal to or less than the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図7に示す画像符号化装置1は、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数を2値データにした場合のビット数と、そのマクロブロックの全ての動きベクトルを2値データにした場合のビット数と、そのマクロブロックの動きベクトル以外の全ての符号化情報を2値データにした場合のビット数とを加算し、加算した値を予測値とする。これにより、図6に示す画像符号化装置1と比べて、実際に符号化対象のマクロブロックを2値化した際のビット数により近い値を予測値とすることができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   As described above, the image encoding device 1 shown in FIG. 7 has the number of bits when all the quantized coefficients included in one encoding target macroblock are converted to binary data, and all the macroblocks. The number of bits when the motion vector is converted into binary data and the number of bits when all encoded information other than the motion vector of the macroblock is converted into binary data are added, and the added value is used as a predicted value. . Thereby, as compared with the image encoding device 1 shown in FIG. 6, a value closer to the number of bits when the encoding target macroblock is actually binarized can be set as the predicted value. Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

(具体例5)
図8は、画像符号化装置1の機能的な構成の具体例5を示す機能ブロック図である。
(Specific example 5)
FIG. 8 is a functional block diagram showing a specific example 5 of the functional configuration of the image encoding device 1.

図8に示す画像符号化装置1の機能的な構成は、図4に示す画像符号化装置1の構成において、係数ビット数変換部21に換えて係数符号量変換部24を符号量予測部20に有する構成である。   The functional configuration of the image encoding device 1 illustrated in FIG. 8 is the same as the configuration of the image encoding device 1 illustrated in FIG. 4 except that the coefficient code amount conversion unit 24 is replaced with the code amount prediction unit 20 instead of the coefficient bit number conversion unit 21. It is the structure which has.

係数符号量変換部24は、本発明の画像符号化装置における係数変換手段の別の一例であり、量子化部7から出力される量子化後係数の値を、その量子化後係数が2値化された後にCABAC符号化器42で符号化された場合の符号量に変換し、予測値として出力する処理部である。   The coefficient code amount conversion unit 24 is another example of coefficient conversion means in the image encoding device of the present invention, and the value of the quantized coefficient output from the quantizing unit 7 is binary. It is a processing unit that converts the code amount into a code amount when encoded by the CABAC encoder 42 after being converted into a prediction value.

つまり、符号量予測部20は、上述の図4、図6および図7に示す各画像符号化装置1における符号量予測部20とは異なり、マクロブロック毎の量子化後係数を2値データにした場合のビット数を予測値として出力するのではなく、そのマクロブロック毎の2値データをCABAC符号化した場合の符号量を予測値として出力する。   That is, unlike the code amount prediction unit 20 in each image encoding device 1 shown in FIGS. 4, 6, and 7, the code amount prediction unit 20 converts the quantized coefficient for each macroblock into binary data. Instead of outputting the number of bits as a predicted value, the code amount when the binary data for each macroblock is CABAC encoded is output as the predicted value.

係数符号量変換部24は、1つの量子化後係数の値を符号化後の1つの符号量に変換するための変換テーブル、または、関数等を有している。これら変換テーブルおよび関数等は、実験値または理論値から求められる。図9および図10を用いて後述する動きベクトル符号量変換部26および符号化情報符号量変換部28も同様の変換テーブルまたは関数を用い、それぞれに入力される情報を符号量に変換する。   The coefficient code amount conversion unit 24 has a conversion table or a function for converting the value of one quantized coefficient into one encoded code amount. These conversion tables and functions are obtained from experimental values or theoretical values. The motion vector code amount conversion unit 26 and the encoded information code amount conversion unit 28 which will be described later with reference to FIGS. 9 and 10 also use the same conversion table or function to convert the information input to the code amount.

係数符号量変換部24から出力された符号量は、加算部25においてマクロブロック毎に加算される。この図8に示す加算部25においてマクロブロック毎に加算され出力される符号量を、以下、「係数符号量」という。つまり、係数符号量は、予測値としてI_PCM判定部30に出力される。   The code amount output from the coefficient code amount conversion unit 24 is added for each macroblock in the addition unit 25. The code amount added and output for each macroblock in the adding unit 25 shown in FIG. 8 is hereinafter referred to as “coefficient code amount”. That is, the coefficient code amount is output to the I_PCM determination unit 30 as a predicted value.

I_PCM判定部30において、閾値記憶部32には、符号量予測部20から出力される係数符号量を用いて、I_PCM判定を行なうための閾値が記憶されている。符号量予測部20から出力される予測値は、量子化後係数のマクロブロック毎のCABAC符号化後の符号量の予測値であり、閾値記憶部32には、その予測値に対応する閾値が記憶されている。例えば、上述の、AVC/H.264で規定されるマクロブロックの最大の符号量である3200ビット以下の値が閾値として記憶されている。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the coefficient code amount output from the code amount prediction unit 20. The prediction value output from the code amount prediction unit 20 is a prediction value of the code amount after CABAC encoding for each macroblock of the quantized coefficient, and the threshold value storage unit 32 has a threshold value corresponding to the prediction value. It is remembered. For example, the AVC / H. A value of 3200 bits or less, which is the maximum code amount of a macroblock defined by H.264, is stored as a threshold value.

符号量比較部31は、符号量予測部20から受け取った係数符号量である予測値と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the prediction value, which is the coefficient code amount received from the code amount prediction unit 20, with the threshold value stored in the threshold value storage unit 32. If the prediction value is greater than the threshold value, the output selection unit 8 is instructed to select I_PCM data. When the predicted value is equal to or less than the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図8に示す画像符号化装置1は、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数をCABAC符号化した場合の符号量を予測値として求めることができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   As described above, the image encoding device 1 illustrated in FIG. 8 can obtain the code amount when all the quantized coefficients included in one encoding target macroblock are CABAC encoded as a predicted value. Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

(具体例6)
図9は、画像符号化装置1の機能的な構成の具体例6を示す機能ブロック図である。
(Specific example 6)
FIG. 9 is a functional block diagram illustrating a specific example 6 of the functional configuration of the image encoding device 1.

図9に示す画像符号化装置1の機能的な構成は、図8に示す画像符号化装置1が有する構成部に加え、動きベクトル符号量変換部26と加算部27とを符号量予測部20に有する構成である。   The functional configuration of the image encoding device 1 illustrated in FIG. 9 includes a motion vector code amount conversion unit 26 and an addition unit 27 in addition to the components included in the image encoding device 1 illustrated in FIG. It is the structure which has.

動きベクトル符号量変換部26は、本発明の画像符号化装置における動き変換手段の別の一例であり、符号化方式演算部10aから出力される符号化情報の中から動きベクトルを取得し、動きベクトルが2値化され更にCABAC符号化器42で符号化された場合の符号量に変換する処理部である。この変換には上述のように変換テーブルまたは関数等が用いられる。   The motion vector code amount conversion unit 26 is another example of motion conversion means in the image encoding device of the present invention, acquires a motion vector from the encoding information output from the encoding method calculation unit 10a, This is a processing unit for converting a vector into a code amount when the vector is binarized and further encoded by the CABAC encoder 42. For this conversion, a conversion table or a function is used as described above.

動きベクトル符号量変換部26から出力される符号量は、加算部27においてマクロブロック毎に加算される。この図9に示す加算部27においてマクロブロック毎に加算され出力される符号量を、以下、「動きベクトル符号量」という。また、係数符号量変換部24から出力される符号量も加算部25においてマクロブロック毎に加算される。更に、加算部25と加算部27とから出力される係数符号量と動きベクトル符号量との和が、I_PCM判定部30に出力される。つまり、係数符号量と動きベクトル符号量との和は、予測値としてI_PCM判定部30に出力される。   The code amount output from the motion vector code amount conversion unit 26 is added by the adding unit 27 for each macroblock. The code amount added and output for each macroblock in the adder 27 shown in FIG. 9 is hereinafter referred to as “motion vector code amount”. Further, the code amount output from the coefficient code amount conversion unit 24 is also added for each macroblock in the addition unit 25. Further, the sum of the coefficient code amount and the motion vector code amount output from the addition unit 25 and the addition unit 27 is output to the I_PCM determination unit 30. That is, the sum of the coefficient code amount and the motion vector code amount is output to the I_PCM determination unit 30 as a predicted value.

I_PCM判定部30において、閾値記憶部32には、係数符号量と動きベクトル符号量との和を用いて、I_PCM判定を行なうための閾値が記憶されている。つまり、予測値として符号量予測部20から出力される係数符号量と動きベクトル符号量との和に対応する閾値を有している。例えば、上述の、AVC/H.264で規定されるマクロブロックの最大の符号量である3200ビット以下の値が閾値として記憶されている。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the sum of the coefficient code amount and the motion vector code amount. That is, it has a threshold value corresponding to the sum of the coefficient code amount and the motion vector code amount output from the code amount prediction unit 20 as a prediction value. For example, the AVC / H. A value of 3200 bits or less, which is the maximum code amount of a macroblock defined by H.264, is stored as a threshold value.

符号量比較部31は、符号量予測部20から受け取った係数符号量と動きベクトル符号量との和である予測値と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the prediction value that is the sum of the coefficient code amount and the motion vector code amount received from the code amount prediction unit 20 with the threshold value stored in the threshold value storage unit 32, and the prediction value is If it is larger than the threshold value, the output selection unit 8 is instructed to select I_PCM data. When the predicted value is equal to or less than the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図9に示す画像符号化装置1は、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数をCABAC符号化した場合の符号量と、そのマクロブロックの全ての動きベクトルをCABAC符号化した場合の符号量とを加算し、加算した値を予測値とする。これにより、図8に示す画像符号化装置1と比べて、実際に符号化対象のマクロブロックをCABAC符号化した際の符号量により近い値を予測値とすることができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   As described above, the image encoding device 1 illustrated in FIG. 9 includes the code amount when all the quantized coefficients included in one encoding target macroblock are CABAC encoded, and all the motions of the macroblock. The code amount when the vector is CABAC encoded is added, and the added value is used as a predicted value. Accordingly, compared to the image encoding device 1 shown in FIG. 8, a value closer to the code amount when the encoding target macroblock is actually CABAC encoded can be set as the predicted value. Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

(具体例7)
図10は、画像符号化装置1の機能的な構成の具体例7を示す機能ブロック図である。
(Specific example 7)
FIG. 10 is a functional block diagram illustrating a specific example 7 of the functional configuration of the image encoding device 1.

図10に示す画像符号化装置1の機能的な構成は、図9に示す画像符号化装置1の構成において、動きベクトル符号量変換部26に換えて符号化情報符号量変換部28を符号量予測部20に有する構成である。   The functional configuration of the image encoding device 1 illustrated in FIG. 10 is the same as the configuration of the image encoding device 1 illustrated in FIG. 9 except that the encoded information code amount conversion unit 28 is replaced with a code amount in place of the motion vector code amount conversion unit 26. This is a configuration included in the prediction unit 20.

符号化情報符号量変換部28は、符号化方式演算部10aから出力される符号化情報を取得し、動きベクトルを含む符号化情報が2値化され更にCABAC符号化器42で符号化された場合の符号量に変換する処理部である。つまり、動きベクトルがCABAC符号化された場合の符号量と、動きベクトル以外の符号化情報がCABAC符号化された場合の符号量とを出力する処理部である。従って、図9に示す、動きベクトル符号量変換部26の役割も兼ねている処理部である。   The encoding information code amount conversion unit 28 acquires the encoding information output from the encoding method calculation unit 10a, and the encoding information including the motion vector is binarized and further encoded by the CABAC encoder 42. It is a processing part which converts into the amount of codes in the case. That is, the processing unit outputs a code amount when the motion vector is CABAC-encoded and a code amount when encoding information other than the motion vector is CABAC-encoded. Therefore, this processing unit also serves as the motion vector code amount conversion unit 26 shown in FIG.

なお、符号化情報符号量変換部28により、本発明の画像符号化装置における動き変換手段と符号化情報変換手段とがそれぞれ有する、対象となるデータからエントロピー符号化後の符号量を得る機能が実現される。   Note that the encoded information code amount conversion unit 28 has a function of obtaining a code amount after entropy encoding from target data, which each of the motion conversion unit and the encoded information conversion unit in the image encoding apparatus of the present invention has. Realized.

この符号化情報の変換には上述のように変換テーブルまたは関数等が用いられる。   As described above, a conversion table, a function, or the like is used for conversion of the encoded information.

符号化情報符号量変換部28から出力される符号量は、加算部27においてマクロブロック毎に加算される。この図10に示す加算部27においてマクロブロック毎に加算され出力される符号量を、以下、「符号化情報符号量」という。また、係数符号量変換部24から出力される符号量も加算部25においてマクロブロック毎に加算される。更に、加算部25と加算部27とから出力される符号化情報符号量と動きベクトル符号量との和が、I_PCM判定部30に出力される。つまり、係数符号量と符号化情報符号量との和は、予測値としてI_PCM判定部30に出力される。   The code amount output from the encoded information code amount conversion unit 28 is added by the adding unit 27 for each macroblock. The code amount added and output for each macroblock in the adding unit 27 shown in FIG. 10 is hereinafter referred to as “encoded information code amount”. Further, the code amount output from the coefficient code amount conversion unit 24 is also added for each macroblock in the addition unit 25. Further, the sum of the encoded information code amount and the motion vector code amount output from the addition unit 25 and the addition unit 27 is output to the I_PCM determination unit 30. That is, the sum of the coefficient code amount and the encoded information code amount is output to the I_PCM determination unit 30 as a predicted value.

つまり、図9に示す画像符号化装置1では、量子化後係数および動きベクトルのマクロブロック毎のCABAC符号化後の符号量の和を予測値としているが、図10に示す画像符号化装置1では、更に、動きベクトル以外のmb_type等の符号化情報もCABAC符号化後の符号量に変換し、マクロブロック毎に予測値に加えている。   That is, in the image encoding device 1 shown in FIG. 9, the sum of the code amount after CABAC encoding for each macroblock of the quantized coefficient and the motion vector is used as the predicted value, but the image encoding device 1 shown in FIG. Further, encoding information such as mb_type other than the motion vector is also converted into a code amount after CABAC encoding, and added to the prediction value for each macroblock.

I_PCM判定部30において、閾値記憶部32には、係数符号量と符号化情報符号量との和を用いて、I_PCM判定を行なうための閾値が記憶されている。つまり、予測値として符号量予測部20から出力される符号化情報符号量と動きベクトル符号量との和に対応する閾値を有している。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the sum of the coefficient code amount and the encoded information code amount. That is, it has a threshold value corresponding to the sum of the encoded information code amount and the motion vector code amount output from the code amount prediction unit 20 as a prediction value.

符号量比較部31は、符号量予測部20から受け取った係数符号量と符号化情報符号量との和である予測値と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the prediction value, which is the sum of the coefficient code amount received from the code amount prediction unit 20 and the encoded information code amount, with the threshold value stored in the threshold value storage unit 32, and provides a prediction value. Is larger than the threshold value, the output selection unit 8 is instructed to select I_PCM data. When the predicted value is equal to or less than the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図10に示す画像符号化装置1は、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数をCABAC符号化した場合の符号量と、そのマクロブロックの全ての動きベクトルを2CABAC符号化した場合の符号量と、そのマクロブロックの動きベクトル以外の全ての符号化情報をCABAC符号化した場合の符号量とを加算し、加算した値を予測値とする。これにより、図9に示す画像符号化装置1と比べて、実際に符号化対象のマクロブロックをCABAC符号化した際の符号量により近い値を予測値とすることができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   As described above, the image encoding device 1 shown in FIG. 10 has the code amount when all the quantized coefficients included in one encoding target macroblock are CABAC encoded, and all the motions of the macroblock. The code amount when the vector is subjected to 2CABAC encoding and the code amount when all encoding information other than the motion vector of the macroblock is CABAC encoded are added, and the added value is used as a predicted value. As a result, as compared with the image encoding device 1 shown in FIG. 9, a value closer to the code amount when the macroblock to be encoded is actually CABAC encoded can be set as the predicted value. Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

(具体例8)
図11は、画像符号化装置1の機能的な構成の具体例8を示す機能ブロック図である。
(Specific example 8)
FIG. 11 is a functional block diagram illustrating a specific example 8 of the functional configuration of the image encoding device 1.

図11に示す画像符号化装置1の機能的な構成は、図10に示す画像符号化装置1の構成に加えて、値補正部29を符号量予測部20に有する構成である。   The functional configuration of the image encoding device 1 illustrated in FIG. 11 is a configuration in which the value correction unit 29 is included in the code amount prediction unit 20 in addition to the configuration of the image encoding device 1 illustrated in FIG. 10.

値補正部29は、符号化対象のマクロブロックのエントロピー符号化する際の条件となる符号化条件を取得し、その符号化条件に応じて符号量予測部20において求められる予測値の補正を行なう処理部である。   The value correction unit 29 acquires a coding condition that is a condition for entropy coding of the macroblock to be coded, and corrects the prediction value obtained in the code amount prediction unit 20 according to the coding condition. It is a processing unit.

マクロブロックの符号化条件とは、例えば、マクロブロックが含まれるピクチャの種類(I/P/B)、mb_type、残差ブロック(residual_block)の種類、量子化パラメータ、および、ターゲットとする出力レートなどである。これら符号化条件により、CABAC符号化後の符号量が変動するため、値補正部29は、その変動に応じて予測値を補正する。   The macroblock coding conditions include, for example, the type of picture (I / P / B) including the macroblock, the mb_type, the type of residual block (residual_block), the quantization parameter, and the target output rate. It is. Since the code amount after CABAC encoding varies depending on these encoding conditions, the value correction unit 29 corrects the predicted value according to the variation.

具体的には、係数符号量変換部24および符号化情報符号量変換部28のそれぞれが有する、入力された情報から符号量に変換するための変換テーブルまたは関数を、これら符号化条件に応じて書き換える。これにより、予測値が補正される。   Specifically, a conversion table or function for converting input information into a code amount, which each of the coefficient code amount conversion unit 24 and the encoded information code amount conversion unit 28 has, is set according to these encoding conditions. rewrite. Thereby, the predicted value is corrected.

これら符号化条件は、例えば、ピクチャ情報やスライス情報から得ることができ、ピクチャ情報およびスライス情報は、スライスヘッダ、SPS、PPSから取得することができる。ピクチャ情報およびスライス情報は、所定の手段により値補正部29に取得される。また、ターゲットの出力レートは、画像符号化装置1のユーザが所定の手段により画像符号化装置1に入力し、その出力レートの値は値補正部29に取得される。   These encoding conditions can be obtained from, for example, picture information and slice information, and the picture information and slice information can be obtained from a slice header, SPS, and PPS. The picture information and slice information are acquired by the value correction unit 29 by a predetermined means. Further, the target output rate is input to the image encoding device 1 by the user of the image encoding device 1 by a predetermined means, and the value of the output rate is acquired by the value correction unit 29.

従って、係数符号量変換部24および符号化情報符号量変換部28のそれぞれから出力される符号量は、符号化対象のマクロブロックの符号化条件に応じて補正されたものとなる。この2つの符号量はそれ加算部25および加算部27において加算され係数符号量および符号化情報符号量として出力される。更に、係数符号量と符号化情報符号量との和は、予測値としてI_PCM判定部30に出力される。   Therefore, the code amount output from each of the coefficient code amount conversion unit 24 and the encoded information code amount conversion unit 28 is corrected according to the encoding condition of the macroblock to be encoded. The two code amounts are added by the adder 25 and the adder 27 and output as a coefficient code amount and an encoded information code amount. Furthermore, the sum of the coefficient code amount and the encoded information code amount is output to the I_PCM determination unit 30 as a predicted value.

I_PCM判定部30において、閾値記憶部32には、符号量予測部20から出力される係数符号量と符号化情報符号量との和を用いて、I_PCM判定を行なうための閾値が記憶されている。例えば、上述の、AVC/H.264で規定されるマクロブロックの最大の符号量である3200ビットが閾値として記憶されている。   In the I_PCM determination unit 30, the threshold storage unit 32 stores a threshold for performing I_PCM determination using the sum of the coefficient code amount output from the code amount prediction unit 20 and the encoded information code amount. . For example, the AVC / H. 3200 bits, which is the maximum code amount of a macroblock defined by H.264, is stored as a threshold value.

符号量比較部31は、符号量予測部20から受け取った係数ビット数と、閾値記憶部32に記憶されている閾値とを比較し、予測値が閾値より大きい場合、出力選択部8に、I_PCMデータを選択する指示を行なう。また、予測値が閾値以下である場合、出力選択部8に、画像符号化部10から出力される符号化データを選択する指示を行なう。その後のデータの流れは、図1を用いて説明した通りである。   The code amount comparison unit 31 compares the number of coefficient bits received from the code amount prediction unit 20 with the threshold value stored in the threshold value storage unit 32. If the prediction value is larger than the threshold value, the code amount comparison unit 31 sends the I_PCM to the output selection unit 8. Instructs to select data. When the predicted value is equal to or less than the threshold value, the output selection unit 8 is instructed to select the encoded data output from the image encoding unit 10. The subsequent data flow is as described with reference to FIG.

このように、図11に示す画像符号化装置1は、図10に示す画像符号化装置1と同じく、1つの符号化対象のマクロブロックに含まれる全ての量子化後係数をCABAC符号化した場合の符号量と、そのマクロブロックの全ての動きベクトルを2CABAC符号化した場合の符号量と、そのマクロブロックの動きベクトル以外の全ての符号化情報をCABAC符号化した場合の符号量とを加算し、加算した値を予測値とする。   As described above, the image encoding device 1 illustrated in FIG. 11 performs the CABAC encoding on all the quantized coefficients included in one encoding target macroblock, similarly to the image encoding device 1 illustrated in FIG. 10. And the amount of code when all the motion vectors of the macroblock are 2CABAC-encoded and the amount of code when all the encoded information other than the motion vector of the macroblock is CABAC-encoded are added. The added value is taken as the predicted value.

図11に示す画像符号化装置1は、更に、符号量予測部20において予測値を求める際に、マクロブロックの符号化条件に応じた補正を行なった上で予測値を求めることができる。つまり、符号量予測部20は、より正確なマクロブロック毎の符号量の予測値を出力することができる。更に、その予測値と閾値とを比較することにより、マクロブロック毎のI_PCM判定を行なうことができる。   The image encoding device 1 shown in FIG. 11 can obtain the prediction value after performing correction according to the coding condition of the macroblock when the code amount prediction unit 20 obtains the prediction value. That is, the code amount prediction unit 20 can output a more accurate code amount prediction value for each macroblock. Furthermore, I_PCM determination for each macroblock can be performed by comparing the predicted value with a threshold value.

(具体例9)
図12は、画像符号化装置1の機能的な構成の具体例9を示す機能ブロック図である。
(Specific example 9)
FIG. 12 is a functional block diagram illustrating a specific example 9 of the functional configuration of the image encoding device 1.

図12に示す画像符号化装置1は、上述の各画像符号化装置1が備えるI_PCMデータバッファ4に換えて、ローカルデコード画バッファ12を備えている。また、画像符号化部10には逆量子化部17と逆直交変換部16とが加えられている。なお、逆量子化部17と逆直交変換部16とは図1〜図4および図6〜図11に図示していないが、上述のように画像符号化装置1が本来備える構成部である。   The image encoding device 1 shown in FIG. 12 includes a local decoded image buffer 12 instead of the I_PCM data buffer 4 included in each of the image encoding devices 1 described above. In addition, an inverse quantization unit 17 and an inverse orthogonal transform unit 16 are added to the image encoding unit 10. Although the inverse quantization unit 17 and the inverse orthogonal transform unit 16 are not illustrated in FIGS. 1 to 4 and FIGS. 6 to 11, they are components that the image encoding device 1 originally has as described above.

図12に示す画像符号化装置1において、量子化部7から出力される量子化後係数データは、逆量子化部17にも入力され、逆量子化される。更に、逆量子化されたデータは逆直交変換部16に入力され、逆直交変換されることでローカルデコード画となる。このローカルデコード画はローカルデコード画バッファ12に格納される。また、このローカルデコード画は面内予測部3によって取得され、次のマクロブロックの画面内予測で参照される。   In the image encoding device 1 shown in FIG. 12, the quantized coefficient data output from the quantization unit 7 is also input to the inverse quantization unit 17 and is inversely quantized. Further, the inversely quantized data is input to the inverse orthogonal transform unit 16 and subjected to inverse orthogonal transform to be a local decoded image. This local decoded image is stored in the local decoded image buffer 12. The local decoded image is acquired by the in-plane prediction unit 3 and is referred to in the in-screen prediction of the next macroblock.

また、図12に示す画像符号化装置1において、符号量予測部20およびI_PCM判定部30の機能的な構成は、図1〜図4および図6〜図11に示す各画像符号化装置における、いずれかの符号量予測部20およびI_PCM判定部30と同じ機能的な構成である。つまり、マクロブロック毎の2値化後の2値データの予測値、または、CABAC符号化後の符号量を符号量予測部20が出力し、その予測値と閾値記憶部32に記憶されている閾値とを比較することで、マクロブロック毎のI_PCM判定を行なう。   12, the functional configurations of the code amount prediction unit 20 and the I_PCM determination unit 30 are the same as those in the image encoding devices illustrated in FIGS. 1 to 4 and FIGS. 6 to 11. This is the same functional configuration as any one of the code amount prediction unit 20 and the I_PCM determination unit 30. That is, the code amount prediction unit 20 outputs the prediction value of binary data after binarization for each macroblock or the code amount after CABAC encoding, and stores the prediction value and the threshold storage unit 32. By comparing with the threshold value, I_PCM determination for each macroblock is performed.

しかし、図12の画像符号化装置1は、上述の各画像符号化装置1とは異なり、予測値が閾値より大きい場合、動画像の原画データではなく、上述のローカルデコード画をI_PCMデータとして出力する。   However, unlike the image encoding devices 1 described above, the image encoding device 1 in FIG. 12 outputs the above-described local decoded image as I_PCM data instead of the original image data of the moving image when the predicted value is larger than the threshold value. To do.

I_PCMデータとして原画データを使用する場合、次のマクロブロックの画面内予測に使用される参照画像がローカルデコード画像から原画データに変更されるため、判定前に次のマクロブロックの画面内予測が開始されている場合、次のマクロブロックの画面内予測処理を再度実行しなければならない。   When original image data is used as I_PCM data, since the reference image used for intra prediction of the next macroblock is changed from the local decoded image to the original image data, intra prediction of the next macroblock is started before the determination. If so, the in-screen prediction process for the next macroblock must be performed again.

しかし、図12に示すような構成の画像符号化装置1は、ローカルデコード画像をI_PCMデータに使用するため、次のマクロブロックの画面内予測で参照される画素が変更されずに済み、次のマクロブロックの画面内予測の再実行処理が行われず、処理の速度が向上する。   However, since the image encoding device 1 configured as shown in FIG. 12 uses a locally decoded image for I_PCM data, the pixels referred to in the intra prediction of the next macroblock need not be changed. The re-execution process of the intra prediction of the macro block is not performed, and the processing speed is improved.

以上のように、本発明の実施の形態の画像符号化装置1は、符号化対象のデータが2値化される前に、マクロブロック毎のI_PCM判定を行なうことができる。また、その判定は、複数種の情報を利用することや、マクロブロックの符号化条件を用いることにより、より確度の高い判定を行なうことができる。   As described above, the image encoding device 1 according to the embodiment of the present invention can perform I_PCM determination for each macroblock before the data to be encoded is binarized. Further, the determination can be performed with higher accuracy by using a plurality of types of information or by using the macroblock coding conditions.

このように、従来の画像符号化装置1より早いタイミングでI_PCM判定を行なうため、処理速度が向上する。また、結局はビットストリームとして出力されないデータを2値化するなどの無駄な処理を行なうことがなく、処理の効率を向上させることも可能である。   Thus, since the I_PCM determination is performed at an earlier timing than the conventional image encoding device 1, the processing speed is improved. In addition, wasteful processing such as binarization of data that is not output as a bit stream is not performed, and the processing efficiency can be improved.

また、本発明の実施の形態の画像符号化装置1は、従来より早いタイミングで行なう上記判定の結果を利用し、符号化対象のマクロブロックの動き予測に係る処理をより効率的に行なうことができる。このことによっても、画像符号化装置1全体としての処理速度を向上させることができる。   In addition, the image encoding device 1 according to the embodiment of the present invention can more efficiently perform the process related to the motion prediction of the macroblock to be encoded, using the result of the determination performed at an earlier timing than the conventional one. it can. This also improves the processing speed of the image encoding device 1 as a whole.

以下、具体例10および具体例11として符号化対象のマクロブロックの動き予測の効率化について説明する。   Hereinafter, as specific example 10 and specific example 11, the efficiency of motion prediction of a macroblock to be encoded will be described.

(具体例10)
図13は、符号化対象のマクロブロックの動き予測に係る処理の効率化の一例を説明するための図である。
(Specific Example 10)
FIG. 13 is a diagram for explaining an example of improving the efficiency of processing related to motion prediction of a macroblock to be encoded.

図13(A)は、予測動きベクトルの算出において参照されるマクロブロックを説明するための図である。図13(A)において1つの升目は1つのマクロブロックを表している。   FIG. 13A is a diagram for explaining a macroblock that is referred to in the calculation of a motion vector predictor. In FIG. 13A, one grid represents one macroblock.

図13(A)に示す符号化対象マクロブロックに対し、左隣接マクロブロックの動きベクトルはmvLXA、上隣接マクロブロックの動きベクトルはmvLXB、右上隣接マクロブロックの動きベクトルはmvLXCという。   For the encoding target macroblock shown in FIG. 13A, the motion vector of the left adjacent macroblock is mvLXA, the motion vector of the upper adjacent macroblock is mvLXB, and the motion vector of the upper right adjacent macroblock is mvLXC.

符号化対象のマクロブロックの予測動きベクトルmvpLXは、mvLXA、mvLXBおよびmvLXCの3つの動きベクトルの中央値等を用いて求められる。   The predicted motion vector mvpLX of the macroblock to be encoded is obtained using the median value of the three motion vectors mvLXA, mvLXB, and mvLXC.

図13(B)は、図13(A)に示す複数のマクロブロックに記号を付与した図である。以下、[iv]とはローマ数字ivが付されたマクロブロックのことを指し、[v]とはローマ数vが付されたマクロブロックのことを指す。また、以下の処理は、例えば、図1に示す画像符号化装置1において行なわれる。また、他の図に示す各画像符号化装置1のいずれにおいてもI_PCM判定部30が動き予測部2に対し指示を与えるパスを有することで実現される。   FIG. 13B is a diagram in which symbols are assigned to the plurality of macroblocks illustrated in FIG. Hereinafter, [iv] refers to a macroblock with a Roman numeral iv, and [v] refers to a macroblock with a Roman number v. Further, the following processing is performed, for example, in the image encoding device 1 shown in FIG. Also, in any of the image encoding devices 1 shown in other drawings, the I_PCM determination unit 30 has a path for giving an instruction to the motion prediction unit 2.

まず、[iv]が動き予測によって符号化処理が行なわれた場合を考える。   First, let us consider a case where [iv] is encoded by motion prediction.

動き予測によって、[iv]のmvLXが得られる。[iv]のmvLXは、[v]のmvLXAであるので、[v]は左隣接マクロブロックである[iv]のmvLXをmvLXAとして用いてmvpLXの算出、動き予測の処理を開始する。   By motion estimation, mvLX of [iv] is obtained. Since the mvLX in [iv] is the mvLXA in [v], the [v] uses the mvLX in [iv] that is the left adjacent macroblock as the mvLXA, and starts the mvpLX calculation and the motion prediction process.

次に、I_PCM判定部30により、[iv]について、I_PCMをビットストリームとして出力すると判定された場合、[iv]のmvLXは変更になる。つまり、これは[v]のmvLXAが変更されたことを意味するので、[v]のmvpLXの算出処理を再度実行しなければならない。   Next, when the I_PCM determination unit 30 determines that I_PCM is output as a bit stream for [iv], the mvLX of [iv] is changed. That is, since this means that the [v] mvLXA has been changed, the [v] mvpLX calculation process must be executed again.

図13(C)は、動き予測に係る処理のタイムチャートを示す図である。図においてT0、T1、・・・のそれぞれは、所定の連続する期間を示す記号である。以下に各期間に行われる処理の概要を説明する。なお、予測動きベクトルmvpLXを、以下、単に「mvp」と記す。また、以下の処理において動き予測に係る処理は動き予測部2が行ない、DCT係数の算出は直交変換部6が行ない、量子化後係数の算出は量子化部7が行ない、I_PCM判定はI_PCM判定部30が行なう。   FIG. 13C is a diagram illustrating a time chart of processing related to motion prediction. In the figure, each of T0, T1,... Is a symbol indicating a predetermined continuous period. The outline of processing performed in each period will be described below. The predicted motion vector mvpLX is hereinafter simply referred to as “mvp”. In the following processing, the motion prediction unit 2 performs processing related to motion prediction, the DCT coefficient is calculated by the orthogonal transform unit 6, the post-quantization coefficient is calculated by the quantization unit 7, and the I_PCM determination is performed by the I_PCM determination. Part 30 performs.

T0:[iv]の処理が開始され、[iv]のmvp算出と動き予測とが行なわれる。   T0: [iv] processing is started, and [iv] mvp calculation and motion prediction are performed.

T1:[iv]のDCT係数および量子化後係数の算出が行われる。また、[v]のmvp算出と動き予測とが行なわれる。   Calculation of the DCT coefficient and the quantized coefficient of T1: [iv] is performed. [V] mvp calculation and motion prediction are performed.

T2:[iv]のI_PCM判定が行なわれる。また、[v]のDCT係数および量子化後係数の算出が行なわれる。   T2: [iv] I_PCM determination is performed. Also, the calculation of the DCT coefficient and the quantized coefficient of [v] is performed.

ここで、[iv]のI_PCM判定の結果、[iv]についてI_PCMデータをビットストリームとして出力すると判定された場合、今までの[v]の処理をキャンセルし、[v]について再度mvpの算出を行なう旨の指示がI_PCM判定部30から動き予測部2に対してなされる。   Here, as a result of the I_PCM determination of [iv], when it is determined that I_PCM data is output as a bit stream for [iv], the processing of [v] is canceled and mvp is calculated again for [v]. An instruction to do so is given from the I_PCM determination unit 30 to the motion prediction unit 2.

T3:[v]のmvp算出と動き予測が行われる。また、[iv]のエントロピー符号化のための処理が行われる。   T3: [v] mvp calculation and motion prediction are performed. In addition, a process for entropy encoding of [iv] is performed.

ここで、従来の画像符号化装置であれば、上述の例でいうと、[iv]のエントロピー符号化のための処理が開始された後に、I_PCM判定が行われる。そのためI_PCM判定の結果に基づく[v]の再度の動き予測は、早くてもT4に開始されることとなる。   Here, in the case of the conventional image encoding device, in the above example, the I_PCM determination is performed after the processing for entropy encoding of [iv] is started. For this reason, the motion prediction for [v] again based on the result of the I_PCM determination is started at T4 at the earliest.

しかしながら、本発明の実施の形態の画像符号化装置1においては、[iv]のエントロピー符号化のための処理が開始される前、具体的には2値化処理の開始前に、I_PCM判定が行われる。そのため、I_PCM判定の結果に基づく[v]の再度の動き予測に係る処理はT3に開始することができる。また、動き予測に係る処理に含まれるmvpの算出には、変更になる[iv]の動きベクトルは用いずに、[v]の上隣接と右上隣接のマクロブロックである[ii]および[iii]の動きベクトルが用いられる。   However, in the image encoding device 1 according to the embodiment of the present invention, the I_PCM determination is performed before the processing for entropy encoding of [iv] is started, specifically, before the binarization processing is started. Done. Therefore, the process related to the motion estimation of [v] based on the result of the I_PCM determination can be started at T3. In addition, the calculation of mvp included in the process related to motion prediction does not use the motion vector of [iv] to be changed, and [ii] and [iii] are macroblocks of [v] upper adjacent and upper right adjacent. ] Motion vectors are used.

つまり、動き予測部2は、カレントマクロブロックと、符号化順で次に符号化される、次のマクロブロックとが隣接しているとき、カレントマクロブロックについての予測値が閾値より大きい場合、次のマクロブロックの隣接マクロブロックの情報を修正して、次のマクロブロックのmvpの算出を行なう。なお、カレントマクロブロックとは、例えば上述の[iv]であり、この場合、次のマクロブロックは上述の[v]である。   That is, when the current macroblock and the next macroblock to be encoded next in the encoding order are adjacent to each other and the predicted value for the current macroblock is larger than the threshold, the motion prediction unit 2 The information of the adjacent macroblock of the macroblock is corrected, and mvp of the next macroblock is calculated. The current macroblock is, for example, the above [iv]. In this case, the next macroblock is the above [v].

このように、従来より早いタイミングでI_PCM判定が行われることにより、あるマクロブロックについてI_PCMデータをビットストリームとして出力すると判定された場合、従来より早いタイミングで、動き予測に係る処理のやり直しを開始することができる。つまり、動き予測に係る処理を効率よく進めることができる。   As described above, when it is determined that the I_PCM data is output as a bit stream for a certain macroblock by performing the I_PCM determination at an earlier timing than before, the process related to motion prediction is started again at an earlier timing than before. be able to. That is, the process related to motion prediction can be efficiently advanced.

結果として、画像符号化装置1全体としての処理速度を向上させることができる。   As a result, the processing speed of the image encoding device 1 as a whole can be improved.

(具体例11)
上述の具体例10では、従来より早いタイミングで行われるI_PCM判定の結果を利用し、動き予測に係る処理のやり直しを従来より早いタイミングで開始する処理の流れを説明した。
(Specific example 11)
In the specific example 10 described above, the flow of processing for starting re-processing of motion prediction at a timing earlier than the prior art using the result of the I_PCM determination performed at an earlier timing than the prior art has been described.

ここで、図13(c)のタイムチャートに示すように動き予測に係る処理は、具体的には、予測動きベクトルであるmvpの算出と、そのmvpと参照するピクチャとから実際の動きベクトル(mv)を求める動き予測の処理と、mvpとmvの差分(mvd)を算出する処理とで構成される。具体的には、mvdの算出は、AVC/H.264に規格される以下の式に基づいて行われる。   Here, as shown in the time chart of FIG. 13C, the process related to motion prediction specifically includes the calculation of an actual motion vector (mvp, which is a predicted motion vector), and the mvp and the picture to be referenced. mv) and a process of calculating a difference (mvd) between mvp and mv. Specifically, mvd is calculated using AVC / H. This is performed based on the following expression standardized to H.264.

mvLX[0]=mvpLX[0]+mvd_lX[mbPartIdx][subMbPartIdx][0] (式1)
mvLX[1]=mvpLX[1]+mvd_lX[mbPartIdx][subMbPartIdx][1] (式2)
である。式を変形して、差分を示すmvd_lXは以下の式で求められる。
mvLX [0] = mvpLX [0] + mvd_lX [mbPartIdx] [subMbPartIdx] [0] (Formula 1)
mvLX [1] = mvpLX [1] + mvd_lX [mbPartIdx] [subMbPartIdx] [1] (Formula 2)
It is. By transforming the equation, mvd_lX indicating the difference is obtained by the following equation.

mvd_lX[mbPartIdx][subMbPartIdx][0]=mvLX[0]−mvpLX[0] (式3)
mvd_lX[mbPartIdx][subMbPartIdx][1]=mvLX[1]−mvpLX[1] (式4)
mvd_lX [mbPartIdx] [subMbPartIdx] [0] = mvLX [0] −mvpLX [0] (Formula 3)
mvd_lX [mbPartIdx] [subMbPartIdx] [1] = mvLX [1] −mvpLX [1] (Formula 4)

なお、(式1)〜(式4)においてかっこ内の“0”はベクトルのx軸成分を意味し、“1”は、ベクトルのy軸成分を意味する。また“mbPartIdx”および“subMbPartIdx”は、それぞれ、マクロブロック内の位置を特定する情報である。   In (Expression 1) to (Expression 4), “0” in parentheses means the x-axis component of the vector, and “1” means the y-axis component of the vector. Further, “mbPartIdx” and “subMbPartIdx” are information for specifying the positions in the macroblock, respectively.

つまり、上述の(式3)および(式4)から、予測動きベクトル(mvp)と、そのmvpと実際の動きベクトル(mv)との差分(mvd)とは以下の数式を構成する。   That is, from the above (Equation 3) and (Equation 4), the predicted motion vector (mvp) and the difference (mvd) between the mvp and the actual motion vector (mv) form the following equation.

mvd=mv−mvp (式5)   mvd = mv−mvp (Formula 5)

mvdは動きベクトルを示す情報として用いられ、小さいほうが、符号化した際の符号量が小さくなる、つまり、(式5)に示すように、mvとmvpとが近いほど、mvdの符号化後の符号量は小さくなる。従って、動き予測においては、符号化対象のマクロブロックについて、参照するピクチャ内でmvpとmvとの差分が小さな画素ブロックが優先的に探索される。   mvd is used as information indicating a motion vector. The smaller the code amount, the smaller the code amount when encoded, that is, as mv and mvp are closer as shown in (Equation 5), The code amount is reduced. Therefore, in motion prediction, a pixel block having a small difference between mvp and mv is preferentially searched for a macroblock to be encoded in a picture to be referenced.

つまり、上述のように、I_PCM判定の結果に応じ、mvpの算出をやり直す場合、通常は、やり直しにより変更されたmvpに応じmvが変更されることになる。   That is, as described above, when the mvp is calculated again according to the result of the I_PCM determination, the mv is normally changed according to the mvp changed by the redo.

しかしながら、本発明の実施の形態の画像符号化装置1は、mvを変更せずに、変更されたmvpと、すでに求められているmvとを用いmvdを算出する。これにより、動き予測の処理を速く完了することができる。   However, the image coding apparatus 1 according to the embodiment of the present invention calculates mvd using the changed mvp and the already obtained mv without changing the mv. Thereby, the motion prediction process can be completed quickly.

図14は、mvdの算出に係る処理のタイムチャートを示す図である。図においてT0、T1、・・・のそれぞれは、所定の連続する期間を示す記号である。また、図中の“iv”および“v”は、図13(B)に示す、複数のマクロブロックに付与された記号に対応する。以下に各期間に行われる処理の概要を説明する。なお、以下の処理において動き予測に係る処理は動き予測部2が行ない、DCT係数の算出は直交変換部6が行ない、量子化後係数の算出は量子化部7が行ない、I_PCM判定はI_PCM判定部30が行なう。   FIG. 14 is a diagram illustrating a time chart of processing related to calculation of mvd. In the figure, each of T0, T1,... Is a symbol indicating a predetermined continuous period. Further, “iv” and “v” in the figure correspond to symbols given to a plurality of macroblocks shown in FIG. The outline of processing performed in each period will be described below. In the following processing, processing related to motion prediction is performed by the motion prediction unit 2, calculation of DCT coefficients is performed by the orthogonal transformation unit 6, calculation of quantized coefficients is performed by the quantization unit 7, and I_PCM determination is performed by I_PCM determination. Part 30 performs.

T0:[iv]の処理が開始され、[iv]のmvp算出と動き予測が行なわれる。   T0: The process of [iv] is started, and mvp calculation and motion prediction of [iv] are performed.

T1:[iv]のDCT係数、量子化後係数およびmvdの算出が行なわれる。また、[v]のmvp算出と動き予測とが行なわれる。   T1: The DCT coefficient of [iv], the quantized coefficient, and mvd are calculated. [V] mvp calculation and motion prediction are performed.

T2:[iv]のI_PCM判定が行なわれる。[v]のDCT係数および量子化後係数の算出が行なわれる。ここで、[iv]のI_PCM判定の結果、[iv]についてI_PCMデータをビットストリームとして出力すると判定された場合、次の期間T3で[v]のmvd再計算を行なう旨の指示がI_PCM判定部30から動き予測部2に対してなされる。   T2: [iv] I_PCM determination is performed. The calculation of the DCT coefficient and the quantized coefficient of [v] is performed. Here, as a result of the I_PCM determination of [iv], if it is determined that I_PCM data is output as a bit stream for [iv], an instruction to perform recalculation of [v] in the next period T3 is an I_PCM determination unit 30 to the motion prediction unit 2.

T3:[v]のI_PCM判定と、mvdの再計算が行われる。このmvdの再計算は、具体的には予測動きベクトルであるmvpが算出され、このmvpと、すでにT2において求められているmvとの差分を求めることにより、mvdが算出される。また、[iv]のエントロピー符号化のための処理が行なわれる。   T3: [v] I_PCM determination and mvd recalculation are performed. Specifically, the mvd is recalculated by calculating mvp, which is a predicted motion vector, and calculating mvd by obtaining a difference between this mvp and mv already obtained in T2. In addition, processing for entropy encoding of [iv] is performed.

T4:[v]のエントロピー符号化のための処理が行なわれる。   Processing for entropy coding of T4: [v] is performed.

このように、従来より早いタイミングでI_PCM判定が行われることにより、あるマクロブロックについてI_PCMデータをビットストリームとして出力すると判定された場合、従来より早いタイミングで、動き予測のやり直しを開始することができる。   As described above, when I_PCM determination is performed at an earlier timing than before, when it is determined that I_PCM data is output as a bit stream for a certain macroblock, it is possible to start the motion prediction re-execution at an earlier timing than before. .

また、動き予測部2は、カレントマクロブロックと次のマクロブロックとが隣接しているとき、次のマクロブロックに対してmvp、mv、mvdの算出を行い、カレントマクロブロックについての予測値が閾値より大きい場合、次のマクロブロックの隣接マクロブロックの情報を修正してmvpを再度算出し、そのmvpと既に求められているmvとを用いて、次のマクロブロックのmvdを再度算出する。   Also, when the current macroblock and the next macroblock are adjacent to each other, the motion prediction unit 2 calculates mvp, mv, and mvd for the next macroblock, and the prediction value for the current macroblock is a threshold value. If it is larger, mvp is recalculated by correcting the information of the adjacent macroblock of the next macroblock, and mvd of the next macroblock is recalculated using the mvp and mv already determined.

つまり、動き予測の中でmvdを算出する際に、新たなmvを求めることなく、すでに求められているmvと変更されたmvpとでmvdを求める。これにより、やり直しの動き予測を早く完了させることができる。結果として、画像符号化装置1全体としての処理速度を向上させることができる。   That is, when calculating mvd in motion prediction, mvd is obtained from the already obtained mvp and the changed mvp without obtaining a new mv. As a result, the motion prediction for redo can be completed quickly. As a result, the processing speed of the image encoding device 1 as a whole can be improved.

なお、mvdの最初の算出を、直前のマクロブロックのI_PCM判定の前ではなく、I_PCM判定の後に行ってもよい。例えば、図14に示すタイムチャートを用いると、[v]のmvd算出を、T2において、[iv]のI_PCM判定の後に行なってもよい。   Note that the first calculation of mvd may be performed after the I_PCM determination, not before the I_PCM determination of the immediately preceding macroblock. For example, if the time chart shown in FIG. 14 is used, [v] mvd calculation may be performed at T2 after [iv] I_PCM determination.

この場合、図14に示すタイムチャートでは、[iv]についてI_PCMデータをビットストリームとして出力すると判定されているため、[v]のmvdの算出はT2で行なわれ、更にT3で再度行なわれている。しかし、上述のように、[iv]のI_PCM判定の後に、mvdの最初の算出を行なう場合、[iv]のI_PCM判定によりmvpが変更されたか否かに関わらず、その時点のmvpを用いてmvdの算出を行えばよい。   In this case, since it is determined in the time chart shown in FIG. 14 that I_PCM data is output as a bit stream for [iv], the calculation of mvd for [v] is performed at T2 and again at T3. . However, as described above, when the first calculation of mvd is performed after the [iv] I_PCM determination, the mvp at that time is used regardless of whether or not the mvp is changed by the [iv] I_PCM determination. What is necessary is just to calculate mvd.

つまり、動き予測部2は、カレントマクロブロックと次のマクロブロックとが隣接しているとき、次のマクロブロックに対してmvpおよびmvの算出を行う。また、mvdが算出される前にカレントマクロブロックについての予測値と閾値との比較が行われ、その比較の結果、予測値が閾値より大きい場合、動き予測部2は、次のマクロブロックの隣接マクロブロックの情報を修正して、mvpを再度算出し、そのmvpとすでに求められているmvとを用いて次のマクロブロックのmvdを算出する。   That is, when the current macroblock and the next macroblock are adjacent to each other, the motion prediction unit 2 calculates mvp and mv for the next macroblock. Also, before the mvd is calculated, the prediction value for the current macroblock is compared with the threshold value, and if the result of the comparison is that the prediction value is greater than the threshold value, the motion prediction unit 2 The information on the macroblock is corrected, mvp is calculated again, and the mvd of the next macroblock is calculated using the mvp and the already determined mv.

これにより、[iv]のI_PCM判定の結果に関わらず、mvdの算出を1回行なうだけでよいことになる。   Thereby, regardless of the result of the I_PCM determination of [iv], it is only necessary to calculate mvd once.

以上のように、本発明の実施の形態の画像符号化装置1は、動き判定に係る処理、具体的にはmvpの再計算においても、具体例10の説明で述べたように、I_PCMの判定が早く行われるので、mvpの再算出からmvの再探索までを早く実行することができる。   As described above, the image encoding device 1 according to the embodiment of the present invention determines the I_PCM as described in the description of the specific example 10 also in the process related to the motion determination, specifically, in the recalculation of mvp. Can be executed quickly, from mvp recalculation to mv re-search.

また、具体例11の説明で述べたように、mvdの再計算を行なう動き予測において、mvpが変更になった場合であっても、既存のmvを用いてmvdを算出する。これにより、動き予測を早く完了することができる。   Further, as described in the description of the specific example 11, in the motion prediction in which mvd is recalculated, even when mvp is changed, mvd is calculated using the existing mv. Thereby, motion estimation can be completed early.

また、これら、mvpの再計算およびmvdの再計算のトリガは、上述のI_PCM判定の結果出力であるため、従来よりも早いタイミングでmvpの再計算およびmvdの再計算を開始することができる。   In addition, since the trigger for the recalculation of mvp and the recalculation of mvd is the result output of the above-described I_PCM determination, the recalculation of mvp and the recalculation of mvd can be started at a timing earlier than before.

このように、本発明の実施の形態の画像符号化装置1は、2値化したデータをエントロピー符号化する画像符号化装置であって、画像データをより高速に処理することができる。   As described above, the image encoding device 1 according to the embodiment of the present invention is an image encoding device that entropy-encodes binarized data, and can process image data at higher speed.

本発明は、2値化したデータをエントロピー符号化する画像符合化装置に利用することができる。具体的には、AVC/H.264に規定されたデータ圧縮技術により符号化する、ハイビジョン映像などを出力する画像符合化装置として最適である。   The present invention can be used for an image coding apparatus that entropy codes binarized data. Specifically, AVC / H. H.264 is optimal as an image encoding device that outputs high-definition video or the like that is encoded by a data compression technique defined in H.264.

1 画像符号化装置
2 動き予測部
3 面内予測部
4 PCMデータバッファ
5 入力選択部
6 直交変換部
7 量子化部
8 出力選択部
9 出力部
10 画像符号化部
10a 符号化方式演算部
11 マージ部
12 ローカルデコード画バッファ
16 逆直交変換部
17 逆量子化部
20 符号量予測部
21 係数ビット数変換部
22 動きベクトルビット数変換部
23 符号化情報ビット数変換部
24 係数符号量変換部
25 加算部
26 ベクトル符号量変換部
27 加算部
28 符号化情報符号量変換部
29 値補正部
30 PCM判定部
31 符号量比較部
32 閾値記憶部
40 エントロピー符号化部
41 2値化器
42 CABAC符号化器
DESCRIPTION OF SYMBOLS 1 Image coding apparatus 2 Motion estimation part 3 In-plane prediction part 4 PCM data buffer 5 Input selection part 6 Orthogonal transformation part 7 Quantization part 8 Output selection part 9 Output part 10 Image encoding part 10a Coding system calculating part 11 Merge Unit 12 local decoded image buffer 16 inverse orthogonal transform unit 17 inverse quantization unit 20 code amount prediction unit 21 coefficient bit number conversion unit 22 motion vector bit number conversion unit 23 encoded information bit number conversion unit 24 coefficient code amount conversion unit 25 addition Unit 26 vector code amount conversion unit 27 addition unit 28 encoded information code amount conversion unit 29 value correction unit 30 PCM determination unit 31 code amount comparison unit 32 threshold storage unit 40 entropy encoding unit 41 binarizer 42 CABAC encoder

Claims (4)

画像データを少なくとも動き予測を利用して符号化する画像符号化手段と、
前記画像符号化手段によって得られた符号化データを2値化しエントロピー符号化するエントロピー符号化手段と、
前記エントロピー符号化手段が前記符号化データを2値化する前に、前記符号化データに含まれる複数の画素から構成されるブロックにおける符号化情報に基づき、前記ブロックがエントロピー符号化された場合の符号量を示す予測値を求める予測手段と、
前記予測手段によって求められた前記予測値と所定の閾値とを比較する比較手段と、
前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記所定の単位の符号化データをエントロピー符号化する前のデータであるI_PCMデータを出力すると判定する判定手段と、
前記判定手段により、前記I_PCMデータを出力すると判定された場合、前記I_PCMデータを出力し、前記I_PCMデータを出力すると判定されなかった場合、前記エントロピー符号化手段によりエントロピー符号化されたデータを出力する出力手段と、を備え、
前記画像符号化手段は、
前記判定の結果、符号化対象ブロックに隣接する隣接ブロックのうち、前記符号化対象ブロックの前記動き予測処理に依存関係のあるブロックがI_PCMデータとして出力される場合、前記符号化対象ブロックにおける動きベクトルmvを再計算することなく、前記隣接ブロックにおいて値が確定している動きベクトルおよび前記符号化対象ブロックにおいて既に算出された動きベクトルに基づいて、前記符号化対象ブロックにおける差分動きベクトルmvdを再計算する
画像符号化装置。
Image encoding means for encoding image data using at least motion prediction ;
Entropy encoding means for binarizing and entropy encoding the encoded data obtained by the image encoding means;
Before the entropy encoding means binarizes the encoded data, the block is entropy encoded based on encoding information in a block composed of a plurality of pixels included in the encoded data . A prediction means for obtaining a prediction value indicating a code amount;
Comparing means for comparing the predicted value obtained by the predicting means with a predetermined threshold;
A determination unit that determines that I_PCM data, which is data before entropy encoding the encoded data of the predetermined unit, is output when the predicted value is larger than the threshold as a result of the comparison by the comparison unit;
When it is determined by the determination means that the I_PCM data is to be output, the I_PCM data is output, and when it is not determined that the I_PCM data is to be output, the entropy-encoded data is output by the entropy encoding means. An output means,
The image encoding means includes
As a result of the determination, when a block that is dependent on the motion prediction process of the encoding target block among the adjacent blocks adjacent to the encoding target block is output as I_PCM data, the motion vector in the encoding target block Recalculate the difference motion vector mvd in the encoding target block based on the motion vector whose value is fixed in the adjacent block and the motion vector already calculated in the encoding target block without recalculating mv An image encoding device.
画像データを少なくとも動き予測を利用して符号化する画像符号化手段と、
前記画像符号化手段によって得られた符号化データを2値化しエントロピー符号化するエントロピー符号化手段と、
前記エントロピー符号化手段が前記符号化データを2値化する前に、前記符号化データに含まれる複数の画素から構成されるブロックにおける符号化情報に基づき、前記ブロックがエントロピー符号化された場合の符号量を示す予測値を求める予測手段と、
前記予測手段によって求められた前記予測値と所定の閾値とを比較する比較手段と、
前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記所定の単位の符号化データをエントロピー符号化する前のデータであるI_PCMデータを出力すると判定する判定手段と、
前記判定手段により、前記I_PCMデータを出力すると判定された場合、前記I_PCMデータを出力し、前記I_PCMデータを出力すると判定されなかった場合、前記エントロピー符号化手段によりエントロピー符号化されたデータを出力する出力手段と、を備え、
前記画像符号化手段は、
前記判定の結果、符号化対象ブロックに隣接する隣接ブロックのうち、前記符号化対象ブロックの前記動き予測処理に依存関係のあるブロックがI_PCMデータとして出力される場合、
(i)前記隣接ブロックの情報を修正して、前記符号化対象ブロックの前記動き予測処理に依存関係のあるブロックの動きベクトルを用いることなく前記符号化対象ブロックの予測動きベクトルmvpを再計算し、
(ii)(a)再計算した前記予測動きベクトルmvpと、(b)前記符号化対象ブロックにおける動きベクトルmvを再計算することなく得られる、前記符号化対象ブロックにおいて既に算出された動きベクトルとに基づいて、前記符号化対象ブロックにおける差分動きベクトルmvdを再計算する
画像符号化装置。
Image encoding means for encoding image data using at least motion prediction ;
Entropy encoding means for binarizing and entropy encoding the encoded data obtained by the image encoding means;
Before the entropy encoding means binarizes the encoded data, the block is entropy encoded based on encoding information in a block composed of a plurality of pixels included in the encoded data . A prediction means for obtaining a prediction value indicating a code amount;
Comparing means for comparing the predicted value obtained by the predicting means with a predetermined threshold;
A determination unit that determines that I_PCM data, which is data before entropy encoding the encoded data of the predetermined unit, is output when the predicted value is larger than the threshold as a result of the comparison by the comparison unit;
When it is determined by the determination means that the I_PCM data is to be output, the I_PCM data is output, and when it is not determined that the I_PCM data is to be output, the entropy-encoded data is output by the entropy encoding means. An output means,
The image encoding means includes
As a result of the determination, out of adjacent blocks adjacent to the encoding target block, a block that is dependent on the motion prediction process of the encoding target block is output as I_PCM data.
(I) The information of the neighboring block is corrected, and the predicted motion vector mvp of the encoding target block is recalculated without using the motion vector of the block having a dependency relationship with the motion prediction processing of the encoding target block. ,
(Ii) (a) the recalculated predicted motion vector mvp, and (b) a motion vector already calculated in the encoding target block obtained without recalculating the motion vector mv in the encoding target block; An image encoding device that recalculates the difference motion vector mvd in the encoding target block based on the above .
画像データを少なくとも動き予測を利用して符号化する画像符号化手段と、
前記画像符号化手段によって得られた符号化データを2値化しエントロピー符号化するエントロピー符号化手段と、
前記エントロピー符号化手段が前記符号化データを2値化する前に、前記符号化データに含まれる複数の画素から構成されるブロックにおける符号化情報に基づき、前記ブロックがエントロピー符号化された場合の符号量を示す予測値を求める予測手段と、
前記予測手段によって求められた前記予測値と所定の閾値とを比較する比較手段と、
前記比較手段による比較の結果、前記予測値が前記閾値より大きい場合、前記所定の単位の符号化データをエントロピー符号化する前のデータであるI_PCMデータを出力すると判定する判定手段と、
前記判定手段により、前記I_PCMデータを出力すると判定された場合、前記I_PCMデータを出力し、前記I_PCMデータを出力すると判定されなかった場合、前記エントロピー符号化手段によりエントロピー符号化されたデータを出力する出力手段と、を備え、
前記画像符号化手段は、
前記比較手段が、前記画像符号化手段により符号化対象ブロックにおける差分動きベクトルmvdが算出される前に、前記符号化対象ブロックに隣接する隣接ブロックのうちの、前記符号化対象ブロックの前記動き予測処理に依存関係のあるブロックについての比較を実施して、
前記判定の結果、前記符号化対象ブロックの前記動き予測処理に依存関係のあるブロックがI_PCMデータとして出力される場合、
(i)前記隣接ブロックの情報を修正して、記符号化対象ブロックの前記動き予測処理に依存関係のあるブロックの動きベクトルを用いることなく前記符号化対象ブロックの予測動きベクトルmvpを再計算し、
(ii)(a)再計算した前記予測動きベクトルmvpと、(b)前記符号化対象ブロックにおける動きベクトルmvを再計算することなく得られる、前記符号化対象ブロックにおいて既に算出された動きベクトルとに基づいて、前記符号化対象ブロックにおける差分動きベクトルmvdを再計算する
画像符号化装置。
Image encoding means for encoding image data using at least motion prediction ;
Entropy encoding means for binarizing and entropy encoding the encoded data obtained by the image encoding means;
Before the entropy encoding means binarizes the encoded data, the block is entropy encoded based on encoding information in a block composed of a plurality of pixels included in the encoded data . A prediction means for obtaining a prediction value indicating a code amount;
Comparing means for comparing the predicted value obtained by the predicting means with a predetermined threshold;
A determination unit that determines that I_PCM data, which is data before entropy encoding the encoded data of the predetermined unit, is output when the predicted value is larger than the threshold as a result of the comparison by the comparison unit;
If it is determined by the determination means that the I_PCM data is to be output, the I_PCM data is output, and if it is not determined that the I_PCM data is to be output, the entropy encoding data is output by the entropy encoding means. An output means,
The image encoding means includes
Before the comparison means calculates the differential motion vector mvd in the encoding target block by the image encoding means, the motion prediction of the encoding target block among the adjacent blocks adjacent to the encoding target block Perform comparisons on blocks that have processing dependencies,
As a result of the determination, when a block having a dependency relationship with the motion prediction process of the encoding target block is output as I_PCM data,
(I) The information of the adjacent block is corrected, and the predicted motion vector mvp of the encoding target block is recalculated without using the motion vector of the block having a dependency relationship with the motion prediction processing of the encoding target block. ,
(Ii) (a) the recalculated predicted motion vector mvp, and (b) a motion vector already calculated in the encoding target block obtained without recalculating the motion vector mv in the encoding target block; An image encoding device that recalculates the difference motion vector mvd in the encoding target block based on the above .
入力された画像データのうち、少なくとも符号化対象ブロックを構成する画像データを記憶する記憶部と、
前記符号化対象ブロックに隣接する隣接ブロックのうちの所定の隣接ブロックの動きベクトルを用いて、前記符号化対象ブロックを構成する画像データの動きベクトルを算出するベクトル算出部と、
前記ベクトル算出部において算出された動きベクトルを基に、前記符号化対象ブロックを構成する画像データを符号化する画像符号化部と、
前記記憶部で記憶されている前記符号化対象ブロックを前記画像符号化部において符号化する前の画像データ、または、前記画像符号化部で符号化された画像データのいずれかを選択して出力する出力選択部と、を備え、
前記出力選択部が、前記符号化対象ブロックについて、前記記憶部で記憶されている画像データを選択して出力した場合、
前記ベクトル算出部は、
(i)前記符号化対象ブロックを構成する画像データの動きベクトルを用いずに、前記符号化対象ブロックに対して符号化順で次のブロックを構成する画像データの動きベクトルを予測し、
(ii)(a)予測した動きベクトルと、(b)前記符号化対象ブロックにおける動きベクトルmvを再計算することなく得られる、前記符号化対象ブロックにおいて既に算出された前記動きベクトルとに基づいて、前記予測した動きベクトルと前記符号化対象ブロックの動きベクトルとの差分値である差分ベクトルを算出し、
前記画像符号化部は、前記符号化対象ブロックを構成する符号化後の画像データに前記差分ベクトルを紐付けて出力する
画像符号化装置。
Among the input image data, a storage unit that stores at least image data constituting the encoding target block ;
A vector calculating unit for calculating a predetermined using motion vectors of neighboring blocks, the motion vector of the image data constituting the encoding target block among neighboring blocks adjacent to the encoding target block,
Based on the motion vector calculated in the vector calculation unit, an image encoding unit that encodes image data constituting the encoding target block;
Select and output either the image data before the image encoding unit encodes the encoding target block stored in the storage unit or the image data encoded by the image encoding unit An output selection unit for
When the output selection unit selects and outputs the image data stored in the storage unit for the encoding target block,
The vector calculation unit
(I) without using the motion vector of the image data constituting the coding target block, predicting the motion vector of the image data constituting the next block in the coding order with respect to the coding target block;
(Ii) based on (a) the predicted motion vector and (b) the motion vector already calculated in the encoding target block, obtained without recalculating the motion vector mv in the encoding target block Calculating a difference vector that is a difference value between the predicted motion vector and the motion vector of the encoding target block;
The image encoding unit is an image encoding device that associates and outputs the difference vector to encoded image data constituting the encoding target block.
JP2010204953A 2010-09-13 2010-09-13 Image encoding device Active JP5194082B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010204953A JP5194082B2 (en) 2010-09-13 2010-09-13 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010204953A JP5194082B2 (en) 2010-09-13 2010-09-13 Image encoding device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005357039A Division JP2007166039A (en) 2005-12-09 2005-12-09 Image coding equipment

Publications (2)

Publication Number Publication Date
JP2010279081A JP2010279081A (en) 2010-12-09
JP5194082B2 true JP5194082B2 (en) 2013-05-08

Family

ID=43425531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010204953A Active JP5194082B2 (en) 2010-09-13 2010-09-13 Image encoding device

Country Status (1)

Country Link
JP (1) JP5194082B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001326930A (en) * 2000-05-15 2001-11-22 Matsushita Electric Ind Co Ltd Image encoder and image encoding method, and storage medium
JP4240283B2 (en) * 2002-10-10 2009-03-18 ソニー株式会社 Decoding device and decoding method
JP2005005844A (en) * 2003-06-10 2005-01-06 Hitachi Ltd Computation apparatus and coding processing program
JP4289126B2 (en) * 2003-11-04 2009-07-01 ソニー株式会社 Data processing apparatus and method and encoding apparatus

Also Published As

Publication number Publication date
JP2010279081A (en) 2010-12-09

Similar Documents

Publication Publication Date Title
JP2007166039A (en) Image coding equipment
JP6193446B2 (en) Coefficient scanning in video coding.
JP6284954B2 (en) Simplified mode decision for intra prediction
JP6022586B2 (en) Detecting the availability of adjacent video units for video coding
JP6100344B2 (en) Reference unit determination method and apparatus
JP2018056685A (en) Image encoder, image encoding method and image encoding program, and image decoder, image decoding method and image decoding program
JP2008035134A (en) Image coding device
JP2015084574A (en) Image decoder and image decoding method
JP2007329551A (en) Image encoder
US7528749B2 (en) Decoding apparatus and decoding method
KR102071666B1 (en) Method and apparatus for parallel entropy encoding/decoding
KR102600727B1 (en) Binary arithmetic coding using parameterized probability estimation finite state machines
JP5116704B2 (en) Image coding apparatus and image coding method
JP2015515812A (en) Apparatus and method for providing quantized coefficients for video coding
KR102532484B1 (en) Method and apparatus for encoding and decoding a data stream representing at least one image
JP5194082B2 (en) Image encoding device
WO2012067412A2 (en) Method and apparatus for parallel entropy encoding/decoding

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100913

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121015

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121023

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121221

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130204

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160208

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250