Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4293151B2 - Video encoding method and video recording apparatus - Google Patents
[go: Go Back, main page]

JP4293151B2 - Video encoding method and video recording apparatus - Google Patents

Video encoding method and video recording apparatus Download PDF

Info

Publication number
JP4293151B2
JP4293151B2 JP2005096756A JP2005096756A JP4293151B2 JP 4293151 B2 JP4293151 B2 JP 4293151B2 JP 2005096756 A JP2005096756 A JP 2005096756A JP 2005096756 A JP2005096756 A JP 2005096756A JP 4293151 B2 JP4293151 B2 JP 4293151B2
Authority
JP
Japan
Prior art keywords
frame
encoding
data
unit
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005096756A
Other languages
Japanese (ja)
Other versions
JP2006279638A (en
Inventor
敏行 大河内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2005096756A priority Critical patent/JP4293151B2/en
Publication of JP2006279638A publication Critical patent/JP2006279638A/en
Application granted granted Critical
Publication of JP4293151B2 publication Critical patent/JP4293151B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は映像符号化方法及び映像記録装置に係り、特に動画像に関する標準テレビジョン信号を、フレーム間圧縮を用いて間欠動画像信号を生成するのに好適な映像符号化方法及びその間欠動画像信号を記録する映像記録装置に関する。   The present invention relates to a video encoding method and a video recording apparatus, and more particularly to a video encoding method suitable for generating an intermittent video signal by using inter-frame compression for a standard television signal related to a video and its intermittent video. The present invention relates to a video recording apparatus for recording a signal.

スーパーマーケット、コンビニエンスストア、パチンコ店などでは、店内の万引きなどの犯罪防止、証拠保全のため、カメラによる監視システムが使われている。以前はこの監視システムに、長時間記録監視用VTRであるタイムラプスVTRが使用されていたが、磁気テープを記録媒体として用いているために、記録再生ヘッドの目詰まり、テープ巻き込みなどの不具合が発生することがあるため、近年ではハードディスク又は光ディスクに画像信号を記録するビデオディスクレコーダ(以下、VDRと称す)が監視システムに採用されることが多くなってきている。   In supermarkets, convenience stores, pachinko parlors, etc., camera surveillance systems are used to prevent shoplifting crimes and preserve evidence. In the past, this monitoring system used a time-lapse VTR, which is a VTR for long-term recording monitoring. However, since magnetic tape is used as a recording medium, problems such as clogging of the recording / reproducing head and tape entrainment occur. For this reason, in recent years, video disk recorders (hereinafter referred to as VDR) that record image signals on a hard disk or an optical disk are increasingly used in surveillance systems.

このVDRにおいても、以前のタイムラプスVTRと同様に、記録時間を延ばすため、動画像を間欠に記録する方法が採られている。また、動画像を効率良く間欠的に記録するために、記録する動画像の画像信号に対して画像圧縮が行われている。このようなVDRにおいて、入力動画像信号のnフレーム(nは2以上の自然数)毎に、先頭の1フレームをイントラフレームに符号化すると共に、その先頭の1フレーム以降の(n−1)フレームにはイントラフレームとの相関関係を用いた予測フレームであるPピクチャに符号化し、符号化されたフレームを所定の割合で間引いて、1個のイントラフレームとm個(mはn−1以下の自然数)の予測フレームとし、1個のイントラフレームとm個の予測フレームからなる符号列を出力する映像符号化方法が本出願人により先に提案されている(例えば、特許文献1参照)。   Also in this VDR, as in the previous time-lapse VTR, a method of intermittently recording a moving image is employed in order to extend the recording time. Further, in order to efficiently record a moving image intermittently, image compression is performed on the image signal of the moving image to be recorded. In such a VDR, for every n frames (n is a natural number of 2 or more) of the input video signal, the first frame is encoded into an intra frame, and (n-1) frames after the first frame are encoded. Is encoded into a P picture, which is a prediction frame using a correlation with an intra frame, and the encoded frames are thinned out at a predetermined rate to obtain one intra frame and m (m is equal to or less than n−1). A video encoding method for outputting a code sequence including one intra frame and m prediction frames as a (natural number) prediction frame has been previously proposed by the present applicant (see, for example, Patent Document 1).

この従来の映像符号化方法によれば、Pピクチャを間引くことによって、JPEG(Joint Photographic Experts Group)方式によるフレーム内圧縮された画像データや、MPEG2方式のイントラフレームであるIピクチャのみのフレーム内圧縮画像データを記録する場合よりも、低フレームレートで高画質・高圧縮の動画像信号を記録できる。   According to this conventional video coding method, P-pictures are thinned out, and image data compressed in a frame by JPEG (Joint Photographic Experts Group) method or in-frame compression of only an I picture that is an MPEG2 method intra frame. Compared to recording image data, it is possible to record moving image signals with high image quality and high compression at a low frame rate.

特開2003−333526号公報JP 2003-333526 A

しかしながら、特許文献1記載の従来の映像符号化方法では、動画や静止画などの画像の種類により圧縮率や画質が変化する。図8は従来のフレームとデータ量の関係の模式図を示す。図8(a)は静止画を圧縮した例であり、Pピクチャのデータ量は小さい。一般にMPEG方式の圧縮ではGOP(Group Of Picture)単位でデータ量がほぼ一定になるような符号量制御を行うことが多い。   However, in the conventional video encoding method described in Patent Document 1, the compression rate and the image quality change depending on the type of image such as a moving image or a still image. FIG. 8 is a schematic diagram showing the relationship between the conventional frame and the data amount. FIG. 8A shows an example in which a still image is compressed, and the data amount of the P picture is small. In general, in MPEG compression, code amount control is often performed so that the amount of data becomes almost constant in GOP (Group Of Picture) units.

図8(a)によれば、Pピクチャのデータ量が小さいためGOP全体のデータ量が小さい。そこで、GOP単位でデータ量を一定になるような符号量制御を適用すると、図8(b)に示すように全体のデータ量が増え、Iピクチャのデータ量は大きくなる。この画像のPピクチャを間引くと、図8(c)に示すようになり、間引くことによるデータ量の削減効果は少なく、静止画は必要以上に高画質である。   According to FIG. 8A, since the data amount of the P picture is small, the data amount of the entire GOP is small. Therefore, when code amount control is performed so that the data amount is constant in GOP units, the entire data amount increases as shown in FIG. 8B, and the data amount of the I picture increases. If the P picture of this image is thinned out, the result is as shown in FIG. 8C, and the effect of reducing the data amount by thinning out is small, and the still image has higher image quality than necessary.

次に、図8(d)は動画を圧縮した例であり、Pピクチャのデータ量が大きいため、GOP全体のデータ量が大きい。この画像にGOP単位でデータ量を一定になるような符号量制御を行うと、図8(e)に示すように全体としてデータ量が減り、Iピクチャのデータ量は小さくなる。この画像のPピクチャを間引くと、図8(f)に示すようになり、データ量は削減されるもののIピクチャのデータ量が小さいため動画の画質が劣化する。   Next, FIG. 8D shows an example in which a moving image is compressed. Since the data amount of the P picture is large, the data amount of the entire GOP is large. When code amount control is performed on this image so that the data amount becomes constant in GOP units, the data amount as a whole decreases as shown in FIG. 8E, and the data amount of the I picture decreases. When the P picture of this image is thinned out, the result is as shown in FIG. 8F, and although the data amount is reduced, the data amount of the I picture is small, so the image quality of the moving image is degraded.

監視の用途においては、異常がない通常の場合は被写体の動きがなく、異常が発生して画像を見たいのは被写体の動きがある場合が多く、特に動画を高画質で記録することが求められている。そのため、画質と圧縮率が変化し、特に動画の画質が劣化する従来の映像符号化方法では、上記の監視の用途における要求に十分応えられていないという課題がある。   For monitoring purposes, there is no subject movement in normal cases where there is no abnormality, and there are many cases where there is movement of the subject when an abnormality occurs and you want to see an image. It has been. Therefore, the conventional video coding method in which the image quality and the compression rate change, and particularly the moving image quality deteriorates, has a problem that it does not sufficiently meet the above-described demands for monitoring applications.

本発明は以上の点に鑑みなされたもので、入力映像信号をフレーム間圧縮を用いて間欠動画像信号を生成するに際し、静止画と動画での画質のばらつきが少なく、静止画に対しては符号データ量が少なく、動画に対しては高画質となる、監視の用途に特に好適な映像符号化方法及びその間欠動画像信号を記録する映像記録装置を提供することを目的とする。   The present invention has been made in view of the above points. When an intermittent video signal is generated using inter-frame compression of an input video signal, there is little variation in image quality between a still image and a moving image. An object of the present invention is to provide a video encoding method that is particularly suitable for monitoring applications and has a small amount of code data and high image quality for moving images, and a video recording apparatus that records the intermittent moving image signal.

上記の目的を達成するため、本発明の映像符号化方法は、入力映像信号をフレーム内圧縮符号化したイントラフレーム及びイントラフレームとの相関関係を用いて予測符号化した予測フレームのいずれかの符号化を選択的に行う映像符号化方法であって、入力映像信号の連続したnフレーム(nは2以上の自然数)を符号化グループ単位とし、その符号化グループ単位毎に、先頭の1フレームを、データ量を所望の目標値に近付ける符号量制御を行いながら、イントラフレームに符号化する第1のステップと、符号化グループ単位毎に、先頭の1フレームを除いた残りの(n−1)フレームを、符号量制御を行うことなく予測フレームに符号化する第2のステップと、第2のステップで符号化された予測フレームを、予め設定した割合で間引く第3のステップと、第1のステップで得られたイントラフレームと、第3のステップで間引かれた残りの予測フレームとからなる符号列を所定のフォーマットで出力する第4のステップとを含むことを特徴とする。   In order to achieve the above object, the video encoding method of the present invention includes an intra frame obtained by intra-frame compression encoding an input video signal, and a code of any prediction frame obtained by predictive encoding using a correlation with the intra frame. A video encoding method for selectively performing encoding, wherein n consecutive frames of an input video signal (n is a natural number of 2 or more) are used as encoding group units, and the first frame is determined for each encoding group unit. The first step of encoding into an intra frame while performing the code amount control to bring the data amount close to a desired target value, and the remaining (n−1) excluding the first frame for each encoding group unit A second step of encoding a frame into a prediction frame without performing code amount control and a prediction frame encoded in the second step are thinned out at a preset ratio. A third step, and a fourth step of outputting a code string composed of the intra frame obtained in the first step and the remaining prediction frames thinned out in the third step in a predetermined format. It is characterized by that.

この発明では、イントラフレームと、(n−1)個の予測フレームから間引いて得た予測フレームとからなる符号列を出力するに際し、イントラフレームのデータ量を目標値に近付ける符号化を行うことにより、従来のようにイントラフレームのデータ量に配慮せずに符号化する場合に比べ、少ないデータ量で画質のよい間欠動画像信号を生成することができる。   In the present invention, when outputting a code string composed of an intra frame and a prediction frame obtained by thinning out (n-1) prediction frames, encoding is performed so that the data amount of the intra frame approaches the target value. As compared with the conventional case where encoding is performed without considering the data amount of the intra frame, it is possible to generate an intermittent moving image signal having a good image quality with a small data amount.

また、上記の目的を達成するため、本発明の映像記録装置は、入力映像信号をフレーム内圧縮符号化したイントラフレーム及びイントラフレームとの相関関係を用いて予測符号化した予測フレームのいずれかの符号化を選択的に行って得られた符号列を記録媒体に記録する映像記録装置であって、入力映像信号の連続したnフレーム(nは2以上の自然数)を符号化グループ単位とし、その符号化グループ単位毎に、先頭の1フレームを、データ量を所望の目標値に近付ける符号量制御を行いながら、イントラフレームに符号化する第1の符号化手段と、符号化グループ単位毎に、先頭の1フレームを除いた残りの(n−1)フレームを、符号量制御を行うことなく予測フレームに符号化する第2の符号化手段と、第2の符号化手段で符号化された予測フレームを、予め設定した割合で間引くフレーム間引き手段と、第1の符号化手段で得られたイントラフレームと、フレーム間引き手段で間引かれた残りの予測フレームとからなる符号列を所定のフォーマットで記録媒体に記録する記録手段とを有することを特徴とする。   In order to achieve the above object, the video recording apparatus according to the present invention includes an intra frame obtained by intra-frame compression coding an input video signal and a prediction frame obtained by predictive coding using a correlation with the intra frame. A video recording apparatus for recording a code string obtained by selectively performing encoding on a recording medium, wherein n consecutive frames of an input video signal (n is a natural number of 2 or more) are encoded group units, For each encoding group unit, the first encoding unit that encodes the first frame into an intra frame while performing code amount control to bring the data amount close to a desired target value, and for each encoding group unit, The remaining (n-1) frames excluding the first frame are encoded by a second encoding unit that encodes the prediction frame without performing the code amount control, and the second encoding unit A code sequence comprising a frame decimation unit that decimates the predicted frame obtained at a preset ratio, an intra frame obtained by the first encoding unit, and a remaining prediction frame decimation by the frame decimation unit And recording means for recording on a recording medium in the format described above.

この発明では、イントラフレームと、(n−1)個の予測フレームから間引いて得た予測フレームとからなる符号列を記録媒体に記録するに際し、イントラフレームのデータ量を目標値に近付ける符号化を行うことにより、従来のようにイントラフレームのデータ量に配慮せずに符号化した符号列を記録する場合に比べ、同じ容量の記録媒体に対して高画質で長時間の符号列の記録ができる。   In the present invention, when a code string composed of an intra frame and a prediction frame obtained by thinning out (n-1) prediction frames is recorded on a recording medium, encoding is performed so that the data amount of the intra frame approaches a target value. By doing so, it is possible to record a code string for a long time with high image quality on a recording medium of the same capacity as compared to the case of recording a code string encoded without considering the amount of data of an intra frame as in the past. .

本発明によれば、イントラフレームのデータ量を目標値に近付ける符号化を行い、符号化グループ単位の符号量制御は行わず、また、予測フレームは符号量制御を行わず、動きの大きい画像は多くのデータ量として、予測フレームの一部を間引いて出力又は記録するものとしたので、動画のイントラフレームも静止画のイントラフレームと同じ符号量となるので画質が劣化せず、また動きの大きい画像の予測フレームは多くのデータ量となるので、動きに関しても十分な画質の映像信号を出力又は記録することができ、特に監視の用途に適用して好適である。   According to the present invention, encoding is performed so that the data amount of an intra frame approaches a target value, code amount control for each encoding group is not performed, and code amount control is not performed for a prediction frame, As a large amount of data, a part of the prediction frame is thinned and output or recorded, so the intraframe of the moving image has the same code amount as the intraframe of the still image, so the image quality does not deteriorate and the movement is large. Since a predicted frame of an image has a large amount of data, a video signal with sufficient image quality can be output or recorded with respect to motion, and is particularly suitable for application to monitoring.

次に、本発明の一実施の形態について図面と共に説明する。図1は本発明になる映像符号化方法の一実施の形態が適用される画像圧縮部のブロック図を示す。同図において、画像圧縮部1内の画像フォーマット変換部101は、供給された原画像データを三原色信号のRGBフォーマットや、サンプリング比が4:2:0以外の色差フォーマットから輝度信号Yと2種類の色差信号Cb及びCrからなる、4:2:0のYCbCrフォーマットの画像データに変換し、このうちCb及びCrのみを例えば0x80(16進数)だけプラス方向にレベルシフトして出力する。   Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of an image compression unit to which an embodiment of a video encoding method according to the present invention is applied. In the figure, the image format conversion unit 101 in the image compression unit 1 converts the supplied original image data into the luminance signal Y from the RGB format of the three primary color signals and the color difference format other than the sampling ratio of 4: 2: 0. The image data is converted into 4: 2: 0 YCbCr format image data consisting of the color difference signals Cb and Cr, and only Cb and Cr are level-shifted in the positive direction by 0x80 (hexadecimal number), for example, and output.

2次元DCT処理部102は、画像フォーマット変換部101から供給された、例えば4:2:0のYCbCrフォーマットの、Y/Cb/Crの各画像データそれぞれを別々にブロック単位で2次元DCT(離散コサイン変換)処理して各DCT係数を出力する。バッファ部103は、2次元DCT処理部102から供給されたY/Cb/Crの各画像データの各DCT係数について、少なくとも1画面分のDCT係数を一時記憶する。   The two-dimensional DCT processing unit 102 separately supplies each Y / Cb / Cr image data of, for example, 4: 2: 0 YCbCr format supplied from the image format conversion unit 101 in units of blocks. (Cosine transform) processing and output each DCT coefficient. The buffer 103 temporarily stores at least one screen of DCT coefficients for each DCT coefficient of Y / Cb / Cr image data supplied from the two-dimensional DCT processing unit 102.

量子化処理部104は、バッファ部103から読み出した各DCT係数をそれぞれ量子化して圧縮データをエントロピ符号化部105へ出力する。エントロピ符号化部105は、量子化処理部104から供給されたY,Cb,及びCrの各画像データの各圧縮データをそれぞれエントロピ符号化して、更に圧縮された符号データを出力バッファ部106へ出力する。出力バッファ部106は、エントロピ符号化部105から供給された各符号データを一時記憶する。   The quantization processing unit 104 quantizes each DCT coefficient read from the buffer unit 103 and outputs the compressed data to the entropy coding unit 105. The entropy encoding unit 105 entropy-encodes each compressed data of the Y, Cb, and Cr image data supplied from the quantization processing unit 104, and outputs the further compressed code data to the output buffer unit 106. To do. The output buffer unit 106 temporarily stores each code data supplied from the entropy encoding unit 105.

更に、符号量決定部107は、最終的な目標符号量を設定すると共に、エントロピ符号化部105から供給された各符号データの符号量に基づき、輝度信号データ(Yデータ)についての目標符号量を決定する。量子化テーブル算出部108は、符号量決定部107で設定及び決定された目標符号量と、後述する量子化テーブル設定部109に設定された量子化テーブルとに基づき、輝度信号データのDCT係数の量子化処理で使用する量子化テーブルを生成して、量子化処理部104に設定する。   Furthermore, the code amount determination unit 107 sets a final target code amount, and based on the code amount of each code data supplied from the entropy encoding unit 105, the target code amount for the luminance signal data (Y data). To decide. The quantization table calculation unit 108, based on the target code amount set and determined by the code amount determination unit 107 and the quantization table set in the quantization table setting unit 109 described later, the DCT coefficient of the luminance signal data. A quantization table used in the quantization process is generated and set in the quantization processing unit 104.

量子化テーブル記憶部110は、少なくともY/Cb/Crの各画像データそれぞれのDCT係数を最初に量子化処理する際に使用するデフォルトの量子化テーブルを記憶している。読み出し制御部111は、量子化テーブル設定部109の制御に基づいて、バッファ部103に記憶されたY/Cb/Crの各画像データの各DCT係数の中から、量子化処理部104で量子化処理するために使用するDCT係数を選択して読み出す制御を実行する。   The quantization table storage unit 110 stores a default quantization table that is used when the DCT coefficients of at least Y / Cb / Cr image data are first quantized. Based on the control of the quantization table setting unit 109, the read control unit 111 performs quantization in the DCT coefficient of each image data of Y / Cb / Cr stored in the buffer unit 103 by the quantization processing unit 104. Control is performed to select and read out DCT coefficients to be used for processing.

次に、本発明になる映像符号化装置の一実施の形態について説明する。図2は本発明になる映像符号化装置の一実施の形態のブロック図を示す。同図において、VDR20は、本発明になる映像符号化装置の一実施の形態としての間欠動画像の記録機能だけでなく、再生機能をも備えた記録再生装置(ビデオディスクレコーダ)で、A/D変換部21、図1に示した構成の画像圧縮部22、音声圧縮部23、間引き処理部24、ディスク装置25、画像伸張部26、音声伸張部27、D/A変換部28、CPU(中央処理装置)2A、操作部2B及び表示部2Cを有しており、これらの各部21〜28、2A、2B及び2Cは双方向のバス29を介してCPU2Aが統括的に制御する構成とされている。   Next, an embodiment of a video encoding apparatus according to the present invention will be described. FIG. 2 shows a block diagram of an embodiment of a video encoding apparatus according to the present invention. In the figure, a VDR 20 is a recording / reproducing apparatus (video disc recorder) having not only an intermittent moving picture recording function as an embodiment of the video encoding apparatus according to the present invention but also a reproducing function. 1, the image compression unit 22, the audio compression unit 23, the thinning processing unit 24, the disk device 25, the image expansion unit 26, the audio expansion unit 27, the D / A conversion unit 28, the CPU ( A central processing unit) 2A, an operation unit 2B, and a display unit 2C. These units 21 to 28, 2A, 2B, and 2C are configured to be centrally controlled by the CPU 2A via a bidirectional bus 29. ing.

画像圧縮部22及び音声圧縮部23は、標準テレビジョン信号を公知のMPEG2方式に準拠した圧縮符号化を行う汎用のMPEG圧縮用集積回路(IC)により構成されている。また、操作部2Bは、使用者により操作され、記録モードか再生モードかの指定、記録するフレーム数などを入力する。CPU2Aはこの操作部2Bからの入力指示に従って、上記の各部のうち必要なブロックを制御する。また、表示部2Cは、VDR20の状況を表示する。   The image compression unit 22 and the audio compression unit 23 are configured by a general-purpose MPEG compression integrated circuit (IC) that performs compression encoding on a standard television signal in accordance with a known MPEG2 system. The operation unit 2B is operated by a user and inputs designation of a recording mode or a reproduction mode, the number of frames to be recorded, and the like. The CPU 2A controls necessary blocks among the above-described units in accordance with an input instruction from the operation unit 2B. The display unit 2C displays the status of the VDR 20.

次に、図2の実施の形態の動作について、図3のタイムチャートを併せ参照して説明する。まず、記録時の動作について説明する。図示しないカメラにより監視対象等の被写体を撮像して得られた、例えばNTSC方式の標準テレビジョン信号は、VDR20内のA/D変換部21に供給され、画像信号は必要なフレームだけディジタル化された後、画像圧縮部22に供給され、音声信号はディジタル化された後、音声圧縮部23に供給される。   Next, the operation of the embodiment of FIG. 2 will be described with reference to the time chart of FIG. First, the operation during recording will be described. For example, an NTSC standard television signal obtained by imaging a subject such as a monitoring target with a camera (not shown) is supplied to the A / D converter 21 in the VDR 20, and the image signal is digitized only in necessary frames. After that, the audio signal is supplied to the image compression unit 22, and the audio signal is digitized and then supplied to the audio compression unit 23.

図3(a)はVDR20に入力される標準テレビジョン信号を1フレーム単位で模式的に示したものである。ここでは、V1、V2、V3、V4の4フレーム分のテレビジョン信号(画像信号及び音声信号)を示している。また、後述する間引き処理部24による間引く度合いを1/3(3フレーム中2フレーム間引く)とする。   FIG. 3 (a) schematically shows a standard television signal input to the VDR 20 in units of one frame. Here, television signals (image signals and audio signals) for four frames of V1, V2, V3, and V4 are shown. In addition, the degree of thinning by the thinning processing unit 24 described later is set to 1/3 (2 frames are thinned out of 3 frames).

上記の画像圧縮部22は、A/D変換部21から入力されたディジタル化された画像信号に対して、図1のブロック図の構成によりMPEG2−PS(Program Stream)方式に準拠した圧縮符号化を行うが、この実施の形態では、動画像に関する入力標準テレビジョン信号の所定の連続したnフレーム(nは2以上の自然数)毎に先頭の1フレームを1つの空間的相関関係を用いて符号化されたIピクチャとし、残りの(n−1)フレームはIピクチャとの相関関係を用いて符号化して得られた予測フレーム、すなわち、Pピクチャとする。図3の例では、上記のnは6である。従って、上記の画像圧縮部22は、図3(a)に示す第1のフレームV1はIピクチャに符号化する。Iピクチャの符号化は、所望の目標値のデータ量に近付くよう符号量制御を行う。   The image compression unit 22 compresses and encodes the digitized image signal input from the A / D conversion unit 21 in accordance with the MPEG2-PS (Program Stream) system with the configuration of the block diagram of FIG. However, in this embodiment, for each predetermined consecutive n frames (n is a natural number of 2 or more) of the input standard television signal related to a moving image, the top one frame is encoded using one spatial correlation. The remaining (n-1) frames are predicted frames obtained by encoding using the correlation with the I picture, that is, P pictures. In the example of FIG. 3, the above n is 6. Therefore, the image compression unit 22 encodes the first frame V1 shown in FIG. 3A into an I picture. In encoding an I picture, the code amount is controlled so as to approach the data amount of a desired target value.

この画像圧縮部22によるIピクチャの符号化の動作について、図1のブロック図及び図4、図5のフローチャート等を併せ参照して詳細に説明するに、まず、画像圧縮部22に供給されたRGBフォーマットの画像データは、図1の画像フォーマット変換部101においてRGBフォーマットからYCbCrフォーマットに変換される。このフォーマット変換は、周知のマトリクス変換式によって容易に変換可能なものであり、このマトリクス変換についての詳細の説明は省略する。   The operation of encoding the I picture by the image compression unit 22 will be described in detail with reference to the block diagram of FIG. 1 and the flowcharts of FIGS. 4 and 5. First, the image compression unit 22 is supplied to the image compression unit 22. The RGB format image data is converted from the RGB format to the YCbCr format by the image format conversion unit 101 in FIG. This format conversion can be easily converted by a known matrix conversion formula, and detailed description of the matrix conversion is omitted.

次に、上記の変換後のYCbCrデータについて、Y(輝度)データについては画素の間引きをせず、Cb及びCr(いずれも色差)データについては水平及び垂直の各方向に1画素おきの間引きをして、サンプリング比4:2:0のYCbCrデータを生成する。続いて、生成されたCb及びCrデータは、図1に示す2次元DCT処理部102での2次元DCT処理をし易くするために、プラス方向に0x80だけレベルシフトされて出力される(以上、図4のステップS201)。   Next, with respect to the converted YCbCr data, pixels are not thinned out for Y (luminance) data, and every other pixel is thinned out in the horizontal and vertical directions for Cb and Cr (both color difference) data. Thus, YCbCr data with a sampling ratio of 4: 2: 0 is generated. Subsequently, the generated Cb and Cr data are level-shifted by 0x80 in the plus direction and output in order to facilitate the two-dimensional DCT processing in the two-dimensional DCT processing unit 102 shown in FIG. Step S201 in FIG.

このサンプリング比4:2:0のYCbCrデータの生成においては、図6に示すように、Cb及びCrデータに各1つのブロックデータの生成に対して、Yデータは4つのブロックデータY0,Y1,Y2,Y3が生成される。よって、画像フォーマット変換部101から出力されるY/Cb/Crの各ブロックデータを、Y0,Y1,Y2,及びY3,並びにCb及びCrとして以下説明する。   In the generation of the YCbCr data with the sampling ratio 4: 2: 0, as shown in FIG. 6, the Y data has four block data Y0, Y1, Y2 and Y3 are generated. Therefore, the Y / Cb / Cr block data output from the image format conversion unit 101 will be described below as Y0, Y1, Y2, and Y3, and Cb and Cr.

次に、2次元DCT処理部102は、画像フォーマット変換部101からそれぞれ出力されたCb及びCr、並びにY0〜Y3について、各1画面分のデータについてブロック単位で2次元DCT処理を行い、それぞれのDCT係数を図1に示すバッファ部103に記憶させる(図4のステップS202)。このとき、バッファ部103に記憶される各DCT係数は、読み出し制御部111によって読み出し可能な状態で記憶される。   Next, the two-dimensional DCT processing unit 102 performs two-dimensional DCT processing on a block-by-block basis for each screen data for Cb and Cr output from the image format conversion unit 101 and Y0 to Y3, respectively. The DCT coefficient is stored in the buffer unit 103 shown in FIG. 1 (step S202 in FIG. 4). At this time, each DCT coefficient stored in the buffer unit 103 is stored in a state in which it can be read by the read control unit 111.

次に、図1の量子化テーブル設定部109は、量子化テーブル記憶部110に予め記憶させてあるCbデータ用のデフォルト量子化テーブルを読み出して量子化処理部104に設定する(図4のステップS203)。続いて、量子化テーブル設定部109は、バッファ部103からCbデータのDCT係数を連続的に読み出すよう読み出し制御部111を制御する。これにより、読み出し制御部111は、バッファ部103をアドレス制御することよって、バッファ部103からCbデータのDCT係数を読み出して量子化処理部104に供給し、ここでCbデータ用のデフォルト量子化テーブルに基づいて量子化させる(図4のステップS204)。   Next, the quantization table setting unit 109 in FIG. 1 reads the default quantization table for Cb data stored in advance in the quantization table storage unit 110 and sets it in the quantization processing unit 104 (step in FIG. 4). S203). Subsequently, the quantization table setting unit 109 controls the read control unit 111 to continuously read out the DCT coefficients of the Cb data from the buffer unit 103. As a result, the read control unit 111 controls the address of the buffer unit 103 to read out the DCT coefficient of the Cb data from the buffer unit 103 and supply the DCT coefficient to the quantization processing unit 104. Here, the default quantization table for Cb data is used. Is quantized based on (step S204 in FIG. 4).

次に、量子化処理部104から出力されたCbの量子化データは、図1のエントロピ符号化部105でハフマン符号化されて更にデータ圧縮される(図4のステップS205)。エントロピ符号化部105でハフマン符号化されたCbの符号データは、必要に応じてバイトスタッフされて出力バッファ部106に一時記憶されると共に、このCbの符号データのデータサイズSIZEbcbが符号量決定部107に記憶される(図4のステップS206,S207)。   Next, the Cb quantized data output from the quantization processing unit 104 is Huffman encoded by the entropy encoding unit 105 in FIG. 1 and further compressed (step S205 in FIG. 4). The Cb code data Huffman-encoded by the entropy encoding unit 105 is byte-stuffed as necessary and temporarily stored in the output buffer unit 106, and the data size SIZEbcb of the Cb code data is the code amount determination unit. 107 (steps S206 and S207 in FIG. 4).

次に、図1の量子化テーブル設定部109は、量子化テーブル記憶部110に予め記憶させてあるCrデータ用のデフォルト量子化テーブルを読み出して量子化処理部104に設定する(図4のステップS208)。これにおいて、Crデータ用のデフォルト量子化テーブルは、前述したCbデータ用のデフォルト量子化テーブルと同一であってもよい。このCrデータに関する以降の処理(図4のステップS209〜S212)は前述したCbデータに関する処理(図4のステップS204〜S207)と同様であるため、説明を省略する。但し、符号量決定部107に記憶されるCrの符号データのデータサイズをSIZEbcrとする。   Next, the quantization table setting unit 109 in FIG. 1 reads the default quantization table for Cr data stored in advance in the quantization table storage unit 110 and sets it in the quantization processing unit 104 (step in FIG. 4). S208). In this case, the default quantization table for Cr data may be the same as the default quantization table for Cb data described above. Since the subsequent processing relating to the Cr data (steps S209 to S212 in FIG. 4) is the same as the processing relating to the Cb data (steps S204 to S207 in FIG. 4), description thereof is omitted. However, the data size of the Cr code data stored in the code amount determination unit 107 is SIZEbcr.

以上により、1画面分の色差データ(Cb及びCr)の圧縮後の符号データが出力バッファ部106に一時記憶されると共に、各符号量SIZEbcb及びSIZEbcrと全体的な1画面分の目標符号量TARGETとが符号量決定部107に設定記憶されることとなる。   As described above, the code data after compression of the color difference data (Cb and Cr) for one screen is temporarily stored in the output buffer unit 106, and each code amount SIZEbcb and SIZEbcr and the overall target code amount TARGET for one screen. Are set and stored in the code amount determination unit 107.

次に、図1の画像圧縮部1(図2の22)は、上記の図4のステップS212の処理に続いて、Yデータのデータ圧縮処理を図5のフローチャートに従って行う。まず、図1の符号量決定部107は、全体的な1画面分の目標符号量TARGETと、Cb及びCrの1画面分の符号量SIZEbcb及びSIZEbcrとからYデータの目標符号量TARGETyを次の計算式によって求めて記憶する(図5のステップS213)。   Next, the image compression unit 1 (22 in FIG. 2) in FIG. 1 performs the data compression process of Y data according to the flowchart in FIG. 5 following the process in step S212 in FIG. First, the code amount determination unit 107 in FIG. 1 calculates the target code amount TARGETy of Y data from the overall target code amount TARGET for one screen and the code amounts SIZEbbc and SIZEbcr for one screen of Cb and Cr as follows. It is obtained by a calculation formula and stored (step S213 in FIG. 5).

TARGETy=TARGET−(SIZEbcb+SIZEbcr)
次に、Yデータについて図6に示したY0,Y1,Y2,及びY3に組み分けされる各輝度データについて、Y0,Y1,Y2,そしてY3の順番でDCT係数の量子化及びエントロピ符号化の各処理を実行する。まず、量子化テーブル設定部109は、量子化テーブル記憶部110に予め記憶してあるYデータ用のデフォルト量子化テーブル(Q0y)を読み出して量子化処理部104に設定する(図5のステップS214)。
TARGETy = TARGET- (SIZEbbcb + SIZEbcr)
Next, for the Y data, the luminance data divided into Y0, Y1, Y2, and Y3 shown in FIG. 6 are subjected to DCT coefficient quantization and entropy coding in the order of Y0, Y1, Y2, and Y3. Execute each process. First, the quantization table setting unit 109 reads the default quantization table (Q0y) for Y data stored in advance in the quantization table storage unit 110 and sets it in the quantization processing unit 104 (step S214 in FIG. 5). ).

続いて、量子化テーブル設定部109は、バッファ部103からY0データのDCT係数を連続的に読み出すよう読み出し制御部111を制御し、これにより、読み出し制御部111はバッファ部103をアドレス制御することによって、バッファ部103からY0データのDCT係数を読み出して量子化処理部104に供給させ、ここで量子化させる(図5のステップS215)。続いて、量子化されたY0データのDCT係数は、エントロピ符号化部105によりハフマン符号化され、得られた符号データのデータサイズSIZE0yが符号量決定部107に供給される(図5のステップS216)。   Subsequently, the quantization table setting unit 109 controls the read control unit 111 so as to continuously read the DCT coefficients of the Y0 data from the buffer unit 103, whereby the read control unit 111 controls the address of the buffer unit 103. Thus, the DCT coefficient of the Y0 data is read from the buffer unit 103 and supplied to the quantization processing unit 104, where it is quantized (step S215 in FIG. 5). Subsequently, the DCT coefficient of the quantized Y0 data is Huffman encoded by the entropy encoding unit 105, and the data size SIZE0y of the obtained code data is supplied to the code amount determining unit 107 (step S216 in FIG. 5). ).

次に、符号量決定部107は、Y0の符号データのデータサイズSIZE0yと、前記Yデータの目標符号量TARGETyとを比較し、例えばSIZE0yがTARGETyの±5%以内にあると判定した場合は、これ以降のY1,Y2,及びY3の処理を止めるよう制御する(図5のステップS217 Yes)。一方、符号量決定部107がSIZE0yがTARGETyの±5%以内にないと判定した場合(ステップS217 No)は、その判定結果が量子化テーブル算出部108に供給され、量子化テーブル算出部108により次の計算式によってY1用の量子化テーブルQ1yが計算される(図5のステップS218)。   Next, the code amount determination unit 107 compares the data size SIZE0y of the Y0 code data with the target code amount TARGETy of the Y data, and when it is determined that, for example, SIZE0y is within ± 5% of TARGETy, Control is performed so as to stop the subsequent processing of Y1, Y2, and Y3 (step S217 Yes in FIG. 5). On the other hand, when the code amount determination unit 107 determines that SIZE0y is not within ± 5% of TARGETy (No in step S217), the determination result is supplied to the quantization table calculation unit 108, and the quantization table calculation unit 108 The quantization table Q1y for Y1 is calculated by the following calculation formula (step S218 in FIG. 5).

Q1y=((1/4)×TARGETy/SIZE0y)×Q0
次に、量子化テーブル設定部109は、量子化テーブル算出部108で算出した上記のY1用の量子化テーブルQ1yを、量子化処理部104に設定する(図5のステップS219)。続いて、前記ステップS215〜S217と同様に、Y1データのDCT係数の量子化処理部104による量子化処理(図5のステップS220)、エントロピ符号化部105によるY1の量子化データの符号化処理(図5のステップS221)、符号量決定部107による、Y1の符号データのデータサイズSIZE1yが前記Yデータの目標符号量TARGETyの±5%以内にあるか否かの判定処理(図5のステップS222)が順次に行われる。
Q1y = ((1/4) × TARGETy / SIZE0y) × Q0
Next, the quantization table setting unit 109 sets the Y1 quantization table Q1y calculated by the quantization table calculation unit 108 in the quantization processing unit 104 (step S219 in FIG. 5). Subsequently, as in steps S215 to S217, the quantization processing unit 104 performs the DCT coefficient quantization processing on the Y1 data (step S220 in FIG. 5), and the entropy encoding unit 105 encodes the Y1 quantization data. (Step S221 in FIG. 5), the code amount determination unit 107 determines whether the data size SIZE1y of the Y1 code data is within ± 5% of the target code amount TARGETy of the Y data (Step in FIG. 5) S222) is performed sequentially.

そして、SIZE1yが目標符号量TARGETyの±5%以内にあるときは以降の処理を中止し、±5%より大きいときは、量子化テーブル算出部108は、次の計算式によってY2用の量子化テーブルQ2yを計算する(図5のステップS223)。   When SIZE1y is within ± 5% of the target code amount TARGETy, the subsequent processing is stopped. When SIZE1y is larger than ± 5%, the quantization table calculation unit 108 performs the quantization for Y2 according to the following equation: The table Q2y is calculated (step S223 in FIG. 5).

Q2y=((1/4)×TARGETy/SIZE1y)×Q1y
次に、量子化テーブル設定部109は、量子化テーブル算出部108で算出した上記のY2用の量子化テーブルQ2yを、量子化処理部104に設定する(図5のステップS224)。続いて、前記ステップS215〜S217と同様に、Y2データのDCT係数の量子化処理部104による量子化処理(図5のステップS225)、エントロピ符号化部105によるY2の量子化データの符号化処理(図5のステップS226)、符号量決定部107による、Y2の符号データのデータサイズSIZE2yが前記Yデータの目標符号量TARGETyの±5%以内にあるか否かの判定処理(図5のステップS227)が順次に行われる。
Q2y = ((1/4) × TARGETy / SIZE1y) × Q1y
Next, the quantization table setting unit 109 sets the Y2 quantization table Q2y calculated by the quantization table calculation unit 108 in the quantization processing unit 104 (step S224 in FIG. 5). Subsequently, similarly to steps S215 to S217, the quantization process by the quantization processing unit 104 of the DCT coefficient of the Y2 data (step S225 in FIG. 5), and the encoding process of the Y2 quantized data by the entropy coding unit 105 (Step S226 in FIG. 5), the code amount determination unit 107 determines whether the data size SIZE2y of the Y2 code data is within ± 5% of the target code amount TARGETy of the Y data (Step in FIG. 5) S227) is performed sequentially.

そして、SIZE2yが目標符号量TARGETyの±5%以内にあるときは以降の処理を中止し、±5%より大きいときは、量子化テーブル算出部108は、次の計算式によってY3用の量子化テーブルQ3yを計算する(図5のステップS228)。   When SIZE2y is within ± 5% of the target code amount TARGETy, the subsequent processing is stopped. When SIZE2y is greater than ± 5%, the quantization table calculation unit 108 performs quantization for Y3 according to the following equation: The table Q3y is calculated (step S228 in FIG. 5).

Q3y=((1/4)×TARGETy/SIZE2y)×Q2y
次に、量子化テーブル設定部109は、量子化テーブル算出部108で算出した上記のY3用の量子化テーブルQ3yを、量子化処理部104に設定する(図5のステップS229)。続いて、前記ステップS215、S216と同様に、Y3データのDCT係数の量子化処理部104による量子化処理(図5のステップS230)、エントロピ符号化部105によるY3の量子化データの符号化処理(図5のステップS231)が順次に行われる。
Q3y = ((1/4) × TARGETy / SIZE2y) × Q2y
Next, the quantization table setting unit 109 sets the Y3 quantization table Q3y calculated by the quantization table calculation unit 108 in the quantization processing unit 104 (step S229 in FIG. 5). Subsequently, similarly to steps S215 and S216, the quantization processing unit 104 performs the DCT coefficient quantization processing on the Y3 data (step S230 in FIG. 5), and the entropy encoding unit 105 encodes the Y3 quantization data. (Step S231 in FIG. 5) is sequentially performed.

そして、量子化テーブル算出部108は、符号量決定部107により決定されたY3の符号データのデータサイズSIZE3yを用いて、次の計算式によって最終的なYデータ全体用の量子化テーブルQyを計算する(図5のステップS232)。   Then, the quantization table calculation unit 108 uses the data size SIZE3y of the Y3 code data determined by the code amount determination unit 107 to calculate the final quantization table Qy for the entire Y data by the following calculation formula: (Step S232 in FIG. 5).

Qy=((1/4)×TARGETy/SIZE3y)×Q3y
続いて、この最終的なYデータ全体用の量子化テーブルQyは、量子化テーブル設定部109により量子化処理部104に設定された後(図5のステップS233)、1画面分のYデータのDCT係数のすべてについて量子化処理部104による量子化処理(図5のステップS234)と、エントロピ符号化部105によるYデータの量子化データの符号化処理(図5のステップS235)とが順次に行われる。
Qy = ((1/4) × TARGETy / SIZE3y) × Q3y
Subsequently, the final quantization table Qy for the entire Y data is set in the quantization processing unit 104 by the quantization table setting unit 109 (step S233 in FIG. 5). For all DCT coefficients, quantization processing by the quantization processing unit 104 (step S234 in FIG. 5) and quantization processing of quantized data of Y data by the entropy coding unit 105 (step S235 in FIG. 5) are sequentially performed. Done.

なお、SIZE0y,SIZE1y,又はSIZE2yがTARGETyの±5%以内にあると判定されて前述したステップS217,S222,又はS227からステップS234に分岐移行された場合は、その時点での量子化テーブルQ1y,Q2y,又はQ3yをQyとして用いる。   If it is determined that SIZE0y, SIZE1y, or SIZE2y is within ± 5% of TARGETy and branching is transferred from step S217, S222, or S227 to step S234, the quantization table Q1y, Q2y or Q3y is used as Qy.

上記のステップS235の処理に続いて、エントロピ符号化部105でハフマン符号化された最終的なYの符号データは、必要に応じてバイトスタッフされて出力バッファ部106に供給されて、既に一時記憶されているCb及びCrの符号データと共に圧縮データとして出力される(図5のステップS236)。このようにして、Iピクチャの処理を行うことで、最終的に目標符号量に最も近似した符号量となる符号データの出力が可能となる。   Subsequent to the processing in step S235 described above, the final Y code data Huffman-encoded by the entropy encoding unit 105 is byte-stuffed as necessary and supplied to the output buffer unit 106, and is already temporarily stored. The compressed Cb and Cr code data are output as compressed data (step S236 in FIG. 5). In this way, by processing the I picture, it is possible to output code data having a code amount that is the closest to the target code amount.

次に、図2の画像圧縮部22は、図3(a)に示す第2のフレーム以降のフレームV2、V3、V4、…、V(n−1)は、上記のようにして符号化して得たIピクチャとの相関関係を用いて符号化する予測フレーム、すなわちPピクチャに符号化する。Pピクチャの符号化においては、符号量制御を行わず、常に同じ処理を行って公知の方法で符号化する。これにより動きが激しい動画ではPピクチャのサイズが大きくなる。   Next, the image compression unit 22 in FIG. 2 encodes the frames V2, V3, V4,..., V (n−1) after the second frame shown in FIG. The prediction frame to be encoded using the correlation with the obtained I picture, that is, the P picture is encoded. In coding a P picture, code amount control is not performed, and the same processing is always performed and coding is performed by a known method. As a result, the size of the P picture is increased in a moving image with intense motion.

静止画を符号化して得たデータ量とフレームの関係の一例を図7(a)に、動画を符号化して得たデータ量とフレームの関係の一例を図7(c)に示す。入力標準テレビジョン信号のnフレーム毎に上記の符号化が行われる(図7の例ではn=6)。このようにして、符号化を行うので、データストリーム全体としてはCBR(コンスタントビットレート)ではなくVBR(バリアブルビットレート)として符号化されることとなる。   FIG. 7A shows an example of the relationship between the data amount obtained by encoding a still image and the frame, and FIG. 7C shows an example of the relationship between the data amount obtained by encoding a moving image and the frame. The above encoding is performed every n frames of the input standard television signal (n = 6 in the example of FIG. 7). Since encoding is performed in this way, the entire data stream is encoded not as CBR (constant bit rate) but as VBR (variable bit rate).

各ピクチャは、それぞれ複数のビデオパケット(ビデオPES(Packetized Elementary Stream))から構成されている。また、図2の音声圧縮部23は、A/D変換部21から入力されたディジタル化された音声信号に対して、圧縮符号化してオーディオパックを出力する。このオーディオパックは、画像圧縮部22から出力されるビデオパケットと共にデータストリームに入れられる。   Each picture is composed of a plurality of video packets (video PES (Packetized Elementary Stream)). 2 compresses and encodes the digitized audio signal input from the A / D converter 21 and outputs an audio pack. This audio pack is put into the data stream together with the video packet output from the image compression unit 22.

オーディオパックとビデオパケットには、それぞれ提示時刻を表すPTS(Presentation Time Stamp)データが含まれている。これらをまとめると、画像圧縮部22と音声圧縮部23の各出力信号は、図3(b)に示すようになる。図3(b)において、V.PESはビデオPES、A.PESはオーディオPESを模式的に示す。ただし、図3(b)において、オーディオPESのみが音声圧縮部23の出力パケットであり、それ以外が画像圧縮部22の出力パケットを示す。また、pa1〜pa4は、固定ビットレートの場合全体のビットレートを一定にするためのパディングパケットである。   Each audio pack and video packet includes PTS (Presentation Time Stamp) data representing the presentation time. In summary, the output signals of the image compression unit 22 and the audio compression unit 23 are as shown in FIG. In FIG. PES is a video PES, A. PES schematically represents an audio PES. However, in FIG. 3B, only the audio PES is an output packet of the audio compression unit 23, and the other is an output packet of the image compression unit 22. Further, pa1 to pa4 are padding packets for making the entire bit rate constant in the case of a fixed bit rate.

図2において、画像圧縮部22から出力された圧縮符号化された画像データ(PS)は、間引き処理部24に供給され、ここで先頭の1フレームのIピクチャを含む連続した3フレーム毎に、先頭のフレームを除く2フレームのビデオパケット(V.PES)と全フレームのパディングパケットとを間引かれた後、ディスク装置25に供給される。一方、これと同時に、音声圧縮部23から出力された圧縮符号化された音声データ(オーディオPES)は、間引かれること無くディスク装置25に供給される。   In FIG. 2, the compression-encoded image data (PS) output from the image compression unit 22 is supplied to the thinning processing unit 24, where every three consecutive frames including the first I frame I picture. Two frames of video packets (V.PES) excluding the first frame and padding packets of all frames are thinned out, and then supplied to the disk device 25. On the other hand, at the same time, the compression-coded audio data (audio PES) output from the audio compression unit 23 is supplied to the disk device 25 without being thinned out.

これにより、ディスク装置25には図3(c)に模式的に示すように、先頭の1フレームのIピクチャと、3フレーム当たり1フレームのPピクチャのビデオPESと、すべてのオーディオPESとからなる離散的なデータが入力され、これらがハードディスクあるいは光ディスクに記録される。すなわち、ディスク装置25は、IピクチャとPピクチャとが時系列的に合成された間欠動画像のフレーム間圧縮が行われたパケットをハードディスクあるいは光ディスクに記録する。ハードディスクあるいは光ディスクに記録される、フレームとデータ量の関係を示す、静止画を間引いたデータの例を図7(b)に、動画を間引いた例を図7(d)に示す。   Thereby, as schematically shown in FIG. 3 (c), the disk device 25 is composed of an I picture of the first frame, a video PES of P picture of one frame per three frames, and all audio PESs. Discrete data is input and recorded on a hard disk or an optical disk. That is, the disk device 25 records, on a hard disk or an optical disk, a packet in which inter-frame compression of an intermittent moving image in which an I picture and a P picture are synthesized in time series is performed. FIG. 7B shows an example of data obtained by thinning out a still image and shows an example of thinning out a moving image, which shows the relationship between a frame and a data amount recorded on a hard disk or an optical disk.

次に、図2の再生系の動作について説明する。CPU2Aはディスク装置25を制御し、ハードディスクあるいは光ディスクに記録されているデータを再生させ、得られた再生データのうちIピクチャ又はPピクチャのビデオPESは画像伸張部26に供給し、オーディオPESは音声伸張部27に供給する。   Next, the operation of the reproduction system of FIG. 2 will be described. The CPU 2A controls the disk device 25 to reproduce the data recorded on the hard disk or the optical disk. Among the obtained reproduction data, the video PES of I picture or P picture is supplied to the image expansion unit 26, and the audio PES is audio. Supply to the extension unit 27.

それぞれの伸張部26、27は内部の基準同期信号STC(System Time Clock)が入力再生データ中のPTSに達した時、そのアクセスユニットを出力する。これにより、画像伸張部26は、例えば図3(c)のIピクチャ、Pピクチャをデコードして、図3(d)に示す先頭の1フレームV1とそれ以降のV4を復号し、これらをD/A変換部28に供給する。   Each of the expansion units 26 and 27 outputs the access unit when an internal reference synchronization signal STC (System Time Clock) reaches the PTS in the input reproduction data. Thereby, the image decompression unit 26 decodes, for example, the I picture and the P picture of FIG. 3C, decodes the first frame V1 and the subsequent V4 shown in FIG. / A converter 28 is supplied.

D/A変換部28は、入力された復号フレームV1及びV4をアナログ画像信号に変換すると共に、間引かれている第2、第3フレームV2、V3を第1フレームV1のアナログ画像信号で補間し、第5、第6フレームを第4フレームV4のアナログ画像信号で補間する等の補間処理を行い、図3(e)に示すように、信号としては毎秒30フレームのNTSC方式標準テレビジョン信号で、中身の画像としては、毎秒10駒の間欠動画像の信号を出力する。   The D / A converter 28 converts the input decoded frames V1 and V4 into analog image signals, and interpolates the thinned second and third frames V2 and V3 with the analog image signals of the first frame V1. Then, interpolation processing such as interpolating the fifth and sixth frames with the analog image signal of the fourth frame V4 is performed. As shown in FIG. 3E, the signal is an NTSC standard television signal of 30 frames per second. Thus, as a content image, an intermittent moving image signal of 10 frames per second is output.

一方、オーディオPESは間引かれていないので、音声伸張部27で伸張されて得られたオーディオデータは、D/A変換部28により、図3(e)に示すように途切れのないアナログ音声信号に変換されて出力される。   On the other hand, since the audio PES has not been thinned out, the audio data obtained by being decompressed by the speech decompression unit 27 is converted into an uninterrupted analog speech signal by the D / A conversion unit 28 as shown in FIG. Is converted to output.

ここで、ディスク装置25が再生するハードディスクあるいは光ディスクに記録されているビデオPESは、静止画を間引いたデータの場合は例えば図7(b)に、動画を間引いたデータの場合は例えば図7(d)に示される。図7(b)、(d)から分かるように、Iピクチャのサイズが固定なので、静止画と動画での画質のばらつきが少なくなる。また、動きが激しい動画ではPピクチャのサイズが大きいので、画質に応じて圧縮率は変化するが、動きが激しいほど高ビットレートになる。   Here, the video PES recorded on the hard disk or the optical disk reproduced by the disk device 25 is, for example, FIG. 7B in the case of data obtained by thinning out still images, and in the case of data in which moving pictures are thinned out, for example, FIG. d). As can be seen from FIGS. 7B and 7D, since the size of the I picture is fixed, variations in image quality between still images and moving images are reduced. In addition, since the size of a P picture is large in a moving image with a large amount of motion, the compression rate changes according to the image quality, but the bit rate increases as the motion increases.

映像を用いて監視を行う場合、通常の状態は静止画が多く、異常があった状態は画面上で動きがあることが多い。そのため、本実施の形態を監視用のVDRに適用すると、通常の状態ではデータ量が少なくなり、異常があった状態では高画質となるので、監視の用途に特に好適である。   When monitoring is performed using video, there are many still images in the normal state, and there are many movements on the screen in the abnormal state. For this reason, when this embodiment is applied to a monitoring VDR, the amount of data decreases in a normal state, and the image quality becomes high in an abnormal state, which is particularly suitable for monitoring purposes.

このように、本実施の形態によれば、画像圧縮部1でIピクチャを目標のデータ量になるよう符号量制御を行って符号化し、GOP単位の符号量制御は行わず、またPピクチャは符号量制御を行わず、動きの大きい画像は多くのデータ量として、Pピクチャの一部を間引いて記録するものとしたので、動画のIピクチャも静止画のIピクチャと同じ符号量となるので画質が劣化せず、また、動きの大きい画像のPピクチャは多くのデータ量となるので、動きに関しても十分な画質で映像を記録媒体に記録できる。   As described above, according to the present embodiment, the image compression unit 1 encodes the I picture by performing the code amount control so that the target data amount is obtained, and does not perform the GOP unit code amount control. Since the code amount control is not performed and a large motion image is recorded as a large amount of data, a part of the P picture is thinned out, so that the moving picture I picture also has the same code quantity as the still picture I picture. Since the image quality does not deteriorate and the P picture of an image with a large amount of motion has a large amount of data, the image can be recorded on the recording medium with a sufficient image quality regarding the motion.

なお、本発明は上記の実施の形態に限定されるものではなく、例えば、画像圧縮部22、音声圧縮部23、画像伸張部26及び音声伸張部27を、エンコード・デコード機能を併せ持つ一つのMPEGコーデック用ICを用いることができる。また、記録手段として実施の形態ではハードディスク又は光ディスクに符号列を記録し再生するディスク装置25を用いているが、磁気テープや磁気ディスクに符号列を記録し再生する磁気記録再生装置、半導体メモリに符号列を記録し再生するメモリ記録再生装置にも本発明を適用することができることは勿論である。   Note that the present invention is not limited to the above-described embodiment. For example, the image compression unit 22, the audio compression unit 23, the image expansion unit 26, and the audio expansion unit 27 are combined into one MPEG having an encoding / decoding function. A codec IC can be used. In the embodiment, the recording device uses a disk device 25 that records and reproduces a code string on a hard disk or an optical disk. However, a magnetic recording / reproducing device that records and reproduces a code string on a magnetic tape or a magnetic disk, and a semiconductor memory. Of course, the present invention can also be applied to a memory recording / reproducing apparatus that records and reproduces a code string.

なお、磁気テープを用いた場合は、前述したヘッドの目詰まりの問題はあるが、本発明によれば従来と同じ容量の磁気テープや磁気ディスクに対して従来よりも大容量の符号列の記録再生、すなわち長時間の記録再生が可能という特長は有する。また、本発明は、図1の画像圧縮部1(図2の22)の動作をコンピュータにより実現するコンピュータプログラムも包含するものである。   In the case of using a magnetic tape, there is a problem of the clogging of the head described above. However, according to the present invention, a code string having a larger capacity than that of the conventional recording can be recorded on a magnetic tape or magnetic disk having the same capacity as the conventional one. There is a feature that reproduction, that is, recording and reproduction for a long time is possible. The present invention also includes a computer program for realizing the operation of the image compression unit 1 (22 in FIG. 2) in FIG. 1 by a computer.

本発明方法の一実施の形態が適用される画像圧縮部のブロック図である。It is a block diagram of an image compression part to which an embodiment of the method of the present invention is applied. 本発明の映像記録装置の一実施の形態のブロック図である。It is a block diagram of one embodiment of a video recording device of the present invention. 図1及び図2の動作説明用タイムチャートである。3 is a time chart for explaining operations of FIGS. 1 and 2. 図1の動作説明用フローチャート(その1)である。FIG. 3 is a flowchart (part 1) for explaining the operation of FIG. 1; FIG. 図1の動作説明用フローチャート(その2)である。FIG. 3 is a flowchart (part 2) for explaining the operation of FIG. 1; 本発明装置における記録画像の一例の模式図である。It is a schematic diagram of an example of the recorded image in this invention apparatus. 本発明の一実施の形態におけるフレームとデータ量の関係の模式図である。It is a schematic diagram of the relationship between the flame | frame and data amount in one embodiment of this invention. 従来の一例のフレームとデータ量の関係の模式図である。It is a schematic diagram of the relationship between a conventional example frame and data amount.

符号の説明Explanation of symbols

1、22 画像圧縮部
20 VDR
21 A/D変換部
23 音声圧縮部
24 間引き処理部
25 ディスク装置
26 画像伸張部
27 音声伸張部
28 D/A変換部
2A 中央処理装置(CPU)
2B 操作部
2C 表示部
101 画像フォーマット変換部
102 2次元DCT処理部
103 バッファ部
104 量子化処理部
105 エントロピ符号化部
106 出力バッファ部
107 符号量決定部
108 量子化テーブル算出部
109 量子化テーブル設定部
110 量子化テーブル記憶部
111 読み出し制御部



1, 22 Image compression unit 20 VDR
21 A / D conversion unit 23 Audio compression unit 24 Thinning-out processing unit 25 Disk device 26 Image expansion unit 27 Audio expansion unit 28 D / A conversion unit 2A Central processing unit (CPU)
2B Operation unit 2C Display unit 101 Image format conversion unit 102 Two-dimensional DCT processing unit 103 Buffer unit 104 Quantization processing unit 105 Entropy encoding unit 106 Output buffer unit 107 Code amount determination unit 108 Quantization table calculation unit 109 Quantization table setting Unit 110 Quantization table storage unit 111 Read control unit



Claims (2)

入力映像信号をフレーム内圧縮符号化したイントラフレーム及び前記イントラフレームとの相関関係を用いて予測符号化した予測フレームのいずれかの符号化を選択的に行う映像符号化方法であって、
前記入力映像信号の連続したnフレーム(nは2以上の自然数)を符号化グループ単位とし、その符号化グループ単位毎に、先頭の1フレームを、データ量を所望の目標値に近付ける符号量制御を行いながら、前記イントラフレームに符号化する第1のステップと、
前記符号化グループ単位毎に、先頭の1フレームを除いた残りの(n−1)フレームを、符号量制御を行うことなく前記予測フレームに符号化する第2のステップと、
前記第2のステップで符号化された前記予測フレームを、予め設定した割合で間引く第3のステップと、
前記第1のステップで得られた前記イントラフレームと、前記第3のステップで間引かれた残りの前記予測フレームとからなる符号列を所定のフォーマットで出力する第4のステップと
を含むことを特徴とする映像符号化方法。
A video encoding method that selectively encodes one of an intra frame obtained by intra-frame compression encoding an input video signal and a prediction frame that is predictively encoded using a correlation with the intra frame,
Code amount control in which n frames (n is a natural number greater than or equal to 2) of the input video signal are set as a coding group unit, and the data amount of the first frame is brought close to a desired target value for each coding group unit. A first step of encoding into the intra frame while performing
A second step of encoding the remaining (n−1) frames excluding the first frame for each encoding group unit into the prediction frame without performing code amount control;
A third step of thinning out the prediction frame encoded in the second step at a preset rate;
And a fourth step of outputting a code string composed of the intra frame obtained in the first step and the remaining prediction frame thinned out in the third step in a predetermined format. A characteristic video encoding method.
入力映像信号をフレーム内圧縮符号化したイントラフレーム及び前記イントラフレームとの相関関係を用いて予測符号化した予測フレームのいずれかの符号化を選択的に行って得られた符号列を記録媒体に記録する映像記録装置であって、
前記入力映像信号の連続したnフレーム(nは2以上の自然数)を符号化グループ単位とし、その符号化グループ単位毎に、先頭の1フレームを、データ量を所望の目標値に近付ける符号量制御を行いながら、前記イントラフレームに符号化する第1の符号化手段と、
前記符号化グループ単位毎に、先頭の1フレームを除いた残りの(n−1)フレームを、符号量制御を行うことなく前記予測フレームに符号化する第2の符号化手段と、
前記第2の符号化手段で符号化された前記予測フレームを、予め設定した割合で間引くフレーム間引き手段と、
前記第1の符号化手段で得られた前記イントラフレームと、前記フレーム間引き手段で間引かれた残りの前記予測フレームとからなる符号列を所定のフォーマットで記録媒体に記録する記録手段と
を有することを特徴とする映像記録装置。
A code string obtained by selectively performing encoding of an intra frame obtained by intra-frame compression encoding of an input video signal and a prediction frame obtained by predictive encoding using a correlation with the intra frame is used as a recording medium. A video recording device for recording,
Code amount control in which n frames (n is a natural number greater than or equal to 2) of the input video signal are set as a coding group unit, and the data amount of the first frame is brought close to a desired target value for each coding group unit. First encoding means for encoding into the intra frame while performing
Second encoding means for encoding the remaining (n−1) frames excluding the first frame for each encoding group unit into the prediction frame without performing code amount control;
Frame thinning means for thinning out the prediction frame encoded by the second encoding means at a preset rate;
Recording means for recording a code string composed of the intra frame obtained by the first encoding means and the remaining prediction frames thinned by the frame thinning means on a recording medium in a predetermined format. A video recording apparatus characterized by that.
JP2005096756A 2005-03-30 2005-03-30 Video encoding method and video recording apparatus Expired - Fee Related JP4293151B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005096756A JP4293151B2 (en) 2005-03-30 2005-03-30 Video encoding method and video recording apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005096756A JP4293151B2 (en) 2005-03-30 2005-03-30 Video encoding method and video recording apparatus

Publications (2)

Publication Number Publication Date
JP2006279638A JP2006279638A (en) 2006-10-12
JP4293151B2 true JP4293151B2 (en) 2009-07-08

Family

ID=37213888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005096756A Expired - Fee Related JP4293151B2 (en) 2005-03-30 2005-03-30 Video encoding method and video recording apparatus

Country Status (1)

Country Link
JP (1) JP4293151B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115767180A (en) * 2022-11-16 2023-03-07 Vidaa国际控股(荷兰)公司 Playing device and video reverse playing method

Also Published As

Publication number Publication date
JP2006279638A (en) 2006-10-12

Similar Documents

Publication Publication Date Title
US6690881B1 (en) Digital camera apparatus and recording method thereof
CN101516031B (en) Image processing apparatus, image processing method
JP2000278692A (en) Compressed data processing method, processor and recording and reproducing system
JP2005354361A (en) Encoding apparatus and encoding method, decoding apparatus and decoding method, program and program recording medium, data recording medium and data structure, and reproducing apparatus
JP5294767B2 (en) Movie playback device, movie playback method, program, and recording medium
JP3850015B2 (en) Digital video signal recording / reproducing apparatus and transmission apparatus
JP4293151B2 (en) Video encoding method and video recording apparatus
JPH08102908A (en) Playback device
JP4289055B2 (en) Transcoder and recording / reproducing apparatus using the same
US6754272B2 (en) Picture signal processing method and apparatus, picture signal recording method and apparatus and recording medium
JPH11308618A (en) Image signal processing apparatus and method, and image signal reproducing apparatus
JPH10271498A (en) Compression data conversion method, information quantity conversion method for image compression data, and image recorder adopting the method
JP3017646B2 (en) Image decoding device with frame rate conversion function
JP2002369220A (en) Extended image coding method, extended image decoding method, extended image coder, extended image decoder and extended image recording medium
JP2000023167A (en) Video decoding apparatus and method, receiving apparatus and reproducing apparatus
JP2005229553A (en) Image processing apparatus
JP4184223B2 (en) Transcoder
JP4487196B2 (en) Recording apparatus and control method thereof
JP2007142809A (en) Video recording device
JP2006054760A (en) Image processing apparatus and image processing method
JP2003333526A (en) Encoding method of intermittent moving picture signal, recording apparatus, reproducing apparatus, and recording and reproducing apparatus
KR100686137B1 (en) Digital broadcast receivers and how to edit and save captured images
JP2006304103A (en) Moving video recording apparatus and moving video recording/reproducing apparatus
JP2005079621A (en) Multi-format encoder, recording system including the same, and one-chip LSI for encoding processing
JP2004040516A (en) Image recording device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070629

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090310

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090317

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090330

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

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130417

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140417

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees