JP2007110573A - Image coding/decoding device - Google Patents

Image coding/decoding device Download PDF

Info

Publication number
JP2007110573A
JP2007110573A JP2005301091A JP2005301091A JP2007110573A JP 2007110573 A JP2007110573 A JP 2007110573A JP 2005301091 A JP2005301091 A JP 2005301091A JP 2005301091 A JP2005301091 A JP 2005301091A JP 2007110573 A JP2007110573 A JP 2007110573A
Authority
JP
Japan
Prior art keywords
reference image
decoding
recording medium
encoding
unit
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.)
Withdrawn
Application number
JP2005301091A
Other languages
Japanese (ja)
Inventor
Takahiro Yamada
高弘 山田
Kazuyuki Iguma
一行 猪熊
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 JP2005301091A priority Critical patent/JP2007110573A/en
Publication of JP2007110573A publication Critical patent/JP2007110573A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image coding/decoding device capable of reproducing codes stored in a recording medium after decoding them while securing a reference image region for storing reference images, which are required when decoding processing is performed, in a storage medium. <P>SOLUTION: The decoding device reads out the codes in the recording medium 150 when the decoding processing is executed, separately secures the reference image region for storing the reference images required when the decoding processing is performed in a storage region 152 of the recording medium 150, and externally outputs the reference images after reading the reference images from the reference image region corresponding to an output request of the reference images from the outside. By this, the codes in the recording medium 150 are externally outputted after decoding and reproducing them. On that occasion, the reference image region for storing the reference images required when the decoding processing is performed is secured in the storage medium. Consequently, it is possible to achieve system compactification and cost reduction by eliminating a reference image memory in the coding/decoding device. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、動画像を圧縮または復号するための画像符号化・復号化装置に関するものである。   The present invention relates to an image encoding / decoding device for compressing or decoding moving images.

動画データの符号化処理は、通常、二次元の単位ブロックであるマクロブロック(MB)と呼ばれる矩形領域の複数の画素データ単位で行われる。また上記符号化処理は、一般にデータの圧縮効率を高めるために、処理対象マクロブロックの情報のみを元に圧縮する方法(フレーム内符号化処理:INTRA符号化処理)と、処理対象マクロブロックと先行フレーム内の参照マクロブロックとの各画素データの差分データを圧縮する方法(フレーム間予測符号化処理:INTER符号化処理)の一方を選択し、マクロブロックの符号化を繰り返し行い、そして1フレーム分のデータ符号化を行っている。   The encoding process of moving image data is normally performed in units of a plurality of pixel data in a rectangular area called a macro block (MB) which is a two-dimensional unit block. In addition, in order to improve the data compression efficiency, the encoding process generally compresses only based on the information of the processing target macroblock (intraframe encoding process: INTRA encoding process), the processing target macroblock and the preceding macroblock. One method of compressing difference data of each pixel data from the reference macroblock in the frame (interframe prediction encoding processing: INTER encoding processing) is selected, macroblock encoding is repeated, and one frame worth Data encoding is performed.

また例えば、最初のフレームに含まれる全てのマクロブロックは、先行するフレームのデータが無いためINTER符号化処理が出来ないため、フレームに含まれる全てのマクロブロックはINTRA符号化された符号で構成される。そのようなフレームをi-VOPと呼ぶ。また、INTRA MB(マクロブロック)とINTER MB(マクロブロック)が混在するフレームをP-VOPと呼ぶ。   Also, for example, all macroblocks included in the first frame cannot be subjected to the INTER encoding process because there is no data of the preceding frame, so all the macroblocks included in the frame are configured with an INTRA encoded code. The Such a frame is called i-VOP. A frame in which INTRA MB (macroblock) and INTER MB (macroblock) are mixed is called P-VOP.

またINTERフレーム間予測符号化処理の特性により、先行フレームの符号から復元された画像(再構成画像)を一時的に保存しておく必要があるため、入力画像約1フレーム程度と同等容量の輝度(Y)データ、色差(Cr、Cb)データを格納するメモリ領域(参照画像領域)が必要になる。   In addition, because of the characteristics of the inter-frame predictive encoding process, it is necessary to temporarily store an image (reconstructed image) restored from the code of the preceding frame, so that the luminance is equivalent to about one frame of the input image. (Y) A memory area (reference image area) for storing data and color difference (Cr, Cb) data is required.

その参照画像領域が装置内に設けられているため、例えば、画像符号化装置を1チップ化するときのチップ面積および回路規模の軽減化などが阻まれていた。
そこで、その参照画像領域を、DSC(Digital Still Camera)などに画像符号データを蓄積するために挿入されているSD(Secure Digital)カードやCF(Compact Flash)カードなどの記録媒体内に確保する制御処理部を、符号化処理装置内に設けることによって、符号化処理時に必要となる参照画像領域を画像符号化装置内に設けずに済み、例えば、従来のものに比べ、画像符号化装置を1チップ化するときのチップ面積および回路規模を軽減するようにした技術が知られている(例えば、特許文献1参照)。
特開2004−64455号公報
Since the reference image area is provided in the apparatus, for example, reduction of the chip area and the circuit scale when the image encoding apparatus is made into one chip is hindered.
Therefore, control for securing the reference image area in a recording medium such as an SD (Secure Digital) card or a CF (Compact Flash) card inserted to store image code data in a DSC (Digital Still Camera) or the like. By providing the processing unit in the encoding processing apparatus, it is not necessary to provide a reference image area necessary for the encoding process in the image encoding apparatus. For example, the image encoding apparatus is 1 in comparison with the conventional one. A technique is known that reduces the chip area and the circuit scale when making a chip (for example, see Patent Document 1).
JP 2004-64455 A

しかしながら、上記特許文献1では、符号化処理について言及しており、DSCでの記録処理を実現することは可能である。
しかし、DSCとしての機能としては、その本体で記録媒体に符号として記録した画像がどのように記録されているかを確認するために動画再生機能も同時に必要となる。その動画再生機能は、図12に示すように、記録媒体内に存在する符号を復号化し元の入力画像と同じ形式のデータに復元する画像復号化装置と、LCD等の表示装置と、その表示装置に表示するための表示処理装置とで構成される。
However, the above Patent Document 1 refers to encoding processing, and it is possible to realize recording processing with DSC.
However, as a function of the DSC, a moving image reproduction function is also required at the same time in order to check how an image recorded as a code on the recording medium is recorded on the main body. As shown in FIG. 12, the moving image reproduction function includes an image decoding device that decodes a code existing in a recording medium and restores the same format data as the original input image, a display device such as an LCD, And a display processing device for displaying on the device.

そのデータの関係は、画像復号化装置内部で復元された参照画像を表示処理装置等に対して、求められるタイミングで出力し、または復号化装置のタイミングで出力し、表示処理装置はそのデータを表示装置に対応した信号に変換し、意図したフレームレートでLCD等の表示装置に表示することで再生動作を実現している。   The relationship of the data is that the reference image restored in the image decoding device is output to the display processing device or the like at a required timing, or is output at the timing of the decoding device, and the display processing device outputs the data. The signal is converted into a signal corresponding to the display device and displayed on a display device such as an LCD at an intended frame rate to realize a reproduction operation.

しかし、上記特許文献1には、生成された符号を復号化する機能や参照画像データを外部に出力する手段が無いために、上記のようなDSCの再生機能を実現できない。
また上記特許文献1の符号化処理は、記録媒体内に参照画像領域を確保した状態で符号を格納することが出来なくなった場合は、記録媒体への符号格納を停止し、記録媒体内に確保していた参照画像領域を開放するということを特徴としていたのだが、記録媒体内に参照画像領域の空き領域があるにも関わらず符号化を停止してしまっていた。
However, since the above-mentioned Patent Document 1 does not have a function for decoding the generated code or a means for outputting the reference image data to the outside, the above-described DSC reproduction function cannot be realized.
Further, the encoding process of Patent Document 1 stops code storage in the recording medium and secures it in the recording medium when the code cannot be stored in a state where the reference image area is secured in the recording medium. However, the encoding has been stopped even though there is a free space of the reference image area in the recording medium.

そこで、本発明は、復号化処理時に必要となる参照画像を格納するための参照画像領域を記憶媒体内に確保し、記録媒体に格納された符号を復号化し再生でき、また記録媒体内に参照画像領域の空き領域があるとき、記録媒体への符号格納を続行できる画像符号化/復号化装置を提供することを目的としたものである。   Therefore, the present invention secures a reference image area in the storage medium for storing a reference image necessary for the decoding process, can decode and reproduce the code stored in the recording medium, and can also be referred to in the recording medium. An object of the present invention is to provide an image encoding / decoding device capable of continuing code storage on a recording medium when there is a free space in the image area.

前述した目的を達成するために、本発明の画像符号化/復号化装置は、最初の入力画像に対しフレーム内符号化処理による圧縮符号化処理を施して符号を生成し、次からの入力画像に対しては参照画像を用いた予測符号化処理による圧縮符号化処理を施して符号を生成する符号化手段と、生成した符号に対し復号化処理を施し符号化前の入力画像データに復元する復号化手段を有し、前記符号化手段の生成符号の記録を行う記録媒体を装備可能であり、符号化処理時には、生成符号を前記記録媒体内の記憶領域に格納させるとともに、記録媒体の記憶領域に、前記参照画像を格納するための参照画像領域を別個確保する画像符号化/復号化装置であって、
前記復号化手段は、復号化処理時に、前記記録媒体内の符号の読出しを行うとともに、記録媒体の記憶領域に、復号化処理時に必要となる参照画像を格納するための参照画像領域を別途確保し、かつ外部からの前記参照画像の出力要求に応じてその参照画像を前記参照画像領域から読出し、外部出力することを特徴とする。
In order to achieve the above-described object, the image encoding / decoding device of the present invention generates a code by performing compression encoding processing by intra-frame encoding processing on the first input image, and generates the next input image. The encoding means for generating a code by performing a compression encoding process using a predictive encoding process using a reference image, and decoding the generated code to restore the input image data before encoding A recording medium having decoding means and recording the generated code of the encoding means can be provided. During the encoding process, the generated code is stored in a storage area in the recording medium and stored in the recording medium. An image encoding / decoding device that separately secures a reference image area for storing the reference image in the area,
The decoding means reads out the code in the recording medium during the decoding process, and separately secures a reference image area for storing a reference image necessary for the decoding process in the storage area of the recording medium. The reference image is read out from the reference image area in response to a request for outputting the reference image from the outside, and externally output.

この構成によれば、記録媒体内の符号が復号化され再生されて外部へ出力され、そのとき復号化処理時に必要となる参照画像を格納するための参照画像領域が記憶媒体内に確保される。よって、参照画像メモリを画像符号化/復号化装置内に持たなくて済み、システムコンパクト化およびコストダウンが図れる。   According to this configuration, the code in the recording medium is decoded, reproduced, output to the outside, and a reference image area for storing a reference image required at the time of the decoding process is secured in the storage medium. . Therefore, it is not necessary to have a reference image memory in the image encoding / decoding device, and system compactness and cost reduction can be achieved.

また本発明の画像符号化/復号化装置において、前記復号化手段が、復号化処理開始時に、前記記録媒体内に確保する参照画像領域の容量は、参照画像のN(Nは2以上の整数)フレーム分の容量であることを特徴とする。   In the image encoding / decoding device according to the present invention, the capacity of the reference image area that the decoding unit reserves in the recording medium at the start of the decoding process is N (N is an integer of 2 or more) of the reference image. ) The capacity is equivalent to the frame.

この構成によれば、記録媒体内にNフレーム分の参照画像領域が確保され、外部要求分の参照画像領域が確保可能な空き容量がある場合は、出力可能な複数フレーム分の参照画像を復号化装置内に待機させておくことが可能になり、外部からの出力タイミングに柔軟に対応可能となる。   According to this configuration, when the reference image area for N frames is secured in the recording medium and there is a free space that can secure the reference image area for the external request, the reference images for a plurality of frames that can be output are decoded. It is possible to wait in the conversion apparatus, and it is possible to flexibly cope with the output timing from the outside.

また本発明の画像符号化/復号化装置において、前記復号化手段は、復号化処理開始時に前記記録媒体内の記憶領域の空き容量を検知し、この検知した空き容量と前記記録媒体内の記憶領域に確保しようとする参照画像の容量に外部から要求された参照画像フレーム数N〜1を乗じた容量とを比較し、前記記録媒体内の記憶領域に前記容量が確保できる最大参照画像バンク数の容量を確保することを特徴とする。   In the image encoding / decoding device of the present invention, the decoding means detects the free space in the storage area in the recording medium at the start of decoding processing, and the detected free space and the storage in the recording medium. The maximum number of reference image banks that can secure the capacity in the storage area in the recording medium by comparing the capacity of the reference image to be secured in the area with the capacity obtained by multiplying the number N-1 of reference image frames requested from the outside. It is characterized by securing the capacity of

この構成によれば、記録媒体内に確保出来る最大のNフレームが自動的に判断され確保され、外部の表示装置等で出来る限り出力可能な多数フレーム分の参照画像を復号化装置内に待機させておきたい場合に、確認する処理を行う必要が無くなる。   According to this configuration, the maximum N frames that can be secured in the recording medium are automatically determined and secured, and a reference image for a number of frames that can be output as much as possible by an external display device or the like is made to wait in the decoding device. If you want to keep it, you don't need to perform the confirmation process.

また本発明の画像符号化/復号化装置において、前記復号化手段は、復号化処理開始時に、確保できた参照画像バンク数を外部に通知する出力装置を具備することを特徴とする。   In the image encoding / decoding apparatus according to the present invention, the decoding means includes an output device that notifies the number of reference image banks that can be secured to the outside at the start of decoding processing.

この構成によれば、外部において確保した参照画像バンク数が分かり、外部装置が復号化装置に待機しておける参照画像のフレーム数がわかる。よって、サーチ再生処理を行う場合、1フレーム分のデータを出力するのに要する処理時間と1フレーム分の参照画像を生成するのに必要な処理時間も考慮することで、何フレームまで駒落としが可能か否かを判断できる。   According to this configuration, the number of reference image banks secured externally is known, and the number of reference image frames that the external device can stand by in the decoding device is known. Therefore, when performing the search reproduction process, it is possible to drop frames up to how many frames by considering the processing time required to output data for one frame and the processing time required to generate a reference image for one frame. It can be determined whether or not it is possible.

また本発明の画像符号化/復号化装置において、前記復号化手段は、復号化処理中に、各々のバンクに格納されるべき参照画像状態を外部に通知する出力装置を具備することを特徴とする。   Further, in the image encoding / decoding device of the present invention, the decoding means includes an output device for notifying the outside of the reference image state to be stored in each bank during the decoding process. To do.

この構成によれば、出力可能状態になった参照画像バンクの状況が出力され、外部から出力可能で待機しているバンクが分かる。よって、表示装置側でタイミング調整の為の参照画像先読み処理が可能となる。   According to this configuration, the status of the reference image bank in the output enabled state is output, and the standby bank that can be output from the outside is known. Therefore, the reference image prefetching process for timing adjustment can be performed on the display device side.

また本発明の画像符号化/復号化装置において、前記復号化手段は、復号化処理中に、出力可能になった参照画像を選択的にバンクに出力要求できる入力装置を具備することを特徴とする。   In the image encoding / decoding device according to the present invention, the decoding means includes an input device capable of selectively requesting the bank to output a reference image that can be output during the decoding process. To do.

この構成によれば、参照画像で出力可能になったバンクが選択可能となり、出力したいバンクを選択できる。よって、再生時にスキップしたい画像を出力しなくて済む。
また本発明の画像符号化/復号化装置において、前記復号化手段は、前記記録媒体内の記憶領域の空き容量を検知し、この検知した空き容量と前記記録媒体内の記憶領域に記録しようとする生成符号の量とを比較し、前記記録媒体内の記憶領域に該生成符号の格納ができないときには、該生成符号を格納させる処理動作を停止させる記録媒体空き容量検知部と、前記記録媒体内の記憶領域に該生成符号を格納できないとき、前記参照画像領域の開放を行う参照画像出力部と、前記記録媒体内の記憶領域に該生成符号を格納できないとき、フレーム内符号化処理に固定して処理を行うフレーム内/間符号判定部を具備することを特徴とする。
According to this configuration, a bank that can be output as a reference image can be selected, and a bank to be output can be selected. Therefore, it is not necessary to output an image to be skipped during reproduction.
In the image encoding / decoding device according to the present invention, the decoding means detects the free space in the storage area in the recording medium and attempts to record the detected free space and the storage area in the recording medium. When the generated code cannot be stored in the storage area in the recording medium, the recording medium free space detecting unit for stopping the processing operation for storing the generated code is stored in the recording medium. When the generated code cannot be stored in the storage area, the reference image output unit that releases the reference image area, and when the generated code cannot be stored in the storage area in the recording medium, it is fixed to the intra-frame encoding process. And an intra-frame / inter-code determination unit for processing.

この構成によれば、記録媒体内に参照画像領域を確保しての符号化処理中に記録媒体内の符号を格納する空き容量が無くなった場合は、記録媒体内に確保していた参照画像領域を開放し、フレーム内符号化処理に固定して、符号化処理を続行する。よって、記録媒体内に参照画像に必要な容量がなくなっても、符号化処理が行える。   According to this configuration, when there is no free space for storing the code in the recording medium during the encoding process with the reference image area secured in the recording medium, the reference image area secured in the recording medium Is fixed to the intra-frame encoding process, and the encoding process is continued. Therefore, the encoding process can be performed even if the recording medium has no necessary capacity for the reference image.

また本発明の画像符号化/復号化装置において、前記復号化手段は、記録媒体挿入時に、記録媒体内にすでに記録されている符号のヘッダ情報を確認して復号化処理に必要となる最大参照画像容量を判断し、符号化を開始するときは、前記容量と符号化処理に必要となる参照画像容量を比較し、大きい方の容量を確保し、符号化処理中にその確保した容量を保持できなくなった場合は符号化処理を停止する記録媒体空き容量検知部を具備することを特徴とする。   In the image encoding / decoding device of the present invention, the decoding means checks the header information of the code already recorded in the recording medium when inserting the recording medium, and refers to the maximum reference necessary for the decoding process. When determining the image capacity and starting encoding, compare the capacity with the reference image capacity required for the encoding process, secure the larger capacity, and retain the reserved capacity during the encoding process. A recording medium free space detecting unit that stops the encoding process when it becomes impossible is provided.

この構成によれば、記録媒体挿入時に、すでに内蔵されている符号のヘッダを確認し、復号化時に必要な容量を把握し、符号化処理を行う場合は、その容量と参照画像容量の大きい方の容量を、記録媒体内に確保して、符号化処理を行う。よって、必ず符号化・復号化が行える。   According to this configuration, when the recording medium is inserted, the header of the code already incorporated is confirmed, the capacity required for decoding is grasped, and when the encoding process is performed, the larger capacity and the reference image capacity Is ensured in the recording medium to perform the encoding process. Therefore, encoding / decoding can always be performed.

本発明の画像符号化/復号化装置は、記録媒体内に参照画像領域を確保することにより、参照画像を格納するための参照画像領域を画像符号化装置内に設けずに済むとともに、復号化処理の機能も実現でき、復号化処理時に必要な参照画像領域についても記録媒体内に確保することができ、これにより、画像符号化/復号化装置を1チップ化するときのチップ面積および回路規模を、従来のものに比べて軽減できる、という効果を有している。   The image encoding / decoding apparatus according to the present invention secures a reference image area in a recording medium, so that it is not necessary to provide a reference image area for storing a reference image in the image encoding apparatus. The processing function can also be realized, and the reference image area necessary for the decoding process can also be secured in the recording medium, whereby the chip area and the circuit scale when the image encoding / decoding device is made into one chip are realized. Can be reduced as compared with the conventional one.

以下、本発明の実施の形態を、図面を参照しながら説明する。
図1は、実施の形態における画像符号化/復号化装置およびこの装置に装備可能な記録媒体のブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram of an image encoding / decoding apparatus according to an embodiment and a recording medium that can be installed in the apparatus.

画像符号化/復号化装置は、最初の入力画像に対しフレーム内符号化処理による圧縮符号化処理を施して符号を生成し、次からの入力画像に対しては参照画像を用いた予測符号化処理による圧縮符号化処理を施して符号を生成する画像符号化装置(符号化手段の一例)と、生成した符号に対し復号化処理を施し符号化前の入力画像データに復元する画像復号化装置(復号化手段の一例)から構成され、画像符号化装置の生成符号の記録を行い、画像復号化装置から記録された符号の再生が可能な記録媒体を装備可能とされている。なお、画像符号化装置と画像復号化装置の構成は、一部が重複している。
[画像符号化装置]
図2に、図1の画像符号化/復号化装置において画像符号化装置を構成する各部を太枠で明示する。
The image coding / decoding device generates a code by performing compression coding processing by intraframe coding processing on the first input image, and predictive coding using a reference image for the next input image Coding apparatus (an example of coding means) that performs compression coding processing by processing, and an image decoding apparatus that performs decoding processing on the generated code and restores the input image data before coding (An example of decoding means) configured to record a generated code of the image encoding device and to be equipped with a recording medium capable of reproducing the code recorded from the image decoding device. Note that the configurations of the image encoding device and the image decoding device partially overlap.
[Image encoding device]
In FIG. 2, each part which comprises an image coding apparatus in the image coding / decoding apparatus of FIG.

図2に示すように、画像符号化装置は、入力画像バッファ101、フレーム内/間符号化判定部102、動きベクトル検出部103、動き探索用バッファ104、予測誤差画像格納部105、DCT処理部106、量子化処理部107、可変長符号化部108、逆量子化処理部110、逆DCT処理部111、参照画像生成部112、記録媒体空き容量検知部120、および記録媒体制御処理部130により構成されている。   As shown in FIG. 2, the image encoding apparatus includes an input image buffer 101, an intra / interframe encoding determination unit 102, a motion vector detection unit 103, a motion search buffer 104, a prediction error image storage unit 105, and a DCT processing unit. 106, quantization processing unit 107, variable length coding unit 108, inverse quantization processing unit 110, inverse DCT processing unit 111, reference image generation unit 112, recording medium free space detection unit 120, and recording medium control processing unit 130. It is configured.

画像符号化装置を形成する前記記録媒体制御処理部130は、符号入出力部131、動き探索範囲データ読出部132、参照画像出力部133、符号化開始/停止制御部134により構成されている。   The recording medium control processing unit 130 forming the image encoding device includes a code input / output unit 131, a motion search range data reading unit 132, a reference image output unit 133, and an encoding start / stop control unit 134.

また記録媒体150はメモリ制御部151、記録領域152により構成されている。
まず、画像符号化装置の各部の機能を説明する。
(入力画像バッファ)
入力画像バッファ101は、画像符号化/復号化装置の外部装置(たとえば、固体撮像装置等)から出力されるY/C分離処理された画像データ、具体的には輝度(Y)データ、および色差(Cr、Cb)データを一旦保持する。
(フレーム内/間符号化判定部)
フレーム内/間符号化判定部102は、入力画像バッファ101にフレームの先頭のデータが入力される時にそのフレームがi−VOPかP−VOPかを判断する。続いて、動きベクトル検出部103の処理結果や、そのマクロブロックの符号量やデータの特徴、符号をデコードする規格にあわせるための制約等により、入力画像バッファ101内の符号化対象となったマクロブロック(MB)に対してINTRA符号化処理を行うかINTER符号化処理を行うかを判定する。なお、記録媒体空き容量検知部120よりフレーム内符号化処理固定命令を入力すると、INTRA符号化処理を行うことに固定する。
(動きベクトル検出部)
動きベクトル検出部103は、フレーム内/間符号化判定部102により処理対象フレームがi−VOPと判断された場合は、動き探索用バッファ104内にある参照画像データと、入力画像バッファ内にある基準マクロブロックの入力画像データとを使用して、入力画像バッファのマクロブロックデータは動き探索用バッファ104内のどの位置に類似するかの位置検出と、その入力データと類似位置のデータとの差分処理を行う。検出結果のマクロブロック位置は基準マクロブロックからのズレをベクトル情報(動きベクトル)として検出される。
(動き探索用バッファ)
動き探索用バッファ104は、フレーム内/間符号化判定部102により処理対象フレームがP−VOPと判断された場合には、入力画像に対して先行するフレームの符号を復元した画像である参照画像の内部にある動き探索範囲の輝度データを格納する。一般的には、現在の符号化の対象マクロブロック位置を基準マクロブロックとすると、その基準マクロブロック位置に隣接するマクロブロックとその基準マクロブロック位置の輝度データが動き探索範囲となることが多い。
(予測誤差画像格納部)
予測誤差画像格納部105は、基本的には、動きベクトル検出部103で生成された差分データを格納する。ただし、フレーム内/間符号化判定部102においてINTRA符号化処理を行うと判定された場合は、入力画像バッファ101内にある基準マクロブロック位置の画像データを格納する。
(DCT処理部)
DCT処理部106は、入力されたマクロブロックデータに対して、DCT(Dicrete Cosine Transform:離散コサイン変換)処理を行い周波数成分に変換する(DCT変換)。
(量子化処理部)
量子化処理部117は、入力された各周波数成分データをある値(量子化パラメータ)で除算し余りを丸める(量子化)。
(可変長符号化部)
可変長符号化部108は、量子化処理部117からの出力に対し、出現確率の高い周波数成分の係数に短い符号長を割り当て、出現確率の低い周波数成分の係数に長い符号長を割り当てる処理を行い、情報量を削減した可変長符号の生成(可変長符号化)と、サイズや色差フォーマット等の動画像のヘッダ情報や動きベクトルや量子化値等の符号化情報の付加処理を行い動画像の符号生成を行う。ヘッダ情報やフレーム符号の構成、各マクロブロックラインやマクロブロック自体の可変長符号と付加情報の配列構成等は復号化するための規格に従う。
(逆量子化処理部)
逆量子化処理部110は、符号化処理の場合は、量子化処理部107において使用した量子化パラメータとそこで出力された量子化済みデータを乗算し、復号化処理の場合は、可変長復号化部109で解読された量子化パラメータとそこで復元された量子化済みデータを乗算する。
(逆DCT処理部)
逆DCT処理部111は、周波数成分データに対してDCT処理部106とは逆の処理を行い、2次元画像データ(輝度・色差データ)に変換する。
(参照画像生成部)
参照画像生成部112は、動き探索用バッファ104内にある記録媒体150の参照画像領域内の基準位置を含む隣接するマクロブロックデータ内で、基準マクロブロック位置から探索結果の動きベクトル分ずれたデータと逆DCT処理部111で生成されたデータに対して加算処理を行う。
(記録媒体空き容量検知部)
記録媒体空き容量検知部120は、符号化処理を開始する時に、記録媒体150内のメモリ制御部151の制御等を行うことにより、記録媒体150内の空き容量の検知処理と、符号化処理に必要な参照画像サイズの演算と、記録媒体150内に参照画像領域の確保の可否判断と停止命令の発行を行い、符号化処理中は、記録媒体150への符号出力量の監視と記録媒体150内の空き容量の検知処理を行い、参照画像領域を確保した状態での符号化処理続行の可否判断と、それが出来ない場合は参照画像領域の開放処理とフレーム内符号化処理固定命令の発行を行う。
The recording medium 150 includes a memory control unit 151 and a recording area 152.
First, the function of each unit of the image encoding device will be described.
(Input image buffer)
The input image buffer 101 is a Y / C separation-processed image data output from an external device (for example, a solid-state imaging device) of the image encoding / decoding device, specifically luminance (Y) data, and color difference. The (Cr, Cb) data is temporarily held.
(Intra-frame / inter-coding determination unit)
The intra / interframe coding determination unit 102 determines whether the frame is an i-VOP or a P-VOP when data at the head of the frame is input to the input image buffer 101. Subsequently, the macro to be encoded in the input image buffer 101 due to the processing result of the motion vector detection unit 103, the code amount of the macroblock, the characteristics of the data, restrictions for matching the code decoding standard, and the like. It is determined whether to perform the INTRA encoding process or the INTER encoding process for the block (MB). In addition, when an intra-frame encoding process fixing command is input from the recording medium free space detection unit 120, the INTRA encoding process is fixed.
(Motion vector detection unit)
When the intra-frame / inter-frame encoding determination unit 102 determines that the processing target frame is i-VOP, the motion vector detection unit 103 is in the reference image data in the motion search buffer 104 and the input image buffer. Using the input image data of the reference macroblock, the position detection in the motion search buffer 104 where the macroblock data of the input image buffer is similar, and the difference between the input data and the data of the similar position Process. The detected macroblock position is detected as vector information (motion vector) based on a deviation from the reference macroblock.
(Motion search buffer)
The motion search buffer 104 is a reference image that is an image obtained by restoring the code of the preceding frame with respect to the input image when the intra-frame / inter-frame encoding determination unit 102 determines that the processing target frame is P-VOP. The luminance data of the motion search range inside is stored. In general, if the current encoding target macroblock position is a reference macroblock, the macroblock adjacent to the reference macroblock position and the luminance data at the reference macroblock position often become the motion search range.
(Prediction error image storage)
The prediction error image storage unit 105 basically stores the difference data generated by the motion vector detection unit 103. However, if the intra-frame / inter-frame coding determination unit 102 determines that the INTRA encoding process is to be performed, the image data at the reference macroblock position in the input image buffer 101 is stored.
(DCT processing unit)
The DCT processing unit 106 performs DCT (Dicrete Cosine Transform) processing on the input macroblock data and converts it into frequency components (DCT conversion).
(Quantization processing unit)
The quantization processing unit 117 divides each input frequency component data by a certain value (quantization parameter) and rounds the remainder (quantization).
(Variable length coding unit)
The variable length coding unit 108 assigns a short code length to the frequency component coefficient having a high appearance probability and assigns a long code length to the frequency component coefficient having a low appearance probability to the output from the quantization processing unit 117. Perform variable-length code generation (variable-length encoding) with a reduced amount of information, and add moving image header information such as size and color difference format, and encoding information such as motion vectors and quantization values Code generation is performed. The configuration of the header information and the frame code, the variable length code of each macroblock line and the macroblock itself, the arrangement configuration of the additional information, and the like are in accordance with the standard for decoding.
(Inverse quantization processing unit)
In the case of encoding processing, the inverse quantization processing unit 110 multiplies the quantization parameter used in the quantization processing unit 107 by the quantized data output therefrom, and in the case of decoding processing, variable length decoding. The quantization parameter decoded by the unit 109 is multiplied by the restored quantized data.
(Inverse DCT processing unit)
The inverse DCT processing unit 111 performs processing opposite to that of the DCT processing unit 106 on the frequency component data, and converts the frequency component data into two-dimensional image data (luminance / color difference data).
(Reference image generator)
The reference image generation unit 112 is data that is shifted from the reference macroblock position by the motion vector of the search result in the adjacent macroblock data including the reference position in the reference image area of the recording medium 150 in the motion search buffer 104. The addition processing is performed on the data generated by the inverse DCT processing unit 111.
(Recording medium free space detector)
When starting the encoding process, the recording medium free space detecting unit 120 controls the memory control unit 151 in the recording medium 150 to detect the free space in the recording medium 150 and the encoding process. A necessary reference image size is calculated, whether or not a reference image area can be secured in the recording medium 150, and a stop command is issued. During the encoding process, the amount of code output to the recording medium 150 is monitored and the recording medium 150 is recorded. Detects whether or not to continue the encoding process with the reference image area secured, and if it is not possible, releases the reference image area and issues an intraframe encoding fixed instruction. I do.

次に、記録媒体制御処理部130の内部について説明する。
(符号入出力部)
符号入出力部131は、生成した符号を格納したいアドレス並びにその生成符号の符号サイズを記録媒体150内のメモリ制御部151に対し指定し、指定したサイズ分の符号を出力する。このような処理を行うことにより、符号データを記録媒体150内の記憶領域に格納する。
(動き探索範囲データ読出部)
動き探索範囲データ読出部132は、輝度データに対する符号化処理を行う場合は、その符号化対象マクロブロックの動き検出処理を行うために必要な複数マクロブロック分の参照画像輝度データの領域を判断し、記録媒体150内のメモリ制御部151を制御することによりその参照画像輝度データを記録媒体150から読み出し、動き探索用バッファ104に出力する。色差データに対する符号化処理を行う場合は、基準位置から動きベクトル分ずれた1マクロブロック分の色差データを動き探索用バッファ104に出力する。復号化の場合は、基準位置から動きベクトル分ずれた1マクロブロック分の輝度または色差データを動き探索用バッファ104に出力する。
(参照画像出力部)
参照画像出力部133は、符号化処理及び復号化処理時に必要な参照画像領域を、記録媒体150内のメモリ制御部151を制御し、記録媒体150内の記録領域152に参照画像領域を確保する処理、参照画像生成部112から出力されたデータを記録媒体150内に確保した参照画像領域内の基準位置に格納する処理を行う。複数バンク分の参照画像領域を確保しての復号化処理時は、どのバンクに出力するかの判断も行う。なお、記録媒体空き容量検知部120より参照画像領域の開放処理を入力すると、生成符号の格納を停止する。
(符号化開始/停止制御部)
符号化開始/停止制御部134は、符号化処理に関わる各処理ブロックに対して開始、停止の制御を行う。
「動画像符号化方法」
以降、動画像符号化の方法について説明する。
Next, the inside of the recording medium control processing unit 130 will be described.
(Sign input / output unit)
The code input / output unit 131 specifies the address where the generated code is to be stored and the code size of the generated code to the memory control unit 151 in the recording medium 150, and outputs the code for the specified size. By performing such processing, the code data is stored in the storage area in the recording medium 150.
(Motion search range data reading unit)
When performing the coding process on the luminance data, the motion search range data reading unit 132 determines a reference image luminance data area for a plurality of macroblocks necessary for performing the motion detection process on the coding target macroblock. By controlling the memory control unit 151 in the recording medium 150, the reference image luminance data is read from the recording medium 150 and output to the motion search buffer 104. When encoding processing for color difference data is performed, the color difference data for one macroblock shifted by the motion vector from the reference position is output to the motion search buffer 104. In the case of decoding, the luminance or chrominance data for one macro block shifted by the motion vector from the reference position is output to the motion search buffer 104.
(Reference image output unit)
The reference image output unit 133 controls the reference image area necessary for the encoding process and the decoding process by the memory control unit 151 in the recording medium 150, and secures the reference image area in the recording area 152 in the recording medium 150. Processing is performed to store the data output from the reference image generation unit 112 at the reference position in the reference image area secured in the recording medium 150. At the time of decoding processing while securing reference image areas for a plurality of banks, it is also determined which bank to output. When the reference image area releasing process is input from the recording medium free space detecting unit 120, the storage of the generated code is stopped.
(Encoding start / stop control unit)
The encoding start / stop control unit 134 controls start and stop for each processing block related to the encoding process.
"Video coding method"
Hereinafter, a moving image encoding method will be described.

動画像の符号化処理は、図3に示すように、符号化対象となる入力画像を複数の単位ブロックに分割し、この二次元の単位ブロックであるマクロブロック(MB)の単位で圧縮符号化処理を行う。1マクロブロックは、上述したように輝度データ(Yデータ)と2種類の色差データ(Cbデータ、Crデータ)で構成される。1マクロブロックの構成は、一般的には符号の復号化互換を取るために規定されており、例えばMPEG-4での4:2:0の色差フォーマットでは図のように輝度データは16×16ビット、CbデータとCrデータは8×8ビットの正方形のデータとしている。   As shown in FIG. 3, the moving image encoding process divides an input image to be encoded into a plurality of unit blocks, and performs compression encoding in units of macro blocks (MB) which are two-dimensional unit blocks. Process. As described above, one macro block is composed of luminance data (Y data) and two types of color difference data (Cb data, Cr data). The configuration of one macroblock is generally defined in order to achieve decoding compatibility of codes. For example, in the 4: 2: 0 color difference format in MPEG-4, luminance data is 16 × 16 as shown in the figure. Bit, Cb data, and Cr data are 8 × 8 bit square data.

1フレームに対する符号化処理は、左上のマクロブロックを先頭として順次走査の順番に1マクロブロックずつ符号化処理が行われる。
1マクロブロックの可変長符号化処理と参照画像を生成する処理は、最初に輝度データを8×8ビットで4分割したサイズの輝度ブロックを単位として4回を行った後、8×8ビットのCbブロック・8×8ビットのCrブロックに対し1回ずつであり、ブロック番号順に行われる。
The encoding process for one frame is performed one macroblock at a time in the order of sequential scanning starting from the top left macroblock.
The variable-length encoding process of one macroblock and the process of generating a reference image are performed four times in units of a luminance block having a size obtained by dividing luminance data into four by 8 × 8 bits, and then 8 × 8 bits. This is performed once for each Cb block and 8 × 8-bit Cr block, and is performed in the order of the block numbers.

通常、参照画像領域は輝度、Cb、Crの参照画像データは1フレームずつ別々に確保される。
量子化パラメータは、通常1マクロブロックに対して1つ付加される。また、フレーム間符号化の場合に発生する動きベクトルは、通常は1マクロブロックに対して1つ付加される。
Normally, the reference image area is secured separately for each frame of luminance, Cb, and Cr reference image data.
One quantization parameter is usually added to one macroblock. In addition, one motion vector generated in the case of interframe coding is normally added to one macroblock.

上記の符号方法で、動画符号は、動画像の1フレームのサイズやマクロブロック数や色差のフォーマット情報といったヘッダ情報を先頭に、1フレーム単位で一般的には時系列で配列されている。各フレームについてもi−VOPかP−VOPかの情報等を含むフレームヘッダ情報とそのフレームを構成する各マクロブロックの符号が先頭から順番に配列されている。そして、1マクロブロックの符号は、フレーム内符号化が行われたマクロブロック(INTRA MB)かフレーム間符号化が行われたマクロブロック(INTER MB)かのINTRA/INTER情報、動きベクトル、量子化パラメータ、輝度が4ブロックでCbが1ブロックでCrが1ブロックで構成された1マクロブロックの可変長符号データ等を含む。   In the above coding method, moving image codes are generally arranged in time series in units of one frame starting from header information such as the size of one frame of a moving image, the number of macroblocks, and format information of color difference. For each frame, frame header information including information on i-VOP or P-VOP and the code of each macroblock constituting the frame are arranged in order from the top. The code of one macroblock includes the INTRA / INTER information, the motion vector, the quantization of the macroblock (INTRA MB) subjected to intraframe coding or the macroblock (INTER MB) subjected to interframe coding. This includes variable-length code data of one macro block in which parameters and luminance are 4 blocks, Cb is 1 block, and Cr is 1 block.

上記画像符号化装置の構成による動作を説明する。上記のように、符号化対象のデータは、1マクロブロックの輝度・色差ブロックデータ単位で処理を行う。1マクロブロックの符号化順も輝度4ブロック、色差2ブロックの順で行う。   An operation according to the configuration of the image encoding device will be described. As described above, the data to be encoded is processed in units of luminance / chrominance block data of one macroblock. The encoding order of one macroblock is also performed in the order of 4 luminance blocks and 2 chrominance blocks.

まず、フレーム内/間符号化判定部102は、入力されるフレームの先頭のデータが入力される時にそのフレームがi−VOPかP−VOPかを判断する。
i−VOPと判断した場合は、そのフレームの輝度・色差データマクロブロックデータに対してフレーム内符号化が行われるため、入力バッファ101内のブロックデータは、予測誤差画像格納部105に格納される。
First, the intra / interframe coding determination unit 102 determines whether the frame is i-VOP or P-VOP when the head data of the input frame is input.
If the i-VOP is determined, intra-frame coding is performed on the luminance / color difference data macroblock data of the frame, so that the block data in the input buffer 101 is stored in the prediction error image storage unit 105. .

P−VOPと判断した場合は、動き探索範囲データ読出部132が、対象マクロブロック付近の輝度データを先行する輝度の参照画像領域から読み出し、動き探索用バッファ104に格納する。   When it is determined as P-VOP, the motion search range data reading unit 132 reads the luminance data in the vicinity of the target macroblock from the preceding luminance reference image region and stores it in the motion search buffer 104.

入力画像バッファ101に1マクロブロック分の輝度データが入力されると、動きベクトル検出部103は、入力画像バッファ101内の対象マクロブロックの画像が、動き探索用バッファ104内の類似している箇所を探索する。探索が終わるとその動きベクトルの探索結果をフレーム内/間符号化判定部102が参照し、他の判断材料も加味してそのマクロブロックに対してINTER符号化を行うかINTRA符号化を行うかを判断する。INTRA符号化と判断した場合は、そのマクロブロックの輝度・色差ブロックデータに対してフレーム内符号化が行われるため、入力バッファ101内のブロックデータは予測誤差画像格納部105に格納される。   When luminance data for one macroblock is input to the input image buffer 101, the motion vector detection unit 103 causes the image of the target macroblock in the input image buffer 101 to be similar in the motion search buffer 104. Explore. When the search is finished, the intra-frame / inter-frame encoding determination unit 102 refers to the search result of the motion vector, and whether to perform the INTER encoding or the INTRA encoding for the macroblock in consideration of other determination materials Judging. When it is determined that the INTRA encoding is performed, intra-frame encoding is performed on the luminance / chrominance block data of the macroblock, and thus the block data in the input buffer 101 is stored in the prediction error image storage unit 105.

INTER符号化と判断した場合は、入力マクロブロックと探索結果の位置の動き探索用バッファ104の1マクロブロック分との1ブロック分の差分データを予測画像格納部105に格納する。その1ブロック分の符号化および参照画像の格納が終了すると1ブロック分ずつ輝度4ブロック分の符号化および参照画像の格納までの処理が終了するまで繰り返す。色差データに対しては、動き探索範囲データ読出部132が、輝度の動き探索結果の動きベクトル分のズレに相当する位置から1ブロック分の色差データを色差の参照画像領域から読み出し、動き探索用バッファ104に格納し、入力画像バッファ101内の符号化対象の1ブロック分の色差データとの差分を演算しその結果を予測誤差画像格納部105へ格納する。   If it is determined to be INTER coding, the difference data for one block between the input macroblock and one macroblock of the motion search buffer 104 at the position of the search result is stored in the predicted image storage unit 105. When the encoding for one block and the storage of the reference image are completed, the process is repeated for each block until the processing for encoding and storing the reference image for four blocks of luminance is completed. For the color difference data, the motion search range data reading unit 132 reads the color difference data for one block from the position corresponding to the shift of the motion vector of the luminance motion search result from the reference image area of the color difference for motion search. The data is stored in the buffer 104, the difference from the color difference data for one block to be encoded in the input image buffer 101 is calculated, and the result is stored in the prediction error image storage unit 105.

予測誤差画像格納部105に処理対象ブロック分のデータが蓄積されると、DCT処理部106は、DCT処理を行い周波数成分に変換する。
DCT処理部106が1ブロック分の処理を終えると、量子化処理部107は、量子化処理を行う。量子化処理が終わると、その結果は、可変長符号化処理部108と逆量子化処理部110へ入力される。
When data for the processing target block is accumulated in the prediction error image storage unit 105, the DCT processing unit 106 performs DCT processing and converts it into frequency components.
When the DCT processing unit 106 finishes processing for one block, the quantization processing unit 107 performs quantization processing. When the quantization process is completed, the result is input to the variable length coding processing unit 108 and the inverse quantization processing unit 110.

可変長符号化処理部108は、ハフマン符号化処理等を行うことで冗長データを取り除き符号を生成する。また、そのマクロブロックで使用した量子化値、動きベクトル、INTERマクロブロックかINTRAマクロブロックかの情報等も復号化の規程に従って付加する。   The variable length coding processing unit 108 removes redundant data and generates a code by performing Huffman coding processing or the like. Also, the quantization value, motion vector, information on INTER macroblock or INTRA macroblock, etc. used in the macroblock are added according to the decoding rules.

符号化が終わると、符号入出力部131は、生成した符号を格納したいアドレス並びにその生成符号の符号サイズを記録媒体150内のメモリ制御部151に対し指定し、指定したサイズ分の符号を出力する。   When the encoding is completed, the code input / output unit 131 specifies the address where the generated code is to be stored and the code size of the generated code to the memory control unit 151 in the recording medium 150, and outputs the code for the specified size. To do.

量子化処理部107の1ブロック分の量子化処理が終了すると、逆量子化処理部110が読み出し、逆量子化処理を行い、生成された量子化前ブロックデータを逆DCT処理部111へ出力する。逆DCT処理部111は、量子化前ブロックデータの入力があると逆DCT処理を行う。   When the quantization processing for one block of the quantization processing unit 107 is completed, the inverse quantization processing unit 110 reads out, performs the inverse quantization processing, and outputs the generated pre-quantization block data to the inverse DCT processing unit 111. . The inverse DCT processing unit 111 performs inverse DCT processing when there is input of block data before quantization.

ブロックデータが逆DCT処理部111に生成されると、参照画像生成部112は、そのマクロブロックがINTER符号化されたマクロブロックである場合は、動き探索用バッファ104内のブロックのデータと逆DCT処理部111のブロックデータを加算した結果を参照画像出力部133に出力し、INTRA符号化されたマクロブロックである場合は、逆DCT処理部111のブロックデータを、参照画像出力部133に出力する。なお、輝度ブロックの場合のみ、参照画像生成部112の入力対象となるデータは、動きベクトル検出部103の探索結果の動きベクトル分ずれた位置のブロックを、動き探索用バッファ104内から読み出す。   When the block data is generated by the inverse DCT processing unit 111, the reference image generation unit 112, when the macro block is an INTER-encoded macro block, performs the inverse DCT with the block data in the motion search buffer 104. The result of adding the block data of the processing unit 111 is output to the reference image output unit 133. If the block is an INTRA-encoded macroblock, the block data of the inverse DCT processing unit 111 is output to the reference image output unit 133. . Only in the case of the luminance block, as the data to be input to the reference image generation unit 112, the block at the position shifted by the motion vector of the search result of the motion vector detection unit 103 is read from the motion search buffer 104.

参照画像出力部133は、参照画像生成部112からのブロックデータを入力すると、そのデータを現在処理対象となっているブロック位置に対応する参照画像領域内のブロック位置に格納する。   When the reference image output unit 133 receives the block data from the reference image generation unit 112, the reference image output unit 133 stores the data in the block position in the reference image area corresponding to the block position currently being processed.

また記録媒体空き容量検知部120は、常に符号入出力部131の出力符号量や記録媒体150の空き容量を監視し、符号化開始時に記録媒体150から空き容量を取得し、参照画像領域が確保できない場合と、符号化処理中は参照画像領域を格納した状態で符号する空き容量がなくなった場合は、符号化開始・停止制御部134に停止命令を発行し、符号の格納を停止し、確保していた参照画像領域の処理を行う。   The recording medium free space detection unit 120 always monitors the output code amount of the code input / output unit 131 and the free space of the recording medium 150, acquires the free space from the recording medium 150 at the start of encoding, and secures a reference image area. If there is no free space for encoding while the reference image area is stored during the encoding process, a stop command is issued to the encoding start / stop control unit 134 to stop storing the code and secure it. The reference image area that has been processed is processed.

なお、図4のように、符号化処理中は参照画像領域を格納した状態で符号する空き容量がなくなった場合に、フレーム内/間符号化にフレーム内符号化固定命令の発行と、参照画像領域の解放処理を行う機能をもつことにより、参照画像領域を確保した状態で符号格納ができなくなっても(記録媒体内に符号格納に必要な容量がなくなっても)、符号化処理中に参照画像領域を必要としないフレーム内符号化処理方法に切り替え、記録媒体150内に参照画像領域の空き領域があるとき、この空き領域に符号化処理を続行することができ、記録媒体150を利用して最大限の符号を格納することが可能となり、符号化を行う時間がその分長くなる。(請求項7)
尚、通常は符号化装置内部にたとえばすでに参照画像1面分の参照画像バンク容量のメモリを具備している装置に対しても、外部装置により、2面のバンクが必要になった場合は、1面分の参照画像領域を記録媒体内に設けて、2面分の参照画像領域を確保した符号化処理を行うことも可能である。
[画像復号化装置]
図5に、図1において画像復号化装置を構成する各部を太枠で明示する。
Note that, as shown in FIG. 4, when there is no free space for encoding while the reference image area is stored during the encoding process, an intra-frame encoding fixed instruction is issued for intra-frame / inter-frame encoding, and the reference image By having a function to release the area, even if the code cannot be stored with the reference image area secured (even if the recording medium has no capacity necessary for code storage), it can be referenced during the encoding process. Switching to an intra-frame encoding method that does not require an image area, and when there is an empty area of the reference image area in the recording medium 150, the encoding process can be continued in this empty area, and the recording medium 150 is used. Thus, it is possible to store the maximum number of codes, and the time for performing the encoding is increased accordingly. (Claim 7)
Normally, even when an encoding device is already equipped with a memory having a reference image bank capacity for one reference image, for example, when an external device requires two banks, It is also possible to perform a coding process in which a reference image area for one surface is provided in a recording medium and a reference image area for two surfaces is secured.
[Image decoding device]
FIG. 5 clearly shows each part constituting the image decoding apparatus in FIG. 1 with a thick frame.

図5に示すように、画像復号化装置は、動き探索用バッファ104、可変長復号化部109、逆量子化処理部110、逆DCT処理部111、参照画像生成部112、記録媒体空き容量検知部120、記録媒体制御処理部130、バンク状態出力部121、確保済みバンク数出力部122、バンク確保要求入力部123、参照画像出力要求入力部124、および出力部125により構成されている。   As shown in FIG. 5, the image decoding apparatus includes a motion search buffer 104, a variable length decoding unit 109, an inverse quantization processing unit 110, an inverse DCT processing unit 111, a reference image generation unit 112, and a recording medium free space detection. Unit 120, recording medium control processing unit 130, bank state output unit 121, reserved bank number output unit 122, bank reservation request input unit 123, reference image output request input unit 124, and output unit 125.

復号化処理に伴う前記記録媒体制御処理部130は、符号入出力部131、動き探索範囲データ読出部132、参照画像出力部133、復号化開始/停止制御部135、復号化処理進捗管理部136、および参照画像外部出力部139により構成されている。   The recording medium control processing unit 130 accompanying the decoding process includes a code input / output unit 131, a motion search range data reading unit 132, a reference image output unit 133, a decoding start / stop control unit 135, and a decoding processing progress management unit 136. , And a reference image external output unit 139.

記録媒体150は、メモリ制御部151、および記録領域152により構成されている。
まず、画像復号化装置の各部の機能を説明する。
(動き探索用バッファ)
動き探索用バッファ104は、可変長復号化処理において、処理対象マクロブロックがINTER符号化であった場合は、動き探索範囲読出し部132から読出したブロックデータを格納する。
(可変長復号化部)
可変長復号化部109は、復号化するための規格に従って符号化が行われた符号から、ヘッダ情報(復号化サイズや色差フォーマット情報等)、マクロブロックの動きベクトルや量子化値や量子化済みデータ等の解読・復元を行う。
(逆量子化処理部)
逆量子化処理部110は、復号化処理の場合は、可変長復号化部109で解読された量子化パラメータとそこで復元された量子化済みデータを乗算する。
(逆DCT処理部)
逆DCT処理部111は、周波数成分データに対してDCT処理部106とは逆の処理を行い、2次元画像データ(輝度・色差データ)に変換する。
(参照画像生成部)
参照画像生成部112は、動き探索用バッファ104内にある処理対象フレームより時間的に先行する参照画像の領域内の基準マクロブロック位置から動きベクトル分ずれたデータと逆DCT処理部111で生成されたデータに対して加算処理を行う。
(記録媒体空き容量検知部)
記録媒体空き容量検知部120は、復号化処理時においては、記録媒体150内の空き容量の取得処理と復号化開始時に符号の復号化サイズ情報から復号化処理に必要な参照画像領域の容量の判定処理を行う。
(バンク確保要求入力部)
バンク確保要求入力部123は、復号化処理時に記録媒体150内に確保したい参照画像領域のフレーム数(バンク数)を入力する。
(参照画像出力要求入力部)
参照画像出力要求入力部124は、出力可能になった参照画像を選択的にバンクに出力要求できる入力装置であり、復号化処理時に外部に出力したい参照画像データバンク番号を入力する。
(確保済みバンク数出力部)
確保済みバンク数出力部122は、確保できた参照画像バンク数を外部に通知する出力装置であり、復号化装置内で確保できた参照画像のバンク数を外部に出力する。
(バンク状態出力部)
バンク状態出力部121は、各々のバンクに格納されるべき参照画像状態を外部に通知する出力装置であり、復号化処理進捗管理部136で逐次判定している出力可能・空き・処理中といったバンクの情報、出力可能バンクの出力順番、各バンクに生成された参照画像のタイミング情報を出力する。
The recording medium 150 includes a memory control unit 151 and a recording area 152.
First, the function of each unit of the image decoding apparatus will be described.
(Motion search buffer)
In the variable length decoding process, the motion search buffer 104 stores the block data read from the motion search range reading unit 132 when the processing target macroblock is INTER coding.
(Variable length decoding unit)
The variable length decoding unit 109 generates header information (decoding size, color difference format information, etc.), a macroblock motion vector, a quantization value, and a quantized code from a code that has been encoded in accordance with a decoding standard. Decrypt and restore data.
(Inverse quantization processing unit)
In the case of decoding processing, the inverse quantization processing unit 110 multiplies the quantization parameter decoded by the variable length decoding unit 109 and the quantized data restored there.
(Inverse DCT processing unit)
The inverse DCT processing unit 111 performs processing opposite to that of the DCT processing unit 106 on the frequency component data, and converts the frequency component data into two-dimensional image data (luminance / color difference data).
(Reference image generator)
The reference image generation unit 112 is generated by the inverse DCT processing unit 111 with data shifted by the motion vector from the reference macroblock position in the reference image area temporally preceding the processing target frame in the motion search buffer 104. Addition processing is performed on the received data.
(Recording medium free space detector)
In the decoding process, the recording medium free space detection unit 120 obtains the capacity of the reference image area necessary for the decoding process from the acquisition process of the free space in the recording medium 150 and the decoding size information of the code at the start of decoding. Judgment processing is performed.
(Bank securing request input part)
The bank reservation request input unit 123 inputs the number of frames (the number of banks) of the reference image area to be reserved in the recording medium 150 during the decoding process.
(Reference image output request input part)
The reference image output request input unit 124 is an input device that can selectively request a bank to output a reference image that can be output. The reference image output request input unit 124 inputs a reference image data bank number to be output to the outside during the decoding process.
(Secured bank number output section)
The reserved bank number output unit 122 is an output device that notifies the number of secured reference image banks to the outside, and outputs the number of reference image banks secured in the decoding device to the outside.
(Bank status output section)
The bank status output unit 121 is an output device that notifies the reference image status to be stored in each bank to the outside. The bank status that is sequentially determined by the decoding process progress management unit 136, such as output enabled / empty / processing in progress Information, the output order of the banks that can be output, and the timing information of the reference image generated in each bank.

次に、記録媒体制御処理部130の内部について説明する。
(符号入出力部)
符号入出力部131は、復号化処理時は、復号化対象の符号が格納されている先頭アドレス並びにその符号の符号サイズを取得し、可変長復号化部108に符号データを逐次出力するために、記録媒体150内のメモリ制御部151に対し読出しアドレスとサイズの制御を繰り返す。
(動き探索範囲読出し部)
動き探索範囲データ読出部132は、復号化のとき、INTER符号化のマクロブロックであった場合は、記録媒体150内の参照画像領域における基準位置から動きベクトル分ずれた1マクロブロック分の輝度または色差データを動き探索用バッファ104に出力する。
(参照画像出力部)
参照画像出力部133は、復号化処理開始時に必要な参照画像領域を、記録媒体150内のメモリ制御部151を制御し、記録媒体150内の記録領域152に参照画像領域を確保する処理、復号化処理中は参照画像生成部112から出力されたブロックデータを記録媒体150内に確保したどの参照画像領域内の基準位置に格納するかの判断とメモリ制御部に対しアドレスとサイズの制御を行い格納の処理を行う。複数バンク分の参照画像領域を確保しての復号化処理時は、復号化処理進捗管理部136のバンク状況を参照し、どのバンクに出力するかの判断も行う。記録領域内に参照画像領域に空きバンクがある限り、参照画像データの出力処理を行う。空きバンクが無い場合は出力処理を停止し、復号化処理進捗管理部136に対し復号化処理全体を停止するために一時停止命令を発行する。
(復号化開始/停止制御部)
復号化開始/停止制御部135は、復号化処理を構成する各処理ブロックに対して開始・停止の制御を行う。復号化開始時は、記録媒体150の空き容量と記録媒体150内の復号化対象の符号の復号画像サイズ情報を考慮して、バンク確保要求入力部123の参照画像確保要求バンク数分の参照画像領域を確保の可否判断や確保できない場合は要求されたバンク数以下で確保可能な最大の参照画像領域容量の演算と確保の可否判断を行う。確保可能な場合は参照画像データ部へ確保のための制御を行い復号化処理の開始を行い、確保不可能と判断した場合は復号化処理の停止を行う。
(復号化処理進捗管理部)
復号化処理進捗管理部136は、復号化処理時に参照画像生成部112を監視し、記録媒体150内のどの参照画像領域のどの部分の参照画像マクロブロックまで出力という情報と外部要求を監視することでどのフレームまで外部に出力されたかという情報を把握し、現在どの参照画像バンクが出力可能でどこまでが出力済みかという状況を判断し、出力可能バンクの出力順番を判断し、その状態をバンク状態出力部121に出力する。また、参照画像領域内に参照画像出力済みで新たな参照画像の書き込みが可能なバンク(以降、空きバンク)が無い場合は、参照画像出力部133の動作により空きバンクが発生するまで、復号化処理全体に対し一時停止処理を行う。
(参照画像外部出力部)
参照画像外部出力部133は、記録媒体150内のメモリ制御部151を制御し、記録媒体150内の参照画像データの出力を参照画像出力要求入力部124からのバンク指定と出力要求に応じて行う。また、出力が完了した参照画像バンクを復号化処理進捗管理部136に出力する。
「画像復号化装置の動作」
画像復号化装置の動作について説明する。なお、動画復号化装置の動作説明の際の記録媒体150上の符号については上記符号化処理と同じ構成であることを前提とする。
Next, the inside of the recording medium control processing unit 130 will be described.
(Sign input / output unit)
In the decoding process, the code input / output unit 131 obtains the head address where the decoding target code is stored and the code size of the code, and sequentially outputs the code data to the variable length decoding unit 108. The control of the read address and size is repeated for the memory control unit 151 in the recording medium 150.
(Motion search range reading unit)
The motion search range data reading unit 132, when decoding, is an INTER-encoded macroblock, the luminance of one macroblock shifted by the motion vector from the reference position in the reference image area in the recording medium 150 or The color difference data is output to the motion search buffer 104.
(Reference image output unit)
The reference image output unit 133 controls the memory control unit 151 in the recording medium 150 for the reference image area required at the start of the decoding process, and secures the reference image area in the recording area 152 in the recording medium 150. During the conversion processing, the block data output from the reference image generation unit 112 is determined in which reference image area secured in the recording medium 150 is stored in the reference position, and the memory control unit is controlled in address and size. Perform storage processing. At the time of decoding processing while securing reference image areas for a plurality of banks, the bank status of the decoding processing progress management unit 136 is referred to and a determination is made as to which bank to output. As long as there is an empty bank in the reference image area in the recording area, the reference image data is output. When there is no empty bank, the output process is stopped, and a pause instruction is issued to the decoding process progress management unit 136 in order to stop the entire decoding process.
(Decryption start / stop control unit)
The decoding start / stop control unit 135 performs start / stop control for each processing block constituting the decoding process. At the start of decoding, taking into account the free space of the recording medium 150 and the decoded image size information of the decoding target code in the recording medium 150, reference images for the number of reference image securing request banks in the bank securing request input unit 123 If the area cannot be secured, or if the area cannot be secured, the maximum reference image area capacity that can be secured below the requested number of banks is calculated and the availability is secured. If it can be secured, control for securing the reference image data part is performed to start the decoding process, and if it is determined that securing is impossible, the decoding process is stopped.
(Decryption progress management unit)
The decoding process progress management unit 136 monitors the reference image generation unit 112 at the time of the decoding process, and monitors information and an external request for output to which part of the reference image macroblock in which reference image area in the recording medium 150. To know the frame up to which frame was output to the outside, determine which reference image bank is currently available and how far it has been output, determine the output order of the banks that can be output, and determine the status of the bank Output to the output unit 121. If there is no bank (hereinafter referred to as an empty bank) in which a reference image has been output and a new reference image can be written in the reference image area, decoding is performed until an empty bank is generated by the operation of the reference image output unit 133. A pause process is performed for the entire process.
(Reference image external output unit)
The reference image external output unit 133 controls the memory control unit 151 in the recording medium 150, and outputs reference image data in the recording medium 150 in accordance with the bank designation and output request from the reference image output request input unit 124. . In addition, the reference image bank for which the output has been completed is output to the decoding processing progress management unit 136.
"Operation of image decoding device"
The operation of the image decoding apparatus will be described. It is assumed that the codes on the recording medium 150 when explaining the operation of the moving picture decoding apparatus have the same configuration as the above encoding process.

まず、復号化開始/停止制御部135が外部等から記録媒体150内にある符号に対して復号化の要求を受けると、メモリ制御部151に対し復号化要求を受けた符号のアドレスやサイズ等を取得し、その情報を符号入出力部131に出力する。   First, when the decoding start / stop control unit 135 receives a decoding request for a code in the recording medium 150 from the outside or the like, the address, size, etc. of the code that has received the decoding request from the memory control unit 151 And outputs the information to the code input / output unit 131.

また、記録媒体空き容量検知部120は復号化処理開始時に記録媒体150の空き容量を取得する。
符号入出力部131はメモリ制御部151からのアドレスやサイズに従って先頭アドレスからサイズ分の符号の読出し、可変長復号化部109に出力する。
In addition, the recording medium free space detection unit 120 acquires the free space of the recording medium 150 at the start of the decoding process.
The code input / output unit 131 reads a code corresponding to the size from the head address in accordance with the address and size from the memory control unit 151 and outputs the code to the variable length decoding unit 109.

可変長復号化部109は入力された符号を逐次復号化する。
ただし、復号化開始時は、符号全体に関するヘッダ情報内の復号化した際のサイズ情報と輝度の色差データフォーマット等の情報の解読結果を記録媒体空き容量検知部120に出力する。
The variable length decoding unit 109 sequentially decodes the input code.
However, when decoding is started, the decoding result of information such as size information and luminance color difference data format in the header information regarding the entire code is output to the recording medium free space detecting unit 120.

記録媒体空き容量検知部120はサイズ情報と色差フォーマット等の情報から復号化に必要な参照画像容量を演算し、すでに取得している記録媒体空き容量を越えていないかどうかを判断する。越えていない場合は参照画像出力部133に対し確保する参照画像容量と先頭アドレスを出力し、参照画像出力部133は入力に応じた参照画像領域を記録媒体150内に確保する。このように、復号化処理時に必要となる参照画像を格納するための参照画像領域が記憶媒体内に確保されることにより、参照画像メモリを符号化復号化装置内に持たなくて済み、システムコンパクト化およびコストダウンが図れる。(請求項1)
越えている場合は、復号化開始/停止制御部135に停止命令を出力し復号化処理の停止を行う。
The recording medium free space detection unit 120 calculates a reference image capacity necessary for decoding from information such as the size information and the color difference format, and determines whether the recording medium free space already acquired is not exceeded. If not, the reference image capacity and head address to be secured are output to the reference image output unit 133, and the reference image output unit 133 secures a reference image area corresponding to the input in the recording medium 150. As described above, since the reference image area for storing the reference image necessary for the decoding process is secured in the storage medium, it is not necessary to have the reference image memory in the encoding / decoding device. And cost reduction. (Claim 1)
If exceeded, a stop command is output to the decoding start / stop control unit 135 to stop the decoding process.

なお、図6のように、記録媒体空き容量検知部120が上記処理を終えた時点で復号化開始/停止制御部135に対し、参照画像1バンク分の容量と空き容量と先頭アドレスを出力することで、復号化開始/停止制御部135が、記録媒体空き容量検知部120の1バンク分の参照画像容量にバンク確保要求入力部123から取得した参照画像のバンク数N(2以上の整数)を乗じた容量と、空き容量とを比較し、要求バンク分の参照画像領域の確保が可能か否かを判定し、確保可能な場合は各バンクのサイズと先頭アドレス情報を参照画像出力部133に出力し、記録媒体150に要求バンク分の参照画像領域を確保する手段を設けることで、出力可能なNフレーム分の参照画像を復号化装置内に待機しておくことが可能になり、外部からの出力タイミングに柔軟に対応が可能となる(例えば、外では音声同時化し出力するシステムがある。その同時化処理のために参照画像を待たせたい場合がある)。(請求項2)
さらに図7のように、記録媒体150に要求バンク数分の容量を確保不可能な場合、空き容量に対して確保可能な最大のバンク数を演算してその最大のバンク数分を確保できるように処理を行うことにより、要求バンク数分確保できない場合でも、現在の空き容量で確保可能な最大限のバンク数を確保することが可能となり、外部の表示装置等で出来る限り出力可能な多数フレーム分の参照画像を復号化装置内に待機しておきたい場合に、外部装置側で判断する処理を行う必要が無くなり、“再生処理の起動時間”を短縮できる。(請求項3)
また、復号化開始/停止制御部135が、確保した参照画像のバンク数を出力する確保済みバンク数出力部122を設けることにより、復号化装置内で確保できた参照画像のバンク数が判断でき、出力準備が可能な画像を最大何フレーム分まで待機させておくことが可能かを把握できるため、図8に示すように、例えば、そのときに1フレーム分のデータを出力するのに要する処理時間と1フレーム分の参照画像を生成するのに必要な処理時間を外部で把握しておくことで、外部側で何フレーム分まで駒落としが可能かを判断できる。(請求項4)
次に可変長復号化部109で復号化された量子化済みデータから記録媒体150内の参照画像を領域に参照画像を出力するまでの処理は以下に説明する。
As shown in FIG. 6, when the recording medium free space detecting unit 120 finishes the above processing, the capacity, free space, and head address for one bank of reference images are output to the decoding start / stop control unit 135. Thus, the decoding start / stop control unit 135 uses the number N of reference image banks acquired from the bank reservation request input unit 123 as the reference image capacity for one bank of the recording medium free space detection unit 120 (an integer of 2 or more). Is compared with the free space to determine whether or not the reference image area for the requested bank can be secured. If so, the reference image output unit 133 indicates the size and head address information of each bank. By providing means for securing the reference image area for the requested bank in the recording medium 150, it is possible to wait for reference frames for N frames that can be output in the decoding apparatus, From Flexibly becomes possible to output timing (e.g., outside there is a system for outputting audio synchronization. May want to wait a reference image for the synchronization processing). (Claim 2)
Further, as shown in FIG. 7, when it is impossible to secure the capacity for the required number of banks in the recording medium 150, the maximum number of banks that can be secured for the free capacity can be calculated to secure the maximum number of banks. Even if the required number of banks cannot be secured, it is possible to secure the maximum number of banks that can be secured with the current free capacity, and many frames that can be output as much as possible with an external display device etc. Therefore, when it is desired to wait for the reference image for the minute amount in the decoding apparatus, it is not necessary to perform the process of determination on the external apparatus side, and the “reproduction process start time” can be shortened. (Claim 3)
In addition, the decoding start / stop control unit 135 includes the reserved bank number output unit 122 that outputs the number of reserved reference image banks, so that the number of reference image banks secured in the decoding device can be determined. Since it is possible to grasp the maximum number of frames for which an image ready for output can be kept waiting, as shown in FIG. 8, for example, processing required to output data for one frame at that time By knowing the time and the processing time required to generate a reference image for one frame, it is possible to determine how many frames can be dropped on the outside. (Claim 4)
Next, processing from the quantized data decoded by the variable length decoding unit 109 until the reference image is output to the area of the reference image in the recording medium 150 will be described below.

可変長復号化部109にて解読・復元された、動きベクトルとそのマクロブロックのINTER/INTRA情報を、動きベクトル探索範囲データ読出部132と参照画像生成部112に出力し、量子化パラメータは量子化処理部107に出力し、量子化済みブロックデータは逆量子化処理部110に出力する。量子化済みブロックデータは、輝度・Cb・Crの各ブロック単位でブロック番号順に後述の逆量子化から参照画像の格納までの処理が行われる。参照画像領域は図9のように、通常輝度・Cb・Cr別の領域に格納されるため、動きベクトル範囲データ読出部132や参照画像出力部133は入力対象ブロックや出力対象ブロックがどのようなデータ種類か、またブロック番号かを判断し、復号化開始時に確保した参照領域に対して読出し・格納を行う。   The motion vector and the INTER / INTRA information of the macroblock decoded and restored by the variable length decoding unit 109 are output to the motion vector search range data reading unit 132 and the reference image generation unit 112, and the quantization parameter The quantized block data is output to the quantization processing unit 107, and the quantized block data is output to the inverse quantization processing unit 110. The quantized block data is subjected to processing from dequantization (to be described later) to storage of a reference image in order of block number for each block of luminance, Cb, and Cr. As shown in FIG. 9, the reference image area is stored in an area for each normal luminance / Cb / Cr. Therefore, the motion vector range data reading unit 132 and the reference image output unit 133 are not limited to the input target block or the output target block. It is determined whether it is a data type or a block number, and the reference area secured at the start of decoding is read / stored.

逆量子化処理部110は、量子化済みブロックデータが入力されると、逆量子化処理を行い、生成された量子化前ブロックデータを逆DCT処理部111へ出力する。逆DCT処理部111は、量子化前ブロックデータの入力があると逆DCT処理を行う。   When the quantized block data is input, the inverse quantization processing unit 110 performs an inverse quantization process and outputs the generated pre-quantization block data to the inverse DCT processing unit 111. The inverse DCT processing unit 111 performs inverse DCT processing when there is input of block data before quantization.

動き探索範囲データ読出部132は、図9のようにINTER符号化されたマクロブロックである場合は、復号対象のブロックに対して先行する参照画像領域の復号化対象基準位置から動きベクトル分ずれた1ブロック分のデータを記録媒体150内から読出し、動き探索用バッファ104に格納する。   When the motion search range data reading unit 132 is an INTER-encoded macroblock as shown in FIG. 9, the motion search range data reading unit 132 is shifted by the motion vector from the decoding target standard position of the reference image area preceding the decoding target block. One block of data is read from the recording medium 150 and stored in the motion search buffer 104.

ブロックデータが逆DCT処理部111に生成されると、参照画像生成部112は、そのマクロブロックがINTER符号化されたマクロブロックである場合は、動き探索用バッファ104内のブロックのデータと逆DCT処理部111のブロックデータを加算した結果を参照画像出力部133に出力し、INTRA符号化されたマクロブロックである場合は、逆DCT処理部111のブロックデータを、参照画像出力部133に出力する。   When the block data is generated by the inverse DCT processing unit 111, the reference image generation unit 112, when the macro block is an INTER-encoded macro block, performs the inverse DCT with the block data in the motion search buffer 104. The result of adding the block data of the processing unit 111 is output to the reference image output unit 133. If the block is an INTRA-encoded macroblock, the block data of the inverse DCT processing unit 111 is output to the reference image output unit 133. .

参照画像出力部133は、参照画像生成部112からのブロックデータを入力すると、図9のように、そのデータを現在処理対象となっているブロック位置に対応する参照画像領域内のブロック位置に格納する。   When the reference image output unit 133 receives the block data from the reference image generation unit 112, the reference image output unit 133 stores the data in the block position in the reference image area corresponding to the block position currently being processed as shown in FIG. To do.

ただし、参照画像出力部133は、新たなバンクに出力する際に、復号化処理進捗管理部136のバンク状況を参照し、次に出力するバンクに出力することが可能か否かの判断も行う。また、参照画像出力部133は、記録領域内に参照画像領域に空きバンクがある限り、参照画像データの出力処理を行う。空きバンクが無い場合は出力処理を停止し、復号化処理進捗管理部136に対し復号化処理全体を停止するために一時停止命令を発行し、復号化処理進捗管理部136は復号化処理全体を一時停止する。   However, the reference image output unit 133 refers to the bank status of the decoding process progress management unit 136 when outputting to a new bank, and also determines whether it can be output to the next bank to be output. . The reference image output unit 133 performs reference image data output processing as long as there is an empty bank in the reference image area in the recording area. If there is no empty bank, the output process is stopped, a pause instruction is issued to the decoding process progress management unit 136 to stop the entire decoding process, and the decoding process progress management unit 136 performs the entire decoding process. Pause.

上記の処理を1マクロブロックずつ、輝度・Cb・Crの参照画像領域ごとに行う。
参照画像1フレーム分が更新されると、図10のように、参照画像外部出力部139は、外部の要求が入力されるとバンク内で生成されてから一番古いフレームが格納されているバンクを選択し、参照画像領域から輝度・Cb・Crデータを読出し、そのフレームの符号化されたタイムスタンプなどのタイミング情報外部へ出力する。ただし、外部の要求が入力されても、出力可能な参照画像が無い場合は、外部への出力を行わない。この輝度・Cb・Crデータが、例えば外部に接続されている表示処理装置に入力され、表示装置に対応した1フレーム分の映像信号に変換され、しかるべきタイミングで表示装置に映像が表示される。
The above processing is performed for each reference image area of luminance, Cb, and Cr, one macroblock at a time.
When one frame of the reference image is updated, as shown in FIG. 10, the reference image external output unit 139 stores the oldest frame after being generated in the bank when an external request is input. Is selected, the luminance / Cb / Cr data is read out from the reference image area, and is output outside the timing information such as the encoded time stamp of the frame. However, even if an external request is input, if there is no reference image that can be output, no external output is performed. The luminance / Cb / Cr data is input to, for example, an externally connected display processing device, converted into a video signal for one frame corresponding to the display device, and an image is displayed on the display device at an appropriate timing. .

なお、複数バンクの参照画像領域を確保しての復号化処理の場合は、バンク状態出力部121を設け、復号化処理進捗管理部136が、参照画像データ出力部133が記録媒体150内のどの参照画像バンクへ出力したかという情報を管理し、確保されたバンクのどのバンクの参照画像バンクが完成したかまたは処理中かという判断と、参照画像外部出力部139が出力したかのバンク情報を管理し、出力可能・空き・処理中といったバンクの情報、出力可能バンクの出力順番、各バンクに生成された参照画像のタイミング情報を出力することにより、記録媒体150内で出力可能になった参照画像バンクを把握でき(外部から出力可能で待機しているバンクが分かり)、外部表示装置等が参照画像の先読み処理を行うことが可能になる。(請求項5)
さらに、上記のバンク状態出力部121とともに、復号化処理時に、外部に出力したい参照画像データバンク番号を入力する参照画像出力要求入力部124を設けることにより、参照画像で出力可能になったバンクのうち、出力したいバンクを選択でき、外部装置が出力不要と判断した参照画像を、参照画像外部出力部139を通して出力する必要が無くなるため、例えば、再生時にスキップしたい画像を出力しなくて済み、外部の表示処理装置で符号のフレームレートのダウンサンプリング処理を効率的に行うことが出来る。(請求項6)
尚、通常は復号化装置内部に、たとえばすでに参照画像2面分の参照画像バンク容量のメモリを具備している装置に対しても、外部装置により駒落ちの処理などの判断により、3面のバンクが必要になった場合は、1面分の参照画像領域を記録媒体内に設けて、3面分の参照画像領域を確保した復号化処理を行うことも可能である。
In the case of decoding processing with a plurality of banks of reference image areas secured, a bank status output unit 121 is provided, and the decoding processing progress management unit 136 determines which reference image data output unit 133 is in the recording medium 150. Information on whether the image has been output to the reference image bank is managed, and it is determined which bank of the reserved image the reference image bank has been completed or is being processed, and bank information on whether the reference image external output unit 139 has output the bank information. References that can be output in the recording medium 150 by managing and outputting bank information such as output possible / empty / processing, output order of outputable banks, and timing information of reference images generated in each bank The image bank can be grasped (the bank that can be output from the outside and is waiting) can be understood, and the external display device or the like can perform the prefetch processing of the reference image. (Claim 5)
Further, by providing a reference image output request input unit 124 for inputting a reference image data bank number to be output to the outside at the time of decoding processing together with the bank state output unit 121 described above, the bank of the bank that can be output as a reference image is provided. Of these, it is possible to select a bank to be output, and it is not necessary to output a reference image determined to be unnecessary by the external device through the reference image external output unit 139. For example, it is not necessary to output an image to be skipped during playback. In this display processing apparatus, the downsampling processing of the frame rate of the code can be performed efficiently. (Claim 6)
Normally, even for a device that already has a memory of a reference image bank capacity for two reference images, for example, an external device determines whether there are three frames. When a bank is required, it is possible to perform a decoding process in which a reference image area for one surface is provided in a recording medium and a reference image region for three surfaces is secured.

また図1に示すように、記録媒体制御処理部130に、記録媒体符号管理部138を設けている。
(記録媒体符号管理部)
記録媒体符号管理部138は、記録媒体150が挿入されたときに、記録媒体150内に存在する復号可能な符号の個数とそれぞれのアドレスとサイズを取得し、それぞれの符号に対しヘッダ情報の読み出しを行い、復号化時の参照画像のサイズや色差フォーマット情報を読み出し、その符号の中での参照画像領域の容量の最大値を判断する。
(記録媒体空き容量検知部)
記録媒体空き容量検知部120は、符号化処理開始時に、図11のように、記録媒体符号管理部138が取得した記録媒体150内の必要参照画像容量の最大値と、符号化処理が必要となる参照画像領域の容量とを比較し、ともに確保可能なときは大きい方を確保し、符号化処理を実行する。なお、どちらか大きい方の参照画像領域の空き容量が確保できなくなった場合は、符号化開始・停止制御部に停止命令を発行し、符号化処理の停止を行う。
As shown in FIG. 1, the recording medium control processing unit 130 is provided with a recording medium code management unit 138.
(Recording medium code management unit)
When the recording medium 150 is inserted, the recording medium code management unit 138 obtains the number of decodable codes existing in the recording medium 150, the respective addresses and sizes, and reads the header information for each code. The reference image size and color difference format information at the time of decoding are read out, and the maximum value of the capacity of the reference image area in the code is determined.
(Recording medium free space detector)
As shown in FIG. 11, the recording medium free space detection unit 120 requires the maximum required reference image capacity in the recording medium 150 acquired by the recording medium code management unit 138 and encoding processing at the start of the encoding processing. Are compared with each other, and if both can be secured, the larger one is secured and the encoding process is executed. If the larger reference image area cannot be secured, a stop command is issued to the encoding start / stop control unit to stop the encoding process.

このように、記録媒体150の挿入時に、すでに存在している符号のヘッダを確認し、復号化時に必要な容量を把握し、符号化処理を行う場合は、その容量と参照画像容量の大きい方の容量を記録媒体150内に確保して、符号化処理をおこなうことにより、記録媒体150内のすべての符号が復号化処理時に必要とする参照画像容量が確保でき、必ず符号化処理・復号化処理を確実に行うことができる。(請求項8)   As described above, when the recording medium 150 is inserted, the header of the code that already exists is confirmed, the capacity required for decoding is grasped, and when performing the encoding process, the larger capacity and the reference image capacity are larger. Is ensured in the recording medium 150 and the encoding process is performed, so that the reference image capacity required for the decoding process of all the codes in the recording medium 150 can be ensured. Processing can be performed reliably. (Claim 8)

本発明にかかる画像符号化/復号化装置は、記録媒体内に参照画像領域を確保することにより、参照画像を格納するための参照画像領域を画像符号化装置内に設けずに済む画像符号化装置に対し、復号化処理の機能も実現でき、復号化処理時に必要な参照画像領域についても記録媒体内に確保することができるため、画像符号化/復号化装置を1チップ化するときのチップ面積および回路規模を、従来のものに比べて軽減できるようになるという効果を有し、動画データを蓄積、処理等する種々の動画符号化/復号化装置等として有用である。   The image encoding / decoding apparatus according to the present invention secures a reference image area in a recording medium, thereby eliminating the need for providing a reference image area for storing a reference image in the image encoding apparatus. The function of the decoding process can be realized for the apparatus, and the reference image area required at the time of the decoding process can be secured in the recording medium, so that the chip when the image encoding / decoding apparatus is made into one chip It has an effect that the area and circuit scale can be reduced as compared with the conventional one, and is useful as various moving picture encoding / decoding devices for storing and processing moving picture data.

本発明の実施の形態における画像符号化/復号化装置のブロック図である。1 is a block diagram of an image encoding / decoding device according to an embodiment of the present invention. 同画像符号化/復号化装置の画像符号化装置のブロック図である。It is a block diagram of the image coding apparatus of the image coding / decoding apparatus. 同画像符号化/復号化装置の1マクロブロックの構成と符号化処理時の入力画像と参照画像の図である。It is a figure of the structure of 1 macroblock of the image encoding / decoding apparatus, the input image at the time of an encoding process, and a reference image. 同画像符号化/復号化装置の符号化処理のフローチャートである。It is a flowchart of the encoding process of the image encoding / decoding apparatus. 同画像符号化/復号化装置の画像復号化装置のブロック図である。It is a block diagram of the image decoding apparatus of the image encoding / decoding apparatus. 同画像符号化/復号化装置の参照画像領域の確保処理のフローチャートである。It is a flowchart of the securing process of the reference image area | region of the image coding / decoding apparatus. 同画像符号化/復号化装置の参照画像領域の確保処理のフローチャートである。It is a flowchart of the securing process of the reference image area | region of the image coding / decoding apparatus. 同画像符号化/復号化装置のフレーム駒落としの説明図である。It is explanatory drawing of the frame piece dropping of the image coding / decoding apparatus. 同画像符号化/復号化装置の復号化処理時における参照画像領域のデータの出力と格納の説明図である。It is explanatory drawing of the output and storage of the data of a reference image area | region at the time of the decoding process of the image coding / decoding apparatus. 同画像符号化/復号化装置の復号化処理時における参照画像領域のデータの外部出力の説明図である。It is explanatory drawing of the external output of the data of the reference image area | region at the time of the decoding process of the image coding / decoding apparatus. 同画像符号化/復号化装置の符号化処理のフローチャートである。It is a flowchart of the encoding process of the image encoding / decoding apparatus. 画像の再生機能構成の一例を示す図である。It is a figure which shows an example of the reproducing function structure of an image.

符号の説明Explanation of symbols

101 入力画像バッファ
102 フレーム内/間符号化判定部
103 動きベクトル検出部
104 動き探索用バッファ
105 予測誤差格納部
106 DCT処理部
107 量子化処理部
108 可変長符号化部
109 可変長復号化部
110 逆量子化処理部
111 逆DCT処理部
112 参照画像生成部
121 バンク状態出力部
122 確保済みバンク数出力部
123 バンク確保要求入力部
124 参照画像出力要求部
125 出力部
130 記録媒体制御処理部
131 符号入出力部
132 動き探索範囲データ読出部
133 参照画像出力部
134 符号化開始・停止制御部
135 復号化開始・停止制御部
136 復号化処理進捗管理部
138 記録媒体符号管理部
139 参照画像外部出力部
150 記録媒体
151 メモリ制御部
152 記録領域
101 Input image buffer
102 intra / interframe coding determination unit 103 motion vector detection unit 104 motion search buffer 105 prediction error storage unit 106 DCT processing unit 107 quantization processing unit 108 variable length coding unit 109 variable length decoding unit 110 inverse quantization processing Unit 111 inverse DCT processing unit 112 reference image generation unit 121 bank status output unit 122 reserved bank number output unit 123 bank reservation request input unit 124 reference image output request unit 125 output unit 130 recording medium control processing unit 131 code input / output unit 132 Motion search range data reading unit 133 Reference image output unit 134 Encoding start / stop control unit 135 Decoding start / stop control unit 136 Decoding process progress management unit 138 Recording medium code management unit 139 Reference image external output unit 150 Recording medium 151 Memory control unit 152 Recording area

Claims (8)

最初の入力画像に対しフレーム内符号化処理による圧縮符号化処理を施して符号を生成し、次からの入力画像に対しては参照画像を用いた予測符号化処理による圧縮符号化処理を施して符号を生成する符号化手段と、生成した符号に対し復号化処理を施し符号化前の入力画像データに復元する復号化手段を有し、前記符号化手段の生成符号の記録を行う記録媒体を装備可能であり、符号化処理時には、生成符号を前記記録媒体内の記憶領域に格納させるとともに、記録媒体の記憶領域に、前記参照画像を格納するための参照画像領域を別個確保する画像符号化/復号化装置であって、
前記復号化手段は、復号化処理時に、前記記録媒体内の符号の読出しを行うとともに、記録媒体の記憶領域に、復号化処理時に必要となる参照画像を格納するための参照画像領域を別途確保し、かつ外部からの前記参照画像の出力要求に応じてその参照画像を前記参照画像領域から読出し、外部出力すること
を特徴とする画像符号化/復号化装置。
The first input image is subjected to compression coding processing by intraframe coding processing to generate a code, and the next input image is subjected to compression coding processing by predictive coding processing using a reference image. A recording medium that includes a coding unit that generates a code and a decoding unit that performs decoding processing on the generated code and restores the input image data before the coding, and records the generated code of the coding unit; Image encoding that can be equipped and stores a generated code in a storage area in the recording medium and separately secures a reference image area for storing the reference image in the storage area of the recording medium during encoding processing / Decoding device,
The decoding means reads out the code in the recording medium during the decoding process, and separately secures a reference image area for storing a reference image necessary for the decoding process in the storage area of the recording medium. An image encoding / decoding device that reads out the reference image from the reference image area in response to a request to output the reference image from the outside and outputs the reference image to the outside.
前記復号化手段が、復号化処理開始時に、前記記録媒体内に確保する参照画像領域の容量は、参照画像のN(Nは2以上の整数)フレーム分の容量であること
を特徴とする請求項1に記載の画像符号化/復号化装置。
The capacity of a reference image area secured in the recording medium when the decoding means starts decoding processing is a capacity for N frames (N is an integer of 2 or more) of a reference image. Item 2. The image encoding / decoding device according to Item 1.
前記復号化手段は、復号化処理開始時に前記記録媒体内の記憶領域の空き容量を検知し、この検知した空き容量と前記記録媒体内の記憶領域に確保しようとする参照画像の容量に外部から要求された参照画像フレーム数N〜1を乗じた容量とを比較し、前記記録媒体内の記憶領域に前記容量が確保できる最大参照画像バンク数の容量を確保すること
を特徴とする請求項2に記載の画像符号化/復号化装置。
The decoding means detects the free space in the storage area in the recording medium at the start of the decoding process, and externally determines the detected free capacity and the capacity of the reference image to be secured in the storage area in the recording medium. 3. The capacity obtained by multiplying the requested number of reference image frames N to 1 is compared, and the capacity of the maximum number of reference image banks that can secure the capacity is secured in a storage area in the recording medium. An image encoding / decoding device according to claim 1.
前記復号化手段は、復号化処理開始時に、確保できた参照画像バンク数を外部に通知する出力装置を具備すること
を特徴とする請求項3に記載の画像符号化/復号化装置。
4. The image encoding / decoding apparatus according to claim 3, wherein the decoding unit includes an output device that notifies the number of reference image banks secured to the outside when starting the decoding process.
前記復号化手段は、復号化処理中に、各々のバンクに格納されるべき参照画像状態を外部に通知する出力装置を具備すること
を特徴とする請求項3に記載の画像符号化/復号化装置。
4. The image encoding / decoding according to claim 3, wherein the decoding means comprises an output device for notifying the outside of a reference image state to be stored in each bank during the decoding process. apparatus.
前記復号化手段は、復号化処理中に、出力可能になった参照画像を選択的にバンクに出力要求できる入力装置を具備すること
を特徴とする請求項3に記載の画像符号化/復号化装置。
4. The image encoding / decoding according to claim 3, wherein the decoding means comprises an input device capable of selectively requesting the bank to output a reference image that can be output during the decoding process. apparatus.
前記復号化手段は、
前記記録媒体内の記憶領域の空き容量を検知し、この検知した空き容量と前記記録媒体内の記憶領域に記録しようとする生成符号の量とを比較し、前記記録媒体内の記憶領域に該生成符号の格納ができないときには、該生成符号を格納させる処理動作を停止させる記録媒体空き容量検知部と、
前記記録媒体内の記憶領域に該生成符号を格納できないとき、前記参照画像領域の開放を行う参照画像出力部と、
前記記録媒体内の記憶領域に該生成符号を格納できないとき、フレーム内符号化処理に固定して処理を行うフレーム内/間符号判定部
を具備すること
を特徴とする請求項1に記載の画像符号化/復号化装置。
The decoding means includes
The free space of the storage area in the recording medium is detected, the detected free space is compared with the amount of generated code to be recorded in the storage area in the recording medium, and the storage area in the recording medium When the generated code cannot be stored, a recording medium free space detecting unit for stopping the processing operation for storing the generated code;
A reference image output unit for releasing the reference image area when the generated code cannot be stored in a storage area in the recording medium;
2. The image according to claim 1, further comprising an intra-frame / inter-code determination unit that performs processing while being fixed to intra-frame coding processing when the generated code cannot be stored in a storage area in the recording medium. Encoding / decoding device.
前記復号化手段は、記録媒体挿入時に、記録媒体内にすでに記録されている符号のヘッダ情報を確認して復号化処理に必要となる最大参照画像容量を判断し、符号化を開始するときは、前記容量と符号化処理に必要となる参照画像容量を比較し、大きい方の容量を確保し、符号化処理中にその確保した容量を保持できなくなった場合は符号化処理を停止する記録媒体空き容量検知部を具備すること
を特徴とする請求項1に記載の画像符号化/復号化装置。
When the decoding means inserts the recording medium, confirms the header information of the code already recorded in the recording medium, determines the maximum reference image capacity required for the decoding process, and starts encoding The recording medium which compares the capacity and the reference image capacity required for the encoding process, secures the larger capacity, and stops the encoding process when the reserved capacity cannot be maintained during the encoding process The image encoding / decoding apparatus according to claim 1, further comprising a free space detection unit.
JP2005301091A 2005-10-17 2005-10-17 Image coding/decoding device Withdrawn JP2007110573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005301091A JP2007110573A (en) 2005-10-17 2005-10-17 Image coding/decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005301091A JP2007110573A (en) 2005-10-17 2005-10-17 Image coding/decoding device

Publications (1)

Publication Number Publication Date
JP2007110573A true JP2007110573A (en) 2007-04-26

Family

ID=38036050

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005301091A Withdrawn JP2007110573A (en) 2005-10-17 2005-10-17 Image coding/decoding device

Country Status (1)

Country Link
JP (1) JP2007110573A (en)

Similar Documents

Publication Publication Date Title
JP4769717B2 (en) Image decoding method
JP4682102B2 (en) Image coding apparatus and image coding method
JP5090158B2 (en) VIDEO INFORMATION RECORDING DEVICE, VIDEO INFORMATION RECORDING METHOD, VIDEO INFORMATION RECORDING PROGRAM, AND RECORDING MEDIUM CONTAINING VIDEO INFORMATION RECORDING PROGRAM
US20050238100A1 (en) Video encoding method for encoding P frame and B frame using I frames
JP2010041354A (en) Moving image coding method, coding device and coding program
JPH06181569A (en) Method and device for encoding and decoding picture and picture recording medium
JP5496047B2 (en) Image reproduction method, image reproduction apparatus, image reproduction program, imaging system, and reproduction system
JP2010288166A (en) Moving picture encoder, broadcast wave recorder, and program
JP2012085001A5 (en)
JP3976942B2 (en) Image processing apparatus and method, and computer-readable recording medium on which an image processing program is recorded
KR101606931B1 (en) Apparatus for recording/playing key frame still image and method for orerating the same
US8503803B2 (en) Method and apparatus for encoding/decoding image by partitioning image
JP2014011572A5 (en) Moving picture predictive decoding apparatus, method and program
JP2006246277A (en) Re-encoding apparatus, re-encoding method, and re-encoding program
JP4708821B2 (en) Moving picture coding apparatus, control method therefor, computer program, and storage medium
JP2007142809A (en) Video recording apparatus
JPH10271498A (en) Compression data conversion method, information quantity conversion method for image compression data, and image recorder adopting the method
JP2007110573A (en) Image coding/decoding device
JP2012010147A (en) Information processing device and information processing method
JP2008042660A (en) Video signal reencoding device and video signal reencoding method
JP2007109329A (en) Picture data recording apparatus, picture data reproducing apparatus, picture data recording method, program, and recording medium
JPH08205147A (en) Method and device for decoding image
JP4043310B2 (en) Image encoding device
JP2011090733A (en) Recording device
JP2005130362A (en) Imaging device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080430

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081015

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20091228