JP2003235044A - Moving picture encoding method, moving picture decoding method, execution programs for the methods, and recording medium with the execution programs recorded thereon - Google Patents

Moving picture encoding method, moving picture decoding method, execution programs for the methods, and recording medium with the execution programs recorded thereon

Info

Publication number
JP2003235044A
JP2003235044A JP2002032179A JP2002032179A JP2003235044A JP 2003235044 A JP2003235044 A JP 2003235044A JP 2002032179 A JP2002032179 A JP 2002032179A JP 2002032179 A JP2002032179 A JP 2002032179A JP 2003235044 A JP2003235044 A JP 2003235044A
Authority
JP
Japan
Prior art keywords
occurrence frequency
frame
coding
decoding
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002032179A
Other languages
Japanese (ja)
Other versions
JP3864098B2 (en
Inventor
Hideaki Kimata
英明 木全
Yoshiyuki Yashima
由幸 八島
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2002032179A priority Critical patent/JP3864098B2/en
Publication of JP2003235044A publication Critical patent/JP2003235044A/en
Application granted granted Critical
Publication of JP3864098B2 publication Critical patent/JP3864098B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To encode/decode encoded data with a high encoding efficiency by using incidence frequency information by each Context Model. <P>SOLUTION: With the Context Model and an arithmetic encoding section 104 used, a moving picture is encoded. In this case, the method employs an incidence frequency initializing section 106 for setting an incidence frequency of the Context Model to a pre-designated value at start of frame or field encoding, an incidence storage section 105 for storing the incidence frequency of the Context Model at the end of frame or field encoding, and an incidence frequency designation section 107 for setting the incidence frequency of the Context Model to the incidence frequency stored in the incidence storage section 105 at the start of frame or field encoding to select the use of the incidence frequency initializing section 106 or the incidence frequency designation section 107 at the start of frame or field encoding. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、動画像符号化及び
動画像復号に関する技術である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique relating to moving picture coding and moving picture decoding.

【0002】[0002]

【従来の技術】一般的に動画像符号化では時間方向の相
関を使って高い符号化効率を実現するため、フレーム間
予測符号化を用いている。フレームの符号化モードに
は、フレーム間の相関を使わずに符号化するIフレーム
と、過去に符号化した1フレームから予測するPフレー
ムと、過去に符号化した2フレームから予測することが
できるBフレームがある。Pフレームでは、Iフレーム
またはPフレームから予測し、Bフレームでは、Iフレ
ームまたはPフレームまたはBフレームから予測するこ
とができる。特に映像符号化方式H.263では参照画
像メモリに複数フレーム分の復号画像を蓄積しておき、
そのメモリから参照画像を選択して予測することができ
る。
2. Description of the Related Art Generally, in moving picture coding, interframe predictive coding is used in order to realize high coding efficiency by using correlation in the time direction. The frame coding mode can be predicted from an I frame that is coded without using correlation between frames, a P frame that is predicted from one frame that has been coded in the past, and a two frame that has been coded in the past. There is a B frame. P-frames can be predicted from I-frames or P-frames, and B-frames can be predicted from I-frames or P-frames or B-frames. In particular, the video coding method H.264. In 263, decoded images for a plurality of frames are stored in the reference image memory,
A reference image can be selected and predicted from the memory.

【0003】また、Pフレームは入力動画像における時
間を過去のフレームから予測するが、Bフレームでは過
去のフレームだけではなく未来のフレームから予測する
ことができる。
Further, while the P frame predicts the time in the input moving image from the past frame, the B frame can predict not only the past frame but also the future frame.

【0004】図7−(a)に動画像の予測関係の例を示
す。Bフレームで2フレームから予測する場合(両方向
予測)には、2フレームからの画像情報を補間して、1
フレーム分の画像情報を作成して予測画像を作成する。
第1フレームから第7フレームの符号化モードをIBB
PBBPの順序で符号化する場合には、図7−(a)に
示す予測関係があるため、実際に符号化する場合には、
図7−(b)に示すように1423756の順序でフレ
ームを符号化する。
FIG. 7- (a) shows an example of the prediction relationship of moving images. When the B frame is predicted from two frames (bidirectional prediction), the image information from the two frames is interpolated to
A predicted image is created by creating image information for frames.
The coding modes of the first frame to the seventh frame are set to IBB.
When encoding in the order of PBBP, the prediction relationship shown in FIG.
As shown in FIG. 7- (b), the frames are coded in the order of 1423756.

【0005】また、Iフレームを先頭にしたフレームの
集合をGOPに設定することにより、GOP単位の符号
化データのランダムアクセス機能を容易に実現できる。
GOPは、特定のフレームまたはフィールドの符号化デ
ータの前に、GOP先頭であることを示す情報を含める
ことによって、そのフレームまたはフィールドが、その
フレームまたはフィールド以降の複数フレームまたはフ
ィールドで構成されるGOPの先頭であることを指定す
ることが可能である。MPEG−2では特有なビットパ
ターンを持つ符号を挿入することによりGOPの先頭で
あることを指定する。GOPの先頭であることを示す符
号間で1GOPの符号化データを構成することができ
る。なお、符号化データ中にGOPの先頭であることを
示す情報を符号化するのではなく、符号化データ外でG
OP構成情報を指定することも可能である。
Further, by setting a set of frames having an I frame as a head in a GOP, a random access function of coded data in GOP units can be easily realized.
A GOP is a GOP in which the frame or field is composed of a plurality of frames or fields subsequent to the frame or field by including information indicating the beginning of the GOP before the encoded data of the specific frame or field. It is possible to specify that it is the beginning of. In MPEG-2, a code having a unique bit pattern is inserted to specify that it is the head of a GOP. The coded data of 1 GOP can be formed between the codes indicating the head of the GOP. Note that the information indicating the beginning of the GOP is not encoded in the encoded data, but G is encoded outside the encoded data.
It is also possible to specify OP configuration information.

【0006】また、インタレース動画像は1フレーム内
に2フィールド持つ構成となるが、同様に各フィールド
毎に予測関係を設定することができる。
Further, the interlaced moving image has two fields in one frame, but similarly, a prediction relationship can be set for each field.

【0007】さらに画像を分割した、例えばマクロブロ
ックのような領域毎に、これらの符号化モードを指定す
ることができる。映像符号化方式H.263では、Iフ
レーム内ではフレーム内画像情報のみを使って符号化す
るIマクロブロックのみある。Pフレーム内ではIマク
ロブロックの他に過去に符号化した1フレームから予測
するPマクロブロックがある。マクロブロック毎に参照
する画像を変更することも可能である。Bフレーム内で
は、Iマクロブロックの他にBマクロブロックがある。
BマクロブロックではPマクロブロックと同様に過去に
符号化した1フレームから予測する前方向予測モードま
たは逆方向予測モードと、2フレームから予測する両方
向予測モードがある。
Further, these coding modes can be designated for each area such as a macroblock into which the image is divided. Video coding method H.264 In H.263, there are only I macroblocks that are coded using only intraframe image information within an I frame. In the P frame, there is a P macroblock predicted from one frame encoded in the past in addition to the I macroblock. It is also possible to change the image referred to for each macroblock. Within a B frame, there are B macroblocks in addition to I macroblocks.
Similar to the P macroblock, the B macroblock has a forward prediction mode or backward prediction mode for predicting from one frame encoded in the past, and a bidirectional prediction mode for predicting from two frames.

【0008】また、各フレームの符号化情報をエントロ
ピー符号化する方法に算術符号化を使う方法がある。J
BIGやJBIG2やJPEG2000では、符号化シ
ンボル毎に2値化してContext Modelを設
定し、Context Model毎の発生頻度情報を
使って符号化データを符号化する。ITU−T勧告の動
画像符号化方式H.264(現時点ではH.26Lと呼
ばれている)のテストモデルTML−9では、フレーム
毎にマクロブロック符号化シンボルにContext
Modelを設定して算術符号化する方法が規定されて
いる。発生頻度情報としては、例えばJBIG2では国
際標準文書(ISO/IEC 14492)に記載の、
Qe値とA−registerとC−register
の値が該当する。
There is a method of using arithmetic coding as a method of entropy coding the coding information of each frame. J
In BIG, JBIG2, and JPEG2000, binarization is performed for each encoded symbol to set a Context Model, and encoded data is encoded using the occurrence frequency information for each Context Model. ITU-T recommended moving picture coding method H.264. In the test model TML-9 of H.264 (currently called H.26L), a Context is added to a macroblock coded symbol for each frame.
A method for setting Model and performing arithmetic coding is specified. As the occurrence frequency information, for example, in JBIG2, an international standard document (ISO / IEC 14492) is described.
Qe value, A-register and C-register
Is applicable.

【0009】これらの映像符号化方法ではフレーム毎に
Context Modelの発生頻度情報を初期化し
て算術符号化する。Context Modelの発生
頻度はフレーム内でマクロブロック番号が大きくなるほ
ど安定するため符号化効率が高くなる。
In these video encoding methods, the occurrence frequency information of the Context Model is initialized for each frame and arithmetically encoded. The occurrence frequency of the Context Model becomes more stable as the macroblock number in the frame increases, so that the coding efficiency increases.

【0010】[0010]

【発明が解決しようとする課題】時間方向の相関性が高
いフレーム間では、Context Model毎の発
生確率も相関性が高い。従来のようにフレーム毎に初期
化をする方法では、フレーム後半で安定した発生頻度に
なっているにも関わらず、次のフレームの先頭では初期
値を使うため符号化効率が低下する問題がある。
[Problems to be Solved by the Invention] Between frames having a high correlation in the time direction, the occurrence probability of each Context Model also has a high correlation. The conventional method of initializing each frame has a problem that the initial value is used at the beginning of the next frame, but the coding efficiency is reduced, although the frequency of occurrence is stable in the latter half of the frame. .

【0011】本発明は、上記従来の問題点を解決し、C
ontext Model毎の発生頻度情報を使って、
高い符号化効率で符号化データを符号化し、復号するこ
とができる動画像符号化方法と装置、及び動画像復号方
法と装置を提供することを課題とする。
The present invention solves the above-mentioned conventional problems, and
Using the occurrence frequency information for each text model,
An object of the present invention is to provide a moving picture coding method and apparatus, and a moving picture decoding method and apparatus that can code and decode coded data with high coding efficiency.

【0012】[0012]

【課題を解決するための手段】以上の課題を解決するた
め、請求項1の発明は、Context Modelを
使った算術符号化を使用して動画像を符号化する方法で
あって、フレームまたはフィールドの符号化開始時にC
ontext Modelの発生頻度を、予め指定され
た値に設定する発生頻度初期化手段と、フレームまたは
フィールドの符号化終了時にContext Mode
lの発生頻度を蓄積する発生頻度蓄積手段と、フレーム
またはフィールドの符号化開始時にContext M
odelの発生頻度を、前記発生頻度蓄積手段で蓄積さ
れた発生頻度に設定する発生頻度指定手段と、を用い、
フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段の、何れを使用する
かを選択する特徴とする。
In order to solve the above problems, the invention of claim 1 is a method for coding a moving image by using arithmetic coding using a Context Model, which is a frame or field. C at the start of encoding
Occurrence frequency initialization means for setting the occurrence frequency of the Context Model to a predetermined value, and Context Mode at the end of encoding of the frame or field.
occurrence frequency accumulating means for accumulating the occurrence frequency of l, and Context M at the start of encoding of the frame or field.
and an occurrence frequency specifying means for setting the occurrence frequency of the odel to the occurrence frequency accumulated by the occurrence frequency accumulating means,
A feature is that, at the start of coding of a frame or a field, which one of the occurrence frequency initialization means and the occurrence frequency designation means is used is selected.

【0013】また、請求項2の発明は、請求項1に記載
の動画像符号化方法であって、発生頻度初期化手段また
は発生頻度指定手段の、どちらを使用したのかを示す情
報を符号化する特徴とする。
The invention of claim 2 is the moving picture coding method according to claim 1, wherein information indicating which of the occurrence frequency initialization means and the occurrence frequency designation means is used is coded. It is a feature to do.

【0014】また、請求項3の発明は、請求項1に記載
の動画像符号化方法であって、フレームまたはフィール
ドの符号化開始時に、発生頻度初期化手段または発生頻
度指定手段の、何れを使用するかを選択するにあたり、
フレーム内符号化したフレームまたはフィールドの符号
化開始時には発生頻度初期化手段を使用し、フレーム間
符号化したフレームまたはフィールドの符号化開始時に
は発生頻度指定手段を使用する特徴とする。
The invention of claim 3 is the moving picture coding method according to claim 1, wherein either the occurrence frequency initialization means or the occurrence frequency designating means is used at the start of coding of the frame or field. In choosing whether to use,
It is characterized in that the occurrence frequency initialization means is used at the start of coding of the intra-frame coded frame or field, and the occurrence frequency designating means is used at the start of coding of the inter-frame coded frame or field.

【0015】また、請求項4の発明は、請求項1に記載
の動画像符号化方法であって、フレームまたはフィール
ドの符号化開始時に、発生頻度初期化手段または発生頻
度指定手段の、何れを使用するかを選択するにあたり、
複数のフレームを符号化データ中の1つの構成単位とし
て指定するGOP指定手段を用い、GOP指定手段で指
定される構成単位の先頭フレームまたはフィールドの符
号化開始時には発生頻度初期化手段を使用し、構成単位
内の途中のフレームまたはフィールドの符号化開始時に
は発生頻度指定手段を使用する特徴とする。
The invention of claim 4 is the moving picture coding method according to claim 1, wherein either the occurrence frequency initialization means or the occurrence frequency designating means is used at the start of coding of the frame or field. In choosing whether to use,
GOP designating means for designating a plurality of frames as one constituent unit in the encoded data is used, and occurrence frequency initialization means is used at the start of coding the first frame or field of the constituent unit designated by the GOP designating means, A feature is that the occurrence frequency designating means is used at the start of coding of a frame or field in the middle of a constituent unit.

【0016】また、請求項5の発明は、Context
Modelを使った算術符号化を使用して動画像を符
号化する方法であって、フレームまたはフィールドの符
号化開始時にContext Modelの発生頻度
を、予め指定された値に設定する発生頻度初期化手段
と、フレームまたはフィールドの符号化終了時にCon
text Modelの発生頻度を蓄積する発生頻度蓄
積手段と、フレームまたはフィールドの符号化開始時に
Context Modelの発生頻度を、前記発生類
度蓄積手段で蓄積された発生頻度に設定する発生頻度指
定手段と、フレームまたはフィールドの符号化終了時に
前記発生頻度蓄積手段によって蓄積されている発生頻度
情報を複写して蓄積する発生頻度予備蓄積手段と、フレ
ームまたはフィールドの符号化開始時にContext
Modelの発生頻度を、前記発生頻度予備蓄積手段
で蓄積された発生頻度に設定する発生頻度予備指定手段
と、を用い、フレームまたはフィールドの符号化開始時
に、発生頻度初期化手段または発生頻度指定手段または
発生頻度予備指定手段の、何れを使用するかを選択する
特徴とする。
The invention of claim 5 is the context.
A method for encoding a moving image using arithmetic encoding using a model, wherein an occurrence frequency initialization means for setting the occurrence frequency of a Context Model to a prespecified value at the start of encoding a frame or field. And Con at the end of encoding the frame or field
an occurrence frequency accumulating means for accumulating the occurrence frequency of the text model, and an occurrence frequency specifying means for setting the occurrence frequency of the context model at the start of encoding the frame or field to the occurrence frequency accumulated by the occurrence degree accumulating means. Occurrence frequency preliminary accumulating means for copying and accumulating the occurrence frequency information accumulated by the occurrence frequency accumulating means at the end of encoding of the frame or field, and Context at the start of encoding of the frame or field.
An occurrence frequency preliminary designating unit that sets the occurrence frequency of the Model to the occurrence frequency accumulated by the occurrence frequency preliminary accumulating unit, and uses the occurrence frequency initializing unit or the occurrence frequency designating unit at the start of encoding the frame or field. Alternatively, it is characterized in that which of the occurrence frequency preliminary designation means is used is selected.

【0017】また、請求項6の発明は、請求項5に記載
の動画像符号化方法であって、フレームまたはフィール
ドの符号化開始時に、発生頻度初期化手段または発生頻
度指定手段または発生頻度予備指定手段の、何れを使用
したのかを示す情報を符号化する特徴とする。
The invention of claim 6 is the moving picture coding method according to claim 5, wherein the occurrence frequency initialization means, the occurrence frequency designation means, or the occurrence frequency preliminary means is set at the start of coding of the frame or field. A feature is that information indicating which of the designating means is used is encoded.

【0018】また、請求項7の発明は、Context
Modelを使った算術符号化を使用して動画像を符
号化する方法であって、フレームまたはフィールドの符
号化モードとして、フレーム内符号化、前方向予測フレ
ーム間符号化、両方向予測フレーム間符号化の、何れか
を選択でき、フレームまたはフィールドの符号化開始時
にContext Modelの発生頻度を、予め指定
された値に設定する発生頻度初期化手段と、フレーム内
符号化または前方向予測フレーム間符号化を使用した、
フレームまたはフィールドの符号化終了時にConte
xt Modelの発生頻度を蓄積する発生頻度蓄積手
段と、両方向予測フレーム間符号化を使用した、フレー
ムまたはフィールドの符号化終了時にContext
Modelの発生頻度を蓄積する発生頻度両方向蓄積手
段と、フレームまたはフィールドの符号化開始時にCo
ntext Modelの発生類度を、前記発生頻度蓄
積手段で蓄積された発生頻度に設定する発生頻度指定手
段と、両方向予測フレーム間符号化を使用した、フレー
ムまたはフィールドの符号化開始時にContext
Modelの発生頻度を、前記発生頻度両方向蓄積手段
で蓄積された発生頻度に設定する発生頻度両方向指定手
段と、を用い、フレーム内符号化または前方向予測フレ
ーム間符号化を使用した、フレームまたはフィールドの
符号化開始時には、発生頻度初期化手段または発生頻度
指定手段の、何れを使用するかを選択し、両方向予測フ
レーム間符号化を使用した、フレームまたはフィールド
の符号化開始時には、発生頻度初期化手段または発生頻
度指定手段または発生頻度両方向指定手段の、何れを使
用するかを選択する特徴とする。
The invention of claim 7 is a context.
A method for encoding a moving image using arithmetic encoding using a model, wherein intraframe encoding, forward predictive interframe encoding, bidirectional predictive interframe encoding is used as a frame or field encoding mode. , Which can be selected, and the occurrence frequency initialization means for setting the occurrence frequency of the Context Model to a predetermined value at the start of encoding the frame or field, and intraframe coding or forward prediction interframe coding. It was used,
Conte at the end of encoding the frame or field
Occurrence frequency accumulating means for accumulating the occurrence frequency of xt Model, and Context at the end of encoding of a frame or field using bidirectional prediction interframe encoding
An occurrence frequency bidirectional accumulating means for accumulating the occurrence frequency of the model, and Co at the start of encoding of the frame or field
Occurrence frequency designating means for setting the occurrence degree of the Context Model to the occurrence frequency accumulated by the occurrence frequency accumulating means, and Context at the start of frame or field encoding using bidirectional prediction interframe encoding.
A frame or field using intra-frame coding or forward prediction inter-frame coding by using the occurrence frequency bidirectional designating means for setting the occurrence frequency of the Model to the occurrence frequency accumulated by the occurrence frequency bidirectional accumulating means. At the start of encoding, the selection is made between the occurrence frequency initialization means and the occurrence frequency designating means, and the bidirectional prediction interframe coding is used. It is characterized in that which of the means, the occurrence frequency designating means, and the occurrence frequency bidirectional designation means is used is selected.

【0019】また、請求項8の発明は、請求項7に記載
の動画像符号化方法であって、フレームまたはフィール
ドの符号化開始時に、発生頻度初期化手段または発生頻
度指定手段または発生頻度両方向指定手段の、何れを使
用したのかを示す情報を符号化する特徴とする。
The invention of claim 8 is the moving picture coding method according to claim 7, wherein the occurrence frequency initializing means, the occurrence frequency designating means, or the occurrence frequency bidirectional at the start of coding of the frame or field. A feature is that information indicating which of the designation means is used is encoded.

【0020】また、請求項9の発明は、Context
Modelを使った算術符号化を使用して動画像符号
化データを復号する方法であって、フレームまたはフィ
ールドの復号開始時にContext Modelの発
生頻度を、予め指定された値に設定する発生頻度初期化
手段と、フレームまたはフィールドの復号終了時にCo
ntext Modelの発生頻度を蓄積する発生頻度
蓄積手段と、フレームまたはフィールドの復号開始時に
Context Modelの発生頻度を、前記発生頻
度蓄積手段で蓄積された発生頻度に設定する発生頻度指
定手段と、を用い、フレームまたはフィールドの復号開
始時に、発生頻度初期化手段または発生頻度指定手段
の、何れを使用するかを選択する特徴とする。
Further, the invention of claim 9 is a context.
A method for decoding moving image coded data using arithmetic coding using a model, wherein the occurrence frequency of a Context Model is set to a predetermined value at the start of decoding a frame or field. Means and Co at the end of decoding the frame or field
An occurrence frequency accumulating means for accumulating the occurrence frequency of the Context Model, and an occurrence frequency specifying means for setting the occurrence frequency of the Context Model at the start of decoding the frame or field to the occurrence frequency accumulated by the occurrence frequency accumulating means. The feature is that, when decoding of a frame or a field is started, either the occurrence frequency initialization means or the occurrence frequency designation means is selected.

【0021】また、請求項10の発明は、請求項9に記
載の動画像復号方法であって、フレームまたはフィール
ドの復号開始時に、発生頻度初期化手段または発生頻度
指定手段の、何れを使用するかを選択するにあたり、フ
レームまたはフィールドの復号開始時に、発生頻度初期
化手段または発生頻度指定手段の、何れを使用して復号
できるのかを示す符号化情報を復号し、その情報に従っ
て選択する特徴とする。
Further, the invention of claim 10 is the moving picture decoding method according to claim 9, wherein either the occurrence frequency initialization means or the occurrence frequency designating means is used at the time of starting the decoding of the frame or field. In selecting one of the following, at the start of decoding the frame or field, the coding information indicating which of the occurrence frequency initialization means or the occurrence frequency designating means can be used for decoding is decoded, and the characteristic is selected according to the information. To do.

【0022】また、請求項11の発明は、Contex
t Modelを使った算術符号化を使用して動画像符
号化データを復号する方法であって、フレームまたはフ
ィールドの復号開始時にContext Modelの
発生頻度を、予め指定された値に設定する発生頻度初期
化手段と、フレームまたはフィールドの復号終了時にC
ontext Modelの発生頻度を蓄積する発生頻
度蓄積手段と、フレームまたはフィールドの復号開始時
にContext Modelの発生頻度を、前記発生
頻度蓄積手段で蓄積された発生頻度に設定する発生頻度
指定手段と、を用い、フレームまたはフィールドの復号
開始時に、そのフレームまたはフィールドの符号化モー
ド、またはGOPの先頭かどうかの情報に従って、発生
頻度初期化手段または発生頻度指定手段の、何れを使用
するかを選択する特徴とする。
The invention of claim 11 is the context.
A method for decoding moving image coded data using arithmetic coding using t Model, wherein the occurrence frequency of Context Model is set to a predetermined value at the start of decoding a frame or field. And C at the end of decoding the frame or field
An occurrence frequency accumulating unit that accumulates the occurrence frequency of the Context Model, and an occurrence frequency specifying unit that sets the occurrence frequency of the Context Model at the start of decoding the frame or field to the occurrence frequency accumulated by the occurrence frequency accumulating unit. , At the start of decoding a frame or field, which of the occurrence frequency initialization means or the occurrence frequency designation means is used is selected according to the encoding mode of the frame or field or the information on whether it is the head of the GOP. To do.

【0023】また、請求項12の発明は、Contex
t Modelを使った算術符号化を使用して動画像符
号化データを復号する方法であって、フレームまたはフ
ィールドの復号開始時にContext Modelの
発生頻度を、予め指定された値に設定する発生頻度初期
化手段と、フレームまたはフィールドの復号終了時にC
ontext Modelの発生頻度を蓄積する発生頻
度蓄積手段と、フレームまたはフィールドの復号開始時
にContext Modelの発生頻度を、前記発生
頻度蓄積手段で蓄積された発生頻度に設定する発生頻度
指定手段と、フレームまたはフィールドの復号終了時
に、前記発生頻度蓄積手段によって蓄積されている発生
頻度情報を複写して蓄積する発生頻度予備蓄積手段と、
フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、前記発生頻度予備蓄積手
段で蓄積された発生頻度に設定する発生頻度予備指定手
段と、を用い、フレームまたはフィールドの復号開始時
に、発生頻度初期化手段または発生頻度指定手段または
発生頻度予備指定手段の、何れを使用するかを選択する
特徴とする。
The invention of claim 12 is the context
A method for decoding moving image coded data using arithmetic coding using t Model, wherein the occurrence frequency of Context Model is set to a predetermined value at the start of decoding a frame or field. And C at the end of decoding the frame or field
an occurrence frequency accumulating means for accumulating the occurrence frequency of the Context Model; an occurrence frequency specifying means for setting the occurrence frequency of the Context Model at the start of decoding the frame or field to the occurrence frequency accumulated by the occurrence frequency accumulating means; Occurrence frequency preliminary accumulation means for copying and accumulating the occurrence frequency information accumulated by the occurrence frequency accumulation means at the end of field decoding;
Context at the start of decoding the frame or field
occurrence frequency pre-designating means for setting the occurrence frequency of t Model to the occurrence frequency accumulated by the occurrence frequency preliminary accumulating means, and using the occurrence frequency initializing means or the occurrence frequency specifying means at the start of decoding of a frame or field. Alternatively, it is characterized in that which of the occurrence frequency preliminary designation means is used is selected.

【0024】また、請求項13の発明は、請求項12に
記載の動画像復号方法であって、フレームまたはフィー
ルドの復号開始時に、発生頻度初期化手段または発生頻
度指定手段または発生頻度予備指定手段の、何れを使用
するかを選択するにあたり、フレームまたはフィールド
の復号開始時に、発生頻度初期化手段または発生頻度指
定手段または発生頻度予備指定手段の、何れを使用して
復号できるのかを示す符号化情報を復号し、その情報に
従って選択する特徴とする。
The invention of claim 13 is the moving picture decoding method according to claim 12, wherein the occurrence frequency initialization means, the occurrence frequency designation means, or the occurrence frequency preliminary designation means is set at the start of decoding of the frame or field. In selecting which of the two is to be used, at the start of decoding the frame or field, an encoding indicating which of the occurrence frequency initialization means, the occurrence frequency designating means, or the occurrence frequency preliminary designation means can be used for decoding is performed. The feature is that information is decoded and selected according to the information.

【0025】また、請求項14の発明は、Contex
t Modelを使った算術復号を使用して動画像を復
号する方法であって、フレームまたはフィールドの復号
開始時にContext Modelの発生頻度を、予
め指定された値に設定する発生頻度初期化手段と、フレ
ーム内符号化または前方向予測フレーム間符号化を使用
した、フレームまたはフィールドの復号終了時にCon
text Modelの発生頻度を蓄積する発生頻度蓄
積手段と、両方向予測フレーム間符号イーを使用した、
フレームまたはフィールドの復号終了時にContex
t Modelの発生頻度を蓄積する発生頻度両方向蓄
積手段と、フレームまたはフィールドの復号開始時にC
ontext Modelの発生頻度を、前記発生頻度
蓄積手段で蓄積された発生頻度に設定する発生頻度指定
手段と、両方向予測フレーム間符号化を使用した、フレ
ームまたはフィールドの復号開始時にContext
Modelの発生頻度を、前記発生頻度両方向蓄積手段
で蓄積された発生頻度に設定する発生頻度両方向指定手
段と、を用い、フレーム内符号化または前方向予測フレ
ーム間符号化を使用した、フレームまたはフィールドの
復号開始時に、発生頻度初期化手段または発生頻度指定
手段の、何れかを選択し、両方向予測フレーム間符号化
を使用した、フレームまたはフィールドの復号開始時
に、発生頻度初期化手段または発生頻度指定手段または
発生頻度両方向指定手段の、何れかを選択する特徴とす
る。
The invention of claim 14 is the context
A method for decoding a moving image using arithmetic decoding using t Model, wherein the occurrence frequency initialization means sets the occurrence frequency of the Context Model to a pre-specified value at the start of decoding a frame or field, Con at the end of decoding a frame or field using intraframe or forward predictive interframe coding
The occurrence frequency accumulating means for accumulating the occurrence frequency of the text model and the bidirectional prediction interframe code e are used,
Context at the end of decoding the frame or field
Occurrence frequency bidirectional accumulating means for accumulating the occurrence frequency of t Model, and C at the start of decoding a frame or field.
Occurrence frequency specifying means for setting the occurrence frequency of the Context Model to the occurrence frequency accumulated by the occurrence frequency accumulating means, and Context at the start of decoding a frame or field using bidirectional prediction interframe coding.
A frame or field using intra-frame coding or forward prediction inter-frame coding by using the occurrence frequency bidirectional designating means for setting the occurrence frequency of the Model to the occurrence frequency accumulated by the occurrence frequency bidirectional accumulating means. At the start of decoding, select either the occurrence frequency initialization means or the occurrence frequency designation means, and use the bidirectional prediction interframe coding, at the start of decoding the frame or field, the occurrence frequency initialization means or the occurrence frequency designation It is characterized by selecting either the means or the occurrence frequency bidirectional designating means.

【0026】また、請求項15の発明は、請求項14に
記載の動画像復号方法であって、フレーム内符号化また
は前方向予測フレーム間符号化を使用した、フレームま
たはフィールドの復号開始時に、発生頻度初期化手段ま
たは発生頻度指定手段の、何れかを選択し、両方向予測
フレーム間符号化を使用した、フレームまたはフィール
ドの復号開始時に、発生頻度初期化手段または発生頻度
指定手段または発生頻度両方向指定手段の、何れかを選
択するにあたり、フレームまたはフィールドの復号開始
時に、発生頻度初期化手段または発生頻度指定手段また
は発生頻度両方向指定手段の、何れを使用して復号でき
るのかを示す符号化情報を復号し、その情報に従って選
択する特徴とする。
The invention of claim 15 is the moving picture decoding method according to claim 14, wherein the decoding of a frame or field is started using intraframe coding or forward prediction interframe coding, Occurrence frequency initialization means or occurrence frequency designating means or occurrence frequency bidirectional at the start of decoding of a frame or field using either bidirectional prediction interframe coding by selecting either occurrence frequency initialization means or occurrence frequency designating means Encoding information indicating which of the occurrence frequency initialization means, the occurrence frequency designation means, or the occurrence frequency bidirectional designation means can be used for decoding at the start of decoding a frame or field in selecting one of the designation means Is decoded and selected according to the information.

【0027】また、請求項16の発明は、請求項1から
8のいずれか1項に記載の動画像符号化方法における手
順を、コンピュータに実行させるためのプログラムとし
た特徴とする。
The invention according to claim 16 is characterized in that a program for causing a computer to execute the procedure in the moving picture coding method according to any one of claims 1 to 8.

【0028】また、請求項17の発明は、請求項1から
8のいずれか1項に記載の動画像符号化方法における手
順を、コンピュータに実行させるためのプログラムと
し、該実行プログラムを、該コンピュータが読み取りで
きる記録媒体に記録した特徴とする。
The invention of claim 17 is a program for causing a computer to execute the procedure in the moving picture coding method according to any one of claims 1 to 8, and the execution program is the computer. Is recorded on a readable recording medium.

【0029】また、請求項18の発明は、請求項9から
15のいずれか1項に記載の動画像復号方法における手
順を、コンピュータに実行させるためのプログラムとし
た特徴とする。
The invention of claim 18 is characterized in that a program for causing a computer to execute the procedure in the moving picture decoding method according to any one of claims 9 to 15.

【0030】また、請求項19の発明は、請求項9から
15のいずれか1項に記載の動画像復号方法における手
順を、コンピュータに実行させるためのプログラムと
し、該実行プログラムを、該コンピュータが読み取りで
きる記録媒体に記録した特徴とする。
The invention according to claim 19 is a program for causing a computer to execute the procedure in the moving picture decoding method according to any one of claims 9 to 15, and the execution program is executed by the computer. It is a feature recorded on a readable recording medium.

【0031】請求項1及び請求項9に記載の発明によれ
ば、フレーム毎またはフィールド毎に発生頻度を初期化
するかどうかを選択することができる。そのため、時間
方向の相関性が高いフレーム間では、前フレームで安定
した発生頻度を使用することができ、符号化効率を向上
させることができる。
According to the inventions of claims 1 and 9, it is possible to select whether or not to initialize the occurrence frequency for each frame or each field. Therefore, between frames that have a high correlation in the time direction, a stable occurrence frequency can be used in the previous frame, and coding efficiency can be improved.

【0032】請求項2及び請求項10に記載の発明によ
れば、フレーム毎またはフィールド毎に発生頻度を初期
化するかどうかを選択し、初期化したかどうかを符号化
データに含めることができる。そのため、復号側で、フ
レームまたはフィールドを復号する時に、この情報に従
って発生頻度を初期化するかどうかを選択することがで
きる。
According to the invention described in claims 2 and 10, it is possible to select whether or not to initialize the occurrence frequency for each frame or each field, and to include in the encoded data whether or not the occurrence frequency is initialized. . Therefore, when decoding a frame or field, the decoding side can select whether to initialize the occurrence frequency according to this information.

【0033】請求項3及び請求項9に記載の発明によれ
ば、フレームの符号化モードにより発生頻度を初期化す
るかどうかを選択するため、請求項2の発明で必要であ
った初期化するかどうかの情報を符号化する必要がな
い。例えばシーンチェンジをIフレームで符号化する場
合には、Iフレームでのみ初期作処理を行うようにする
ことにより、初期化するかどうかの情報無しに、時間方
向の相関性が高いIフレーム以外のフレーム間での符号
化効率を向上させることができる。また請求項1の発明
と組み合わせて、予め指定したフレームの符号化モード
の場合のみ、発生頻度を初期化するかどうかを選択する
ことも可能である。また復号側では、符号化モードに従
って初期化するかどうかを選択することができる。
According to the third and ninth aspects of the present invention, since the occurrence frequency is selected depending on the frame coding mode, the initialization required in the second aspect of the invention is performed. There is no need to encode whether or not information. For example, when a scene change is encoded in an I frame, the initial work process is performed only in the I frame, so that there is no information as to whether or not the initialization is performed, and an I frame other than an I frame having a high correlation in the time direction is used. It is possible to improve coding efficiency between frames. Further, in combination with the invention of claim 1, it is also possible to select whether or not to initialize the occurrence frequency only in the case of the encoding mode of the frame designated in advance. In addition, the decoding side can select whether or not to initialize according to the encoding mode.

【0034】請求項4及び請求項11に記載の発明によ
れば、GOPの先頭で初期化するため、請求項1の発明
で必要であった初期化するかどうかの情報を符号化する
必要がない。例えばシーン毎にGOP構造を作成する場
合には、初期化するかどうかの情報無しに、時間方向の
相関性が高いGOP先頭フレーム以外のフレーム間での
符号化効率を向上させることができる。また請求項1の
発明と組み合わせて、GOPの先頭フレームの場合の
み、発生頻度を初期化するかどうかを選択することも可
能である。また復号側では、GOPの先頭フレームまた
はフィールドかどうかで初期化するかどうかを選択する
ことができる。
According to the fourth and eleventh aspects of the invention, since the initialization is performed at the head of the GOP, it is necessary to encode the information as to whether or not the initialization is required in the first aspect of the invention. Absent. For example, when a GOP structure is created for each scene, it is possible to improve the coding efficiency between frames other than the GOP head frame, which has high correlation in the time direction, without information on whether to initialize. Further, in combination with the invention of claim 1, it is also possible to select whether or not to initialize the occurrence frequency only in the case of the first frame of the GOP. Further, on the decoding side, it is possible to select whether or not to initialize depending on whether it is the first frame or field of the GOP.

【0035】請求項5及び請求項12に記載の発明によ
れば、過去に符号化した2フレーム分の発生頻度を蓄積
しておき、フレームまたはフィールド開始時に、蓄積し
ておいた発生頻度の中から1つを選択することができ
る。これにより、例えば、最も符号量の少ない発生頻度
を選択して使用することができ、符号化効率を向上させ
ることができる。
According to the fifth and the twelfth aspects of the present invention, the frequency of occurrence of the two previously coded frames is accumulated, and the accumulated frequency of occurrence is calculated at the start of the frame or field. One can be selected from Thereby, for example, the occurrence frequency with the smallest code amount can be selected and used, and the coding efficiency can be improved.

【0036】請求項6及び請求項13に記載の発明によ
れば、過去に符号化した2フレーム分の発生頻度を蓄積
しておき、フレームまたはフィールド開始時に、蓄積し
ておいた発生頻度の中から1つを選択し、どちらを使用
したのかを示す情報を符号化することができる。そのた
め、復号側で、フレームまたはフィールドを復号する時
に、この情報に従って発生頻度を選択することができ
る。
According to the sixth and thirteenth aspects of the present invention, the frequency of occurrence of two frames encoded in the past is accumulated, and the accumulated frequency of occurrence is calculated at the start of the frame or field. It is possible to select one from the above and encode the information indicating which one has been used. Therefore, the decoding side can select the frequency of occurrence according to this information when decoding the frame or field.

【0037】請求項7及び請求項14に記載の発明によ
れば、Iフレーム(フィールド)またはPフレーム(フ
ィールド)符号化時の初期化において、予め設定した初
期値や直前のフレーム(フィールド)符号化終了時の発
生頻度情報を使用するのではなく、それ以前に符号化し
たIまたはPフレームの終了時の発生頻度を使用するこ
とができる。これによりBフレーム(フィールド)を交
えて符号化する場合に、Bフレーム(フィールド)後
の、Iフレーム(フィールド)またはPフレーム(フィ
ールド)の符号化時において、過去のIまたはPフレー
ム(フィールド)符号化終了時の発生頻度を使用するこ
とができ、符号化効率を向上させることができる。例え
ば図7−(b)の順序で符号化された場合に、2番目の
Pフレームを符号化する時に、直前のBフレーム符号化
終了時の発生頻度を使用するのではなく、1番目のPフ
レーム符号化終了時の発生頻度を使用することができ
る。また、この発明によれば、Bフレーム。(フィール
ド)の復号を行わずにエフレーム(フィールド)とPフ
レーム(フィールド)のみ復号する場合において、Iフ
レーム(フィールド)またはPフレーム(フィールド)
の初期化処理を直前に復号したフレーム(フィールド)
の発生頻度で行うことができる。そのため、映像の早送
り再生などでBフレーム(フィールド)の復号を行わな
い、復号処理の軽減をすることができる。
According to the invention described in claims 7 and 14, in initialization at the time of I frame (field) or P frame (field) encoding, a preset initial value or the immediately preceding frame (field) code is set. Instead of using the occurrence frequency information at the end of encoding, it is possible to use the occurrence frequency at the end of the I or P frame encoded before that. As a result, when encoding is performed with B frames (fields), past I or P frames (fields) at the time of encoding I frames (fields) or P frames (fields) after B frames (fields) The occurrence frequency at the end of encoding can be used, and encoding efficiency can be improved. For example, in the case of encoding in the order of FIG. 7- (b), when the second P frame is encoded, the occurrence frequency at the end of encoding of the immediately preceding B frame is not used, but the first P frame is used. The frequency of occurrence at the end of frame coding can be used. Also according to the invention, a B frame. When only the E frame (field) and the P frame (field) are decoded without decoding the (field), the I frame (field) or the P frame (field)
Frame (field) decoded immediately before the initialization process of
Can be performed at a frequency of occurrence. Therefore, it is possible to reduce the decoding process by not decoding the B frame (field) in the fast-forward reproduction of the video.

【0038】請求項8及び請求項15に記載の発明によ
れば、過去に符号化した発生頻度を蓄積しておき、フレ
ームまたはフィールド開始時に、蓄積しておいた発生頻
度の中から1つを選択し、どちらを使用したのかを示す
情報を符号化することができる。そのため、復号側で、
フレームまたはフィールドを復号する時に、この情報に
従って発生頻度を選択することができる。
According to the eighth and fifteenth aspects of the present invention, the occurrence frequencies coded in the past are accumulated and one of the accumulated occurrence frequencies is stored at the start of the frame or field. Information can be encoded that indicates which one was selected and used. Therefore, on the decryption side,
When decoding a frame or field, the frequency of occurrence can be selected according to this information.

【0039】[0039]

【発明の実施の形態】以下、本発明の実施形態例を図面
を参照して説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0040】本発明の第1の実施形態例として、フレー
ム符号化終了時に発生頻度情報を蓄積するメモリが1フ
レーム分のみあり、次のフレーム符号化開始時に発生頻
度情報の初期化を行うか、蓄積した発生頻度情報を使う
のかを選択する場合の例を示す。どちらを使用したのか
を示す情報を符号化するものとする。フレームはマクロ
ブロックに分割され、マクロブロック毎に動き補償とD
CT(離散コサイン変換)を行うものとする。
As a first embodiment of the present invention, there is only one frame of memory for accumulating the occurrence frequency information at the end of frame encoding, and the occurrence frequency information is initialized at the start of the next frame encoding. An example of selecting whether to use the accumulated occurrence frequency information is shown. The information indicating which one was used shall be encoded. The frame is divided into macroblocks, and motion compensation and D are performed for each macroblock.
It is assumed that CT (discrete cosine transform) is performed.

【0041】動画像符号化装置の構成図を図1に示す。
前フレームとの類似度を判定するフレーム類似度判定部
109と、フレーム類似度に従って発生頻度を初期化す
るかどうかを決定する初期化決定部108と、初期化し
たかどうかを示す初期化情報を符号化する初期化情報符
号化部110と、マクロブロック毎に、動き補償を行う
かどうかを示す符号化モードを決定する符号化モード決
定部101と、動き補償を行う動き補償部102と、動
き補償を行った場合には予測誤差をDCTし、行わなか
った場合には画像情報をDCTし、DCT係数を2次元
可変長符号化する予測誤差符号化部103と、符号化モ
ードと動きベクトルとDCT係数をContext M
odel毎に2値化して算術符号化を行う算術符号化部
104と、フレーム内の全マクロブロックの算術符号化
が終了した時の各ContextModelの発生頻度
情報を蓄積する発生頻度蓄積部105と、発生頻度情報
を予め指定された値に初期化する発生頻度初期化部10
6と、発生頻度情報を発生頻度蓄積部105に蓄積され
ている値に設定する発生頻度指定部107と、で構成さ
れる。
FIG. 1 shows a block diagram of the moving picture coding apparatus.
A frame similarity determination unit 109 that determines the similarity to the previous frame, an initialization determination unit 108 that determines whether or not to initialize the occurrence frequency according to the frame similarity, and initialization information that indicates whether or not the initialization has been performed. An initialization information coding unit 110 for coding, a coding mode decision unit 101 for deciding a coding mode indicating whether or not to perform motion compensation for each macroblock, a motion compensation unit 102 for performing motion compensation, and a motion When the compensation is performed, the prediction error is DCT, when it is not performed, the image information is DCT, and the DCT coefficient is two-dimensionally variable-length encoded. DCT coefficient is Context M
an arithmetic coding unit 104 that binarizes and arithmetically encodes each of the models; an occurrence frequency accumulation unit 105 that accumulates the occurrence frequency information of each ContextModel when the arithmetic coding of all macroblocks in the frame is completed; Occurrence frequency initialization unit 10 that initializes the occurrence frequency information to a predesignated value
6 and an occurrence frequency specifying unit 107 that sets the occurrence frequency information to a value stored in the occurrence frequency storage unit 105.

【0042】フレーム類似度判定部109では、フレー
ム類似度を2フレーム間の各画素の、絶対値差分和の大
きさから決定する。絶対値差分和が予め設定した閾値よ
りも大きい場合にはフレーム類似度が小さいと判定し、
閾値よりも小さい場合にはフレーム類似度か大きいと判
定する。また、初期化決定部108は、フレーム類似度
が小さい場合には初期化を行い、大きい場合に初期化を
行わない。
The frame similarity determination unit 109 determines the frame similarity from the magnitude of the absolute value difference sum of each pixel between two frames. If the sum of absolute difference is greater than a preset threshold, it is determined that the frame similarity is small,
When it is smaller than the threshold value, it is determined that the frame similarity is high. Further, the initialization determining unit 108 performs initialization when the frame similarity is small, and does not perform initialization when the frame similarity is large.

【0043】符号化モード決定部101では、Pフレー
ムでは1つの参照画像との間で動き探索を行って動きベ
クトルと予測誤差を求め、予測誤差が予め設定した閾値
よりも大きい場合には符号化モードを動き補償を行わな
いイントラモードに決定し、予測誤差が小さい場合には
符号化モードを動き補償を行う前予測モードに決定す
る。Bフレームでは2つの参照画像との間でそれぞれ動
き探索を行って動きベクトルと予測画像を求め、第1の
参照画像との間の予測誤差(第1予測誤差)と第2の参
照画像との間の予測誤差(第2予測誤差)と両方向予測
誤差を求め、全ての予測誤差が予め設定した閾値よりも
大きい場合には符号化モードを動き補償を行わないイン
トラモードに決定し、いずれかの予測誤差が予め設定し
た閾値よりも小さい場合には、符号化モードを、最も値
の小さい予測誤差となる動き補償を行うモードに決定す
る。第1予測誤差が最も小さい場合には前予測モードに
し、第2予測誤差が最も小さい場合には後予測モードに
し、両方向予測誤差が最も小さい場合には両予測モード
に決定する。
In the P-frame, the coding mode determination unit 101 performs a motion search with one reference image to obtain a motion vector and a prediction error. If the prediction error is larger than a preset threshold value, the coding is performed. The mode is set to the intra mode in which motion compensation is not performed, and when the prediction error is small, the coding mode is set to the pre-prediction mode in which motion compensation is performed. In the B frame, a motion search is performed between each of the two reference images to obtain a motion vector and a predicted image, and a prediction error (first prediction error) between the first reference image and the second reference image is calculated. Inter prediction error (second prediction error) and bidirectional prediction error are obtained. If all prediction errors are larger than a preset threshold value, the coding mode is determined as intra mode without motion compensation, and either When the prediction error is smaller than the preset threshold value, the coding mode is determined to be the mode in which the motion compensation that results in the smallest prediction error is performed. If the first prediction error is the smallest, the pre-prediction mode is set. If the second prediction error is the smallest, the post-prediction mode is set. If the bidirectional prediction error is the smallest, the bi-prediction mode is set.

【0044】算術符号化部104では、符号化モードと
動きベクトルとDCT係数の2次元可変長符号の値を2
進数で表現し、各情報の2の補数位置をContext
Modelとする。Context Model毎に
MQ−coderで算術符号化する。MQ−coder
は、JBIG2で採用されている算術符号化の方法であ
る。MQ−coderで使用する、発生頻度蓄積部10
5には各Context Modelの発生頻度情報を
蓄積する。
The arithmetic coding unit 104 sets the coding mode, the motion vector and the value of the two-dimensional variable length code of the DCT coefficient to 2
Expressed in base number, the 2's complement position of each information is context
Model. Arithmetic encoding is performed by MQ-coder for each Context Model. MQ-coder
Is an arithmetic coding method adopted in JBIG2. Occurrence frequency accumulation unit 10 used in MQ-coder
In 5, the occurrence frequency information of each Context Model is stored.

【0045】このような前提の下で図7−(b)の順序
で動画像を符号化する場合の各部による処理の手順を示
す。
Under such a premise, the procedure of processing by each unit when encoding a moving image in the order of FIG. 7- (b) will be shown.

【0046】第1フレームでは発生頻度情報を初期化す
る。初期化情報を符号化する。Iフレームであるため全
マクロブロックで符号化モード決定部101はイントラ
モードに決定し、画像情報をDCTして2次元可変長符
号化する。算術符号化部104は各マクロブロックの符
号化モードと2次元可変長符号化データを算術符号化す
る。最後のマクロブロックを算術符号化した後、発生頻
度蓄積部105は発生頻度情報を蓄積する。動きベクト
ルに関する発生頻度情報としては、発生頻度初期化部1
06に設定されている初期値を蓄積する。
In the first frame, the occurrence frequency information is initialized. Encode the initialization information. Since it is an I frame, the coding mode determination unit 101 determines the intra mode for all macroblocks, performs DCT on the image information, and performs two-dimensional variable length coding. The arithmetic encoding unit 104 arithmetically encodes the encoding mode of each macroblock and the two-dimensional variable length encoded data. After arithmetically encoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information. As the occurrence frequency information on the motion vector, the occurrence frequency initialization unit 1
The initial value set to 06 is accumulated.

【0047】第2フレームではフレーム類似度判定部1
09で第1フレームとの間のフレーム類似度を判定す
る。初期化決定部108は、フレーム類似度が大きい場
合には、発生頻度蓄積部105に蓄積されている発生頻
度を発生頻度指定部107により算術符号化部104で
使用する発生頻度の初期値に設定する。フレーム類似度
が小さい場合には、発生頻度初期化部106により算術
符号化部104で使用する発生頻度の初期値を予め設定
されている初期値に設定する。Pフレームであるため符
号化モード決定部101はイントラモードまたは前予測
モードに決定する。イントラモードの場合には画像情報
をDCTして2次元可変長符号化する。前予測モードの
場合には動き補償し、予測誤差をDCTして2次元可変
長符号化する。算術符号化部104は各マクロブロック
の符号化モードと動きベクトルと2次元可変長符号化デ
ータを算術符号化する。イントラモードでは動きベクト
ルを算術符号化しない。最後のマクロブロックを算術符
号化した後、発生頻度蓄積部105は発生頻度情報を蓄
積する。
In the second frame, the frame similarity determination unit 1
At 09, the frame similarity with the first frame is determined. When the frame similarity is high, the initialization determining unit 108 sets the occurrence frequency accumulated in the occurrence frequency accumulating unit 105 to the initial value of the occurrence frequency used by the arithmetic coding unit 104 by the occurrence frequency specifying unit 107. To do. When the frame similarity is low, the occurrence frequency initialization unit 106 sets the initial value of the occurrence frequency used in the arithmetic coding unit 104 to a preset initial value. Since it is a P frame, the coding mode determination unit 101 determines the intra mode or the previous prediction mode. In the case of the intra mode, the image information is DCT-coded to perform two-dimensional variable length coding. In the case of the pre-prediction mode, motion compensation is performed, and the prediction error is subjected to DCT to perform two-dimensional variable length coding. The arithmetic encoding unit 104 arithmetically encodes the encoding mode and motion vector of each macroblock and the two-dimensional variable length encoded data. Motion vectors are not arithmetically encoded in intra mode. After arithmetically encoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information.

【0048】第3フレームではフレーム類似度判定部1
09で第2フレームとの間のフレーム類似度を判定す
る。初期化決定部108は、フレーム類似度が大きい場
合には、発生頻度蓄積部105に蓄積されている発生頻
度を発生頻度指定部107により算術符号化部104で
使用する発生頻度の初期値に設定する。フレーム類似度
が小さい場合には、発生頻度初期化部107により算術
符号化部104で使用する発生頻度の初期値を予め設定
されている初期値に設定する。Bフレームであるため符
号化モード決定部101はイントラモードまたは前予測
モードまたは後予測モードまたは両予測モードに決定す
る。イントラモードの場合には画像情報をDCTして2
次元可変長符号化する。前予測モードまたは後予測モー
ドまたは両予測モードの場合には動き補償し、予測誤差
をDCTして2次元可変長符号化する。算術符号化部1
04は各マクロブロックの符号化モードと2種類の動き
ベクトル(前方向動きベクトルと後方向動きベクトル)
と2次元可変長符号化データを算術符号化する。イント
ラモードでは動きベクトルを算術符号化しない。前予測
モードでは後方向動きベクトルを算術符号化せず、後予
測モードでは前方向動きベクトルを算術符号化しない。
最後のマクロブロックを算術符号化した後、発生頻度蓄
積部105は発生頻度情報を蓄積する。
In the third frame, the frame similarity determination unit 1
At 09, the frame similarity with the second frame is determined. When the frame similarity is high, the initialization determining unit 108 sets the occurrence frequency accumulated in the occurrence frequency accumulating unit 105 to the initial value of the occurrence frequency used by the arithmetic coding unit 104 by the occurrence frequency specifying unit 107. To do. When the frame similarity is small, the occurrence frequency initialization unit 107 sets the initial value of the occurrence frequency used in the arithmetic coding unit 104 to a preset initial value. Since it is a B frame, the coding mode determination unit 101 determines the intra mode, the pre-prediction mode, the post-prediction mode, or both prediction modes. In intra mode, the image information is DCTed to 2
Dimension variable length coding. In the case of the pre-prediction mode, the post-prediction mode, or the both prediction modes, motion compensation is performed, and the prediction error is DCT'd to perform two-dimensional variable length coding. Arithmetic coding unit 1
04 is the coding mode of each macroblock and two types of motion vectors (forward motion vector and backward motion vector)
And two-dimensional variable-length coded data are arithmetically coded. Motion vectors are not arithmetically encoded in intra mode. In the forward prediction mode, the backward motion vector is not arithmetically encoded, and in the backward prediction mode, the forward motion vector is not arithmetically encoded.
After arithmetically encoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information.

【0049】第4フレームはBフレームであるため第3
フレームと同様な処理を行う。第5フレームはPフレー
ムであるため第2フレームと同様な処理を行う。第6、
第7フレームはBフレームであるため第3フレームと同
様な処理を行う。
Since the fourth frame is a B frame, it is the third frame.
Performs the same processing as a frame. Since the fifth frame is a P frame, the same process as the second frame is performed. Sixth,
Since the seventh frame is the B frame, the same process as the third frame is performed.

【0050】以上の処理により図7−(b)の順序で7
枚のフレームを符号化する。
By the above processing, 7 in the order of FIG. 7- (b).
Encode a frame.

【0051】次に、ここで作成された符号化データを復
号する手順を示す。
Next, the procedure for decoding the coded data created here will be described.

【0052】動画像復号装置の構成例を図2に示す。発
生頻度情報を初期化するかどうかを示す初期化情報を復
号する初期化情報復号部114と、マクロブロック毎
に、符号化モードと動きベクトルとDCT係数2次元可
変長符号を算術復号する算術復号部111と、符号化モ
ードから動きベクトルを算術復号するかどうかを決定す
る符号化モード判定部112と、2次元可変長符号から
DCT係数を復号する予測誤差復号部113と、符号化
モードで動き補償をすると判定された場合には動き補償
を行う動き補償部102と、フレーム内の全マクロブロ
ックの算術符号化が終了した時の各Context M
odelの発生頻度情報を蓄積する発生頻度蓄積部10
5と、発生頻度情報を予め指定された値に初期化する発
生頻度初期化部106と、発生頻度情報を発生頻度蓄積
部105に蓄積されている値に設定する発生頻度指定部
107と、で構成される。
FIG. 2 shows an example of the structure of the moving picture decoding apparatus. An initialization information decoding unit 114 that decodes initialization information indicating whether to initialize the occurrence frequency information, and an arithmetic decoding that arithmetically decodes a coding mode, a motion vector, and a DCT coefficient two-dimensional variable-length code for each macroblock. A unit 111, a coding mode determination unit 112 that determines whether to arithmetically decode a motion vector based on the coding mode, a prediction error decoding unit 113 that decodes a DCT coefficient from a two-dimensional variable-length code, and a motion in a coding mode. When it is determined that the compensation is performed, the motion compensation unit 102 that performs the motion compensation and each Context M when the arithmetic coding of all macroblocks in the frame are completed.
Occurrence frequency accumulation unit 10 that accumulates occurrence frequency information of odel
5, an occurrence frequency initialization unit 106 that initializes the occurrence frequency information to a preset value, and an occurrence frequency designation unit 107 that sets the occurrence frequency information to the value stored in the occurrence frequency storage unit 105. Composed.

【0053】このような構成の元で次のように復号され
る。
Under the above configuration, the decoding is performed as follows.

【0054】第1フレームで、まず初期化情報を復号す
る。初期化情報により、発生頻度初期化部106により
算術復号部111で使用する発生頻度の初期値を予め設
定されている初期値に設定する。続いてマクロブロック
毎に次のように復号される。算術復号部111は符号化
モードを復号する。符号化モード判定部112は、符号
化モードがイントラモードであるため動きベクトルを復
号しないと判定する。算術復号部111は動きベクトル
を復号しない。算術復号部111は2次元可変長符号を
復号する。予測誤差復号部113は2次元可変長符号を
復号して画像情報を求める。以上の処理を全てのマクロ
ブロックに対して行う。最後のマクロブロックを算術復
号した後、発生頻度蓄積部105は発生頻度情報を蓄積
する。動きベクトルに関する発生頻度情報としては、発
生頻度初期化部106に設定されている初期値を蓄積す
る。
In the first frame, the initialization information is first decoded. Based on the initialization information, the occurrence frequency initialization unit 106 sets the initial value of the occurrence frequency used in the arithmetic decoding unit 111 to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112 determines not to decode the motion vector because the coding mode is the intra mode. The arithmetic decoding unit 111 does not decode the motion vector. The arithmetic decoding unit 111 decodes a two-dimensional variable length code. The prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain image information. The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information. As the occurrence frequency information regarding the motion vector, the initial value set in the occurrence frequency initialization unit 106 is accumulated.

【0055】第2フレームで、まず初期化情報を復号す
る。初期化情報に従って、発生頻度蓄積部105に蓄積
されている発生頻度を発生頻度指定部107により算術
復号部111で使用する発生頻度の初期値に設定する
か、または発生頻度初期化部106により算術復号部1
11で使用する発生頻度の初期値を予め設定されている
初期値に設定するかの何れかを行う。続いてマクロブロ
ック毎に次のように復号される。算術復号部111は符
号化モードを復号する。符号化モード判定部112は、
符号化モードがイントラモードである場合には動きベク
トルを復号しないと判定する。この場合、算術復号部1
11は動きベクトルを復号しない。符号化モードが前予
測モードである場合には動きベクトルを復号すると判定
する。この場合、算術復号部111は動きベクトルを復
号する。続いて算術復号部111は2次元可変長符号を
復号する。符号化モードがイントラモードの場合、予測
誤差復号部113は2次元可変長符号を復号して画像情
報を求める。符号化モードが前予測モードの場合、予測
誤差復号部113は2次元可変長符号を復号して予測誤
差を求め、動き補償部102は動きベクトルを使って予
測画像と予測誤差から画像情報を求める。以上の処理を
全てのマクロブロックに対して行う。最後のマクロブロ
ックを算術復号した後、発生頻度蓄積部105は発生頻
度情報を蓄積する。
In the second frame, the initialization information is first decoded. According to the initialization information, the occurrence frequency stored in the occurrence frequency accumulating unit 105 is set by the occurrence frequency specifying unit 107 to an initial value of the occurrence frequency used in the arithmetic decoding unit 111, or the occurrence frequency initializing unit 106 performs arithmetic. Decoding section 1
Either the initial value of the occurrence frequency used in 11 is set to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112
When the coding mode is the intra mode, it is determined that the motion vector is not decoded. In this case, the arithmetic decoding unit 1
11 does not decode the motion vector. When the encoding mode is the pre-prediction mode, it is determined to decode the motion vector. In this case, the arithmetic decoding unit 111 decodes the motion vector. Subsequently, the arithmetic decoding unit 111 decodes the two-dimensional variable length code. When the encoding mode is the intra mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the image information. When the coding mode is the pre-prediction mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the prediction error, and the motion compensation unit 102 obtains the image information from the prediction image and the prediction error using the motion vector. . The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information.

【0056】第3フレームで、まず初期化情報を復号す
る。初期化情報に従って、発生頻度蓄積部105に蓄積
されている発生頻度を発生頻度指定部107により算術
復号部111で使用する発生頻度の初期値に設定する
か、または発生頻度初期化部106により算術復号部1
11で使用する発生頻度の初期値を予め設定されている
初期値に設定するかの何れかを行う。続いてマクロブロ
ック毎に次のように復号される。算術復号部111は符
号化モードを復号する。符号化モード判定部112は、
符号化モードがイントラモードである場合には動きベク
トルを復号しないと判定する。この場合、算術復号部1
11は動きベクトルを復号しない。符号化モードが前予
測モードまたは後予測モードである場合には1つ動きベ
クトルを復号すると判定する。この場合、算術復号部1
11は1つ動きベクトルを復号する。符号化モードが両
予測モードである場合には2つ動きベクトルを復号する
と判定する。この場合、算術復号部111は2つ動きベ
クトルを復号する。続いて算術復号部111は2次元可
変長符号を復号する。符号化モードがイントラモードの
場合、予測誤差復号部113は2次元可変長符号を復号
して画像情報を求める。符号化モードが前予測モードま
たは後予測モードまたは両予測モードの場合、予測誤差
復号部113は2次元可変長符号を復号して予測誤差を
求め、動き補償部102は動きベクトルを使って予測画
像と予測誤差から画像情報を求める。以上の処理を全て
のマクロブロックに対して行う。最後のマクロブロック
を算術復号した後、発生頻度蓄積部105は発生頻度情
報を蓄積する。
In the third frame, the initialization information is first decoded. According to the initialization information, the occurrence frequency stored in the occurrence frequency accumulating unit 105 is set by the occurrence frequency specifying unit 107 to an initial value of the occurrence frequency used in the arithmetic decoding unit 111, or the occurrence frequency initializing unit 106 performs arithmetic. Decoding section 1
Either the initial value of the occurrence frequency used in 11 is set to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112
When the coding mode is the intra mode, it is determined that the motion vector is not decoded. In this case, the arithmetic decoding unit 1
11 does not decode the motion vector. When the coding mode is the pre-prediction mode or the post-prediction mode, it is determined to decode one motion vector. In this case, the arithmetic decoding unit 1
11 decodes one motion vector. When the coding mode is the bi-prediction mode, it is determined to decode two motion vectors. In this case, the arithmetic decoding unit 111 decodes two motion vectors. Subsequently, the arithmetic decoding unit 111 decodes the two-dimensional variable length code. When the encoding mode is the intra mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the image information. When the coding mode is the pre-prediction mode, the post-prediction mode, or both prediction modes, the prediction error decoding unit 113 decodes the two-dimensional variable-length code to obtain the prediction error, and the motion compensation unit 102 uses the motion vector to predict the predicted image. And the image information is obtained from the prediction error. The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information.

【0057】第4フレームはBフレームであるため第3
フレームと同様な処理を行う。第5フレームはPフレー
ムであるため第2フレームと同様な処理を行う。第6、
第7フレームはBフレームであるため第3フレームと同
様な処理を行う。
Since the fourth frame is a B frame, the third frame
Performs the same processing as a frame. Since the fifth frame is a P frame, the same process as the second frame is performed. Sixth,
Since the seventh frame is the B frame, the same process as the third frame is performed.

【0058】以上の処理により図7−(b)の順序で7
枚のフレームを復号する。
By the above processing, 7 in the order of FIG.
Decode one frame.

【0059】以上のように第1の実施形態例によれば、
フレーム毎に算術符号化の発生頻度情報を初期化するか
どうかを決定しながら、動画像を符号化することができ
る。また初期化するかどうかの情報を符号化データ中に
含めるため、復号側でも正確に算術復号を行え、復号画
像を得ることができる。
As described above, according to the first embodiment,
The moving image can be encoded while determining whether or not to initialize the occurrence frequency information of arithmetic encoding for each frame. Further, since information about whether or not to initialize is included in the encoded data, it is possible to accurately perform arithmetic decoding on the decoding side and obtain a decoded image.

【0060】なお、本実施形態例では、フレーム類似度
によって発生頻度情報を初期化するかどうかを判定し、
初期化するかどうかの情報を符号化したが、この情報を
符号化せず、フレームの符号化モードに従って、初期化
するかどうかを判定することも可能である。例えば、第
1フレームのIフレームのみ初期化を行い、途中の第2
フレームから第7フレームまでのPフレームまたはBフ
レームでは初期化を行わない。この場合には初期化する
かどうかの情報を符号化しなくてもよく、符号化効率を
向上させることができる。また特定の符号化モードのフ
レームのみ、初期化するかどうかの情報を符号化する方
法も可能である。
In this embodiment, it is determined whether or not the occurrence frequency information is to be initialized according to the frame similarity,
Although the information as to whether or not to initialize is encoded, it is also possible to determine whether or not to initialize according to the encoding mode of the frame without encoding this information. For example, only the I frame of the first frame is initialized and the second frame in the middle is initialized.
Initialization is not performed in the P frame or the B frame from the frame to the seventh frame. In this case, it is not necessary to code the information as to whether or not to initialize, and the coding efficiency can be improved. It is also possible to use a method of encoding information as to whether or not to initialize only a frame in a specific encoding mode.

【0061】さらに、本実施形態例の構成にフレーム符
号化終了時に発生頻度情報を蓄積するかどうかを選択す
る仕組みを備えると、特定の符号化モードのフレームの
み発生頻度情報を蓄積することも可能である。例えばI
フレームとPフレーム符号化終了時のみ発生頻度情報を
蓄積するようにすると、第5フレームのPフレームを符
号化開始時に、第2フレームのPフレーム符号化終了時
の発生頻度情報を初期値とすることができる。この方法
によれば、動画像の早送り再生の時に、途中のBフレー
ムを復号せずにIフレームとPフレームのみ復号するこ
とが可能である。ただし、この構成では、第4フレーム
のBフレームの符号化に第3フレームのBフレーム符号
化終了時の発生頻度情報を使うことはできない。
Furthermore, if the structure of the present embodiment is provided with a mechanism for selecting whether or not to accumulate the occurrence frequency information at the end of frame coding, it is possible to accumulate the occurrence frequency information only for frames in a specific coding mode. Is. For example I
If the occurrence frequency information is accumulated only at the end of frame and P frame encoding, the occurrence frequency information at the end of P frame encoding of the second frame is set as an initial value at the start of encoding the P frame of the fifth frame. be able to. According to this method, at the time of fast-forward reproduction of a moving image, it is possible to decode only the I frame and P frame without decoding the intermediate B frame. However, in this configuration, the occurrence frequency information at the end of the B frame encoding of the third frame cannot be used for encoding the B frame of the fourth frame.

【0062】なお、動画像符号化装置に、フレーム符号
化終了時に発生頻度情報を蓄積するかどうかを指定する
情報を符号化する仕組みを備え、動画像復号装置に、こ
の情報を復号する仕組みを備えると、符号化モードとは
無関係に発生頻度情報の蓄積をするかどうかを選択する
ことができ、符号化郊率がよくなるように、発生頻度を
蓄積することができる。
The moving picture coding apparatus is provided with a mechanism for coding information designating whether or not to accumulate occurrence frequency information at the end of frame coding, and the moving picture decoding apparatus is provided with a mechanism for decoding this information. When provided, it is possible to select whether or not to accumulate the occurrence frequency information irrespective of the encoding mode, and it is possible to accumulate the occurrence frequency so that the encoding suburb rate is improved.

【0063】また、GOPの先頭かどうかに従って、初
期化するかどうかを判定することも可能である。例えば
本実施形態例の7フレームが1GOPを構成する場合に
は、GOPの先頭フレームである第1フレームのみ初期
化を行い、途中の第2フレームから第7フレームまでは
初期化を行わない。この場合にも初期化するかどうかの
情報を符号化しなくてもよく、符号化効率を向上させる
ことができる。
It is also possible to determine whether or not to initialize depending on whether or not it is the head of the GOP. For example, when the seven frames of this embodiment form one GOP, only the first frame, which is the first frame of the GOP, is initialized, and the second to seventh frames in the middle are not initialized. Also in this case, it is not necessary to code the information as to whether or not to initialize, and the coding efficiency can be improved.

【0064】また、本実施形態例ではフレームの符号化
の例を示したが、インタレース動画像においてはフィー
ルドの符号化に適用しても良い。また、本実施形態例で
はフレーム間予測符号化を使用した動画像符号化の動作
を示したが、フレーム内符号化のみで構成される動画像
符号化に適用しても良い。
Further, although an example of frame coding is shown in the present embodiment, it may be applied to field coding in an interlaced moving image. Further, the operation of the moving picture coding using the inter-frame predictive coding has been shown in the present embodiment example, but the present invention may be applied to the moving picture coding constituted only by the intra-frame coding.

【0065】次に、本発明の第2の実施形態例として、
フレーム符号化終了時の発生頻度情報を蓄積するメモリ
が2フレーム分あり、次のフレーム符号化開始時に発生
頻度情報の初期化を行うか、あるいは蓄積した2種類の
発生頻度情報をうち、どちらを使うのかを選択する場合
の例を示す。
Next, as a second embodiment of the present invention,
There are two frames of memory for accumulating the occurrence frequency information at the end of frame coding, and the occurrence frequency information is initialized at the start of the next frame coding, or which of the two kinds of accumulated occurrence frequency information is stored. The following is an example of selecting whether to use.

【0066】動画像符号化装置の構成図を図3に示す。
フレーム内の全マクロブロックの算術符号化が終了した
時の各Context Modelの発生頻度情報を蓄
積する発生頻度蓄積部105と、前フレーム符号化終了
時に発生頻度蓄積部105に蓄積された発生頻度情報を
再度蓄積する発生頻度予備蓄積部116と、発生頻度蓄
積部105に蓄積している発生頻度情報(以後P1と呼
ぶ)と発生頻度予備蓄積部116に蓄積している発生頻
度情報(以後P2と呼ぶ)と予め設定されている初期値
のうち、どれが最も符号化効率が高いかを判定する発生
頻度類似度判定部117と、発生頻度類似度に従って発
生頻度をP1に設定するのかP2に設定するのか初期化
するのかのいずれかを決定する初期化決定部108と、
初期化したかどうか、また発生頻度をP1に設定したの
かP2に設定したのかを示す初期化情報を符号化する初
期化情報符号化部110と、マクロブロック毎に、動き
補償を行うかどうかを示す符号化モードを決定する符号
化モード決定部101と、動き補償を行う動き補償部1
02と、動き補償を行った場合には予測誤差をDCT
し、行わなかった場合には画像情報をDCTし、DCT
係数を2次元可変長符号化する予測誤差符号化部103
と、符号化モードと動きベクトルとDCT係数をCon
text Model毎に2値化して算術符号化を行う
算術符号化部104と、発生頻度情報を予め指定された
値に初期化する発生頻度初期化部106と、発生頻度情
報を発生頻度蓄積部105に蓄積されている値に設定す
る発生頻度指定部107と、発生頻度情報を発生頻度予
備蓄積部116に蓄積されている値に設定する発生頻度
予備指定部115と、で構成される。
FIG. 3 shows a block diagram of the moving picture coding apparatus.
An occurrence frequency accumulating unit 105 that accumulates the occurrence frequency information of each Context Model when the arithmetic coding of all macroblocks in the frame is completed, and the occurrence frequency information that is accumulated in the occurrence frequency accumulation unit 105 at the end of the previous frame encoding. Occurrence frequency pre-accumulation unit 116, the occurrence frequency information accumulated in the occurrence frequency accumulation unit 105 (hereinafter referred to as P1), and the occurrence frequency information accumulated in the occurrence frequency preliminary accumulation unit 116 (hereinafter referred to as P2). Of the initial values set in advance, the occurrence frequency similarity determination unit 117 that determines which has the highest encoding efficiency, and whether the occurrence frequency is set to P1 according to the occurrence frequency similarity is set to P2. An initialization determination unit 108 for determining whether to perform initialization or initialization;
An initialization information encoding unit 110 that encodes initialization information indicating whether initialization has been performed and whether the occurrence frequency is set to P1 or P2, and whether to perform motion compensation for each macroblock. A coding mode determination unit 101 that determines the coding mode shown and a motion compensation unit 1 that performs motion compensation
02, the DCT is used as the prediction error when motion compensation is performed.
If not, DCT the image information,
Prediction error coding unit 103 for two-dimensional variable length coding of coefficients
, Encoding mode, motion vector and DCT coefficient
An arithmetic coding unit 104 that binarizes each text model to perform arithmetic coding, an occurrence frequency initialization unit 106 that initializes the occurrence frequency information to a predetermined value, and an occurrence frequency information accumulation unit 105. An occurrence frequency specifying unit 107 that sets the value stored in the occurrence frequency preliminary specifying unit 107 and an occurrence frequency preliminary specifying unit 115 that sets the occurrence frequency information to the value accumulated in the occurrence frequency preliminary accumulating unit 116.

【0067】発生頻度類似度判定部117と初期化決定
部108と初期化情報符号化部110以外の動作は第1
の実施形態例と同様である。発生頻度類似度判定部11
7では、現フレーム先頭マクロブロックを、発生頻度蓄
積部105に蓄積された発生頻度情報を使って算術符号
化した符号量B1と、発生頻度予備蓄積部116に蓄積
された発生頻度情報を使って算術符号化した符号量B2
と、発生頻度情報を初期化して算術符号化した符号量B
3を求める。初期化決定部108では、発生頻度類似度
判定部117で求めた符号量を比較し、最も値の小さい
方法を初期化方法に決定する。初期化情報符号化部11
0では、初期化情報として、予め設定した初期値で初期
化するかどうかの情報1ビット(1の場合には初期化
し、0の場合には初期化しない)を符号化する。この情
報が0の場合には更に、発生頻度蓄積部105に蓄積さ
れた発生頻度情報を使うか、または発生頻度予備蓄積部
116に蓄積された発生頻度情報を使うのかを示す情報
1ビットを符号化する。符号は前者の場合には0、後者
の場合には1とする。
The operations other than the occurrence frequency similarity determiner 117, the initialization determiner 108, and the initialization information encoder 110 are the first.
It is similar to the embodiment example of. Occurrence frequency similarity determination unit 11
7, the current frame top macroblock is arithmetically coded using the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105, and the occurrence frequency information accumulated in the occurrence frequency preliminary accumulating unit 116 is used. Code amount B2 arithmetically coded
And the code amount B that is arithmetically encoded by initializing the occurrence frequency information
Ask for 3. The initialization determination unit 108 compares the code amounts obtained by the occurrence frequency similarity determination unit 117 and determines the method with the smallest value as the initialization method. Initialization information coding unit 11
At 0, 1 bit of information as to whether or not to initialize with a preset initial value (1 is initialized, 0 is not initialized) is encoded as initialization information. If this information is 0, a 1-bit information indicating whether to use the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105 or the occurrence frequency information accumulated in the occurrence frequency preliminary accumulating unit 116 is further coded. Turn into. The code is 0 in the former case and 1 in the latter case.

【0068】このような前提の下で図7−(b)の順序
で動画像を符号化する場合の各部による処理の手順を示
す。
Under such a premise, the procedure of processing by each unit when encoding a moving image in the order of FIG. 7- (b) will be shown.

【0069】第1フレームでは、Iフレームであるため
全マクロブロックで符号化モード決定部101はイント
ラモードに決定し、画像情報をDCTして2次元可変長
符号化する。発生頻度情報を予め設定した初期値で初期
化する。初期化情報として1を符号化する。算術符号化
部104は各マクロブロックの符号化モードと2次元可
変長符号化データを算術符号化する。最後のマクロブロ
ックを算術符号化した後、発生頻度蓄積部105は発生
頻度情報を蓄積する。動きベクトルに関する発生頻度情
報としては、発生頻度初期化部106に設定されている
初期値を蓄積する。
Since the first frame is an I frame, the coding mode determination unit 101 determines the intra mode for all macroblocks, and DCTs the image information for two-dimensional variable length coding. The occurrence frequency information is initialized with a preset initial value. 1 is encoded as the initialization information. The arithmetic encoding unit 104 arithmetically encodes the encoding mode of each macroblock and the two-dimensional variable length encoded data. After arithmetically encoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information. As the occurrence frequency information regarding the motion vector, the initial value set in the occurrence frequency initialization unit 106 is accumulated.

【0070】第2フレームでは、Pフレームであるため
符号化モード決定部101はイントラモードまたは前予
測モードに決定する。イントラモードの場合には画像情
報をDCTして2次元可変長符号化する。前予測モード
の場合には動き補償し、予測誤差をDCTして2次元可
変長符号化する。発生頻度類似度判定部117は、先頭
マクロブロックの符号化モードと動きベクトルと2次元
可変長符号化データを、2種類の初期値で算術符号化し
発生符号量(B1,B3)を求める。イントラモードで
は動きベクトルを算術符号化しない。初期化決定部10
8は、B1,B3を比較し発生符号量の少ない方を選択
し初期値に決定する。発生頻度初期化部106と、発生
頻度指定部107のうち、初期値として選択されたもの
を実行し、算術符号化部104の初期値とする。算術符
号化部104は各マクロブロックの符号化モードと動き
ベクトルと2次元可変長符号化データを算術符号化す
る。イントラモードでは動きベクトルを算術符号化しな
い。最後のマクロブロックを算術符号化した後、発生頻
度予備蓄積部116は発生頻度蓄積部105に蓄積され
ている発生頻度情報を蓄積する。発生頻度蓄積部105
は現フレームの発生頻度情報を蓄積する。
Since the second frame is a P frame, the coding mode determining unit 101 determines the intra mode or the pre-prediction mode. In the case of the intra mode, the image information is DCT-coded to perform two-dimensional variable length coding. In the case of the pre-prediction mode, motion compensation is performed, and the prediction error is subjected to DCT to perform two-dimensional variable length coding. The occurrence frequency similarity determination unit 117 arithmetically encodes the coding mode of the head macroblock, the motion vector, and the two-dimensional variable-length coded data with two types of initial values to obtain the generated code amount (B1, B3). Motion vectors are not arithmetically encoded in intra mode. Initialization determination unit 10
In step 8, B1 and B3 are compared with each other, the one with the smaller amount of generated code is selected and the initial value is determined. Of the occurrence frequency initialization unit 106 and the occurrence frequency designating unit 107, the one selected as the initial value is executed and set as the initial value of the arithmetic coding unit 104. The arithmetic encoding unit 104 arithmetically encodes the encoding mode and motion vector of each macroblock and the two-dimensional variable length encoded data. Motion vectors are not arithmetically encoded in intra mode. After arithmetically coding the last macroblock, the occurrence frequency preliminary accumulating unit 116 accumulates the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105. Occurrence frequency accumulation unit 105
Stores the occurrence frequency information of the current frame.

【0071】第3フレームでは、Bフレームであるため
符号化モード決定部101はイントラモードまたは前予
測モードまたは後予測モードまたは両予測モードに決定
する。イントラモードの場合には画像情報をDCTして
2次元可変長符号化する。前予測モードまたは後予測モ
ードまたは両予測モードの場合には動き補償し、予測誤
差をDCTして2次元可変長符号化する。発生頻度類似
度判定部117は、先頭マクロブロックの符号化モード
と動きベクトルと2次元可変長符号化データを、3種類
の初期値で算術符号化し発生符号量(B1,B2,B
3)を求める。イントラモードでは動きベクトルを算術
符号化しない。初期化決定部108は、B1,B2,B
3を比較し発生符号量の少ないものを選択し初期値に決
定する。発生頻度初期化部106と、発生頻度指定部1
07と、発生頻度予備指定部115のうち、初期値とし
て選択されたものを実行し、算術符号化部104の初期
値とする。算術符号化部104は各マクロブロックの符
号化モードと2種類の動きベクトル(前方向動きベクト
ルと後方向動きベクトル)と2次元可変長符号化データ
を算術符号化する。イントラモードでは動きベクトルを
算術符号化しない。前予測モードでは後方向動きベクト
ルを算術符号化せず、後予測モードでは前方向動きベク
トルを算術符号化しない。最後のマクロブロックを算術
符号化した後、発生頻度予備蓄積部116は発生頻度蓄
積部105に蓄積されている発生頻度情報を蓄積する。
発生頻度蓄積部105は現フレームの発生頻度情報を蓄
積する。
Since the third frame is a B frame, the coding mode determining unit 101 determines the intra mode, the pre-prediction mode, the post-prediction mode, or both prediction modes. In the case of the intra mode, the image information is DCT-coded to perform two-dimensional variable length coding. In the case of the pre-prediction mode, the post-prediction mode, or the both prediction modes, motion compensation is performed, and the prediction error is DCT'd to perform two-dimensional variable length coding. The frequency-of-occurrence similarity determination unit 117 arithmetically codes the coding mode, motion vector, and two-dimensional variable-length coded data of the leading macroblock with three types of initial values to generate coded amounts (B1, B2, B).
3) is asked. Motion vectors are not arithmetically encoded in intra mode. The initialization determination unit 108 uses B1, B2, B
3 is compared, the one having a smaller generated code amount is selected, and the initial value is determined. Occurrence frequency initialization unit 106 and occurrence frequency designation unit 1
07 and the occurrence frequency preliminary designation unit 115, which is selected as the initial value, is executed and set as the initial value of the arithmetic coding unit 104. The arithmetic encoding unit 104 arithmetically encodes the encoding mode of each macroblock, two types of motion vectors (forward motion vector and backward motion vector), and two-dimensional variable length encoded data. Motion vectors are not arithmetically encoded in intra mode. In the forward prediction mode, the backward motion vector is not arithmetically encoded, and in the backward prediction mode, the forward motion vector is not arithmetically encoded. After arithmetically coding the last macroblock, the occurrence frequency preliminary accumulating unit 116 accumulates the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105.
The occurrence frequency storage unit 105 stores the occurrence frequency information of the current frame.

【0072】第4フレームはBフレームであるため第3
フレームと同様な処理を行う。第5フレームはPフレー
ムであるため第2フレームと同様な処理を行う。第6、
第7フレームはBフレームであるため第3フレームと同
様な処理を行う。
Since the fourth frame is a B frame, the third frame
Performs the same processing as a frame. Since the fifth frame is a P frame, the same process as the second frame is performed. Sixth,
Since the seventh frame is the B frame, the same process as the third frame is performed.

【0073】以上の処理により図7−(b)の順序で7
枚のフレームを符号化する。
By the above processing, 7 in the order of FIG. 7- (b).
Encode a frame.

【0074】次に、ここで作成された符号化データを復
号する手順を示す。
Next, the procedure for decoding the encoded data created here will be described.

【0075】動画像復号装置の構成例を図4に示す。フ
レーム内の全マクロブロックの算術復号が終了した時の
各Context Modelの発生頻度情報を蓄積す
る発生頻度蓄積部105と、前フレーム復号終了時に発
生頻度蓄積部105に蓄積された発生頻度情報を再度蓄
積する発生頻度予備蓄積部116と、発生頻度情報を予
め設定した初期値で初期化するかどうか、発生頻度蓄積
部105に蓄積されている発生頻度情報(P1)で初期
化するか、発生頻度予備蓄積部116に蓄積されている
発生頻度情報(P2)で初期化するかどうかを示す初期
化情報を復号する初期化情報復号部114と、マクロブ
ロック毎に、符号化モードと動きベクトルとDCT係数
2次元可変長符号を算術復号する算術復号部111と、
符号化モードから動きベクトルを算術復号するかどうか
を決定する符号化モード判定部112と、2次元可変長
符号からDCT係数を復号する予測誤差復号部113
と、符号化モードで動き補償をすると判定された場合に
は動き補償を行う動き補償部102と、発生頻度情報を
予め指定された値に初期化する発生頻度初期化部106
と、発生頻度情報を発生頻度蓄積部105に蓄積されて
いる値に設定する発生頻度指定部107と、発生頻度情
報を発生頻度予備蓄積部116に蓄積されている値に設
定する発生頻度予備指定部115と、で構成される。
FIG. 4 shows an example of the structure of the moving picture decoding apparatus. The occurrence frequency accumulation unit 105 that accumulates the occurrence frequency information of each Context Model when the arithmetic decoding of all macroblocks in the frame is completed, and the occurrence frequency information that is accumulated in the occurrence frequency accumulation unit 105 when the decoding of the previous frame is completed are The occurrence frequency preliminary accumulating unit 116 to be accumulated and whether or not the occurrence frequency information is initialized with a preset initial value, whether to initialize with the occurrence frequency information (P1) accumulated in the occurrence frequency accumulating unit 105, or the occurrence frequency An initialization information decoding unit 114 that decodes initialization information indicating whether to initialize with the occurrence frequency information (P2) stored in the preliminary storage unit 116, a coding mode, a motion vector, and a DCT for each macroblock. An arithmetic decoding unit 111 for arithmetically decoding the coefficient two-dimensional variable length code;
A coding mode determination unit 112 that determines whether to arithmetically decode a motion vector based on the coding mode, and a prediction error decoding unit 113 that decodes a DCT coefficient from a two-dimensional variable length code.
And a motion compensation unit 102 that performs motion compensation when it is determined to perform motion compensation in the encoding mode, and an occurrence frequency initialization unit 106 that initializes occurrence frequency information to a predesignated value.
And an occurrence frequency designation unit 107 that sets the occurrence frequency information to a value stored in the occurrence frequency storage unit 105, and an occurrence frequency preliminary designation that sets the occurrence frequency information to a value stored in the occurrence frequency preliminary storage unit 116. And a unit 115.

【0076】このような構成の元で次のように復号され
る。
Under such a configuration, the decoding is performed as follows.

【0077】第1フレームで、まず初期化情報を復号す
る。初期化情報により、発生頻度初期化部106により
算術復号部111で使用する発生頻度の初期値を予め設
定されている初期値に設定する。続いてマクロブロック
毎に次のように復号される。算術復号部111は符号化
モードを復号する。符号化モード判定部112は、符号
化モードがイントラモードであるため動きベクトルを復
号しないと判定する。算術復号部111は動きベクトル
を復号しない。算術復号部111は2次元可変長符号を
復号する。予測誤差復号部113は2次元可変長符号を
復号して画像情報を求める。以上の処理を全てのマクロ
ブロックに対して行う。最後のマクロブロックを算術復
号した後、発生頻度蓄積部105は発生頻度情報を蓄積
する。動きベクトルに関する発生頻度情報としては、発
生頻度初期化部106に設定されている初期値を蓄積す
る。
In the first frame, the initialization information is first decoded. Based on the initialization information, the occurrence frequency initialization unit 106 sets the initial value of the occurrence frequency used in the arithmetic decoding unit 111 to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112 determines not to decode the motion vector because the coding mode is the intra mode. The arithmetic decoding unit 111 does not decode the motion vector. The arithmetic decoding unit 111 decodes a two-dimensional variable length code. The prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain image information. The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information. As the occurrence frequency information regarding the motion vector, the initial value set in the occurrence frequency initialization unit 106 is accumulated.

【0078】第2フレームで、まず初期化情報を復号す
る。初期化情報に従って、発生頻度蓄積部105に蓄積
されている発生頻度を発生頻度指定部107により算術
復号部111で使用する発生頻度の初期値に設定する
か、または発生頻度初期化部106により算術復号部1
11で使用する発生頻度の初期値を予め設定されている
初期値に設定するかの何れかを行う。続いてマクロブロ
ック毎に次のように復号される。算術復号部111は符
号化モードを復号する。符号化モード判定部112は、
符号化モードがイントラモードである場合には動きベク
トルを復号しないと判定する。この場合、算術復号部1
11は動きベクトルを復号しない。符号化モードが前予
測モードである場合には動きベクトルを復号すると判定
する。この場合、算術復号部111は動きベクトルを復
号する。続いて算術復号部111は2次元可変長符号を
復号する。符号化モードがイントラモードの場合、予測
誤差復号部113は2次元可変長符号を復号して画像情
報を求める。符号化モードが前予測モードの場合、予測
誤差復号部113は2次元可変長符号を復号して予測誤
差を求め、動き補償部102は動きベクトルを使って予
測画像と予測誤差から画像情報を求める。以上の処理を
全てのマクロブロックに対して行う。最後のマクロブロ
ックを算術復号した後、発生頻度予備蓄積部116は発
生頻度蓄積部105に蓄積されている発生頻度情報を蓄
積し、発生頻度蓄積部105は現フレームの発生頻度情
報を蓄積する。
In the second frame, the initialization information is first decoded. According to the initialization information, the occurrence frequency stored in the occurrence frequency accumulating unit 105 is set by the occurrence frequency specifying unit 107 to an initial value of the occurrence frequency used in the arithmetic decoding unit 111, or the occurrence frequency initializing unit 106 performs arithmetic. Decoding section 1
Either the initial value of the occurrence frequency used in 11 is set to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112
When the coding mode is the intra mode, it is determined that the motion vector is not decoded. In this case, the arithmetic decoding unit 1
11 does not decode the motion vector. When the encoding mode is the pre-prediction mode, it is determined to decode the motion vector. In this case, the arithmetic decoding unit 111 decodes the motion vector. Subsequently, the arithmetic decoding unit 111 decodes the two-dimensional variable length code. When the encoding mode is the intra mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the image information. When the coding mode is the pre-prediction mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the prediction error, and the motion compensation unit 102 obtains the image information from the prediction image and the prediction error using the motion vector. . The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency preliminary accumulating unit 116 accumulates the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105, and the occurrence frequency accumulating unit 105 accumulates the occurrence frequency information of the current frame.

【0079】第3フレームでは、まず初期化情報を復号
する。初期化情報に従って、発生頻度蓄積部105に蓄
積されている発生頻度を発生頻度指定部107により算
術復号部111で使用する発生頻度の初期値に設定する
か、または発生頻度予備蓄積部116に蓄積されている
発生頻度を発生頻度予備指定部115により算術復号部
で使用する発生頻度の初期値に設定するか、または発生
頻度初期化部106により算術復号部111で使用する
発生頻度の初期値を予め設定されている初期値に設定す
るかの何れかを行う。続いて、マクロブロック毎に次の
ように復号される。算術復号部111は符号化モードを
復号する。符号化モード判定部112は、符号化モード
がイントラモードである場合には動きベクトルを復号し
ないと判定する。この場合、算術復号部111は動きベ
クトルを復号しない。符号化モードが前予測モードまた
は後予測モードである場合には1つ動きベクトルを復号
すると判定する。この場合、算術復号部111は1つ動
きベクトルを復号する。符号化モードが両予測モードで
ある場合には2つ動きベクトルを復号すると判定する。
この場合、算術復号部111は2つ動きベクトルを復号
する。続いて算術復号部111は2次元可変長符号を復
号する。符号化モードがイントラモードの場合、予測誤
差復号部113は2次元可変長符号を復号して画像情報
を求める。符号化モードが前予測モードまたは後予測モ
ードまたは両予測モードの場合、予測誤差復号部113
は2次元可変長符号を復号して予測誤差を求め、動き補
償部102は動きベクトルを使って予測画像と予測誤差
から画像情報を求める。以上の処理を全てのマクロブロ
ックに対して行う。最後のマクロブロックを算術復号し
た後、発生頻度予備蓄積部116は発生頻度蓄積部10
5に蓄積されている発生頻度情報を蓄積し、発生頻度蓄
積部105は現フレームの発生頻度情報を蓄積する。
In the third frame, the initialization information is first decoded. According to the initialization information, the occurrence frequency accumulated in the occurrence frequency accumulating unit 105 is set by the occurrence frequency specifying unit 107 to the initial value of the occurrence frequency used in the arithmetic decoding unit 111, or accumulated in the occurrence frequency preliminary accumulating unit 116. The occurrence frequency pre-designating unit 115 sets the generated occurrence frequency to the initial value of the occurrence frequency used in the arithmetic decoding unit, or the occurrence frequency initialization unit 106 sets the initial value of the occurrence frequency used in the arithmetic decoding unit 111. Either of setting to a preset initial value is performed. Then, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112 determines not to decode the motion vector when the coding mode is the intra mode. In this case, the arithmetic decoding unit 111 does not decode the motion vector. When the coding mode is the pre-prediction mode or the post-prediction mode, it is determined to decode one motion vector. In this case, the arithmetic decoding unit 111 decodes one motion vector. When the coding mode is the bi-prediction mode, it is determined to decode two motion vectors.
In this case, the arithmetic decoding unit 111 decodes two motion vectors. Subsequently, the arithmetic decoding unit 111 decodes the two-dimensional variable length code. When the encoding mode is the intra mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the image information. When the coding mode is the pre-prediction mode, the post-prediction mode, or the bi-prediction mode, the prediction error decoding unit 113
Is a two-dimensional variable length code to obtain a prediction error, and the motion compensation unit 102 obtains image information from the predicted image and the prediction error using the motion vector. The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency pre-accumulation unit 116 sets the occurrence frequency accumulation unit 10
5, the occurrence frequency information is accumulated, and the occurrence frequency accumulating unit 105 accumulates the occurrence frequency information of the current frame.

【0080】第4フレームはBフレームであるため第3
フレームと同様な処理を行う。第5フレームはPフレー
ムであるため第2フレームと同様な処理を行う。第6、
第7フレームはBフレームであるため第3フレームと同
様な処理を行う。
Since the fourth frame is the B frame, the third frame
Performs the same processing as a frame. Since the fifth frame is a P frame, the same process as the second frame is performed. Sixth,
Since the seventh frame is the B frame, the same process as the third frame is performed.

【0081】以上の処理により図7−(b)の順序で7
枚のフレームを復号する。
By the above processing, 7 in the order of FIG. 7- (b).
Decode one frame.

【0082】以上のように第2の実施形態例によれば、
フレーム毎に算術符号化の発生頻度情報を初期化するか
どうか、または過去に符号化した2フレームの発生頻度
情報のうちどちらを使って初期化するかどうかを決定し
ながら、最も符号化効率が高くなるように動画像を符号
化することができる。また初期化するかどうか、また過
去に符号化した2フレームの発生頻度情報のうちどちら
を使って初期化するのかを示す情報を符号化データ中に
含めるため、復号側でも正確に算術復号を行え、復号画
像を得ることができる。
As described above, according to the second embodiment,
While determining whether to initialize the occurrence frequency information of arithmetic coding for each frame or which of the past two frames of occurrence frequency information to be used for initialization, the highest coding efficiency is determined. Video can be coded to be high. In addition, since information indicating whether to initialize and which of the two frame occurrence frequency information that was encoded in the past is used to be included in the encoded data, the decoding side can also perform accurate arithmetic decoding. , A decoded image can be obtained.

【0083】なお、本実施形態例では、フレーム類似度
によって発生頻度情報を初期化するかどうかを判定し、
初期化するかどうかの情報を符号化したが、この情報を
符号化せず、フレームの符号化モード等に従って、初期
化するかどうかを判定することも可能である。
In the present embodiment, it is determined whether or not the occurrence frequency information is initialized by the frame similarity,
Although the information as to whether or not to initialize is encoded, it is also possible to determine whether or not to initialize according to the encoding mode of the frame without encoding this information.

【0084】また、動画像符号化装置に、フレーム符号
化終了時に発生頻度情報を蓄積するかどうかを指定する
情報を符号化する仕組みを備え、動画像復号装置に、こ
の情報を復号する仕組みを備える構成も可能である。こ
の構成では、無関係に発生頻度情報の蓄積をするかどう
かを選択することができ、符号化効率がよくなるよう
に、発生頻度を蓄積することができる。
Further, the moving picture coding apparatus is provided with a mechanism for coding information designating whether or not to accumulate occurrence frequency information at the end of frame coding, and the moving picture decoding apparatus is provided with a mechanism for decoding this information. It is also possible to have a configuration provided with. In this configuration, it is possible to select whether or not to accumulate the occurrence frequency information regardless of the occurrence, and it is possible to accumulate the occurrence frequency so as to improve the coding efficiency.

【0085】また、本実施形態例ではフレームの符号化
の例を示したが、インタレース動画像においてはフィー
ルドの符号化に適用しても良い。また、本実施形態例で
はフレーム間予測符号化を使用した動画像呼号化の動作
を示したが、フレーム内符号化のみで構成される動画像
符号化に適用しても良い。
In addition, although an example of frame coding is shown in the present embodiment, it may be applied to field coding in an interlaced moving image. Further, although the operation of moving picture coding using inter-frame predictive coding has been shown in the present embodiment example, it may be applied to moving picture coding constituted only by intra-frame coding.

【0086】次に、第3の実施形態例として、Bフレー
ム符号化終了時の発生頻度情報を蓄積するメモリを別途
備え、次のBフレーム符号化開始時に発生頻度情報の初
期化を行うか、あるいは蓄積した2種類の発生頻度情報
をうち、どちらを使うのかを選択する場合の例を示す。
Next, as a third embodiment, a memory for accumulating the occurrence frequency information at the end of B frame encoding is separately provided, and the occurrence frequency information is initialized at the start of the next B frame encoding, or Alternatively, an example is shown in which one of the two types of accumulated occurrence frequency information is selected.

【0087】動画像符号化装置の構成図を図5に示す。
IフレームまたはPフレーム内の全マクロブロックの算
術符号化が終了した時の各Context Model
の発生頻度情報を蓄積する発生頻度蓄積部105と、B
フレーム符号化終了時に発生頻度情報を蓄積する発生頻
度両方向蓄積部119と、IフレームまたはPフレーム
の符号化開始時に、発生頻度蓄積部105に蓄積してい
る発生頻度情報(以後P1と呼ぶ)と予め設定されてい
る初期値のうち、どれが最も符号化効率が高いかを判定
し、またBフレームの符号化開始時に、発生頻度蓄積部
105に蓄積している発生頻度情報(以後P1と呼ぶ)
と発生頻度両方向蓄積部119に蓄積している発生頻度
情報(以後P2と呼ぶ)と予め設定されている初期値の
うち、どれが最も符号化効率が高いかを判定する発生頻
度類似度判定部117と、発生頻度類似度に従って発生
頻度をP1に設定するのかP2に設定するのか初期化す
るのかのいずれかを決定する初期化決定部108と、初
期化したかどうか、また発生頻度をP1に設定したのか
P2に設定したのかを示す初期化情報を符号化する初期
化情報符号化部110と、マクロブロック毎に、動き補
償を行うかどうかを示す符号化モードを決定する符号化
モード決定部101と、動き補償を行う動き補償部10
2と、動き補償を行った場合には予測誤差をDCTし、
行わなかった場合には画像情報をDCTし、DCT係数
を2次元可変長符号化する予測誤差符号化部103と、
符号化モードと動きベクトルとDCT係数をConte
xtModel毎に2値化して算術符号化を行う算術符
号化部104と、発生頻度情報を予め指定された値に初
期化する発生頻度初期化部106と、発生頻度情報を発
生頻度蓄積部105に蓄積されている値に設定する発生
頻度指定部107と、発生頻度情報を発生頻度両方向蓄
積部119に蓄積されている値に設定する発生頻度両方
向指定部118と、で構成される。
FIG. 5 shows a block diagram of the moving picture coding apparatus.
Each Context Model at the end of arithmetic coding of all macroblocks in the I frame or P frame
Occurrence frequency storage unit 105 for accumulating the occurrence frequency information of
An occurrence frequency bidirectional accumulating unit 119 that accumulates occurrence frequency information at the end of frame encoding, and occurrence frequency information (hereinafter referred to as P1) accumulated in the occurrence frequency accumulating unit 105 at the start of encoding an I frame or a P frame. Of the preset initial values, which one has the highest coding efficiency is determined, and the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105 at the start of encoding the B frame (hereinafter referred to as P1). )
And the occurrence frequency similarity determination unit that determines which of the occurrence frequency information (hereinafter, referred to as P2) accumulated in the occurrence frequency bidirectional accumulation unit 119 and a preset initial value has the highest coding efficiency. 117, an initialization determining unit 108 that determines whether the occurrence frequency is set to P1 or P2 or is initialized according to the occurrence frequency similarity, whether initialization is performed, and the occurrence frequency is set to P1. An initialization information encoding unit 110 that encodes initialization information indicating whether it is set or P2, and an encoding mode determination unit that determines an encoding mode indicating whether or not to perform motion compensation for each macroblock. 101 and a motion compensation unit 10 that performs motion compensation
2, DCT of prediction error when motion compensation is performed,
If not performed, the image information is DCTed, and the DCT coefficient is two-dimensionally variable-length coded.
Encoding mode, motion vector, and DCT coefficient
An arithmetic coding unit 104 that binarizes each xtModel to perform arithmetic coding, an occurrence frequency initialization unit 106 that initializes the occurrence frequency information to a predetermined value, and an occurrence frequency information in the occurrence frequency accumulation unit 105. An occurrence frequency designating section 107 for setting the stored value and an occurrence frequency bidirectional designating section 118 for setting the occurrence frequency information to the value stored in the occurrence frequency bidirectional storage section 119.

【0088】発生頻度類似度判定部117と初期化情報
符号化部110以外の動作は第2の実施形態例と同様で
ある。発生頻度類似度判定部117では、現フレーム先
頭マクロブロックを、発生頻度蓄積部105に蓄積され
た発生頻度情報を使って算術符号化した符号量B1と、
発生頻度両方向蓄積部119に蓄積された発生頻度情報
を使って算術符号化した符号量B2と、発生頻度情報を
初期化して算術符号化した符号量B3を求める。初期化
情報符号化部110では、IフレームまたはPフレーム
の場合には、初期化情報として、予め設定した初期値で
初期化するかどうかの情報1ビット(1の場合には初期
化し、0の場合には初期化しない)を符号化する。Bフ
レームの場合には、この情報が0の場合には更に、発生
頻度蓄積部105に蓄積された発生頻度情報を使うか、
または発生頻度両方向蓄積部119に蓄積された発生頻
度情報を使うのかを示す情報1ビットを符号化する。符
号は前者の場合には0、後者の場合には1とする。発生
頻度両方向蓄積部119に蓄積される発生頻度情報は予
め指定された初期値に設定されているものとする。
The operations other than the occurrence frequency similarity determiner 117 and the initialization information encoder 110 are the same as those in the second embodiment. In the occurrence frequency similarity determination unit 117, a code amount B1 in which the current frame head macroblock is arithmetically encoded using the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105,
A code amount B2 that is arithmetically encoded by using the occurrence frequency information accumulated in the occurrence frequency bidirectional accumulation unit 119 and a code amount B3 that is arithmetically encoded by initializing the occurrence frequency information are obtained. In the initialization information encoding unit 110, in the case of an I frame or a P frame, as initialization information, 1 bit of information indicating whether to initialize with a preset initial value (in the case of 1, initialization is performed and 0 If not initialized). In the case of B frame, if this information is 0, the occurrence frequency information accumulated in the occurrence frequency accumulating unit 105 is further used,
Alternatively, one bit of information indicating whether to use the occurrence frequency information accumulated in the occurrence frequency bidirectional accumulation unit 119 is encoded. The code is 0 in the former case and 1 in the latter case. It is assumed that the occurrence frequency information accumulated in the occurrence frequency bidirectional accumulating unit 119 is set to a preset initial value.

【0089】このような前提の下で図7−(b)の順序
で動画像を符号化する場合の各部による処理の手順を示
す。
Under such a premise, the procedure of processing by each unit when encoding a moving image in the order of FIG. 7- (b) will be shown.

【0090】第1フレームでは、Iフレームであるため
全マクロブロックで符号化モード決定部101はイント
ラモードに決定し、画像情報をDCTして2次元可変長
符号化する。発生頻度情報を予め設定した初期値で初期
化する。初期化情報として1を符号化する。算術符号化
部104は各マクロブロックの符号化モードと2次元可
変長符号化データを算術符号化する。最後のマクロブロ
ックを算術符号化した後、発生頻度蓄積部105は発生
頻度情報を蓄積する。動きベクトルに関する発生頻度情
報としては、発生頻度初期化部106に設定されている
初期値を蓄積する。
Since the first frame is an I frame, the coding mode determining unit 101 determines the intra mode for all macroblocks, and DCTs the image information for two-dimensional variable length coding. The occurrence frequency information is initialized with a preset initial value. 1 is encoded as the initialization information. The arithmetic encoding unit 104 arithmetically encodes the encoding mode of each macroblock and the two-dimensional variable length encoded data. After arithmetically encoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information. As the occurrence frequency information regarding the motion vector, the initial value set in the occurrence frequency initialization unit 106 is accumulated.

【0091】第2フレームでは、Pフレームであるため
符号化モード決定部101はイントラモードまたは前予
測モードに決定する。イントラモードの場合には画像情
報をDCTして2次元可変長符号化する。前予測モード
の場合には動き補償し、予測誤差をDCTして2次元可
変長符号化する。発生頻度類似度判定部117は、先頭
マクロブロックの符号化モードと動きベクトルと2次元
可変長符号化データを、2種類の初期値で算術符号化し
発生符号量(B1,B3)を求める。イントラモードで
は動きベクトルを算術符号化しない。初期化決定部10
8は、B1,B3を比較し発生符号量の少ない方を選択
し初期値に決定する。発生頻度初期化部106と、発生
頻度指定部107のうち、初期値として選択されたもの
を実行し、算術符号化部104の初期値とする。算術符
号化部104は各マクロブロックの符号化モードと動き
ベクトルと2次元可変長符号化データを算術符号化す
る。イントラモードでは動きベクトルを算術符号化しな
い。最後のマクロブロックを算術符号化した後、発生頻
度蓄積部105は現フレームの発生頻度情報を蓄積す
る。
Since the second frame is a P frame, the coding mode determining unit 101 determines the intra mode or the previous prediction mode. In the case of the intra mode, the image information is DCT-coded to perform two-dimensional variable length coding. In the case of the pre-prediction mode, motion compensation is performed, and the prediction error is subjected to DCT to perform two-dimensional variable length coding. The occurrence frequency similarity determination unit 117 arithmetically encodes the coding mode of the head macroblock, the motion vector, and the two-dimensional variable-length coded data with two types of initial values to obtain the generated code amount (B1, B3). Motion vectors are not arithmetically encoded in intra mode. Initialization determination unit 10
In step 8, B1 and B3 are compared with each other, the one with the smaller amount of generated code is selected and the initial value is determined. Of the occurrence frequency initialization unit 106 and the occurrence frequency designating unit 107, the one selected as the initial value is executed and set as the initial value of the arithmetic coding unit 104. The arithmetic encoding unit 104 arithmetically encodes the encoding mode and motion vector of each macroblock and the two-dimensional variable length encoded data. Motion vectors are not arithmetically encoded in intra mode. After arithmetically coding the last macroblock, the occurrence frequency accumulation unit 105 accumulates the occurrence frequency information of the current frame.

【0092】第3フレームでは、Bフレームであるため
符号化モード決定部101はイントラモードまたは前予
測モードまたは後予測モードまたは両予測モードに決定
する。イントラモードの場合には画像情報をDCTして
2次元可変長符号化する。前予測モードまたは後予測モ
ードまたは両予測モードの場合には動き補償し、予測誤
差をDCTして2次元可変長符号化する。発生頻度類似
度判定部117は、先頭マクロブロックの符号化モード
と動きベクトルと2次元可変長符号化データを、3種類
の初期値で算術符号化し発生符号量(B1,B2,B
3)を求める。イントラモードでは動きベクトルを算術
符号化しない。初期化決定部108は、B1,B2,B
3を比較し発生符号量の少ないものを選択し初期値に決
定する。発生頻度初期化部106と、発生頻度指定部1
07と、発生頻度両方向指定部118のうち、初期値と
して選択されたものを実行し、算術符号化部104の初
期値とする。算術符号化部104は各マクロブロックの
符号化モードと2種類の動きベクトル(前方向動きベク
トルと後方向動きベクトル)と2次元可変長符号化デー
タを算術符号化する。イントラモードでは動きベクトル
を算術符号化しない。前予測モードでは後方向動きベク
トルを算術符号化せず、後予測モードでは前方向動きベ
クトルを算術符号化しない。最後のマクロブロックを算
術符号化した後、発生頻度両方向蓄積部119は現フレ
ームの発生頻度情報を蓄積する。
Since the third frame is a B frame, the coding mode determining unit 101 determines the intra mode, the pre-prediction mode, the post-prediction mode, or both prediction modes. In the case of the intra mode, the image information is DCT-coded to perform two-dimensional variable length coding. In the case of the pre-prediction mode, the post-prediction mode, or the both prediction modes, motion compensation is performed, and the prediction error is DCT'd to perform two-dimensional variable length coding. The frequency-of-occurrence similarity determination unit 117 arithmetically codes the coding mode, motion vector, and two-dimensional variable-length coded data of the leading macroblock with three types of initial values to generate coded amounts (B1, B2, B).
3) is asked. Motion vectors are not arithmetically encoded in intra mode. The initialization determination unit 108 uses B1, B2, B
3 is compared, a code having a small generated code amount is selected, and the initial value is determined. Occurrence frequency initialization unit 106 and occurrence frequency designation unit 1
07 and the occurrence frequency bidirectional designating section 118, which is selected as the initial value, is executed and set as the initial value of the arithmetic coding section 104. The arithmetic encoding unit 104 arithmetically encodes the encoding mode of each macroblock, two types of motion vectors (forward motion vector and backward motion vector), and two-dimensional variable length encoded data. Motion vectors are not arithmetically encoded in intra mode. In the forward prediction mode, the backward motion vector is not arithmetically encoded, and in the backward prediction mode, the forward motion vector is not arithmetically encoded. After arithmetically coding the last macroblock, the occurrence frequency bidirectional accumulator 119 accumulates the occurrence frequency information of the current frame.

【0093】第4フレームはBフレームであるため第3
フレームと同様な処理を行う。第5フレームはPフレー
ムであるため第2フレームと同様な処理を行う。第6、
第7フレームはBフレームであるため第3フレームと同
様な処理を行う。
Since the fourth frame is a B frame, the third frame
Performs the same processing as a frame. Since the fifth frame is a P frame, the same process as the second frame is performed. Sixth,
Since the seventh frame is the B frame, the same process as the third frame is performed.

【0094】以上の処理により図7−(b)の順序で7
枚のフレームを符号化する。
By the above processing, 7 in the order of FIG.
Encode a frame.

【0095】次に、ここで作成された符号化データを復
号する手順を示す。
Next, the procedure for decoding the coded data created here will be described.

【0096】動画像復号装置の構成例を図6に示す。I
フレームまたはPフレーム内の全マクロブロックの算術
復号が終了した時の各Context Modelの発
生頻度情報を蓄積する発生頻度蓄積部105と、Bフレ
ーム復号終了時に発生頻度情報を蓄積する発生頻度両方
向蓄積部119と、発生頻度情報を予め設定した初期値
で初期化するかどうか、発生頻度蓄積部105に蓄積さ
れている発生頻度情報(P1)で初期化するか、発生頻
度両方向蓄積部119に蓄積されている発生頻度情報
(P2)で初期化するかどうかを示す初期化情報を復号
する初期化情報復号部114と、マクロブロック毎に、
符号化モードと動きベクトルとDCT係数2次元可変長
符号を算術復号する算術復号部111と、符号化モード
から動きベクトルを算術復号するかどうかを決定する符
号化モード判定部112と、2次元可変長符号からDC
T係数を復号する予測誤差復号部113と、符号化モー
ドで動き補償をすると判定された場合には動き補償を行
う動き補償部102と、発生頻度情報を予め指定された
値に初期化する発生頻度初期化部106と、発生頻度情
報を発生頻度蓄積部105に蓄積されている値に設定す
る発生頻度指定部107と、発生頻度情報を発生頻度両
方向蓄積部119に蓄積されている値に設定する発生頻
度両方向指定部118と、で構成される。発生頻度両方
向蓄積部119に蓄積される発生頻度情報は予め指定さ
れた初期値に設定されているものとする。
FIG. 6 shows an example of the structure of the moving picture decoding apparatus. I
Occurrence frequency accumulation unit 105 that accumulates occurrence frequency information of each Context Model when arithmetic decoding of all macroblocks in a frame or P frame is completed, and occurrence frequency bidirectional accumulation unit that accumulates occurrence frequency information at the end of B frame decoding 119 and whether the occurrence frequency information is initialized with a preset initial value, whether it is initialized with the occurrence frequency information (P1) accumulated in the occurrence frequency accumulating unit 105, or accumulated in the occurrence frequency bidirectional accumulating unit 119. The initialization information decoding unit 114 that decodes initialization information indicating whether to initialize with the occurrence frequency information (P2), and for each macroblock,
Coding mode, motion vector, and DCT coefficient Arithmetic decoding unit 111 that arithmetically decodes a two-dimensional variable length code, a coding mode determination unit 112 that determines whether to arithmetically decode a motion vector from the coding mode, and a two-dimensional variable Long code to DC
A prediction error decoding unit 113 that decodes the T coefficient, a motion compensation unit 102 that performs motion compensation when it is determined to perform motion compensation in the encoding mode, and an occurrence frequency information that is initialized to a preset value A frequency initialization unit 106, an occurrence frequency designation unit 107 that sets occurrence frequency information to a value accumulated in the occurrence frequency accumulation unit 105, and an occurrence frequency information set to a value accumulated in an occurrence frequency bidirectional accumulation unit 119. And the occurrence frequency bidirectional designating unit 118. It is assumed that the occurrence frequency information accumulated in the occurrence frequency bidirectional accumulating unit 119 is set to a preset initial value.

【0097】このような構成の元で次のように復号され
る。
Under the above structure, the decoding is performed as follows.

【0098】第1フレームで、まず初期化情報を復号す
る。初期化情報により、発生頻度初期化部106により
算術復号部111で使用する発生頻度の初期値を予め設
定されている初期値に設定する。続いてマクロブロック
毎に次のように復号される。算術復号部111は符号化
モードを復号する。符号化モード判定部112は、符号
化モードがイントラモードであるため動きベクトルを復
号しないと判定する。算術復号部111は動きベクトル
を復号しない。算術復号部111は2次元可変長符号を
復号する。予測誤差復号部113は2次元可変長符号を
復号して画像情報を求める。以上の処理を全てのマクロ
ブロックに対して行う。最後のマクロブロックを算術復
号した後、発生頻度蓄積部105は発生頻度情報を蓄積
する。動きベクトルに関する発生頻度情報としては、発
生頻度初期化部106に設定されている初期値を蓄積す
る。
In the first frame, the initialization information is first decoded. Based on the initialization information, the occurrence frequency initialization unit 106 sets the initial value of the occurrence frequency used in the arithmetic decoding unit 111 to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112 determines not to decode the motion vector because the coding mode is the intra mode. The arithmetic decoding unit 111 does not decode the motion vector. The arithmetic decoding unit 111 decodes a two-dimensional variable length code. The prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain image information. The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information. As the occurrence frequency information regarding the motion vector, the initial value set in the occurrence frequency initialization unit 106 is accumulated.

【0099】第2フレームで、まず初期化情報を復号す
る。初期化情報に従って、発生頻度蓄積部105に蓄積
されている発生頻度を発生頻度指定部107により算術
復号部111で使用する発生頻度の初期値に設定する
か、または発生頻度初期化部106により算術復号部1
11で使用する発生頻度の初期値を予め設定されている
初期値に設定するかの何れかを行う。続いてマクロブロ
ック毎に次のように復号される。算術復号部111は符
号化モードを復号する。符号化モード判定部112は、
符号化モードがイントラモードである場合には動きベク
トルを復号しないと判定する。この場合、算術復号部1
11は動きベクトルを復号しない。符号化モードが前予
測モードである場合には動きベクトルを復号すると判定
する。この場合、算術復号部111は動きベクトルを復
号する。続いて算術復号部111は2次元可変長符号を
復号する。符号化モードがイントラモードの場合、予測
誤差復号部113は2次元可変長符号を復号して画像情
報を求める。符号化モードが前予測モードの場合、予測
誤差復号部113は2次元可変長符号を復号して予測誤
差を求め、動き補償部102は動きベクトルを使って予
測画像と予測誤差から画像情報を求める。以上の処理を
全てのマクロブロックに対して行う。最後のマクロブロ
ックを算術復号した後、発生頻度蓄積部105は現フレ
ームの発生頻度情報を蓄積する。
In the second frame, the initialization information is first decoded. According to the initialization information, the occurrence frequency stored in the occurrence frequency accumulating unit 105 is set by the occurrence frequency specifying unit 107 to an initial value of the occurrence frequency used by the arithmetic decoding unit 111, or the occurrence frequency initializing unit 106 performs arithmetic. Decoding section 1
Either the initial value of the occurrence frequency used in 11 is set to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112
When the coding mode is the intra mode, it is determined that the motion vector is not decoded. In this case, the arithmetic decoding unit 1
11 does not decode the motion vector. When the encoding mode is the pre-prediction mode, it is determined to decode the motion vector. In this case, the arithmetic decoding unit 111 decodes the motion vector. Subsequently, the arithmetic decoding unit 111 decodes the two-dimensional variable length code. When the encoding mode is the intra mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the image information. When the coding mode is the pre-prediction mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the prediction error, and the motion compensation unit 102 uses the motion vector to obtain the image information from the prediction image and the prediction error. . The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency storage unit 105 stores the occurrence frequency information of the current frame.

【0100】第3フレームで、まず初期化情報を復号す
る。初期化情報に従って、発生頻度蓄積部105に蓄積
されている発生頻度を発生頻度指定部107により算術
復号部111で使用する発生頻度の初期値に設定する
か、または発生頻度両方向蓄積部119に蓄積されてい
る発生頻度を発生頻度両方向指定部118により算術復
号部111で使用する発生頻度の初期値に設定するか、
または発生頻度初期化部106により算術復号部111
で使用する発生頻度の初期値を予め設定されている初期
値に設定するかの何れかを行う。続いてマクロブロック
毎に次のように復号される。算術復号部111は符号化
モードを復号する。符号化モード判定部112は、符号
化モードがイントラモードである場合には動きベクトル
を復号しないと判定する。この場合、算術復号部111
は動きベクトルを復号しない。符号化モードが前予測モ
ードまたは後予測モードである場合には1つ動きベクト
ルを復号すると判定する。この場合、算術復号部111
は1つ動きベクトルを復号する。符号化モードが両予測
モードである場合には2つ動きベクトルを復号すると判
定する。この場合、算術復号部111は2つ動きベクト
ルを復号する。続いて算術復号部111は2次元可変長
符号を復号する。符号化モードがイントラモードの場
合、予測誤差復号部113は2次元可変長符号を復号し
て画像情報を求める。符号化モードが前予測モードまた
は後予測モードまたは両予測モードの場合、予測誤差復
号部113は2次元可変長符号を復号して予測誤差を求
め、動き補償部102は動きベクトルを使って予測画像
と予測誤差から画像情報を求める。以上の処理を全ての
マクロブロックに対して行う。最後のマクロブロックを
算術復号した後、発生頻度両方向蓄積部118は現フレ
ームの発生頻度情報を蓄積する。
In the third frame, the initialization information is first decoded. According to the initialization information, the occurrence frequency stored in the occurrence frequency accumulating unit 105 is set by the occurrence frequency designating unit 107 to the initial value of the occurrence frequency used in the arithmetic decoding unit 111, or accumulated in the occurrence frequency bidirectional accumulating unit 119. The occurrence frequency bidirectional designation unit 118 sets the generated occurrence frequency to the initial value of the occurrence frequency used in the arithmetic decoding unit 111, or
Alternatively, the occurrence frequency initialization unit 106 causes the arithmetic decoding unit 111 to
Either of setting the initial value of the occurrence frequency used in (1) to a preset initial value. Subsequently, the following decoding is performed for each macroblock. The arithmetic decoding unit 111 decodes the coding mode. The coding mode determination unit 112 determines not to decode the motion vector when the coding mode is the intra mode. In this case, the arithmetic decoding unit 111
Does not decode the motion vector. When the coding mode is the pre-prediction mode or the post-prediction mode, it is determined to decode one motion vector. In this case, the arithmetic decoding unit 111
Decodes one motion vector. When the coding mode is the bi-prediction mode, it is determined to decode two motion vectors. In this case, the arithmetic decoding unit 111 decodes two motion vectors. Subsequently, the arithmetic decoding unit 111 decodes the two-dimensional variable length code. When the encoding mode is the intra mode, the prediction error decoding unit 113 decodes the two-dimensional variable length code to obtain the image information. When the coding mode is the pre-prediction mode, the post-prediction mode, or both prediction modes, the prediction error decoding unit 113 decodes the two-dimensional variable-length code to obtain the prediction error, and the motion compensation unit 102 uses the motion vector to predict the predicted image. And the image information is obtained from the prediction error. The above processing is performed for all macroblocks. After arithmetically decoding the last macroblock, the occurrence frequency bidirectional accumulation unit 118 accumulates the occurrence frequency information of the current frame.

【0101】第4フレームはBフレームであるため第3
フレームと同様な処理を行う。第5フレームはPフレー
ムであるため第2フレームと同様な処理を行う。第6、
第7フレームはBフレームであるため第3フレームと同
様な処理を行う。
Since the fourth frame is the B frame, the third frame
Performs the same processing as a frame. Since the fifth frame is a P frame, the same process as the second frame is performed. Sixth,
Since the seventh frame is the B frame, the same process as the third frame is performed.

【0102】以上の処理により図7−(b)の順序で7
枚のフレームを復号する。
By the above processing, 7 in the order of FIG. 7- (b).
Decode one frame.

【0103】以上のように第3の実施形態例によれば、
IまたはPフレーム符号化時に算術符号化の発生頻度情
報を初期化するかどうか、または過去に符号化したIま
たはPフレームの発生頻度情報を使って初期化するかど
うかを決定しながら、さらにBフレーム符号化時に算術
符号化の発生頻度情報を初期化するかどうか、または過
去に符号化した2フレームの発生頻度情報のうちどちら
を使って初期化するかどうかを決定しながら、最も符号
化効率が高くなるように動画像を符号化することができ
る。また初期化するかどうか、また過去に符号化した2
フレームの発生頻度情報のうちどちらを使って初期化す
るのかを示す情報を符号化データ中に含めるため、復号
側でも正確に算術復号を行え、復号画像を得ることがで
きる。
As described above, according to the third embodiment,
While deciding whether to initialize the occurrence frequency information of arithmetic coding at the time of I or P frame coding, or whether to initialize using the occurrence frequency information of I or P frames coded in the past, B While determining whether to initialize the occurrence frequency information of arithmetic coding at the time of frame coding, or which of the occurrence frequency information of the two frames coded in the past should be used, The moving image can be encoded so that Whether or not to initialize again, and 2 encoded in the past
Since information indicating which of the frame occurrence frequency information is used for initialization is included in the encoded data, the decoding side can also perform accurate arithmetic decoding and obtain a decoded image.

【0104】なお、本実施形態例では、初期化情報を符
号化したが、これを符号化せず、フレームの符号化モー
ドや符号化したフレーム数に従って、初期化方法を判定
することも可能である。例えば、第1フレームのIフレ
ームのみ予め設定された初期値により初期化を行い、途
中の第2フレームと第5フレームのPフレームと、第3
フレームと第6フレームのBフレームでは発生頻度蓄積
部105に蓄積された発生頻度により初期化を行い、第
4フレームと第7フレームのBフレームでは発生頻度両
方向蓄積部119に蓄積された発生頻度により初期化を
行うこともできる。この場合には初期化するかどうかの
情報を符号化しなくてもよく、符号化効率を向上させる
ことができる。また特定の符号化モードのフレームの
み、初期化するかどうかの情報を符号化する方法も可能
である。
Although the initialization information is encoded in this embodiment, it is possible to determine the initialization method according to the encoding mode of the frame and the number of encoded frames without encoding this. is there. For example, only the I-frame of the first frame is initialized by a preset initial value, and the second and fifth P-frames in the middle and the third frame
For the B frame of the frame and the sixth frame, initialization is performed by the occurrence frequency accumulated in the occurrence frequency accumulating unit 105, and in the B frames of the fourth frame and the seventh frame, the occurrence frequency is accumulated by the occurrence frequency accumulated in the bidirectional accumulation unit 119. It can also be initialized. In this case, it is not necessary to code the information as to whether or not to initialize, and the coding efficiency can be improved. It is also possible to use a method of encoding information as to whether or not to initialize only a frame in a specific encoding mode.

【0105】この方法によれば、動画像の早送り再生の
時に、途中のBフレームを復号せずにIフレームとPフ
レームのみ復号することが可能である。第2の実施形態
例と異なり、この構成では、第4フレームのBフレーム
の符号化に第3フレームのBフレーム符号化終了時の発
生頻度情報を使うこともできる。
According to this method, at the time of fast-forward reproduction of a moving image, it is possible to decode only the I frame and P frame without decoding the intermediate B frame. Unlike the second embodiment, in this configuration, the occurrence frequency information at the end of the B frame encoding of the third frame can be used for encoding the B frame of the fourth frame.

【0106】なお、動画像符号化装置に、フレーム符号
化終了時に発生頻度情報を蓄積するかどうかを指定する
情報を符号化する仕組みを備え、動画像復号装置に、こ
の情報を復号する仕組みを備えると、発生頻度情報の蓄
積をするかどうかを選択することができ、符号化効率が
よくなるように、発生頻度を蓄積することができる。
The moving picture coding apparatus is provided with a mechanism for coding information designating whether or not to store the occurrence frequency information at the end of frame coding, and the moving picture decoding apparatus is provided with a mechanism for decoding this information. With this provision, it is possible to select whether or not to accumulate the occurrence frequency information, and it is possible to accumulate the occurrence frequency so as to improve the coding efficiency.

【0107】また、本実施形態例ではフレームの符号化
の例を示したが、インタレース動画像においてはフィー
ルドの符号化に適用しても良い。
Further, although an example of frame coding is shown in this embodiment, it may be applied to field coding in an interlaced moving image.

【0108】なお、図1〜図6で示した装置における各
部の一部もしくは全部の機能をコンピュータのプログラ
ムで構成し、そのプログラムをコンピュータを用いて実
行して本発明を実現することができること、あるいは、
これらの図を用いて説明した処理の手順をコンピュータ
のプログラムで構成し、そのプログラムをコンピュータ
に実行させることができることは言うまでもなく、コン
ピュータでその機能を実現するためのプログラム、ある
いは、コンピュータにその処理の手順を実行させるため
のプログラムを、そのコンピュータが読み取り可能な記
録媒体、例えば、FD(フロッピーディスク(登録商
標))や、MO、ROM、メモリカード、CD、DV
D、リムーバブルディスクなどに記録して、保存した
り、配布したりすることが可能である。また、上記のプ
ログラムをインターネットや電子メールなど、ネットワ
ークを通して提供することも可能である。
It should be noted that the present invention can be realized by configuring a part or all of the functions of each part in the apparatus shown in FIGS. 1 to 6 by a computer program and executing the program by using the computer. Alternatively,
It is needless to say that the procedure of the processing described with reference to these figures can be configured by a program of a computer and the program can be executed by the computer. The program for executing the procedure is stored in a computer-readable recording medium, for example, FD (floppy disk (registered trademark)), MO, ROM, memory card, CD, DV.
It is possible to record on a D, removable disk, etc., and save or distribute it. It is also possible to provide the above program through a network such as the Internet or electronic mail.

【0109】[0109]

【発明の効果】本発明によれば、Context Mo
delを使った算術符号化を使用して動画像を符号化す
る場合に、フレーム毎またはフィールド毎に発生頻度を
初期化するかどうかを選択することができる。そのた
め、時間方向の相関性が高いフレーム間では、前フレー
ムで安定した発生頻度を使用することができ、符号化効
率を向上させることができる。
According to the present invention, Context Mo
When encoding a moving image using arithmetic encoding using del, it is possible to select whether to initialize the occurrence frequency for each frame or each field. Therefore, between frames having high temporal correlation, a stable occurrence frequency can be used in the previous frame, and coding efficiency can be improved.

【0110】また、フレームの符号化モードにより発生
頻度を初期化するかどうかを選択する場合には、初期化
するかどうかの情報を符号化せずに、復号側に初期化す
るかどうかを指定することができる。
When selecting whether or not to initialize the occurrence frequency according to the frame encoding mode, it is specified whether or not to initialize the information about whether or not to initialize, on the decoding side. can do.

【0111】また、フレームまたはフィールドの符号化
モードまたはGOPの先頭かどうかの情報を使う場合に
は、初期化するかどうかの情報を符号化せずに、復号側
に初期化するかどうかを指定することができる。
Further, when the information on whether the coding mode of the frame or field or the head of the GOP is used, it is specified whether the information on whether to initialize or not is not encoded and is initialized on the decoding side. can do.

【0112】また、フレームまたはフィールド開始時
に、蓄積しておいた発生頻度の中から符号量の少ない発
生頻度の方を選択して使用することができ、符号化効率
を向上させることができる。
Further, at the start of a frame or field, it is possible to select and use the occurrence frequency with the smaller code amount from the accumulated occurrence frequencies, and it is possible to improve the coding efficiency.

【0113】また、同タイプのフレームまたはフィール
ドの終了時の発生頻度情報を用いて初期化することがで
き、符号化効率を向上させることができる。
Further, the initialization can be performed by using the occurrence frequency information at the end of the frame or field of the same type, and the coding efficiency can be improved.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第1の実施形態例における画像符号化
装置の構成図
FIG. 1 is a configuration diagram of an image encoding device according to a first embodiment of the present invention.

【図2】本発明の第1の実施形態例における画像復号装
置の構成図
FIG. 2 is a configuration diagram of an image decoding apparatus according to the first embodiment of the present invention.

【図3】本発明の第2の実施形態例における画像符号化
装置の構成図
FIG. 3 is a configuration diagram of an image coding apparatus according to a second embodiment of the present invention.

【図4】本発明の第2の実施形態例における画像復号装
置の構成図
FIG. 4 is a configuration diagram of an image decoding device according to a second embodiment of the present invention.

【図5】本発明の第3の実施形態例における画像符号化
装置の構成図
FIG. 5 is a configuration diagram of an image encoding device according to a third embodiment of the present invention.

【図6】本発明の第3の実施形態例における面像復号装
置の構成図
FIG. 6 is a configuration diagram of a plane image decoding apparatus according to a third embodiment of the present invention.

【図7】予測関係の例の説明図FIG. 7 is an explanatory diagram of an example of a prediction relationship.

【符号の説明】[Explanation of symbols]

101…符号化モード決定部 102…動き補償部 103…予測誤差符号化部 104…算術符号化部 105…発生頻度蓄積部 106…発生頻度初期化部 107…発生頻度指定部 108…初期化決定部 109…フレーム類似度判定部 110…初期化情報符号化部 111…算術復号部 112…符号化モード判定部 113…予測誤差復号部 114…初期化情報復号部 115…発生頻度予備指定部 116…発生頻度予備蓄積部 117…発生頻度類似度判定部 118…発生頻度両方向指定部 119…発生頻度両方向蓄積部 101 ... Encoding mode determination unit 102 ... Motion compensation unit 103 ... Prediction error coding unit 104 ... Arithmetic Coding Unit 105 ... Occurrence frequency accumulation unit 106 ... Occurrence frequency initialization unit 107 ... Occurrence frequency designation unit 108 ... Initialization determination unit 109 ... Frame similarity determination unit 110 ... Initialization information coding unit 111 ... Arithmetic decoding unit 112 ... Encoding mode determination unit 113 ... Prediction error decoding unit 114 ... Initialization information decoding unit 115 ... Occurrence frequency preliminary designation section 116 ... Occurrence frequency preliminary storage unit 117 ... Occurrence frequency similarity determination unit 118 ... Occurrence frequency bidirectional designating section 119 ... Frequency of occurrence Bi-directional accumulation section

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 MA05 MA14 MA23 ME11 NN01 PP05 PP06 PP07 RB02 RC37 SS20 UA02 UA05 UA38 5J064 AA01 BA10 BA16 BB06 BC01 BC08 BC16 BC29 BD03    ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 5C059 MA05 MA14 MA23 ME11 NN01                       PP05 PP06 PP07 RB02 RC37                       SS20 UA02 UA05 UA38                 5J064 AA01 BA10 BA16 BB06 BC01                       BC08 BC16 BC29 BD03

Claims (19)

【特許請求の範囲】[Claims] 【請求項1】 Context Modelを使った算
術符号化を使用して動画像を符号化する方法であって、 フレームまたはフィールドの符号化開始時にConte
xt Modelの発生頻度を、予め指定された値に設
定する発生頻度初期化手段と、 フレームまたはフィールドの符号化終了時にConte
xt Modelの発生頻度を蓄積する発生頻度蓄積手
段と、 フレームまたはフィールドの符号化開始時にConte
xt Modelの発生頻度を、前記発生頻度蓄積手段
で蓄積された発生頻度に設定する発生頻度指定手段と、
を用い、 フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段の、何れを使用する
かを選択することを特徴とする動画像符号化方法。
1. A method for encoding a moving image using arithmetic encoding using a Context Model, which comprises:
Occurrence frequency initialization means for setting the occurrence frequency of the xt Model to a value designated in advance, and Context when the encoding of the frame or field is completed.
Occurrence frequency accumulating means for accumulating the occurrence frequency of the xt Model, and the Context at the start of encoding of the frame or field.
occurrence frequency designating means for setting the occurrence frequency of xt Model to the occurrence frequency accumulated by the occurrence frequency accumulating means;
Is used to select which of the occurrence frequency initialization means or the occurrence frequency designation means is used at the start of encoding the frame or field.
【請求項2】 請求項1に記載の動画像符号化方法であ
って、 発生頻度初期化手段または発生頻度指定手段の、どちら
を使用したのかを示す情報を符号化することを特徴とす
る動画像符号化方法。
2. The moving image coding method according to claim 1, wherein information indicating which of the occurrence frequency initialization means and the occurrence frequency designation means is used is coded. Image coding method.
【請求項3】 請求項1に記載の動画像符号化方法であ
って、 フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段の、何れを使用する
かを選択するにあたり、 フレーム内符号化したフレームまたはフィールドの符号
化開始時には発生頻度初期化手段を使用し、フレーム間
符号化したフレームまたはフィールドの符号化開始時に
は発生頻度指定手段を使用することを特徴とする動画像
符号化方法。
3. The moving picture coding method according to claim 1, wherein when the coding of a frame or a field is started, the occurrence frequency initialization means or the occurrence frequency designating means is selected. , A moving image characterized by using an occurrence frequency initialization means at the start of encoding an intra-frame encoded frame or field and using an occurrence frequency designating means at the start of encoding an inter-frame encoded frame or field Encoding method.
【請求項4】 請求項1に記載の動画像符号化方法であ
って、 フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段の、何れを使用する
かを選択するにあたり、 複数のフレームを符号化データ中の1つの構成単位とし
て指定するGOP指定手段を用い、 GOP指定手段で指定される構成単位の先頭フレームま
たはフィールドの符号化開始時には発生頻度初期化手段
を使用し、構成単位内の途中のフレームまたはフィール
ドの符号化開始時には発生頻度指定手段を使用すること
を特徴とする動画像符号化方法。
4. The moving picture coding method according to claim 1, wherein when the coding of a frame or a field is started, either the occurrence frequency initialization means or the occurrence frequency designation means is selected. , Using a GOP designating means for designating a plurality of frames as one constituent unit in the encoded data, and using an occurrence frequency initialization means at the start of coding of the first frame or field of the constituent unit designated by the GOP designating means. A moving picture coding method characterized by using an occurrence frequency designating means at the time of starting coding of a frame or field in the middle of a constituent unit.
【請求項5】 Context Modelを使った算
術符号化を使用して動画像を符号化する方法であって、 フレームまたはフィールドの符号化開始時にConte
xt Modelの発生頻度を、予め指定された値に設
定する発生頻度初期化手段と、 フレームまたはフィールドの符号化終了時にConte
xt Modelの発生頻度を蓄積する発生頻度蓄積手
段と、 フレームまたはフィールドの符号化開始時にConte
xt Modelの発生頻度を、前記発生類度蓄積手段
で蓄積された発生頻度に設定する発生頻度指定手段と、 フレームまたはフィールドの符号化終了時に前記発生頻
度蓄積手段によって蓄積されている発生頻度情報を複写
して蓄積する発生頻度予備蓄積手段と、 フレームまたはフィールドの符号化開始時にConte
xt Modelの発生頻度を、前記発生頻度予備蓄積
手段で蓄積された発生頻度に設定する発生頻度予備指定
手段と、を用い、 フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段または発生頻度予備
指定手段の、何れを使用するかを選択することを特徴と
する動画像符号化方法。
5. A method of encoding a moving image using arithmetic encoding using a Context Model, the method comprising:
Occurrence frequency initialization means for setting the occurrence frequency of the xt Model to a value designated in advance, and Context when the encoding of the frame or field is completed.
Occurrence frequency accumulating means for accumulating the occurrence frequency of the xt Model, and the Context at the start of encoding of the frame or field.
An occurrence frequency designating unit that sets the occurrence frequency of xt Model to the occurrence frequency accumulated by the occurrence degree accumulating unit, and the occurrence frequency information accumulated by the occurrence frequency accumulating unit at the end of encoding of the frame or field. Occurrence frequency pre-accumulation means for copying and accumulating, and Context at the start of encoding a frame or field.
An occurrence frequency pre-designating means for setting the occurrence frequency of the xt Model to the occurrence frequency accumulated by the occurrence frequency preliminary accumulating means, and using the occurrence frequency initializing means or the occurrence frequency specifying means at the start of encoding of the frame or field. Means or the occurrence frequency preliminary designation means is selected, which is used.
【請求項6】 請求項5に記載の動画像符号化方法であ
って、 フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段または発生頻度予備
指定手段の、何れを使用したのかを示す情報を符号化す
ることを特徴とする動画像符号化方法。
6. The moving picture coding method according to claim 5, wherein any one of the occurrence frequency initialization means, the occurrence frequency designating means and the occurrence frequency preliminary designation means is used at the start of coding of the frame or field. A moving picture coding method, characterized by coding information indicating whether or not it has been done.
【請求項7】 Context Modelを使った算
術符号化を使用して動画像を符号化する方法であって、 フレームまたはフィールドの符号化モードとして、フレ
ーム内符号化、前方向予測フレーム間符号化、両方向予
測フレーム間符号化の、何れかを選択でき、フレームま
たはフィールドの符号化開始時にContext Mo
delの発生頻度を、予め指定された値に設定する発生
頻度初期化手段と、 フレーム内符号化または前方向予測フレーム間符号化を
使用した、フレームまたはフィールドの符号化終了時に
Context Modelの発生頻度を蓄積する発生
頻度蓄積手段と、 両方向予測フレーム間符号化を使用した、フレームまた
はフィールドの符号化終了時にContext Mod
elの発生頻度を蓄積する発生頻度両方向蓄積手段と、 フレームまたはフィールドの符号化開始時にConte
xt Modelの発生類度を、前記発生頻度蓄積手段
で蓄積された発生頻度に設定する発生頻度指定手段と、 両方向予測フレーム間符号化を使用した、フレームまた
はフィールドの符号化開始時にContext Mod
elの発生頻度を、前記発生頻度両方向蓄積手段で蓄積
された発生頻度に設定する発生頻度両方向指定手段と、
を用い、 フレーム内符号化または前方向予測フレーム間符号化を
使用した、フレームまたはフィールドの符号化開始時に
は、発生頻度初期化手段または発生頻度指定手段の、何
れを使用するかを選択し、 両方向予測フレーム間符号化を使用した、フレームまた
はフィールドの符号化開始時には、発生頻度初期化手段
または発生頻度指定手段または発生頻度両方向指定手段
の、何れを使用するかを選択することを特徴とする動画
像符号化方法。
7. A method for encoding a moving image using arithmetic encoding using a Context Model, comprising intraframe encoding, forward prediction interframe encoding as an encoding mode of a frame or field, Either of the bidirectional prediction interframe coding can be selected, and the Context Mo at the start of the frame or field coding.
Occurrence frequency initialization means for setting the occurrence frequency of del to a predetermined value, and occurrence frequency of Context Model at the end of encoding of a frame or field using intraframe coding or forward prediction interframe coding And a Context Mod at the end of the coding of the frame or field using the bidirectional prediction interframe coding,
Occurrence frequency bidirectional accumulating means for accumulating the occurrence frequency of el and Context at the start of encoding of the frame or field.
Occurrence frequency designating means for setting the occurrence degree of xt Model to the occurrence frequency accumulated by the occurrence frequency accumulating means, and Context Mod at the start of encoding of a frame or field using bidirectional prediction interframe encoding.
occurrence frequency bidirectional designation means for setting the occurrence frequency of el to the occurrence frequency accumulated by the occurrence frequency bidirectional accumulation means,
At the start of coding a frame or field using intraframe coding or forward prediction interframe coding, select whether to use occurrence frequency initialization means or occurrence frequency designation means, and A moving image characterized by selecting which of the occurrence frequency initialization means, the occurrence frequency designating means or the occurrence frequency bidirectional designation means is used at the start of coding of a frame or field using predictive interframe coding. Image coding method.
【請求項8】 請求項7に記載の動画像符号化方法であ
って、 フレームまたはフィールドの符号化開始時に、発生頻度
初期化手段または発生頻度指定手段または発生頻度両方
向指定手段の、何れを使用したのかを示す情報を符号化
することを特徴とする動画像符号化方法。
8. The moving picture coding method according to claim 7, wherein at the start of coding of a frame or a field, any one of occurrence frequency initialization means, occurrence frequency designating means or occurrence frequency bidirectional designating means is used. A moving picture coding method, characterized by coding information indicating whether or not it has been done.
【請求項9】 Context Modelを使った算
術符号化を使用して動画像符号化データを復号する方法
であって、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、予め指定された値に設定
する発生頻度初期化手段と、 フレームまたはフィールドの復号終了時にContex
t Modelの発生頻度を蓄積する発生頻度蓄積手段
と、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、前記発生頻度蓄積手段で
蓄積された発生頻度に設定する発生頻度指定手段と、を
用い、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段の、何れを使用するか
を選択することを特徴とする動画像復号方法。
9. A method for decoding moving image coded data using arithmetic coding using a Context Model, the method comprising:
An occurrence frequency initialization means for setting the occurrence frequency of t Model to a value specified in advance, and a Context at the end of decoding of the frame or field.
An occurrence frequency accumulating means for accumulating the occurrence frequency of t Model, and a Context at the time of starting the decoding of the frame or field.
Using the occurrence frequency designating means for setting the occurrence frequency of t Model to the occurrence frequency accumulated in the occurrence frequency accumulating means, the occurrence frequency initializing means or the occurrence frequency designating means at the start of decoding the frame or field, A moving image decoding method characterized by selecting which one to use.
【請求項10】 請求項9に記載の動画像復号方法であ
って、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段の、何れを使用するか
を選択するにあたり、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段の、何れを使用して復
号できるのかを示す符号化情報を復号し、その情報に従
って選択することを特徴とする動画像復号方法。
10. The moving picture decoding method according to claim 9, wherein at the time of starting the decoding of the frame or field, the frame frequency is determined by selecting whether to use the occurrence frequency initialization means or the occurrence frequency designating means. Alternatively, at the start of decoding the field, the moving picture decoding method is characterized in that the coded information indicating which of the occurrence frequency initialization means and the occurrence frequency designation means can be used for decoding is decoded and selected according to the information. .
【請求項11】 Context Modelを使った
算術符号化を使用して動画像符号化データを復号する方
法であって、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、予め指定された値に設定
する発生頻度初期化手段と、 フレームまたはフィールドの復号終了時にContex
t Modelの発生頻度を蓄積する発生頻度蓄積手段
と、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、前記発生頻度蓄積手段で
蓄積された発生頻度に設定する発生頻度指定手段と、を
用い、 フレームまたはフィールドの復号開始時に、そのフレー
ムまたはフィールドの符号化モード、またはGOPの先
頭かどうかの情報に従って、発生頻度初期化手段または
発生頻度指定手段の、何れを使用するかを選択すること
を特徴とする動画像復号方法。
11. A method of decoding moving image coded data using arithmetic coding using a Context Model, the method comprising:
An occurrence frequency initialization means for setting the occurrence frequency of t Model to a value specified in advance, and a Context at the end of decoding of the frame or field.
An occurrence frequency accumulating means for accumulating the occurrence frequency of t Model, and a Context at the time of starting the decoding of the frame or field.
Using the occurrence frequency designating means for setting the occurrence frequency of t Model to the occurrence frequency accumulated in the occurrence frequency accumulating means, at the start of decoding the frame or field, the encoding mode of the frame or field, or the GOP A moving image decoding method, characterized in that which of the occurrence frequency initialization means and the occurrence frequency designation means is to be used is selected according to the information indicating whether it is the head or not.
【請求項12】 Context Modelを使った
算術符号化を使用して動画像符号化データを復号する方
法であって、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、予め指定された値に設定
する発生頻度初期化手段と、 フレームまたはフィールドの復号終了時にContex
t Modelの発生頻度を蓄積する発生頻度蓄積手段
と、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、前記発生頻度蓄積手段で
蓄積された発生頻度に設定する発生頻度指定手段と、 フレームまたはフィールドの復号終了時に、前記発生頻
度蓄積手段によって蓄積されている発生頻度情報を複写
して蓄積する発生頻度予備蓄積手段と、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、前記発生頻度予備蓄積手
段で蓄積された発生頻度に設定する発生頻度予備指定手
段と、を用い、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段または発生頻度予備指
定手段の、何れを使用するかを選択することを特徴とす
る動画像復号方法。
12. A method of decoding moving image coded data using arithmetic coding using a Context Model, the method comprising:
An occurrence frequency initialization means for setting the occurrence frequency of t Model to a value specified in advance, and a Context at the end of decoding of the frame or field.
An occurrence frequency accumulating means for accumulating the occurrence frequency of t Model, and a Context at the time of starting the decoding of the frame or field.
An occurrence frequency designating unit that sets the occurrence frequency of t Model to the occurrence frequency accumulated by the occurrence frequency accumulating unit, and copies the occurrence frequency information accumulated by the occurrence frequency accumulating unit at the end of decoding of the frame or field. Occurrence frequency pre-accumulation means for accumulation and accumulation, and Context at the start of decoding a frame or field
occurrence frequency pre-designating means for setting the occurrence frequency of t Model to the occurrence frequency accumulated by the occurrence frequency preliminary accumulating means, and using the occurrence frequency initializing means or the occurrence frequency specifying means at the start of decoding of a frame or field. Alternatively, the moving image decoding method is characterized in that which of the occurrence frequency preliminary designation means is used is selected.
【請求項13】 請求項12に記載の動画像復号方法で
あって、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段または発生頻度予備指
定手段の、何れを使用するかを選択するにあたり、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段または発生頻度予備指
定手段の、何れを使用して復号できるのかを示す符号化
情報を復号し、その情報に従って選択することを特徴と
する動画像復号方法。
13. The moving picture decoding method according to claim 12, which of the occurrence frequency initialization means, the occurrence frequency designation means, and the occurrence frequency preliminary designation means is used at the start of decoding of a frame or a field. In selecting, when the decoding of the frame or field is started, the coding information indicating which of the occurrence frequency initialization means, the occurrence frequency designation means or the occurrence frequency preliminary designation means can be used for decoding is decoded, and the information is decoded. A moving picture decoding method characterized by selecting according to the following.
【請求項14】 Context Modelを使った
算術復号を使用して動画像を復号する方法であって、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、予め指定された値に設定
する発生頻度初期化手段と、 フレーム内符号化または前方向予測フレーム間符号化を
使用した、フレームまたはフィールドの復号終了時にC
ontext Modelの発生頻度を蓄積する発生頻
度蓄積手段と、 両方向予測フレーム間符号イーを使用した、フレームま
たはフィールドの復号終了時にContext Mod
elの発生頻度を蓄積する発生頻度両方向蓄積手段と、 フレームまたはフィールドの復号開始時にContex
t Modelの発生頻度を、前記発生頻度蓄積手段で
蓄積された発生頻度に設定する発生頻度指定手段と、 両方向予測フレーム間符号化を使用した、フレームまた
はフィールドの復号開始時にContext Mode
lの発生頻度を、前記発生頻度両方向蓄積手段で蓄積さ
れた発生頻度に設定する発生頻度両方向指定手段と、を
用い、 フレーム内符号化または前方向予測フレーム間符号化を
使用した、フレームまたはフィールドの復号開始時に、
発生頻度初期化手段または発生頻度指定手段の、何れか
を選択し、両方向予測フレーム間符号化を使用した、フ
レームまたはフィールドの復号開始時に、発生頻度初期
化手段または発生頻度指定手段または発生頻度両方向指
定手段の、何れかを選択することを特徴とする動画像復
号方法。
14. A method for decoding a moving image using arithmetic decoding using a Context Model, which comprises:
The occurrence frequency initialization means for setting the occurrence frequency of t Model to a predetermined value, and C at the end of decoding of the frame or field using intraframe coding or forward prediction interframe coding
An occurrence frequency accumulating unit that accumulates the occurrence frequency of the Context Model and a Context Mod at the end of decoding of the frame or field using the bidirectional prediction interframe code EE.
Occurrence frequency bidirectional accumulation means for accumulating the occurrence frequency of el, and Context at the start of decoding of the frame or field
An occurrence frequency designating unit that sets the occurrence frequency of t Model to the occurrence frequency accumulated by the occurrence frequency accumulating unit, and a Context Mode at the start of decoding a frame or field using bidirectional prediction interframe coding.
a frame or field using intra-frame coding or forward prediction inter-frame coding by using the occurrence frequency bidirectional designating means for setting the occurrence frequency of l to the occurrence frequency accumulated by the occurrence frequency bidirectional accumulating means. At the start of decoding
Occurrence frequency initialization means or occurrence frequency designating means or occurrence frequency bidirectional at the start of decoding of a frame or field using either bidirectional prediction interframe coding by selecting either occurrence frequency initialization means or occurrence frequency designating means A moving image decoding method, characterized in that any one of the designation means is selected.
【請求項15】 請求項14に記載の動画像復号方法で
あって、 フレーム内符号化または前方向予測フレーム間符号化を
使用した、フレームまたはフィールドの復号開始時に、
発生頻度初期化手段または発生頻度指定手段の、何れか
を選択し、両方向予測フレーム間符号化を使用した、フ
レームまたはフィールドの復号開始時に、発生頻度初期
化手段または発生頻度指定手段または発生頻度両方向指
定手段の、何れかを選択するにあたり、 フレームまたはフィールドの復号開始時に、発生頻度初
期化手段または発生頻度指定手段または発生頻度両方向
指定手段の、何れを使用して復号できるのかを示す符号
化情報を復号し、その情報に従って選択することを特徴
とする動画像復号方法。
15. The moving picture decoding method according to claim 14, wherein at the start of decoding a frame or field using intraframe coding or forward prediction interframe coding,
Occurrence frequency initialization means or occurrence frequency designating means or occurrence frequency bidirectional at the start of decoding of a frame or field using either bidirectional prediction interframe coding by selecting either occurrence frequency initialization means or occurrence frequency designating means Encoding information indicating which of the occurrence frequency initialization means, the occurrence frequency designation means, or the occurrence frequency bidirectional designation means can be used for decoding at the start of decoding a frame or field when selecting any of the designation means A video decoding method, characterized in that the video is decoded and selected according to the information.
【請求項16】 請求項1から8のいずれか1項に記載
の動画像符号化方法における手順を、コンピュータに実
行させるためのプログラムとしたことを特徴とする動画
像符号化方法の実行プログラム。
16. An execution program for a moving picture coding method, characterized in that a program for causing a computer to execute the procedure in the moving picture coding method according to claim 1.
【請求項17】 請求項1から8のいずれか1項に記載
の動画像符号化方法における手順を、コンピュータに実
行させるためのプログラムとし、該プログラムを、該コ
ンピュータが読み取りできる記録媒体に記録したことを
特徴とする動画像符号化方法の実行プログラムを記録し
た記録媒体。
17. A program for causing a computer to execute the procedure in the moving picture coding method according to claim 1, wherein the program is recorded in a recording medium readable by the computer. A recording medium on which an execution program of a moving picture coding method is recorded.
【請求項18】 請求項9から15のいずれか1項に記
載の動画像復号方法における手順を、コンピュータに実
行させるためのプログラムとしたことを特徴とする動画
像復号方法の実行プログラム。
18. A program for executing a moving picture decoding method, characterized in that a program for causing a computer to execute the procedure in the moving picture decoding method according to claim 9.
【請求項19】 請求項9から15のいずれか1項に記
載の動画像復号方法における手順を、コンピュータに実
行させるためのプログラムとし、 該プログラムを、該コンピュータが読み取りできる記録
媒体に記録したことを特徴とする動画像復号方法の実行
プログラムを記録した記録媒体。
19. A program for causing a computer to execute the procedure in the moving picture decoding method according to claim 9, and recording the program in a recording medium readable by the computer. A recording medium recording an execution program of a moving picture decoding method characterized by.
JP2002032179A 2002-02-08 2002-02-08 Moving picture encoding method, moving picture decoding method, execution program of these methods, and recording medium recording these execution programs Expired - Fee Related JP3864098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002032179A JP3864098B2 (en) 2002-02-08 2002-02-08 Moving picture encoding method, moving picture decoding method, execution program of these methods, and recording medium recording these execution programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002032179A JP3864098B2 (en) 2002-02-08 2002-02-08 Moving picture encoding method, moving picture decoding method, execution program of these methods, and recording medium recording these execution programs

Publications (2)

Publication Number Publication Date
JP2003235044A true JP2003235044A (en) 2003-08-22
JP3864098B2 JP3864098B2 (en) 2006-12-27

Family

ID=27775372

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002032179A Expired - Fee Related JP3864098B2 (en) 2002-02-08 2002-02-08 Moving picture encoding method, moving picture decoding method, execution program of these methods, and recording medium recording these execution programs

Country Status (1)

Country Link
JP (1) JP3864098B2 (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008092593A (en) * 2007-10-29 2008-04-17 Sony Corp Decoding apparatus and method
JP2008104205A (en) * 2007-10-29 2008-05-01 Sony Corp Encoding device and method
WO2010146782A1 (en) * 2009-06-19 2010-12-23 三菱電機株式会社 Arithmetic coding device, arithmetic decoding device, arithmetic coding method, and arithmetic decoding method
JP2011050090A (en) * 2003-05-12 2011-03-10 Google Inc Video compression method
JP2013123226A (en) * 2008-10-08 2013-06-20 Fraunhofer Ges Zur Foerderung Der Angewandten Forschung Ev Voice coder, voice signal coding method, computer program, and digital storage device
US8731948B2 (en) 2008-07-11 2014-05-20 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Audio signal synthesizer for selectively performing different patching algorithms
US8780996B2 (en) 2011-04-07 2014-07-15 Google, Inc. System and method for encoding and decoding video data
US8781004B1 (en) 2011-04-07 2014-07-15 Google Inc. System and method for encoding video using variable loop filter
US8780971B1 (en) 2011-04-07 2014-07-15 Google, Inc. System and method of encoding using selectable loop filters
US8819525B1 (en) 2012-06-14 2014-08-26 Google Inc. Error concealment guided robustness
US8891616B1 (en) 2011-07-27 2014-11-18 Google Inc. Method and apparatus for entropy encoding based on encoding cost
US8897591B2 (en) 2008-09-11 2014-11-25 Google Inc. Method and apparatus for video coding using adaptive loop filter
US8938001B1 (en) 2011-04-05 2015-01-20 Google Inc. Apparatus and method for coding using combinations
US9179151B2 (en) 2013-10-18 2015-11-03 Google Inc. Spatial proximity context entropy coding
US9247257B1 (en) 2011-11-30 2016-01-26 Google Inc. Segmentation based entropy encoding and decoding
US9392288B2 (en) 2013-10-17 2016-07-12 Google Inc. Video coding using scatter-based scan tables
US9509998B1 (en) 2013-04-04 2016-11-29 Google Inc. Conditional predictive multi-symbol run-length coding
US9774856B1 (en) 2012-07-02 2017-09-26 Google Inc. Adaptive stochastic entropy coding
US10102613B2 (en) 2014-09-25 2018-10-16 Google Llc Frequency-domain denoising
US11039138B1 (en) 2012-03-08 2021-06-15 Google Llc Adaptive coding of prediction modes using probability distributions

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8824553B2 (en) 2003-05-12 2014-09-02 Google Inc. Video compression method
JP2011050090A (en) * 2003-05-12 2011-03-10 Google Inc Video compression method
US8942290B2 (en) 2003-05-12 2015-01-27 Google Inc. Dynamic coefficient reordering
US10616576B2 (en) 2003-05-12 2020-04-07 Google Llc Error recovery using alternate reference frame
JP2008104205A (en) * 2007-10-29 2008-05-01 Sony Corp Encoding device and method
JP2008092593A (en) * 2007-10-29 2008-04-17 Sony Corp Decoding apparatus and method
US10522168B2 (en) 2008-07-11 2019-12-31 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Audio signal synthesizer and audio signal encoder
US10014000B2 (en) 2008-07-11 2018-07-03 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Audio signal encoder and method for generating a data stream having components of an audio signal in a first frequency band, control information and spectral band replication parameters
US8731948B2 (en) 2008-07-11 2014-05-20 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Audio signal synthesizer for selectively performing different patching algorithms
US8897591B2 (en) 2008-09-11 2014-11-25 Google Inc. Method and apparatus for video coding using adaptive loop filter
JP2013123226A (en) * 2008-10-08 2013-06-20 Fraunhofer Ges Zur Foerderung Der Angewandten Forschung Ev Voice coder, voice signal coding method, computer program, and digital storage device
JP4994515B2 (en) * 2009-06-19 2012-08-08 三菱電機株式会社 Arithmetic coding device, arithmetic decoding device
WO2010146782A1 (en) * 2009-06-19 2010-12-23 三菱電機株式会社 Arithmetic coding device, arithmetic decoding device, arithmetic coding method, and arithmetic decoding method
US8938001B1 (en) 2011-04-05 2015-01-20 Google Inc. Apparatus and method for coding using combinations
US8780971B1 (en) 2011-04-07 2014-07-15 Google, Inc. System and method of encoding using selectable loop filters
US8781004B1 (en) 2011-04-07 2014-07-15 Google Inc. System and method for encoding video using variable loop filter
US8780996B2 (en) 2011-04-07 2014-07-15 Google, Inc. System and method for encoding and decoding video data
US8891616B1 (en) 2011-07-27 2014-11-18 Google Inc. Method and apparatus for entropy encoding based on encoding cost
US9247257B1 (en) 2011-11-30 2016-01-26 Google Inc. Segmentation based entropy encoding and decoding
US11039138B1 (en) 2012-03-08 2021-06-15 Google Llc Adaptive coding of prediction modes using probability distributions
US8819525B1 (en) 2012-06-14 2014-08-26 Google Inc. Error concealment guided robustness
US9774856B1 (en) 2012-07-02 2017-09-26 Google Inc. Adaptive stochastic entropy coding
US9509998B1 (en) 2013-04-04 2016-11-29 Google Inc. Conditional predictive multi-symbol run-length coding
US9392288B2 (en) 2013-10-17 2016-07-12 Google Inc. Video coding using scatter-based scan tables
US9179151B2 (en) 2013-10-18 2015-11-03 Google Inc. Spatial proximity context entropy coding
US10102613B2 (en) 2014-09-25 2018-10-16 Google Llc Frequency-domain denoising

Also Published As

Publication number Publication date
JP3864098B2 (en) 2006-12-27

Similar Documents

Publication Publication Date Title
RU2722536C1 (en) Output of reference mode values and encoding and decoding of information representing prediction modes
US11438610B2 (en) Block-level super-resolution based video coding
JP2003235044A (en) Moving picture encoding method, moving picture decoding method, execution programs for the methods, and recording medium with the execution programs recorded thereon
EP1563688B1 (en) Method and apparatus for control of rate-distortion tradeoff by using lagrange multiplier and visual mask
KR100987765B1 (en) Prediction method and apparatus in video encoder
US8477847B2 (en) Motion compensation module with fast intra pulse code modulation mode decisions and methods for use therewith
US7961788B2 (en) Method and apparatus for video encoding and decoding, and recording medium having recorded thereon a program for implementing the method
US8488678B2 (en) Moving image encoding apparatus and moving image encoding method
US8265145B1 (en) Management and selection of reference frames for long term prediction in motion estimation
WO2006073116A1 (en) Video encoding method and device, video decoding method and device, program thereof, and recording medium containing the program
TWI451766B (en) Power efficient motion estimation techniques for video encoding
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
TW200305146A (en) Editing of encoded A/V sequences
JP2010193401A (en) Image encoding method and apparatus
JP4898415B2 (en) Moving picture coding apparatus and moving picture coding method
JP2006246277A (en) Re-encoding apparatus, re-encoding method, and re-encoding program
JP3866580B2 (en) Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs
US8831099B2 (en) Selecting a macroblock encoding mode by using raw data to compute intra cost
JP2002064823A (en) Apparatus and method for detecting scene change of compressed dynamic image as well as recording medium recording its program
JP5189618B2 (en) Video encoding method, video encoding apparatus, and video encoding program
CN109068133B (en) Video decoding method and device
US8331452B2 (en) Image encoding apparatus, method of controlling therefor, and program
JP2008311824A (en) Image encoding device, and image encoding program
CN113132734B (en) Encoding and decoding method, device and equipment
JP5247210B2 (en) Moving picture coding apparatus and moving picture coding method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060606

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060807

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061002

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101006

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111006

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121006

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121006

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131006

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees