JP3938679B2 - Optimal coding mode selection type moving picture coding system - Google Patents

Optimal coding mode selection type moving picture coding system Download PDF

Info

Publication number
JP3938679B2
JP3938679B2 JP2001350668A JP2001350668A JP3938679B2 JP 3938679 B2 JP3938679 B2 JP 3938679B2 JP 2001350668 A JP2001350668 A JP 2001350668A JP 2001350668 A JP2001350668 A JP 2001350668A JP 3938679 B2 JP3938679 B2 JP 3938679B2
Authority
JP
Japan
Prior art keywords
coding
coding mode
picture
encoding
bits
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.)
Expired - Fee Related
Application number
JP2001350668A
Other languages
Japanese (ja)
Other versions
JP2003153280A (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.)
KDDI Corp
Original Assignee
KDDI Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KDDI Corp filed Critical KDDI Corp
Priority to JP2001350668A priority Critical patent/JP3938679B2/en
Publication of JP2003153280A publication Critical patent/JP2003153280A/en
Application granted granted Critical
Publication of JP3938679B2 publication Critical patent/JP3938679B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は最適符号化モード選択型動画像符号化方式に関し、動画像を高効率に圧縮符号化できる最適符号化モード選択型動画像符号化方式に関する。
【0002】
【従来の技術】
従来の動画像符号化装置の一例を、図6を参照して説明する。入力画像信号11は、予測信号減算器12と動き推定・動き補償部19に送られる。予測信号減算器12で、入力画像信号11から動き補償予測信号aが減算され、予測誤差信号bが得られる。該予測誤差信号bは、高い符号化効率を得るために、DCT(離散コサイン変換部)部13で直交変換され、量子化部14で量子化される。その後、可変長符号化(VLC)部20でハフマン符号化等の可変長符号に変換され、一旦バッファ21に格納された後、ビットストリーム22として出力される。量子化部14は、該バッファ21からのレート制御信号により、次のブロックのための量子化ステップを計算する。
【0003】
また、復号側と同一の予測信号を用いるために、量子化部14で得られた量子化係数を逆量子化部15で逆量子化し、逆DCT部16で予測誤差信号が局所的に復号される。この予測誤差信号は、局所復号加算器17で、動き推定・動き補償部19で復元された動き補償予測信号aと加算され、フレームメモリ18に送られる。
【0004】
前記動き推定・動き補償部19では、動き補償予測信号aの復元、動きベクトルMVの決定、および符号化モードの選択をする。ここで、符号化モードは、例えば図7に示されているように、I、P、およびBピクチャ毎に、参照方式、予測タイプ、およびDCTタイプの組み合わせにより与えられ、マクロブロック単位に符号化モードの選択が可能である。
【0005】
【発明が解決しようとする課題】
前記した従来装置では、前記符号化モードの選択は、予測誤差信号bの絶対値和とか分散値とかを最小にするように、単に機械的に決定していた。このため、動画像を高効率に圧縮符号化することに関して、改善の余地があった。
【0006】
本発明の目的は、前記した従来技術に鑑み、動画像符号化におけるマクロブロック単位の適応モード判定を符号化ビット数最小化の規範でより厳密に行うことにより、圧縮符号化の効率をさらに向上させる最適符号化モード選択型動画像符号化方式を提供することにある。
【0007】
【課題を解決するための手段】
前記した目的を達成するために、本発明は、矩形小領域単位で動画像の符号化処理を行う最適符号化モード選択型動画像符号化方式であって、各符号化ピクチャにつき、動き補償予測の参照方式、動き補償予測のタイプ、および直交変換のタイプの組み合わせにより規定される複数の符号化モード候補と、符号化処理を行う画像の符号化ピクチャを決定する手段と、前記決定された符号化ピクチャの符号化モード候補毎に、前記矩形小領域を形成する複数のDCTブロックの各符号化ビット数を求める手段と、前記矩形小領域内で符号化ビット数が0となるDCTブロックの個数が予め定められた閾値以上になったかどうかを判断する手段と、前記判断により前記閾値以上になるものがあった場合には、予測誤差電力が最小となるものを符号化モードとして決定し、前記閾値以上になるものがない場合には、DCTブロックの符号化ビット数とオーバヘッドビット数との和が小さいものを符号化モードとして決定する手段とを具備した点に特徴がある。
【0008】
この特徴によれば、圧縮符号化の効率をさらに向上させることが可能であり、動画像を高効率で圧縮符号化できるようになる。
【0009】
【発明の実施の形態】
以下に、図面を参照して、本発明をより詳細に説明する。図1、図2および図3は、本発明の一実施形態の動作を示すフローチャート、図4は圧縮符号化される入力画像の概念図である。なお、該図1〜図3は、本実施形態の動き推定・動き補償部の動き補償動作を示すものである。
【0010】
図1〜図3の動作を、図4を参照しながら説明する。図示されているように、Piはi番目の入力画像、jは矩形小領域、例えば16画素×16ラインのマクロブロックの番号を示す。画像の全枚数は(N+1)枚、1画像の全マクロブロック数は(M+1)個であるとする。
【0011】
図1のステップS1では、入力画像の番号を示すiが0と置かれる。ステップS2では、画像Piが入力する。ステップS3では、該画像Piの符号化ピクチャが、I、P、およびBピクチャのいずれであるかが判断される。なお、本実施形態では、入力画像Piをどのピクチャにするかは、予め決められているものとする。該画像Piに対するピクチャがIピクチャであればステップS4に進み、PピクチャであればステップS8に進み、BピクチャであればステップS12に進む。
【0012】
画像Piの符号化ピクチャがIピクチャであるとすると、ステップS4では、マクロブロック(16画素×16ライン)の番号を表すjが0と置かれる。ステップS5では、j番目のマクロブロックの符号化モードが、後で詳述する本発明の方式により選択される。ステップS6では、j=Mが成立したか否かの判断がなされる。この判断が否定の時には、ステップS7に進んで、jに1が加算される。以下、ステップS5〜S7の処理が繰り返し行われ、ステップS6の判断が肯定になると、画像Piの符号化モードの選択を終了し、ステップS16に進む。なお、前記ステップS3でPピクチャと判定されてステップS8に進んだ時、およびBピクチャと判定されてステップS12に進んだ時の、各ステップS9〜S11の処理、およびステップS13〜S15の処理は、前記ステップS5〜S7の処理と同じであるので、説明を省略する。
【0013】
ステップS16では、i=N、すなわち全画像の圧縮符号化が終了したか否かの判断がなされ、この判断が否定の時には、ステップS17に進んで、iに1が加算される。そして、次の画像の処理が実行される。一方、ステップS16の判断が肯定になると、前記一連の圧縮符号化処理を終了する。
【0014】
次に、前記ステップS5,S9およびS13の「マクロブロックMBjの符号化モード選択」の動作を、図2のフローチャートおよび図5の説明図を参照して説明する。
【0015】
まず、本実施形態の概要を説明する。簡単のため、扱う映像信号としては、輝度信号のみを対象として説明を行うこととする。本実施形態では、図5に示されているように、各マクロブロックMBjを4個のDCTブロックB0〜B3に分解し、符号化モード毎に、▲1▼各DCTブロックの符号化ビット数、▲2▼動きベクトルのオーバヘッドビット数を算出する。本実施形態では、前記▲1▼のDCTブロック符号化ビット数の計算は、画素毎に計算をしていたのではリアルタイムの処理に間に合わないので、ブロック単位予測誤差信号の統計量、例えば平均値m、分散σ、および量子化ステップサイズΔを基に、既知の発生ビット推定関数f(m,σ,Δ)から各ブロック毎の発生ビット数を推定する。また、▲2▼の動きベクトルのオーバヘッドビット数は、VLCテーブル等から算出する。
【0016】
そして、マクロブロック内で、DCTブロックの符号化ビット数が0となる、あるいは符号化ビット数が0となるDCTブロックが大半を占める候補が一つ以上存在する場合には、この符号化モードを優先的に採用した上で、これらの中から予測誤差電力、すなわち予測誤差信号の2乗和が最小となるものを符号化モードとして決定する。
【0017】
一方、前記のような候補が存在しない場合には、マクロブロックの発生ビット数を、各符号化モード毎に、4個のDCTブロックの符号化ビット数と、それ以外のオーバヘッドビット数から算出し、最小となるものを符号化モードとして決定する。
【0018】
なお、前記発生ビット推定関数f(m,σ,Δ)の一例としては、各量子化ステップサイズΔを変化させて実測により決定される次の関数を用いることができる。例えば、イントラ符号化モードの時には、f(m,σ,Δ)=g(m)+a×log σ +bを用いることができる。ここに、関数g(m)はDCT入力となる予測誤差信号の平均値mから推定される発生ビット数であり、{a×log σ +b}は、分散値σから推定される発生ビット数である。なお、aおよびbは定数であり、実験結果により決定される。また、インター符号化モードの時には、前記g(m)=0として、f(m,σ,Δ)=a×log σ+bを用いることができる。
【0019】
図2のステップS21においてブロック数を表すN(k’)を0、ある置き数xを1と置き、ステップS22で候補となる符号化モードkを0と置く。ここに、該候補となる符号化モードは図7のkに相当し、Iピクチャは2候補(k=0〜1)、Pピクチャは6候補(k=0〜5)、およびBピクチャは14候補(k=0〜13)となる。
【0020】
ステップS23では、マクロブロックMBjの符号化モードkの動きベクトルMVを取得する。ステップS24では、マクロブロックMBjの予測誤差信号を取得する。ステップS25では、該予測誤差信号を基に、DCTブロック符号化ビット数SA(m)(m=0〜3)を推定する。この推定は、前記した発生ビット推定関数f(m,σ,Δ)を用いて行われる。ステップS26では、該推定されたDCTブロック符号化ビット数SA(m)が、SA(m)=0になるブロック数N(k)をカウントする。1マクロブロック当たりのDCTブロック数は4個であるので、SA(m)=0になるブロック数N(k)は最大で4個になる。
【0021】
ステップS27では、該SA(m)=0になるブロック数N(k)がある閾値THより大きいか否かの判断がなされる。この判断は、符号化ビット数が0となるDCTブロックが大半を占めるかどうかの判定であるので、閾値THとしては、2又は3が好適である。以下の説明では、TH=2として説明する。
【0022】
ステップS27の判断が否定の時には、ステップS28に進んで、N(k’)>0が成立するか否かの判断がなされる。N(k’)=0であると否定と判断されてステップS29に進み、オーバヘッドビット数SBを算出する。ステップS30では、(DCTブロックの符号化ビット数SA(m)のマクロブロック合計+オーバヘッドビット数SB)が求められ、これがST(k)と置かれる。なお、画像Piの符号化ピクチャ(ステップS3の判断)がフレーム内符号化(Iピクチャ)の場合には、DCTブロックの符号化ビット数推定対象をDC係数を除く全てのAC係数とし、DC係数はオーバヘッドビット数に含めることにする。
【0023】
ステップS31では、ST(k)の最小値が更新されたか否かの判断がなされる。この判断が肯定の時には、ステップS32に進んで、minST(k)のkを保持する。このkをk’とする。ステップS31の判断が否定の時、またはステップS32の処理が終了すると、ステップS33に進んで、kに1が加算されて評価対象とする符号化モードが更新される。ステップS34では、kがkmax に等しくなったか否かの判断がなされる。すなわち、Iピクチャであればkmax=1、Pピクチャであればkmax=5、Bピクチャであればkmax=13となる。ステップS34の判断が否定の時には、ステップS23に戻って、次の符号化モードの動きベクトルMVを取得する動作が行われる。
【0024】
次に、SA(m)=0となるブロック数N(k)が3または4となって、ステップS27の判断が肯定になった時の動作を、図3を参照して説明する。
【0025】
ステップS35では、4個のDCTブロックの予測誤差電力を、Σ(x−y、(ただし、i=0〜N−1、NはDCTブロックの画素数)から算出し、その算出結果をMSE(k)と置く。ここに、x はブロックに対応する入力画像11の画素値、y はブロックに対応する動き補償予測信号aの要素である。
【0026】
ステップS36では、x=1であるか否かの判断がなされる。この判断が肯定の時には、ステップS37に進んでSA(m)=0のブロック数N(k)と予測誤差電力MSE(k)を保持し、以降の処理のために、それぞれを、N(k’)、MSE(k’)とする。ステップS38ではkをk’と置き、ステップS39ではxに1を加算する。そして、前記ステップS33に進む。
【0027】
一方、前記ステップS36の判断が否定の時、すなわちステップS27の判断が肯定になった回数が2回以上の時には、ステップS40に進んで、SA(m)=0のブロック数N(k)が前回のSA(m)=0のブロック数N(k’)より大きいか否かの判断がなされる。この判断が肯定の時にはステップS41に進んで、N(k’)がN(k)に更新される。また、ステップS42に進んで、k’がkに更新される。
【0028】
さらに、前記ステップS40の判断が否定の時には、ステップS43に進んで、予測誤差電力MSE(k)が前回の予測誤差電力MSE(k’)より小さいか否かの判断がなされる。この判断が肯定の時には、ステップS44に進んでk’がkに更新される。ステップS40、S43の判断が共に否定の時には、何らの処理をされずに、ステップS33に進む。
【0029】
図3の処理により、ブロック数N(k’)が0でなくなると、図2のステップS28の判断は常に肯定となり、ステップS29〜S32はスキップしてステップS33に進むようになる。ステップS34の判断が肯定になると、ステップS35に進み、前記の処理により選択された符号化モードk’が、最終的に当該マクロブロックの符号化モードとして採用される。
【0030】
以上の説明から明らかなように、本実施形態では、DCTブロック符号化ビット数SA(m)が0になるDCTブロック数N(k)が閾値TH以上になる符号化モードkがあれば、これを優先し、SA(m)=0を満たすDCTブロック数N(k)が大きくかつ予測誤差電力MSE(k)が小さい符号化モードkを選択する。
【0031】
一方、SA(m)=0を満たすDCTブロック数N(k)が閾値TH以上になる符号化モードkがなければ、(DCTブロックの符号化ビット数SA(m)のマクロブロック合計+オーバヘッドビット数SB)を求め、それを最小とする符号化モードkを選択する。この結果、動画像符号化におけるマクロブロック単位の適応モード判定を、より厳密に行うことができるようになる。
【0032】
【発明の効果】
以上の説明から明らかなように、請求項1の発明によれば、動画像符号化におけるマクロブロック単位の適応モード判定を厳密に行うことができるようになり、圧縮符号化の効率をさらに向上させることができるようになる。
【0033】
また、請求項の発明によれば、DCTブロックの符号化ビット数は予測誤差信号の統計量から推定するようにしたので、前記の効果に加えて、リアルタイム処理を行うハードウェア規模を実現可能なレベルに抑えることができる。
【図面の簡単な説明】
【図1】 本発明の全体の動作を示す概略フローチャートである。
【図2】 図1のステップS5、S9、およびS13の詳細を示すフローチャートである。
【図3】 図2の続きのフローチャートである。
【図4】 入力画像信号の概念図である。
【図5】 矩形小領域(マクロブロック)の発生ビット数の説明図である。
【図6】 従来の圧縮符号化方式の概略の構成を示すブロック図である。
【図7】 符号化モードの説明図である。
【符号の説明】
11・・・入力画像信号、13・・・DCT部、14・・・量子化部、15・・・逆量子化部、16・・・逆DCT部、19・・・動き推定・動き補償部、20・・・可変長符号化部、21・・・バッファ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an optimum coding mode selection type moving image coding method, and more particularly to an optimum coding mode selection type moving image coding method capable of compressing and coding a moving image with high efficiency.
[0002]
[Prior art]
An example of a conventional video encoding device will be described with reference to FIG. The input image signal 11 is sent to a prediction signal subtracter 12 and a motion estimation / motion compensation unit 19. The prediction signal subtracter 12 subtracts the motion compensated prediction signal a from the input image signal 11 to obtain a prediction error signal b. The prediction error signal b is orthogonally transformed by a DCT (discrete cosine transform unit) unit 13 and quantized by a quantization unit 14 in order to obtain high coding efficiency. After that, it is converted into a variable length code such as Huffman coding by a variable length coding (VLC) unit 20, temporarily stored in the buffer 21, and then output as a bit stream 22. The quantization unit 14 calculates a quantization step for the next block based on the rate control signal from the buffer 21.
[0003]
Further, in order to use the same prediction signal as that on the decoding side, the quantization coefficient obtained by the quantization unit 14 is inversely quantized by the inverse quantization unit 15 and the prediction error signal is locally decoded by the inverse DCT unit 16. The This prediction error signal is added to the motion compensated prediction signal a restored by the motion estimation / motion compensation unit 19 by the local decoding adder 17 and sent to the frame memory 18.
[0004]
The motion estimation / compensation unit 19 restores the motion compensated prediction signal a, determines the motion vector MV, and selects an encoding mode. Here, for example, as shown in FIG. 7, the encoding mode is given for each I, P, and B picture by a combination of the reference method, the prediction type, and the DCT type, and is encoded in units of macroblocks. A mode can be selected.
[0005]
[Problems to be solved by the invention]
In the above-described conventional apparatus, the selection of the encoding mode is simply determined mechanically so as to minimize the sum of the absolute values or the variance of the prediction error signal b. For this reason, there is room for improvement with regard to compression coding of moving images with high efficiency.
[0006]
An object of the present invention is to further improve the efficiency of compression coding by performing adaptive mode determination in units of macroblocks in moving picture coding more strictly in accordance with the norm of coding bit number minimization in view of the above-described conventional technology. It is an object of the present invention to provide an optimal encoding mode selection type moving image encoding method.
[0007]
[Means for Solving the Problems]
In order to achieve the above-described object, the present invention provides an optimal coding mode selection type moving picture coding method that performs moving picture coding processing in units of rectangular small areas, and for each coded picture, motion compensated prediction is performed. A plurality of coding mode candidates defined by a combination of a reference method, a type of motion compensated prediction, and a type of orthogonal transform, means for determining an encoded picture of an image to be encoded, and the determined code Means for obtaining the number of coded bits of each of a plurality of DCT blocks forming the rectangular small area for each coding mode candidate of a coded picture, and the number of DCT blocks in which the number of coded bits is 0 in the rectangular small area Means for determining whether or not the threshold value is equal to or greater than a predetermined threshold value, and if there is a value that is equal to or greater than the threshold value as a result of the determination, a code that minimizes the prediction error power is encoded Determined as the mode, if there is nothing to be equal to or larger than the threshold value, it is characterized by what the sum of the number of coded bits and the number of overhead bits of the DCT blocks is small in that and means for determining a coding mode is there.
[0008]
According to this feature, it is possible to further improve the efficiency of compression encoding, and it is possible to compress and encode a moving image with high efficiency.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in more detail with reference to the drawings. 1, 2 and 3 are flowcharts showing the operation of one embodiment of the present invention, and FIG. 4 is a conceptual diagram of an input image to be compression-encoded. 1 to 3 show the motion compensation operation of the motion estimation / compensation unit of this embodiment.
[0010]
The operation of FIGS. 1 to 3 will be described with reference to FIG. As shown in the figure, Pi represents the i-th input image, and j represents the number of a rectangular small area, for example, a macroblock of 16 pixels × 16 lines. Assume that the total number of images is (N + 1), and the total number of macroblocks in one image is (M + 1).
[0011]
In step S1 of FIG. 1, i indicating the number of the input image is set to 0. In step S2, an image Pi is input. In step S3, it is determined whether the encoded picture of the image Pi is an I, P, or B picture. In the present embodiment, it is assumed that which picture the input image Pi is to be determined in advance. If the picture for the image Pi is an I picture, the process proceeds to step S4. If the picture is a P picture, the process proceeds to step S8. If the picture is a B picture, the process proceeds to step S12.
[0012]
If the coded picture of the image Pi is an I picture, j representing the number of the macroblock (16 pixels × 16 lines) is set to 0 in step S4. In step S5, the encoding mode of the j-th macroblock is selected by the method of the present invention described in detail later. In step S6, it is determined whether j = M is satisfied. When this determination is negative, the process proceeds to step S7, and 1 is added to j. Thereafter, the processes in steps S5 to S7 are repeatedly performed, and when the determination in step S6 becomes affirmative, the selection of the encoding mode of the image Pi is terminated, and the process proceeds to step S16. Note that the processes in steps S9 to S11 and the processes in steps S13 to S15 when the P picture is determined in step S3 and the process proceeds to step S8 and when the process is determined to be the B picture and the process proceeds to step S12 are as follows. Since it is the same as the process of steps S5 to S7, the description is omitted.
[0013]
In step S16, it is determined whether i = N, that is, whether or not compression coding of all images has been completed. If this determination is negative, the process proceeds to step S17, and 1 is added to i. Then, the next image processing is executed. On the other hand, if the determination in step S16 is affirmative, the series of compression encoding processing is terminated.
[0014]
Next, the operation of “macroblock MBj coding mode selection” in steps S5, S9 and S13 will be described with reference to the flowchart of FIG. 2 and the explanatory diagram of FIG.
[0015]
First, an outline of the present embodiment will be described. For simplicity, the video signal to be handled will be described only for the luminance signal. In this embodiment, as shown in FIG. 5, each macroblock MBj is decomposed into four DCT blocks B0 to B3, and for each coding mode, (1) the number of coding bits of each DCT block, (2) The number of overhead bits of the motion vector is calculated. In the present embodiment, the calculation of the DCT block coding bit number in (1) is not in time for real-time processing if it is calculated for each pixel. Based on m, variance σ 2 , and quantization step size Δ, the number of generated bits for each block is estimated from a known generated bit estimation function f (m, σ 2 , Δ). Also, the number of overhead bits of the motion vector (2) is calculated from a VLC table or the like.
[0016]
If there is one or more candidates in the macroblock where the number of coded bits of the DCT block is 0, or the majority of the DCT blocks have the number of coded bits of 0, this coding mode is set. After adopting preferentially, a coding error mode is determined as a coding error power that minimizes the prediction error power, that is, the sum of squares of the prediction error signal.
[0017]
On the other hand, if there is no such candidate, the number of bits generated in the macroblock is calculated from the number of encoded bits of the four DCT blocks and the number of other overhead bits for each encoding mode. The minimum one is determined as the encoding mode.
[0018]
As an example of the generated bit estimation function f (m, σ 2 , Δ), the following function determined by actual measurement by changing each quantization step size Δ can be used. For example, in the intra coding mode, f (m, σ 2 , Δ) = g (m) + a × log 2 σ 2 + b can be used. Here, the function g (m) is the number of generated bits estimated from the average value m of the prediction error signal serving as the DCT input, and {a × log 2 σ 2 + b} is generated from the variance value σ 2. The number of bits. Note that a and b are constants and are determined based on experimental results. In the inter coding mode, f (m, σ 2 , Δ) = a × log 2 σ 2 + b can be used with g (m) = 0.
[0019]
In step S21 of FIG. 2, N (k ′) representing the number of blocks is set to 0, a certain number x is set to 1, and a candidate encoding mode k is set to 0 in step S22. Here, the candidate encoding mode corresponds to k in FIG. 7, the I picture has 2 candidates (k = 0 to 1), the P picture has 6 candidates (k = 0 to 5), and the B picture has 14 candidates. It becomes a candidate (k = 0 to 13).
[0020]
In step S23, the motion vector MV of the encoding mode k of the macroblock MBj is acquired. In step S24, a prediction error signal of the macro block MBj is acquired. In step S25, the number of DCT block encoded bits SA (m) (m = 0 to 3) is estimated based on the prediction error signal. This estimation is performed using the generated bit estimation function f (m, σ 2 , Δ). In step S26, the estimated number N (k) of blocks in which the estimated DCT block coding bit number SA (m) is SA (m) = 0 is counted. Since the number of DCT blocks per macroblock is 4, the number of blocks N (k) at which SA (m) = 0 is 4 at maximum.
[0021]
In step S27, it is determined whether or not the number of blocks N (k) for which SA (m) = 0 is greater than a certain threshold value TH. Since this determination is a determination as to whether or not most of the DCT blocks whose number of encoded bits is 0 occupy, 2 or 3 is preferable as the threshold value TH. In the following description, it is assumed that TH = 2.
[0022]
If the determination in step S27 is negative, the process proceeds to step S28 to determine whether N (k ′)> 0 is satisfied. If N (k ′) = 0, it is determined as negative and the process proceeds to step S29, where the number of overhead bits SB is calculated. In step S30, (the total number of macroblocks of the number of coded bits SA (m) SA (m) of the DCT block + the number of overhead bits SB) is obtained, and this is set as ST (k). When the encoded picture of the image Pi (determination in step S3) is intra-frame encoding (I picture), the DCT block encoding bit number estimation target is all AC coefficients excluding the DC coefficient, and the DC coefficient Is included in the number of overhead bits.
[0023]
In step S31, it is determined whether or not the minimum value of ST (k) has been updated. When this determination is affirmative, the process proceeds to step S32, and k of minST (k) is held. This k is k ′. When the determination in step S31 is negative, or when the process in step S32 ends, the process proceeds to step S33, and 1 is added to k to update the encoding mode to be evaluated. In step S34, k is determined whether or not becomes equal to k max is made. That is, the k max = 13 if k max = 5, B-picture if k max = 1, P-picture if the I picture. When the determination in step S34 is negative, the process returns to step S23, and the operation for acquiring the motion vector MV in the next coding mode is performed.
[0024]
Next, the operation when the number of blocks N (k) where SA (m) = 0 is 3 or 4 and the determination in step S27 is affirmative will be described with reference to FIG.
[0025]
In step S35, the prediction error power of the four DCT blocks is calculated from Σ (x i −y i ) 2 (where i = 0 to N−1, N is the number of pixels in the DCT block), and the calculation is performed. Place the result as MSE (k). Here, x i is a pixel value of the input image 11 corresponding to the block, and y i is an element of the motion compensated prediction signal a corresponding to the block.
[0026]
In step S36, it is determined whether x = 1. When this determination is affirmative, the process proceeds to step S37, where the number of blocks N (k) of SA (m) = 0 and the prediction error power MSE (k) are held, and for the subsequent processing, N (k ') And MSE (k'). In step S38, k is set as k ', and in step S39, 1 is added to x. Then, the process proceeds to step S33.
[0027]
On the other hand, when the determination in step S36 is negative, that is, when the determination in step S27 is affirmative twice or more, the process proceeds to step S40, and the number of blocks N (k) with SA (m) = 0 is obtained. It is determined whether or not the previous SA (m) = 0 is greater than the number of blocks N (k ′). When this determination is affirmative, the process proceeds to step S41, where N (k ′) is updated to N (k). Moreover, it progresses to step S42 and k 'is updated to k.
[0028]
Further, when the determination in step S40 is negative, the process proceeds to step S43, and it is determined whether or not the prediction error power MSE (k) is smaller than the previous prediction error power MSE (k ′). When this determination is affirmative, the process proceeds to step S44 where k ′ is updated to k. When the determinations in steps S40 and S43 are both negative, the process proceeds to step S33 without performing any processing.
[0029]
When the number of blocks N (k ′) is not 0 by the process of FIG. 3, the determination in step S28 of FIG. 2 is always affirmative, and steps S29 to S32 are skipped and the process proceeds to step S33. If the determination in step S34 is affirmative, the process proceeds to step S35, and the encoding mode k ′ selected by the above processing is finally adopted as the encoding mode of the macroblock.
[0030]
As is apparent from the above description, in the present embodiment, if there is an encoding mode k in which the DCT block number N (k) where the number of DCT block encoded bits SA (m) is 0 is greater than or equal to the threshold value TH, , And a coding mode k having a large number of DCT blocks N (k) satisfying SA (m) = 0 and a small prediction error power MSE (k) is selected.
[0031]
On the other hand, if there is no coding mode k in which the number N (k) of DCT blocks satisfying SA (m) = 0 is equal to or greater than the threshold value TH, (the total number of macroblocks plus the overhead bits of the number of coding bits SA (m) of the DCT block) The number SB) is obtained and the encoding mode k that minimizes it is selected. As a result, it becomes possible to more precisely perform the adaptive mode determination for each macroblock in moving picture coding.
[0032]
【The invention's effect】
As is clear from the above description, according to the invention of claim 1, it becomes possible to strictly perform the adaptive mode determination for each macroblock in moving picture coding, and further improve the efficiency of compression coding. Will be able to.
[0033]
Also, according to the invention of claim 2, since the number of coding bits of the DCT block is estimated from the statistical amount of the prediction error signal, in addition to the above effect, a hardware scale for performing real-time processing can be realized. Can be suppressed to a certain level.
[Brief description of the drawings]
FIG. 1 is a schematic flowchart showing the overall operation of the present invention.
FIG. 2 is a flowchart showing details of steps S5, S9, and S13 in FIG.
FIG. 3 is a flowchart continued from FIG. 2;
FIG. 4 is a conceptual diagram of an input image signal.
FIG. 5 is an explanatory diagram of the number of bits generated in a rectangular small area (macroblock);
FIG. 6 is a block diagram showing a schematic configuration of a conventional compression encoding method.
FIG. 7 is an explanatory diagram of an encoding mode.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... Input image signal, 13 ... DCT part, 14 ... Quantization part, 15 ... Inverse quantization part, 16 ... Inverse DCT part, 19 ... Motion estimation / motion compensation part , 20... Variable length encoding unit, 21... Buffer.

Claims (2)

矩形小領域単位で動画像の符号化処理を行う最適符号化モード選択型動画像符号化方式であって、
各符号化ピクチャにつき、動き補償予測の参照方式、動き補償予測のタイプ、および直交変換のタイプの組み合わせにより規定される複数の符号化モード候補と、
符号化処理を行う画像の符号化ピクチャを決定する手段と、
前記決定された符号化ピクチャの符号化モード候補毎に、前記矩形小領域を形成する複数のDCTブロックの各符号化ビット数を求める手段と、
前記矩形小領域内で符号化ビット数が0となるDCTブロックの個数が予め定められた閾値以上になったかどうかを判断する手段と、
前記判断により前記閾値以上になるものがあった場合には、予測誤差電力が最小となるものを符号化モードとして決定し、前記閾値以上になるものがない場合には、DCTブロックの符号化ビット数とオーバヘッドビット数との和が小さいものを符号化モードとして決定する手段とを具備したことを特徴とする最適符号化モード選択型動画像符号化方式。
An optimal encoding mode selection type video encoding method for encoding video in units of rectangular small areas,
For each coded picture, a plurality of coding mode candidates defined by a combination of a motion compensation prediction reference scheme, a motion compensated prediction type, and an orthogonal transform type;
Means for determining an encoded picture of an image to be encoded;
Means for determining the number of encoded bits of a plurality of DCT blocks forming the rectangular small region for each encoding mode candidate of the determined encoded picture;
Means for determining whether or not the number of DCT blocks in which the number of encoded bits is 0 in the rectangular small area is equal to or greater than a predetermined threshold;
If there is a value that is equal to or greater than the threshold value as a result of the determination, a coding mode that minimizes the prediction error power is determined as the coding mode. An optimum coding mode selection type moving picture coding system comprising: means for determining a coding mode having a smaller sum of the number and the number of overhead bits .
請求項1に記載の最適符号化モード選択型動画像符号化方式において、
前記DCTブロックの符号化ビット数は、各符号化モードの予測誤差信号の統計量である平均値、分散および量子化ステップサイズから推定することを特徴とする最適符号化モード選択型動画像符号化方式。
In the optimal encoding mode selection type moving image encoding system according to claim 1,
The number of coding bits of the DCT block is estimated from an average value, a variance, and a quantization step size, which are statistics of a prediction error signal in each coding mode, and optimal coding mode selection type moving picture coding characterized in that method.
JP2001350668A 2001-11-15 2001-11-15 Optimal coding mode selection type moving picture coding system Expired - Fee Related JP3938679B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001350668A JP3938679B2 (en) 2001-11-15 2001-11-15 Optimal coding mode selection type moving picture coding system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001350668A JP3938679B2 (en) 2001-11-15 2001-11-15 Optimal coding mode selection type moving picture coding system

Publications (2)

Publication Number Publication Date
JP2003153280A JP2003153280A (en) 2003-05-23
JP3938679B2 true JP3938679B2 (en) 2007-06-27

Family

ID=19163122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001350668A Expired - Fee Related JP3938679B2 (en) 2001-11-15 2001-11-15 Optimal coding mode selection type moving picture coding system

Country Status (1)

Country Link
JP (1) JP3938679B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005151391A (en) 2003-11-19 2005-06-09 Toshiba Corp Method and apparatus for coding moving image, and program
JP4127818B2 (en) 2003-12-24 2008-07-30 株式会社東芝 Video coding method and apparatus

Also Published As

Publication number Publication date
JP2003153280A (en) 2003-05-23

Similar Documents

Publication Publication Date Title
JP4851741B2 (en) Method and apparatus for encoding a sequence of source images
JP2001061154A (en) Image prediction decoding method
JP2003348583A (en) Method of adaptively encoding and decoding motion image and apparatus therefor
JP2006157881A (en) Variable-length coding device and method of same
JPH08512188A (en) How to determine whether to intra code a video block
JP4417054B2 (en) Motion estimation method and apparatus referring to discrete cosine transform coefficient
KR100727988B1 (en) Method and apparatus for predicting DC coefficient in transform domain
JP4130617B2 (en) Moving picture coding method and moving picture coding apparatus
JP2011091772A (en) Image encoder
JP5136470B2 (en) Moving picture coding apparatus and moving picture coding method
JP4532607B2 (en) Apparatus and method for selecting a coding mode in a block-based coding system
US6141449A (en) Coding mode determination system
JP3938679B2 (en) Optimal coding mode selection type moving picture coding system
KR100359819B1 (en) An Efficient Edge Prediction Methods In Spatial Domain Of Video Coding
JP2001309384A (en) Picture compressor
KR101639434B1 (en) Wyner-Ziv coding and decoding system and method
JP2000261809A (en) Image coder coping with feature of picture
JP3690259B2 (en) High-speed moving image encoding apparatus and high-speed moving image encoding method
JP4642033B2 (en) A method for obtaining a reference block of an image by an encoding method in which the number of reference frames is fixed.
JP2003032691A (en) Picture coding device corresponding to picture feature
KR100778473B1 (en) Bit rate control method
JP4222046B2 (en) Signal processing apparatus and method, recording medium, and program
JP2008153802A (en) Moving picture encoding device and moving picture encoding program
KR20090037288A (en) Method for real-time scene-change detection for rate control of video encoder, method for enhancing qulity of video telecommunication using the same, and system for the video telecommunication
JPH11205801A (en) Dynamic image coder and its coding selection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040922

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061227

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070223

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070323

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20160406

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees