JP2004274734A - Picture decoding apparatus, picture encoding apparatus, and method thereof - Google Patents

Picture decoding apparatus, picture encoding apparatus, and method thereof Download PDF

Info

Publication number
JP2004274734A
JP2004274734A JP2004037369A JP2004037369A JP2004274734A JP 2004274734 A JP2004274734 A JP 2004274734A JP 2004037369 A JP2004037369 A JP 2004037369A JP 2004037369 A JP2004037369 A JP 2004037369A JP 2004274734 A JP2004274734 A JP 2004274734A
Authority
JP
Japan
Prior art keywords
picture
area
size
memory
decoded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004037369A
Other languages
Japanese (ja)
Inventor
Seishi Abe
清史 安倍
Shinya Sumino
眞也 角野
Toshiyuki Kondo
敏志 近藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004037369A priority Critical patent/JP2004274734A/en
Publication of JP2004274734A publication Critical patent/JP2004274734A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for regulating the management of a picture memory when a picture size is revised. <P>SOLUTION: A picture decoding apparatus 1100 decodes a code sequence including moving picture streams with different picture sizes while referencing decoding finished pictures. The picture memory 203 is provided with a storage area to store a picture whose decoding is finished. A picture memory division method designation section 210 divides the storage area of the picture memory 203 into picture areas of prescribed sizes. A picture memory control section 206 consecutively stores all data of one picture which is newly decoded to the consecutive storage area comprising one picture area of the picture memory 203 or more. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

本発明は、符号化済み又は復号化済みのピクチャを参照して画面間予測を行う動画像の復号化方法および符号化方法に関するものであり、特に復号化済みピクチャを蓄積するピクチャメモリの管理方法に関する。   The present invention relates to a moving picture decoding method and a coding method for performing inter-picture prediction with reference to a coded or decoded picture, and more particularly to a picture memory management method for storing decoded pictures. About.

近年、音声,画像,その他の画素値を統合的に扱うマルチメディア時代を迎え、従来からの情報メディア,つまり新聞,雑誌,テレビ,ラジオ,電話等の情報を人に伝達する手段がマルチメディアの対象として取り上げられるようになってきた。一般に、マルチメディアとは、文字だけでなく、図形、音声、特に画像等を同時に関連づけて表すことをいうが、上記従来の情報メディアをマルチメディアの対象とするには、その情報をディジタル形式にして表すことが必須条件となる。   In recent years, the multimedia era, in which voices, images, and other pixel values are integrated, has been approached, and the traditional information media, that is, means for transmitting information such as newspapers, magazines, televisions, radios, and telephones, to humans, has been developed. It has been taken up as an object. Generally, multimedia means not only characters, but also figures, sounds, and especially images, etc., that are simultaneously associated with each other. Is an essential condition.

ところが、上記各情報メディアの持つ情報量をディジタル情報量として見積もってみると、文字の場合1文字当たりの情報量は1〜2バイトであるのに対し、音声の場合1秒当たり64kbits(電話品質)、さらに動画については1秒当たり100Mbits(現行テレビ受信品質)以上の情報量が必要となり、上記情報メディアでその膨大な情報をディジタル形式でそのまま扱うことは現実的では無い。例えば、テレビ電話は、64kbps〜1.5Mbpsの伝送速度を持つサービス総合ディジタル網(ISDN:Integrated Services Digital Network)によってすでに実用化されているが、テレビ・カメラの映像をそのままISDNで送ることは不可能である。   However, when the amount of information of each of the above information media is estimated as a digital information amount, the amount of information per character is 1 to 2 bytes in the case of characters, whereas 64 kbits per second in the case of voice (telephone quality). In addition, for a moving image, an information amount of 100 Mbits per second (current television reception quality) or more is required, and it is not realistic to handle the huge amount of information in the above-mentioned information medium in digital form. For example, a videophone has already been put into practical use by an integrated services digital network (ISDN) having a transmission speed of 64 kbps to 1.5 Mbps, but it is impossible to directly transmit a video of a video camera via the ISDN. It is possible.

そこで、必要となってくるのが情報の圧縮技術であり、例えば、テレビ電話の場合、ITU(国際電気通信連合 電気通信標準化部門)で国際標準化されたH.261やH.263規格の動画圧縮技術が用いられている。また、MPEG−1規格の情報圧縮技術によると、通常の音楽用CD(コンパクト・ディスク)に音声情報とともに画像情報を入れることも可能となる。   Therefore, information compression technology is required. For example, in the case of a videophone, H.264 standardized internationally by ITU (International Telecommunication Union Telecommunication Standardization Sector). 261 and H.E. H.263 video compression technology is used. In addition, according to the information compression technology of the MPEG-1 standard, it is possible to store image information together with audio information in a normal music CD (compact disc).

ここで、MPEG(Moving Picture Experts Group)とは、動画面信号のディジタル圧縮の国際規格であり、MPEG−1は、動画面信号を1.5Mbpsまで、つまりテレビ信号の情報を約100分の1にまで圧縮する規格である。また、MPEG−1規格を対象とする伝送速度が主として約1.5Mbpsに制限されていることから、さらなる高画質化の要求をみたすべく規格化されたMPEG−2では、動画像信号が2〜15Mbpsに圧縮される。   Here, MPEG (Moving Picture Experts Group) is an international standard for digital compression of moving picture plane signals. MPEG-1 converts moving picture plane signals up to 1.5 Mbps, that is, information of television signals by about 1/100. It is a standard that compresses up to. In addition, since the transmission rate for the MPEG-1 standard is mainly limited to about 1.5 Mbps, the moving picture signal is 2 to 2 in the MPEG-2 standardized to meet the demand for higher image quality. It is compressed to 15Mbps.

さらに現状では、MPEG−1,MPEG−2と標準化を進めてきた作業グループ(ISO/IEC JTC1/SC29/WG11) によって、より圧縮率が高いMPEG−4が規格化された。MPEG−4では、当初、低ビットレートで効率の高い符号化が可能になるだけでなく、伝送路誤りが発生しても主観的な画質劣化を小さくできる強力な誤り耐性技術も導入されている。また、現在は、ISO/IECとITUの共同で次世代画面符号化方式として、H.264の標準化活動が進んでいる。   Furthermore, at present, MPEG-4, which has a higher compression ratio, has been standardized by a working group (ISO / IEC JTC1 / SC29 / WG11) that has been standardizing MPEG-1 and MPEG-2. MPEG-4 initially introduced a powerful error resilience technique that not only enables highly efficient encoding at a low bit rate, but also reduces subjective image quality degradation even if a transmission path error occurs. . Also, at present, H.264 / ISO / IEC and ITU have jointly developed H.264 as a next-generation screen coding system. H.264 standardization activities are underway.

一般に動画像の符号化では、時間方向および空間方向の冗長性を削減することによって情報量の圧縮を行う。そこで時間的な冗長性の削減を目的とするピクチャ間予測符号化では、前方または後方のピクチャを参照してブロック単位で動きの検出および予測画像の作成を行い、得られた予測画像と現在のピクチャとの差分値に対して符号化を行う。   Generally, in coding of a moving image, the amount of information is compressed by reducing redundancy in the time direction and the space direction. Therefore, in the inter-picture prediction coding for the purpose of reducing temporal redundancy, motion detection and prediction image creation are performed in block units with reference to the forward or backward picture, and the obtained predicted image and the current Encoding is performed on the difference value from the picture.

ここで、ピクチャとは、1枚の画面を表す用語であり、プログレッシブ画像ではフレームを意味し、インタレース画像ではフレームもしくはフィールドを意味する。ここで、インタレース画像とは、1つのフレームが時刻の異なる2つのフィールドから構成される画像である。インタレース画像の符号化や復号化処理においては、1つのフレームをフレームのまま処理したり、2つのフィールドとして処理したり、フレーム内のブロック毎にフレーム構造またはフィールド構造として処理したりすることができる。   Here, the picture is a term representing one screen, and means a frame in a progressive image and a frame or a field in an interlaced image. Here, an interlaced image is an image in which one frame is composed of two fields at different times. In encoding and decoding of an interlaced image, one frame may be processed as a frame, processed as two fields, or processed as a frame structure or a field structure for each block in the frame. it can.

なお、以下で示すピクチャはプログレッシブ画像でのフレームの意味で説明するが、インタレース画像でのフレームもしくはフィールドであっても同様に説明することができる。   Note that the picture described below is described in terms of a frame in a progressive image, but the description can be similarly applied to a frame or a field in an interlaced image.

図28は、従来の画像符号化装置100の構成を示すブロック図である。この画像符号化装置100は、ピクチャメモリ101、予測残差符号化部102、符号列生成部103、予測残差復号化部104、ピクチャメモリ105、動きベクトル検出部106、動き補償符号化部107、動きベクトル記憶部108、ピクチャメモリ制御部109、差分演算部112、加算演算部113、スイッチ114およびスイッチ115から構成される。   FIG. 28 is a block diagram illustrating a configuration of a conventional image encoding device 100. The image encoding apparatus 100 includes a picture memory 101, a prediction residual encoding unit 102, a code sequence generation unit 103, a prediction residual decoding unit 104, a picture memory 105, a motion vector detection unit 106, and a motion compensation encoding unit 107. , A motion vector storage unit 108, a picture memory control unit 109, a difference operation unit 112, an addition operation unit 113, a switch 114, and a switch 115.

符号化対象となる動画像は、表示が行われる順にピクチャ単位でピクチャメモリ101に入力され、ピクチャメモリ101において符号化の順にピクチャの並び替えが行われる。さらに各々のピクチャはマクロブロックと呼ばれる例えば水平16×垂直16画素のブロックに分割されブロック単位で以降の処理が行われる。   A moving image to be encoded is input to the picture memory 101 in units of pictures in the order in which display is performed, and the pictures are rearranged in the picture memory 101 in the order of encoding. Further, each picture is divided into blocks of, for example, horizontal 16 × vertical 16 pixels called macroblocks, and the subsequent processing is performed in block units.

ピクチャメモリ101から読み出された入力画像信号は差分演算部112に入力され、動き補償符号化部107の出力である予測画像信号との差分を取ることによって得られる差分画像信号を予測残差符号化部102に出力する。予測残差符号化部102では周波数変換、量子化等の画像符号化処理を行い残差信号を出力する。残差信号は予測残差復号化部104に入力され、逆量子化、逆周波数変換等の画像復号化処理を行い残差復号化信号を出力する。加算演算部113では前記残差復号化信号と予測画像信号との加算を行い再構成画像信号を生成し、得られた再構成画像信号はピクチャメモリ105に格納される。   An input image signal read from the picture memory 101 is input to a difference calculation unit 112, and a difference image signal obtained by taking a difference from a prediction image signal output from the motion compensation encoding unit 107 is converted to a prediction residual code. Output to the conversion unit 102. The prediction residual encoding unit 102 performs image encoding processing such as frequency conversion and quantization, and outputs a residual signal. The residual signal is input to the prediction residual decoding unit 104, and performs image decoding processing such as inverse quantization and inverse frequency transform to output a residual decoded signal. The addition operation unit 113 generates a reconstructed image signal by adding the residual decoded signal and the predicted image signal, and the obtained reconstructed image signal is stored in the picture memory 105.

一方、ピクチャメモリ101から読み出されたマクロブロック単位の入力画像信号は動きベクトル検出部106にも入力される。ここでは、ピクチャメモリ105に格納されている1枚もしくは複数枚の符号化済みピクチャを探索対象とし、最も入力画像信号に近い画像領域を検出することによってその位置を指し示す動きベクトルとその際に選択されたピクチャを指し示す参照ピクチャインデックスを決定する。動きベクトルの検出はマクロブロックをさらに分割したブロック単位で行われ、得られた動きベクトルは動きベクトル記憶部108に格納される。動き補償符号化部107では、上記処理によって検出された動きベクトルおよび参照ピクチャインデックスを用いて、ピクチャメモリ105に格納されている符号化済みピクチャから最適な画像領域を取り出し予測画像を生成する。   On the other hand, the input image signal in macroblock units read from the picture memory 101 is also input to the motion vector detection unit 106. Here, one or a plurality of encoded pictures stored in the picture memory 105 are searched, and a motion vector indicating the position by detecting an image area closest to the input image signal is selected. And determine a reference picture index pointing to the obtained picture. The detection of the motion vector is performed for each block obtained by further dividing the macroblock, and the obtained motion vector is stored in the motion vector storage unit 108. The motion compensation coding unit 107 extracts an optimal image area from the coded pictures stored in the picture memory 105 and generates a predicted image using the motion vector and the reference picture index detected by the above processing.

上記の一連の処理によって出力された動きベクトル、参照ピクチャインデックス、残差符号化信号等の符号化情報に対して符号列生成部103において可変長符号化を施すことにより、この符号化処理によって出力される符号列が得られる。
以上の処理の流れは画面間予測符号化を行った場合の動作であったが、スイッチ114およびスイッチ115によって画面内予測符号化との切り替えがなされる。画面内符号化を行う場合は、動き補償による予測画像の生成は行わず、同一画面内の符号化済み領域から符号化対象領域の予測画像を生成し差分を取ることによって差分画像信号を生成する。差分画像信号は画面間予測符号化の場合と同様に、予測残差符号化部102において残差符号化信号に変換され、符号列生成部103において可変長符号化を施されることにより出力される符号列が得られる。
The coded information such as the motion vector, the reference picture index, and the residual coded signal output by the above-described series of processing is subjected to variable-length coding in the code sequence generation unit 103, so that output is performed by this coding processing. Is obtained.
The flow of the processing described above is the operation in the case where the inter-picture prediction coding is performed. When performing intra-frame encoding, a predicted image is not generated by motion compensation, and a differential image signal is generated by generating a predicted image of an encoding target region from an encoded region in the same screen and taking a difference. . The difference image signal is converted into a residual coded signal in a prediction residual coder 102 and subjected to variable-length coding in a code sequence generator 103, as in the case of inter-picture prediction coding, and is output. Is obtained.

図29は、従来の画像復号化装置200の構成を示すブロック図である。この画像復号化装置200は、符号列解析部201、予測残差復号化部202、ピクチャメモリ203、動き補償復号化部204、動きベクトル記憶部205、ピクチャメモリ制御部206、加算演算部211およびスイッチ212から構成される。   FIG. 29 is a block diagram showing a configuration of a conventional image decoding device 200. The image decoding apparatus 200 includes a code string analysis unit 201, a prediction residual decoding unit 202, a picture memory 203, a motion compensation decoding unit 204, a motion vector storage unit 205, a picture memory control unit 206, an addition operation unit 211, It comprises a switch 212.

まず符号列解析部201は、入力された符号列から動きベクトル、参照ピクチャインデックス、残差符号化信号等の各種の情報を抽出する。符号列解析器201で抽出された動きベクトルは動きベクトル記憶部205に、参照ピクチャインデックスは動き補償復号化部204に、残差符号化信号は予測残差復号化部202にそれぞれ出力される。   First, the code sequence analysis unit 201 extracts various information such as a motion vector, a reference picture index, and a residual coded signal from the input code sequence. The motion vector extracted by the code sequence analyzer 201 is output to the motion vector storage unit 205, the reference picture index is output to the motion compensation decoding unit 204, and the residual coded signal is output to the prediction residual decoding unit 202.

予測残差復号化部202では入力された残差符号化信号に対して、逆量子化、逆周波数変換等の画像復号化処理を施し残差復号化信号を出力する。加算演算部211では前記残差復号化信号と動き補償符号化部204から出力される予測画像信号との加算を行い再構成画像信号を生成し、得られた再構成画像信号をピクチャメモリ203に格納する。
動き補償復号化部204では、動きベクトル記憶部205から入力される動きベクトルおよび符号列解析部201から入力される参照ピクチャインデックスを用いて、ピクチャメモリ203に格納されている1枚もしくは複数枚の復号化済みピクチャから予測画像に最適な画像領域を取り出す。
The prediction residual decoding unit 202 performs image decoding processing such as inverse quantization and inverse frequency transform on the input residual encoded signal, and outputs a residual decoded signal. The addition operation unit 211 generates a reconstructed image signal by adding the residual decoded signal and the predicted image signal output from the motion compensation encoding unit 204, and stores the obtained reconstructed image signal in the picture memory 203. Store.
The motion compensation decoding unit 204 uses the motion vector input from the motion vector storage unit 205 and the reference picture index input from the code sequence analysis unit 201 to store one or more frames stored in the picture memory 203. An optimal image area for the predicted image is extracted from the decoded picture.

上記の一連の処理によって生成された復号化済みピクチャは、表示されるタイミングに従って表示用画像信号としてピクチャメモリ203から出力される。   The decoded picture generated by the above series of processing is output from the picture memory 203 as a display image signal in accordance with the display timing.

以上の処理の流れは画面間予測復号化を行った場合の動作であったが、スイッチ212によって画面内予測復号化との切り替えがなされる。画面内予測復号化を行う場合は、動き補償による予測画像の生成は行わない。その代わり、同一画面内の復号化済み領域から復号化対象領域の予測画像を生成し、残差復号化信号と加算を行うことによって再構成画像信号を生成する。これによって、得られた再構成画像信号はピクチャメモリ203に格納され、表示されるタイミングに従って表示用画像信号として出力される。   The above processing flow is the operation in the case where the inter-picture prediction decoding is performed. However, the switch 212 is switched to the intra-picture prediction decoding. When performing intra prediction decoding, a predicted image is not generated by motion compensation. Instead, a predicted image of the decoding target area is generated from the decoded area in the same screen, and the reconstructed image signal is generated by performing addition with the residual decoded signal. As a result, the obtained reconstructed image signal is stored in the picture memory 203 and output as a display image signal in accordance with the display timing.

図30(a)及び図30(b)は、入力画像におけるピクチャの参照関係を説明するための図であり、図30(a)は表示順、図30(b)は符号化順にピクチャを並べた様子を示している。各ピクチャのPに付された数字は、そのピクチャの表示順を示している。そして、この数字は、図30(a)のように各ピクチャを表示順で並べたときに、全ての値が昇順になるように、各ピクチャに割り当てられている。また、図中の矢印は、画面間予測符号化又は画面間予測復号化におけるピクチャ間の参照関係を示しており、矢印の元にあるピクチャは矢印の先にあるピクチャのうちの1枚又は2枚を任意に参照することができる。   30 (a) and 30 (b) are diagrams for explaining the reference relation of pictures in an input image. FIG. 30 (a) arranges pictures in display order, and FIG. 30 (b) arranges pictures in encoding order. It shows the appearance that it was. The number attached to the P of each picture indicates the display order of the picture. This number is assigned to each picture such that all the values are in ascending order when the pictures are arranged in the display order as shown in FIG. Arrows in the figure indicate a reference relationship between pictures in the inter prediction coding or inter prediction decoding, and the picture at the head of the arrow is one or two of the pictures at the tip of the arrow. The sheets can be arbitrarily referred.

P4を例に取ると、P4はP0、P1、P2、P6を参照して符号化もしくは復号化を行っていることが分かる。前記参照に使用される前記複数のピクチャは対象のピクチャP4よりも先に符号化もしくは復号化されている必要があり、ピクチャメモリに参照可能ピクチャとして格納されているものである。図30(b)のように符号化順に並べるとP4によって参照されるピクチャは全てP4の前方に位置しているのが分かる。符号化および復号化の過程では、ピクチャP4はブロックごとに前記参照に使用される複数のピクチャの中から最適なものを1枚もしくは2枚選択し、選択されたピクチャを参照ピクチャとして、後で述べる画面間予測符号化及び画面間予測復号化に使用する。   Taking P4 as an example, it can be seen that P4 performs encoding or decoding with reference to P0, P1, P2, and P6. The plurality of pictures used for the reference need to be coded or decoded before the target picture P4, and are stored in the picture memory as referenceable pictures. If the pictures are arranged in the encoding order as shown in FIG. 30B, it can be seen that all pictures referenced by P4 are located in front of P4. In the process of encoding and decoding, the picture P4 selects one or two optimal pictures from a plurality of pictures used for the reference for each block, and uses the selected picture as a reference picture. It is used for inter-picture prediction coding and inter-picture prediction decoding described below.

ピクチャメモリに格納された各ピクチャには、参照に使用することができるかできないかを示す情報が付与されている。参照に使用されないピクチャは、本来ならばすぐにピクチャメモリから削除するべきであるが、たとえ参照に使用されないことが分かっていても、表示される順番が来るまでは他のピクチャが復号化されるのを待つ必要がある。例えば図30(b)のP3は、復号化される順番は2番目であるのに対して、図30(a)のように表示される順番が4番目となっている。従ってP3は、P1とP2とが復号化されるまでの間、ピクチャメモリに格納しておかなければならない。このP3のようなピクチャを、表示待ちピクチャまたは参照不可ピクチャと呼ぶ。それに対して参照に使用することができるピクチャを参照可能ピクチャと呼ぶ。   Each picture stored in the picture memory is provided with information indicating whether the picture can be used for reference or not. Pictures that are not used for reference should be deleted from the picture memory immediately, but other pictures will be decoded until they are displayed, even if they are known not to be used for reference. You need to wait. For example, P3 in FIG. 30B has the second decoding order, whereas the display order as shown in FIG. 30A is the fourth. Therefore, P3 must be stored in the picture memory until P1 and P2 are decoded. The picture such as P3 is called a display waiting picture or a non-referenceable picture. On the other hand, a picture that can be used for reference is called a referenceable picture.

一般に、画像符号化装置100及び画像復号化装置200の加算演算部113および加算演算部211において再構成された画像信号は、次のようなピクチャメモリ制御部109及びピクチャメモリ制御部206の制御の下に、ピクチャメモリ109及びピクチャメモリ203に蓄積される。図31は、図29に示した画像復号化装置200における再構成画像信号のピクチャメモリ203への格納制御動作を示すフローチャートである。ピクチャメモリ制御部206は、対象ピクチャが復号化され(S401)、新たな再構成画像信号が生成されると、生成された再構成画像信号を格納するだけの十分な空き領域がピクチャメモリ203にあるかどうかを判定する(S402)。生成された再構成画像信号を格納するだけの十分な空き領域がない場合、ピクチャメモリ制御部206は、ピクチャメモリ203にすでに格納されている、表示順で最も古いピクチャを削除する(S403)。このようにして、ピクチャメモリ制御部206は、ステップS402とステップS403とを繰り返すことにより、ピクチャメモリ203内に新たな再構成画像信号を格納するのに十分な空き領域ができるまで、すでに格納されているピクチャを、表示順で最も古いものから順に削除していく。このようにして、ピクチャメモリ203内に新たな再構成画像信号を格納するのに十分な空き領域ができると、その空き領域に新たな再構成画像信号を格納する(S404)。なお、空き領域とはメモリ中の該当する領域を別のデータで再利用することを可能とする領域のことを意味するものである。また、削除するとはそのメモリ領域を別のデータの蓄積に使用することを可能とする処理を表すものであり、物理的にデータを消去する場合も、もしくは物理的には消去せずに上書きすることを許可するだけの場合も同様に扱うことが可能である(非特許文献1参照。)。   In general, the image signal reconstructed in the addition operation unit 113 and the addition operation unit 211 of the image encoding device 100 and the image decoding device 200 is controlled by the picture memory control unit 109 and the picture memory control unit 206 as follows. Below, they are stored in the picture memory 109 and the picture memory 203. FIG. 31 is a flowchart showing the operation of controlling the storage of the reconstructed image signal in the picture memory 203 in the image decoding apparatus 200 shown in FIG. When the current picture is decoded (S401) and a new reconstructed image signal is generated, the picture memory control unit 206 allocates a sufficient free area in the picture memory 203 to store the generated reconstructed image signal. It is determined whether or not there is (S402). If there is not enough free space to store the generated reconstructed image signal, the picture memory control unit 206 deletes the oldest picture stored in the picture memory 203 in display order (S403). In this way, the picture memory control unit 206 repeats the steps S402 and S403, so that the picture memory control unit 206 has already stored the picture data until there is enough free space in the picture memory 203 to store a new reconstructed image signal. Pictures that are displayed are deleted from the oldest one in the display order. In this way, when there is enough free space in the picture memory 203 to store a new reconstructed image signal, the new reconstructed image signal is stored in the free space (S404). The free area means an area in which the corresponding area in the memory can be reused by another data. Also, “delete” represents a process that enables the memory area to be used for storing another data. When data is physically deleted, or data is overwritten without physically deleting the data. It is also possible to handle the case where only the permission is granted (see Non-Patent Document 1).

図32(a)、図32(b)、図33(a)、図33(b)、図34(a)及び図34(b)は、図31に示した手順に従ってピクチャメモリの管理が行われる場合のメモリ領域の利用例を示す図である。
図32(a)は、復号化対象ピクチャにおいて、ピクチャのサイズが小から大に変更された場合で、サイズ変更後のピクチャを格納するだけの空き領域がピクチャメモリ203にあった場合の格納例を示す図である。図32(a)の上部は、ピクチャメモリ203内に復号化されたピクチャCを蓄積するための十分な空き領域(斜線部)がある状態を示している。この例では、図30のピクチャ列におけるP2、P6、P4、P5がピクチャメモリに蓄積され、P7(=ピクチャC)を復号化している状態を示している。この場合は、図32(a)下部のように、復号化されたピクチャCを、そのまま、ピクチャメモリ203内の空き領域の先頭からピクチャメモリ203に蓄積することが可能である。つまり、既にピクチャメモリ内に蓄積されているピクチャの削除は行わない。
FIGS. 32 (a), 32 (b), 33 (a), 33 (b), 34 (a), and 34 (b) show that the picture memory is managed according to the procedure shown in FIG. FIG. 14 is a diagram showing an example of using a memory area when the memory area is used.
FIG. 32A shows a storage example in which the size of a picture to be decoded has been changed from small to large, and there is a free area in the picture memory 203 for storing the picture after the size change. FIG. The upper part of FIG. 32A shows a state where there is a sufficient free area (shaded area) for storing the decoded picture C in the picture memory 203. In this example, P2, P6, P4, and P5 in the picture sequence in FIG. 30 are stored in the picture memory, and P7 (= picture C) is being decoded. In this case, as shown in the lower part of FIG. 32A, the decoded picture C can be stored in the picture memory 203 from the beginning of the free area in the picture memory 203 as it is. That is, the picture already stored in the picture memory is not deleted.

図32(b)は、復号化対象ピクチャにおいて、ピクチャのサイズが小から大に変更された場合で、サイズ変更後のピクチャを格納するだけの空き領域がピクチャメモリ203になかった場合の格納例を示す図である。同図において、ピクチャに付された数字を○で囲んで示すピクチャは、新たにピクチャCを格納するためにピクチャメモリ203から削除されるべきピクチャである。図32(b)上部は、ピクチャメモリ203内に復号化されたピクチャCを蓄積するために十分な空き領域がない状態を示している。この例では、図30のピクチャ列におけるP3、P1、P2、P6、P4、P5がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示している。この場合はピクチャメモリ203に蓄積されている、ピクチャサイズ変更前のピクチャを削除して、新たに復号化されたピクチャCを蓄積するための領域を確保する必要がある。この例では、ピクチャサイズ変更後のピクチャCは、ピクチャサイズ変更前のピクチャよりもサイズが大きく、ピクチャCを新たに格納するためには、すでに格納されている2枚分のピクチャを削除する必要があることが分かる。次に、削除されるピクチャは、各ピクチャが持っている表示順情報が最も古いものから順に選択される。この例では、ピクチャメモリ203内でP1の表示順情報が最も古く、P1、P2、P3・・・の順に新しくなることが分かる。ピクチャメモリ制御部206では、上記のような処理によって1枚もしくは複数枚の削除すべきピクチャを判定し、判定結果をピクチャメモリ203に出力しピクチャの削除を行う。図32(b)上部の例では前記処理によってP1、P2が削除され、これによって生成された空き領域の先頭から、図32(b)下部のように復号化されたピクチャCを蓄積している。   FIG. 32B shows a storage example in a case where the size of a picture to be decoded has been changed from small to large, and there is no free area in the picture memory 203 for storing the picture after the size change. FIG. In the figure, a picture indicated by a circle with a numeral attached to a picture is a picture to be deleted from the picture memory 203 in order to newly store a picture C. The upper part of FIG. 32B shows a state where there is not enough free space to store the decoded picture C in the picture memory 203. In this example, P3, P1, P2, P6, P4, and P5 in the picture sequence in FIG. 30 are stored in the picture memory, and P7 is currently being decoded (that is, C = P7). In this case, it is necessary to delete the picture before the picture size change stored in the picture memory 203 and secure an area for storing the newly decoded picture C. In this example, the picture C after the picture size change is larger in size than the picture before the picture size change, and in order to newly store the picture C, it is necessary to delete two pictures already stored. It turns out that there is. Next, the pictures to be deleted are selected in order from the oldest display order information possessed by each picture. In this example, it can be seen that the display order information of P1 is the oldest in the picture memory 203 and becomes newer in the order of P1, P2, P3,. The picture memory control unit 206 determines one or more pictures to be deleted by the above-described processing, outputs the determination result to the picture memory 203, and deletes the pictures. In the example shown in the upper part of FIG. 32B, P1 and P2 are deleted by the above-described processing, and the decoded picture C is accumulated as shown in the lower part of FIG. .

図33(a)は、復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ内に復号化対象ピクチャと異なるピクチャサイズを持ったピクチャが存在しない場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリ203にあった場合の格納例を示す図である。つまり、ピクチャCの時間的に近くで、ピクチャサイズの変更がなされてない場合、もしくはピクチャサイズの変更が発生しないストリームを復号化している場合に起こりうる例である。   FIG. 33A shows a case where the picture size of the current picture to be decoded is not changed and no picture having a picture size different from the current picture to be decoded exists in the picture memory. FIG. 14 is a diagram illustrating a storage example in a case where there is a free area for storing C in the picture memory 203; That is, this is an example that can occur when the picture size is not changed near the time of the picture C and the stream in which the picture size does not change is being decoded.

このような場合、ピクチャメモリ203内にすでに格納されているピクチャも、新たに復号化されたピクチャCもすべて同じピクチャサイズである。このため、新たに復号化されたピクチャCを格納するためには、ピクチャメモリ203から1枚分のピクチャを削除するだけでよい。従って、ピクチャメモリ制御部206は、ピクチャメモリ203内の空き領域を調べ、ピクチャCを格納するだけの空き領域があればピクチャCをその空き領域に書き込み、ピクチャCを格納するための空き領域がない場合は、1枚分のピクチャを削除するという判定を行う。ピクチャメモリ203内に蓄積されているピクチャは、ピクチャデータに加えて、表示順を表す情報を持っている。ピクチャメモリ制御部206は、前記表示順情報を調べることにより、削除すべきピクチャを判定し、判定結果として表示順情報の最も古いピクチャを1枚だけ削除することを、ピクチャメモリ203に伝達する。その結果、生成された空き領域に、復号化されたピクチャCが蓄積される。   In such a case, both the picture already stored in the picture memory 203 and the newly decoded picture C have the same picture size. Therefore, in order to store the newly decoded picture C, it is only necessary to delete one picture from the picture memory 203. Accordingly, the picture memory control unit 206 checks the free area in the picture memory 203, and if there is a free area for storing the picture C, writes the picture C into the free area, and the free area for storing the picture C If not, it is determined that one picture is deleted. The pictures stored in the picture memory 203 have information indicating the display order in addition to the picture data. The picture memory control unit 206 determines the picture to be deleted by examining the display order information, and notifies the picture memory 203 that the oldest picture in the display order information is to be deleted only as a determination result. As a result, the decoded picture C is stored in the generated free area.

図33(a)上部は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するための十分な空き領域がある状態を示している。この例では、図30のピクチャ列におけるP2、P6、P4、P5がピクチャメモリに蓄積されており、現在P7を復号化している状態(すなわち、C=P7)を示している。この場合は、図33(a)下部のように、復号化したピクチャCをそのまま空き領域に蓄積することが可能である。つまり、既にピクチャメモリ内に蓄積されているピクチャの削除は行わない。   The upper part of FIG. 33A shows a state where there is enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P2, P6, P4, and P5 in the picture sequence in FIG. 30 are stored in the picture memory, and P7 is currently being decoded (ie, C = P7). In this case, as shown in the lower part of FIG. 33A, the decoded picture C can be stored in the free area as it is. That is, the pictures already stored in the picture memory are not deleted.

図33(b)は、復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ内に復号化対象ピクチャと異なるピクチャサイズを持ったピクチャが存在しない場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリ203になかった場合の格納例を示す図である。図33(b)上部は、ピクチャメモリ内に新たに復号化されたピクチャCを蓄積するための十分な空き領域がない状態を示している。この例では、図30のピクチャ列におけるP3、P1、P2、P6、P4、P5がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示している。この場合は、ピクチャメモリ203に蓄積されているピクチャを1枚だけ削除して、復号化されたピクチャCを蓄積するための領域を確保する必要がある。削除されるピクチャとしては、各ピクチャが持っている表示順情報が最も古いものが選択される。この例では、P1の表示順情報が最も古いことが分かる。ピクチャメモリ制御部206では、上記のような処理によって、削除されるピクチャを判定し、判定結果をピクチャメモリ203に出力しピクチャの削除を行う。図33(b)上部の例では前記処理によってP1が削除され、これによって生成された空き領域に、復号化されたピクチャCが図33(b)下部のように蓄積される。   FIG. 33B shows a case where the picture size of the current picture to be decoded is not changed and no picture having a picture size different from the current picture to be decoded exists in the picture memory. FIG. 11 is a diagram illustrating a storage example in a case where there is no free area in the picture memory 203 for storing C. The upper part of FIG. 33 (b) shows a state where there is not enough free space for storing the newly decoded picture C in the picture memory. In this example, P3, P1, P2, P6, P4, and P5 in the picture sequence in FIG. 30 are stored in the picture memory, and P7 is currently being decoded (that is, C = P7). In this case, it is necessary to delete only one picture stored in the picture memory 203 to secure an area for storing the decoded picture C. As the picture to be deleted, the picture with the oldest display order information held by each picture is selected. In this example, it can be seen that the display order information of P1 is the oldest. The picture memory control unit 206 determines the picture to be deleted by the above-described processing, outputs the determination result to the picture memory 203, and deletes the picture. In the example in the upper part of FIG. 33B, P1 is deleted by the above-described processing, and the decoded picture C is accumulated in the empty area generated as shown in the lower part of FIG.

図34(a)は、復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ203内に新たに復号化されたピクチャCと異なるピクチャサイズを持ったピクチャが存在する場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリ203にあった場合の格納例を示す図である。つまり、ピクチャサイズの変更がなされてから長時間を経過する前に、復号化対象ピクチャが復号化される場合に起こりうる例である。ピクチャメモリ制御部206は、ピクチャメモリ203内の空き領域を調べ、新たに復号化されたピクチャCを格納するために十分な空き領域がある場合には何もせず、空き領域が足りない場合はピクチャサイズ変更後に新たに復号化されたピクチャCのサイズと、変更前のサイズとを比較し、削除すべきピクチャの枚数および削除すべきピクチャを判定する。ピクチャメモリ制御部206は、表示順情報の古いピクチャから順に必要な枚数分だけピクチャを削除し、これによってできた空き領域に新たに復号化されたピクチャCを格納するとした場合、すでに説明した表示順情報を調べることにより、削除されるピクチャを特定する。削除されるべきピクチャは、ピクチャメモリ制御部206からピクチャメモリ203に伝達される。その結果、生成された空き領域に、新たに復号化されたピクチャCが蓄積される。   FIG. 34A shows a case in which the picture size of the current picture to be decoded is not changed and a picture having a picture size different from the newly decoded picture C exists in the picture memory 203. FIG. 14 is a diagram illustrating a storage example in a case where there is a free area in the picture memory 203 to store a decoded picture C; That is, this is an example that can occur when a decoding target picture is decoded before a long time elapses after the picture size is changed. The picture memory control unit 206 checks the free area in the picture memory 203, does nothing if there is enough free area to store the newly decoded picture C, and if there is not enough free area, The size of the picture C newly decoded after the picture size change is compared with the size before the change, and the number of pictures to be deleted and the pictures to be deleted are determined. The picture memory control unit 206 deletes the required number of pictures in order from the oldest picture in the display order information, and stores the newly decoded picture C in the empty area created by the deletion. The picture to be deleted is specified by checking the order information. The picture to be deleted is transmitted from the picture memory control unit 206 to the picture memory 203. As a result, the newly decoded picture C is stored in the generated free area.

図34(a)上部はピクチャメモリ203内に、新たに復号化されたピクチャCを蓄積するために十分な空き領域がある状態を示している。この例では、図30のピクチャ列におけるP4、P5、P7がピクチャメモリ203に蓄積され、現在P8を復号化している状態(すなわち、C=P8)を示している。この場合、図34(a)下部のように、新たに復号化されたピクチャCを、そのまま空き領域に蓄積することが可能である。つまり、既にピクチャメモリ内に蓄積されているピクチャの削除は行わない。   The upper part of FIG. 34A shows a state in which there is enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P4, P5, and P7 in the picture sequence of FIG. 30 are stored in the picture memory 203, and P8 is currently being decoded (that is, C = P8). In this case, as shown in the lower part of FIG. 34A, it is possible to accumulate the newly decoded picture C in the free area as it is. That is, the pictures already stored in the picture memory are not deleted.

図34(b)は、復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ203内に、新たに復号化されたピクチャCと異なるピクチャサイズを持ったピクチャが存在する場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリ203になかった場合の格納例を示す図である。図34(b)上部は、ピクチャメモリ203内に、新たに復号化されたピクチャCを蓄積するための十分な空き領域がない状態を示している。この例では、図30のピクチャ列におけるP2、P6、P4、P5、P7がピクチャメモリに蓄積され、現在P8を復号化している状態(すなわち、C=P8)を示している。この場合、ピクチャメモリ203に蓄積されているピクチャサイズ変更前のピクチャを削除して、新たに復号化されたピクチャCを蓄積するための領域を確保する必要がある。この例では、ピクチャサイズ変更後のピクチャCはピクチャサイズ変更前のピクチャよりもサイズが大きく、ピクチャCを格納するために既に空き領域になっている領域を使用しても、さらに2枚分のピクチャを削除する必要があることが分かる。次に、削除されるピクチャは、各ピクチャが持っている表示順情報が最も古いものから順に選択される。この例では、P2の表示順情報が最も古く、P2、P4、P5・・・の順に新しくなることが分かる。従って、ピクチャメモリ制御部206では、上記のような処理によって削除すべき1枚もしくは複数枚のピクチャを判定し、判定結果をピクチャメモリ203に出力し、ピクチャの削除を行う。図34(b)上部の例では前記処理によってP2、P4が削除され、図34(b)下部のように、新たに復号化されたピクチャCが、生成された空き領域に蓄積される。
"Joint Final Committee Draft (JFCD) of Joint Video Specification (ITU-T Rec. H.264 | ISO/IEC 14496-10 AVC)" 7.4.3.3 P.65、E.2.1 P.252。
FIG. 34B shows a case where the picture size of the current picture to be decoded is not changed and a picture having a picture size different from that of the newly decoded picture C exists in the picture memory 203. FIG. 11 is a diagram showing a storage example in a case where there is no free area in the picture memory 203 to store the decoded picture C in the picture memory 203. The upper part of FIG. 34B shows a state in which there is not enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P2, P6, P4, P5, and P7 in the picture sequence of FIG. 30 are stored in the picture memory, and P8 is currently being decoded (that is, C = P8). In this case, it is necessary to delete the picture before the picture size change stored in the picture memory 203 and secure an area for storing the newly decoded picture C. In this example, the picture C after the picture size change is larger in size than the picture before the picture size change, and even if an area that is already an empty area for storing the picture C is used, two more pictures are used. It turns out that the picture needs to be deleted. Next, the pictures to be deleted are selected in order from the oldest display order information possessed by each picture. In this example, it can be seen that the display order information of P2 is the oldest, and becomes newer in the order of P2, P4, P5,. Accordingly, the picture memory control unit 206 determines one or a plurality of pictures to be deleted by the above processing, outputs the determination result to the picture memory 203, and deletes the picture. In the example in the upper part of FIG. 34B, P2 and P4 are deleted by the above processing, and the newly decoded picture C is accumulated in the generated free area as shown in the lower part of FIG.
"Joint Final Committee Draft (JFCD) of Joint Video Specification (ITU-T Rec. H.264 | ISO / IEC 14496-10 AVC)" 7.4.3.3 P.65, E.2.1 P.252.

しかしながら、従来の技術で説明した復号化方法では、削除されるP2、P4は、ピクチャメモリ203内で物理的に離れた領域に格納されているため、図34(b)下部の例で発生したように、新たに復号化されたピクチャが物理的に分割された領域に蓄積されてしまう状況が発生する。特に、符号化ストリーム中に含まれるピクチャのピクチャサイズの組み合わせによっては、1枚のピクチャが異なる領域に、非常に複雑に分割されてしまう可能性がある。このように、物理的に分割された領域に蓄積されているピクチャを参照ピクチャとして使用する際には、ピクチャメモリへのアクセスが複雑になり、ピクチャメモリへのアクセス速度、引いては復号化速度の低下の原因となる可能性がある。   However, according to the decoding method described in the related art, since P2 and P4 to be deleted are stored in physically separated areas in the picture memory 203, they occur in the example shown in the lower part of FIG. As described above, a situation occurs in which a newly decoded picture is accumulated in a physically divided area. In particular, depending on the combination of the picture sizes of the pictures included in the coded stream, there is a possibility that one picture is extremely complicatedly divided into different areas. As described above, when a picture stored in a physically divided area is used as a reference picture, access to the picture memory becomes complicated, and the access speed to the picture memory and, consequently, the decoding speed are increased. May cause a decrease in

そこで本発明は、上記課題を解決するために、動画像ストリームの先頭または途中でピクチャサイズの変更が起こりうる場合に、ピクチャメモリへのアクセス効率を低下させないピクチャメモリの管理方法を提案することを目的とする。   In order to solve the above problem, the present invention proposes a picture memory management method that does not reduce the access efficiency to the picture memory when the picture size may change at the beginning or in the middle of a moving image stream. Aim.

本発明の画像復号化装置は、異なるピクチャサイズの動画像ストリームを含んだ符号列を、復号化済みピクチャを参照しながら復号化する画像復号化装置であって、復号化済みのピクチャを格納するための記憶領域を備えるピクチャメモリと、前記ピクチャメモリの記憶領域を所定の大きさの区分領域に区分するメモリ区分手段と、新たに復号化されたピクチャ1枚分の全データを、前記ピクチャメモリの1以上の前記区分領域からなる連続した記憶領域に連続して格納する格納手段とを備えることを特徴とする。   An image decoding apparatus according to the present invention is an image decoding apparatus that decodes a code string including moving image streams of different picture sizes with reference to decoded pictures, and stores decoded pictures. Memory, storage means for partitioning the storage area of the picture memory into partitioned areas of a predetermined size, and all data for one newly decoded picture stored in the picture memory. Storage means for continuously storing data in a continuous storage area composed of one or more of the divided areas.

また、前記画像復号化装置は、さらに、新たに復号化されたピクチャのサイズと、直前に復号化されたピクチャのサイズとを比較することによってピクチャのサイズが変更されているかどうかを判定するサイズ変更判定手段を備え、前記メモリ区分手段は、前記新たに復号化されたピクチャのサイズが変更されていると判定された場合、前記区分領域の大きさが前記新たに復号化されたピクチャのサイズとなるよう、前記記憶領域を区分するとしてもよい。   The image decoding apparatus may further determine whether the size of the picture has been changed by comparing the size of the newly decoded picture with the size of the previously decoded picture. A change determining unit, wherein, when it is determined that the size of the newly decoded picture has been changed, the size of the partition area is changed to the size of the newly decoded picture. The storage area may be partitioned such that

また、前記画像復号化装置は、さらに、前記符号列から、前記記憶領域の区分方法を示す区分情報を読み取る読み取り手段を備え、前記メモリ区分手段は、読み取られた前記区分情報に従って前記記憶領域を区分するとしてもよい。
なお、本発明は、このような動画像の符号化装置を備える配信サーバから、符号化された動画像コンテンツを配信し、動画像の復号化装置を備えるユーザ側端末装置において、配信された動画像コンテンツを再生する動画像コンテンツ配信システムとして実現することができるだけでなく、これらの動画像コンテンツ配信システムを構成する配信サーバ及びユーザ側端末装置などの単体として実現したり、それらの配信サーバ及びユーザ側端末装置などに備えられる符号化装置及び復号化装置として実現したり、このような動画像コンテンツ配信システムが備える特徴的な手段をステップとする符号化方法及び復号化方法として実現したり、それらのステップをコンピュータに実行させるプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD−ROM等の記録媒体やインターネット等の伝送媒体を介して配信することができるのは言うまでもない。
Further, the image decoding apparatus further includes reading means for reading, from the code string, partition information indicating a partitioning method of the storage area, wherein the memory partitioning means stores the storage area in accordance with the read partition information. It may be divided.
In addition, the present invention distributes encoded moving image content from a distribution server including such a moving image encoding device, and a distributed moving image is transmitted to a user side terminal device including a moving image decoding device. The present invention can be realized not only as a moving image content distribution system that reproduces image contents, but also as a single unit such as a distribution server and a user side terminal device that constitute these moving image content distribution systems, and a distribution server and a user. It can be realized as an encoding device and a decoding device provided in a side terminal device or the like, or can be realized as an encoding method and a decoding method in which the characteristic means provided in such a moving image content distribution system are steps. May be realized as a program for causing a computer to execute the steps. Needless to say, such a program can be distributed via a recording medium such as a CD-ROM or a transmission medium such as the Internet.

これにより、動画像ストリームの先頭または途中でピクチャサイズの変更が起こりうる場合に、ピクチャメモリへのアクセス効率を低下させない画像復号化装置を提供することができる。   This makes it possible to provide an image decoding apparatus that does not reduce the access efficiency to the picture memory when the picture size may change at the beginning or in the middle of the moving image stream.

これにより、符号列内で動画像ストリームのピクチャサイズの変更が起こりうる場合に、画像復号化装置単体でも、ピクチャメモリへのアクセス効率を低下させないピクチャメモリの管理方法を実現することができる。   This makes it possible to realize a picture memory management method that does not reduce the access efficiency to the picture memory, even when the picture size of the moving image stream is likely to change in the code string.

これにより、画像復号化装置における処理負荷を著しく増大することなく、ピクチャメモリへのアクセス効率を低下させないピクチャメモリの管理方法を実現することができる。   As a result, it is possible to realize a picture memory management method that does not significantly reduce the processing load on the image decoding device and does not decrease the access efficiency to the picture memory.

以下、本発明の実施の形態について、図1から図27を用いて説明する。
(実施の形態1)
従来では復号化におけるピクチャメモリの管理(メモリ領域へのピクチャの格納および削除)をピクチャ単位で行っていた。これに対し、本実施の形態では、復号化におけるピクチャメモリのメモリ領域を、1つもしくは複数の領域に分割し、分割された領域を1つの単位としてピクチャメモリの管理を行うことを特徴とする。本実施の形態では、ピクチャメモリの分割方法を指定するための情報を画像符号化装置において生成し、符号列内に記述する。このときの分割された領域のことをピクチャ領域と呼ぶ。
Hereinafter, embodiments of the present invention will be described with reference to FIGS. 1 to 27.
(Embodiment 1)
Conventionally, the management of a picture memory (storage and deletion of a picture in a memory area) in decoding has been performed on a picture basis. In contrast, the present embodiment is characterized in that the memory area of the picture memory in decoding is divided into one or a plurality of areas, and the divided area is used as one unit to manage the picture memory. . In the present embodiment, information for designating a method of dividing a picture memory is generated in an image encoding device and described in a code string. The divided area at this time is called a picture area.

本発明の実施の形態1における動画像の符号化方法について図1に示したブロック図を用いて説明する。図1は、本実施の形態1の画像符号化装置800の構成を示すブロック図である。画像符号化装置800の構成は図28を用いて説明した従来の画像符号化装置100とほぼ同様である。従来の画像符号化装置100と異なる点は、新たにピクチャメモリ分割情報符号化部801が追加された点である。従来の技術と全く同様の処理についてはここでは説明を省略する。   A moving picture coding method according to Embodiment 1 of the present invention will be described with reference to the block diagram shown in FIG. FIG. 1 is a block diagram illustrating a configuration of an image encoding device 800 according to the first embodiment. The configuration of the image encoding device 800 is almost the same as that of the conventional image encoding device 100 described with reference to FIG. The difference from the conventional image encoding device 100 is that a picture memory division information encoding unit 801 is newly added. The description of the same processing as that of the conventional technique is omitted here.

符号化対象のストリームの符号化に先立って、ピクチャメモリ分割情報符号化部801では復号化側のピクチャメモリを分割する方法を指定するための情報を符号化する。図2は、本実施の形態の画像符号化装置800により生成される符号列のデータ構造を示す図である。図2(a)は、ストリーム中に含まれる可能性のある最大のピクチャサイズの情報を符号化する場合の符号列の一例を示す図である。図2(b)は、ストリーム中に含まれる可能性のある最大のピクチャサイズに基づいてピクチャメモリを分割した場合に、ピクチャメモリ内に確保することのできる領域の数を符号化する場合の符号列の一例を示す図である。本実施の形態では、前記復号化側のピクチャメモリを分割する方法を指定する情報として、ストリーム中に含まれる可能性のある最大のピクチャサイズの情報を符号化し、図2(a)における符号列のピクチャ共通情報領域のmax_sizeとして記述する。ここでの最大のピクチャサイズは、例えば、画像符号化装置800が符号化に使用することのできる最大のピクチャサイズを用いる。あるいは、ユーザが符号化を実行する際に、提示された複数のピクチャサイズのうちから所望の最大ピクチャサイズを選択して決定するとしてもよい。   Prior to encoding a stream to be encoded, the picture memory division information encoding unit 801 encodes information for designating a method of dividing the decoding-side picture memory. FIG. 2 is a diagram illustrating a data structure of a code string generated by the image coding device 800 according to the present embodiment. FIG. 2A is a diagram illustrating an example of a code string when encoding information of a maximum picture size that may be included in a stream. FIG. 2B shows a code for encoding the number of areas that can be secured in the picture memory when the picture memory is divided based on the maximum picture size that may be included in the stream. It is a figure showing an example of a column. In the present embodiment, as information specifying a method of dividing the picture memory on the decoding side, information of a maximum picture size that may be included in a stream is encoded, and a code string in FIG. Described as max_size of the picture common information area. As the maximum picture size here, for example, the maximum picture size that the image encoding device 800 can use for encoding is used. Alternatively, when the user performs encoding, a desired maximum picture size may be selected and determined from a plurality of presented picture sizes.

符号化対象のピクチャがIDRピクチャもしくはそれに代わるピクチャサイズの変更を可能とするピクチャであった場合、ピクチャメモリ制御部109よりピクチャメモリのリセット方法を示す信号が符号列生成部103に入力される。なお、IDRピクチャとは、次のような特別な性質を持つピクチャのことをいう。(1)面内予測復号化のみ可能である。(2)復号化終了後にピクチャメモリ内の全てのピクチャをリセットする。(3)ピクチャサイズを変更することが可能である。したがって、IDRピクチャの後に復号化されるピクチャはIDRピクチャより先に復号化されたピクチャを参照することができない。例えば、図30(a)に示したP8は、P7しか参照することができない。IDRピクチャは、スライスデータのヘッダ領域に図2(a)にあるようにreset_flagを有し、前記フラグによって前述したIDRの特徴の1つであるピクチャメモリのリセットの方法が指定される。なお、スライスとは、1つのピクチャを1つもしくは複数の領域に分割した際の分割された1つ1つの領域のことを示すものである。reset_flagが0の場合は、ピクチャメモリ内の全ての参照可能ピクチャを参照不可ピクチャ(表示待ちピクチャ)に変更する。一方、reset_flagが1の場合は、参照可能もしくは参照不可に関わらず、全てのピクチャのデータをピクチャメモリから削除してしまう。つまり、reset_flagが1の場合は、IDRピクチャよりも先に復号化されたピクチャでまだ表示がされていないピクチャがあったとしても、それらピクチャを表示することなくIDRピクチャ以降のピクチャの表示が行われることになる。本実施の形態では、この際に指定するピクチャメモリのリセット方法は任意であり、例えば、復号化側のピクチャメモリの動作を想定した場合に、ピクチャメモリ内に表示されていないピクチャがあるかないかよって、reset_flag を0、つまり全てのピクチャを参照不可にするだけでピクチャデータそのものは削除しない、もしくは、reset_flag を1、つまり全てのピクチャのデータそのものを削除してピクチャメモリの全領域を空き状態にする、かのどちらかを任意に選択することが可能である。符号列生成部103では入力された前記信号を符号化し、図2(a)のようにreset_flag をスライスヘッダに持った形式の符号列を生成する。   If the picture to be coded is an IDR picture or a picture that allows a change in picture size in place of the IDR picture, a signal indicating a picture memory reset method is input from the picture memory control unit 109 to the code string generation unit 103. Note that an IDR picture refers to a picture having the following special properties. (1) Only intra prediction decoding is possible. (2) After decoding is completed, all pictures in the picture memory are reset. (3) The picture size can be changed. Therefore, a picture decoded after the IDR picture cannot refer to a picture decoded before the IDR picture. For example, P8 shown in FIG. 30A can refer only to P7. The IDR picture has a reset_flag in the header area of the slice data as shown in FIG. 2A, and the flag specifies a method of resetting the picture memory, which is one of the features of the IDR described above. Note that a slice indicates one divided region when one picture is divided into one or a plurality of regions. If reset_flag is 0, all the referable pictures in the picture memory are changed to non-referenceable pictures (pictures waiting for display). On the other hand, if reset_flag is 1, data of all pictures is deleted from the picture memory regardless of whether reference is possible or not. In other words, if reset_flag is 1, even if there is a picture that has been decoded earlier than the IDR picture and has not been displayed yet, the display of pictures after the IDR picture is performed without displaying those pictures. Will be In the present embodiment, the method of resetting the picture memory specified at this time is arbitrary. For example, when the operation of the picture memory on the decoding side is assumed, whether or not there is a picture not displayed in the picture memory Therefore, reset_flag is set to 0, that is, the picture data itself is not deleted just by making all pictures inaccessible. It is possible to arbitrarily select either one. The code sequence generation unit 103 encodes the input signal and generates a code sequence having a reset_flag in a slice header as shown in FIG.

なお、max_sizeとして、ストリーム中に含まれる可能性のある最大のピクチャサイズの情報を記述する代わりに、図2(b)のように復号化におけるピクチャメモリ内に確保することのできる領域の数をmin_area_num として、符号列のピクチャ共通情報領域に記述することも可能である。min_area_num は、1つのピクチャ領域のサイズが、ストリーム中に含まれる可能性のある最大のピクチャサイズであるmax_size となるよう復号化側のピクチャメモリを分割したときにできるピクチャ領域の数を示している。その場合、min_area_num の値は下記の式1によって決定される。なお、式中の割り算の演算結果は切り捨て処理によって整数値として算出されるものとする。
(min_area_num )=(復号化側のピクチャメモリのサイズ)/(max_size) (式1)
なお、上記のピクチャサイズおよびピクチャメモリのサイズとは、全体の画素数、もしくは全体のマクロブロックの個数、もしくは全体のビット数のいずれであっても同様に扱うことが可能である。
As max_size, instead of describing information on the maximum picture size that may be included in the stream, the number of areas that can be secured in the picture memory for decoding as shown in FIG. It is also possible to describe min_area_num in the picture common information area of the code string. min_area_num indicates the number of picture areas that can be formed when the decoding-side picture memory is divided such that the size of one picture area becomes max_size, which is the maximum picture size that may be included in the stream. . In that case, the value of min_area_num is determined by Equation 1 below. The calculation result of the division in the expression is calculated as an integer by truncation processing.
(Min_area_num) = (size of picture memory on decoding side) / (max_size) (Equation 1)
It should be noted that the above-described picture size and picture memory size can be treated in the same manner regardless of the total number of pixels, the total number of macroblocks, or the total number of bits.

なお、画面間予測符号化を行う際に参照することのできるピクチャの枚数を、符号化対象とするピクチャのピクチャサイズとは無関係に常に上記の式1によって算出されるmin_area_num 以下として符号化を行うことにより、復号化側において上記分割方法によってピクチャメモリを分割して使用する場合でも、参照ピクチャがピクチャメモリ内に存在しないという状況が発生することを防ぐことが可能となる。   It should be noted that the number of pictures that can be referred to when performing inter-screen predictive coding is set to be equal to or less than the min_area_num calculated by Expression 1 above, regardless of the picture size of the picture to be coded. This makes it possible to prevent a situation in which the reference picture does not exist in the picture memory even when the decoding side uses the picture memory by the above-described division method.

図3は、図2(a)及び図2(b)に示した符号列中のピクチャ共通情報の領域に付加的情報を記述する場合の符号列の一例を示す図である。なお、図3に示したようにmax_sizeおよびmin_area_num に加えてcnf_flagを符号列のピクチャ共通情報領域に記述することも可能である。cnf_flagはmax_sizeおよびmin_area_num に従って復号化側のピクチャメモリを分割して管理を行った場合でも、ストリーム中に含まれる全てのピクチャを問題なく表示することができるかどうかを示すフラグである。例えば、値が1の場合は問題なく表示することができることを示し、値が0の場合はまだ表示されていないピクチャが、本実施の形態の処理によって既にデータを失ってしまったため表示することができなくなる可能性があることを示す。このように、cnf_flag を符号列に記述しておくことにより、この信号の値を調べることにより本実施の形態の処理を適用するかどうかを判断することができる。例えば、cnf_flag が0の場合には、本実施の形態の処理を適用すると表示できないピクチャが発生してしまう可能性があることが分かるので、替わりに従来どおりピクチャ単位でピクチャメモリの管理を行う方法に切り替えることにより、メモリ領域が細分化されてしまう恐れがあるが、全てのピクチャを問題なく表示することが可能となる。   FIG. 3 is a diagram showing an example of a code string in a case where additional information is described in a picture common information area in the code string shown in FIGS. 2A and 2B. As shown in FIG. 3, in addition to max_size and min_area_num, cnf_flag can be described in the picture common information area of the code string. The cnf_flag is a flag indicating whether all pictures included in the stream can be displayed without any problem even when the picture memory on the decoding side is divided and managed according to max_size and min_area_num. For example, a value of 1 indicates that display can be performed without any problem, and a value of 0 indicates that a picture that has not been displayed has already been lost due to the processing of this embodiment. Indicates that it may not be possible. Thus, by describing cnf_flag in the code string, it is possible to determine whether or not to apply the processing of the present embodiment by checking the value of this signal. For example, when cnf_flag is 0, it is known that there is a possibility that a picture that cannot be displayed may occur when the processing of the present embodiment is applied. By switching to, the memory area may be fragmented, but all pictures can be displayed without any problem.

なお、図2および図3ではmax_sizeおよびmin_area_num およびcnf_flagをピクチャ共通情報領域に記述しているが、復号化を行う際に必ずしも必要ではないが復号化処理のための補助となるようなデータを集めたデータ領域に記述することも可能である。また、シーケンス全体から参照されるシーケンス共通情報領域に記述することも可能である。また、スライスヘッダに記述することも可能である。   In FIGS. 2 and 3, max_size, min_area_num, and cnf_flag are described in the common picture information area. It can also be described in the data area. Further, it is also possible to describe in a sequence common information area referred to from the entire sequence. Also, it is possible to describe in the slice header.

次に、上で述べたような符号化方法によって符号化された符号列の復号化方法を、図4〜図7を用いて説明する。図4は、本実施の形態の画像復号化装置1100の構成を示すブロック図である。図5は、図4に示した画像復号化装置1100における復号化処理の手順を示すフローチャートである。図6および図7は、図4に示したピクチャメモリ203の管理方法を示す模式図である。   Next, a decoding method of a code string coded by the above-described coding method will be described with reference to FIGS. FIG. 4 is a block diagram illustrating a configuration of the image decoding apparatus 1100 according to the present embodiment. FIG. 5 is a flowchart illustrating a procedure of a decoding process in the image decoding device 1100 illustrated in FIG. FIG. 6 and FIG. 7 are schematic diagrams showing a management method of the picture memory 203 shown in FIG.

図4に示した画像復号化装置1100の構成は図29を用いて説明した従来の画像復号化装置200とほぼ同様である。従来の方法と異なる点は、ピクチャサイズ変更判定部207、削除ピクチャ領域判定部209、ピクチャメモリ分割方法指定部210が追加された点である。従来の技術と全く同様の処理については、ここでは説明を省略する。
本実施の形態は従来とは異なり、ピクチャメモリ203の管理をピクチャ単位で行うのではなく、ピクチャメモリ203を1つもしくは複数に分割したピクチャ領域と呼ばれる領域を1つの格納および削除の単位として行うことを特徴とする。そこで、符号列の復号化に先立って、ピクチャメモリ分割方法指定部210では、ピクチャメモリの分割方法を符号列中の信号から解析してピクチャメモリ制御部206に指示する。本実施の形態では、前記ピクチャメモリを分割する方法を指定する情報として、ストリーム中に含まれる可能性のある最大のピクチャサイズの情報が図2(a)の符号列中に含まれるmax_sizeとしてピクチャ共通情報領域に記述されている。ピクチャメモリ分割方法指定部210は前記信号を解析することにより、ピクチャメモリ203の分割方法を決定する。その際に分割される領域の数は下記の式2によって算出される。なお、式中の割り算の演算結果は切り捨て処理によって整数値として算出されるものとする。
(ピクチャ領域数)=(画像復号化装置1100のピクチャメモリ203のサイズ)/(max_size) (式2)
また、図2(a)の符号列の代わりに図2(b)の符号列を用いた場合は、ピクチャ領域の数は下記の式3によって算出される。
(ピクチャ領域数)=(min_area_num ) (式3)
なお、上記のピクチャサイズおよびピクチャメモリのサイズとは、全体の画素数、もしくは全体のマクロブロックの個数、もしくは全体のビット数のいずれであってもよく、それぞれ同様に扱うことが可能である。
The configuration of the image decoding device 1100 shown in FIG. 4 is almost the same as that of the conventional image decoding device 200 described with reference to FIG. The difference from the conventional method is that a picture size change determination unit 207, a deleted picture area determination unit 209, and a picture memory division method designation unit 210 are added. The description of the same processing as that of the conventional technique is omitted here.
In the present embodiment, unlike the related art, management of the picture memory 203 is not performed in units of pictures, but an area called a picture area obtained by dividing the picture memory 203 into one or a plurality is performed as one unit of storage and deletion. It is characterized by the following. Therefore, prior to decoding the code string, the picture memory division method designating section 210 analyzes the picture memory dividing method from the signal in the code string and instructs the picture memory control section 206. In the present embodiment, as information for specifying the method of dividing the picture memory, information on the maximum picture size that may be included in the stream is defined as max_size included in the code string in FIG. It is described in the common information area. The picture memory division method designating section 210 determines the division method of the picture memory 203 by analyzing the signal. At this time, the number of divided regions is calculated by the following equation (2). The calculation result of the division in the expression is calculated as an integer by truncation processing.
(Number of picture areas) = (Size of picture memory 203 of image decoding apparatus 1100) / (max_size) (Equation 2)
When the code sequence of FIG. 2B is used instead of the code sequence of FIG. 2A, the number of picture regions is calculated by the following Expression 3.
(Number of picture areas) = (min_area_num) (Equation 3)
Note that the picture size and the size of the picture memory may be any of the total number of pixels, the total number of macroblocks, or the total number of bits, and can be handled similarly.

ピクチャサイズ変更判定部207では、復号化対象のピクチャのピクチャサイズとそれ以前(又はその直前)に復号化されたピクチャのピクチャサイズとを比較し、ピクチャサイズの変更がなされたかどうかを判定する。
符号列中のスライスヘッダには、図2(a)及び図2(b)にあるように、reset_flag が符号化されている。符号列解析部201では前記reset_flag の値を解析し、解析結果の情報をピクチャメモリ制御部206に出力する。本実施の形態ではピクチャサイズが変更されていた場合でもreset_flag の値は0もしくは1の両方とも選択されている可能性がある。したがって、reset_flag の値に応じて、図5のフローチャートのようにピクチャメモリの管理方法が分かれることになる。特にreset_flag が0の場合は、ピクチャメモリ内にピクチャサイズ変更前のピクチャが残っている可能性があるため、ピクチャサイズ変更後のピクチャを蓄積するためにどのピクチャ領域を削除しなくてはならないかを判定する必要がある。その判定が削除ピクチャ領域判定部209によってなされ、前記判定結果はピクチャメモリ制御部206に出力されピクチャメモリの管理が行われる。
The picture size change determination unit 207 compares the picture size of the picture to be decoded with the picture size of the picture decoded before (or immediately before) and determines whether the picture size has been changed.
As shown in FIGS. 2A and 2B, reset_flag is encoded in the slice header in the code string. The code string analysis unit 201 analyzes the value of the reset_flag, and outputs information of the analysis result to the picture memory control unit 206. In the present embodiment, even if the picture size has been changed, the value of reset_flag may be both 0 or 1. Accordingly, the picture memory management method is divided according to the value of reset_flag as shown in the flowchart of FIG. In particular, when reset_flag is 0, there is a possibility that the picture before the picture size change remains in the picture memory. Therefore, which picture area must be deleted to accumulate the picture after the picture size change. Must be determined. The determination is made by the deleted picture area determination unit 209, and the determination result is output to the picture memory control unit 206 to manage the picture memory.

次に復号化処理におけるピクチャメモリ制御部206、ピクチャサイズ変更判定部207、削除ピクチャ領域判定部209の動作の詳細について、図5のフローチャートを用いて説明を行う。なお、図5のフローチャートでは対象ピクチャの復号化を行った後にピクチャサイズの変更の判定およびreset_flag の値の判定を行っているが、この順番は任意であり、図5に示した順番に限ったものではない。   Next, the details of the operations of the picture memory control unit 206, the picture size change determination unit 207, and the deleted picture area determination unit 209 in the decoding process will be described with reference to the flowchart in FIG. In the flowchart of FIG. 5, after the decoding of the target picture is performed, the determination of the change in the picture size and the determination of the value of the reset_flag are performed. However, the order is arbitrary, and is limited to the order shown in FIG. Not something.

まず、復号化対象ピクチャにおいてピクチャサイズが変更され(S1204)、かつ、reset_flag が1のとき(S1205)に実行される復号化処理のフローについて説明する。reset_flag が1とは、ピクチャメモリ内の全てのピクチャデータを削除し、全ての領域を空き状態にすることを示す値である。つまりこの信号がピクチャメモリ制御部206に入力されると、ピクチャメモリ制御部206はピクチャメモリ内の全ての領域を削除し(S1206)、復号化を行ったピクチャサイズ変更後のピクチャをピクチャメモリ内の任意の領域に保存する(S1207)ことが可能である。   First, the flow of the decoding process executed when the picture size of the decoding target picture is changed (S1204) and reset_flag is 1 (S1205) will be described. A reset_flag of 1 is a value indicating that all picture data in the picture memory is deleted and all areas are left empty. That is, when this signal is input to the picture memory control unit 206, the picture memory control unit 206 deletes all the areas in the picture memory (S1206) and replaces the decoded picture with the changed picture size in the picture memory. (S1207).

次いで、復号化対象ピクチャにおいてピクチャサイズが変更され(S1204)、かつ、reset_flag が0のとき(S1205)に実行される復号化処理のフローについて説明する。reset_flag が0とは、ピクチャメモリ内の全てのピクチャデータを参照不可にするがピクチャデータそのものは削除せずに蓄積したままにすることを示す値である。削除ピクチャ領域判定部209はピクチャメモリ内の空き領域を調べ、空き領域が足りない場合は削除するピクチャ領域を判定する(S1208)。ピクチャメモリ203内に蓄積されているピクチャは、ピクチャデータに加え表示順の情報を持っている。削除ピクチャ領域判定部209は、前記表示順情報を調べることにより、表示順情報の最も古いピクチャが蓄積されているピクチャ領域を指定し、指定されたピクチャ領域を削除する旨の指示をピクチャメモリ制御部206に伝達する。その結果、指定されたピクチャ領域が削除され、生成された空き領域に復号化されたピクチャが蓄積される(S1210)。   Next, the flow of the decoding process executed when the picture size of the decoding target picture is changed (S1204) and reset_flag is 0 (S1205) will be described. The reset_flag of 0 is a value indicating that all the picture data in the picture memory is not to be referred to, but the picture data itself is not deleted but is stored. The deleted picture area determination unit 209 checks a free area in the picture memory, and determines a picture area to be deleted when the free area is insufficient (S1208). The pictures stored in the picture memory 203 have display order information in addition to the picture data. By checking the display order information, the deletion picture area determination unit 209 specifies a picture area in which the oldest picture of the display order information is stored, and issues an instruction to delete the specified picture area to the picture memory control unit. The information is transmitted to the unit 206. As a result, the designated picture area is deleted, and the decoded picture is stored in the generated free area (S1210).

図6(a)及び図6(b)は、新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1210の手順に従ってピクチャメモリ203に蓄積される様子を示す図である。
図6(a)はピクチャメモリ203内に復号化された復号化対象ピクチャCを蓄積するのに十分な空き領域があった場合の例である。この例では、図30(a)及び図30(b)のピクチャ列におけるP4、P5がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示している。P4、P5は分割されたピクチャ領域と同じピクチャサイズを持ったピクチャであり、つまり、シーケンス中に含まれるピクチャの中で最も大きなピクチャサイズを持ったものであることが分かる。それに対して復号化されたピクチャCは、必ずピクチャ領域と同じピクチャサイズかもしくはそれ以下のピクチャサイズを持つことになるが、図6(a)の例では、復号化対象ピクチャCがP4、P5よりも小さなピクチャサイズであった場合を示している。この場合は、図6(a)下部のように、復号化されたピクチャCをそのまま空き領域に蓄積することが可能である。つまり、既にピクチャデータが蓄積されているピクチャ領域の削除は行わない。
FIGS. 6A and 6B are diagrams showing a state in which a newly decoded picture is stored in the picture memory 203 according to the procedures of steps S1204 to S1210 in the flowchart of FIG.
FIG. 6A shows an example in which there is a sufficient free area in the picture memory 203 to store the decoded picture C to be decoded. In this example, P4 and P5 in the picture sequence of FIGS. 30A and 30B are stored in the picture memory, and P7 is currently being decoded (that is, C = P7). P4 and P5 are pictures having the same picture size as the divided picture area, that is, the pictures having the largest picture size among the pictures included in the sequence. On the other hand, the decoded picture C always has the same or smaller picture size as the picture area, but in the example of FIG. 6A, the pictures C to be decoded are P4 and P5. This shows a case where the picture size is smaller than the picture size. In this case, as shown in the lower part of FIG. 6A, the decoded picture C can be stored in the free area as it is. That is, the picture area in which the picture data is already stored is not deleted.

図6(b)上部はピクチャメモリ内に復号化したピクチャCを蓄積するのに十分な空き領域がなかった場合の例である。この例では、図30のピクチャ列におけるP6、P4、P5がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示している。この場合はピクチャメモリ203に蓄積されているピクチャサイズ変更前のピクチャデータを持つピクチャ領域を削除して、復号化したピクチャCを蓄積するための領域を確保する必要がある。本実施の形態では、復号化を行うピクチャは必ずピクチャ領域と同じピクチャサイズもしくはそれ以下のピクチャサイズを持つものである。従って、ピクチャメモリ203内に空き領域が無い場合は、どれか1つのピクチャ領域を削除することによって、復号化されたピクチャを蓄積するための領域を確保することができる。削除するピクチャ領域は、蓄積されているピクチャが持っている表示順情報が最も古いものが選択される。この例では、P4の表示順情報が最も古いことが分かる。削除ピクチャ領域判定部209では、上記のような処理によって削除するピクチャ領域を判定し、判定結果をピクチャメモリ制御部206に出力しピクチャ領域の削除を行う。図6(b)上部の例では上記処理によってP4が削除され、図6(b)下部のように復号化されたピクチャCを、P4を削除することによって生成された空き領域に蓄積している。   The upper part of FIG. 6B shows an example in which there is not enough free space to store the decoded picture C in the picture memory. In this example, P6, P4, and P5 in the picture sequence of FIG. 30 are stored in the picture memory, and P7 is currently being decoded (that is, C = P7). In this case, it is necessary to delete the picture area having the picture data before the picture size change stored in the picture memory 203 to secure an area for storing the decoded picture C. In the present embodiment, the picture to be decoded always has the same picture size as the picture area or a smaller picture size. Therefore, when there is no free area in the picture memory 203, an area for storing decoded pictures can be secured by deleting one of the picture areas. As the picture area to be deleted, the one with the oldest display order information held by the stored pictures is selected. In this example, it can be seen that the display order information of P4 is the oldest. The deleted picture area determination unit 209 determines the picture area to be deleted by the above-described processing, outputs the determination result to the picture memory control unit 206, and deletes the picture area. In the example shown in the upper part of FIG. 6B, P4 is deleted by the above processing, and the picture C decoded as shown in the lower part of FIG. 6B is stored in a free area generated by deleting P4. .

最後に、復号化対象ピクチャにおいてはピクチャサイズが変更されずに、それ以前に変更されていた場合、もしくは全く変更がされていなかった場合(S1204)に実行される復号化処理のフローについて説明する。本実施の形態は従来とは異なり、ピクチャメモリ203内に復号化対象ピクチャCと異なるピクチャサイズを持ったピクチャが存在していてもしていなくても全く同様の処理によってピクチャメモリ203を管理することが可能である。削除ピクチャ領域判定部209は、ピクチャメモリ203内の空き領域を調べ、空き領域が足りない場合は削除するピクチャ領域を判定する。ピクチャメモリ203内に蓄積されているピクチャはピクチャデータに加え表示順の情報を持っている。削除ピクチャ領域判定部209は、前記表示順情報を調べることにより、表示順情報の最も古いピクチャが蓄積されているピクチャ領域を特定し、特定されたピクチャ領域を削除する指示をピクチャメモリ制御部206に伝達する。その結果生成された空き領域に復号化したピクチャを蓄積する。   Finally, a description will be given of the flow of the decoding process executed when the picture size of the current picture to be decoded has not been changed, but has been changed before that, or has not been changed at all (S1204). . This embodiment is different from the related art in that the picture memory 203 is managed by exactly the same processing whether or not a picture having a picture size different from the decoding target picture C exists in the picture memory 203. Is possible. The deleted picture area determining unit 209 checks a free area in the picture memory 203, and determines a picture area to be deleted when the free area is insufficient. The pictures stored in the picture memory 203 have display order information in addition to the picture data. By checking the display order information, the deleted picture area determination unit 209 specifies a picture area in which the oldest picture of the display order information is stored, and issues an instruction to delete the specified picture area to the picture memory control unit 206. To communicate. The decoded picture is stored in the vacant area generated as a result.

図7(a)及び図7(b)は、新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1213の手順に従って、ピクチャメモリ203に蓄積される様子を示す図である。
図7(a)はピクチャメモリ内に復号化したピクチャCを蓄積するのに十分な空き領域があった場合の例である。この例では、図30のピクチャ列におけるP5、P7がピクチャメモリに蓄積され、現在P8を復号化している状態(すなわち、C=P8)を示している。P5はピクチャ領域と同じピクチャサイズを持ったピクチャであり、つまり、シーケンス中に含まれるピクチャの中で最も大きなピクチャサイズを持ったものであることが分かる。それに対して復号化されたピクチャCは、必ずピクチャ領域と同じピクチャサイズもしくはそれ以下のピクチャサイズを持つことになる。図7(a)の例では、P5よりも小さなピクチャサイズであった場合を示している。この場合は、図7(a)下部のように、復号化したピクチャCは、そのまま空き領域に蓄積することが可能である。ただし、この場合、復号化対象ピクチャCは、空き領域の先頭から蓄積されるのではなく、空き領域となっているピクチャ領域の先頭から蓄積される。そして、既にピクチャメモリ内に蓄積されているピクチャデータを持つピクチャ領域の削除は行わない。
FIGS. 7A and 7B are diagrams showing a state in which newly decoded pictures are stored in the picture memory 203 in accordance with the procedures of steps S1204 to S1213 in the flowchart of FIG.
FIG. 7A shows an example in a case where there is a sufficient free area for storing the decoded picture C in the picture memory. In this example, P5 and P7 in the picture sequence in FIG. 30 are stored in the picture memory, and P8 is currently being decoded (that is, C = P8). P5 is a picture having the same picture size as the picture area, that is, the picture having the largest picture size among the pictures included in the sequence. On the other hand, the decoded picture C always has the same picture size as the picture area or a smaller picture size. The example of FIG. 7A shows a case where the picture size is smaller than P5. In this case, as shown in the lower part of FIG. 7A, the decoded picture C can be stored in the free area as it is. However, in this case, the decoding target picture C is not stored from the beginning of the empty area, but is accumulated from the beginning of the picture area which is an empty area. Then, the picture area having the picture data already stored in the picture memory is not deleted.

図7(b)上部はピクチャメモリ203内に復号化されたピクチャCを蓄積するのに十分な空き領域がなかった場合の例である。この例では、図30のピクチャ列におけるP4、P5、P7がピクチャメモリに蓄積され、現在P8を復号化している状態(すなわち、C=P8)を示している。この場合はピクチャメモリ203に蓄積されているピクチャデータを持つピクチャ領域を削除して、新たに復号化されたピクチャCを蓄積するための領域を確保する必要がある。本実施の形態では、復号化を行うピクチャは必ずピクチャメモリを分割した領域であるピクチャ領域と同じピクチャサイズもしくはそれ以下のピクチャサイズを持つものである。従って、ピクチャメモリ内に空き領域が無い場合は、どれか1つのピクチャ領域を削除することによって、復号化したピクチャを蓄積するための領域を確保することができる。削除するピクチャ領域は、蓄積されているピクチャが持っている表示順情報が最も古いものが選択される。この例では、P4の表示順情報が最も古いことが分かる。削除ピクチャ領域判定部209では、上記のような処理によって削除するピクチャ領域を判定し、判定結果をピクチャメモリ制御部206に出力しピクチャの削除を行う。図7(b)上部の例では上記処理によってP4が削除され、図7(b)下部のように復号化したピクチャCを生成された空き領域に蓄積している。   The upper part of FIG. 7B shows an example in which there is not enough free space in the picture memory 203 to store the decoded picture C. In this example, P4, P5, and P7 in the picture sequence of FIG. 30 are stored in the picture memory, and P8 is currently being decoded (that is, C = P8). In this case, it is necessary to delete the picture area having the picture data stored in the picture memory 203 to secure an area for storing the newly decoded picture C. In the present embodiment, the picture to be decoded has the same picture size as the picture area, which is an area obtained by dividing the picture memory, or a smaller picture size. Therefore, when there is no free area in the picture memory, an area for storing the decoded picture can be secured by deleting one of the picture areas. As the picture area to be deleted, the one with the oldest display order information held by the stored pictures is selected. In this example, it can be seen that the display order information of P4 is the oldest. The deletion picture area determination unit 209 determines the picture area to be deleted by the above-described processing, outputs the determination result to the picture memory control unit 206, and deletes the picture. In the example shown in the upper part of FIG. 7B, P4 is deleted by the above processing, and the decoded picture C is stored in the generated free area as shown in the lower part of FIG. 7B.

なお、上記実施の形態では、復号化におけるピクチャメモリ203からピクチャ領域を削除するときに、蓄積されているピクチャの持つ表示順情報が古いものから順に行っていたが、表示順情報の代わりに、復号化された順序が古いピクチャから順に削除を行うとした場合も全く同様に扱うことが可能である。   In the above-described embodiment, when the picture area is deleted from the picture memory 203 in the decoding, the display order information of the stored pictures is performed in ascending order, but instead of the display order information, The case where the pictures are deleted in order from the oldest decoded picture can be handled in exactly the same way.

以上の説明から分かるように、本実施の形態では復号化対象ピクチャCにおいてピクチャサイズが変更された場合でも、復号化対象ピクチャCにおいてピクチャサイズが変更されなかった場合でも、全く同様の処理によってピクチャメモリ203の管理を実現することができるので、両者を区別する必要がない。つまり、符号化を行う際にピクチャサイズが変更された場合でも変更がされなかった場合でも、常に1領域分のみのピクチャ領域を削除するという単純な処理方法によって、表示されていない可能性のあるピクチャをできる限りピクチャメモリに残したまま、矛盾無くピクチャメモリの管理を行うことが可能となる。また、符号化装置側においても、従来の方法に加えて、ストリーム中に含まれる最大のピクチャサイズの情報を符号化して符号列に記述するだけで本実施の形態の処理を実現することが可能であり、画像符号化装置の実装が容易である。しかし、図6および図7の例で発生したように、新たに復号化されるピクチャ(復号化対象ピクチャC以降のピクチャ)が小さいピクチャサイズを持つ場合は、それぞれのピクチャ領域中に使用されない無駄な領域が発生するため、ピクチャメモリを有効に活用しきれているとは言いがたい。しかし、どのピクチャサイズのピクチャも物理的に分割されることなくメモリ上に連続して蓄積することが可能となるため、メモリのアクセスが単純化され速度を低下させることなく復号化を行うことが可能となる。また、通常の画像符号化および復号化においては、ピクチャサイズが変更されても、ピクチャの参照関係(参照に使用するピクチャの枚数等)は変更せずに処理を行うような構成が多く使用される。よって、本実施の形態で説明したような方法によって、効率の良い処理方法による復号化を実現することが可能であると言える。   As can be understood from the above description, in the present embodiment, even when the picture size is changed in the current picture C to be decoded or when the picture size is not changed in the current picture C to be decoded, the picture Since the management of the memory 203 can be realized, there is no need to distinguish between the two. In other words, even when the picture size is changed or not changed during encoding, the picture may not be displayed by a simple processing method of always deleting only one picture area. It is possible to manage the picture memory without inconsistency while leaving the picture in the picture memory as much as possible. Also, on the encoding device side, in addition to the conventional method, it is possible to realize the processing of the present embodiment only by encoding the information of the maximum picture size included in the stream and describing the information in the code sequence. Therefore, mounting of the image encoding device is easy. However, when the newly decoded picture (the picture after the current picture to be decoded C) has a small picture size, as occurs in the examples of FIGS. 6 and 7, the waste that is not used in each picture area is used. It is difficult to say that the picture memory has been effectively utilized because of the occurrence of a special area. However, since pictures of any picture size can be stored continuously in memory without being physically divided, memory access is simplified and decoding can be performed without reducing the speed. It becomes possible. Further, in ordinary image encoding and decoding, a configuration is often used in which processing is performed without changing the picture reference relationship (the number of pictures used for reference) even when the picture size is changed. You. Therefore, it can be said that decoding by an efficient processing method can be realized by the method described in the present embodiment.

(実施の形態2)
実施の形態1では、ストリーム中に含まれる可能性のある最大のピクチャサイズの情報に基づいて、復号化側のピクチャメモリ203を分割し、このピクチャ領域を単位としてピクチャメモリ203を管理した。これに対し、本実施の形態2では、ストリーム中に含まれる可能性のある最小のピクチャサイズの情報に基づいて、ピクチャメモリ203を管理する。
(Embodiment 2)
In the first embodiment, the picture memory 203 on the decoding side is divided based on information on the maximum picture size that may be included in the stream, and the picture memory 203 is managed in units of this picture area. On the other hand, in the second embodiment, the picture memory 203 is managed based on the information on the minimum picture size that may be included in the stream.

本発明の実施の形態2における動画像の符号化方法について図1に示したブロック図を用いて説明する。画像符号化装置の構成は実施の形態1で説明した画像符号化装置800と同様である。すでに説明した構成要素と全く同様の構成要素については、ここでは説明を省略する。
符号化対象のストリームの符号化に先立って、ピクチャメモリ分割情報符号化部801では復号化側のピクチャメモリを分割する方法を指定するための情報を符号化する。本実施の形態では、前記復号化側のピクチャメモリ203を分割する方法を指定する情報として、ストリーム中に含まれる可能性のある最小のピクチャサイズの情報を符号化する。図8は、本実施の形態2の画像符号化装置800により生成される符号列のデータ構造を示す図である。図8(a)は、ストリーム中に含まれる可能性のある最小のピクチャサイズの情報を符号化する場合の符号列の一例を示す図である。ピクチャメモリ分割情報符号化部801は、ストリーム中に含まれる可能性のある最小のピクチャサイズの情報を、図8(a)における符号列のピクチャ共通情報領域のmin_size として記述する。ここでの最小のピクチャサイズは、例えば、画像符号化装置が符号化に使用することのできる最小のピクチャサイズを用いるとしてもよいし、ユーザが符号化を実行する際に提示された複数のピクチャサイズのうちから1つを選択して決定するとしてもよい。
A moving image encoding method according to Embodiment 2 of the present invention will be described with reference to the block diagram shown in FIG. The configuration of the image encoding device is the same as that of image encoding device 800 described in Embodiment 1. The description of the same components as those already described is omitted here.
Prior to encoding a stream to be encoded, the picture memory division information encoding unit 801 encodes information for designating a method of dividing the decoding-side picture memory. In the present embodiment, information of a minimum picture size that may be included in a stream is encoded as information specifying a method of dividing the picture memory 203 on the decoding side. FIG. 8 is a diagram illustrating a data structure of a code string generated by the image coding device 800 according to the second embodiment. FIG. 8A is a diagram illustrating an example of a code string when information of a minimum picture size that may be included in a stream is encoded. The picture memory division information coding unit 801 describes the information of the minimum picture size that may be included in the stream as min_size of the picture common information area of the code string in FIG. Here, the minimum picture size may be, for example, a minimum picture size that can be used by the image encoding device for encoding, or a plurality of pictures presented when the user performs encoding. One of the sizes may be selected and determined.

符号化対象のピクチャがIDRピクチャもしくはそれに代わるピクチャサイズの変更を可能とするピクチャであった場合、従来の技術と同様にピクチャメモリ制御部109よりピクチャメモリのリセット方法を示す信号が符号列生成部103に入力される。本実施の形態では、この際に指定するピクチャメモリのリセット方法は任意であり、例えば、復号化側のピクチャメモリの動作を想定した場合に、ピクチャメモリ内に表示されていないピクチャがあるかないかよって、reset_flag を0、つまり全てのピクチャを参照不可にするだけでピクチャデータそのものは削除しない、もしくは、reset_flag を1、つまり全てのピクチャのデータそのものを削除してピクチャメモリの全領域を空き状態にする、かのどちらかを任意に選択することが可能である。符号列生成部103では入力された前記信号を符号化し、図8(a)のようにreset_flag をスライスヘッダに持った形式の符号列を生成する。   If the picture to be coded is an IDR picture or a picture that can change the picture size in place of the IDR picture, a signal indicating a picture memory reset method is sent from the picture memory control 103 is input. In the present embodiment, the method of resetting the picture memory specified at this time is arbitrary. For example, when the operation of the picture memory on the decoding side is assumed, whether or not there is a picture not displayed in the picture memory Therefore, reset_flag is set to 0, that is, the picture data itself is not deleted just by making all pictures inaccessible. It is possible to arbitrarily select either one. The code sequence generation unit 103 codes the input signal, and generates a code sequence having a reset_flag in a slice header as shown in FIG. 8A.

なお、min_size としてストリーム中に含まれる可能性のある最小のピクチャサイズの情報を記述する代わりに、復号化におけるピクチャメモリ203を分割した際のそれぞれの分割後のピクチャ領域のサイズを直接one_mem_sizeとして記述する方法もある。図8(b)は、ピクチャメモリ203を分割して得られるピクチャ領域のサイズの情報を符号化する場合の符号列の一例を示す図である。例えば、図8(b)のように、分割後のピクチャ領域のサイズを直接one_mem_sizeとしてピクチャ共通情報の中に記述するとしてもよい。このone_mem_sizeとしては、例えば、ストリーム中に含まれる最小のピクチャサイズをそのまま用いてもよいし、ストリーム中に含まれる全てのピクチャサイズの最大公約数を用いてもよいし、復号化側のメモリの動作を想定した際に最も効率良くアクセスすることが可能であるひとまとまりの領域のサイズを用いるとしてもよい。   In addition, instead of describing the minimum picture size information that may be included in the stream as min_size, the size of each divided picture area when the picture memory 203 is divided in decoding is directly described as one_mem_size. There is also a way to do it. FIG. 8B is a diagram illustrating an example of a code string when encoding information on the size of a picture area obtained by dividing the picture memory 203. For example, as shown in FIG. 8B, the size of the divided picture area may be directly described as one_mem_size in the picture common information. As this one_mem_size, for example, the minimum picture size included in the stream may be used as it is, the greatest common divisor of all the picture sizes included in the stream may be used, or the decoding side memory may be used. The size of a group of areas that can be accessed most efficiently when an operation is assumed may be used.

なお、one_mem_sizeを決定する際は、1つのマクロブロックを同じ領域に蓄積できるように、もしくは画面(ピクチャ)の横方向1列分の全てのマクロブロックを同じ領域に蓄積できるようにone_mem_sizeの値の切り上げを行うことにより、効率の良いメモリ管理を実現することも可能である。また、この切り上げは、画像復号化装置側で行うようにしてもよい。例えば図9のような3種類のピクチャサイズのピクチャが1つのストリーム内で符号化されているとする。図9(a)は1つのストリーム内で符号化されている3通りのピクチャサイズの例を示す図である。同図において、各ピクチャのサイズは、縦横の長さがマクロブロック(例えば、16×16画素)いくつ分に相当するかで表されている。図9(a)において、ピクチャAはマクロブロック数が縦6横7で構成されるピクチャであり、ピクチャBはマクロブロック数が縦8横10で構成されるピクチャであり、ピクチャCはマクロブロック数が縦12横12で構成されるピクチャとなっている。図9(b)は、1つのストリーム内に図9(a)に示した3つのピクチャサイズのピクチャが含まれる場合に、ピクチャメモリ203を効率よく利用するためのピクチャ領域の分割方法の一例を示す図である。この場合、one_mem_sizeとしてマクロブロック48個分のデータを蓄積できる領域のサイズを記述すれば、図9(b)のように、ピクチャAは1つのピクチャ領域で、ピクチャBは2つのピクチャ領域で、ピクチャCは3つのピクチャ領域で1枚分のピクチャのデータを蓄積することが可能となる。このとき各ピクチャの横方向1列分のマクロブロックは途中で区切られることなく1つのピクチャ領域に割り当てられているのが分かる。なお、図9の例では全てのピクチャが等分に分割されているが、分割の大きさは不均一でも問題なく扱うことが可能である。   When determining one_mem_size, the value of one_mem_size is set so that one macroblock can be stored in the same area, or all macroblocks in one horizontal row of a screen (picture) can be stored in the same area. By rounding up, efficient memory management can be realized. This rounding up may be performed on the image decoding device side. For example, assume that pictures of three types of picture sizes as shown in FIG. 9 are encoded in one stream. FIG. 9A is a diagram illustrating an example of three types of picture sizes encoded in one stream. In the figure, the size of each picture is represented by how many vertical and horizontal lengths correspond to macroblocks (for example, 16 × 16 pixels). In FIG. 9A, picture A is a picture in which the number of macroblocks is 6 × 7, picture B is a picture in which the number of macroblocks is 8 × 10, and picture C is a macroblock. The picture is composed of 12 vertical 12 horizontal rows. FIG. 9B shows an example of a picture area dividing method for efficiently using the picture memory 203 when one stream includes pictures of the three picture sizes shown in FIG. 9A. FIG. In this case, if one_mem_size describes the size of an area in which data for 48 macroblocks can be stored, as shown in FIG. 9B, picture A is one picture area, picture B is two picture areas, Picture C can store data of one picture in three picture areas. At this time, it can be seen that the macroblocks for one row in the horizontal direction of each picture are allocated to one picture area without being divided on the way. Note that, in the example of FIG. 9, all pictures are equally divided, but even if the size of division is not uniform, it can be handled without any problem.

なお、one_mem_sizeとして復号化側のピクチャメモリを分割した1つ分のピクチャ領域のサイズの情報を記述する代わりに、分割したピクチャ領域の数をarea_numとして符号列のピクチャ共通情報領域に記述することも可能である。図8(c)は、ピクチャメモリ203を分割して得られるピクチャ領域の数を符号化する場合の符号列の一例を示す図である。例えば、図8(c)のように、分割後のピクチャ領域の数をarea_numとして直接ピクチャ共通情報の中に記述するとしてもよい。その場合、画像復号化装置のピクチャメモリのサイズは規格等によって一定であるので、area_numの値は下記の式4によって容易に決定される。なお、式中の割り算の演算結果は切り捨て処理によって整数値として算出されるものとする。
(area_num)=(画像復号化装置1100のピクチャメモリのサイズ)/(one_mem_size) (式4)
なお、上記のピクチャサイズおよびピクチャメモリのサイズとは、全体の画素数、もしくは全体のマクロブロックの個数、もしくは全体のビット数のいずれであっても同様に扱うことが可能である。
Instead of describing the size information of one picture area obtained by dividing the picture memory on the decoding side as one_mem_size, the number of divided picture areas may be described as area_num in the picture common information area of the code string. It is possible. FIG. 8C is a diagram illustrating an example of a code string when the number of picture regions obtained by dividing the picture memory 203 is encoded. For example, as shown in FIG. 8C, the number of divided picture areas may be directly described in the picture common information as area_num. In this case, since the size of the picture memory of the image decoding apparatus is constant according to the standard or the like, the value of area_num is easily determined by the following equation 4. The calculation result of the division in the expression is calculated as an integer by truncation processing.
(Area_num) = (size of picture memory of image decoding apparatus 1100) / (one_mem_size) (Equation 4)
It should be noted that the above-described picture size and picture memory size can be treated in the same manner regardless of the total number of pixels, the total number of macroblocks, or the total number of bits.

図10(a)、図10(b)及び図10(c)は、図8(a)、図8(b)及び図8(c)に示した各符号列中のピクチャ共通情報の領域に、付加的情報を記述する場合の符号列の一例を示す図である。なお、図8(a)、図8(b)及び図8(c)に示した符号列は、図10(a)、図10(b)及び図10(c)に示したように記述されるとしてもよい。すなわち、min_size およびone_mem_sizeおよびarea_numに加えて、cnf_flagを符号列のピクチャ共通情報領域に記述することも可能である。cnf_flagはmin_size およびone_mem_sizeおよびarea_numに従って復号化側のピクチャメモリを分割して管理を行った場合でも、ストリーム中に含まれる全てのピクチャを問題なく表示することができるかどうかを示すフラグである。例えば、値が1の場合は問題なく表示することができることを示し、値が0の場合はまだ表示されていないピクチャが、本実施の形態の処理によって既にデータを失ってしまったため表示することができなくなる可能性があることを示す。   FIGS. 10 (a), 10 (b) and 10 (c) show the regions of the picture common information in each code string shown in FIGS. 8 (a), 8 (b) and 8 (c). FIG. 7 is a diagram showing an example of a code string when additional information is described. The code strings shown in FIGS. 8A, 8B, and 8C are described as shown in FIGS. 10A, 10B, and 10C. You may. That is, in addition to min_size, one_mem_size, and area_num, cnf_flag can be described in the picture common information area of the code string. The cnf_flag is a flag indicating whether all pictures included in the stream can be displayed without any problem even when the decoding side picture memory is divided and managed according to min_size, one_mem_size, and area_num. For example, a value of 1 indicates that display can be performed without any problem, and a value of 0 indicates that a picture that has not been displayed has already been lost due to the processing of this embodiment. Indicates that it may not be possible.

なお、図8(a)、(b)、(c)および図10(a)、(b)、(c)では、min_size 、 one_mem_size、area_numおよびcnf_flagをピクチャ共通情報領域に記述しているが、例えば、復号化を行う際に必ずしも必要ではないが復号化処理のための補助となるようなデータを集めたデータ領域に記述することも可能である。また、シーケンス全体から参照されるシーケンス共通情報領域に記述することも可能である。また、スライスヘッダに記述することも可能である。   In FIGS. 8A, 8B, and 8C, and FIGS. 10A, 10B, and 10C, min_size, one_mem_size, area_num, and cnf_flag are described in the picture common information area. For example, it is also possible to describe in a data area where data that is not always necessary for decoding, but which assists the decoding process is collected. Further, it is also possible to describe in a sequence common information area referred to from the entire sequence. Also, it is possible to describe in the slice header.

次に、上で述べたような符号化方法によって符号化された符号列の復号化方法を、図4に示した画像復号化装置1100のブロック図、および図5に示した復号化処理のフローチャート、および図11と図12に示したピクチャメモリの模式図を用いて説明する。
本実施の形態は実施の形態1と同様に、ピクチャメモリの管理をピクチャ単位で行うのではなくピクチャ領域と呼ばれるピクチャメモリを1つもしくは複数に分割した領域を1つの格納および削除の単位として行うことを特徴とする。そこで、符号列の復号化に先立って、ピクチャメモリ分割方法指定部210ではピクチャメモリの分割方法を符号列中の信号から解析してピクチャメモリ制御部206に指示する。本実施の形態では、前記ピクチャメモリを分割する方法を指定する情報として、ストリーム中に含まれる可能性のある最小のピクチャサイズの情報が図8(a)の符号列中に含まれるmin_size としてピクチャ共通情報領域に記述されている。ピクチャメモリ分割方法指定部210は、前記信号を解析することによりピクチャメモリの分割方法を決定する。その際に分割される領域の数は下記の式5によって算出される。なお、式中の割り算の演算結果は切り捨て処理によって整数値として算出されるものとする。
(ピクチャ領域数)=(画像復号化装置1100のピクチャメモリのサイズ)/(min_size ) (式5)
また、図8(a)の符号列の代わりに図8(b)の符号列を用いた場合はピクチャ領域の数は下記の式6によって算出される。
(ピクチャ領域数)=(画像復号化装置1100のピクチャメモリのサイズ)/(one_mem_size) (式6)
また、図8(a)の符号列の代わりに図8(c)の符号列を用いた場合はピクチャ領域の数は下記の式7によって算出される。
(ピクチャ領域数)=(area_num) (式7)
なお、上記のピクチャサイズおよびピクチャメモリのサイズは、全体の画素数、もしくは全体のマクロブロックの個数、もしくは全体のビット数のいずれで表されている場合であっても同様に扱うことが可能である。
Next, a method of decoding a code string encoded by the above-described encoding method will be described with reference to a block diagram of the image decoding apparatus 1100 shown in FIG. 4 and a flowchart of the decoding process shown in FIG. , And the schematic diagrams of the picture memories shown in FIG. 11 and FIG.
In the present embodiment, similar to the first embodiment, the management of the picture memory is not performed in units of pictures, but an area called a picture area divided into one or a plurality of picture memories is performed as one storage and deletion unit. It is characterized by the following. Therefore, prior to decoding the code string, the picture memory division method designating section 210 analyzes the picture memory dividing method from the signal in the code string and instructs the picture memory control section 206. In the present embodiment, as information specifying the method of dividing the picture memory, information on the minimum picture size that may be included in the stream is defined as min_size included in the code string of FIG. It is described in the common information area. The picture memory division method designating section 210 determines a picture memory division method by analyzing the signal. At this time, the number of divided regions is calculated by the following equation 5. The calculation result of the division in the expression is calculated as an integer by truncation processing.
(Number of picture areas) = (size of picture memory of image decoding apparatus 1100) / (min_size) (Equation 5)
When the code sequence of FIG. 8B is used instead of the code sequence of FIG. 8A, the number of picture regions is calculated by the following Expression 6.
(Number of picture areas) = (size of picture memory of image decoding apparatus 1100) / (one_mem_size) (Equation 6)
When the code sequence of FIG. 8C is used instead of the code sequence of FIG. 8A, the number of picture regions is calculated by the following equation (7).
(Number of picture areas) = (area_num) (Equation 7)
The above-described picture size and picture memory size can be treated in the same manner regardless of whether the size is represented by the total number of pixels, the total number of macroblocks, or the total number of bits. is there.

ピクチャサイズ変更判定部207では、復号化対象のピクチャのピクチャサイズとそれ以前(又はその直前)に復号化されたピクチャのピクチャサイズとを比較し、ピクチャサイズの変更がなされたかどうかを判定する。
符号列中のスライスヘッダには図8(a)、(b)、(c)にあるようにreset_flag が符号化されている。符号列解析部201では前記reset_flag の値を解析し、解析結果の情報をピクチャメモリ制御部206に出力する。本実施の形態ではピクチャサイズが変更されていた場合でもreset_flag の値は0もしくは1の両方とも選択されている可能性がある。したがって、reset_flag の値に応じて、図5のフローチャートのようにピクチャメモリの管理方法が分かれることになる。特にreset_flag が0の場合は、ピクチャメモリ内にピクチャサイズ変更前のピクチャが残っている可能性があるため、ピクチャサイズ変更後のピクチャを蓄積するためにどのピクチャ領域を削除しなくてはならないかを判定する必要がある。その判定が削除ピクチャ領域判定部209によってなされ、前記判定結果はピクチャメモリ制御部206に出力され、ピクチャメモリ203の管理が行われる。
The picture size change determination unit 207 compares the picture size of the picture to be decoded with the picture size of the picture decoded before (or immediately before) and determines whether the picture size has been changed.
As shown in FIGS. 8A, 8B and 8C, reset_flag is encoded in the slice header in the code string. The code string analysis unit 201 analyzes the value of the reset_flag, and outputs information of the analysis result to the picture memory control unit 206. In the present embodiment, even if the picture size has been changed, the value of reset_flag may be both 0 or 1. Accordingly, the picture memory management method is divided according to the value of reset_flag as shown in the flowchart of FIG. In particular, when reset_flag is 0, there is a possibility that the picture before the picture size change remains in the picture memory. Therefore, which picture area must be deleted to accumulate the picture after the picture size change. Must be determined. The determination is made by the deletion picture area determination unit 209, and the determination result is output to the picture memory control unit 206, and the picture memory 203 is managed.

次に復号化処理におけるピクチャメモリ制御部206、ピクチャサイズ変更判定部207、削除ピクチャ領域判定部209の動作の詳細について、図5のフローチャートを用いて説明を行う。なお、図5のフローチャートでは対象ピクチャの復号化を行った後にピクチャサイズの変更の判定およびreset_flag の値の判定を行っているが、この順番は任意であり、図5に示した順番に限ったものではない。   Next, the details of the operations of the picture memory control unit 206, the picture size change determination unit 207, and the deleted picture area determination unit 209 in the decoding process will be described with reference to the flowchart in FIG. In the flowchart of FIG. 5, after the decoding of the target picture is performed, the determination of the change in the picture size and the determination of the value of the reset_flag are performed. However, the order is arbitrary, and is limited to the order shown in FIG. Not something.

まず、復号化対象ピクチャにおいてピクチャサイズが変更され(S1204)、かつ、reset_flag が1のとき(S1205)に実行される復号化処理のフローについて説明する。reset_flag が1とは、ピクチャメモリ内の全てのピクチャデータを削除し、全ての領域を空き状態にすることを示す値である。つまりこの信号がピクチャメモリ制御部206に入力されると、ピクチャメモリ制御部206はピクチャメモリ内の全ての領域を削除し(S1206)、復号化を行ったピクチャサイズ変更後のピクチャをピクチャメモリ内の任意の領域に保存する(S1207)ことが可能である。   First, the flow of the decoding process executed when the picture size of the decoding target picture is changed (S1204) and reset_flag is 1 (S1205) will be described. A reset_flag of 1 is a value indicating that all picture data in the picture memory is deleted and all areas are left empty. That is, when this signal is input to the picture memory control unit 206, the picture memory control unit 206 deletes all the areas in the picture memory (S1206) and replaces the decoded picture with the changed picture size in the picture memory. (S1207).

次いで、復号化対象ピクチャにおいてピクチャサイズが変更され(S1204)、かつ、reset_flag が0のとき(S1205)に実行される復号化処理のフローについて説明する。reset_flag が0とは、ピクチャメモリ内の全てのピクチャデータを参照不可にするがピクチャデータそのものは削除せずに蓄積したままにすることを示す値である。削除ピクチャ領域判定部209はピクチャメモリ内の空き領域を調べ、空き領域が足りない場合はピクチャサイズ変更後のサイズとピクチャメモリを分割した1つのピクチャ領域のサイズと比較し、復号化したピクチャの分割の方法を決定して、削除するピクチャ領域の数および削除するピクチャ領域を判定する(S1208)。ピクチャメモリ203内に蓄積されているピクチャは、ピクチャデータに加え表示順の情報を持っている。削除ピクチャ領域判定部209は、前記表示順情報を調べることにより、表示順情報の古いピクチャが蓄積されているピクチャ領域を指定し、指定されたピクチャ領域から順に削除する指示をピクチャメモリ制御部206に伝達する。その結果、指定されたピクチャ領域が削除され、生成された空き領域に復号化したピクチャが蓄積される(S1210)。   Next, the flow of the decoding process executed when the picture size of the decoding target picture is changed (S1204) and reset_flag is 0 (S1205) will be described. The reset_flag of 0 is a value indicating that all the picture data in the picture memory is not to be referred to, but the picture data itself is not deleted but is stored. The deleted picture area determination unit 209 checks the free area in the picture memory, and when the free area is not enough, compares the size after the picture size change with the size of one picture area obtained by dividing the picture memory, and A division method is determined, and the number of picture areas to be deleted and the picture area to be deleted are determined (S1208). The pictures stored in the picture memory 203 have display order information in addition to the picture data. By checking the display order information, the deletion picture area determination unit 209 specifies a picture area in which pictures with the oldest display order information are stored, and issues an instruction to delete in order from the specified picture area. To communicate. As a result, the designated picture area is deleted, and the decoded picture is stored in the generated free area (S1210).

図11(a)及び図11(b)は、新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1210の手順に従って、ピクチャメモリ203に蓄積される様子を示す図である。
図11(a)はピクチャメモリ内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域があった場合の例を示している。この例では、図30のピクチャ列におけるP2、P6、P4、P5がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示している。P2、P6、P4、P5はピクチャ領域と同じピクチャサイズを持ったピクチャであることが分かる。それに対して新たに復号化されたピクチャCは、ピクチャ領域1つ分のサイズよりも大きなピクチャサイズであり、2つに分割して蓄積する例を示している。この場合は、図11(a)下部のように新たに復号化されたピクチャCを2つ分のピクチャ領域を使用してそのまま空き領域に蓄積することが可能である。つまり、ピクチャメモリ内において、既にピクチャデータが蓄積されているピクチャ領域の削除は行わない。
FIGS. 11A and 11B are diagrams showing a state in which a newly decoded picture is stored in the picture memory 203 according to the procedure of steps S1204 to S1210 in the flowchart of FIG.
FIG. 11A shows an example in a case where there is a sufficient free area in the picture memory to store the newly decoded picture C. In this example, P2, P6, P4, and P5 in the picture sequence of FIG. 30 are stored in the picture memory, and P7 is currently being decoded (that is, C = P7). It can be seen that P2, P6, P4, and P5 are pictures having the same picture size as the picture area. On the other hand, the newly decoded picture C has a picture size larger than the size of one picture area, and shows an example in which the picture is divided into two and stored. In this case, as shown in the lower part of FIG. 11A, it is possible to store the newly decoded picture C as it is in the free area using two picture areas. That is, the picture area in which the picture data is already stored in the picture memory is not deleted.

図11(b)上部はピクチャメモリ内に復号化したピクチャCを蓄積するのに十分な空き領域がなかった場合の例を示している。この例では、図30のピクチャ列におけるP3、P1、P2、P6、P4、P5がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示している。この場合は、サイズ変更前のピクチャデータを持つピクチャ領域を削除して復号化したピクチャを蓄積するための領域を確保する必要がある。この例では、ピクチャサイズ変更後のピクチャCはピクチャ領域1つ分のサイズよりもピクチャサイズが大きく、2つに分割して2つ分のピクチャ領域を使用して蓄積しなくてはならないことが分かる。また、削除されるピクチャ領域は、そのピクチャ領域に蓄積されているピクチャが持っている表示順情報が古いものから順に選択される。この例では、P1、P2の順に表示順情報が古いことが分かる。削除ピクチャ領域判定部209では、上記のような処理によって削除すべきピクチャ領域を判定し、判定結果をピクチャメモリ制御部206に出力し、判定されたピクチャ領域の削除を行う。図11(b)上部の例では前記ピクチャ領域の削除処理によってP1、P2が削除され、図11(b)下部のように新たに復号化されたピクチャCが生成された空き領域に蓄積されている。   The upper part of FIG. 11B shows an example in which there is not enough free space to store the decoded picture C in the picture memory. In this example, P3, P1, P2, P6, P4, and P5 in the picture sequence in FIG. 30 are stored in the picture memory, and P7 is currently being decoded (that is, C = P7). In this case, it is necessary to secure a region for storing the decoded picture by deleting the picture region having the picture data before the size change. In this example, the picture C after the picture size change has a larger picture size than the size of one picture area, and it must be divided into two and stored using two picture areas. I understand. The picture area to be deleted is selected in ascending order of display order information of the pictures stored in the picture area. In this example, it can be seen that the display order information is older in the order of P1 and P2. The deleted picture area determining unit 209 determines a picture area to be deleted by the above processing, outputs a result of the determination to the picture memory control unit 206, and deletes the determined picture area. In the example shown in the upper part of FIG. 11B, P1 and P2 are deleted by the above-described picture area deletion processing, and the newly decoded picture C is stored in the generated free area as shown in the lower part of FIG. 11B. I have.

最後に、復号化対象ピクチャCにおいてはピクチャサイズが変更されずに、それ以前に変更されていた場合、もしくは全く変更がされていなかった場合(S1204)に実行される復号化処理のフローについて説明する。本実施の形態は、ピクチャメモリ内に復号化対象ピクチャと異なるピクチャサイズを持ったピクチャが存在していてもしていなくても全く同様の処理によってピクチャメモリを管理することが可能である。削除ピクチャ領域判定部209はピクチャメモリ内の空き領域を調べ、空き領域が足りない場合はピクチャサイズ変更後のサイズとピクチャメモリを分割した1つのピクチャ領域のサイズと比較し、復号化したピクチャの分割の方法を決定して、削除するピクチャ領域の数および削除するピクチャ領域を判定する。ピクチャメモリ内に蓄積されているピクチャはピクチャデータに加え表示順の情報を持っている。削除ピクチャ領域判定部209は、前記表示順情報を調べることにより、表示順情報の最も古いピクチャが蓄積されているピクチャ領域を特定し、特定されたピクチャ領域から順に削除する旨の指示をピクチャメモリ制御部206に伝達する。その結果生成された空き領域に、新たに復号化されたピクチャを蓄積する。   Finally, the flow of the decoding process executed when the picture size of the decoding target picture C has not been changed, but has been changed before that, or has not been changed at all (S1204) will be described. I do. In the present embodiment, it is possible to manage the picture memory by exactly the same processing whether or not a picture having a picture size different from the picture to be decoded exists in the picture memory. The deleted picture area determination unit 209 checks the free area in the picture memory, and when the free area is not enough, compares the size after the picture size change with the size of one picture area obtained by dividing the picture memory, and The division method is determined, and the number of picture areas to be deleted and the picture areas to be deleted are determined. The pictures stored in the picture memory have display order information in addition to the picture data. By checking the display order information, the deleted picture area determination unit 209 specifies a picture area in which the oldest picture of the display order information is stored, and issues an instruction to delete the picture area in order from the specified picture area. The information is transmitted to the control unit 206. The newly decoded picture is stored in the free space generated as a result.

図12(a)及び図12(b)は、新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1213の手順に従って、ピクチャメモリ203に蓄積される様子を示す図である。
図12(a)はピクチャメモリ内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域があった場合の例を示している。この例では、図30のピクチャ列におけるP4、P5、P7がピクチャメモリに蓄積され、現在P8を復号化している状態(すなわち、C=P8)を示している。P4、P5はピクチャ領域と同じピクチャサイズを持ったピクチャであることが分かる。それに対して新たに復号化されたピクチャCは、ピクチャ領域1つ分のサイズよりも大きなピクチャサイズであり、2つに分割して蓄積する例を示している。この場合は、図12(a)下部のように復号化されたピクチャCを2つ分のピクチャ領域を使用してそのまま空き領域に蓄積することが可能である。つまり、既にピクチャメモリ203内に蓄積されているピクチャデータを持つピクチャ領域の削除は行わない。
FIGS. 12A and 12B are diagrams showing a state in which newly decoded pictures are stored in the picture memory 203 in accordance with the procedures of steps S1204 to S1213 in the flowchart of FIG.
FIG. 12A shows an example in a case where there is sufficient free space in the picture memory to store the newly decoded picture C. In this example, P4, P5, and P7 in the picture sequence of FIG. 30 are stored in the picture memory, and P8 is currently being decoded (that is, C = P8). It can be seen that P4 and P5 are pictures having the same picture size as the picture area. On the other hand, the newly decoded picture C has a picture size larger than the size of one picture area, and shows an example in which the picture is divided into two and stored. In this case, as shown in the lower part of FIG. 12A, the decoded picture C can be directly stored in the free area using two picture areas. That is, the picture area having the picture data already stored in the picture memory 203 is not deleted.

図12(b)上部はピクチャメモリ203内に、復号化された復号化対象ピクチャCを蓄積するのに十分な空き領域がなかった場合の例である。この例では、図30のピクチャ列におけるP2、P6、P4、P5、P7がピクチャメモリに蓄積され、現在P8を復号化している状態(すなわち、C=P8)を示している。この場合はピクチャデータを持つピクチャ領域を削除して、新たに復号化されたピクチャCを蓄積するための領域を確保する必要がある。この例では、ピクチャサイズ変更後のピクチャCはピクチャ領域1つ分のサイズよりもピクチャサイズが大きいため、ピクチャCを2つに分割し、2つ分のピクチャ領域を使用して蓄積しなくてはならないことが分かる。また、削除されるピクチャの領域は、蓄積されているピクチャが持っている表示順情報が古いものから順に選択される。この例では、P2、P4の順に表示順情報が古いことが分かる。削除ピクチャ領域判定部209では、上記のような処理によって削除するピクチャ領域を判定し、判定結果をピクチャメモリ制御部206に出力し、ピクチャ領域の削除を行う。図12(b)上部の例では前記削除すべきピクチャ領域の判定処理によってP2、P4が削除され、図12(b)下部のように、新たに復号化されたピクチャCが、生成された空き領域に蓄積されている。   The upper part of FIG. 12B shows an example in which there is not enough free space in the picture memory 203 to store the decoded picture C to be decoded. In this example, P2, P6, P4, P5, and P7 in the picture sequence in FIG. 30 are stored in the picture memory, and P8 is currently being decoded (that is, C = P8). In this case, it is necessary to delete the picture area having the picture data and secure an area for storing the newly decoded picture C. In this example, since the picture size of the picture C after the picture size change is larger than the size of one picture area, the picture C is divided into two parts, and the picture C is not stored using the two picture areas. It turns out that it should not be. In addition, the area of the picture to be deleted is selected in ascending order of display order information of the stored picture. In this example, it can be seen that the display order information is older in the order of P2 and P4. The deleted picture area determining unit 209 determines the picture area to be deleted by the above-described processing, outputs the determination result to the picture memory control unit 206, and deletes the picture area. In the example of the upper part of FIG. 12B, P2 and P4 are deleted by the above-described determination process of the picture area to be deleted, and as shown in the lower part of FIG. Accumulated in the area.

なお、上記実施の形態2では、画像復号化装置1100におけるピクチャメモリ203からピクチャ領域を削除するときに、ピクチャ領域に蓄積されているピクチャの表示順情報が古いものから順に削除したが、表示順情報の代わりに、蓄積されているピクチャの復号化順が古いものから順に、ピクチャ領域の削除を行うとした場合も全く同様に扱うことが可能である。   In the second embodiment, when the picture area is deleted from the picture memory 203 in the image decoding apparatus 1100, the display order information of the pictures stored in the picture area is deleted in ascending order. Instead of the information, the case where the picture area is deleted in the order of decoding of the stored pictures from the oldest can be handled in exactly the same manner.

以上の説明から分かるように、本実施の形態では復号化対象ピクチャCにおいてピクチャサイズが変更された場合でも、復号化対象ピクチャCにおいてピクチャサイズが変更されなかった場合でも、全く同様の処理によってピクチャメモリ203の管理を実現することができるので、両者を区別する必要がない。つまり、符号化を行う際にピクチャサイズが変更された場合でも変更がされなかった場合でも、常に復号化したピクチャがいくつ分の領域が必要かを判断し、必要な領域のみを削除するという単純な処理方法によって、表示されていない可能性のあるピクチャをできる限りピクチャメモリに残したまま矛盾無くピクチャメモリの管理を行うことが可能となる。また、符号化側においても、従来の方法に加えて、ストリーム中に含まれる最小のピクチャサイズの情報、もしくは復号化側を想定してピクチャメモリを分割する1つ分のピクチャ領域のサイズを符号化して符号列に記述するだけで本実施の形態の処理を実現することが可能であり、画像符号化装置の作成が容易である。また、復号化したピクチャを分割するサイズはメモリアクセスの効率を考慮して任意に設定することが可能であり、メモリアクセスに関する速度を低下させることなく復号化を行うことが可能となる。   As can be understood from the above description, in the present embodiment, even when the picture size is changed in the current picture C to be decoded or when the picture size is not changed in the current picture C to be decoded, the picture Since the management of the memory 203 can be realized, there is no need to distinguish between the two. In other words, regardless of whether the picture size is changed or not when encoding is performed, it always determines how many areas the decoded picture needs, and deletes only the necessary areas. With such a processing method, it is possible to manage the picture memory without inconsistency while leaving the picture which may not be displayed in the picture memory as much as possible. In addition, on the encoding side, in addition to the conventional method, information on the minimum picture size included in the stream or the size of one picture area that divides the picture memory assuming the decoding side is encoded. It is possible to realize the processing according to the present embodiment only by converting it into a code string, and it is easy to create an image coding apparatus. Further, the size of dividing the decoded picture can be arbitrarily set in consideration of the efficiency of memory access, and decoding can be performed without reducing the speed related to memory access.

(実施の形態3)
上記実施の形態1では、ピクチャメモリの分割方法を指定するための情報が画像符号化装置において生成され、符号列内に記述された。これに対し、本発明の実施の形態3では、ピクチャメモリの分割方法を画像復号化装置において解析し決定する。従って、本発明の実施の形態3における動画像の符号化方法は図28を用いて説明した従来の符号化方法と同様であるので、説明を省略する。
(Embodiment 3)
In the first embodiment, the information for specifying the method of dividing the picture memory is generated in the image coding device and described in the code string. On the other hand, in the third embodiment of the present invention, the method of dividing the picture memory is analyzed and determined by the image decoding device. Therefore, the moving picture encoding method according to Embodiment 3 of the present invention is the same as the conventional encoding method described with reference to FIG. 28, and a description thereof will not be repeated.

図13は、本発明の実施の形態3における画像復号化装置2000の構成を示すブロック図である。以下では、本発明の実施の形態3における動画像の復号化方法について図13に示したブロック図を用いて説明する。復号化処理の構成は図4を用いて説明した実施の形態1の方法とほぼ同様である。実施の形態1の方法と異なる点は、ピクチャメモリ分割方法指定部210の代わりにアドレス分割部210Aが備えられた点である。ここでは実施の形態1と全く同様の処理については説明を省略する。   FIG. 13 is a block diagram showing a configuration of an image decoding device 2000 according to Embodiment 3 of the present invention. Hereinafter, a moving image decoding method according to Embodiment 3 of the present invention will be described with reference to the block diagram shown in FIG. The configuration of the decoding process is almost the same as the method of the first embodiment described with reference to FIG. The difference from the method of the first embodiment is that an address dividing unit 210A is provided instead of the picture memory dividing method designating unit 210. Here, the description of the processing completely the same as that of the first embodiment is omitted.

ピクチャサイズ変更判定部207では、復号化対象のピクチャのピクチャサイズとそれ以前(又はその直前)に復号化されたピクチャのピクチャサイズとを比較し、ピクチャサイズの変更がなされたかどうかを判定する。ピクチャサイズ変更判定部207は、ピクチャサイズの変更がなされたことを判定すると、変更後のピクチャサイズを、符号列解析部201を経由してアドレス分割部210Aに通知する。アドレス分割部210Aは、ピクチャサイズ変更判定部207により通知された変更後のピクチャサイズが各ピクチャ領域のサイズとなるよう、ピクチャメモリ203のアドレス空間を分割し、分割後のアドレスを単位としてピクチャメモリ203を管理するようピクチャメモリ制御部206に指示する。   The picture size change determination unit 207 compares the picture size of the picture to be decoded with the picture size of the picture decoded before (or immediately before), and determines whether the picture size has been changed. When determining that the picture size has been changed, the picture size change determining unit 207 notifies the address dividing unit 210A of the changed picture size via the code string analyzing unit 201. The address dividing unit 210A divides the address space of the picture memory 203 so that the changed picture size notified by the picture size change determining unit 207 becomes the size of each picture area, and uses the divided addresses as units. It instructs the picture memory control unit 206 to manage 203.

その際に分割される領域の数は下記の式8によって算出される。なお、式中の割り算の演算結果は切り捨て処理によって整数値として算出されるものとする。
(ピクチャ領域数)=(画像復号化装置2000のピクチャメモリ203のサイズ)/(ピクチャサイズ変更後のピクチャサイズ) (式8)
なお、上記のピクチャサイズおよびピクチャメモリのサイズは、全体の画素数、もしくは全体のマクロブロックの個数、もしくは全体のビット数のいずれを単位としてもよく、それぞれ同様に扱うことが可能である。
At this time, the number of regions to be divided is calculated by the following equation (8). The calculation result of the division in the expression is calculated as an integer by truncation processing.
(Number of picture areas) = (size of picture memory 203 of image decoding apparatus 2000) / (picture size after changing picture size) (Equation 8)
The picture size and the size of the picture memory may be set to any of the total number of pixels, the total number of macroblocks, or the total number of bits, and can be handled in the same manner.

次に復号化処理におけるピクチャメモリ制御部206、ピクチャサイズ変更判定部207、削除ピクチャ領域判定部209およびアドレス分割部210Aの動作の詳細について、図14を用いて説明を行う。図14は、図13に示した画像復号化装置2000における復号化処理の手順を示すフローチャートである。
まず、復号化対象ピクチャにおいてピクチャサイズが変更されると(S2301)、アドレス分割部210Aは、符号列解析部201を介してピクチャサイズ変更判定部207から復号化対象ピクチャのピクチャサイズ、すなわち、サイズ変更後のピクチャサイズを取得する(S2302)。アドレス分割部210Aは、取得したピクチャサイズでピクチャメモリ203のアドレス空間を分割し、分割後のピクチャ領域を単位としてピクチャメモリ203を管理するよう、ピクチャメモリ制御部206に指示する(S2303)。復号化対象ピクチャにおいてピクチャサイズが変更されていない場合(S2301)、ステップS2302及びS2303の処理は行わない。
Next, the operations of the picture memory control unit 206, the picture size change determination unit 207, the deleted picture area determination unit 209, and the address division unit 210A in the decoding process will be described in detail with reference to FIG. FIG. 14 is a flowchart illustrating a procedure of a decoding process in the image decoding device 2000 illustrated in FIG.
First, when the picture size of the decoding target picture is changed (S2301), the address division unit 210A sends the picture size of the decoding target picture from the picture size change determination unit 207 via the code sequence analysis unit 201, that is, the size. The picture size after the change is obtained (S2302). The address dividing unit 210A instructs the picture memory control unit 206 to divide the address space of the picture memory 203 by the obtained picture size and manage the picture memory 203 in units of the divided picture area (S2303). If the picture size has not been changed in the decoding target picture (S2301), the processes in steps S2302 and S2303 are not performed.

次いで、削除ピクチャ領域判定部209はピクチャメモリ203内の空き領域を調べ(S2304)、分割されたいずれか1つのピクチャ領域が連続した空き領域として存在しなければ、少なくとも1つのピクチャ領域が空き領域になるまで、ピクチャメモリ203内のピクチャを表示順が古いものから順に削除する(S2305)。具体的には、ピクチャメモリ203内に蓄積されているピクチャは、ピクチャデータに加えピクチャの表示順を示す情報を持っている。削除ピクチャ領域判定部209は、前記表示順情報を調べることにより、表示順情報の最も古いピクチャから順にピクチャを削除する旨の指示を、ピクチャメモリ制御部206に伝達する。ピクチャメモリ制御部206は、削除ピクチャ領域判定部209に指示されたピクチャを削除するという処理を、分割された1つ分のピクチャ領域が空き領域になるまで繰り返し、その結果、分割された1つ分のピクチャ領域が空き領域になると、空き領域になったピクチャ領域に新たに復号化されたピクチャを蓄積する(S2306)。分割された1つ分のピクチャ領域がはじめから空き領域であれば(S2304)、そのピクチャ領域に、新たに復号化されたピクチャがそのまま蓄積される(S2306)。   Next, the deleted picture area determination unit 209 checks a free area in the picture memory 203 (S2304), and if any one of the divided picture areas does not exist as a continuous free area, at least one Until, the pictures in the picture memory 203 are deleted in the order of display order (S2305). Specifically, the pictures stored in the picture memory 203 have information indicating the display order of the pictures in addition to the picture data. By checking the display order information, the deleted picture area determination unit 209 transmits an instruction to delete pictures in order from the oldest picture in the display order information to the picture memory control unit 206. The picture memory control unit 206 repeats the process of deleting the picture instructed by the deletion picture area determination unit 209 until one divided picture area becomes a free area, and as a result, When the minute picture area becomes an empty area, the newly decoded picture is stored in the empty picture area (S2306). If the one divided picture area is a free area from the beginning (S2304), the newly decoded picture is stored in that picture area as it is (S2306).

図15(a)及び図15(b)は、新たに復号化されたピクチャが、図14のフローチャートの手順に従ってピクチャメモリ203に蓄積される様子を示す図である。図15(a)及び図15(b)では、現在の復号化対象ピクチャC以降のピクチャサイズが、より大きいサイズに変更された場合を示している。図15(a)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域があった場合の例を示している。この例では、図30のピクチャ列におけるP2、P4、P5、P6がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示しているものとする。この例では、復号化対象ピクチャCであるP7からピクチャサイズが変更されており、図15(a)下部に示すように、P7のピクチャサイズでピクチャメモリ203のアドレスが分割されている。この場合は、図15(a)下部のように、新たに復号化されたピクチャCは、そのまま空き領域に蓄積することが可能である。既にピクチャメモリ内に蓄積されているピクチャデータを持つピクチャ領域の削除は行わない。   FIGS. 15A and 15B are diagrams showing a state in which newly decoded pictures are stored in the picture memory 203 according to the procedure of the flowchart in FIG. FIGS. 15A and 15B show a case where the picture sizes after the current decoding target picture C are changed to larger ones. FIG. 15A shows an example of a case where there is a sufficient free area in the picture memory 203 to store the newly decoded picture C. In this example, it is assumed that P2, P4, P5, and P6 in the picture sequence shown in FIG. 30 are stored in the picture memory and P7 is currently being decoded (that is, C = P7). In this example, the picture size is changed from P7 which is the decoding target picture C, and the address of the picture memory 203 is divided by the picture size of P7 as shown in the lower part of FIG. In this case, as shown in the lower part of FIG. 15A, the newly decoded picture C can be stored in a free area as it is. A picture area having picture data already stored in the picture memory is not deleted.

図15(b)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域がなかった場合の例を示している。この例では、図30のピクチャ列におけるP1、P2、P3、P4、P5、P6がピクチャメモリ203に蓄積され、現在P7を復号化している状態(すなわち、C=P7)であることを示している。この場合は、ピクチャメモリ203に蓄積されているピクチャデータを持つ領域を削除して、新たに復号化されたピクチャCを蓄積するための領域を確保する必要がある。本実施の形態では、復号化を行うピクチャCは必ずピクチャメモリを分割した領域であるピクチャ領域と同じピクチャサイズを持つものである。従って、ピクチャメモリ203内に空き領域が無い場合は、ピクチャメモリ内のどれか1つのピクチャ領域が完全に空き領域となるまでピクチャを削除すれば、新たに復号化されたピクチャを蓄積するための領域を確保することができる。削除するべきピクチャは、蓄積されているピクチャが持っている表示順情報が最も古いものから順に選択される。この例では、P1の表示順情報が最も古いことが分かる。しかし、P1を削除しただけでは、復号化対象ピクチャCのピクチャサイズに合わせて分割されたどのピクチャ領域も、1つ分の空き領域になっていない。表示順情報に従ってP1に次いでP2及びP3を削除した段階で、ピクチャメモリ203の先頭アドレスから2番目のピクチャ領域が1つ分の空き領域となる。削除ピクチャ領域判定部209では、上記のような処理によって削除すべきピクチャを判定し、判定結果をピクチャメモリ制御部206に出力する。ピクチャメモリ制御部206は、削除ピクチャ領域判定部209の判定結果に従って、ピクチャの削除を行う。図15(b)上部の例では上記処理によってP1、P2、P3が削除され、図15(b)下部のように新たに復号化されたピクチャCが生成された空き領域に蓄積されている。   FIG. 15B shows an example in which there is not enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P1, P2, P3, P4, P5, and P6 in the picture sequence in FIG. 30 are stored in the picture memory 203, and P7 is currently being decoded (that is, C = P7). I have. In this case, it is necessary to delete the area having the picture data stored in the picture memory 203 to secure an area for storing the newly decoded picture C. In the present embodiment, the picture C to be decoded always has the same picture size as the picture area which is an area obtained by dividing the picture memory. Therefore, when there is no free area in the picture memory 203, if a picture is deleted until one of the picture areas in the picture memory is completely free, the newly decoded picture can be stored. An area can be secured. The pictures to be deleted are selected in ascending order of display order information of the stored pictures. In this example, it can be seen that the display order information of P1 is the oldest. However, by simply deleting P1, none of the picture areas divided according to the picture size of the picture C to be decoded is one free area. At the stage where P2 and P3 are deleted after P1 according to the display order information, the second picture area from the head address of the picture memory 203 becomes one free area. The deletion picture area determination unit 209 determines a picture to be deleted by the above-described processing, and outputs a determination result to the picture memory control unit 206. The picture memory control unit 206 deletes a picture according to the determination result of the deleted picture area determination unit 209. In the example in the upper part of FIG. 15B, P1, P2, and P3 are deleted by the above processing, and the newly decoded picture C is stored in the generated free area as shown in the lower part of FIG.

図16(a)及び図16(b)は、新たに復号化されたピクチャが、図14のフローチャートの手順に従って、ピクチャメモリ203に蓄積される様子を示す図である。図16(a)及び図16(b)では、現在の復号化対象ピクチャC以降のピクチャサイズが、より小さいサイズに変更された場合を示している。図16(a)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域があった場合の例を示している。この例では、図30のピクチャ列におけるP1、P2、P3がピクチャメモリに蓄積され、現在P4を復号化している状態(すなわち、C=P4)を示しているものとする。この例では、復号化対象ピクチャCであるP4からピクチャサイズが変更されており、図16(a)下部に示すように、P4のピクチャサイズでピクチャメモリ203のアドレスが分割される。この場合は、図16(a)下部のように、新たに復号化されたピクチャCは、空き領域内の1つのピクチャ領域にそのまま過不足なく蓄積することが可能である。そして、既にピクチャメモリ内に蓄積されているピクチャデータを持つピクチャ領域の削除は行わない。   FIGS. 16A and 16B are diagrams showing a state in which newly decoded pictures are stored in the picture memory 203 according to the procedure of the flowchart in FIG. FIGS. 16A and 16B show a case where the picture sizes after the current decoding target picture C have been changed to smaller sizes. FIG. 16A shows an example of a case where there is a sufficient free area in the picture memory 203 to store the newly decoded picture C. In this example, it is assumed that P1, P2, and P3 in the picture sequence shown in FIG. 30 are stored in the picture memory and P4 is currently being decoded (that is, C = P4). In this example, the picture size is changed from the decoding target picture C P4, and the address of the picture memory 203 is divided by the P4 picture size as shown in the lower part of FIG. In this case, as shown in the lower part of FIG. 16A, the newly decoded picture C can be stored in one picture area in the free area without any excess or shortage. Then, the picture area having the picture data already stored in the picture memory is not deleted.

図16(b)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域がなかった場合の例を示している。この例では、図30のピクチャ列におけるP1、P2、P3、P4がピクチャメモリ203に蓄積され、現在P5を復号化している状態(すなわち、C=P5)である。この場合は、すでにピクチャデータが蓄積されている領域を削除して、新たに復号化されたピクチャCを蓄積するための領域をピクチャメモリ203に確保する必要がある。本実施の形態では、復号化を行うピクチャCは必ずピクチャメモリを分割した領域であるピクチャ領域と同じピクチャサイズを持つ。従って、ピクチャメモリ203内に空き領域が無い場合は、ピクチャメモリ内のどれか1つのピクチャ領域が完全に空き領域となるまでピクチャを削除すれば、新たに復号化されたピクチャを蓄積するための領域を確保することができる。削除するべきピクチャは、蓄積されているピクチャが持っている表示順情報が最も古いものから順に選択される。この例では、P1の表示順情報が最も古いことが分かる。そしてP1を削除することにより、1つ分のピクチャ領域が空き領域になる。削除ピクチャ領域判定部209では、上記のような処理によって削除すべきピクチャを判定し、判定結果をピクチャメモリ制御部206に出力する。ピクチャメモリ制御部206は、削除ピクチャ領域判定部209の判定結果に従って、ピクチャの削除を行う。図16(b)上部の例では上記処理によってP1が削除され、図16(b)下部のように、新たに復号化されたピクチャCが、生成された空き領域に蓄積される。   FIG. 16B shows an example in which there is not enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P1, P2, P3, and P4 in the picture sequence in FIG. 30 are stored in the picture memory 203, and P5 is currently being decoded (that is, C = P5). In this case, it is necessary to delete the area in which the picture data is already stored, and to secure an area in the picture memory 203 for storing the newly decoded picture C. In the present embodiment, the picture C to be decoded always has the same picture size as the picture area which is an area obtained by dividing the picture memory. Therefore, when there is no free area in the picture memory 203, if a picture is deleted until one of the picture areas in the picture memory is completely free, the newly decoded picture can be stored. An area can be secured. The pictures to be deleted are selected in ascending order of display order information of the stored pictures. In this example, it can be seen that the display order information of P1 is the oldest. Then, by deleting P1, one picture area becomes a free area. The deletion picture area determination unit 209 determines a picture to be deleted by the above-described processing, and outputs a determination result to the picture memory control unit 206. The picture memory control unit 206 deletes a picture according to the determination result of the deleted picture area determination unit 209. In the example in the upper part of FIG. 16B, P1 is deleted by the above processing, and the newly decoded picture C is stored in the generated free area as shown in the lower part of FIG. 16B.

なお、上記実施の形態では、ピクチャメモリ203からピクチャ領域を削除するときに、蓄積されているピクチャの持つ表示順情報が古いものから順に削除を行っていたが、表示順情報の代わりに、復号化された順番が古いピクチャから順に削除を行うとした場合も全く同様に扱うことが可能である。
以上の説明から分かるように、本実施の形態では復号化対象ピクチャCにおいてピクチャサイズが変更された場合でも、変更されなかった場合でも、全く同様の処理によってピクチャメモリ203の管理を実現することができるので、両者を区別する必要がない。つまり、符号化を行う際にピクチャサイズが変更された場合でも変更がされなかった場合でも、常に1領域分のみのピクチャ領域が完全に空き領域となるまで格納されているピクチャを削除するという単純な処理方法によって、表示されていない可能性のあるピクチャをできる限りピクチャメモリに残したまま、矛盾無くピクチャメモリの管理を行うことが可能となる。しかも、新たに分割されたピクチャ領域のそれぞれのサイズは、新たに復号化されるピクチャ(復号化対象ピクチャC以降のピクチャ)と同じサイズであるので、ピクチャサイズが大きいサイズに変更される場合であっても、小さいサイズに変更される場合であっても、それぞれのピクチャ領域中に使用されない無駄な領域が発生しない。このため、本実施の形態の画像復号化装置2000では、ピクチャメモリ203のメモリ領域を有効に活用することができている。併せて、どのピクチャサイズのピクチャも物理的に分割されることなくメモリ上に連続して蓄積することが可能となるため、メモリのアクセスが単純化され速度を低下させることなく復号化を行うことが可能となる。また、通常の画像符号化および復号化においては、ピクチャサイズが変更されても、ピクチャの参照関係(参照に使用するピクチャの枚数等)は変更せずに処理を行うような構成が多く使用される。よって、本実施の形態で説明したような方法によって、効率の良い処理方法による復号化を実現することが可能であると言える。
In the above embodiment, when the picture area is deleted from the picture memory 203, the display order information of the stored pictures is deleted in ascending order, but instead of the display order information, decoding is performed. It is possible to handle in the same manner even when the deletion is performed in the order from the oldest picture.
As can be seen from the above description, in the present embodiment, the management of the picture memory 203 can be realized by exactly the same processing regardless of whether the picture size of the decoding target picture C is changed or not. There is no need to distinguish between the two. In other words, even when the picture size is changed or not changed during encoding, the picture stored in the picture area of only one area is always deleted until the picture area is completely free. With such a processing method, it is possible to manage the picture memory without inconsistency while leaving the picture that may not be displayed in the picture memory as much as possible. In addition, the size of each of the newly divided picture areas is the same as the size of the newly decoded picture (the picture after the decoding target picture C). Even if the size is changed to a small size, no unnecessary area is generated in each picture area. For this reason, in the image decoding apparatus 2000 of the present embodiment, the memory area of the picture memory 203 can be effectively used. At the same time, since pictures of any picture size can be continuously stored in memory without being physically divided, memory access is simplified and decoding is performed without reducing speed. Becomes possible. Further, in normal image encoding and decoding, a configuration is often used in which processing is performed without changing the picture reference relationship (the number of pictures used for reference) even when the picture size is changed. You. Therefore, it can be said that decoding by an efficient processing method can be realized by the method described in the present embodiment.

ただし、本実施の形態では、空き領域の先頭からピクチャデータを蓄積するのではなく、空き領域の中のピクチャ領域の先頭からピクチャデータを蓄積するので、図15(b)に示したように、復号化対象ピクチャCを1枚分蓄積する以上の領域を削除してしまう可能性がある。このため、新たに復号化されたピクチャCを蓄積するために、1つ分のピクチャ領域が空き領域になるまで表示順で古いものから順にピクチャを削除していくと、特に、表示順情報の古いピクチャが、ピクチャメモリ203内の連続した領域に表示順情報の順で蓄積されていない場合には、表示待ち状態にあるピクチャまで削除されてしまう可能性があることは否定できない。   However, in the present embodiment, the picture data is not stored from the beginning of the free area, but is stored from the beginning of the picture area in the free area. Therefore, as shown in FIG. There is a possibility that an area larger than one picture C to be decoded is deleted. Therefore, in order to accumulate the newly decoded picture C, if the pictures are deleted from the oldest one in the display order until one picture area becomes a free area, the display order information If the old pictures are not stored in the continuous area in the picture memory 203 in the order of the display order information, it cannot be denied that there is a possibility that the pictures in the display waiting state may be deleted.

なお、上記実施の形態3では、表示順情報の古いピクチャから順に削除し、1つ分のピクチャ領域が連続する空き領域になったとき、そのピクチャ領域に新たに復号化されたピクチャCを蓄積した。しかし、本発明はこれに限定されず、これとは異なる方法で、復号化対象ピクチャCを蓄積してもよい。すなわち、ピクチャの表示順情報にかかわらず、ピクチャメモリ203の先頭の1つのピクチャ領域が連続した空き領域になるまで、すでに蓄積されているピクチャを先頭アドレスから順に削除する。先頭の1つのピクチャ領域が連続した空き領域になると、そのピクチャ領域に、新たに復号化されたピクチャCを蓄積する。次に復号化されたピクチャCを蓄積する場合には、ピクチャメモリ203の先頭から2つ目にあるピクチャ領域が連続した空き領域になるまで、最後に削除されたピクチャの次のアドレスからアドレスの順にピクチャを削除する。図17は、図13に示した画像復号化装置2000における他の復号化処理の手順を示すフローチャートである。   In the third embodiment, the pictures in the display order information are deleted in order from the oldest picture, and when one picture area becomes a continuous free area, the newly decoded picture C is stored in the picture area. did. However, the present invention is not limited to this, and the decoding target picture C may be stored by a different method. That is, regardless of the display order information of the pictures, the pictures that have already been stored are sequentially deleted from the top address until one top picture area of the picture memory 203 becomes a continuous free area. When the leading one picture area becomes a continuous free area, the newly decoded picture C is stored in that picture area. Next, when storing the decoded picture C, the next picture after the last deleted picture is stored until the second picture area from the top of the picture memory 203 becomes a continuous free area. Delete pictures in order. FIG. 17 is a flowchart illustrating a procedure of another decoding process in the image decoding device 2000 illustrated in FIG.

図17において、ステップS2601〜ステップS2603の処理は、図14に示したステップS2301〜ステップS2303の処理と同じである。ここでの処理により、復号化対象ピクチャにおいてピクチャサイズが変更されると、サイズ変更後のピクチャサイズでピクチャメモリ203のアドレス空間が分割され、分割後のピクチャ領域を単位としてピクチャメモリ203が管理される。   17, the processing in steps S2601 to S2603 is the same as the processing in steps S2301 to S2303 shown in FIG. When the picture size of the picture to be decoded is changed by the processing here, the address space of the picture memory 203 is divided by the picture size after the size change, and the picture memory 203 is managed in units of the divided picture area. You.

次いで、削除ピクチャ領域判定部209はピクチャメモリ203内の空き領域を調べ、新たに復号化されたピクチャを蓄積するためのピクチャ領域を含む十分な空き領域があれば、新たに復号化されたピクチャを、そのまま空きのピクチャ領域に蓄積する(S2606)。新たに復号化されたピクチャを蓄積するためのピクチャ領域が、1つも空き領域として存在しなければ(S2604)、削除ピクチャ領域判定部209は、ピクチャメモリ203の先頭から順に、復号化されたピクチャが最後に蓄積されたピクチャ領域の次のピクチャ領域を空き領域にし(S2605)、空き領域になったピクチャ領域に新たな復号化ピクチャを蓄積する(S2606)。図18は、図17に示したステップS2605における処理のより詳細な手順を示すフローチャートである。より具体的には、ピクチャメモリ制御部206は、ピクチャメモリ203に新たなピクチャを蓄積するための十分な空き領域がなくなったときにだけ使用される、ピクチャメモリ203内の特定のアドレス位置を示すポインタを設けておく。特定のアドレス位置とは、例えば、各ピクチャ領域の先頭アドレスである。また、ポインタの初期値を「0」とし、ポインタ=0は、ピクチャメモリ203の先頭にあるピクチャ領域の先頭アドレスを示しているものとする。また、ポインタ=(n−1)は、ピクチャメモリ203の先頭からn番目のピクチャ領域の先頭アドレスを示している(ただし、nは自然数)。   Next, the deleted picture area determination unit 209 checks a free area in the picture memory 203, and if there is a sufficient free area including a picture area for storing a newly decoded picture, the newly decoded picture Is stored in an empty picture area as it is (S2606). If no picture area for storing the newly decoded picture exists as a free area (S2604), the deleted picture area determination unit 209 determines the decoded picture in order from the top of the picture memory 203. Makes the picture area next to the last stored picture area an empty area (S2605), and stores a new decoded picture in the empty picture area (S2606). FIG. 18 is a flowchart showing a more detailed procedure of the process in step S2605 shown in FIG. More specifically, the picture memory control unit 206 indicates a specific address position in the picture memory 203 that is used only when there is not enough free space to store a new picture in the picture memory 203. A pointer is provided. The specific address position is, for example, the start address of each picture area. It is also assumed that the initial value of the pointer is “0”, and that the pointer = 0 indicates the head address of the picture area at the head of the picture memory 203. The pointer = (n-1) indicates the head address of the n-th picture area from the head of the picture memory 203 (where n is a natural number).

削除ピクチャ領域判定部209は、新たに復号化されたピクチャを蓄積するためのピクチャ領域が、1つも空き領域として存在しないと判断した場合(S2604)、ピクチャメモリ制御部206に、ポインタで示されるピクチャ領域内のピクチャをアドレスの順に削除させる(S2501〜S2503)。例えば、ポインタ=0のとき、ピクチャメモリ203の先頭にあるピクチャ領域が空き領域になるまでピクチャメモリ203内のピクチャをメモリの先頭から順に削除させる。ピクチャメモリ203の先頭にあるピクチャ領域が空き領域になると(S2502)、ピクチャメモリ制御部206は、ポインタを「1」インクリメントし(S2504)、ポインタに次のピクチャ領域の先頭アドレスをポイントさせる。ここで、ピクチャメモリ制御部206は、ポインタの値が全ピクチャ領域の数以上か否かを調べ、ポインタの値が全ピクチャ領域の数以上になると(S2505)、ポインタの値を「0」に戻し、ピクチャメモリ203内の先頭のピクチャ領域の先頭アドレスをポイントさせる。ポインタの値が全ピクチャ領域の数以上になった場合、ピクチャメモリ203内のすべてのピクチャ領域に、新たな復号化ピクチャが蓄積されたことを示している。   When the deleted picture area determination unit 209 determines that there is no picture area for storing the newly decoded picture as an empty area (S2604), it is indicated by a pointer to the picture memory control unit 206. The pictures in the picture area are deleted in the order of the addresses (S2501 to S2503). For example, when the pointer = 0, the pictures in the picture memory 203 are sequentially deleted from the beginning of the memory until the picture area at the head of the picture memory 203 becomes a free area. When the picture area at the head of the picture memory 203 becomes a free area (S2502), the picture memory control unit 206 increments the pointer by “1” (S2504) and causes the pointer to point to the start address of the next picture area. Here, the picture memory control unit 206 checks whether or not the value of the pointer is equal to or greater than the number of all picture areas. If the value of the pointer is equal to or greater than the number of all picture areas (S2505), the value of the pointer is set to “0”. Then, the head address of the head picture area in the picture memory 203 is pointed. When the value of the pointer becomes equal to or greater than the number of all picture areas, it indicates that a new decoded picture has been accumulated in all picture areas in the picture memory 203.

以上の処理により、ピクチャメモリ203内に新たな復号化ピクチャを蓄積するための空きのピクチャ領域がなくなった場合には、ピクチャメモリ203の先頭から順に、ピクチャ領域からピクチャデータが削除され、空き領域となったピクチャ領域に、新たな復号化ピクチャが蓄積されることになる。   By the above processing, if there is no more free picture area for storing a new decoded picture in the picture memory 203, picture data is deleted from the picture area in order from the top of the picture memory 203, and A new decoded picture is stored in the picture area.

図19(a)及び図19(b)は、新たに復号化されたピクチャが、図17及び図18のフローチャートの手順に従ってピクチャメモリ203に蓄積される様子を示す図である。図19(a)及び図19(b)では、現在の復号化対象ピクチャC以降のピクチャサイズが、より大きいサイズに変更された場合を示している。図19(a)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域があった場合の例を示している。この例では、図30のピクチャ列におけるP2、P4、P5、P6がピクチャメモリに蓄積され、現在P7を復号化している状態(すなわち、C=P7)を示しているものとする。この例では、復号化対象ピクチャCであるP7からピクチャサイズが変更されており、図19(a)下部に示すように、P7のピクチャサイズでピクチャメモリ203のアドレスが分割されている。この場合は、図19(a)上部の斜線部2示すようにピクチャメモリ203の先頭部分に十分な空き領域があるので、図19(a)下部のように、新たに復号化されたピクチャCを、そのまま空き領域に蓄積することが可能である。従って、既にピクチャメモリ内に蓄積されているピクチャデータを持つピクチャ領域の削除は行わない。   FIGS. 19A and 19B are diagrams showing a state in which newly decoded pictures are stored in the picture memory 203 according to the procedures of the flowcharts in FIGS. FIGS. 19A and 19B show a case where the picture sizes after the current decoding target picture C are changed to larger sizes. FIG. 19A shows an example in which there is a sufficient free area in the picture memory 203 to store the newly decoded picture C. In this example, it is assumed that P2, P4, P5, and P6 in the picture sequence shown in FIG. 30 are stored in the picture memory and P7 is currently being decoded (that is, C = P7). In this example, the picture size is changed from P7 which is the decoding target picture C, and the address of the picture memory 203 is divided by the picture size of P7 as shown in the lower part of FIG. In this case, there is a sufficient free area at the beginning of the picture memory 203 as shown by the shaded area 2 in the upper part of FIG. 19 (a), and therefore, as shown in the lower part of FIG. Can be stored in the empty area as it is. Therefore, the deletion of the picture area having the picture data already stored in the picture memory is not performed.

図19(b)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域がなかった場合の例を示している。この例では、図30のピクチャ列におけるP1、P2、P3、P4、P5、P6がピクチャメモリ203に蓄積され、現在P7を復号化している状態(すなわち、C=P7)であることを示している。この場合は、ピクチャメモリ203に蓄積されているピクチャデータを持つ領域を削除して、新たに復号化されたピクチャCを蓄積するための領域を確保する必要がある。本実施の形態では、復号化を行うピクチャCは必ずピクチャメモリを分割した領域であるピクチャ領域と同じピクチャサイズを持つものである。従って、ピクチャメモリ203内に空き領域が無い場合は、ピクチャメモリ内のどれか1つのピクチャ領域が完全に空き領域となるまでピクチャを削除すれば、新たに復号化されたピクチャを蓄積するための領域を確保することができる。削除するべきピクチャは、ピクチャメモリ203の先頭からアドレスの順に選択される。この例では、P4、P1の順で削除した段階で、ピクチャメモリ203の先頭から1番目のピクチャ領域が1つ分の空き領域となる。削除ピクチャ領域判定部209では、上記のような処理によって削除すべきピクチャを判定し、判定結果をピクチャメモリ制御部206に出力する。ピクチャメモリ制御部206は、削除ピクチャ領域判定部209の判定結果に従って、ピクチャの削除を行う。図19(b)上部の例では上記処理によってP4、P1が削除され、図19(b)下部のように新たに復号化されたピクチャCが先頭のピクチャ領域に蓄積されている。なお、さらに次の復号化対象ピクチャCが復号化されると、ピクチャメモリ203内の状態が図19(b)下部に示された状態で、新たに復号化されたピクチャを蓄積しなければならなくなる。この場合、P2、P3が削除され、空き領域となった2番目のピクチャ領域に新たな復号化ピクチャが蓄積されることになる。   FIG. 19B shows an example in which there is not enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P1, P2, P3, P4, P5, and P6 in the picture sequence in FIG. 30 are stored in the picture memory 203, and P7 is currently being decoded (that is, C = P7). I have. In this case, it is necessary to delete the area having the picture data stored in the picture memory 203 to secure an area for storing the newly decoded picture C. In the present embodiment, the picture C to be decoded always has the same picture size as the picture area which is an area obtained by dividing the picture memory. Therefore, when there is no free area in the picture memory 203, if a picture is deleted until one of the picture areas in the picture memory is completely free, the newly decoded picture can be stored. An area can be secured. Pictures to be deleted are selected in order of address from the top of the picture memory 203. In this example, at the stage where P4 and P1 are deleted in this order, the first picture area from the top of the picture memory 203 becomes one free area. The deletion picture area determination unit 209 determines a picture to be deleted by the above-described processing, and outputs a determination result to the picture memory control unit 206. The picture memory control unit 206 deletes a picture according to the determination result of the deleted picture area determination unit 209. In the example shown in the upper part of FIG. 19B, P4 and P1 are deleted by the above processing, and a newly decoded picture C is stored in the first picture area as shown in the lower part of FIG. 19B. When the next picture C to be decoded is further decoded, the newly decoded picture must be stored with the state in the picture memory 203 shown in the lower part of FIG. Disappears. In this case, P2 and P3 are deleted, and a new decoded picture is accumulated in the second picture area that has become a free area.

図20(a)及び図20(b)は、新たに復号化されたピクチャが、図17及び図18のフローチャートの手順に従って、ピクチャメモリ203に蓄積される様子を示す図である。図20(a)及び図20(b)では、現在の復号化対象ピクチャC以降のピクチャサイズが、より小さいサイズに変更された場合を示している。図20(a)は、新たに復号化されたピクチャCを蓄積するのに十分な空き領域がピクチャメモリ203内にあった場合の例を示している。この例では、図30のピクチャ列におけるP1、P2、P3がピクチャメモリに蓄積され、現在P4を復号化している状態(すなわち、C=P4)であることを示しているものとする。この例では、復号化対象ピクチャCであるP4以降からピクチャサイズが変更されており、図20(a)下部に示すように、復号化対象ピクチャC(P4)のピクチャサイズでピクチャメモリ203のアドレスが分割される。この場合は、図20(a)下部のように、新たに復号化されたピクチャCは、空き領域内の1つのピクチャ領域にそのまま過不足なく蓄積することが可能である。そして、既にピクチャメモリ内に蓄積されているピクチャデータを持つピクチャ領域の削除は行わない。   FIGS. 20A and 20B are diagrams showing a state in which newly decoded pictures are stored in the picture memory 203 in accordance with the procedures of the flowcharts in FIGS. FIGS. 20A and 20B show a case where the picture sizes after the current decoding target picture C are changed to smaller sizes. FIG. 20A shows an example in a case where there is a sufficient free area in the picture memory 203 to store the newly decoded picture C. In this example, it is assumed that P1, P2, and P3 in the picture sequence in FIG. 30 are stored in the picture memory, and P4 is currently being decoded (that is, C = P4). In this example, the picture size is changed after P4, which is the decoding target picture C, and as shown in the lower part of FIG. Is divided. In this case, as shown in the lower part of FIG. 20A, the newly decoded picture C can be stored in one picture area in the free area without any excess or shortage. Then, the picture area having the picture data already stored in the picture memory is not deleted.

図20(b)は、ピクチャメモリ203内に新たに復号化されたピクチャCを蓄積するのに十分な空き領域がなかった場合の例を示している。この例では、図30のピクチャ列におけるP1、P2、P3、P4がピクチャメモリ203に蓄積され、現在P5を復号化している状態(すなわち、C=P5)であることを示している。この場合は、すでにピクチャデータが蓄積されている領域を削除して、新たに復号化されたピクチャCを蓄積するための領域をピクチャメモリ203に確保する必要がある。本実施の形態では、復号化を行うピクチャCは必ずピクチャメモリを分割して得られる領域であるピクチャ領域と同じピクチャサイズを持つ。従って、ピクチャメモリ203内に空き領域が無い場合は、ピクチャメモリ内のどれか1つのピクチャ領域が完全に空き領域となるまでピクチャを削除すれば、新たに復号化されたピクチャを蓄積するための領域を確保することができる。削除するべきピクチャは、ピクチャメモリ203の先頭から、ピクチャデータが格納されているアドレスの順に選択される。この例では、P3のアドレスが最も先頭であることが分かる。そしてP3を削除することにより、ピクチャメモリ203の先頭の1つ分のピクチャ領域が空き領域になる。削除ピクチャ領域判定部209では、上記のような処理によって削除すべきピクチャを判定し、判定結果をピクチャメモリ制御部206に出力する。ピクチャメモリ制御部206は、削除ピクチャ領域判定部209の判定結果に従って、ピクチャの削除を行う。図20(b)上部の例では上記処理によってP3が削除され、図20(b)下部のように、新たに復号化されたピクチャCが、ピクチャメモリ203の先頭のピクチャ領域に蓄積される。この状態で、さらに次の復号化対象ピクチャCが復号化されたときには、図20(b)下部の状態からP2が削除され、ピクチャメモリ203の先頭から2番目のピクチャ領域に、新たに復号化されたピクチャが格納される。   FIG. 20B shows an example in which there is not enough free space in the picture memory 203 to store the newly decoded picture C. In this example, P1, P2, P3, and P4 in the picture sequence in FIG. 30 are stored in the picture memory 203, and P5 is currently being decoded (that is, C = P5). In this case, it is necessary to delete the area in which the picture data is already stored, and to secure an area in the picture memory 203 for storing the newly decoded picture C. In the present embodiment, the picture C to be decoded always has the same picture size as the picture area which is an area obtained by dividing the picture memory. Therefore, when there is no free area in the picture memory 203, if a picture is deleted until one of the picture areas in the picture memory is completely free, the newly decoded picture can be stored. An area can be secured. The picture to be deleted is selected from the top of the picture memory 203 in the order of the address where the picture data is stored. In this example, it can be seen that the address of P3 is the first. Then, by deleting P3, the first picture area of the picture memory 203 becomes a free area. The deletion picture area determination unit 209 determines a picture to be deleted by the above-described processing, and outputs a determination result to the picture memory control unit 206. The picture memory control unit 206 deletes a picture according to the determination result of the deleted picture area determination unit 209. In the example shown in the upper part of FIG. 20B, P3 is deleted by the above processing, and a newly decoded picture C is stored in the first picture area of the picture memory 203 as shown in the lower part of FIG. In this state, when the next decoding target picture C is decoded, P2 is deleted from the state at the bottom of FIG. 20B, and a new decoding is performed in the second picture area from the head of the picture memory 203. The stored picture is stored.

なお、図17〜図20(b)の図面を用いて説明した例では、ピクチャメモリ203内に、新たに復号化されたピクチャを蓄積するための十分な空き領域があった場合には、空き領域となっている1つのピクチャ領域内に、新たに復号化されたピクチャを蓄積するとしたが、本発明はこれに限定されない。例えば、ピクチャメモリ203内に、十分な空き領域があった場合でも、ピクチャメモリ203の先頭からアドレスの順にピクチャ領域を選択し、選択されたピクチャ領域内に蓄積されているピクチャデータを、選択されたピクチャ領域が連続する空き領域となるまでピクチャ単位で順次削除するとしてもよい。そしてその結果、空き領域となったピクチャ領域に、新たに復号化されたピクチャを蓄積する。すなわち、図20(a)上部に示したように、復号化対象ピクチャCを蓄積するための十分な空き領域があった場合でも、ピクチャメモリ203の先頭に蓄積されているピクチャP1を削除して、空き領域となったピクチャメモリ203の先頭のピクチャ領域に復号化対象ピクチャCを蓄積するとしてもよい。このようにすれば、ピクチャメモリ203内に、新たに復号化されたピクチャを蓄積するための十分な空き領域があった場合も、なかった場合も、同様に、ピクチャメモリ203の先頭からピクチャ領域をアドレスの順に選択して、選択されたピクチャ領域に、新たに復号化されたピクチャを蓄積していくことができるので、判断による分岐が少ない分、削除ピクチャ領域判定部209によるピクチャ領域の確保に要する処理負荷を低減することができる。   In the example described with reference to FIGS. 17 to 20B, if there is a sufficient free area in the picture memory 203 to store a newly decoded picture, Although the newly decoded picture is stored in one picture area as an area, the present invention is not limited to this. For example, even if there is a sufficient free area in the picture memory 203, a picture area is selected in the order of address from the top of the picture memory 203, and the picture data stored in the selected picture area is selected. May be sequentially deleted in units of pictures until the picture areas become continuous free areas. As a result, the newly decoded picture is stored in the picture area which has become a free area. That is, as shown in the upper part of FIG. 20A, even if there is a sufficient free area for storing the decoding target picture C, the picture P1 stored at the top of the picture memory 203 is deleted. Alternatively, the decoding target picture C may be stored in the leading picture area of the picture memory 203 that has become a free area. In this way, whether or not there is enough free space in the picture memory 203 to store the newly decoded picture, Can be selected in the order of address, and newly decoded pictures can be stored in the selected picture area. Can be reduced.

以上の説明から分かるように、本実施の形態では符号化を行う際にピクチャサイズが変更された場合でも変更がされなかった場合でも、常に1領域分のみのピクチャ領域が完全に空き領域となるまで格納されているピクチャを削除するという単純な処理方法によって、表示されていない可能性のあるピクチャをできる限りピクチャメモリに残したまま、矛盾無くピクチャメモリの管理を行うことが可能となる。しかも、新たに分割されたピクチャ領域のそれぞれのサイズは、新たに復号化されるピクチャ(復号化対象ピクチャC以降のピクチャ)と同じサイズであるので、ピクチャサイズが大きいサイズに変更される場合であっても、小さいサイズに変更される場合であっても、それぞれのピクチャ領域中に使用されない無駄な領域が発生しない。このため、本実施の形態の画像復号化装置2000では、ピクチャメモリ203のメモリ領域を有効に活用することができている。併せて、どのピクチャサイズのピクチャも物理的に分割されることなくメモリ上に連続して蓄積することが可能となるため、メモリのアクセスが単純化され速度を低下させることなく復号化を行うことが可能となる。また、通常の画像符号化および復号化においては、ピクチャサイズが変更されても、ピクチャの参照関係(参照に使用するピクチャの枚数等)は変更せずに処理を行うような構成が多く使用される。よって、本実施の形態で説明したような方法によって、効率の良い処理方法による復号化を実現することが可能であると言える。   As can be understood from the above description, in the present embodiment, even when the picture size is changed or not changed when encoding is performed, the picture area of only one area always becomes a completely free area. By a simple processing method of deleting the picture stored up to this point, it is possible to manage the picture memory without inconsistency while leaving the picture which may not be displayed in the picture memory as much as possible. In addition, the size of each of the newly divided picture areas is the same as the size of the newly decoded picture (the picture after the decoding target picture C). Even if the size is changed to a small size, no unused area is generated in each picture area. For this reason, the image decoding device 2000 of the present embodiment can effectively utilize the memory area of the picture memory 203. At the same time, since pictures of any picture size can be continuously stored in memory without being physically divided, memory access is simplified and decoding is performed without reducing speed. Becomes possible. Further, in ordinary image encoding and decoding, a configuration is often used in which processing is performed without changing the picture reference relationship (the number of pictures used for reference) even when the picture size is changed. You. Therefore, it can be said that decoding by an efficient processing method can be realized by the method described in the present embodiment.

ただし、本実施の形態では、ピクチャメモリの先頭から順に表示順を無視して空き領域が確保できるまでピクチャを削除していくため、特に、表示順情報の新しいピクチャが、ピクチャメモリ内の先頭に近い位置に格納されている場合には、表示待ち状態にあるピクチャまで削除されてしまう可能性があることは否定できない。
なお、上記実施の形態3では、ピクチャメモリ内のどれか1つのピクチャ領域が完全に空き領域となるまで1つまたは複数のピクチャを削除する必要があるため、まだ表示されていないピクチャまで削除されてしまう可能性がある。そこで、ストリーム中に含まれる全てのピクチャを問題なく表示することができるかどうかを示すフラグとしてcnf_flagを用いても良い。例えば、値が1の場合は問題なく全てのピクチャを表示することができることを示し、値が0の場合はまだ表示されていないピクチャが、本実施の形態の処理によって既にデータを失ってしまったため表示することができなくなる可能性があることを示す。このように、cnf_flag を符号列に記述しておくことにより、この信号の値を調べることにより本実施の形態の処理を適用するかどうかを判断することができる。例えば、cnf_flag が0の場合には、本実施の形態の処理を適用すると表示できないピクチャが発生してしまう可能性があることが分かるので、替わりに従来どおりピクチャ単位でピクチャメモリの管理を行う方法に切り替えることができる。これにより、メモリ領域が細分化されてしまう恐れがあるが、全てのピクチャを問題なく表示することが可能となる。
However, in the present embodiment, since the pictures are deleted in order from the beginning of the picture memory until a free area can be secured ignoring the display order, a new picture of display order information is particularly stored at the beginning of the picture memory. When stored in a close position, it cannot be denied that there is a possibility that a picture in a display waiting state may be deleted.
In the third embodiment, it is necessary to delete one or a plurality of pictures until one of the picture areas in the picture memory is completely vacant. Could be Therefore, cnf_flag may be used as a flag indicating whether all pictures included in the stream can be displayed without any problem. For example, a value of 1 indicates that all pictures can be displayed without any problem, and a value of 0 indicates that a picture that has not been displayed has already lost data by the processing of this embodiment. Indicates that display may not be possible. Thus, by describing cnf_flag in the code string, it is possible to determine whether or not to apply the processing of the present embodiment by checking the value of this signal. For example, when cnf_flag is 0, it is known that there is a possibility that a picture that cannot be displayed may occur when the processing of the present embodiment is applied. You can switch to As a result, the memory area may be subdivided, but all pictures can be displayed without any problem.

(実施の形態4)
本発明の実施の形態4における動画像の符号化方法について図21に示したブロック図を用いて説明する。図21は、本実施の形態4の画像符号化装置2700の構成を示すブロック図である。符号化処理の構成は図28を用いて説明した従来の方法とほぼ同様である。従来の方法と異なる点は、ピクチャサイズ変更判定部110が追加された点である。従来の技術と全く同様の処理についてはここでは説明を省略する。図22は、本実施の形態4の画像符号化装置2700により生成される符号列のデータ構造を示す図である。
(Embodiment 4)
A moving picture coding method according to Embodiment 4 of the present invention will be described with reference to the block diagram shown in FIG. FIG. 21 is a block diagram illustrating a configuration of an image encoding device 2700 according to Embodiment 4. The configuration of the encoding process is almost the same as the conventional method described with reference to FIG. The difference from the conventional method is that a picture size change determination unit 110 is added. The description of the same processing as the conventional technique is omitted here. FIG. 22 is a diagram illustrating a data structure of a code string generated by the image coding device 2700 according to the fourth embodiment.

符号化対象のピクチャがIDRピクチャもしくはそれに代わるピクチャサイズの変更を可能とするピクチャであった場合、ピクチャサイズ変更判定部110では、符号化対象のピクチャのピクチャサイズとそれ以前に符号化されたピクチャのピクチャサイズとを比較し、ピクチャサイズの変更がなされたかどうかを判定する。
ピクチャメモリ制御部109では、ピクチャサイズ変更判定部110から入力された判定結果が、ピクチャサイズが変更されなかったことを示すものであった場合は、通常の符号化と同様の方法を用いて符号化を行う。一方、前記判定結果がピクチャサイズが変更されたことを示すものであった場合は、復号化におけるピクチャメモリのリセット方法としてピクチャメモリ内の全てのピクチャを参照可能もしくは参照不可に関わらず削除することを示す信号を符号列生成部103に出力する。符号列生成部103では、図22における符号列のreset_flag を1、つまり、ピクチャメモリ内の全てのピクチャを(参照可能もしくは参照不可に関わらず)削除することを示すようにフラグの値を設定して符号化する。
If the picture to be coded is an IDR picture or a picture that allows a change in picture size instead of the IDR picture, the picture size change determination unit 110 determines the picture size of the picture to be coded and the previously coded picture. To determine whether the picture size has been changed.
If the determination result input from the picture size change determination unit 110 indicates that the picture size has not been changed, the picture memory control unit 109 performs coding using the same method as in normal encoding. Perform the conversion. On the other hand, if the determination result indicates that the picture size has been changed, all pictures in the picture memory should be deleted regardless of whether they can be referenced or not, as a method of resetting the picture memory in decoding. Is output to the code sequence generation unit 103. The code sequence generation unit 103 sets the value of the flag so that reset_flag of the code sequence in FIG. 22 is 1, that is, indicates that all pictures in the picture memory are deleted (regardless of whether or not reference is possible). Encoding.

一方、上で述べたような符号化方法によって符号化された符号列の復号化は、図29の従来の方法の説明で用いたブロック図と全く同様の構成を用いて行うことが可能である。従来の技術と全く同様の処理についてはここでは説明を省略する。
符号列中のスライスヘッダには図22にあるようにreset_flag が符号化されている。符号列解析部201では前記reset_flag の値を解析し、解析結果の情報をピクチャメモリ制御部206に出力する。上で述べたような符号化方法によって生成された符号列では、ピクチャサイズが変更された場合は常にreset_flag が1、つまり、ピクチャメモリ内の全てのピクチャを参照可能もしくは参照不可に関わらず削除することを指示する。これにより、復号化を行う際は、従来の方法と全く同様にピクチャサイズが変更されたかどうかを意識することなく、reset_flag の値に従ってピクチャメモリのリセットを行うことが可能となる。ピクチャサイズが変更されていた場合は、前記reset_flag の指示によってピクチャメモリの全領域が空き状態になるため、従来どおりにピクチャサイズ変更後のピクチャを復号化しピクチャメモリに復号化したピクチャを蓄積しても、ピクチャメモリ内に異なるピクチャサイズのピクチャが混在することは無く、また復号化したピクチャを蓄積する位置も任意の領域を使用することが可能となる。
On the other hand, decoding of a code string coded by the above-described coding method can be performed using the same configuration as the block diagram used in the description of the conventional method in FIG. . The description of the same processing as the conventional technique is omitted here.
As shown in FIG. 22, reset_flag is encoded in the slice header in the code string. The code string analysis unit 201 analyzes the value of the reset_flag, and outputs information of the analysis result to the picture memory control unit 206. In a code string generated by the above-described coding method, reset_flag is always 1 when the picture size is changed, that is, all pictures in the picture memory are deleted regardless of whether they can be referred to or not. Instruct that Thus, when decoding, the picture memory can be reset according to the value of reset_flag without being conscious of whether the picture size has been changed, just like the conventional method. If the picture size has been changed, since the entire area of the picture memory becomes empty according to the instruction of the reset_flag, the picture after the picture size change is decoded and the decoded picture is stored in the picture memory as before. Also, pictures of different picture sizes do not coexist in the picture memory, and an arbitrary area can be used for storing decoded pictures.

以上、本実施の形態で説明したように、符号化を行う際にピクチャサイズが変更された場合はピクチャメモリ内の全てのピクチャを削除することを示す値を持ったフラグを符号化することにより、復号化側では従来の方法と全く同様の処理を行うことにより矛盾無くピクチャメモリの管理を行うことが可能である。   As described above, as described in the present embodiment, when a picture size is changed during encoding, a flag having a value indicating that all pictures in the picture memory are deleted is encoded. On the decoding side, it is possible to manage the picture memory without contradiction by performing the same processing as the conventional method.

(実施の形態5)
さらに、上記各実施の形態1〜4で示した動画像の符号化方法および動画像復号化方法の構成を実現するためのプログラムを、フレキシブルディスク等の記録媒体に記録するようにすることにより、上記各実施の形態1〜5で示した処理を、独立したコンピュータシステムにおいて簡単に実施することが可能となる。
(Embodiment 5)
Further, by recording a program for realizing the configuration of the moving picture encoding method and the moving picture decoding method described in each of Embodiments 1 to 4 on a recording medium such as a flexible disk, The processing described in each of the first to fifth embodiments can be easily performed in an independent computer system.

図23は、上記実施の形態1から実施の形態4の動画像符号化方法および動画像復号化方法をコンピュータシステムにより実現するためのプログラムを格納するための記録媒体についての説明図である。
図23(b)は、フレキシブルディスクの正面からみた外観、断面構造、及びフレキシブルディスクを示し、図23(a)は、記録媒体本体であるフレキシブルディスクの物理フォーマットの例を示している。フレキシブルディスクFDはケースF内に内蔵され、該ディスクの表面には、同心円状に外周からは内周に向かって複数のトラックTrが形成され、各トラックは角度方向に16のセクタSeに分割されている。従って、上記プログラムを格納したフレキシブルディスクでは、上記フレキシブルディスクFD上に割り当てられた領域に、上記プログラムとしての動画像符号化方法および動画像復号化方法が記録されている。
FIG. 23 is an explanatory diagram of a recording medium for storing a program for implementing the moving picture encoding method and the moving picture decoding method of Embodiments 1 to 4 by a computer system.
FIG. 23B shows the appearance, cross-sectional structure, and flexible disk as viewed from the front of the flexible disk, and FIG. 23A shows an example of the physical format of the flexible disk as the recording medium body. The flexible disk FD is built in the case F, and a plurality of tracks Tr are formed concentrically from the outer circumference toward the inner circumference on the surface of the disk, and each track is divided into 16 sectors Se in an angular direction. ing. Therefore, in the flexible disk storing the program, the moving image encoding method and the moving image decoding method as the program are recorded in the area allocated on the flexible disk FD.

また、図23(c)は、フレキシブルディスクFDに上記プログラムの記録再生を行うための構成を示す。上記プログラムをフレキシブルディスクFDに記録する場合は、コンピュータシステムCsから上記プログラムとしての動画像符号化方法および動画像復号化方法を、フレキシブルディスクドライブを介して書き込む。また、フレキシブルディスク内のプログラムにより上記動画像符号化方法および動画像復号化方法をコンピュータシステム中に構築する場合は、フレキシブルディスクドライブによりプログラムをフレキシブルディスクから読み出し、コンピュータシステムに転送する。   FIG. 23C shows a configuration for recording and reproducing the program on the flexible disk FD. When the above program is recorded on the flexible disk FD, the moving picture encoding method and the moving picture decoding method as the above program are written from the computer system Cs via the flexible disk drive. When the moving picture encoding method and the moving picture decoding method are to be constructed in a computer system using a program in a flexible disk, the program is read from the flexible disk by a flexible disk drive and transferred to the computer system.

なお、上記説明では、記録媒体としてフレキシブルディスクを用いて説明を行ったが、光ディスクを用いても同様に行うことができる。また、記録媒体はこれに限らず、CD−ROM、メモリカード、ROMカセット等、プログラムを記録できるものであれば同様に実施することができる。   In the above description, the description has been made using a flexible disk as a recording medium. However, the same description can be made using an optical disk. Further, the recording medium is not limited to this, and any other recording medium such as a CD-ROM, a memory card, a ROM cassette, or the like can be similarly implemented.

(実施の形態6)
さらにここで、上記実施の形態1〜5で示した動画像の符号化方法や動画像の復号化方法の応用例とそれを用いたシステムを説明する。
(Embodiment 6)
Further, here, application examples of the moving picture coding method and the moving picture decoding method described in Embodiments 1 to 5 and a system using the same will be described.

図24は、コンテンツ配信サービスを実現するコンテンツ供給システムex100の全体構成を示すブロック図である。通信サービスの提供エリアを所望の大きさに分割し、各セル内にそれぞれ固定無線局である基地局ex107〜ex110が設置されている。
このコンテンツ供給システムex100は、例えば、インターネットex101にインターネットサービスプロバイダex102および電話網ex104、および基地局ex107〜ex110を介して、コンピュータex111、PDA(personal digital assistant)ex112、カメラex113、携帯電話ex114、カメラ付きの携帯電話ex115などの各機器が接続される。
FIG. 24 is a block diagram illustrating an overall configuration of a content supply system ex100 that realizes a content distribution service. A communication service providing area is divided into desired sizes, and base stations ex107 to ex110, which are fixed wireless stations, are installed in each cell.
The content supply system ex100 includes, for example, a computer ex111, a PDA (personal digital assistant) ex112, a camera ex113, a mobile phone ex114, and a camera on the Internet ex101 via the Internet service provider ex102 and the telephone network ex104, and the base stations ex107 to ex110. Each device such as a mobile phone ex115 with a tag is connected.

しかし、コンテンツ供給システムex100は図24のような組合せに限定されず、いずれかを組み合わせて接続するようにしてもよい。また、固定無線局である基地局ex107〜ex110を介さずに、各機器が電話網ex104に直接接続されてもよい。
カメラex113はデジタルビデオカメラ等の動画撮影が可能な機器である。また、携帯電話は、PDC(Personal Digital Communications)方式、CDMA(Code Division Multiple Access)方式、W−CDMA(Wideband-Code Division Multiple Access)方式、若しくはGSM(Global System for Mobile Communications)方式の携帯電話機、またはPHS(Personal Handyphone System)等であり、いずれでも構わない。
However, the content supply system ex100 is not limited to the combination as shown in FIG. 24, and may be connected in any combination. Further, each device may be directly connected to the telephone network ex104 without going through the base stations ex107 to ex110 which are fixed wireless stations.
The camera ex113 is a device capable of shooting moving images, such as a digital video camera. In addition, a mobile phone is a PDC (Personal Digital Communications) system, a CDMA (Code Division Multiple Access) system, a W-CDMA (Wideband-Code Division Multiple Access) system, or a GSM (Global System for Mobile Communications) system. Or PHS (Personal Handyphone System) or the like, and either may be used.

また、ストリーミングサーバex103は、カメラex113から基地局ex109、電話網ex104を通じて接続されており、カメラex113を用いてユーザが送信する符号化処理されたデータに基づいたライブ配信等が可能になる。撮影したデータの符号化処理はカメラex113で行っても、データの送信処理をするサーバ等で行ってもよい。また、カメラex116で撮影した動画データはコンピュータex111を介してストリーミングサーバex103に送信されてもよい。カメラex116はデジタルカメラ等の静止画、動画が撮影可能な機器である。この場合、動画データの符号化はカメラex116で行ってもコンピュータex111で行ってもどちらでもよい。また、符号化処理はコンピュータex111やカメラex116が有するLSIex117において処理することになる。なお、動画像の符号化・復号化用のソフトウェアをコンピュータex111等で読み取り可能な記録媒体である何らかの蓄積メディア(CD−ROM、フレキシブルディスク、ハードディスクなど)に組み込んでもよい。さらに、カメラ付きの携帯電話ex115で動画データを送信してもよい。このときの動画データは携帯電話ex115が有するLSIで符号化処理されたデータである。   The streaming server ex103 is connected from the camera ex113 to the base station ex109 and the telephone network ex104, and enables live distribution and the like based on the encoded data transmitted by the user using the camera ex113. The encoding process of the captured data may be performed by the camera ex113, or may be performed by a server or the like that performs the data transmission process. Also, moving image data captured by the camera ex116 may be transmitted to the streaming server ex103 via the computer ex111. The camera ex116 is a device such as a digital camera capable of shooting still images and moving images. In this case, encoding of the moving image data may be performed by the camera ex116 or the computer ex111. The encoding process is performed by the LSI ex117 included in the computer ex111 and the camera ex116. Note that software for encoding / decoding moving images may be incorporated in any storage medium (CD-ROM, flexible disk, hard disk, or the like) that is a recording medium readable by the computer ex111 or the like. Further, the moving image data may be transmitted by a mobile phone with camera ex115. The moving image data at this time is data that has been encoded by the LSI included in the mobile phone ex115.

このコンテンツ供給システムex100では、ユーザがカメラex113、カメラex116等で撮影しているコンテンツ(例えば、音楽ライブを撮影した映像等)を上記実施の形態1〜5同様に符号化処理してストリーミングサーバex103に送信する一方で、ストリーミングサーバex103は要求のあったクライアントに対して上記コンテンツデータをストリーム配信する。クライアントとしては、上記符号化処理されたデータを復号化することが可能な、コンピュータex111、PDAex112、カメラex113、携帯電話ex114等がある。このようにすることでコンテンツ供給システムex100は、符号化されたデータをクライアントにおいて受信して再生することができ、さらにクライアントにおいてリアルタイムで受信して復号化し、再生することにより、個人放送をも実現可能になるシステムである。   In the content supply system ex100, the content (for example, a video image of a live music) captured by the user with the camera ex113, the camera ex116, or the like is subjected to encoding processing in the same manner as in Embodiments 1 to 5, and the streaming server ex103. On the other hand, the streaming server ex103 stream-distributes the content data to the requesting client. Examples of the client include a computer ex111, a PDA ex112, a camera ex113, a mobile phone ex114, and the like, which are capable of decoding the encoded data. In this way, the content providing system ex100 can receive and reproduce the encoded data on the client, and further, can receive, decode, and reproduce the encoded data on the client in real time, thereby realizing personal broadcasting. It is a system that becomes possible.

このシステムを構成する各機器の符号化、復号化には上記各実施の形態1〜5で示した画像符号化装置あるいは画像復号化装置を用いるようにすればよい。
その一例として携帯電話について説明する。
The encoding and decoding of each device constituting this system may be performed using the image encoding device or the image decoding device described in each of the first to fifth embodiments.
A mobile phone will be described as an example.

図25は、上記実施の形態1〜5で説明した動画像の符号化方法と動画像の復号化方法を用いた携帯電話ex115を示す図である。携帯電話ex115は、基地局ex110との間で電波を送受信するためのアンテナex201、CCDカメラ等の映像、静止画を撮ることが可能なカメラ部ex203、カメラ部ex203で撮影した映像、アンテナex201で受信した映像等が復号化されたデータを表示する液晶ディスプレイ等の表示部ex202、操作キーex204群から構成される本体部、音声出力をするためのスピーカ等の音声出力部ex208、音声入力をするためのマイク等の音声入力部ex205、撮影した動画もしくは静止画のデータ、受信したメールのデータ、動画のデータもしくは静止画のデータ等、符号化されたデータまたは復号化されたデータを保存するための記録メディアex207、携帯電話ex115に記録メディアex207を装着可能とするためのスロット部ex206を有している。記録メディアex207はSDカード等のプラスチックケース内に電気的に書換えや消去が可能な不揮発性メモリであるEEPROM(Electrically Erasable and Programmable Read Only Memory)の一種であるフラッシュメモリ素子を格納したものである。   FIG. 25 is a diagram illustrating the mobile phone ex115 that uses the moving picture encoding method and the moving picture decoding method described in Embodiments 1 to 5. The mobile phone ex115 includes an antenna ex201 for transmitting and receiving radio waves to and from the base station ex110, a video image of a CCD camera or the like, a camera unit ex203 capable of taking a still image, a video image captured by the camera unit ex203, and an antenna ex201. A display unit ex202 such as a liquid crystal display for displaying data obtained by decoding a received video or the like, a main unit including a group of operation keys ex204, an audio output unit ex208 such as a speaker for outputting audio, and audio input. Input unit ex205 such as a microphone for storing encoded or decoded data, such as data of captured moving images or still images, received mail data, moving image data or still image data, etc. Recording medium ex207, and a slot ex20 for allowing the recording medium ex207 to be attached to the mobile phone ex115. The it has. The recording medium ex207 stores a flash memory element which is a kind of EEPROM (Electrically Erasable and Programmable Read Only Memory) which is a nonvolatile memory which can be electrically rewritten and erased, in a plastic case such as an SD card.

さらに、携帯電話ex115について図26を用いて説明する。携帯電話ex115は表示部ex202及び操作キーex204を備えた本体部の各部を統括的に制御するようになされた主制御部ex311に対して、電源回路部ex310、操作入力制御部ex304、画像符号化部ex312、カメラインターフェース部ex303、LCD(Liquid Crystal Display)制御部ex302、画像復号化部ex309、多重分離部ex308、記録再生部ex307、変復調回路部ex306及び音声処理部ex305が同期バスex313を介して互いに接続されている。   Further, the mobile phone ex115 will be described with reference to FIG. The mobile phone ex115 controls a power supply circuit unit ex310, an operation input control unit ex304, an image encoding unit, and a main control unit ex311 that integrally controls each unit of a main unit including a display unit ex202 and operation keys ex204. Unit ex312, camera interface unit ex303, LCD (Liquid Crystal Display) control unit ex302, image decoding unit ex309, demultiplexing unit ex308, recording / reproducing unit ex307, modulation / demodulation circuit unit ex306, and audio processing unit ex305 via a synchronous bus ex313. Connected to each other.

電源回路部ex310は、ユーザの操作により終話及び電源キーがオン状態にされると、バッテリパックから各部に対して電力を供給することによりカメラ付ディジタル携帯電話ex115を動作可能な状態に起動する。
携帯電話ex115は、CPU、ROM及びRAM等でなる主制御部ex311の制御に基づいて、音声通話モード時に音声入力部ex205で集音した音声信号を音声処理部ex305によってディジタル音声データに変換し、これを変復調回路部ex306でスペクトラム拡散処理し、送受信回路部ex301でディジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex201を介して送信する。また携帯電話機ex115は、音声通話モード時にアンテナex201で受信した受信データを増幅して周波数変換処理及びアナログディジタル変換処理を施し、変復調回路部ex306でスペクトラム逆拡散処理し、音声処理部ex305によってアナログ音声データに変換した後、これを音声出力部ex208を介して出力する。
The power supply circuit unit ex310 activates the camera-equipped digital mobile phone ex115 in an operable state by supplying power to each unit from the battery pack when the call end and the power key are turned on by a user operation. .
The mobile phone ex115 converts an audio signal collected by the audio input unit ex205 into digital audio data by the audio processing unit ex305 in the audio communication mode based on the control of the main control unit ex311 including a CPU, a ROM, a RAM, and the like. This is spread-spectrum processed by a modulation / demodulation circuit unit ex306, subjected to digital-analog conversion processing and frequency conversion processing by a transmission / reception circuit unit ex301, and then transmitted via an antenna ex201. The mobile phone ex115 amplifies received data received by the antenna ex201 in the voice call mode, performs frequency conversion processing and analog-to-digital conversion processing, performs spectrum despreading processing in the modulation / demodulation circuit unit ex306, and performs analog voice decoding in the voice processing unit ex305. After the data is converted, the data is output via the audio output unit ex208.

さらに、データ通信モード時に電子メールを送信する場合、本体部の操作キーex204の操作によって入力された電子メールのテキストデータは操作入力制御部ex304を介して主制御部ex311に送出される。主制御部ex311は、テキストデータを変復調回路部ex306でスペクトラム拡散処理し、送受信回路部ex301でディジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex201を介して基地局ex110へ送信する。   Further, when an e-mail is transmitted in the data communication mode, text data of the e-mail input by operating the operation key ex204 of the main body is sent to the main control unit ex311 via the operation input control unit ex304. The main control unit ex311 performs spread spectrum processing on the text data in the modulation / demodulation circuit unit ex306, performs digital / analog conversion processing and frequency conversion processing on the transmission / reception circuit unit ex301, and transmits the text data to the base station ex110 via the antenna ex201.

データ通信モード時に画像データを送信する場合、カメラ部ex203で撮像された画像データをカメラインターフェース部ex303を介して画像符号化部ex312に供給する。また、画像データを送信しない場合には、カメラ部ex203で撮像した画像データをカメラインターフェース部ex303及びLCD制御部ex302を介して表示部ex202に直接表示することも可能である。   When transmitting image data in the data communication mode, the image data captured by the camera unit ex203 is supplied to the image encoding unit ex312 via the camera interface unit ex303. When the image data is not transmitted, the image data captured by the camera unit ex203 can be directly displayed on the display unit ex202 via the camera interface unit ex303 and the LCD control unit ex302.

画像符号化部ex312は、本願発明で説明した画像符号化装置を備えた構成であり、カメラ部ex203から供給された画像データを上記実施の形態1〜5で示した画像符号化装置に用いた符号化方法によって圧縮符号化することにより符号化画像データに変換し、これを多重分離部ex308に送出する。また、このとき同時に携帯電話機ex115は、カメラ部ex203で撮像中に音声入力部ex205で集音した音声を音声処理部ex305を介してディジタルの音声データとして多重分離部ex308に送出する。   The image encoding unit ex312 includes the image encoding device described in the present invention, and uses the image data supplied from the camera unit ex203 in the image encoding devices described in the first to fifth embodiments. The data is converted into encoded image data by performing compression encoding by an encoding method, and is transmitted to the demultiplexing unit ex308. Further, at this time, the mobile phone ex115 simultaneously transmits the voice collected by the voice input unit ex205 during imaging by the camera unit ex203 to the demultiplexing unit ex308 as digital voice data via the voice processing unit ex305.

多重分離部ex308は、画像符号化部ex312から供給された符号化画像データと音声処理部ex305から供給された音声データとを所定の方式で多重化し、その結果得られる多重化データを変復調回路部ex306でスペクトラム拡散処理し、送受信回路部ex301でディジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex201を介して送信する。   The demultiplexing unit ex308 multiplexes the encoded image data supplied from the image encoding unit ex312 and the audio data supplied from the audio processing unit ex305 by a predetermined method, and modulates and outputs the resulting multiplexed data. The signal is subjected to spread spectrum processing in ex306 and subjected to digital / analog conversion processing and frequency conversion processing in the transmission / reception circuit unit ex301, and then transmitted via the antenna ex201.

データ通信モード時にホームページ等にリンクされた動画像ファイルのデータを受信する場合、アンテナex201を介して基地局ex110から受信した受信データを変復調回路部ex306でスペクトラム逆拡散処理し、その結果得られる多重化データを多重分離部ex308に送出する。
また、アンテナex201を介して受信された多重化データを復号化するには、多重分離部ex308は、多重化データを分離することにより画像データのビットストリームと音声データのビットストリームとに分け、同期バスex313を介して当該符号化画像データを画像復号化部ex309に供給すると共に当該音声データを音声処理部ex305に供給する。
When data of a moving image file linked to a homepage or the like is received in the data communication mode, the data received from the base station ex110 via the antenna ex201 is subjected to spectrum despreading processing by the modulation / demodulation circuit unit ex306, and the resulting multiplexed data is obtained. The demultiplexed data is sent to the demultiplexing unit ex308.
To decode the multiplexed data received via the antenna ex201, the demultiplexing unit ex308 separates the multiplexed data into a bit stream of image data and a bit stream of audio data, and performs synchronization. The coded image data is supplied to the image decoding unit ex309 via the bus ex313, and the audio data is supplied to the audio processing unit ex305.

次に、画像復号化部ex309は、本願発明で説明した画像復号化装置を備えた構成であり、画像データのビットストリームを上記実施の形態1〜5で示した符号化方法に対応した復号化方法で復号することにより再生動画像データを生成し、これをLCD制御部ex302を介して表示部ex202に供給し、これにより、例えばホームページにリンクされた動画像ファイルに含まれる動画データが表示される。このとき同時に音声処理部ex305は、音声データをアナログ音声データに変換した後、これを音声出力部ex208に供給し、これにより、例えばホームページにリンクされた動画像ファイルに含まる音声データが再生される。   Next, the image decoding unit ex309 is configured to include the image decoding device described in the present invention, and decodes a bit stream of image data according to the encoding method described in the first to fifth embodiments. By generating the reproduced moving image data by decoding in the method, the reproduced moving image data is supplied to the display unit ex202 via the LCD control unit ex302, whereby the moving image data included in the moving image file linked to the homepage is displayed. You. At this time, at the same time, the audio processing unit ex305 converts the audio data into analog audio data, and then supplies the analog audio data to the audio output unit ex208, whereby, for example, the audio data included in the moving image file linked to the homepage is reproduced. You.

なお、上記システムの例に限られず、最近は衛星、地上波によるディジタル放送が話題となっており、図27に示すようにディジタル放送用システムにも上記実施の形態1〜5の少なくとも画像符号化装置または画像復号化装置のいずれかを組み込むことができる。具体的には、放送局ex409では映像情報のビットストリームが電波を介して通信または放送衛星ex410に伝送される。これを受けた放送衛星ex410は、放送用の電波を発信し、この電波を衛星放送受信設備をもつ家庭のアンテナex406で受信し、テレビ(受信機)ex401またはセットトップボックス(STB)ex407などの装置によりビットストリームを復号化してこれを再生する。また、記録媒体であるCDやDVD等の蓄積メディアex402に記録したビットストリームを読み取り、復号化する再生装置ex403にも上記実施の形態1〜5で示した画像復号化装置を実装することが可能である。この場合、再生された映像信号はモニタex404に表示される。また、ケーブルテレビ用のケーブルex405または衛星/地上波放送のアンテナex406に接続されたセットトップボックスex407内に画像復号化装置を実装し、これをテレビのモニタex408で再生する構成も考えられる。このときセットトップボックスではなく、テレビ内に画像復号化装置を組み込んでも良い。また、アンテナex411を有する車ex412で衛星ex410からまたは基地局ex107等から信号を受信し、車ex412が有するカーナビゲーションex413等の表示装置に動画を再生することも可能である。   It should be noted that the present invention is not limited to the example of the above system, and digital broadcasting using satellites and terrestrial waves has recently become a hot topic. As shown in FIG. Either the device or the image decoding device can be incorporated. Specifically, at the broadcasting station ex409, the bit stream of the video information is transmitted to the communication or the broadcasting satellite ex410 via radio waves. The broadcast satellite ex410 receiving this transmits a broadcast radio wave, receives this radio wave with a home antenna ex406 having a satellite broadcast reception facility, and outputs the radio wave to a television (receiver) ex401 or a set-top box (STB) ex407. The device decodes the bit stream and reproduces it. In addition, the image decoding apparatus described in the first to fifth embodiments can be mounted on the reproducing apparatus ex403 that reads and decodes a bit stream recorded on a storage medium ex402 such as a CD or DVD that is a recording medium. It is. In this case, the reproduced video signal is displayed on the monitor ex404. A configuration is also conceivable in which an image decoding device is mounted in a set-top box ex407 connected to a cable ex405 for cable television or an antenna ex406 for satellite / terrestrial broadcasting, and this is reproduced on a monitor ex408 of the television. At this time, the image decoding device may be incorporated in the television instead of the set-top box. In addition, a car ex412 having an antenna ex411 can receive a signal from the satellite ex410 or a base station ex107 or the like, and can reproduce a moving image on a display device such as a car navigation ex413 included in the car ex412.

更に、画像信号を上記実施の形態1〜5で示した画像符号化装置で符号化し、記録媒体に記録することもできる。具体例としては、DVDディスクex421に画像信号を記録するDVDレコーダや、ハードディスクに記録するディスクレコーダなどのレコーダex420がある。更にSDカードex422に記録することもできる。レコーダex420が上記実施の形態1〜5で示した画像復号化装置を備えていれば、DVDディスクex421やSDカードex422に記録した画像信号を再生し、モニタex408で表示することができる。   Furthermore, an image signal can be encoded by the image encoding device described in the first to fifth embodiments and recorded on a recording medium. As a specific example, there is a recorder ex420 such as a DVD recorder for recording an image signal on a DVD disc ex421 or a disc recorder for recording on a hard disk. Furthermore, it can be recorded on the SD card ex422. If the recorder ex420 includes the image decoding device described in the first to fifth embodiments, the image signal recorded on the DVD disc ex421 or the SD card ex422 can be reproduced and displayed on the monitor ex408.

なお、カーナビゲーションex413の構成は例えば図26に示す構成のうち、カメラ部ex203とカメラインターフェース部ex303、画像符号化部ex312を除いた構成が考えられ、同様なことがコンピュータex111やテレビ(受信機)ex401等でも考えられる。
また、上記携帯電話ex114等の端末は、符号化器・復号化器を両方持つ送受信型の端末の他に、符号化器のみの送信端末、復号化器のみの受信端末の3通りの実装形式が考えられる。
Note that the configuration of the car navigation ex413 can be, for example, a configuration excluding the camera unit ex203, the camera interface unit ex303, and the image encoding unit ex312 from the configuration illustrated in FIG. ) Ex401 etc. are also conceivable.
In addition, the terminal such as the above-mentioned mobile phone ex114 has three mounting formats, in addition to a transmitting / receiving terminal having both an encoder and a decoder, a transmitting terminal having only an encoder and a receiving terminal having only a decoder. Can be considered.

このように、上記実施の形態1〜5で示した動画像の符号化方法あるいは動画像の復号化方法を上述したいずれの機器・システムに用いることは可能であり、そうすることで、上記実施の形態1〜5で説明した効果を得ることができる。
また、本発明はかかる上記実施形態に限定されるものではなく、本発明の範囲を逸脱することなく種々の変形または修正が可能である。
As described above, the moving picture coding method or the moving picture decoding method described in the first to fifth embodiments can be used for any of the devices and systems described above. The effects described in the first to fifth embodiments can be obtained.
Further, the present invention is not limited to the above embodiment, and various changes or modifications can be made without departing from the scope of the present invention.

本発明に係る画像符号化装置は、通信機能を備えるパーソナルコンピュータ、PDA、ディジタル放送の放送局および携帯電話機などに備えられる画像符号化装置として有用である。
また、本発明に係る画像復号化装置は、通信機能を備えるパーソナルコンピュータ、PDA、ディジタル放送を受信するSTBおよび携帯電話機などに備えられる画像復号化装置として有用である。
INDUSTRIAL APPLICABILITY The image encoding device according to the present invention is useful as an image encoding device provided in a personal computer, a PDA, a digital broadcast station, a mobile phone, and the like having a communication function.
Further, the image decoding device according to the present invention is useful as an image decoding device provided in a personal computer having a communication function, a PDA, an STB for receiving a digital broadcast, a mobile phone, and the like.

本実施の形態1の画像符号化装置の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an image encoding device according to the first embodiment. 図2(a)及び図2(b)は本実施の形態の画像符号化装置800により生成される符号列のデータ構造を示す図である。図2(a)は、ストリーム中に含まれる可能性のある最大のピクチャサイズの情報を符号化する場合の符号列の一例を示す図である。図2(b)は、ストリーム中に含まれる可能性のある最大のピクチャサイズに基づいてピクチャメモリを分割した場合に、ピクチャメモリ内に確保することのできる領域の数を符号化する場合の符号列の一例を示す図である。FIGS. 2A and 2B are diagrams illustrating a data structure of a code string generated by the image coding device 800 according to the present embodiment. FIG. 2A is a diagram illustrating an example of a code string when encoding information of a maximum picture size that may be included in a stream. FIG. 2B shows a code for encoding the number of areas that can be secured in the picture memory when the picture memory is divided based on the maximum picture size that may be included in the stream. It is a figure showing an example of a column. 図2(a)及び図2(b)に示した符号列中のピクチャ共通情報の領域に付加的情報を記述する場合の符号列の一例を示す図である。FIG. 3 is a diagram illustrating an example of a code string in a case where additional information is described in an area of picture common information in the code strings illustrated in FIGS. 2A and 2B. 本実施の形態の画像復号化装置の構成を示すブロック図である。It is a block diagram showing the composition of the picture decoding device of this embodiment. 図4に示した画像復号化装置における復号化処理の手順を示すフローチャートである。5 is a flowchart illustrating a procedure of a decoding process in the image decoding device illustrated in FIG. 4. 図6(a)及び図6(b)は新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1210の手順に従ってピクチャメモリに蓄積される様子を示す図である。図6(a)はピクチャメモリ内に復号化された復号化対象ピクチャCを蓄積するのに十分な空き領域があった場合の例である。図6(b)はピクチャメモリ内に復号化された復号化対象ピクチャCを蓄積するのに十分な空き領域がなかった場合の例である。FIGS. 6A and 6B are diagrams showing a state in which the newly decoded picture is stored in the picture memory according to the procedure of steps S1204 to S1210 in the flowchart of FIG. FIG. 6A shows an example in which there is a sufficient free area in the picture memory to store the decoded picture C to be decoded. FIG. 6B shows an example in which there is not enough free space in the picture memory to store the decoded picture C to be decoded. 図7(a)及び図7(b)は新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1213の手順に従って、ピクチャメモリに蓄積される様子を示す図である。図7(a)はピクチャメモリ内に復号化したピクチャCを蓄積するのに十分な空き領域があった場合の例である。図7(b)はピクチャメモリ内に復号化したピクチャCを蓄積するのに十分な空き領域がなかった場合の例である。FIGS. 7A and 7B are diagrams showing a state in which a newly decoded picture is stored in the picture memory according to the procedures of steps S1204 to S1213 in the flowchart of FIG. FIG. 7A shows an example of a case where there is a sufficient free area for storing the decoded picture C in the picture memory. FIG. 7B shows an example in which there is not enough free space to store the decoded picture C in the picture memory. 図8(a)、図8(b)及び図8(c)は本実施の形態2の画像符号化装置により生成される符号列のデータ構造を示す図である。図8(a)は、ストリーム中に含まれる可能性のある最小のピクチャサイズの情報を符号化する場合の符号列の一例を示す図である。図8(b)は、ピクチャメモリを分割して得られるピクチャ領域のサイズの情報を符号化する場合の符号列の一例を示す図である。図8(c)は、ピクチャメモリを分割するときの領域の数を符号化する場合の符号列の一例を示す図である。FIGS. 8A, 8B, and 8C are diagrams illustrating a data structure of a code string generated by the image coding device according to the second embodiment. FIG. 8A is a diagram illustrating an example of a code string when information of a minimum picture size that may be included in a stream is encoded. FIG. 8B is a diagram illustrating an example of a code sequence when encoding information on the size of a picture area obtained by dividing a picture memory. FIG. 8C is a diagram illustrating an example of a code string when the number of regions when the picture memory is divided is encoded. 図9(a)は1つのストリーム内で符号化されている3通りのピクチャサイズの例を示す図である。図9(b)は1つのストリーム内に図9(a)に示した3つのピクチャサイズのピクチャが含まれる場合に、ピクチャメモリを効率よく利用するためのピクチャ領域の分割方法の一例を示す図である。FIG. 9A is a diagram illustrating an example of three types of picture sizes encoded in one stream. FIG. 9B is a diagram showing an example of a picture area dividing method for efficiently using a picture memory when one stream includes pictures having the three picture sizes shown in FIG. 9A. It is. 図10(a)、図10(b)及び図10(c)は図8(a)、図8(b)及び図8(c)に示した各符号列中のピクチャ共通情報の領域に、付加的情報を記述する場合の符号列の一例を示す図である。FIGS. 10 (a), 10 (b) and 10 (c) show the regions of the picture common information in each code string shown in FIGS. 8 (a), 8 (b) and 8 (c). It is a figure which shows an example of the code string in the case of describing additional information. 図11(a)及び図11(b)は新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1210の手順に従って、ピクチャメモリに蓄積される様子を示す図である。FIGS. 11A and 11B are diagrams showing a state in which a newly decoded picture is stored in the picture memory according to the procedures of steps S1204 to S1210 in the flowchart of FIG. 図12(a)及び図12(b)は新たに復号化されたピクチャが、図5のフローチャートのステップS1204〜S1213の手順に従って、ピクチャメモリに蓄積される様子を示す図である。FIGS. 12A and 12B are diagrams showing a state in which a newly decoded picture is stored in the picture memory according to the procedures of steps S1204 to S1213 in the flowchart of FIG. 本発明の実施の形態3における画像復号化装置の構成を示すブロック図である。FIG. 21 is a block diagram illustrating a configuration of an image decoding device according to Embodiment 3 of the present invention. 図13に示した画像復号化装置における復号化処理の手順を示すフローチャートである。14 is a flowchart illustrating a procedure of a decoding process in the image decoding device illustrated in FIG. 13. 図15(a)及び図15(b)は新たに復号化されたピクチャが、図14のフローチャートの手順に従ってピクチャメモリに蓄積される様子を示す図である。FIGS. 15A and 15B are diagrams showing a state in which newly decoded pictures are stored in the picture memory according to the procedure of the flowchart in FIG. 図16(a)及び図16(b)は新たに復号化されたピクチャが、図14のフローチャートの手順に従って、ピクチャメモリに蓄積される様子を示す図である。FIGS. 16A and 16B are diagrams showing a state in which a newly decoded picture is stored in the picture memory according to the procedure of the flowchart in FIG. 図13に示した画像復号化装置における他の復号化処理の手順を示すフローチャートである。14 is a flowchart illustrating a procedure of another decoding process in the image decoding device illustrated in FIG. 13. 図17に示したステップS2605における処理のより詳細な手順を示すフローチャートである。18 is a flowchart illustrating a more detailed procedure of a process in step S2605 illustrated in FIG. 図19(a)及び図19(b)は新たに復号化されたピクチャが、図17及び図18のフローチャートの手順に従ってピクチャメモリに蓄積される様子を示す図である。FIGS. 19A and 19B are diagrams showing a state in which newly decoded pictures are stored in the picture memory according to the procedures of the flowcharts in FIGS. 図20(a)及び図20(b)は新たに復号化されたピクチャが、図17及び図18のフローチャートの手順に従って、ピクチャメモリに蓄積される様子を示す図である。FIGS. 20 (a) and 20 (b) are diagrams showing a state in which a newly decoded picture is stored in the picture memory according to the procedure of the flowcharts of FIGS. 本実施の形態4の画像符号化装置の構成を示すブロック図である。FIG. 14 is a block diagram illustrating a configuration of an image encoding device according to Embodiment 4. 本実施の形態4の画像符号化装置により生成される符号列のデータ構造を示す図である。FIG. 14 is a diagram illustrating a data structure of a code string generated by the image coding device according to the fourth embodiment. 図23(a)は記録媒体本体であるフレキシブルディスクの物理フォーマットの例を示している。図23(b)はフレキシブルディスクの正面からみた外観、断面構造、及びフレキシブルディスクを示す。図23(c)は、フレキシブルディスクFDに上記プログラムの記録再生を行うための構成を示す。FIG. 23A shows an example of a physical format of a flexible disk as a recording medium body. FIG. 23B shows the appearance, cross-sectional structure, and flexible disk as viewed from the front of the flexible disk. FIG. 23C shows a configuration for recording and reproducing the program on the flexible disk FD. コンテンツ配信サービスを実現するコンテンツ供給システムex100の全体構成を示すブロック図である。It is a block diagram showing the whole composition of content supply system ex100 which realizes content distribution service. 上記実施の形態で説明した動画像符号化方法と動画像復号化方法を用いた携帯電話ex115を示す図である。FIG. 21 is a diagram illustrating a mobile phone ex115 that uses the moving image encoding method and the moving image decoding method described in the above embodiment. 携帯電話の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a mobile phone. ディジタル放送用システムの一例を示す図である。FIG. 1 is a diagram illustrating an example of a digital broadcasting system. 従来の画像符号化装置の構成を示すブロック図である。FIG. 14 is a block diagram illustrating a configuration of a conventional image encoding device. 従来の画像復号化装置の構成を示すブロック図である。FIG. 27 is a block diagram illustrating a configuration of a conventional image decoding device. 図30(a)及び図30(b)は入力画像におけるピクチャの参照関係を説明するための図である。図30(a)は表示順ピクチャを並べた様子を示している。図30(b)は符号化順にピクチャを並べた様子を示している。FIGS. 30A and 30B are diagrams for explaining the reference relation of pictures in an input image. FIG. 30A shows a state where display order pictures are arranged. FIG. 30B shows a state in which pictures are arranged in coding order. 図29に示した画像復号化装置における再構成画像信号のピクチャメモリへの格納制御動作を示すフローチャートである。30 is a flowchart showing a storage control operation of a reconstructed image signal in a picture memory in the image decoding device shown in FIG. 29. 図32(a)は復号化対象ピクチャにおいて、ピクチャのサイズが小から大に変更された場合で、サイズ変更後のピクチャを格納するだけの空き領域がピクチャメモリにあった場合の格納例を示す図である。図32(b)は復号化対象ピクチャにおいて、ピクチャのサイズが小から大に変更された場合で、サイズ変更後のピクチャを格納するだけの空き領域がピクチャメモリになかった場合の格納例を示す図である。FIG. 32A shows an example of storage in a case where the size of a picture to be decoded has been changed from small to large, and there is a free area in the picture memory for storing the picture after the size change. FIG. FIG. 32B shows an example of storage in a case where the size of a picture to be decoded has been changed from small to large, and there is no free space in the picture memory for storing the picture after the size change. FIG. 図33(a)は復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ内に復号化対象ピクチャと異なるピクチャサイズを持ったピクチャが存在しない場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリにあった場合の格納例を示す図である。図33(b)は復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ内に復号化対象ピクチャと異なるピクチャサイズを持ったピクチャが存在しない場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリになかった場合の格納例を示す図である。FIG. 33 (a) shows a case where the picture size of the current picture to be decoded is not changed and no picture having a picture size different from the current picture to be decoded exists in the picture memory. FIG. 11 is a diagram illustrating a storage example in a case where there is a free area in the picture memory for storing. FIG. 33B shows the case where the picture size of the current picture to be decoded is not changed and no picture having a picture size different from the current picture to be decoded exists in the picture memory. FIG. 14 is a diagram showing a storage example when there is no free area in the picture memory for storing. 図34(a)は復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ内に新たに復号化されたピクチャCと異なるピクチャサイズを持ったピクチャが存在する場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリにあった場合の格納例を示す図である。図34(b)は復号化対象ピクチャにおいてピクチャサイズが変更されず、かつ、ピクチャメモリ内に、新たに復号化されたピクチャCと異なるピクチャサイズを持ったピクチャが存在する場合で、新たに復号化されたピクチャCを格納するだけの空き領域がピクチャメモリになかった場合の格納例を示す図である。FIG. 34A shows a case where the picture size of the current picture to be decoded is not changed and a picture having a picture size different from that of the newly decoded picture C exists in the picture memory. FIG. 11 is a diagram showing a storage example in a case where there is a vacant area in the picture memory for storing the selected picture C. FIG. 34B shows a case where the picture size of the current picture to be decoded is not changed and a picture having a picture size different from the newly decoded picture C exists in the picture memory. FIG. 14 is a diagram illustrating a storage example in a case where there is no free area in the picture memory for storing a converted picture C;

符号の説明Explanation of reference numerals

800 画像符号化装置
101 ピクチャメモリ
102 予測残差符号化部
103 符号列生成部
104 予測残差復号化部
105 ピクチャメモリ
106 動きベクトル検出部
107 動き補償符号化部
108 動きベクトル記憶部
109 ピクチャメモリ制御部
112 差分演算部
113 加算演算部
114 スイッチ
115 スイッチ
201 符号列解析部
202 予測残差復号化部
203 ピクチャメモリ
204 動き補償復号化部
205 動きベクトル記憶部
206 ピクチャメモリ制御部
207 ピクチャサイズ変更判定部
209 削除ピクチャ領域判定部
210 ピクチャメモリ分割方法指定部
210A アドレス分割部
211 加算演算部
212 スイッチ
801 ピクチャメモリ分割情報符号化部
1100 画像復号化装置
2000 画像復号化装置
800 image encoding device 101 picture memory 102 prediction residual encoding unit 103 code sequence generation unit 104 prediction residual decoding unit 105 picture memory 106 motion vector detection unit 107 motion compensation encoding unit 108 motion vector storage unit 109 picture memory control Unit 112 difference operation unit 113 addition operation unit 114 switch 115 switch 201 code string analysis unit 202 prediction residual decoding unit 203 picture memory 204 motion compensation decoding unit 205 motion vector storage unit 206 picture memory control unit 207 picture size change determination unit 209 Deletion picture region determination unit 210 Picture memory division method designating unit 210A Address division unit 211 Addition operation unit 212 Switch 801 Picture memory division information encoding unit 1100 Image decoding device 2000 Image decoding Equipment

Claims (33)

異なるピクチャサイズの動画像ストリームを含んだ符号列を、復号化済みピクチャを参照しながら復号化する画像復号化装置であって、
復号化済みのピクチャを格納するための記憶領域を備えるピクチャメモリと、
前記ピクチャメモリの記憶領域を所定の大きさの区分領域に区分するメモリ区分手段と、
新たに復号化されたピクチャ1枚分の全データを、前記ピクチャメモリの1以上の前記区分領域からなる連続した記憶領域に連続して格納する格納手段と
を備えることを特徴とする画像復号化装置。
An image decoding apparatus for decoding a code string including moving image streams of different picture sizes with reference to decoded pictures,
A picture memory having a storage area for storing decoded pictures,
Memory partitioning means for partitioning the storage area of the picture memory into partitioned areas of a predetermined size;
Storage means for continuously storing all data of one newly decoded picture in a continuous storage area of the picture memory comprising one or more of the divided areas. apparatus.
前記画像復号化装置は、さらに、
新たに復号化されたピクチャのサイズと、直前に復号化されたピクチャのサイズとを比較することによってピクチャのサイズが変更されているかどうかを判定するサイズ変更判定手段を備え、
前記メモリ区分手段は、前記新たに復号化されたピクチャのサイズが変更されていると判定された場合、前記区分領域の大きさが前記新たに復号化されたピクチャのサイズとなるよう、前記記憶領域を区分する
ことを特徴とする請求の範囲1記載の画像復号化装置。
The image decoding apparatus further includes:
A size change determination unit that determines whether the size of the picture has been changed by comparing the size of the newly decoded picture with the size of the picture that was decoded immediately before,
The memory partitioning means is configured to, when it is determined that the size of the newly decoded picture has been changed, store the size of the partitioned area to be the size of the newly decoded picture. 2. The image decoding apparatus according to claim 1, wherein the image decoding apparatus divides an area.
前記格納手段は、少なくとも1つの前記区分領域が空き領域であるか否かを検出する第1の空き領域検出部を備え、
前記格納手段は、少なくとも1つの前記区分領域が空き領域として検出されると、検出された前記区分領域の1つからなる連続した記憶領域に前記新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲2記載の画像復号化装置。
The storage unit includes a first free area detection unit that detects whether at least one of the divided areas is a free area,
The storage means, when at least one of the divided areas is detected as a free area, stores all data of one newly decoded picture in a continuous storage area including one of the detected divided areas. 3. The image decoding apparatus according to claim 2, wherein is stored continuously.
前記格納手段は、前記ピクチャメモリ内にすでに格納されている復号化済みピクチャのうち、表示順が古いものから順に削除することによって、前記空き領域を生成する第1のピクチャ削除部を備え、
前記格納手段は、1つの前記区分領域も空き領域として検出されないとき、少なくとも1つの前記区分領域が空き領域として検出されるまで、前記第1のピクチャ削除部に前記復号化済みピクチャを削除させる
ことを特徴とする請求の範囲3記載の画像復号化装置。
The storage unit includes a first picture deletion unit that generates the empty area by deleting the decoded pictures already stored in the picture memory in order of display order from the oldest one,
The storage means, when one of the divided areas is not detected as a free area, causes the first picture deleting unit to delete the decoded picture until at least one of the partitioned areas is detected as a free area. 4. The image decoding device according to claim 3, wherein:
前記格納手段は、さらに、前記ピクチャメモリ内にすでに格納されている前記復号化済みピクチャにつき、表示される前に削除されてしまった場合に、当該ピクチャを表示する際に表示できないと判定する表示可能判定部を備える
ことを特徴とする請求の範囲4記載の画像復号化装置。
The storage unit is further configured to, if the decoded picture already stored in the picture memory is deleted before being displayed, determine that the decoded picture cannot be displayed when displayed. The image decoding device according to claim 4, further comprising a possibility determination unit.
前記格納手段は、前記ピクチャメモリの先頭から順に前記区分領域を選択する区分領域選択部を備え、
前記格納手段は、選択された前記区分領域からなる連続した記憶領域に、新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲2記載の画像復号化装置。
The storage means includes a partitioned area selection unit that selects the partitioned area in order from the top of the picture memory,
3. The image according to claim 2, wherein the storage unit continuously stores all data of one newly decoded picture in a continuous storage area including the selected divided areas. Decryption device.
前記格納手段は、選択された前記区分領域が空き領域であるか否かを検出する第2の空き領域検出部と、
選択された前記区分領域が空き領域でない場合、前記区分領域に格納されている復号化済みピクチャを削除することによって選択された前記区分領域を空き領域にする第2のピクチャ削除部とを備え、
前記格納手段は、選択された前記区分領域からなる連続した記憶領域に、新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲6記載の画像復号化装置。
A storage unit configured to detect whether or not the selected partitioned area is a free area;
A second picture deletion unit that makes the selected partitioned area a free area by deleting a decoded picture stored in the partitioned area when the selected partitioned area is not a free area,
7. The image according to claim 6, wherein the storage unit continuously stores all data of one newly decoded picture in a continuous storage area including the selected divided areas. Decryption device.
前記格納手段は、1つの前記区分領域も空き領域として検出されないとき、前記ピクチャメモリの先頭から順に前記区分領域を選択する区分領域選択部と、
選択された前記区分領域が空き領域であるか否かを検出する第2の空き領域検出部と、
選択された前記区分領域が空き領域でない場合、前記区分領域に格納されている復号化済みピクチャを削除することによって選択された前記区分領域を空き領域にする第2のピクチャ削除部とを備え、
前記格納手段は、選択された前記区分領域からなる連続した記憶領域に、新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲3記載の画像復号化装置。
A storing unit configured to, when one of the partitioned areas is not detected as a free area, select a partitioned area in order from the top of the picture memory;
A second free space detection unit that detects whether the selected partitioned area is a free space,
A second picture deletion unit that makes the selected partitioned area a free area by deleting a decoded picture stored in the partitioned area when the selected partitioned area is not a free area,
4. The image according to claim 3, wherein the storage unit continuously stores all data of one newly decoded picture in a continuous storage area including the selected divided areas. Decryption device.
前記画像復号化装置は、さらに、
前記符号列から、前記記憶領域の区分方法を示す区分情報を読み取る読み取り手段を備え、
前記メモリ区分手段は、読み取られた前記区分情報に従って前記記憶領域を区分する
ことを特徴とする請求の範囲1記載の画像復号化装置。
The image decoding apparatus further includes:
A reading unit that reads, from the code string, partition information indicating a partition method of the storage area,
The image decoding apparatus according to claim 1, wherein the memory partitioning unit partitions the storage area according to the read partition information.
前記区分情報は、前記符号列に含まれる動画像ストリームのうちの最大のピクチャサイズを示し、
前記メモリ区分手段は、前記各区分領域の大きさが、前記区分情報に示されたピクチャサイズとなるよう前記記憶領域を区分する
ことを特徴とする請求の範囲9記載の画像復号化装置。
The partition information indicates a maximum picture size of a video stream included in the code string,
10. The image decoding apparatus according to claim 9, wherein the memory partitioning unit partitions the storage area such that the size of each of the partition areas has a picture size indicated in the partition information.
前記区分情報は、前記記憶領域の大きさを前記最大のピクチャサイズで区分したときの区分領域の数を示し、
前記メモリ区分手段は、前記記憶領域を前記区分領域の数に区分する
ことを特徴とする請求の範囲9記載の画像復号化装置。
The partition information indicates the number of partition areas when the size of the storage area is partitioned by the maximum picture size,
The image decoding device according to claim 9, wherein the memory partitioning unit partitions the storage area into the number of the partition areas.
前記区分情報は、前記符号列に含まれる動画像ストリームのうちの最小のピクチャサイズを示し、
前記メモリ区分手段は、前記各区分領域の大きさが、前記区分情報に示されたピクチャサイズとなるよう前記記憶領域を区分する
ことを特徴とする請求の範囲9記載の画像復号化装置。
The partition information indicates a minimum picture size of a video stream included in the code sequence,
10. The image decoding apparatus according to claim 9, wherein the memory partitioning unit partitions the storage area such that the size of each of the partition areas has a picture size indicated in the partition information.
前記区分情報は、前記記憶領域の大きさを前記最小のピクチャサイズで区分したときの区分領域の数を示し、
前記メモリ区分手段は、前記記憶領域を前記区分領域の数に区分する
ことを特徴とする請求の範囲9記載の画像復号化装置。
The partition information indicates the number of partition areas when the size of the storage area is partitioned by the minimum picture size,
The image decoding device according to claim 9, wherein the memory partitioning unit partitions the storage area into the number of the partition areas.
前記区分情報は、前記符号列に含まれる動画像ストリームのピクチャサイズの最大公約数を示し、
前記メモリ区分手段は、前記各区分領域の大きさが、前記区分情報に示されたピクチャサイズとなるよう前記記憶領域を区分する
ことを特徴とする請求の範囲9記載の画像復号化装置。
The partition information indicates the greatest common divisor of the picture size of the video stream included in the code sequence,
10. The image decoding apparatus according to claim 9, wherein the memory partitioning unit partitions the storage area such that the size of each of the partition areas has a picture size indicated in the partition information.
前記区分情報は、少なくとも同一のマクロブロックは同一の前記区分領域内に格納されるように切り上げられている
ことを特徴とする請求の範囲9記載の画像復号化装置。
10. The image decoding apparatus according to claim 9, wherein the partition information is rounded up so that at least the same macroblock is stored in the same partition area.
前記区分情報は、各復号化済みピクチャの水平方向1列分の全てのマクロブロックが1つの前記区分領域に格納されるように切り上げられている
ことを特徴とする請求の範囲9記載の画像復号化装置。
10. The image decoding according to claim 9, wherein the partition information is rounded up so that all macroblocks for one column in the horizontal direction of each decoded picture are stored in one partition area. Device.
前記メモリ区分手段は、少なくとも同一のマクロブロックは同一の前記区分領域内に格納されるように、前記区分領域のサイズを切り上げる
ことを特徴とする請求の範囲9記載の画像復号化装置。
10. The image decoding apparatus according to claim 9, wherein the memory partitioning unit rounds up the size of the partitioned area so that at least the same macroblock is stored in the same partitioned area.
前記メモリ区分手段は、各復号化済みピクチャの水平方向1列分の全てのマクロブロックが1つの前記区分領域に格納されるように、前記区分領域のサイズを切り上げる
ことを特徴とする請求の範囲9記載の画像復号化装置。
The memory partitioning unit rounds up the size of the partitioned area so that all the macroblocks for one column in the horizontal direction of each decoded picture are stored in one partitioned area. 10. The image decoding device according to claim 9.
前記区分情報は、さらに、前記ピクチャメモリ内にすでに格納されている前記復号化済みピクチャにつき、表示される前に削除されてしまう可能性があるか否かを示す情報を含む
ことを特徴とする請求の範囲9記載の画像復号化装置。
The classification information further includes information indicating whether or not the decoded picture already stored in the picture memory may be deleted before being displayed. An image decoding apparatus according to claim 9.
前記格納手段は、前記ピクチャメモリ内の少なくとも1つの前記区分領域が空き領域であるか否かを検出する第1の空き領域検出部を備え、
前記格納手段は、前記新たに復号化されたピクチャ1枚分の全データを連続して格納することができる、1つ以上の前記区分領域からなる連続した記憶領域が空き領域として検出されると、検出された前記区分領域からなる連続した記憶領域に前記新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲9記載の画像復号化装置。
The storage unit includes a first free area detection unit that detects whether at least one of the partitioned areas in the picture memory is a free area,
The storage means is capable of continuously storing all the data of one newly decoded picture, and when a continuous storage area including one or more of the divided areas is detected as a free area. 10. The image decoding apparatus according to claim 9, wherein all the data of one newly decoded picture are continuously stored in a continuous storage area including the detected divided areas.
前記格納手段は、前記ピクチャメモリ内にすでに格納されている復号化済みピクチャのうち、表示順が古いものから順に削除することによって、前記空き領域を生成する第1のピクチャ削除部を備え、
前記格納手段は、前記新たに復号化されたピクチャ1枚分の全データを連続して格納するだけの区分領域が空き領域として検出されないとき、前記新たに復号化されたピクチャ1枚分の全データを連続して格納するだけの前記区分領域が空き領域として検出されるまで、前記第1のピクチャ削除部に前記復号化済みピクチャを削除させる
ことを特徴とする請求の範囲20記載の画像復号化装置。
The storage unit includes a first picture deletion unit that generates the empty area by deleting the decoded pictures already stored in the picture memory in order of display order from the oldest one,
The storage means, when a segmented area for continuously storing all the data of one newly decoded picture is not detected as a free area, stores all of the data of the newly decoded picture. 21. The image decoding apparatus according to claim 20, wherein the first picture deletion unit deletes the decoded picture until the divided area in which only data is continuously stored is detected as a free area. Device.
符号化済みのピクチャを参照しながら、異なるピクチャサイズの動画像ストリームを符号化して符号列を生成する画像符号化装置であって、
生成される符号列に含まれる動画像ストリームのピクチャサイズを取得するピクチャサイズ取得手段と、
取得されたピクチャサイズに基づいて、画像復号化装置側のピクチャメモリの区分方法を示した区分情報を生成する区分情報生成手段と、
生成された前記区分情報を含む符号列を生成する符号化手段と
を備えることを特徴とする画像符号化装置。
An image encoding apparatus that encodes moving image streams of different picture sizes to generate a code string while referring to encoded pictures,
Picture size obtaining means for obtaining a picture size of a moving image stream included in the generated code sequence;
Division information generating means for generating division information indicating a division method of the picture memory on the image decoding device side based on the obtained picture size;
Encoding means for generating a code string including the generated section information.
前記区分情報生成手段は、取得されたピクチャサイズのうち、最大のピクチャサイズを示す前記区分情報を生成する
ことを特徴とする請求の範囲22記載の画像符号化装置。
23. The image encoding apparatus according to claim 22, wherein the partition information generating unit generates the partition information indicating a maximum picture size among the acquired picture sizes.
前記区分情報生成手段は、取得されたピクチャサイズのうち、最小のピクチャサイズを示す前記区分情報を生成する
ことを特徴とする請求の範囲22記載の画像符号化装置。
23. The image encoding apparatus according to claim 22, wherein the partition information generating unit generates the partition information indicating a minimum picture size among the acquired picture sizes.
復号化済みのピクチャをピクチャメモリに格納し、異なるピクチャサイズの動画像ストリームを含んだ符号列を、前記復号化済みピクチャを参照しながら復号化する画像復号化方法であって、
前記ピクチャメモリの記憶領域を所定の大きさの区分領域に区分するメモリ区分ステップと、
新たに復号化されたピクチャ1枚分の全データを、前記ピクチャメモリの1つ以上の前記区分領域からなる連続した記憶領域に連続して格納する格納ステップと
を含むことを特徴とする画像復号化方法。
An image decoding method for storing a decoded picture in a picture memory, and decoding a code string including a video stream of a different picture size with reference to the decoded picture,
A memory partitioning step of partitioning a storage area of the picture memory into partition areas of a predetermined size;
Storing the entire data of one newly decoded picture in a continuous storage area of the picture memory, the storage area comprising one or more of the divided areas. Method.
前記画像復号化方法は、さらに、
新たに復号化されたピクチャのサイズと、直前に復号化されたピクチャのサイズとを比較することによってピクチャのサイズが変更されているかどうかを判定するサイズ変更判定ステップを含み、
前記メモリ区分ステップでは、前記新たに復号化されたピクチャのサイズが変更されていると判定された場合、前記区分領域の大きさが前記新たに復号化されたピクチャのサイズとなるよう、前記記憶領域を区分する
ことを特徴とする請求の範囲25記載の画像復号化方法。
The image decoding method further includes:
A resizing determination step of determining whether the size of the picture has been changed by comparing the size of the newly decoded picture with the size of the previously decoded picture,
In the memory partitioning step, when it is determined that the size of the newly decoded picture has been changed, the storage is performed such that the size of the partition area becomes the size of the newly decoded picture. 26. The image decoding method according to claim 25, wherein the area is divided.
前記格納ステップは、少なくとも1つの前記区分領域が空き領域であるか否かを検出する第1の空き領域検出ステップを含み、
前記格納ステップでは、少なくとも1つの前記区分領域が空き領域として検出されると、検出された前記区分領域の1つからなる連続した記憶領域に前記新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲26記載の画像復号化方法。
The storing step includes a first empty area detecting step of detecting whether at least one of the divided areas is an empty area,
In the storing step, when at least one of the divided areas is detected as a free area, all data of one newly decoded picture is stored in a continuous storage area including one of the detected divided areas. 27. The image decoding method according to claim 26, further comprising:
前記格納ステップは、前記ピクチャメモリ内にすでに格納されている復号化済みピクチャのうち、表示順が古いものから順に削除することによって、前記空き領域を生成する第1のピクチャ削除ステップを含み、
前記格納ステップでは、1つの前記区分領域も空き領域として検出されないとき、少なくとも1つの前記区分領域が空き領域として検出されるまで、前記第1のピクチャ削除ステップにおいて前記復号化済みピクチャを削除する
ことを特徴とする請求の範囲27記載の画像復号化方法。
The storing step includes a first picture deleting step of generating the empty area by deleting the decoded pictures already stored in the picture memory in order of display order from the oldest one,
In the storing step, when one of the partitioned areas is not detected as a free area, the decoded picture is deleted in the first picture deleting step until at least one of the partitioned areas is detected as a free area. 28. The image decoding method according to claim 27, wherein:
前記格納ステップは、前記ピクチャメモリの先頭から順に前記区分領域を選択する区分領域選択ステップを含み、
前記格納ステップでは、選択された前記区分領域からなる連続した記憶領域に、新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲26記載の画像復号化方法。
The storing step includes a sectioned area selecting step of sequentially selecting the sectioned area from the top of the picture memory,
27. The image according to claim 26, wherein, in the storing step, all data of one newly decoded picture is continuously stored in a continuous storage area including the selected divided areas. Decryption method.
前記格納ステップは、選択された前記区分領域が空き領域であるか否かを検出する第2の空き領域検出ステップと、
選択された前記区分領域が空き領域でない場合、前記区分領域に格納されている復号化済みピクチャを削除することによって選択された前記区分領域を空き領域にする第2のピクチャ削除ステップとを含み、
前記格納ステップでは、選択された前記区分領域からなる連続した記憶領域に、新たに復号化されたピクチャ1枚分の全データを連続して格納する
ことを特徴とする請求の範囲29記載の画像復号化方法。
The storage step includes a second free area detection step of detecting whether the selected section area is a free area;
A second picture deletion step of making the selected partition area a free area by deleting a decoded picture stored in the partition area if the selected partition area is not a free area,
30. The image according to claim 29, wherein, in the storing step, all data of one newly decoded picture is continuously stored in a continuous storage area including the selected divided areas. Decryption method.
符号化済みのピクチャを参照しながら、異なるピクチャサイズの動画像ストリームを符号化して符号列を生成する画像符号化方法であって、
生成される符号列に含まれる動画像ストリームのピクチャサイズを取得するピクチャサイズ取得ステップと、
取得されたピクチャサイズに基づいて、画像復号化装置側のピクチャメモリの区分方法を示した区分情報を生成する区分情報生成ステップと、
生成された前記区分情報を含む符号列を生成する符号化ステップと
を含むことを特徴とする画像符号化方法。
An image encoding method for encoding a moving image stream of a different picture size to generate a code sequence while referring to an encoded picture,
A picture size obtaining step of obtaining a picture size of a moving image stream included in the generated code sequence;
A partition information generating step of generating partition information indicating a partition method of a picture memory on the image decoding apparatus side based on the obtained picture size;
An encoding step of generating a code string including the generated section information.
復号化済みのピクチャをピクチャメモリに格納し、異なるピクチャサイズの動画像ストリームを含んだ符号列を、前記復号化済みピクチャを参照しながら復号化する画像復号化装置のためのプログラムであって、コンピュータに
前記ピクチャメモリの記憶領域を所定の大きさの区分領域に区分するメモリ区分ステップと、
新たに復号化されたピクチャ1枚分の全データを、前記ピクチャメモリの1以上の前記区分領域からなる連続した記憶領域に連続して格納する格納ステップとを実行させるためのプログラム。
A program for an image decoding device that stores a decoded picture in a picture memory, and decodes a code string including a video stream of a different picture size with reference to the decoded picture, A computer memory partitioning step of partitioning the storage area of the picture memory into partition areas of a predetermined size;
A storage step of continuously storing all data of one newly decoded picture in a continuous storage area of the picture memory, the storage area including one or more of the divided areas.
符号化済みのピクチャを参照しながら、異なるピクチャサイズの動画像ストリームを符号化して符号列を生成する画像符号化装置のためのプログラムであって、コンピュータに
生成される符号列に含まれる動画像ストリームのピクチャサイズを取得するピクチャサイズ取得ステップと、
取得されたピクチャサイズに基づいて、画像復号化装置側のピクチャメモリの区分方法を示した区分情報を生成する区分情報生成ステップと、
生成された前記区分情報を含む符号列を生成する符号化ステップとを実行させるためのプログラム。
A program for an image encoding device that encodes moving image streams of different picture sizes to generate a code sequence while referring to an already-encoded picture, the moving image being included in a code sequence generated by a computer. A picture size obtaining step for obtaining a picture size of the stream;
A partition information generating step of generating partition information indicating a partition method of a picture memory on the image decoding apparatus side based on the obtained picture size;
And an encoding step of generating a code string including the generated segment information.
JP2004037369A 2003-02-19 2004-02-13 Picture decoding apparatus, picture encoding apparatus, and method thereof Pending JP2004274734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004037369A JP2004274734A (en) 2003-02-19 2004-02-13 Picture decoding apparatus, picture encoding apparatus, and method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003040804 2003-02-19
JP2004037369A JP2004274734A (en) 2003-02-19 2004-02-13 Picture decoding apparatus, picture encoding apparatus, and method thereof

Publications (1)

Publication Number Publication Date
JP2004274734A true JP2004274734A (en) 2004-09-30

Family

ID=33134129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004037369A Pending JP2004274734A (en) 2003-02-19 2004-02-13 Picture decoding apparatus, picture encoding apparatus, and method thereof

Country Status (1)

Country Link
JP (1) JP2004274734A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014011714A (en) * 2012-07-02 2014-01-20 Ntt Docomo Inc Moving image prediction encoding device, moving image prediction encoding method, moving image prediction encoding program, moving image prediction decoding device, moving image prediction decoding method, and moving image prediction decoding program
JP2016158282A (en) * 2016-04-12 2016-09-01 株式会社Nttドコモ Moving image prediction decoding method and moving image prediction decoding apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014011714A (en) * 2012-07-02 2014-01-20 Ntt Docomo Inc Moving image prediction encoding device, moving image prediction encoding method, moving image prediction encoding program, moving image prediction decoding device, moving image prediction decoding method, and moving image prediction decoding program
US10116956B2 (en) 2012-07-02 2018-10-30 Ntt Docomo, Inc. Video predictive encoding device, video predictive encoding method, video predictive encoding program, video predictive decoding device, video predictive decoding method, and video predictive decoding program
US10560711B2 (en) 2012-07-02 2020-02-11 Ntt Docomo, Inc. VIDEO PREDICTIVE ENCODING DEVICE, VIDEO PREDICTIVE ENCODING Method, video predictive encoding program, video predictive decoding device, video predictive decoding method, and video predictive decoding program
JP2016158282A (en) * 2016-04-12 2016-09-01 株式会社Nttドコモ Moving image prediction decoding method and moving image prediction decoding apparatus

Similar Documents

Publication Publication Date Title
JP5355807B2 (en) Encoded data distribution method and distribution system
JP4226645B2 (en) Video coding method
KR100980964B1 (en) Video coding method and video decoding method
JP4672751B2 (en) Motion vector decoding method
JP2004254327A (en) Image coding method and image decoding method
JP4405272B2 (en) Moving picture decoding method, moving picture decoding apparatus and program
JP4230289B2 (en) Video encoding method and video decoding method
JP2004242286A (en) Motion picture encoding method and motion picture decoding method
JP2004274734A (en) Picture decoding apparatus, picture encoding apparatus, and method thereof
JP2004228617A (en) Dynamic image encoder and dynamic image decoder
WO2004075562A1 (en) Image decoding device, image encoding device, and method thereof
JP2004194297A (en) Method for encoding and decoding motion picture
JP2007049746A (en) Method for encoding and decoding motion picture