JP2005252921A - Image encoding method and apparatus, recording medium, and image decoding apparatus - Google Patents

Image encoding method and apparatus, recording medium, and image decoding apparatus Download PDF

Info

Publication number
JP2005252921A
JP2005252921A JP2004063522A JP2004063522A JP2005252921A JP 2005252921 A JP2005252921 A JP 2005252921A JP 2004063522 A JP2004063522 A JP 2004063522A JP 2004063522 A JP2004063522 A JP 2004063522A JP 2005252921 A JP2005252921 A JP 2005252921A
Authority
JP
Japan
Prior art keywords
encoding
image data
code amount
block
section
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.)
Pending
Application number
JP2004063522A
Other languages
Japanese (ja)
Inventor
Hiroki Inagaki
尋紀 稲垣
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004063522A priority Critical patent/JP2005252921A/en
Publication of JP2005252921A publication Critical patent/JP2005252921A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image encoding apparatus, image encoding method, recording medium, and image decoding apparatus in which encoding efficiency is not reduced even in the case of a video image having a luminance change between pictures like flashing or fade in compression-coding of a moving image signal. <P>SOLUTION: An image encoding apparatus 200 comprises an input image memory 101, a subtraction section 102, a selector 103, an orthogonal transform/quantization section 104, a variable length encoding section 105, an inverse quantization/inverse orthogonal transform section 106, an addition section 107, a reference image memory 108, a motion detection section 109, a motion compensation section 110, a code amount estimation section (1) 211, a code amount estimation section (2) 212, a reliability calculation section 201, an encoding mode determination section 213. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、画像符号化方法、画像符号化装置、記録媒体、画像復号化装置に関し、特に動画像データを高能率に圧縮符号化する画像符号化装置に関する。   The present invention relates to an image encoding method, an image encoding device, a recording medium, and an image decoding device, and more particularly to an image encoding device that compresses and encodes moving image data with high efficiency.

近年、マルチメディアアプリケーションの発展に伴い、画像・音声・テキスト等、あらゆるメディアの情報をディジタル化し、統一的に扱うことが一般的になってきた。しかしながら、ディジタル化された画像は膨大なデータ量を持つため、蓄積・伝送のためには、画像データを高能率に圧縮する情報圧縮技術が不可欠である。このような情報圧縮技術の標準規格として、例えばISO(国際標準化機構)によって標準化がなされたMPEG−1、MPEG−2、MPEG−4がある。これらの圧縮方式においては、いずれも入力画像データを複数のブロックに分割し、各ブロックについて、画面内符号化(動き補償を行わない符号化モード)と画面間予測符号化(動き補償による予測を行う符号化モード)を選択して符号化するという大きな特徴がある。   In recent years, with the development of multimedia applications, it has become common to digitize and handle all media information such as images, sounds, and texts in a unified manner. However, since a digitized image has an enormous amount of data, an information compression technique that compresses image data with high efficiency is indispensable for storage and transmission. As standards for such information compression techniques, for example, there are MPEG-1, MPEG-2, and MPEG-4 standardized by ISO (International Organization for Standardization). In any of these compression methods, input image data is divided into a plurality of blocks, and for each block, intra-frame coding (coding mode without motion compensation) and inter-screen prediction coding (prediction by motion compensation) are performed. The main feature is that encoding is performed by selecting an encoding mode to be performed.

図2は従来の画像符号化装置100の構成を示すブロック図である。画像符号化装置100は、入力画像メモリ101、減算部102、セレクタ103、直交変換/量子化部104、可変長符号化部105、逆量子化/逆直交変換部106、加算部107、参照画像メモリ108、動き検出部109、動き補償部110、符号量推定部(1)111、符号量推定部(2)112、符号化モード決定部113を備える。   FIG. 2 is a block diagram showing a configuration of a conventional image encoding device 100. The image coding apparatus 100 includes an input image memory 101, a subtraction unit 102, a selector 103, an orthogonal transform / quantization unit 104, a variable length coding unit 105, an inverse quantization / inverse orthogonal transform unit 106, an addition unit 107, a reference image. A memory 108, a motion detection unit 109, a motion compensation unit 110, a code amount estimation unit (1) 111, a code amount estimation unit (2) 112, and a coding mode determination unit 113 are provided.

入力画像メモリ101は、入力された画像データを符号化時まで格納しておくためのメモリであり、このメモリには少なくとも符号化順序の変更による遅延に対して十分な容量が必要とされる。入力された画像データは符号化時に複数のブロックに分割され、ブロック単位で符号化される。   The input image memory 101 is a memory for storing input image data until the time of encoding. The memory needs to have a sufficient capacity for at least a delay caused by changing the encoding order. The input image data is divided into a plurality of blocks at the time of encoding, and encoded in units of blocks.

減算部102は、入力画像メモリ101から出力されたブロック単位の入力画像データを正入力端子に入力し、動き補償部110から出力されたブロック単位の動き補償画像データを負入力端子に入力して減算を行い、減算結果としてブロック単位の予測誤差画像データを出力する。   The subtractor 102 inputs the block-unit input image data output from the input image memory 101 to the positive input terminal, and inputs the block-unit motion compensated image data output from the motion compensator 110 to the negative input terminal. Subtraction is performed, and prediction error image data in units of blocks is output as the subtraction result.

セレクタ103は、入力端子または出力端子においてa端子とb端子を切り替える機能を持ち、符号化モード決定部113によって決定された符号化モードに従って接続する端子を切り替える。符号化モード決定部113から受信した符号化モードが画面内符号化のときにはa端子を選択し、動き補償による画面間予測符号化のときにはb端子を選択する。   The selector 103 has a function of switching the a terminal and the b terminal at the input terminal or the output terminal, and switches the terminal to be connected according to the encoding mode determined by the encoding mode determination unit 113. The a terminal is selected when the encoding mode received from the encoding mode determination unit 113 is intra-picture encoding, and the b terminal is selected when inter-picture predictive encoding by motion compensation.

直交変換/量子化部104は、セレクタ103から出力されたブロック単位の入力画像データ(画面内符号化時)あるいは予測誤差画像データ(画面間予測符号化時)を離散コサイン変換等の直交変換によって周波数成分に変換し、さらにその周波数成分を量子化して量子化済み周波数成分を生成する。   The orthogonal transform / quantization unit 104 performs block-unit input image data (intra-screen encoding) or prediction error image data (inter-screen prediction encoding) output from the selector 103 by orthogonal transform such as discrete cosine transform. The frequency component is converted, and the frequency component is further quantized to generate a quantized frequency component.

可変長符号化部105は、直交変換/量子化部104から出力された量子化済み周波数成分を、符号化モード決定部113によって決定された符号化モード、あるいは動き検出部109によって検出された動きベクトル等の情報と共に可変長符号化し、符号化画像データを出力する。   The variable length coding unit 105 uses the quantized frequency component output from the orthogonal transform / quantization unit 104 as the coding mode determined by the coding mode determination unit 113 or the motion detected by the motion detection unit 109. Variable length encoding is performed together with information such as vectors, and encoded image data is output.

逆量子化/逆直交変換部106は、直交変換/量子化部104から出力された量子化済み周波数成分を逆量子化し、さらに逆直交変換して復号化を行う。このとき、符号化モード決定部113によって決定された符号化モードが画面内符号化の場合は、ブロック単位の入力画像データに対する復号化画像が生成される。
一方、符号化モード決定部113によって決定された符号化モードが動き補償による画面間予測符号化の場合は、ブロック単位の予測誤差画像データに対する復号化が行われた後、加算部107において、動き補償部110から出力されたブロック単位の動き補償画像データと加算され、復号化画像データが生成される。
The inverse quantization / inverse orthogonal transform unit 106 performs inverse quantization on the quantized frequency component output from the orthogonal transform / quantization unit 104, and further performs inverse orthogonal transform to perform decoding. At this time, when the encoding mode determined by the encoding mode determination unit 113 is intra-screen encoding, a decoded image for input image data in units of blocks is generated.
On the other hand, when the encoding mode determined by the encoding mode determination unit 113 is inter-frame predictive encoding based on motion compensation, decoding is performed on prediction error image data in units of blocks, and then the adder 107 The decoded image data is generated by adding the block-unit motion compensated image data output from the compensation unit 110.

参照画像メモリ108は、画面内符号化時には逆量子化/逆直交変換部106で生成されたブロック単位の復号化画像データを格納し、画面間予測符号化時には加算部107で生成されたブロック単位の復号化画像データを格納するためのメモリであり、少なくとも符号化時に使用される参照画像を格納しておくだけのメモリ容量が必要である。参照画像メモリ108に格納された復号化画像データは、以降の入力画像に対して、動き補償による画面予測符号化を行う際の参照画像として用いられる。   The reference image memory 108 stores decoded image data in units of blocks generated by the inverse quantization / inverse orthogonal transform unit 106 at the time of intra-screen encoding, and block units generated by the addition unit 107 at the time of inter-screen prediction encoding. This memory is required to store at least a reference image used at the time of encoding. The decoded image data stored in the reference image memory 108 is used as a reference image when screen predictive coding by motion compensation is performed on subsequent input images.

動き検出部109は、入力画像メモリ101から出力されたブロック単位の入力画像データに対して、参照画像メモリ108に格納されている参照画像データの指定された範囲から類似するブロック領域を検出し、その移動量に相当する動きベクトルを出力する。   The motion detection unit 109 detects a similar block region from the specified range of the reference image data stored in the reference image memory 108 with respect to the input image data in units of blocks output from the input image memory 101, A motion vector corresponding to the amount of movement is output.

動き補償部110は、参照画像メモリ108に格納されている画面間予測符号化用の参照画像から、動き検出部109で検出された動きベクトルを用いて、ブロック単位の動き補償画像データを生成する。   The motion compensation unit 110 generates motion compensated image data in units of blocks from the reference image for inter-frame predictive coding stored in the reference image memory 108 using the motion vector detected by the motion detection unit 109. .

符号量推定部(1)111は、入力画像メモリ101から出力されたブロック単位の入力画像データに対して、画面内符号化を行った場合に生成される符号化画像データの符号量を推定する。   The code amount estimation unit (1) 111 estimates the code amount of encoded image data generated when intra-screen encoding is performed on input image data in units of blocks output from the input image memory 101. .

符号量推定部(2)112は、減算部102から出力されたブロック単位の予測誤差画像データに対して、動き補償による画面間予測符号化を行った場合に生成される符号化画像データの符号量を推定する。   The code amount estimation unit (2) 112 encodes encoded image data generated when inter-frame prediction encoding by motion compensation is performed on the prediction error image data in block units output from the subtraction unit 102. Estimate the amount.

符号化モード決定部113は、符号量推定部(1)111によって推定された画面内符号化時の符号量、および符号量推定部(2)112によって推定された動き補償による画面間予測符号化時の符号量に基づいて、符号化モード(画面内符号化あるいは画面間予測符号化)を決定する。ここで決定された符号化モードは、セレクタ103の制御信号として送出されると同時に可変長符号化部105に送られ、量子化済み周波数成分や動きベクトル等の情報と共に可変長符号化される。   The encoding mode determination unit 113 performs inter-screen prediction encoding based on the code amount at the time of intra-frame encoding estimated by the code amount estimation unit (1) 111 and the motion compensation estimated by the code amount estimation unit (2) 112. An encoding mode (intra-screen encoding or inter-screen predictive encoding) is determined based on the code amount at the time. The coding mode determined here is sent as a control signal of the selector 103 and simultaneously sent to the variable length coding unit 105 and is variable length coded together with information such as quantized frequency components and motion vectors.

以上に示した構成を持つ画像符号化装置において、通常は時間方向に対する映像の相関が高く、大部分のブロックについて動き補償による画面間予測符号化を選択した方が効率的である。しかしながら、予測符号化を行う際の画面間でシーンチェンジやフラッシングが存在する映像や画面間の変化が激しい映像においては、画面間の相関が低く、動き補償による画面間予測符号化よりも画面内符号化を選択した方が効率が良い場合がある。このようなことから、符号化モード(画面内符号化および画面間予測符号化)をブロック単位で切り替えることは符号化効率を高める上で非常に有用であるといえる。   In the image encoding apparatus having the above-described configuration, the correlation of video with respect to the time direction is usually high, and it is more efficient to select inter-frame prediction encoding by motion compensation for most blocks. However, for images with scene changes or flashing between screens when predictive coding is performed, or for images where changes between screens are severe, the correlation between the screens is low, and the inter-screen predictive coding by motion compensation is lower It may be more efficient to select encoding. For this reason, it can be said that switching the coding mode (intra-screen coding and inter-screen predictive coding) in units of blocks is very useful for improving the coding efficiency.

従来から使用されている代表的な符号化モードの切り替え方法としては、図3に示す方法がある(例えば、非特許文献1参照)。図3のパラメータVARORは、図2の画像符号化装置100の構成要素である符号量推定部(1)111によって式1により算出される評価値であり、ブロック単位の入力画像データを画面内符号化した場合に生成される符号化画像データの推定符号量に相当する。   As a typical coding mode switching method used conventionally, there is a method shown in FIG. 3 (see, for example, Non-Patent Document 1). The parameter VAROR in FIG. 3 is an evaluation value calculated by Equation 1 by the code amount estimation unit (1) 111 that is a component of the image encoding device 100 in FIG. This corresponds to the estimated code amount of the encoded image data generated when the image data is converted.

(式1)VAROR=(1/N)*Σ{Y1(x,y)^2}−{(1/N)*ΣY1(x,y)}^2
ここで、Y1(x,y)はブロック単位の入力画像データの画素位置(x,y)における輝度データの値、Nはブロックに含まれる輝度データの数を示す。
(Expression 1) VAROR = (1 / N) * Σ {Y1 (x, y) ^ 2} − {(1 / N) * ΣY1 (x, y)} ^ 2
Here, Y1 (x, y) is the value of luminance data at the pixel position (x, y) of the input image data in block units, and N is the number of luminance data included in the block.

一方、図3のパラメータVARは、符号量推定部(2)112によって式2により算出される評価値であり、ブロック単位の予測誤差画像データを画面間予測符号化した場合に生成される符号化画像データの推定符号量に相当する。   On the other hand, the parameter VAR in FIG. 3 is an evaluation value calculated by the code amount estimation unit (2) 112 according to Equation 2, and is generated when the prediction error image data in units of blocks is subjected to inter-frame prediction encoding. This corresponds to the estimated code amount of image data.

(式2)VAR=(1/N)*Σ{Y2(x,y)}^2
ここで、Y2(x,y)はブロック単位の予測誤差画像データの画素位置(x,y)における輝度データの値、Nはブロックに含まれる輝度データの数を示す。
(Expression 2) VAR = (1 / N) * Σ {Y2 (x, y)} ^ 2
Here, Y2 (x, y) is the value of the luminance data at the pixel position (x, y) of the prediction error image data in block units, and N is the number of luminance data included in the block.

以上のように、符号量推定部(1)111によって算出されたパラメータVAROR、および符号量推定部(2)112によって算出されたパラメータVARは、符号化モード決定部113に入力され、図3に示す条件に基づいて符号化モードが決定される。すなわち、図3において、パラメータ(VAR,VAROR)のプロット位置が領域(a)に含まれる場合には画面内符号化を選択し、領域(b)に含まれる場合には画面間予測符号化を選択する。なお、プロット位置が境界上となった場合には画面間予測符号化を選択するものとする。   As described above, the parameter VAROR calculated by the code amount estimation unit (1) 111 and the parameter VAR calculated by the code amount estimation unit (2) 112 are input to the encoding mode determination unit 113 and are shown in FIG. The encoding mode is determined based on the conditions shown. That is, in FIG. 3, when the plot position of the parameters (VAR, VAROR) is included in the region (a), intra-screen coding is selected, and when it is included in the region (b), inter-screen predictive coding is performed. select. Note that when the plot position is on the boundary, the inter-frame prediction encoding is selected.

また、従来の別の切り替え方法としては、図4に示す方法がある(例えば、特許文献1参照)。図4においては、図3で示した従来例と同様の方法で算出されるパラメータVARおよびVARORを用いて符号化モードを決定する。図中のパラメータTHは、符号化時に各ブロックのVARに関して度数分布を求め、符号化後その度数分布に基づいて決定される閾値であり、この閾値は画面内符号化が選択されるブロック数が一定となるように適応的に変更される。これらの処理は、予測符号化が正しく行われなかったブロックに対する画像の劣化を防ぐことを目的として行われる。
特許第3200199号公報 ISO−IEC/JTC1/SC29/WG11 N0328 Test Model 3(TM3)
Further, as another conventional switching method, there is a method shown in FIG. 4 (see, for example, Patent Document 1). In FIG. 4, the encoding mode is determined using parameters VAR and VAROR calculated by the same method as in the conventional example shown in FIG. The parameter TH in the figure is a threshold value that is determined based on the frequency distribution after encoding after obtaining the frequency distribution for the VAR of each block at the time of encoding, and this threshold value is the number of blocks for which intra-frame encoding is selected. It is adaptively changed so as to be constant. These processes are performed for the purpose of preventing image degradation for blocks for which predictive encoding has not been performed correctly.
Japanese Patent No. 3300199 ISO-IEC / JTC1 / SC29 / WG11 N0328 Test Model 3 (TM3)

しかしながら、動き補償を用いた画面間予測符号化においては、符号化対象となる画像データと予測符号化時に参照される画像データの間にフラッシングやフェード等のような輝度変化があると、動き検出によって得られた動きベクトル自体の信頼性が低く、画面間予測符号化時の推定符号量の方が画面内符号化時の推定符号量より小さかったとしても視覚的な符号化歪が目立ちやすい。   However, in inter-picture predictive coding using motion compensation, if there is a luminance change such as flushing or fading between the image data to be coded and the image data referenced during predictive coding, motion detection is performed. The reliability of the motion vector itself obtained by the above is low, and even if the estimated code amount at the time of inter-screen predictive coding is smaller than the estimated code amount at the time of intra-screen coding, visual coding distortion is conspicuous.

このような課題を解決するために、本発明による画像符号化方法は、入力画像を表す入力画像データを複数のブロックに分割し、前記ブロック毎に画面内符号化または動き補償による画面間予測符号化のいずれかの符号化モードを選択して符号化画像データを生成する画像符号化方法であって、前記ブロックを画面内符号化した場合の符号化画像データの符号量を推定する符号量推定ステップ1と、前記ブロックを動き補償により画面間予測符号化した場合の符号化画像データの符号量を推定する符号量推定ステップ2と、前記動き補償による画面間予測符号化の信頼度を算出する信頼度算出ステップと、前記符号量推定ステップ1および2で推定された符号量と前記信頼度算出ステップで算出された信頼度に基づいて、前記ブロックの符号化モードを決定する符号化モード決定ステップとを備えたことを特徴とする。   In order to solve such a problem, an image encoding method according to the present invention divides input image data representing an input image into a plurality of blocks, and inter-screen encoding or intra-frame prediction code by motion compensation for each block. An image encoding method for generating encoded image data by selecting one of the encoding modes for encoding, and estimating a code amount of encoded image data when the block is encoded in a screen Step 1, a code amount estimation step 2 for estimating a code amount of encoded image data when the block is subjected to inter prediction encoding by motion compensation, and a reliability of inter prediction encoding by the motion compensation is calculated. Based on the reliability calculation step, the code amount estimated in the code amount estimation steps 1 and 2, and the reliability calculated in the reliability calculation step, the code of the block Characterized in that a coding mode determining step of determining the mode.

また、本発明による画像符号化装置は、入力画像を表す入力画像データを複数のブロックに分割し、前記ブロック毎に画面内符号化または動き補償による画面間予測符号化のいずれかの符号化モードを選択して符号化画像データを生成する画像符号化装置であって、前記ブロックを画面内符号化した場合の符号化画像データの符号量を推定する符号量推定手段1と、前記ブロックを動き補償により画面間予測符号化した場合の符号化画像データの符号量を推定する符号量推定手段2と、前記動き補償による画面間予測符号化の信頼度を算出する信頼度算出手段と、前記符号量推定手段1および2で推定された符号量と前記信頼度算出手段で算出された信頼度に基づいて、前記ブロックの符号化モードを決定する符号化モード決定手段とを備えたことを特徴とする。   The image encoding apparatus according to the present invention divides input image data representing an input image into a plurality of blocks, and encodes either one of intra-frame encoding or inter-frame predictive encoding by motion compensation for each block. Is an image encoding device that generates encoded image data by selecting a code amount estimation unit 1 that estimates the amount of encoded image data when the block is intra-coded, and moves the block Code amount estimation means 2 for estimating the code amount of encoded image data when inter-picture prediction encoding is performed by compensation, reliability calculation means for calculating the reliability of inter-picture prediction encoding by motion compensation, and the code Coding mode determining means for determining the coding mode of the block based on the code amount estimated by the quantity estimating means 1 and 2 and the reliability calculated by the reliability calculating means. It is characterized in.

以上の様に、本発明によれば、符号化効率に大きく影響する動き検出の信頼度を考慮して、動きベクトルの誤検出による画質の劣化を抑えることができるため、その実用的価値が高い。   As described above, according to the present invention, it is possible to suppress deterioration in image quality due to erroneous detection of motion vectors in consideration of the reliability of motion detection that greatly affects the coding efficiency. .

以下、本発明の実施の形態に関して、図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(実施の形態)
図1は、本発明の実施の形態にかかる画像符号化装置200の機能構成を示すブロック図である。同図において、図2に示した従来の画像符号化装置100と同様の構成要素についてはすでに説明しているので、同一の符号を付し、説明を省略する。以降の図においても同様に、すでに説明した既出の構成要素については、同一の符号を付し、説明を省略する。画像符号化装置200は、入力画像メモリ101、減算部102、セレクタ103、直交変換/量子化部104、可変長符号化部105、逆量子化/逆直交変換部106、加算部107、参照画像メモリ108、動き検出部109、動き補償部110、符号量推定部(1)211、符号量推定部(2)212、信頼度算出部201、符号化モード決定部213を備える。
(Embodiment)
FIG. 1 is a block diagram showing a functional configuration of an image encoding device 200 according to an embodiment of the present invention. In this figure, since the same components as those of the conventional image encoding device 100 shown in FIG. 2 have already been described, the same reference numerals are given and description thereof is omitted. Similarly in the subsequent drawings, the already described components are denoted by the same reference numerals, and the description thereof is omitted. The image coding apparatus 200 includes an input image memory 101, a subtraction unit 102, a selector 103, an orthogonal transform / quantization unit 104, a variable length coding unit 105, an inverse quantization / inverse orthogonal transform unit 106, an addition unit 107, and a reference image. A memory 108, a motion detection unit 109, a motion compensation unit 110, a code amount estimation unit (1) 211, a code amount estimation unit (2) 212, a reliability calculation unit 201, and an encoding mode determination unit 213 are provided.

符号量推定部(1)211は、入力画像メモリ101から出力されたブロック単位の入力画像データに対して、画面内符号化を行った場合に生成される符号化画像データの符号量を推定する。   The code amount estimation unit (1) 211 estimates the code amount of encoded image data generated when intra-screen encoding is performed on input image data in units of blocks output from the input image memory 101. .

符号量推定部(2)212は、減算部102から出力されたブロック単位の予測誤差画像データに対して、動き補償による画面間予測符号化を行った場合に生成される符号化画像データの符号量を推定する。   The code amount estimation unit (2) 212 encodes encoded image data generated when inter-frame prediction encoding is performed on the prediction error image data in units of blocks output from the subtraction unit 102 by motion compensation. Estimate the amount.

信頼度算出部201は、入力画像メモリ101に格納されている入力画像データ、および参照画像メモリ108に格納されている参照画像データに基づいて、動き検出部109で行われる動き検出処理の信頼度を算出する。   The reliability calculation unit 201 is based on the input image data stored in the input image memory 101 and the reference image data stored in the reference image memory 108, and the reliability of the motion detection process performed by the motion detection unit 109. Is calculated.

符号化モード決定部213は、符号量推定部(1)211によって推定された画面内符号化時の符号量、符号量推定部(2)212によって推定された動き補償による画面間予測符号化時の符号量、および信頼度算出部201によって算出された動き検出処理の信頼度に基づいて、符号化モード(画面内符号化あるいは画面間予測符号化)を決定する。   The encoding mode determination unit 213 performs the intra-screen coding estimated by the code amount estimation unit (1) 211 and the inter-frame prediction encoding based on the motion compensation estimated by the code amount estimation unit (2) 212. The coding mode (intra-screen coding or inter-screen prediction coding) is determined on the basis of the amount of codes and the reliability of the motion detection process calculated by the reliability calculation unit 201.

以下、符号量推定部(1)211、符号量推定部(2)212、信頼度算出部201、符号化モード決定部213のそれぞれについて詳細に説明する。   Hereinafter, each of the code amount estimation unit (1) 211, the code amount estimation unit (2) 212, the reliability calculation unit 201, and the encoding mode determination unit 213 will be described in detail.

符号量推定部(1)211では、入力画像メモリ101から出力されたブロック単位の入力画像データに対して統計量を算出し、前記データを画面内符号化した場合に生成される符号化画像データの符号量B1を推定する。例えば、符号量B1は、ブロック単位の入力画像データを構成する輝度および色差データを用いて式3から5により算出することができる。   The code amount estimation unit (1) 211 calculates the statistic for the input image data in units of blocks output from the input image memory 101, and generates encoded image data when the data is encoded on the screen. Is estimated. For example, the code amount B1 can be calculated by Equations 3 to 5 using the luminance and color difference data constituting the input image data in block units.

(式3)BY1=Σ{Y1(x,y)^2}−(1/NY)*{ΣY1(x,y)}^2
(式4)BC1=Σ{C1(x,y)^2}−(1/NC)*{ΣC1(x,y)}^2
(式5)B1=KY*BY1+KC*BC1
ここで、BY1およびBC1はそれぞれ輝度および色差データに対する推定符号量、Y1(x,y)およびC1(x,y)はブロック単位の入力画像データの画素位置(x,y)における輝度および色差データの値、NYおよびNCはブロックに含まれる輝度および色差データの数、KYおよびKCは輝度および色差データの重要度を調節するための重み係数である。例えば、輝度データの符号量を重視する場合は、KY>KCとすれば良く、輝度データのみを考慮した符号量を推定する場合は、KC=0とすれば良い。
(Formula 3) BY1 = Σ {Y1 (x, y) ^ 2} − (1 / NY) * {ΣY1 (x, y)} ^ 2
(Formula 4) BC1 = Σ {C1 (x, y) ^ 2} − (1 / NC) * {ΣC1 (x, y)} ^ 2
(Formula 5) B1 = KY * BY1 + KC * BC1
Here, BY1 and BC1 are estimated code amounts for luminance and chrominance data, respectively, and Y1 (x, y) and C1 (x, y) are luminance and chrominance data at the pixel position (x, y) of the input image data in block units. , NY and NC are the numbers of luminance and color difference data included in the block, and KY and KC are weighting factors for adjusting the importance of the luminance and color difference data. For example, when emphasizing the code amount of luminance data, KY> KC may be set. When estimating the code amount considering only luminance data, KC = 0 may be set.

また、式5により算出される画面内符号化時の推定符号量は、画素データの分散すなわち交流成分のみを考慮したものとなっているため、周波数成分の直流成分に相当する符号量を加算することによって、さらに精度の高い推定を行うことが可能である。   Further, since the estimated code amount calculated by the equation 5 at the time of the intra-picture encoding considers only the dispersion of the pixel data, that is, the AC component, the code amount corresponding to the DC component of the frequency component is added. Thus, it is possible to perform estimation with higher accuracy.

また、式3および式4では、画素データの統計量として分散を用いたが、式6および式7のように差分絶対値を用いることによって演算量を削減することができる。   Further, in Equations 3 and 4, variance is used as the statistic of the pixel data, but the amount of calculation can be reduced by using the absolute difference value as in Equations 6 and 7.

(式6)BY1=Σ|Y1(x,y)−(1/NY)*ΣY1(x,y)|
(式7)BC1=Σ|C1(x,y)−(1/NC)*ΣC1(x,y)|
さらに、符号量の推定に使用する統計量は上述に限らず、符号量と相関のあるパラメータであれば、他の統計量を用いてもかまわない。
(Expression 6) BY1 = Σ | Y1 (x, y) − (1 / NY) * ΣY1 (x, y) |
(Expression 7) BC1 = Σ | C1 (x, y) − (1 / NC) * ΣC1 (x, y) |
Furthermore, the statistic used for code amount estimation is not limited to the above, and other statistic values may be used as long as the parameters correlate with the code amount.

符号量推定部(2)212では、減算部102から出力されたブロック単位の予測誤差画像データに対して統計量を算出し、前記データを動き補償による画面間予測符号化を行った場合に生成される符号化画像データの符号量B2を推定する。例えば、符号量B2は、ブロック単位の予測誤差画像データを構成する輝度および色差データを用いて式8から10により算出することができる。   The code amount estimation unit (2) 212 calculates a statistic for the block-unit prediction error image data output from the subtraction unit 102, and generates the data when inter-frame prediction encoding is performed using motion compensation. The code amount B2 of the encoded image data to be performed is estimated. For example, the code amount B2 can be calculated by Equations 8 to 10 using the luminance and color difference data constituting the prediction error image data in block units.

(式8)BY2=Σ{Y2(x,y)^2}−(1/NY)*{ΣY2(x,y)}^2
(式9)BC2=Σ{C2(x,y)^2}−(1/NC)*{ΣC2(x,y)}^2
(式10)B2=KY*BY2+KC*BC2
ここで、BY2およびBC2はそれぞれ輝度および色差データに対する推定符号量、Y2(x,y)およびC2(x,y)はブロック単位の予測誤差画像データの画素位置(x,y)における輝度および色差データの値、NYおよびNCはブロックに含まれる輝度および色差データの数、KYおよびKCは輝度および色差データの重要度を調節するための重み係数である。この場合も同様に輝度データの符号量を重視する場合は、KY>KCとすれば良く、輝度データのみを考慮した符号量を推定する場合は、KC=0とすれば良い。
(Formula 8) BY2 = Σ {Y2 (x, y) ^ 2} − (1 / NY) * {ΣY2 (x, y)} ^ 2
(Formula 9) BC2 = Σ {C2 (x, y) ^ 2} − (1 / NC) * {ΣC2 (x, y)} ^ 2
(Formula 10) B2 = KY * BY2 + KC * BC2
Here, BY2 and BC2 are the estimated code amounts for the luminance and chrominance data, respectively, Y2 (x, y) and C2 (x, y) are the luminance and chrominance at the pixel position (x, y) of the prediction error image data in block units. Data values, NY and NC are the numbers of luminance and color difference data included in the block, and KY and KC are weighting factors for adjusting the importance of the luminance and color difference data. In this case as well, if importance is attached to the code amount of the luminance data, KY> KC may be set. If the code amount considering only the luminance data is estimated, KC = 0 may be set.

また、動き補償による画面間予測符号化では、可変長符号化の際に動きベクトル成分も符号化されるため、式10で算出される符号量B2に動きベクトル成分に相当する符号量を加算することによって、さらに精度の高い推定を行うことが可能である。   Further, in the inter-picture predictive encoding based on motion compensation, since a motion vector component is also encoded at the time of variable length encoding, the code amount corresponding to the motion vector component is added to the code amount B2 calculated by Expression 10. Thus, it is possible to perform estimation with higher accuracy.

また、式8および式9では、画素データの統計量として分散を用いたが、式11および式12のように差分絶対値を用いることによって演算量を削減することができる。   In Expressions 8 and 9, variance is used as the statistic of the pixel data. However, the calculation amount can be reduced by using the absolute difference as in Expressions 11 and 12.

(式11)BY2=Σ|Y2(x,y)−(1/NY)*ΣY2(x,y)|
(式12)BC2=Σ|C2(x,y)−(1/NC)*ΣC2(x,y)|
さらに、符号量の推定に使用する統計量は上述に限らず、符号量と相関のあるパラメータであれば、他の統計量を用いてもかまわない。
(Expression 11) BY2 = Σ | Y2 (x, y) − (1 / NY) * ΣY2 (x, y) |
(Expression 12) BC2 = Σ | C2 (x, y) − (1 / NC) * ΣC2 (x, y) |
Furthermore, the statistic used for code amount estimation is not limited to the above, and other statistic values may be used as long as the parameters correlate with the code amount.

信頼度算出部201では、動き検出部109で実行される動き検出処理について、その確からしさを示す指標として信頼度を算出する。通常、動き検出処理は、図5に示すように、符号化対象であるブロック単位の入力画像データと予測に用いる参照画像データとの間で、輝度データを用いたブロックマッチングを行う。しかしながら、上述のようなブロックマッチングでは、例えば画面間で輝度変化があった場合には、動き検出に失敗し、誤った動きベクトルを選択する可能性が高くなる。また、このような輝度変化がある映像においては、色差データも変化している場合が多く、正確な動きベクトルを検出するのが困難である。先に述べた動きベクトルの誤検出は、特に符号化対象となるブロック単位の入力画像データにおいて、輝度データのダイナミックレンジ(振れ幅)が小さい場合ほど顕著となる。従って、図5のような評価値を用いたブロックマッチングによって動き検出を行う場合、その動きベクトルが正しいかどうかを示す指標(動き検出の信頼度)Confは、例えば、式13のように表すことができる。   The reliability calculation unit 201 calculates the reliability as an index indicating the probability of the motion detection process executed by the motion detection unit 109. Usually, in the motion detection process, as shown in FIG. 5, block matching using luminance data is performed between input image data in block units to be encoded and reference image data used for prediction. However, in the block matching as described above, for example, when there is a luminance change between screens, the motion detection fails and the possibility of selecting an incorrect motion vector increases. In addition, in a video with such a luminance change, color difference data often changes, and it is difficult to detect an accurate motion vector. The above-described erroneous detection of motion vectors becomes more prominent as the dynamic range (blurring width) of the luminance data is smaller, particularly in the input image data in block units to be encoded. Therefore, when motion detection is performed by block matching using an evaluation value as shown in FIG. 5, an index (confidence of motion detection) Conf indicating whether or not the motion vector is correct is expressed as shown in Equation 13, for example. Can do.

(式13)if(DY<RY)Conf=0
else Conf=K*(DY−RY)
ここで、DYは入力画像データと参照画像データの画面間における輝度変化量、RYはブロック単位の入力画像データにおける輝度値のダイナミックレンジを示し、KはConfの重要度を調節する係数である。式13において動き検出の信頼度Confは0に近い値ほど信頼性が高いことを示している。
(Formula 13) if (DY <RY) Conf = 0
else Conf = K * (DY-RY)
Here, DY represents the luminance change amount between the screens of the input image data and the reference image data, RY represents the dynamic range of the luminance value in the input image data in units of blocks, and K is a coefficient for adjusting the importance of Conf. In Expression 13, the reliability Conf of motion detection indicates that the closer to 0, the higher the reliability.

なお、信頼度の算出式は式13に限らず、動き検出の信頼性を示す指標であれば他の算出式で求めてもかまわない。   Note that the calculation formula for the reliability is not limited to the formula 13, and any other calculation formula may be used as long as it is an index indicating the reliability of motion detection.

符号化モード決定部213では、符号量推定部(1)211によって推定された画面内符号化時の符号量B1、符号量推定部(2)212によって推定された動き補償による画面間予測符号化時の符号量B2、および信頼度算出部201によって算出された動き検出の信頼度Confを用いて、式14に従って符号化モードを決定する。   In the coding mode determination unit 213, the code amount B1 at the time of the intra-frame coding estimated by the code amount estimation unit (1) 211, and the inter-frame prediction coding by the motion compensation estimated by the code amount estimation unit (2) 212. The encoding mode is determined according to Equation 14 using the time code amount B2 and the motion detection reliability Conf calculated by the reliability calculation unit 201.

(式14)if(B1<B2+Conf)画面内符号化
else 動き補償による画面間予測符号化
なお、符号化モードの決定は式14の条件に限らず、B1、B2およびConfを用いた他の比較演算によって決定することも可能である。
(Formula 14) if (B1 <B2 + Conf) Intra-screen coding
Else Motion Compensation Interframe Predictive Coding Note that the coding mode is not limited to the condition of Expression 14, but can be determined by other comparison operations using B1, B2, and Conf.

本発明にかかる画像符号化装置は、動画像データを高能率に圧縮符号化する画像符号化装置として有用である。   The image encoding apparatus according to the present invention is useful as an image encoding apparatus that compresses and encodes moving image data with high efficiency.

本発明の実施の形態における画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the image coding apparatus in embodiment of this invention. 従来の画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the conventional image coding apparatus. 従来の符号化モード決定方法に関する説明図Explanatory drawing about the conventional encoding mode determination method 従来の符号化モード決定方法に関する説明図Explanatory drawing about the conventional encoding mode determination method 動きベクトル検出におけるブロックマッチングに関する説明図Explanatory drawing about block matching in motion vector detection

符号の説明Explanation of symbols

100 画像符号化装置
101 入力画像メモリ
102 減算部
103 セレクタ
104 直交変換/量子化部
105 可変長符号化部
106 逆量子化/逆直交変換部
107 加算部
108 参照画像メモリ
109 動き検出部
110 動き補償部
111 符号量推定部(1)
112 符号量推定部(2)
113 符号化モード決定部
200 画像符号化装置
201 信頼度算出部
211 符号量推定部(1)
212 符号量推定部(2)
213 符号化モード決定部
DESCRIPTION OF SYMBOLS 100 Image coding apparatus 101 Input image memory 102 Subtraction part 103 Selector 104 Orthogonal transformation / quantization part 105 Variable length coding part 106 Inverse quantization / inverse orthogonal transformation part 107 Addition part 108 Reference image memory 109 Motion detection part 110 Motion compensation Part 111 Code amount estimation part (1)
112 Code amount estimation unit (2)
113 Coding mode determination unit 200 Image coding device 201 Reliability calculation unit 211 Code amount estimation unit (1)
212 Code amount estimation unit (2)
213 Coding mode determination unit

Claims (9)

入力画像を表す入力画像データを複数のブロックに分割し、前記ブロック毎に画面内符号化または動き補償による画面間予測符号化のいずれかの符号化モードを選択して符号化画像データを生成する画像符号化方法であって、前記ブロックを画面内符号化した場合の符号化画像データの符号量を推定する符号量推定ステップ1と、前記ブロックを動き補償により画面間予測符号化した場合の符号化画像データの符号量を推定する符号量推定ステップ2と、前記動き補償による画面間予測符号化の信頼度を算出する信頼度算出ステップと、前記符号量推定ステップ1および2で推定された符号量と前記信頼度算出ステップで算出された信頼度に基づいて、前記ブロックの符号化モードを決定する符号化モード決定ステップとを備えたことを特徴とする画像符号化方法。 The input image data representing the input image is divided into a plurality of blocks, and encoded image data is generated by selecting one of the encoding modes of intra-frame encoding or inter-frame prediction encoding by motion compensation for each block. A code amount estimation step 1 for estimating a code amount of encoded image data when the block is subjected to intra-frame encoding, and a code when the block is subjected to inter-screen predictive encoding by motion compensation. Code amount estimation step 2 for estimating the code amount of the encoded image data, reliability calculation step for calculating the reliability of inter-frame prediction encoding by motion compensation, and the code estimated in the code amount estimation steps 1 and 2 An encoding mode determining step for determining an encoding mode of the block based on the quantity and the reliability calculated in the reliability calculating step. Picture coding method for. 入力画像を表す入力画像データを複数のブロックに分割し、前記ブロック毎に画面内符号化または動き補償による画面間予測符号化のいずれかの符号化モードを選択して符号化画像データを生成する画像符号化装置であって、前記ブロックを画面内符号化した場合の符号化画像データの符号量を推定する符号量推定手段1と、前記ブロックを動き補償により画面間予測符号化した場合の符号化画像データの符号量を推定する符号量推定手段2と、前記動き補償による画面間予測符号化の信頼度を算出する信頼度算出手段と、前記符号量推定手段1および2で推定された符号量と前記信頼度算出手段で算出された信頼度に基づいて、前記ブロックの符号化モードを決定する符号化モード決定手段とを備えたことを特徴とする画像符号化装置。 The input image data representing the input image is divided into a plurality of blocks, and encoded image data is generated by selecting one of the encoding modes of intra-frame encoding or inter-frame prediction encoding by motion compensation for each block. A code amount estimation unit 1 for estimating a code amount of encoded image data when the block is subjected to intra-screen encoding, and a code when the block is subjected to inter-screen predictive encoding by motion compensation Code amount estimation means 2 for estimating the code amount of the encoded image data, reliability calculation means for calculating the reliability of inter-frame prediction encoding by motion compensation, and code estimated by the code amount estimation means 1 and 2 An image encoding apparatus comprising: an encoding mode determining unit that determines an encoding mode of the block based on a quantity and the reliability calculated by the reliability calculating unit. 生成された前記符号化画像データを記録する記録手段を備えたことを特徴とする請求項2記載の画像符号化装置。 3. The image encoding apparatus according to claim 2, further comprising recording means for recording the generated encoded image data. 生成された前記符号化画像データを記録する記録媒体を備えたことを特徴とする請求項2記載の画像符号化装置。 The image encoding apparatus according to claim 2, further comprising a recording medium for recording the generated encoded image data. 生成された前記符号化画像データを復号化する復号化手段を備えたことを特徴とする請求項2から4のいずれかに記載の画像符号化装置。 5. The image encoding apparatus according to claim 2, further comprising a decoding unit that decodes the generated encoded image data. 生成された前記符号化画像データが記録されている記録媒体から前記符号化画像データを読み出して復号化する復号化手段を備えたことを特徴とする請求項5記載の画像符号化装置。 6. The image encoding apparatus according to claim 5, further comprising a decoding unit that reads and decodes the encoded image data from a recording medium on which the generated encoded image data is recorded. 請求項2から6のいずれかに記載の画像符号化装置によって符号化された符号化画像データを記録したことを特徴とする記録媒体。 A recording medium on which encoded image data encoded by the image encoding device according to claim 2 is recorded. 請求項1記載の画像符号化方法を実行するためのプログラム。 A program for executing the image encoding method according to claim 1. 請求項8記載のプログラムを記録したことを特徴とする記録媒体。 A recording medium on which the program according to claim 8 is recorded.
JP2004063522A 2004-03-08 2004-03-08 Image encoding method and apparatus, recording medium, and image decoding apparatus Pending JP2005252921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004063522A JP2005252921A (en) 2004-03-08 2004-03-08 Image encoding method and apparatus, recording medium, and image decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004063522A JP2005252921A (en) 2004-03-08 2004-03-08 Image encoding method and apparatus, recording medium, and image decoding apparatus

Publications (1)

Publication Number Publication Date
JP2005252921A true JP2005252921A (en) 2005-09-15

Family

ID=35032954

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004063522A Pending JP2005252921A (en) 2004-03-08 2004-03-08 Image encoding method and apparatus, recording medium, and image decoding apparatus

Country Status (1)

Country Link
JP (1) JP2005252921A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022516851A (en) * 2019-03-22 2022-03-03 テンセント・アメリカ・エルエルシー Methods for interframe point cloud attribute coding and their device and computer programs

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022516851A (en) * 2019-03-22 2022-03-03 テンセント・アメリカ・エルエルシー Methods for interframe point cloud attribute coding and their device and computer programs
JP7263521B2 (en) 2019-03-22 2023-04-24 テンセント・アメリカ・エルエルシー Method and its apparatus and computer program for inter-frame point cloud attribute encoding

Similar Documents

Publication Publication Date Title
KR100391027B1 (en) A method and apparatus for predictive encoding of video information
JP5173409B2 (en) Encoding device and moving image recording system provided with encoding device
US8718138B2 (en) Image encoding apparatus and image encoding method that determine an encoding method, to be used for a block to be encoded, on the basis of an intra-frame-prediction evaluation value calculated using prediction errors between selected reference pixels and an input image
JP4820191B2 (en) Moving picture coding apparatus and program
JP5474838B2 (en) Predictive frame selection method and apparatus supporting improved efficiency and subjective quality
EP1993292B1 (en) Dynamic image encoding method and device and program using the same
WO2010035370A1 (en) Dynamic image encoding method and dynamic image decoding method
JPH0870460A (en) Movement compensation type coding method adapted to magnitude of movement,and its device
US20080279275A1 (en) Image-processing apparatus and method thereof
WO2011121894A1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP2005191706A (en) Moving picture coding method and apparatus adopting the same
JP2006519565A (en) Video encoding
US8150171B2 (en) Apparatus for and method of decoding moving picture, and computer product
KR100415494B1 (en) Image encoding method and apparatus, recording apparatus, video signal encoding apparatus, processing apparatus and method, video data processing apparatus and method
KR101090586B1 (en) Encoding/decoding device, encoding/decoding method and recording medium
KR20050089838A (en) Video encoding with skipping motion estimation for selected macroblocks
JP2012054818A (en) Image processing apparatus and image processing method
KR101391397B1 (en) code amount control method and apparatus
JP5180887B2 (en) Encoding apparatus and method thereof
US20060008004A1 (en) Video encoder
JP2005086249A (en) Dynamic image coding method and dynamic image coding apparatus
JP2009055143A (en) Motion evaluation device, method, and program when encoding animation, and recording medium of program
JP4624308B2 (en) Moving picture decoding apparatus and moving picture decoding method
JP2005252921A (en) Image encoding method and apparatus, recording medium, and image decoding apparatus
US20070297517A1 (en) Entropy encoding and decoding apparatuses, and entropy encoding and decoding methods