JPH07193818A - Image processing method and image processing apparatus - Google Patents
Image processing method and image processing apparatusInfo
- Publication number
- JPH07193818A JPH07193818A JP32950893A JP32950893A JPH07193818A JP H07193818 A JPH07193818 A JP H07193818A JP 32950893 A JP32950893 A JP 32950893A JP 32950893 A JP32950893 A JP 32950893A JP H07193818 A JPH07193818 A JP H07193818A
- Authority
- JP
- Japan
- Prior art keywords
- picture
- frame
- value
- prediction
- circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/87—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving scene cut or scene change detection in combination with video compression
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/142—Detection of scene cut or scene change
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/179—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a scene or a shot
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
(57)【要約】
【目的】 シーンチェンジやカメラフラッシュなどのよ
うに、不連続なシーンを正確に検出することができるよ
うにする。
【構成】 動きベクトル検出回路102において、入力
された画像の予測を行い、その予測誤差の絶対値の和を
選択回路104に供給する。選択回路104は、各フレ
ーム毎の予測誤差の絶対値の和を複数フレームにわたっ
て平均化し、その平均値と、個々に入力される予測誤差
の絶対値の和とを比較する。予測誤差の絶対値和が平均
値より大きい状態が1回だけ独立に発生したとき、シー
ンチェンジと判定し、2回連続して発生したとき、カメ
ラフラッシュと判定する。
(57) [Summary] [Purpose] To enable accurate detection of discontinuous scenes such as scene changes and camera flashes. [Structure] A motion vector detection circuit 102 predicts an input image and supplies a sum of absolute values of prediction errors to a selection circuit 104. The selection circuit 104 averages the sum of the absolute values of the prediction error for each frame over a plurality of frames, and compares the average value with the sum of the absolute values of the prediction errors that are individually input. When the state where the sum of absolute values of the prediction errors is larger than the average value independently occurs only once, it is determined as a scene change, and when it occurs twice in succession, it is determined as a camera flash.
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像処理方法および画
像処理装置に関し、特に動画像データを圧縮して伝送す
る場合に用いて好適な方法および装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and an image processing apparatus, and more particularly to a method and apparatus suitable for use in compressing and transmitting moving image data.
【0002】[0002]
【従来の技術】動画像データを光磁気ディスクや磁気テ
ープ等にデジタル的に記録する場合、あるいは所定の伝
送媒体を介して伝送する場合、データを符号化し、圧縮
して、データ量を減少するようにしている。2. Description of the Related Art When moving image data is digitally recorded on a magneto-optical disk, a magnetic tape or the like, or transmitted through a predetermined transmission medium, the data is encoded and compressed to reduce the amount of data. I am trying.
【0003】例えば、MPEG方式の画像圧縮方法は、
Iピクチャ、PピクチャまたはBピクチャのいずれかの
予測モードで各フレームの画像を予測し、予測誤差を符
号化して伝送するようにしている。基本的に予測誤差の
みが伝送されるため、各フレームの画像データをそのま
ま伝送する場合に比べて、データ量を縮小することがで
きる。For example, the MPEG image compression method is as follows.
The image of each frame is predicted in any one of the I-picture, P-picture, and B-picture prediction modes, and the prediction error is encoded and transmitted. Since only the prediction error is basically transmitted, the data amount can be reduced as compared with the case where the image data of each frame is transmitted as it is.
【0004】[0004]
【発明が解決しようとする課題】ところで、従来の方法
においては、Iピクチャ、PピクチャまたはBピクチャ
のうち、いずれの予測モードを実行するかは、GOP
(Group of Picture)毎に予め定めら
れており、画像の内容に拘らず、このGOPの予測モー
ドのパターンは固定されていた。In the conventional method, which of the I, P and B pictures is to be executed is determined by the GOP.
It is predetermined for each (Group of Picture), and the pattern of the prediction mode of this GOP is fixed regardless of the content of the image.
【0005】しかしながら、例えば、伝送すべき一連の
ピクチャにシーンチェンジがあると、シーンチェンジの
前のフレームから、シーンチェンジの後のフレームのピ
クチャを予測したとしても、その予測誤差は極めて大き
なものとなり、予測したフレームの画質は劣化する。ま
た、その画質の劣化したフレームを予測画像として、さ
らに他のフレームの画像データを圧縮すると、その他の
フレームの画像データもその画質が劣化することにな
る。However, for example, if there is a scene change in a series of pictures to be transmitted, even if the picture of the frame after the scene change is predicted from the frame before the scene change, the prediction error becomes extremely large. , The image quality of the predicted frame deteriorates. Further, if the frame whose image quality is deteriorated is used as a predicted image and the image data of another frame is compressed, the image quality of the image data of the other frame also deteriorates.
【0006】同様のことは、シーンチェンジが発生せ
ず、関連するピクチャが連続している場合であっても、
そのうちの所定のフレームのピクチャがカメラのフラッ
シュがたかれた画像であるような場合においても発生す
る。[0006] Similarly, even when the scene change does not occur and the related pictures are continuous,
It also occurs when a picture of a predetermined frame of them is an image flashed by a camera.
【0007】本発明はこのような状況に鑑みてなされた
ものであり、シーンチェンジやカメラフラッシュなどに
よる画質の劣化を抑制するものである。The present invention has been made in view of such a situation, and suppresses deterioration of image quality due to a scene change, a camera flash, or the like.
【0008】[0008]
【課題を解決するための手段】請求項1に記載の画像処
理方法は、ピクチャの画像データを処理する画像処理方
法において、複数のピクチャの所定の範囲の画像データ
の差の絶対値を演算し、複数のピクチャの差の絶対値の
平均値を演算し、個々のピクチャの差の絶対値と、平均
値とを比較し、その比較結果に対応して、ピクチャの連
続性を判定することを特徴とする。An image processing method according to claim 1 is an image processing method for processing image data of a picture, wherein an absolute value of a difference between image data in a predetermined range of a plurality of pictures is calculated. , Calculating the average of the absolute values of the differences between a plurality of pictures, comparing the absolute value of the differences between the individual pictures and the average value, and determining the continuity of the pictures according to the comparison result. Characterize.
【0009】請求項2に記載の画像処理方法は、ピクチ
ャの画像データを処理する画像処理方法において、ピク
チャの所定の範囲の画像データの輝度の平均値を演算し
て第1の値とし、複数のピクチャの第1の値の平均値を
演算して第2の値とし、第1の値と第2の値とを比較
し、その比較結果に対応して、ピクチャの連続性を判定
することを特徴とする。According to a second aspect of the present invention, in the image processing method for processing image data of a picture, an average value of luminance of image data in a predetermined range of the picture is calculated as a first value, and a plurality of values are calculated. Calculating the average value of the first values of the pictures to obtain the second value, comparing the first value and the second value, and determining the continuity of the pictures according to the comparison result. Is characterized by.
【0010】絶対値と平均値とを比較して得られる連続
性、または、第1の値と第2の値とを比較して得られる
連続性に対応して、ピクチャを他のピクチャから予測す
る場合の予測モードを選択するようにすることができ
る。A picture is predicted from another picture according to the continuity obtained by comparing the absolute value and the average value or the continuity obtained by comparing the first value and the second value. It is possible to select the prediction mode for the case.
【0011】画像データの差の絶対値は、連続するピク
チャの間、あるいは、2以上離れたピクチャの間で演算
するようにすることができる。The absolute value of the difference between the image data can be calculated between consecutive pictures or between pictures separated by two or more.
【0012】平均値より大きい絶対値が1回だけ独立に
発生したとき、ピクチャのシーンチェンジと判定し、2
回連続して発生したとき、ピクチャのカメラフラッシュ
と判定するようにすることができる。When an absolute value larger than the average value independently occurs only once, it is judged as a scene change of a picture, and 2
When it occurs consecutively, it can be determined as a camera flash of a picture.
【0013】また、第1の値が第2の値より大きくなっ
たとき、ピクチャのカメラフラッシュと判定するように
することができる。Further, when the first value becomes larger than the second value, it can be determined that the picture is a camera flash.
【0014】さらに、絶対値と平均値とを比較して得ら
れる連続性に対応して、ピクチャを他のピクチャから予
測する場合の予測モードを選択するようにする場合、平
均値より大きい絶対値が1回だけ独立に発生したとき、
ピクチャのシーンチェンジと判定し、2回連続して発生
したとき、ピクチャのカメラフラッシュと判定し、シー
ンチェンジのとき、ピクチャのうち、シーンチェンジの
ピクチャまたはその後のピクチャであって、その近傍の
ピクチャの少なくとも1つをIピクチャとして処理し、
カメラフラッシュのとき、カメラフラッシュのピクチャ
をBピクチャとして処理するか、またはその直後のピク
チャをIピクチャとして処理するようにすることができ
る。Further, when the prediction mode for predicting a picture from another picture is selected corresponding to the continuity obtained by comparing the absolute value and the average value, the absolute value larger than the average value is selected. Occurs independently once,
It is determined that it is a scene change of a picture, and when it occurs twice in succession, it is determined to be a camera flash of the picture, and when it is a scene change, it is a picture of the scene change or a picture after it, which is a picture in the vicinity thereof. Process at least one of these as an I picture,
In the case of a camera flash, the picture of the camera flash can be processed as a B picture, or the picture immediately after it can be processed as an I picture.
【0015】さらに、第1の値と第2の値とを比較して
得られる連続性に対応して、ピクチャを他のピクチャか
ら予測する場合の予測モードを選択するとき、第1の値
が第2の値より大きくなったとき、ピクチャのカメラフ
ラッシュと判定し、カメラフラッシュのピクチャをBピ
クチャとして処理するか、またはその直後のピクチャを
Iピクチャとして処理するようにすることができる。Further, when the prediction mode for predicting a picture from another picture is selected corresponding to the continuity obtained by comparing the first value and the second value, the first value is When the value becomes larger than the second value, it can be determined as the camera flash of the picture, and the picture of the camera flash can be processed as the B picture or the picture immediately thereafter can be processed as the I picture.
【0016】これらの方法を適用して、画像処理装置を
実現することができる。An image processing apparatus can be realized by applying these methods.
【0017】[0017]
【作用】請求項1に記載の画像処理方法においては、複
数のピクチャの所定の範囲の画像データの差の絶対値が
演算され、その差の絶対値の平均値がさらに演算され、
差の絶対値と、平均値との比較結果に対応して、ピクチ
ャの連続性が判定される。従って、ピクチャのシーンチ
ェンジあるいはカメラフラッシュを検出することが可能
になる。According to the image processing method of the present invention, the absolute value of the difference between the image data in the predetermined range of the plurality of pictures is calculated, and the average value of the absolute values of the differences is further calculated.
The continuity of the picture is determined according to the result of comparison between the absolute value of the difference and the average value. Therefore, it is possible to detect a scene change of a picture or a camera flash.
【0018】また、請求項2に記載の画像処理方法にお
いては、ピクチャの所定の範囲の画像データの輝度の平
均値が演算され、第1の値が得られるとともに、その第
1の値の、複数のピクチャの平均値を演算してた第2の
値とし、第1の値と第2の値とを比較し、その比較結果
に対応して、ピクチャの連続性が判定される。従って、
ピクチャのカメラフラッシュを検出することが可能とな
る。Further, in the image processing method according to the second aspect, the average value of the luminance of the image data in the predetermined range of the picture is calculated to obtain the first value, and the first value of the first value is calculated. The average value of a plurality of pictures is calculated as a second value, the first value and the second value are compared, and the continuity of the pictures is determined according to the comparison result. Therefore,
It is possible to detect the camera flash of a picture.
【0019】[0019]
【実施例】例えば、テレビ会議システム、テレビ電話シ
ステムなどのように、動画像信号を遠隔地に伝送するシ
ステムにおいては、伝送路を効率良く利用するため、映
像信号のライン相関やフレーム間相関を利用して、画像
信号を圧縮符号化するようになされている。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In a system for transmitting a moving image signal to a remote place such as a video conference system or a video telephone system, for example, in order to efficiently use a transmission path, line correlation and inter-frame correlation of a video signal are By utilizing this, the image signal is compressed and encoded.
【0020】ライン相関を利用すると、画像信号を、例
えばDCT(離散コサイン変換)処理するなどして圧縮
することができる。By using the line correlation, the image signal can be compressed by, for example, DCT (discrete cosine transform) processing.
【0021】また、フレーム間相関を利用すると、画像
信号をさらに圧縮して符号化することが可能となる。例
えば図1に示すように、時刻t1,t2,t3におい
て、フレーム画像PC1,PC2,PC3がそれぞれ発
生しているとき、フレーム画像PC1とPC2の画像信
号の差を演算して、PC12を生成し、また、フレーム
画像PC2とPC3の差を演算して、PC23を生成す
る。通常、時間的に隣接するフレームの画像は、それ程
大きな変化を有していないため、両者の差を演算する
と、その差分信号は小さな値のものとなる。そこで、こ
の差分信号を符号化すれば、符号量を圧縮することがで
きる。Further, by utilizing the inter-frame correlation, it becomes possible to further compress and encode the image signal. For example, as shown in FIG. 1, when frame images PC1, PC2, and PC3 are generated at times t1, t2, and t3, respectively, the difference between the image signals of the frame images PC1 and PC2 is calculated to generate PC12. Also, the difference between the frame images PC2 and PC3 is calculated to generate PC23. Normally, the images of frames that are temporally adjacent do not have such a large change, so when the difference between the two is calculated, the difference signal has a small value. Therefore, if this difference signal is encoded, the code amount can be compressed.
【0022】しかしながら、差分信号のみを伝送したの
では、元の画像を復元することができない。そこで、各
フレームの画像を、Iピクチャ、PピクチャまたはBピ
クチャの3種類のピクチャのいずれかのピクチャとし、
画像信号を圧縮符号化するようにしている。However, if only the differential signal is transmitted, the original image cannot be restored. Therefore, the image of each frame is set to any one of three types of pictures of I picture, P picture, and B picture,
The image signal is compressed and encoded.
【0023】即ち、例えば図2に示すように、フレーム
F1乃至F17までの17フレームの画像信号をグルー
プオブピクチャ(GOP)とし、処理の1単位とする。
そして、その先頭のフレームF1の画像信号はIピクチ
ャとして符号化し、第2番目のフレームF2はBピクチ
ャとして、また第3番目のフレームF3はPピクチャと
して、それぞれ処理する。以下、第4番目以降のフレー
ムF4乃至F17は、BピクチャまたはPピクチャとし
て交互に処理する。That is, for example, as shown in FIG. 2, 17 frames of image signals from frames F1 to F17 are set as a group of pictures (GOP), which is one unit of processing.
Then, the image signal of the leading frame F1 is encoded as an I picture, the second frame F2 is processed as a B picture, and the third frame F3 is processed as a P picture. Hereinafter, the fourth and subsequent frames F4 to F17 are alternately processed as a B picture or a P picture.
【0024】Iピクチャの画像信号としては、その1フ
レーム分の画像信号をそのまま伝送する。これに対し
て、Pピクチャの画像信号としては、基本的には、図2
に示すように、それより時間的に先行するIピクチャま
たはPピクチャの画像信号からの差分を伝送する。さら
にBピクチャの画像信号としては、基本的には、図3に
示すように、時間的に先行するフレームまたは後行する
フレームの両方の平均値からの差分を求め、その差分を
符号化する。As the image signal of the I picture, the image signal for one frame is transmitted as it is. On the other hand, as the image signal of the P picture, basically, as shown in FIG.
, The difference from the image signal of the I picture or P picture that precedes it in time is transmitted. Further, as the image signal of the B picture, basically, as shown in FIG. 3, a difference from the average value of both the temporally preceding frame and the temporally following frame is obtained, and the difference is encoded.
【0025】図4は、このようにして、動画像信号を符
号化する方法の原理を示している。同図に示すように、
最初のフレームF1は、Iピクチャとして処理されるた
め、そのまま伝送データF1Xとして伝送路に伝送され
る(画像内符号化)。これに対して、第2のフレームF
2は、Bピクチャとして処理されるため、時間的に先行
するフレームF1と、時間的に後行するフレームF3の
平均値との差分(予測誤差)が演算され、その差分が伝
送データF2Xとして伝送される。FIG. 4 shows the principle of the method of encoding a moving image signal in this way. As shown in the figure,
Since the first frame F1 is processed as an I picture, it is directly transmitted as transmission data F1X to the transmission path (intra-picture coding). On the other hand, the second frame F
2 is processed as a B picture, a difference (prediction error) between the temporally preceding frame F1 and the temporally subsequent frame F3 average value (prediction error) is calculated, and the difference is transmitted as transmission data F2X. To be done.
【0026】但し、このBピクチャとしての処理は、さ
らに細かく説明すると、4種類存在する。その第1の処
理は、元のフレームF2のデータをそのまま伝送データ
F2Xとして伝送するものであり(SP1)(イントラ
(画像内予測)符号化)、Iピクチャにおける場合と同
様の処理となる。第2の処理は、時間的に後のフレーム
F3からの差分を演算し、その差分(SP2)を伝送す
るものである(後方予測符号化)。第3の処理は、時間
的に先行するフレームF1との差分(SP3)を伝送す
るものである(前方予測符号化)。さらに第4の処理
は、時間的に先行するフレームF1と後行するフレーム
F3の平均値との差分(SP4)を生成し、これを伝送
データF2Xとして伝送するものである(両方向予測符
号化)。However, there are four types of processing for the B picture, which will be described in more detail. The first process is to transmit the data of the original frame F2 as it is as the transmission data F2X (SP1) (intra (intra-picture prediction) coding), and is the same process as in the I picture. The second processing is to calculate the difference from the frame F3 that is temporally later and transmit the difference (SP2) (backward predictive coding). The third process is to transmit a difference (SP3) from the temporally preceding frame F1 (forward predictive coding). Further, the fourth process is to generate a difference (SP4) between the average value of the frame F1 preceding in time and the average value of the frame F3 following, and transmit this as the transmission data F2X (bidirectional predictive coding). .
【0027】この4つの方法のうち、伝送データが最も
少なくなる方法が採用される。Of these four methods, the method that minimizes the amount of transmitted data is adopted.
【0028】尚、差分データを伝送するとき、差分を演
算する対象となるフレームの画像(予測画像)との間の
動きベクトルx1(フレームF1とF2の間の動きベク
トル)(前方予測の場合)、もしくはx2(フレームF
3とF2の間の動きベクトル)(後方予測の場合)、ま
たはx1とx2の両方(両方向予測の場合)が、差分デ
ータとともに伝送される。When the difference data is transmitted, a motion vector x1 (motion vector between the frames F1 and F2) between the difference image and the image of the frame (prediction image) for which the difference is calculated (in the case of forward prediction). , Or x2 (frame F
The motion vector between 3 and F2) (for backward prediction) or both x1 and x2 (for bidirectional prediction) are transmitted with the difference data.
【0029】また、PピクチャのフレームF3は、時間
的に先行するフレームF1を予測画像として、このフレ
ームとの差分信号(SP3)と、動きベクトルx3が演
算され、これが伝送データF3Xとして伝送される(前
方予測符号化)。あるいはまた、元のフレームF3のデ
ータが、そのままデータF3Xとして伝送される(SP
1)(イントラ符号化)。いずれの方法により伝送され
るかは、Bピクチャにおける場合と同様に、伝送データ
がより少なくなる方が選択される。In the frame F3 of the P picture, the frame F1 temporally preceding is used as a predicted image, the differential signal (SP3) from this frame and the motion vector x3 are calculated, and this is transmitted as the transmission data F3X. (Forward predictive coding). Alternatively, the data of the original frame F3 is directly transmitted as the data F3X (SP
1) (Intra coding). As in the case of the B picture, whichever method is used for transmission is selected so that less transmission data is transmitted.
【0030】図5は、上述した原理に基づいて、動画像
信号を符号化して伝送し、これを復号化する装置の構成
例を示している。符号化装置1は、入力された映像信号
を符号化し、伝送路としての記録媒体3に伝送するよう
になされている。そして、復号化装置2は、記録媒体3
に記録された信号を再生し、これを復号して出力するよ
うになされている。FIG. 5 shows an example of the configuration of an apparatus which encodes and transmits a moving image signal based on the above-mentioned principle, and decodes this. The encoding device 1 encodes the input video signal and transmits it to the recording medium 3 as a transmission path. Then, the decryption device 2 uses the recording medium 3
It reproduces the signal recorded in, decodes it, and outputs it.
【0031】符号化装置1においては、入力された映像
信号が前処理回路11に入力され、そこで輝度信号と色
信号(この実施例の場合、色差信号)が分離され、それ
ぞれA/D変換器12,13でA/D変換される。A/
D変換器12,13によりA/D変換されてデジタル信
号となった映像信号は、フレームメモリ14に供給さ
れ、記憶される。フレームメモリ14は、輝度信号を輝
度信号フレームメモリ15に、また、色差信号を色差信
号フレームメモリ16に、それぞれ記憶させる。In the encoding device 1, the input video signal is input to the pre-processing circuit 11, where the luminance signal and the chrominance signal (color difference signal in this embodiment) are separated, and each is an A / D converter. A / D conversion is performed at 12 and 13. A /
The video signal converted into a digital signal by A / D conversion by the D converters 12 and 13 is supplied to and stored in the frame memory 14. The frame memory 14 stores the luminance signal in the luminance signal frame memory 15 and the color difference signal in the color difference signal frame memory 16, respectively.
【0032】フォーマット変換回路17は、フレームメ
モリ14に記憶されたフレームフォーマットの信号を、
ブロックフォーマットの信号に変換する。即ち、図6に
示すように、フレームメモリ14に記憶された映像信号
は、1ライン当りHドットのラインがVライン集められ
たフレームフォーマットのデータとされている。フォー
マット変換回路17は、この1フレームの信号を、16
ラインを単位としてN個のスライスに区分する。The format conversion circuit 17 converts the frame format signal stored in the frame memory 14 into
Convert to block format signal. That is, as shown in FIG. 6, the video signal stored in the frame memory 14 is data in a frame format in which V dots of H dots are collected per line. The format conversion circuit 17 converts this 1-frame signal into 16
The line is used as a unit and divided into N slices.
【0033】そして、各スライスは、M個のマクロブロ
ックに分割される。各マクロブロックは、16×16個
の画素(ドット)に対応する輝度信号により構成され、
この輝度信号は、さらに8×8ドットを単位とするブロ
ックY[1]乃至Y[4]に区分される。そして、この
16×16ドットの輝度信号には、8×8ドットのCb
信号と、8×8ドットのCr信号が対応される。Then, each slice is divided into M macroblocks. Each macroblock is composed of luminance signals corresponding to 16 × 16 pixels (dots),
The luminance signal is further divided into blocks Y [1] to Y [4] each having a unit of 8 × 8 dots. Then, the luminance signal of 16 × 16 dots includes Cb of 8 × 8 dots.
The signals correspond to the 8 × 8 dot Cr signals.
【0034】このように、ブロックフォーマットに変換
されたデータは、フォーマット変換回路17からエンコ
ーダ18に供給され、ここでエンコード(符号化)が行
われる。その詳細については、図7を参照して後述す
る。The data converted into the block format in this way is supplied from the format conversion circuit 17 to the encoder 18, where it is encoded. The details will be described later with reference to FIG. 7.
【0035】エンコーダ18によりエンコードされた信
号は、ビットストリームとして伝送路に出力される。例
えば記録回路19に供給され、デジタル信号として記録
媒体3に記録される。The signal encoded by the encoder 18 is output to the transmission line as a bit stream. For example, it is supplied to the recording circuit 19 and recorded on the recording medium 3 as a digital signal.
【0036】再生回路30により記録媒体3より再生さ
れたデータは、復号化装置2のデコーダ31に供給さ
れ、デコードされる。デコーダ31の詳細については、
図21を参照して後述する。The data reproduced from the recording medium 3 by the reproducing circuit 30 is supplied to the decoder 31 of the decoding device 2 and decoded. For details of the decoder 31,
It will be described later with reference to FIG.
【0037】デコーダ31によりデコードされたデータ
は、フォーマット変換回路32に入力され、ブロックフ
ォーマットからフレームフォーマットに変換される。そ
して、フレームフォーマットの輝度信号は、フレームメ
モリ33の輝度信号フレームメモリ34に供給され、記
憶され、色差信号は色差信号フレームメモリ35に供給
され、記憶される。輝度信号フレームメモリ34と色差
信号フレームメモリ35より読み出された輝度信号と色
差信号は、D/A変換器36と37によりそれぞれD/
A変換され、後処理回路38に供給され、合成される。
そして、例えば、図示せぬCRTなどのディスプレイに
出力され、表示される。The data decoded by the decoder 31 is input to the format conversion circuit 32 and converted from the block format to the frame format. Then, the luminance signal of the frame format is supplied to and stored in the luminance signal frame memory 34 of the frame memory 33, and the color difference signal is supplied to and stored in the color difference signal frame memory 35. The luminance signal and the color difference signal read from the luminance signal frame memory 34 and the color difference signal frame memory 35 are D / A converters 36 and 37, respectively, to D / A
A-converted, supplied to the post-processing circuit 38, and combined.
Then, for example, it is output and displayed on a display such as a CRT (not shown).
【0038】次に図7を参照して、エンコーダ18の構
成例について説明する。符号化されるべき画像データ
は、ピクチャ判定回路49を介して、マクロブロック単
位で動きベクトル検出回路50に入力される。ピクチャ
判定回路49の詳細は、図12を参照して後述するが、
このピクチャ判定回路49においては、予測モードが選
択、決定される。Next, a configuration example of the encoder 18 will be described with reference to FIG. The image data to be encoded is input to the motion vector detection circuit 50 in macroblock units via the picture determination circuit 49. Details of the picture determination circuit 49 will be described later with reference to FIG.
The picture determination circuit 49 selects and determines the prediction mode.
【0039】動きベクトル検出回路50は、ピクチャ判
定回路49により設定された所定のシーケンスに従っ
て、各フレームの画像データを、Iピクチャ、Pピクチ
ャ、またはBピクチャとして処理する。シーケンシャル
に入力される各フレームの画像を、I,P,Bのいずれ
のピクチャとして処理するかは、基本的には予め定めら
れている(例えば、図2と図3に示したように、フレー
ムF1乃至F17により構成されるグループオブピクチ
ャが、I,B,P,B,P,・・・B,Pとして処理さ
れる)が、後述するようにして、ピクチャ判定回路49
により、シーンチェンジやカメラフラッシュが検出され
ると、その予測モードが適応的に変更される。The motion vector detection circuit 50 processes the image data of each frame as an I picture, P picture, or B picture according to the predetermined sequence set by the picture determination circuit 49. Which of I, P, and B pictures to process the images of each frame that is sequentially input is basically determined in advance (for example, as shown in FIG. 2 and FIG. The group of pictures composed of F1 to F17 is processed as I, B, P, B, P, ... B, P), but as will be described later, the picture determination circuit 49
Thus, when a scene change or a camera flash is detected, the prediction mode is adaptively changed.
【0040】Iピクチャとして処理されるフレーム(例
えばフレームF1)の画像データは、動きベクトル検出
回路50からフレームメモリ51の前方原画像部51a
に転送、記憶され、Bピクチャとして処理されるフレー
ム(例えばフレームF2)の画像データは、参照原画像
部51bに転送、記憶され、Pピクチャとして処理され
るフレーム(例えばフレームF3)の画像データは、後
方原画像部51cに転送、記憶される。The image data of a frame (for example, frame F1) processed as an I picture is transmitted from the motion vector detection circuit 50 to the front original image portion 51a of the frame memory 51.
The image data of the frame (for example, frame F2) that is transferred and stored in the reference original image section 51b is the image data of the frame (for example, frame F3) that is transferred and stored in the reference original image portion 51b. , And is transferred to and stored in the rear original image portion 51c.
【0041】また、次のタイミングにおいて、さらにB
ピクチャ(フレームF4)またはPピクチャ(フレーム
F5)として処理すべきフレームの画像が入力されたと
き、それまで後方原画像部51cに記憶されていた最初
のPピクチャ(フレームF3)の画像データが、前方原
画像部51aに転送され、次のBピクチャ(フレームF
4)の画像データが、参照原画像部51bに記憶(上書
き)され、次のPピクチャ(フレームF5)の画像デー
タが、後方原画像部51cに記憶(上書き)される。こ
のような動作が順次繰り返される。Further, at the next timing, B
When an image of a frame to be processed as a picture (frame F4) or P picture (frame F5) is input, the image data of the first P picture (frame F3) stored in the backward original image portion 51c until then is It is transferred to the front original image portion 51a, and the next B picture (frame F
The image data of 4) is stored (overwritten) in the reference original image portion 51b, and the image data of the next P picture (frame F5) is stored (overwritten) in the backward original image portion 51c. Such an operation is sequentially repeated.
【0042】フレームメモリ51に記憶された各ピクチ
ャの信号は、そこから読み出され、予測モード切り替え
回路52において、フレーム予測モード処理、またはフ
ィールド予測モード処理が行なわれる。The signal of each picture stored in the frame memory 51 is read therefrom, and the prediction mode switching circuit 52 performs frame prediction mode processing or field prediction mode processing.
【0043】さらにまた、予測判定回路54の制御の下
に、演算部53において、画像内予測、前方予測、後方
予測、または両方向予測の演算が行なわれる。これらの
処理のうち、いずれの処理を行なうかは、予測誤差信号
(処理の対象とされている参照画像と、これに対する予
測画像との差分)に対応して決定される。このため、動
きベクトル検出回路50は、この判定に用いられる予測
誤差信号の絶対値和(自乗和でもよい)を生成する。Furthermore, under the control of the prediction determination circuit 54, the arithmetic unit 53 performs intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction. Which of these processes is to be performed is determined in accordance with the prediction error signal (difference between the reference image to be processed and the predicted image corresponding thereto). Therefore, the motion vector detection circuit 50 generates the sum of absolute values (or the sum of squares) of the prediction error signal used for this determination.
【0044】ここで、予測モード切り替え回路52にお
けるフレーム予測モードとフィールド予測モードについ
て説明する。Here, the frame prediction mode and field prediction mode in the prediction mode switching circuit 52 will be described.
【0045】フレーム予測モードが設定された場合にお
いては、予測モード切り替え回路52は、動きベクトル
検出回路50より供給される4個の輝度ブロックY
[1]乃至Y[4]を、そのまま後段の演算部53に出
力する。即ち、この場合においては、図8に示すよう
に、各輝度ブロックに奇数フィールドのラインのデータ
と、偶数フィールドのラインのデータとが混在した状態
となっている。このフレーム予測モードにおいては、4
個の輝度ブロック(マクロブロック)を単位として予測
が行われ、4個の輝度ブロックに対して1個の動きベク
トルが対応される。When the frame prediction mode is set, the prediction mode switching circuit 52 supplies the four luminance blocks Y supplied from the motion vector detection circuit 50.
[1] to Y [4] are directly output to the arithmetic unit 53 in the subsequent stage. That is, in this case, as shown in FIG. 8, the data of the odd field lines and the data of the even field lines are mixed in each luminance block. In this frame prediction mode, 4
Prediction is performed in units of luminance blocks (macroblocks), and one motion vector is associated with four luminance blocks.
【0046】これに対して、予測モード切り替え回路5
2は、フィールド予測モードにおいては、図8に示す構
成で動きベクトル検出回路50より入力される信号を、
図9に示すように、4個の輝度ブロックのうち、輝度ブ
ロックY[1]とY[2]を、例えば奇数フィールドの
ラインのドットによりのみ構成させ、他の2個の輝度ブ
ロックY[3]とY[4]を、偶数フィールドのライン
のデータにより構成させて、演算部53に出力する。こ
の場合においては、2個の輝度ブロックY[1]とY
[2]に対して、1個の動きベクトルが対応され、他の
2個の輝度ブロックY[3]とY[4]に対して、他の
1個の動きベクトルが対応される。On the other hand, the prediction mode switching circuit 5
In the field prediction mode, 2 is a signal input from the motion vector detection circuit 50 in the configuration shown in FIG.
As shown in FIG. 9, of the four luminance blocks, the luminance blocks Y [1] and Y [2] are constituted by, for example, only dots of lines in odd fields, and the other two luminance blocks Y [3]. ] And Y [4] are composed of the data of the even field lines and output to the arithmetic unit 53. In this case, two luminance blocks Y [1] and Y [1]
[2] corresponds to one motion vector, and the other two luminance blocks Y [3] and Y [4] correspond to another motion vector.
【0047】動きベクトル検出回路50は、フレーム予
測モードにおける予測誤差の絶対値和と、フィールド予
測モードにおける予測誤差の絶対値和を、予測モード切
り替え回路52に出力する。予測モード切り替え回路5
2は、フレーム予測モードとフィールド予測モードにお
ける予測誤差の絶対値和を比較し、その値が小さい予測
モードに対応する処理を施して、データを演算部53に
出力する。The motion vector detection circuit 50 outputs the sum of absolute values of prediction errors in the frame prediction mode and the sum of absolute values of prediction errors in the field prediction mode to the prediction mode switching circuit 52. Prediction mode switching circuit 5
2 compares the absolute value sums of the prediction errors in the frame prediction mode and the field prediction mode, performs a process corresponding to the prediction mode having the smaller value, and outputs the data to the arithmetic unit 53.
【0048】但し、このような処理は、実際には動きベ
クトル検出回路50で行われる。即ち、動きベクトル検
出回路50は、決定されたモードに対応する構成の信号
を予測モード切り替え回路52に出力し、予測モード切
り替え回路52は、その信号を、そのまま後段の演算部
53に出力する。However, such processing is actually performed by the motion vector detection circuit 50. That is, the motion vector detection circuit 50 outputs a signal having a configuration corresponding to the determined mode to the prediction mode switching circuit 52, and the prediction mode switching circuit 52 outputs the signal as it is to the arithmetic unit 53 in the subsequent stage.
【0049】尚、色差信号は、フレーム予測モードの場
合、図8に示すように、奇数フィールドのラインのデー
タと偶数フィールドのラインのデータとが混在する状態
で、演算部53に供給される。また、フィールド予測モ
ードの場合、図9に示すように、各色差ブロックCb,
Crの上半分(4ライン)が、輝度ブロックY[1],
Y[2]に対応する奇数フィールドの色差信号とされ、
下半分(4ライン)が、輝度ブロックY[3],Y
[4]に対応する偶数フィールドの色差信号とされる。In the frame prediction mode, the color difference signal is supplied to the arithmetic unit 53 in a state where the data of the odd field lines and the data of the even field lines are mixed, as shown in FIG. In the field prediction mode, as shown in FIG. 9, each color difference block Cb,
The upper half (4 lines) of Cr is a luminance block Y [1],
The color difference signal of the odd field corresponding to Y [2],
The lower half (4 lines) is the luminance block Y [3], Y
The color difference signal of the even field corresponding to [4] is set.
【0050】また、動きベクトル検出回路50は、次の
ようにして、予測判定回路54において、画像内予測、
前方予測、後方予測、または両方向予測のいずれの予測
を行なうかを決定するための予測誤差の絶対値和を生成
する。Further, the motion vector detection circuit 50 uses the intra-picture prediction in the prediction judgment circuit 54 as follows.
A sum of absolute values of prediction errors for determining whether to perform forward prediction, backward prediction, or bidirectional prediction is generated.
【0051】即ち、画像内予測の予測誤差の絶対値和と
して、参照画像のマクロブロックの信号Aijの和ΣAij
の絶対値|ΣAij|と、マクロブロックの信号Aijの絶
対値|Aij|の和Σ|Aij|の差を求める。また、前方
予測の予測誤差の絶対値和として、参照画像のマクロブ
ロックの信号Aijと、予測画像のマクロブロックの信号
Bijの差Aij−Bijの絶対値|Aij−Bij|の和Σ|A
ij−Bij|を求める。また、後方予測と両方向予測の予
測誤差の絶対値和も、前方予測における場合と同様に
(その予測画像を前方予測における場合と異なる予測画
像に変更して)求める。That is, the sum ΣAij of the signals Aij of the macroblocks of the reference image is used as the sum of the absolute values of the prediction errors of the intra-picture prediction.
Of the absolute value | ΣAij | of the macroblock signal and the sum Σ | Aij | of the absolute value | Aij | of the macroblock signal Aij. Also, as the sum of absolute values of prediction errors in forward prediction, the sum Σ | A of the absolute value | Aij-Bij | of the difference Aij-Bij between the signal Aij of the macroblock of the reference image and the signal Bij of the macroblock of the predicted image.
ij-Bij | is calculated. Further, the sum of absolute values of the prediction errors of the backward prediction and the bidirectional prediction is also obtained in the same manner as in the case of forward prediction (the predicted image is changed to a predicted image different from that in forward prediction).
【0052】これらの絶対値和は、予測判定回路54に
供給される。予測判定回路54は、前方予測、後方予測
および両方向予測の予測誤差の絶対値和のうち、最も小
さいものを、インタ予測の予測誤差の絶対値和として選
択する。さらに、このインタ予測の予測誤差の絶対値和
と、画像内予測の予測誤差の絶対値和とを比較し、その
小さい方を選択し、この選択した絶対値和に対応するモ
ードを予測モードとして選択する。即ち、画像内予測の
予測誤差の絶対値和の方が小さければ、画像内予測モー
ドが設定される。インタ予測の予測誤差の絶対値和の方
が小さければ、前方予測、後方予測または両方向予測モ
ードのうち、対応する絶対値和が最も小さかったモード
が設定される。The sum of these absolute values is supplied to the prediction judgment circuit 54. The prediction determination circuit 54 selects the smallest sum of absolute values of prediction errors of forward prediction, backward prediction, and bidirectional prediction as the sum of absolute values of prediction errors of inter prediction. Furthermore, the sum of the absolute values of the prediction error of the inter prediction and the sum of the absolute values of the prediction errors of the intra-picture prediction are compared, the smaller one is selected, and the mode corresponding to the selected sum of the absolute values is set as the prediction mode. select. That is, if the sum of absolute values of prediction errors in intra-picture prediction is smaller, the intra-picture prediction mode is set. If the sum of absolute values of prediction errors in inter prediction is smaller, the mode in which the corresponding sum of absolute values is the smallest is set among the forward prediction, backward prediction, and bidirectional prediction modes.
【0053】このように、動きベクトル検出回路50
は、参照画像のマクロブロックの信号を、フレームまた
はフィールド予測モードのうち、予測モード切り替え回
路52により選択されたモードに対応する構成で、予測
モード切り替え回路52を介して演算部53に供給する
とともに、4つの予測モードのうち、予測判定回路54
により選択された予測モードに対応する予測画像と参照
画像の間の動きベクトルを検出し、可変長符号化回路5
8と動き補償回路65に出力する。上述したように、こ
の動きベクトルとしては、対応する予測誤差の絶対値和
が最小となるものが選択される。In this way, the motion vector detection circuit 50
Supplies the signal of the macroblock of the reference image to the arithmetic unit 53 via the prediction mode switching circuit 52 in a configuration corresponding to the mode selected by the prediction mode switching circuit 52 among the frame or field prediction modes. Of the four prediction modes, the prediction determination circuit 54
The motion vector between the prediction image and the reference image corresponding to the prediction mode selected by is detected, and the variable length coding circuit 5
8 and the motion compensation circuit 65. As described above, the motion vector that minimizes the sum of absolute values of the corresponding prediction errors is selected.
【0054】予測判定回路54は、動きベクトル検出回
路50が前方原画像部51aよりIピクチャの画像デー
タを読み出しているとき、予測モードとして、フレーム
またはフィールド(画像)内予測モード(動き補償を行
わないモード)を設定し、演算部53のスイッチ53d
を接点a側に切り替える。これにより、Iピクチャの画
像データがDCTモード切り替え回路55に入力され
る。The prediction determination circuit 54, when the motion vector detection circuit 50 is reading the image data of the I picture from the forward original image portion 51a, uses the intra-frame or field (image) prediction mode (motion compensation is performed as the prediction mode. Mode), and the switch 53d of the calculation unit 53 is set.
To the contact a side. As a result, the I-picture image data is input to the DCT mode switching circuit 55.
【0055】このDCTモード切り替え回路55は、図
10または図11に示すように、4個の輝度ブロックの
データを、奇数フィールドのラインと偶数フィールドの
ラインが混在する状態(フレームDCTモード)、また
は、分離された状態(フィールドDCTモード)、のい
ずれかの状態にして、DCT回路56に出力する。As shown in FIG. 10 or 11, the DCT mode switching circuit 55 is a state in which the data of four luminance blocks are mixed with the lines of odd fields and the lines of even fields (frame DCT mode), or , The separated state (field DCT mode), and outputs to the DCT circuit 56.
【0056】即ち、DCTモード切り替え回路55は、
奇数フィールドと偶数フィールドのデータを混在してD
CT処理した場合における符号化効率と、分離した状態
においてDCT処理した場合の符号化効率とを比較し、
符号化効率の良好なモードを選択する。That is, the DCT mode switching circuit 55 is
Mixed data of odd field and even field D
Comparing the coding efficiency in the case of CT processing and the coding efficiency in the case of DCT processing in the separated state,
Select a mode with good coding efficiency.
【0057】例えば、入力された信号を、図10に示す
ように、奇数フィールドと偶数フィールドのラインが混
在する構成とし、上下に隣接する奇数フィールドのライ
ンの信号と偶数フィールドのラインの信号の差を演算
し、さらにその絶対値の和(または自乗和)を求める。For example, as shown in FIG. 10, the input signal has a structure in which odd field lines and even field lines are mixed, and the difference between the signal of the odd field line and the signal of the even field line that are vertically adjacent to each other. Is calculated, and the sum (or sum of squares) of the absolute values is calculated.
【0058】また、入力された信号を、図11に示すよ
うに、奇数フィールドと偶数フィールドのラインが分離
した構成とし、上下に隣接する奇数フィールドのライン
同士の信号の差と、偶数フィールドのライン同士の信号
の差を演算し、それぞれの絶対値の和(または自乗和)
を求める。As shown in FIG. 11, the input signal has a structure in which the odd field lines and the even field lines are separated, and the difference between the signals of the vertically adjacent odd field lines and the even field lines. Calculates the difference between signals and calculates the sum of absolute values (or sum of squares)
Ask for.
【0059】さらに、両者(絶対値和)を比較し、小さ
い値に対応するDCTモードを設定する。即ち、前者の
方が小さければ、フレームDCTモードを設定し、後者
の方が小さければ、フィールドDCTモードを設定す
る。Further, both (sum of absolute values) are compared and a DCT mode corresponding to a smaller value is set. That is, if the former is smaller, the frame DCT mode is set, and if the latter is smaller, the field DCT mode is set.
【0060】そして、選択したDCTモードに対応する
構成のデータをDCT回路56に出力するとともに、選
択したDCTモードを示すDCTフラグを、可変長符号
化回路58、DCTブロック並び替え回路62、および
動き補償回路65に出力する。Then, the data having the structure corresponding to the selected DCT mode is output to the DCT circuit 56, and the DCT flag indicating the selected DCT mode is output to the variable length coding circuit 58, the DCT block rearranging circuit 62, and the motion. Output to the compensation circuit 65.
【0061】予測モード切り替え回路52における予測
モード(図8、図9)と、このDCTモード切り替え回
路55におけるDCTモード(図10、図11)を比較
して明らかなように、輝度ブロックに関しては、両者の
各モードにおけるデータ構造は実質的に同一である。As is clear from a comparison between the prediction mode in the prediction mode switching circuit 52 (FIGS. 8 and 9) and the DCT mode in the DCT mode switching circuit 55 (FIGS. 10 and 11), regarding the luminance block, The data structures in both modes are substantially the same.
【0062】予測モード切り替え回路52において、フ
レーム予測モード(奇数ラインと偶数ラインが混在する
モード)が選択された場合、DCTモード切り替え回路
55においても、フレームDCTモード(奇数ラインと
偶数ラインが混在するモード)が選択される可能性が高
く、また予測モード切り替え回路52において、フィー
ルド予測モード(奇数フィールドと偶数フィールドのデ
ータが分離されたモード)が選択された場合、DCTモ
ード切り替え回路55において、フィールドDCTモー
ド(奇数フィールドと偶数フィールドのデータが分離さ
れたモード)が選択される可能性が高い。When the frame prediction mode (a mode in which odd lines and even lines are mixed) is selected in the prediction mode switching circuit 52, the DCT mode switching circuit 55 is also in the frame DCT mode (odd lines and even lines are mixed). If the field prediction mode (a mode in which the data in the odd field and the data in the even field are separated) is selected in the prediction mode switching circuit 52, the field in the DCT mode switching circuit 55 is high. There is a high possibility that the DCT mode (mode in which the data of the odd field and the data of the even field are separated) is selected.
【0063】しかしながら、必ずしも常にそのようにな
されるわけではなく、予測モード切り替え回路52にお
いては、予測誤差の絶対値和が小さくなるようにモード
が決定され、DCTモード切り替え回路55において
は、符号化効率が良好となるようにモードが決定され
る。However, this is not always the case, and the prediction mode switching circuit 52 determines the mode so that the sum of the absolute values of the prediction errors becomes smaller, and the DCT mode switching circuit 55 encodes the mode. The mode is determined so that the efficiency is good.
【0064】DCTモード切り替え回路55より出力さ
れたIピクチャの画像データは、DCT回路56に入力
され、DCT(離散コサイン変換)処理され、DCT係
数に変換される。このDCT係数は、量子化回路57に
入力され、送信バッファ59のデータ蓄積量(バッファ
蓄積量)に対応した量子化ステップで量子化された後、
可変長符号化回路58に入力される。The I-picture image data output from the DCT mode switching circuit 55 is input to the DCT circuit 56, subjected to DCT (discrete cosine transform) processing, and converted into DCT coefficients. This DCT coefficient is input to the quantization circuit 57, quantized in a quantization step corresponding to the data storage amount (buffer storage amount) of the transmission buffer 59, and then,
It is input to the variable length coding circuit 58.
【0065】可変長符号化回路58は、量子化回路57
より供給される量子化ステップ(スケール)に対応し
て、量子化回路57より供給される画像データ(いまの
場合、Iピクチャのデータ)を、例えばハフマン符号な
どの可変長符号に変換し、送信バッファ59に出力す
る。The variable length coding circuit 58 is a quantization circuit 57.
In accordance with the supplied quantization step (scale), the image data (in this case, I picture data) supplied from the quantization circuit 57 is converted into a variable length code such as a Huffman code and transmitted. Output to the buffer 59.
【0066】可変長符号化回路58にはまた、量子化回
路57より量子化ステップ(スケール)、予測判定回路
54より予測モード(画像内予測、前方予測、後方予
測、または両方向予測のいずれが設定されたかを示すモ
ード)、動きベクトル検出回路50より動きベクトル、
予測モード切り替え回路52より予測フラグ(フレーム
予測モードまたはフィールド予測モードのいずれが設定
されたかを示すフラグ)、およびDCTモード切り替え
回路55が出力するDCTフラグ(フレームDCTモー
ドまたはフィールドDCTモードのいずれが設定された
かを示すフラグ)が入力されており、これらも可変長符
号化される。In the variable length coding circuit 58, a quantization step (scale) is set by the quantization circuit 57, and a prediction mode (intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction is set by the prediction determination circuit 54. Mode indicating whether or not the motion vector is detected by the motion vector detection circuit 50,
A prediction flag (a flag indicating whether the frame prediction mode or the field prediction mode has been set) is set by the prediction mode switching circuit 52, and a DCT flag (whether the frame DCT mode or the field DCT mode is set by the DCT mode switching circuit 55 is set. Has been input, and these are also variable length coded.
【0067】送信バッファ59は、入力されたデータを
一時蓄積し、蓄積量に対応するデータを量子化回路57
に出力する。送信バッファ59は、そのデータ残量が許
容上限値まで増量すると、量子化制御信号によって量子
化回路57の量子化スケールを大きくすることにより、
量子化データのデータ量を低下させる。また、これとは
逆に、データ残量が許容下限値まで減少すると、送信バ
ッファ59は、量子化制御信号によって量子化回路57
の量子化スケールを小さくすることにより、量子化デー
タのデータ量を増大させる。このようにして、送信バッ
ファ59のオーバフローまたはアンダフローが防止され
る。The transmission buffer 59 temporarily stores the input data and stores the data corresponding to the storage amount in the quantizing circuit 57.
Output to. When the remaining amount of data increases to the allowable upper limit value, the transmission buffer 59 increases the quantization scale of the quantization circuit 57 by the quantization control signal,
The amount of quantized data is reduced. On the contrary, when the data remaining amount decreases to the allowable lower limit value, the transmission buffer 59 uses the quantization control signal to quantize circuit 57.
The data amount of the quantized data is increased by reducing the quantization scale of. In this way, overflow or underflow of the transmission buffer 59 is prevented.
【0068】そして、送信バッファ59に蓄積されたデ
ータは、所定のタイミングで読み出され、伝送路に出力
され、例えば記録回路19を介して記録媒体3に記録さ
れる。Then, the data accumulated in the transmission buffer 59 is read out at a predetermined timing, outputted to the transmission path, and recorded on the recording medium 3 via the recording circuit 19, for example.
【0069】一方、量子化回路57より出力されたIピ
クチャのデータは、逆量子化回路60に入力され、量子
化回路57より供給される量子化ステップに対応して逆
量子化される。逆量子化回路60の出力は、IDCT
(逆DCT)回路61に入力され、逆DCT処理された
後、DCTブロック並び替え回路62に入力される。D
CTブロック並び替え回路62は、入力されたデータ
を、予測モード切り替え回路52から供給される予測フ
ラグと、DCTモード切り替え回路55から供給される
DCTフラグに対応して、データの並び替えを行う。On the other hand, the I picture data output from the quantization circuit 57 is input to the inverse quantization circuit 60 and inversely quantized in accordance with the quantization step supplied from the quantization circuit 57. The output of the inverse quantization circuit 60 is IDCT
It is input to the (inverse DCT) circuit 61, subjected to inverse DCT processing, and then input to the DCT block rearranging circuit 62. D
The CT block rearrangement circuit 62 rearranges the input data according to the prediction flag supplied from the prediction mode switching circuit 52 and the DCT flag supplied from the DCT mode switching circuit 55.
【0070】即ち、予測モード切り替え回路52におい
て、フレーム予測モードが設定されている場合、動き補
償回路65から読み出され、演算部53に供給されるデ
ータは、奇数フィールドのデータと偶数フィールドのデ
ータとが混在する状態となされている。このデータが演
算器63にも供給される。このため、DCTブロック並
び替え回路62は、IDCT回路61より供給されるデ
ータを、フレームDCTモードが設定されている場合、
そのまま演算器63に供給し、フィールドDCTモード
が設定されている場合、奇数フィールドのデータと偶数
フィールドのデータとが分離された状態となされている
ため、これらが混在する状態にデータを並び替えて、演
算器63に出力する。That is, when the frame prediction mode is set in the prediction mode switching circuit 52, the data read from the motion compensation circuit 65 and supplied to the arithmetic unit 53 is the odd field data and the even field data. It is said that the and are mixed. This data is also supplied to the calculator 63. Therefore, the DCT block rearrangement circuit 62 converts the data supplied from the IDCT circuit 61 when the frame DCT mode is set.
When the field DCT mode is set, the data in the odd-numbered field and the data in the even-numbered field are separated, so that the data is rearranged in a mixed state. , To the computing unit 63.
【0071】一方、予測モード切り替え回路52におい
て、フィールド予測モードが設定されている場合、動き
補償回路65より演算部53に供給されるデータは、奇
数フィールドのデータと偶数フィールドのデータとが分
離した状態となされている。このため、DCTブロック
並び替え回路62は、DCTモード切り替え回路55に
よりフィールドDCTモードが設定されている場合、I
DCT回路61より出力されるデータをそのまま演算器
63に供給するが、フレームDCTモードが設定されて
いる場合、奇数フィールドのデータと偶数フィールドの
データとが混在する状態となされているため、これを、
それぞれが分離された状態に並び替えて、演算器63に
出力する。On the other hand, when the field prediction mode is set in the prediction mode switching circuit 52, the data supplied from the motion compensation circuit 65 to the arithmetic unit 53 is the data of the odd field and the data of the even field separated. It is in a state. Therefore, when the field DCT mode is set by the DCT mode switching circuit 55, the DCT block rearranging circuit 62 I
The data output from the DCT circuit 61 is supplied to the arithmetic unit 63 as it is. However, when the frame DCT mode is set, the data of the odd field and the data of the even field are mixed. ,
Each is sorted into a separated state and output to the computing unit 63.
【0072】即ち、DCTブロック並び替え回路62
は、動き補償回路65から演算部53に供給されるデー
タの配列状態と同一の配列状態になるように、IDCT
回路61の出力するデータの並び替えを実行する。That is, the DCT block rearrangement circuit 62.
Is IDCT so that it has the same arrangement state as the arrangement state of the data supplied from the motion compensation circuit 65 to the arithmetic unit 53.
The data output from the circuit 61 is rearranged.
【0073】いまの場合、IDCT回路61より出力さ
れるデータは、Iピクチャのデータであるから、画像内
予測とされている。このため、DCTモード切り替え回
路55がフレームDCTフラグを出力しているとき、I
DCT回路61より出力されたデータは、そのまま演算
器63を介してフレームメモリ64の前方予測画像部6
4aに供給され、記憶される。また、フィールドDCT
フラグが出力されているとき、データの並び替えが行わ
れた後、記憶される。In this case, since the data output from the IDCT circuit 61 is I picture data, it is assumed to be intra-picture prediction. Therefore, when the DCT mode switching circuit 55 is outputting the frame DCT flag, I
The data output from the DCT circuit 61 is directly transmitted via the calculator 63 to the forward prediction image section 6 of the frame memory 64.
4a and stored. Also, the field DCT
When the flag is output, the data is sorted and then stored.
【0074】動きベクトル検出回路50は、シーケンシ
ャルに入力される各フレームの画像データを、たとえ
ば、I,B,P,B,P,B・・・のピクチャとしてそ
れぞれ処理する場合、最初に入力されたフレームの画像
データをIピクチャとして処理した後、次に入力された
フレームの画像をBピクチャとして処理する前に、さら
にその次に入力されたフレームの画像データをPピクチ
ャとして処理する。Bピクチャは、後方予測を伴うた
め、後方予測画像としてのPピクチャが先に用意されて
いないと、復号することができないからである。When the motion vector detection circuit 50 processes the sequentially input image data of each frame as a picture of I, B, P, B, P, B ... After processing the image data of another frame as an I picture, before processing the image of the next input frame as a B picture, the image data of the next input frame is processed as a P picture. This is because a B picture is accompanied by backward prediction and cannot be decoded unless a P picture as a backward predicted image is prepared in advance.
【0075】そこで動きベクトル検出回路50は、Iピ
クチャの処理の次に、後方原画像部51cに記憶されて
いるPピクチャの画像データの処理を開始する。そし
て、上述した場合と同様に、マクロブロック単位でのフ
レーム間差分(予測誤差)の絶対値和が、動きベクトル
検出回路50から予測モード切り替え回路52と予測判
定回路54に供給される。予測モード切り替え回路52
と予測判定回路54は、このPピクチャのマクロブロッ
クの予測誤差の絶対値和に対応して、フレーム/フィー
ルド予測モード、または画像内予測、前方予測、後方予
測、もしくは両方向予測の予測モードを設定する。Then, the motion vector detecting circuit 50 starts the processing of the image data of the P picture stored in the backward original image portion 51c after the processing of the I picture. Then, as in the case described above, the sum of absolute values of the inter-frame difference (prediction error) in macroblock units is supplied from the motion vector detection circuit 50 to the prediction mode switching circuit 52 and the prediction determination circuit 54. Prediction mode switching circuit 52
And the prediction determination circuit 54 sets the frame / field prediction mode, or the prediction mode of intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction in accordance with the sum of the absolute values of the prediction errors of the macroblock of the P picture. To do.
【0076】演算部53は、画像内予測モードが設定さ
れたとき、スイッチ53dを上述したように接点a側に
切り替える。従って、このデータは、Iピクチャのデー
タと同様に、DCTモード切り替え回路55、DCT回
路56、量子化回路57、可変長符号化回路58、送信
バッファ59を介して伝送路に伝送される。また、この
データは、逆量子化回路60、IDCT回路61、DC
Tブロック並び替え回路62、演算器63を介してフレ
ームメモリ64の後方予測画像部64bに供給され、記
憶される。When the intra-picture prediction mode is set, the arithmetic unit 53 switches the switch 53d to the contact a side as described above. Therefore, this data is transmitted to the transmission line via the DCT mode switching circuit 55, the DCT circuit 56, the quantization circuit 57, the variable length coding circuit 58, and the transmission buffer 59, like the I picture data. Further, this data is the inverse quantization circuit 60, the IDCT circuit 61, the DC
It is supplied to and stored in the backward predicted image portion 64b of the frame memory 64 via the T block rearrangement circuit 62 and the computing unit 63.
【0077】前方予測モードの時、スイッチ53dが接
点bに切り替えられるとともに、フレームメモリ64の
前方予測画像部64aに記憶されている画像(いまの場
合、Iピクチャの画像)データが読み出され、動き補償
回路65により、動きベクトル検出回路50が出力する
動きベクトルに対応して動き補償される。即ち、動き補
償回路65は、予測判定回路54より前方予測モードの
設定が指令されたとき、前方予測画像部64aの読み出
しアドレスを、動きベクトル検出回路50がいま出力し
ているマクロブロックの位置に対応する位置から動きベ
クトルに対応する分だけずらしてデータを読み出し、予
測画像データを生成する。In the forward prediction mode, the switch 53d is switched to the contact b, and the image data (in this case, the I picture image) stored in the forward prediction image portion 64a of the frame memory 64 is read out. The motion compensation circuit 65 performs motion compensation corresponding to the motion vector output from the motion vector detection circuit 50. That is, when the prediction determination circuit 54 instructs the motion compensation circuit 65 to set the forward prediction mode, the motion compensation circuit 65 sets the read address of the forward predicted image portion 64a to the position of the macroblock currently output by the motion vector detection circuit 50. Data is read out by shifting from the corresponding position by an amount corresponding to the motion vector, and predicted image data is generated.
【0078】動き補償回路65より出力された予測画像
データは、演算器53aに供給される。演算器53a
は、予測モード切り替え回路52より供給された参照画
像のマクロブロックのデータから、動き補償回路65よ
り供給された、このマクロブロックに対応する予測画像
データを減算し、その差分(予測誤差)を出力する。こ
の差分データは、DCTモード切り替え回路55、DC
T回路56、量子化回路57、可変長符号化回路58、
送信バッファ59を介して伝送路に伝送される。また、
この差分データは、逆量子化回路60、IDCT回路6
1、DCTブロック並び替え回路62により局所的に復
号され、演算器63に入力される。The predicted image data output from the motion compensation circuit 65 is supplied to the calculator 53a. Calculator 53a
Subtracts the predicted image data corresponding to this macroblock supplied from the motion compensation circuit 65 from the data of the macroblock of the reference image supplied from the prediction mode switching circuit 52, and outputs the difference (prediction error). To do. This difference data is the DCT mode switching circuit 55, DC
T circuit 56, quantization circuit 57, variable length coding circuit 58,
It is transmitted to the transmission line via the transmission buffer 59. Also,
This difference data is stored in the inverse quantization circuit 60 and the IDCT circuit 6
1, locally decoded by the DCT block rearrangement circuit 62 and input to the arithmetic unit 63.
【0079】この演算器63にはまた、演算器53aに
供給されている予測画像データと同一のデータが供給さ
れている。演算器63は、DCTブロック並び替え回路
62が出力する差分データに、動き補償回路65が出力
する予測画像データを加算する。これにより、元の(復
号した)Pピクチャの画像データが得られる。このPピ
クチャの画像データは、フレームメモリ64の後方予測
画像部64bに供給され、記憶される。The same data as the predicted image data supplied to the calculator 53a is also supplied to the calculator 63. The calculator 63 adds the predicted image data output by the motion compensation circuit 65 to the difference data output by the DCT block rearrangement circuit 62. As a result, the image data of the original (decoded) P picture is obtained. The image data of the P picture is supplied to and stored in the backward predicted image portion 64b of the frame memory 64.
【0080】動きベクトル検出回路50は、このよう
に、IピクチャとPピクチャのデータが前方予測画像部
64aと後方予測画像部64bにそれぞれ記憶された
後、次にBピクチャの処理を実行する。予測モード切り
替え回路52と予測判定回路54は、マクロブロック単
位でのフレーム間差分の絶対値和の大きさに対応して、
フレーム/フィールドモードを設定し、また、予測モー
ドを画像内予測モード、前方予測モード、後方予測モー
ド、または両方向予測モードのいずれかに設定する。In this way, the motion vector detection circuit 50 executes the processing of the B picture after the data of the I picture and the P picture are stored in the forward prediction image section 64a and the backward prediction image section 64b, respectively. The prediction mode switching circuit 52 and the prediction determination circuit 54 correspond to the magnitude of the sum of absolute values of inter-frame differences in macroblock units,
The frame / field mode is set, and the prediction mode is set to any of the intra-picture prediction mode, the forward prediction mode, the backward prediction mode, and the bidirectional prediction mode.
【0081】上述したように、画像内予測モードまたは
前方予測モードの時、スイッチ53dは接点aまたはb
に切り替えられる。このとき、Pピクチャにおける場合
と同様の処理が行われ、データが伝送される。As described above, in the intra-picture prediction mode or the forward prediction mode, the switch 53d has the contact a or b.
Can be switched to. At this time, the same processing as in the P picture is performed and the data is transmitted.
【0082】これに対して、後方予測モードまたは両方
向予測モードが設定された時、スイッチ53dは、接点
cまたはdにそれぞれ切り替えられる。On the other hand, when the backward prediction mode or the bidirectional prediction mode is set, the switch 53d is switched to the contact c or d, respectively.
【0083】スイッチ53dが接点cに切り替えられて
いる後方予測モードの時、後方予測画像部64bに記憶
されている画像(いまの場合、Pピクチャの画像)デー
タが読み出され、動き補償回路65により、動きベクト
ル検出回路50が出力する動きベクトルに対応して動き
補償される。即ち、動き補償回路65は、予測判定回路
54より後方予測モードの設定が指令されたとき、後方
予測画像部64bの読み出しアドレスを、動きベクトル
検出回路50がいま出力しているマクロブロックの位置
に対応する位置から動きベクトルに対応する分だけずら
してデータを読み出し、予測画像データを生成する。In the backward prediction mode in which the switch 53d is switched to the contact c, the image (in this case, P picture image) data stored in the backward predicted image section 64b is read out and the motion compensation circuit 65 is read. Thus, motion compensation is performed corresponding to the motion vector output by the motion vector detection circuit 50. That is, the motion compensation circuit 65 sets the read address of the backward predicted image portion 64b to the position of the macroblock currently output by the motion vector detection circuit 50 when the backward determination mode setting is instructed by the prediction determination circuit 54. Data is read out by shifting from the corresponding position by an amount corresponding to the motion vector, and predicted image data is generated.
【0084】動き補償回路65より出力された予測画像
データは、演算器53bに供給される。演算器53b
は、予測モード切り替え回路52より供給された参照画
像のマクロブロックのデータから、動き補償回路65よ
り供給された予測画像データを減算し、その差分を出力
する。この差分データは、DCTモード切り替え回路5
5、DCT回路56、量子化回路57、可変長符号化回
路58、送信バッファ59を介して伝送路に伝送され
る。The predicted image data output from the motion compensation circuit 65 is supplied to the calculator 53b. Calculator 53b
Subtracts the prediction image data supplied from the motion compensation circuit 65 from the macroblock data of the reference image supplied from the prediction mode switching circuit 52, and outputs the difference. This difference data is stored in the DCT mode switching circuit 5
5, the DCT circuit 56, the quantization circuit 57, the variable length coding circuit 58, and the transmission buffer 59.
【0085】スイッチ53dが接点dに切り替えられて
いる両方向予測モードの時、前方予測画像部64aに記
憶されている画像(いまの場合、Iピクチャの画像)デ
ータと、後方予測画像部64bに記憶されている画像
(いまの場合、Pピクチャの画像)データが読み出さ
れ、動き補償回路65により、動きベクトル検出回路5
0が出力する動きベクトルに対応して動き補償される。In the bidirectional prediction mode in which the switch 53d is switched to the contact point d, the image (in this case, I picture image) data stored in the forward prediction image section 64a and the backward prediction image section 64b are stored. Image data (in this case, an image of P picture) is read out, and the motion compensation circuit 65 causes the motion vector detection circuit 5 to read.
Motion compensation is performed according to the motion vector output by 0.
【0086】即ち、動き補償回路65は、予測判定回路
54より両方向予測モードの設定が指令されたとき、前
方予測画像部64aと後方予測画像部64bの読み出し
アドレスを、動きベクトル検出回路50がいま出力して
いるマクロブロックの位置に対応する位置から動きベク
トル(この場合の動きベクトルは、前方予測画像用と後
方予測画像用の2つとなる)に対応する分だけずらして
データを読み出し、予測画像データを生成する。That is, in the motion compensation circuit 65, when the bidirectional prediction mode setting is instructed by the prediction determination circuit 54, the motion vector detection circuit 50 sets the read addresses of the forward predicted image portion 64a and the backward predicted image portion 64b to the read addresses. The data is read out by shifting the data from the position corresponding to the position of the output macroblock by the amount corresponding to the motion vector (the motion vector in this case is two for the forward prediction image and the backward prediction image) Generate data.
【0087】動き補償回路65より出力された予測画像
データは、演算器53cに供給される。演算器53c
は、動きベクトル検出回路50より供給された参照画像
のマクロブロックのデータから、動き補償回路65より
供給された予測画像データの平均値を減算し、その差分
を出力する。この差分データは、DCTモード切り替え
回路55、DCT回路56、量子化回路57、可変長符
号化回路58、送信バッファ59を介して伝送路に伝送
される。The predicted image data output from the motion compensation circuit 65 is supplied to the calculator 53c. Calculator 53c
Subtracts the average value of the predicted image data supplied from the motion compensation circuit 65 from the data of the macroblock of the reference image supplied from the motion vector detection circuit 50, and outputs the difference. This difference data is transmitted to the transmission line via the DCT mode switching circuit 55, the DCT circuit 56, the quantization circuit 57, the variable length coding circuit 58, and the transmission buffer 59.
【0088】Bピクチャの画像は、他の画像の予測画像
とされることがないため、フレームメモリ64には記憶
されない。The B picture image is not stored in the frame memory 64 because it is not used as a predicted image of another image.
【0089】尚、フレームメモリ64において、前方予
測画像部64aと後方予測画像部64bは、必要に応じ
てバンク切り替えが行われ、所定の参照画像に対して、
一方または他方に記憶されているものを、前方予測画像
あるいは後方予測画像として切り替えて出力することが
できる。In the frame memory 64, the forward predictive image portion 64a and the backward predictive image portion 64b are bank-switched as necessary, and a predetermined reference image
The one stored in one or the other can be switched and output as the forward prediction image or the backward prediction image.
【0090】以上においては、輝度ブロックを中心とし
て説明をしたが、色差ブロックについても同様に、図8
乃至図11に示すマクロブロックを単位として処理さ
れ、伝送される。尚、色差ブロックを処理する場合の動
きベクトルは、対応する輝度ブロックの動きベクトルを
垂直方向と水平方向に、それぞれ1/2にしたものが用
いられる。In the above description, the luminance block is mainly described, but the same applies to the color difference block in FIG.
Through the macroblocks shown in FIG. 11 are processed and transmitted. The motion vector used for processing the color difference block is obtained by halving the motion vector of the corresponding luminance block in each of the vertical direction and the horizontal direction.
【0091】次に、図7のピクチャ判定回路49につい
て説明する。このピクチャ判定回路49は、例えば図1
2に示すように構成され、この実施例においては、前方
原画像部101a、参照原画像部101b、後方原画像
部101cを有するフレームメモリ101と、フレーム
メモリ101に記憶されているピクチャの予測誤差を演
算し、その絶対値の和を選択回路104に出力する動き
ベクトル検出回路102とを有している。また、必要に
応じて、輝度DC値演算器103が設けられ、入力され
た画像の所定の範囲の輝度データのDC値(平均値)を
演算し、演算して得られた輝度DC値を選択回路104
に出力している。Next, the picture determination circuit 49 of FIG. 7 will be described. The picture determination circuit 49 is, for example, as shown in FIG.
2 and, in this embodiment, a prediction error of a picture stored in the frame memory 101 and a frame memory 101 having a front original image portion 101a, a reference original image portion 101b, and a rear original image portion 101c. And a motion vector detection circuit 102 that outputs the sum of the absolute values to the selection circuit 104. In addition, a brightness DC value calculator 103 is provided as necessary, calculates a DC value (average value) of brightness data in a predetermined range of the input image, and selects the brightness DC value obtained by the calculation. Circuit 104
Is output to.
【0092】選択回路104は、動きベクトル検出回路
102から入力される予測誤差の絶対値和、または輝度
DC値演算器103より入力される輝度DC値より、シ
ーンチェンジまたはカメラフラッシュの少なくとも一方
を検出し、その検出結果に対応して、ピクチャタイプを
選択、決定するようになされている。決定したピクチャ
タイプを規定するピクチャタイプ信号は、図7の動きベ
クトル検出回路50に供給されるようになされている。The selection circuit 104 detects at least one of a scene change and a camera flash from the sum of absolute values of prediction errors input from the motion vector detection circuit 102 or the brightness DC value input from the brightness DC value calculator 103. Then, the picture type is selected and determined according to the detection result. The picture type signal defining the decided picture type is supplied to the motion vector detection circuit 50 of FIG.
【0093】また、このピクチャ判定回路49に入力さ
れた画像データは、選択回路104がピクチャタイプを
決定する上において必要な時間だけ、遅延回路105に
より遅延された後、動きベクトル検出回路50に供給さ
れるようになされている。The image data input to the picture determination circuit 49 is delayed by the delay circuit 105 for a time necessary for the selection circuit 104 to determine the picture type, and then supplied to the motion vector detection circuit 50. It is designed to be done.
【0094】入力された画像データは、動きベクトル検
出回路102を介してフレームメモリ101に供給さ
れ、記憶される。そして、図7の動きベクトル検出回路
50における場合と同様に予測処理を行い、予測誤差の
絶対値和を演算する。選択回路104は、各フレーム毎
に入力される絶対値和の、所定の数のフレーム分につい
ての平均値を演算する。例えば、最新の5フレーム分に
ついての絶対値和の平均値が演算される。その結果、こ
の平均値は、新たなフレームについての予測誤差の絶対
値和が入力される毎に、更新されていく。The input image data is supplied to and stored in the frame memory 101 via the motion vector detection circuit 102. Then, the prediction process is performed as in the case of the motion vector detection circuit 50 of FIG. 7, and the sum of absolute values of prediction errors is calculated. The selection circuit 104 calculates the average value of the sum of absolute values input for each frame for a predetermined number of frames. For example, the average value of the absolute value sums for the latest 5 frames is calculated. As a result, this average value is updated every time the sum of absolute values of prediction errors for a new frame is input.
【0095】そして選択回路104は、図13に示すよ
うな処理を、新たなフレームの予測誤差の絶対値和が入
力される都度、実行する。Then, the selection circuit 104 executes the processing shown in FIG. 13 every time the sum of absolute values of prediction errors of a new frame is input.
【0096】即ち、最初にステップS1において、直前
の5フレーム分の予測誤差の絶対値和の平均値MAEを
N倍(Nは正の実数であって、例えば3倍)した値と、
新たに入力されたi番目のフレームの予測誤差の絶対値
和AEiと比較する。この比較の意味について、図14
を参照して説明する。That is, first, in step S1, a value obtained by multiplying the average value MAE of the absolute value sums of the prediction errors for the immediately preceding five frames by N times (N is a positive real number, for example, 3 times),
It is compared with the sum AE i of the absolute values of the prediction error of the newly input i-th frame. Regarding the meaning of this comparison, FIG.
Will be described with reference to.
【0097】いま、図14(A)に示すように、第0フ
レームから第5フレームまでのピクチャが連続するシー
ン1であり、第6フレームから第11フレームまでのピ
クチャが、それとは異なるシーン2のピクチャであると
する。即ち、この場合、第5フレームと第6フレームの
間において、シーンチェンジが発生していることにな
る。Now, as shown in FIG. 14A, a scene 1 in which pictures from the 0th frame to the 5th frame are continuous and a picture from the 6th frame to the 11th frame is different from the scene 2 Is a picture of. That is, in this case, a scene change has occurred between the fifth frame and the sixth frame.
【0098】この実施例の場合、予測距離(Pピクチャ
の距離)は1とされている。従って、予測画像は、1フ
レーム前のピクチャとされている。そして、基本的に一
番最初のピクチャがIピクチャとされるほか、それに続
くピクチャは全てPピクチャとして処理されるように、
予め定められている。In the case of this embodiment, the prediction distance (distance of P picture) is set to 1. Therefore, the predicted image is the picture one frame before. Then, basically, the first picture is set as an I picture, and all subsequent pictures are processed as P pictures.
It is predetermined.
【0099】図14(B)は、図14(A)に示すピク
チャの予測誤差の絶対値和の変化を表している。図14
(B)において、フレーム番号0の予測誤差の絶対値和
は、第0フレームと第1フレームのピクチャの間の予測
誤差の絶対値和を表している。また、フレーム番号1の
予測誤差の絶対値和は、第1フレームと第2フレームの
間の予測誤差の絶対値和を表している。以下同様にし
て、フレーム番号4の予測誤差の絶対値和は、第4フレ
ームと第5フレームのピクチャの間の予測誤差の絶対値
和を表している。これら第0フレーム乃至第5フレーム
までのピクチャは、図14(A)に示すように、同一の
シーン1のピクチャであるため、その予測誤差の絶対値
和の値は、ほぼ平均値MAEに近い値となっている。FIG. 14B shows a change in sum of absolute values of prediction errors of the picture shown in FIG. 14
In (B), the sum of the absolute values of the prediction errors of the frame number 0 represents the sum of the absolute values of the prediction errors between the pictures of the 0th frame and the 1st frame. Further, the sum of absolute values of prediction errors of frame number 1 represents the sum of absolute values of prediction errors between the first frame and the second frame. Similarly, the sum of the absolute values of the prediction errors of the frame number 4 represents the sum of the absolute values of the prediction errors between the pictures of the fourth frame and the fifth frame. Since the pictures from the 0th frame to the 5th frame are pictures of the same scene 1 as shown in FIG. 14A, the sum of absolute values of the prediction errors is close to the average value MAE. It is a value.
【0100】同様にして、フレーム番号6の位置におけ
る第6フレームと第7フレームの予測誤差の絶対値和か
ら、フレーム番号10における第10フレームと第11
フレームの予測誤差の絶対値和までの値は、同一のシー
ン2の予測誤差の絶対値和であるため、ほぼ平均値MA
Eに近い値となっている。Similarly, from the sum of the absolute values of the prediction errors of the sixth frame and the seventh frame at the position of frame number 6, the 10th frame and the 11th frame of frame number 10 are calculated.
The values up to the sum of the absolute values of the prediction errors of the frame are the sum of the absolute values of the prediction errors of the same scene 2, so that the average value MA
It is close to E.
【0101】これに対して、フレーム番号5における第
5フレームと第6フレームの間の予測誤差の絶対値和
は、シーンチェンジが発生しているピクチャの間におけ
る予測誤差の絶対値和であるため、その値は、平均値M
AEより充分大きな値となっている。そこで、平均値M
AEのN倍の値N×MAEと、個々の予測誤差の絶対値
和AEiとを比較すると、シーンチェンジが発生してい
なければ、i番目のフレームの予測誤差の絶対値和AE
iは、N×MAEより小さい値となる。これに対して、
シーンチェンジが発生しているとき、AEiは、N×M
AE以上の値となる。従って、AEiとN×MAEを比
較することで、シーンチェンジの有無を判定することが
できる。On the other hand, the sum of absolute values of prediction errors between the fifth frame and the sixth frame in frame number 5 is the sum of absolute values of prediction errors between pictures in which a scene change occurs. , Its value is the average value M
The value is sufficiently larger than AE. Therefore, the average value M
Comparing the N times MAE value N × MAE with the absolute value sum AE i of the individual prediction errors, if no scene change occurs, the absolute value sum AE of the prediction errors of the i-th frame
i is a value smaller than N × MAE. On the contrary,
When a scene change occurs, AE i is N × M
The value is AE or more. Therefore, the presence or absence of a scene change can be determined by comparing AE i and N × MAE.
【0102】図13のステップS1において、シーンチ
ェンジが発生していないと判定された場合(AEiが、
N×MAEより小さいと判定された場合)、ステップS
5に進み、予め設定されているピクチャタイプがそのま
ま選択される。When it is determined in step S1 in FIG. 13 that no scene change has occurred (AE i is
If it is determined that it is smaller than N × MAE), step S
In step 5, the preset picture type is selected as it is.
【0103】一方、ステップS1において、AEiが、
N×MAEと等しいか、それより大きい値であると判定
された場合、ステップS2に進み、ステップS1で検出
されたi番目のフレームの次のi+1番目のフレームの
予測誤差の絶対値和AEi+1の値が、基準値N×MAE
と比較される。この比較の意味について、図15を参照
して説明する。On the other hand, in step S1, AE i is
When it is determined that the value is equal to or larger than N × MAE, the process proceeds to step S2, and the absolute value sum AE i of the prediction errors of the i + 1 th frame next to the i th frame detected in step S1. The value of +1 is the reference value N × MAE
Compared to. The meaning of this comparison will be described with reference to FIG.
【0104】予測誤差の絶対値和が急激に大きくなるの
は、図14に示したシーンチェンジの場合だけでなく、
図15に示すように、カメラフラッシュの場合にも発生
する。即ち、図15(A)の例においては、第0フレー
ムから第11フレームまでの各ピクチャのうち、第6フ
レームのピクチャがカメラフラッシュのピクチャである
とすると、このカメラフラッシュのピクチャは、その他
のピクチャに比べて輝度が大きくなっている。Not only the scene change shown in FIG. 14 but also the sum of absolute values of the prediction errors suddenly increases.
As shown in FIG. 15, it also occurs in the case of a camera flash. That is, in the example of FIG. 15A, if the picture of the sixth frame of the pictures from the 0th frame to the 11th frame is a camera flash picture, this camera flash picture is The brightness is higher than that of the picture.
【0105】その結果、図15(B)に示すように、第
5フレームと第6フレームの予測誤差の絶対値和と、第
6フレームと第7フレームの予測誤差の絶対値和の値
は、基準値N×MAEより大きな値となる。これに対し
て、例えば、第4フレームと第5フレームの間の予測誤
差の絶対値和、あるいは第7フレームと第8フレームの
間の予測誤差の絶対値和の値は、何れのフレームも、そ
れぞれカメラフラッシュのピクチャではないため、ほぼ
平均値MAEに近い値となる。As a result, as shown in FIG. 15B, the sum of the absolute values of the prediction errors of the fifth and sixth frames and the sum of the absolute values of the prediction errors of the sixth and seventh frames are: The value is larger than the reference value N × MAE. On the other hand, for example, the sum of absolute values of prediction errors between the fourth frame and the fifth frame or the sum of absolute values of prediction errors between the seventh frame and the eighth frame is Since each of them is not a picture of the camera flash, the value is close to the average value MAE.
【0106】この図15(B)を、図14(B)と比較
して明らかなように、シーンチェンジの場合には、予測
誤差の絶対値和の値が基準値以上となる場合が、1回だ
け単独で発生する。これに対して、カメラフラッシュの
場合には、予測誤差の絶対値和の値が基準値以上となる
場合が、2回連続して発生する。As is apparent from comparison between FIG. 15B and FIG. 14B, in the case of a scene change, the case where the sum of absolute values of prediction errors exceeds the reference value is 1 It occurs only once. On the other hand, in the case of the camera flash, the case where the sum of absolute values of prediction errors is equal to or larger than the reference value occurs twice in succession.
【0107】そこでステップS1において、i番目のフ
レームの予測誤差の絶対値和AEiが、基準値N×MA
Eより大きいと判定された場合、ステップS2におい
て、さらにその直後のフレームi+1番目のフレームの
予測誤差の絶対値和AEi+1が、基準値N×MAEより
大きいか否かを判定することで、シーンチェンジである
のか、カメラフラッシュであるのかを判定することがで
きる。Therefore, in step S1, the absolute value sum AE i of the prediction errors of the i-th frame is calculated as the reference value N × MA.
When it is determined that it is larger than E, in step S2, it is further determined whether or not the sum AE i + 1 of absolute values of the prediction errors of the frame i + 1 frame immediately thereafter is larger than the reference value N × MAE. It is possible to determine whether it is a scene change or a camera flash.
【0108】シーンチェンジである場合においては、i
+1番目のフレームの予測誤差の絶対値和は、基準値よ
り小さい値となる。これに対して、カメラフラッシュの
場合においては、i+1番目のフレームの予測誤差の絶
対値和も、基準値以上の値となる。そこで、ステップS
2において、i+1番目のフレームの予測誤差の絶対値
和AEi+1が、基準値N×MAEより小さいと判定され
た場合(シーンチェンジであると判定された場合)、ス
テップS3に進み、シーンチェンジに最適なピクチャタ
イプの選択が行われる。これに対して、ステップS2に
おいて、i+1番目のフレームの予測誤差の絶対値和A
Ei+1が、基準値N×MAEより大きいと判定された場
合(カメラフラッシュであると判定された場合)、ステ
ップS4に進み、カメラフラッシュにおけるピクチャタ
イプの最適化処理が実行される。In the case of a scene change, i
The sum of the absolute values of the prediction errors of the + 1st frame is smaller than the reference value. On the other hand, in the case of the camera flash, the sum of absolute values of the prediction errors of the (i + 1) th frame also becomes a value equal to or larger than the reference value. Therefore, step S
2, when it is determined that the sum AE i + 1 of the absolute values of the prediction error of the i + 1-th frame is smaller than the reference value N × MAE (when it is determined that it is a scene change), the process proceeds to step S3, and the scene The optimum picture type for change is selected. On the other hand, in step S2, the absolute value sum A of the prediction error of the (i + 1) th frame A
When it is determined that E i + 1 is larger than the reference value N × MAE (when it is determined that it is a camera flash), the process proceeds to step S4, and the optimization process of the picture type in the camera flash is executed.
【0109】図16は、ステップS3のシーンチェンジ
におけるピクチャタイプの最適化処理の例を表してい
る。この例においては、シーンチェンジのあった第6フ
レームのピクチャの処理が、Pピクチャの処理からIピ
クチャの処理に変更されている。このため、第6フレー
ムのピクチャ、および第6フレームのピクチャを予測画
像とする第7フレームのピクチャ、さらに第7フレーム
のピクチャを予測画像とする第8フレームのピクチャ、
といった第6フレーム以降の各ピクチャの予測誤差が大
きくなることが防止される。FIG. 16 shows an example of picture type optimization processing in the scene change of step S3. In this example, the processing of the picture of the sixth frame in which the scene has changed is changed from the processing of the P picture to the processing of the I picture. Therefore, the sixth frame picture, the seventh frame picture in which the sixth frame picture is the predicted image, and the eighth frame picture in which the seventh frame picture is the predicted image,
It is possible to prevent the prediction error of each picture after the sixth frame from increasing.
【0110】あるいはまた、第6フレームはそのままP
ピクチャとして処理し、その次の第7フレームをIピク
チャとして処理するようにすることも可能である。この
ようにすると、シーン2の第6フレームのピクチャは、
シーン1の第5フレームを予測画像として予測されるた
め、予測誤差が大きくなり、その画質が劣化するが、そ
の次の第7フレームのピクチャはIピクチャとして処理
されるため、その画質の劣化が、後続するフレームのピ
クチャに伝搬することが防止される。Alternatively, the sixth frame remains P
It is also possible to process it as a picture and process the next seventh frame as an I picture. By doing this, the picture of the sixth frame of scene 2 will be
Since the fifth frame of scene 1 is predicted as the predicted image, the prediction error increases and the image quality deteriorates. However, the picture of the subsequent seventh frame is processed as an I picture, and thus the image quality deteriorates. , Is prevented from being propagated to the picture of the subsequent frame.
【0111】図17は、ステップS4におけるカメラフ
ラッシュのピクチャタイプの最適化処理の例を表してい
る。この例においては、カメラフラッシュのあった第6
フレームの次の第7フレームの予測処理が、Pピクチャ
からIピクチャに変更されている。このため、カメラフ
ラッシュのあった第6フレームのピクチャは、その直前
の第5フレームのピクチャから予測されるため、その画
質は劣化するが、その画質の劣化が、第7フレーム以降
の処理に伝搬することが防止される。FIG. 17 shows an example of the optimization process of the picture type of the camera flash in step S4. In this example, the 6th camera flash
The prediction process of the seventh frame following the frame is changed from the P picture to the I picture. For this reason, the picture of the sixth frame in which the camera flash was present is predicted from the picture of the fifth frame immediately before it, so its image quality deteriorates, but the deterioration of the image quality propagates to the processing of the seventh frame and thereafter. Is prevented.
【0112】以上のようにして、図12の選択回路10
4は、所定のピクチャタイプを選択、決定し、そのピク
チャタイプ信号を動きベクトル検出回路50に出力す
る。動きベクトル検出回路50は、遅延回路105より
供給された入力画像データを、このピクチャタイプに対
応して、上述したようにして処理することになる。As described above, the selection circuit 10 of FIG.
4 selects and determines a predetermined picture type and outputs the picture type signal to the motion vector detection circuit 50. The motion vector detection circuit 50 processes the input image data supplied from the delay circuit 105 as described above according to this picture type.
【0113】以上においては、予測誤差の絶対値和か
ら、シーンチェンジとカメラフラッシュを検出するよう
にしたが、輝度DC値を用いてカメラフラッシュを検出
することも可能である。図18は、その原理を表してい
る。即ち、輝度DC値演算器103は、入力された画像
データから、輝度値のDC値(平均値)を演算する。In the above, the scene change and the camera flash are detected from the sum of the absolute values of the prediction errors, but it is also possible to detect the camera flash using the luminance DC value. FIG. 18 shows the principle. That is, the brightness DC value calculator 103 calculates a DC value (average value) of brightness values from the input image data.
【0114】図18(A)に示すように、第6フレーム
においてカメラフラッシュが発生し、その他のフレーム
においてはカメラフラッシュが発生していないとする
と、図18(B)に示すように、第6フレーム以外の各
フレームのピクチャの輝度Yiは、数フレーム分の輝度
の平均値MYに近い値となっている。これに対して、カ
メラフラッシュが発生した第6フレームのピクチャの輝
度Y6は、平均値MYのM倍(Mは正の実数であり、例
えば3倍)以上の値となっている。そこで、i番目のフ
レームの輝度の平均値の和Yiを、基準値M×MYと比
較することにより、カメラフラッシュが発生したか否か
を判定することができる。As shown in FIG. 18A, if the camera flash occurs in the sixth frame and the camera flash does not occur in other frames, as shown in FIG. The luminance Y i of the picture of each frame other than the frame is a value close to the average value MY of the luminance of several frames. On the other hand, the luminance Y 6 of the picture of the sixth frame generated by the camera flash is a value M times (M is a positive real number, for example, 3 times) the average value MY or more. Therefore, by comparing the sum Y i of the average luminance values of the i-th frame with the reference value M × MY, it is possible to determine whether or not a camera flash has occurred.
【0115】そこで、図12の選択回路104は、輝度
DC値演算器103が、各フレームの輝度の平均値の和
を出力すると、図19に示すような処理を実行する。即
ち、ステップS11において、輝度DC値演算器103
から入力される各フレームの輝度の平均値の和Yiを、
基準値M×MYと比較する。図18に示したように、カ
メラフラッシュが発生していなければ、このYiは、基
準値M×MYより小さい値となる。この場合において
は、ステップS14に進み、予め設定されているピクチ
ャタイプをそのまま選択する。Therefore, when the brightness DC value calculator 103 outputs the sum of the average values of the brightness of each frame, the selection circuit 104 of FIG. 12 executes the processing shown in FIG. That is, in step S11, the brightness DC value calculator 103
The sum Y i of the average values of the brightness of each frame input from
Compare with the reference value M × MY. As shown in FIG. 18, if the camera flash has not occurred, this Y i becomes a value smaller than the reference value M × MY. In this case, the process proceeds to step S14 and the preset picture type is selected as it is.
【0116】これに対して、ステップS11において、
Yiの値が、基準値M×MY以上の大きさと判定された
場合、ステップS12に進み、さらにその次のフレーム
の輝度の平均値の和Yi+1が、基準値M×MYより大き
いか否かが判定される。カメラフラッシュは瞬間的に発
生するものであるため、1フレームのピクチャの輝度が
大きい値となっており、その前後のフレームのピクチャ
の輝度は、通常の輝度レベルに戻っていることが多い。
逆に、2以上のフレームにわたって輝度のレベルが大き
く増加した場合においては、カメラフラッシュではな
く、元々のピクチャの輝度が全体的に大きくなったもの
と考えられる。On the other hand, in step S11,
If it is determined that the value of Y i is greater than or equal to the reference value M × MY, the process proceeds to step S12, and the sum Y i + 1 of the average values of the brightness of the next frame is larger than the reference value M × MY. It is determined whether or not. Since the camera flash is generated instantaneously, the brightness of the picture of one frame has a large value, and the brightness of the pictures of the frames before and after that often returns to the normal brightness level.
On the contrary, when the brightness level greatly increases over two or more frames, it is considered that the brightness of the original picture, not the camera flash, has increased as a whole.
【0117】そこで、ステップS12において、i+1
番目のフレームの輝度の平均値の和Yi+1が、基準値M
×MYより大きいと判定された場合においては、ステッ
プS14に進み、カメラフラッシュと判定せず、ピクチ
ャタイプは、予め設定されているものをそのまま選択す
る。Therefore, in step S12, i + 1
The sum Y i + 1 of the average luminance values of the th frame is the reference value M
When it is determined that the value is larger than × MY, the process proceeds to step S14, the camera flash is not determined, and the preset picture type is selected as it is.
【0118】これに対して、i+1番目のフレームの輝
度の平均値の和Yi+1が、基準値M×MYより小さいと
判定された場合、即ち、1フレームの輝度のレベルが、
その前後のフレームの輝度より大きいと判定された場合
においては、カメラフラッシュであると判定し、ステッ
プS13に進み、カメラフラッシュに対応するピクチャ
タイプの最適化処理が実行される。On the other hand, when it is determined that the sum Y i + 1 of the average luminance values of the i + 1-th frame is smaller than the reference value M × MY, that is, the luminance level of one frame is
If it is determined that the brightness is higher than the brightness of the frames before and after that, it is determined to be the camera flash, the process proceeds to step S13, and the optimization process of the picture type corresponding to the camera flash is executed.
【0119】尚、各フレームの輝度を検出する場合、図
20に示すように、フレームの全体の画素(X×Y個の
画素)の輝度の平均値を演算するようにすることもでき
るし、あるいは、X×Y個の画素データのうち、所定の
範囲のm×n個の画素の輝度の平均値を演算するように
することも可能である。この場合、m×n個の範囲を、
X×Y個の範囲の中央としても良いし、左上、右上、左
下、右下などとすることも可能である。When detecting the brightness of each frame, as shown in FIG. 20, it is possible to calculate the average value of the brightness of all pixels (X × Y pixels) of the frame, Alternatively, it is also possible to calculate the average value of the luminance of m × n pixels in a predetermined range among the X × Y pixel data. In this case, m × n ranges are
It may be the center of the X × Y range, or may be the upper left, upper right, lower left, lower right, or the like.
【0120】図21は、図5のデコーダ31の一実施例
の構成を示すブロック図である。伝送路(記録媒体3)
を介して伝送された符号化された画像データは、図示せ
ぬ受信回路で受信されたり、再生回路30で再生され、
デコーダ31の受信バッファ81に一時記憶された後、
復号回路90の可変長復号化回路82に供給される。可
変長復号化回路82は、受信バッファ81より供給され
たデータを可変長復号化し、動きベクトル、予測モー
ド、予測フラグおよびDCTフラグを動き補償回路88
に、また、量子化ステップ(スケール)を逆量子化回路
83に、それぞれ出力するとともに、復号された画像デ
ータを逆量子化回路83に出力する。さらに、DCTフ
ラグと予測フラグを、DCTブロック並び替え回路85
に出力する。FIG. 21 is a block diagram showing the structure of an embodiment of the decoder 31 shown in FIG. Transmission line (recording medium 3)
The encoded image data transmitted via the receiving unit is received by a receiving circuit (not shown) or reproduced by the reproducing circuit 30,
After being temporarily stored in the reception buffer 81 of the decoder 31,
It is supplied to the variable length decoding circuit 82 of the decoding circuit 90. The variable length decoding circuit 82 performs variable length decoding on the data supplied from the reception buffer 81, and calculates the motion vector, the prediction mode, the prediction flag and the DCT flag by the motion compensation circuit 88.
In addition, the quantization step (scale) is output to the inverse quantization circuit 83, and the decoded image data is output to the inverse quantization circuit 83. Furthermore, the DCT flag and the prediction flag are set to the DCT block rearrangement circuit 85.
Output to.
【0121】逆量子化回路83は、可変長復号化回路8
2より供給された画像データを、同じく可変長復号化回
路82より供給された量子化ステップに従って逆量子化
し、IDCT回路84に出力する。逆量子化回路83よ
り出力されたデータ(DCT係数)は、IDCT回路8
4で、逆DCT処理され、元の画像データに戻される。The inverse quantization circuit 83 is used in the variable length decoding circuit 8
The image data supplied from No. 2 is inversely quantized according to the quantization step supplied from the variable length decoding circuit 82, and output to the IDCT circuit 84. The data (DCT coefficient) output from the inverse quantization circuit 83 is the IDCT circuit 8
In step 4, inverse DCT processing is performed to restore the original image data.
【0122】この画像データは、さらにDCTブロック
並び替え回路85に入力される。DCTブロック並び替
え回路85は、DCTフラグと予測フラグに対応して、
このデータを、動き補償回路88が演算器86に出力す
るデータと同一の配列状態になるように並び替えを行
い、演算器86に出力する。This image data is further input to the DCT block rearrangement circuit 85. The DCT block rearrangement circuit 85 corresponds to the DCT flag and the prediction flag,
This data is rearranged so that it has the same arrangement state as the data output by the motion compensation circuit 88 to the arithmetic unit 86, and is output to the arithmetic unit 86.
【0123】DCTブロック並び替え回路85より供給
された画像データが、Iピクチャのデータである場合、
そのデータは演算器86より出力され、演算器86に後
に入力される画像データ(PピクチャまたはBピクチャ
のデータ)の予測画像データ生成のために、フレームメ
モリ87の前方予測画像部87aに供給されて記憶され
る。また、このデータは、フォーマット変換回路32
(図5)に出力される。When the image data supplied from the DCT block rearrangement circuit 85 is I picture data,
The data is output from the computing unit 86, and is supplied to the forward prediction image unit 87a of the frame memory 87 to generate predicted image data of image data (P picture or B picture data) that is input to the computing unit 86 later. Will be remembered. In addition, this data is the format conversion circuit 32.
(Fig. 5).
【0124】DCTブロック並び替え回路85より供給
された画像データが、その1フレーム前(本来の画像の
順序が、I,B,Pの順であるときは、2フレーム前)
の画像データを予測画像データとするPピクチャのデー
タであって、前方予測モードのデータである場合、フレ
ームメモリ87の前方予測画像部87aに記憶されてい
る、1フレーム前の画像データ(Iピクチャのデータ)
が読み出され、動き補償回路88で可変長復号化回路8
2より出力された動きベクトルに対応する動き補償が施
される。そして、演算器86において、DCTブロック
並び替え回路85より供給された画像データ(差分のデ
ータ)と加算され、出力される。この加算されたデー
タ、即ち、復号されたPピクチャのデータは、演算器8
6に後に入力される画像データ(BピクチャまたはPピ
クチャのデータ)の予測画像データ生成のために、フレ
ームメモリ87の後方予測画像部87bに供給されて記
憶される。The image data supplied from the DCT block rearrangement circuit 85 is one frame before (two frames before when the original image order is I, B, P).
If the data is a P-picture in which the image data of P is the predicted image data, and the data is in the forward prediction mode, the image data of one frame before (I-picture) stored in the forward prediction image unit 87a of the frame memory 87 is stored. data from)
Is read out, and the motion compensation circuit 88 uses the variable length decoding circuit 8
Motion compensation corresponding to the motion vector output from 2 is performed. Then, in the arithmetic unit 86, the image data (difference data) supplied from the DCT block rearrangement circuit 85 is added and output. The added data, that is, the decoded P picture data is calculated by the arithmetic unit 8
6 is supplied to and stored in the backward predicted image section 87b of the frame memory 87 for generation of predicted image data of image data (B picture or P picture data) input later.
【0125】Pピクチャのデータであっても、画像内予
測モードのデータは、Iピクチャのデータと同様に、演
算器86で特に処理は行わず、そのまま後方予測画像部
87bに記憶される。Even in the case of P-picture data, the intra-picture prediction mode data is stored in the backward-prediction image section 87b as it is without any special processing by the arithmetic unit 86, as in the I-picture data.
【0126】このPピクチャは、本来の画像の順序が、
I,P,P,Pであるとき、そのまま出力されるが、
I,B,P,B,Pであるとき、次のBピクチャの次に
表示されるべき画像であるため、この時点では、まだフ
ォーマット変換回路32へ出力されない(上述したよう
に、Bピクチャの後に入力されたPピクチャが、Bピク
チャより先に処理され、伝送されている)。In this P picture, the original order of images is
When it is I, P, P, P, it is output as it is,
When it is I, B, P, B, or P, it is an image to be displayed next to the next B picture, and therefore it is not yet output to the format conversion circuit 32 at this point (as described above, the B picture The P picture input later is processed and transmitted before the B picture).
【0127】DCTブロック並び替え回路85より供給
された画像データが、Bピクチャのデータである場合、
可変長復号化回路82より供給された予測モードに対応
して、フレームメモリ87の前方予測画像部87aに記
憶されているIピクチャの画像データ(前方予測モード
の場合)、後方予測画像部87bに記憶されているPピ
クチャの画像データ(後方予測モードの場合)、また
は、その両方の画像データ(両方向予測モードの場合)
が読み出され、動き補償回路88において、可変長復号
化回路82より出力された動きベクトルに対応する動き
補償が施されて、予測画像が生成される。但し、動き補
償を必要としない場合(画像内予測モードの場合)、予
測画像は生成されない。When the image data supplied from the DCT block rearrangement circuit 85 is B picture data,
Corresponding to the prediction mode supplied from the variable length decoding circuit 82, the image data of the I picture stored in the forward prediction image section 87a of the frame memory 87 (in the case of the forward prediction mode) and the backward prediction image section 87b. Stored P-picture image data (in backward prediction mode) or both image data (in bidirectional prediction mode)
Is read out, and the motion compensation circuit 88 performs motion compensation corresponding to the motion vector output from the variable length decoding circuit 82 to generate a predicted image. However, when motion compensation is not required (in the case of the intra-picture prediction mode), the predicted picture is not generated.
【0128】このようにして、動き補償回路88で動き
補償が施されたデータは、演算器86において、DCT
ブロック並び替え回路85の出力と加算される。この加
算出力は、フォーマット変換回路32に出力される。The data thus motion-compensated by the motion compensation circuit 88 is processed by the arithmetic unit 86 by the DCT.
It is added to the output of the block rearrangement circuit 85. This addition output is output to the format conversion circuit 32.
【0129】但し、この加算出力はBピクチャのデータ
であり、他の画像の予測画像生成のために利用されるこ
とがないため、フレームメモリ87には記憶されない。However, since this addition output is B picture data and is not used for generating a predicted image of another image, it is not stored in the frame memory 87.
【0130】Bピクチャの画像が出力された後、後方予
測画像部87bに記憶されているPピクチャの画像デー
タが読み出され、動き補償回路88、演算器86を介し
て、フォーマット変換回路32に供給される。但し、こ
のとき、動き補償は行われない。After the B-picture image is output, the P-picture image data stored in the backward-predicted image section 87b is read out and sent to the format conversion circuit 32 via the motion compensation circuit 88 and the arithmetic unit 86. Supplied. However, at this time, motion compensation is not performed.
【0131】尚、このデコーダ31には、図7のエンコ
ーダ18における予測モード切り替え回路52とDCT
モード切り替え回路55に対応する回路が図示されてい
ないが、これらの回路に対応する処理、即ち、奇数フィ
ールドと偶数フィールドのラインの信号が分離された構
成を、元の混在する構成に必要に応じて戻す処理は、動
き補償回路88が実行する。The decoder 31 includes a prediction mode switching circuit 52 and a DCT in the encoder 18 of FIG.
Although the circuits corresponding to the mode switching circuit 55 are not shown, the processing corresponding to these circuits, that is, the configuration in which the signals of the lines in the odd field and the even field are separated is necessary for the original mixed configuration. The motion compensation circuit 88 executes the processing for returning.
【0132】以上の実施例においては、予測距離(Pピ
クチャの距離)を1としたが、2とすることも可能であ
る。例えば図22に示すように、偶数フレームをIピク
チャまたはPピクチャとして、その予測誤差の絶対値の
和を順次検出していくと、シーン1の第4フレームと、
シーン2の第6フレームのピクチャの予測誤差の絶対値
の和が、基準値M×MAEより大きくなり、その他の予
測誤差の絶対値の和は、ほぼ平均値MAEに近い値とな
る。Although the prediction distance (distance of P picture) is set to 1 in the above embodiments, it may be set to 2. For example, as shown in FIG. 22, when an even frame is set as an I picture or a P picture and the sum of absolute values of prediction errors is sequentially detected, the fourth frame of the scene 1 is detected.
The sum of the absolute values of the prediction errors of the picture of the sixth frame of the scene 2 is larger than the reference value M × MAE, and the sum of the absolute values of the other prediction errors is close to the average value MAE.
【0133】従って、この場合においては、例えば図2
3に示すように、本来Pピクチャとして処理される予定
であった第6フレームのピクチャを、Iピクチャとして
処理するように変更することができる。このようにすれ
ば、シーン2の先頭の第6フレームのピクチャを、高品
質の画像とすることが可能となる。Therefore, in this case, for example, as shown in FIG.
As shown in FIG. 3, the picture of the sixth frame, which was originally supposed to be processed as a P picture, can be changed to be processed as an I picture. In this way, the picture of the sixth frame at the beginning of scene 2 can be made a high-quality image.
【0134】また、図24に示すように、第6フレーム
において、カメラフラッシュが存在した場合、第4フレ
ームと第6フレームの予測誤差の絶対値の和と、第6フ
レームと第8フレームの予測誤差の絶対値の和が、基準
値N×MAEより大きくなる。従って、この場合におい
ても、シーンチェンジ(図22)の場合には、予測誤差
の絶対値が基準値より大きい状態が1回発生し、カメラ
フラッシュ(図24)の場合には、2回連続して発生す
る。このことから、上述した場合と同様に、シーンチェ
ンジとカメラフラッシュを検出することが可能となる。Further, as shown in FIG. 24, when the camera flash is present in the sixth frame, the sum of the absolute values of the prediction errors of the fourth frame and the sixth frame and the prediction of the sixth frame and the eighth frame are performed. The sum of the absolute values of the errors becomes larger than the reference value N × MAE. Therefore, even in this case, in the case of a scene change (FIG. 22), the state in which the absolute value of the prediction error is larger than the reference value occurs once, and in the case of the camera flash (FIG. 24), it occurs twice continuously. Occurs. From this, it is possible to detect a scene change and a camera flash, as in the case described above.
【0135】そして、カメラフラッシュを検出した場合
においては、図25乃至図28に示すようなピクチャタ
イプの最適化処理を実行することができる。When the camera flash is detected, the picture type optimizing process as shown in FIGS. 25 to 28 can be executed.
【0136】図25の実施例においては、シーンチェン
ジのあった第6フレームの処理が、PピクチャからBピ
クチャに変更されるとともに、その直前の第5フレーム
の処理が、BピクチャからPピクチャの処理へ変更され
る。In the embodiment of FIG. 25, the processing of the sixth frame having a scene change is changed from the P picture to the B picture, and the processing of the fifth frame immediately before that is changed from the B picture to the P picture. It is changed to processing.
【0137】逆に、図26の実施例においては、カメラ
フラッシュのあった第6フレームの処理が、Pピクチャ
からBピクチャへ変更されるとともに、その直後の第7
フレームの処理が、BピクチャからPピクチャの処理へ
変更されている。On the contrary, in the embodiment of FIG. 26, the processing of the sixth frame, which had the camera flash, is changed from the P picture to the B picture, and immediately after that, the seventh picture is processed.
The processing of frames has been changed from B pictures to P pictures.
【0138】さらに、図27の実施例においては、カメ
ラフラッシュのあった第6フレームの処理が、Pピクチ
ャからBピクチャへ変更されるとともに、その1フレー
ム前の第5フレームと、1フレーム後の第7フレームの
処理が、それぞれBピクチャからPピクチャの処理へ変
更されている。Further, in the embodiment shown in FIG. 27, the processing of the sixth frame, which had a camera flash, is changed from the P picture to the B picture, and the fifth frame one frame before and the one frame after that are changed. The processing of the seventh frame has been changed from the B picture to the P picture.
【0139】尚、この場合において、第5フレームまた
は第7フレームの処理を、BピクチャからIピクチャに
変更することも可能である。In this case, it is possible to change the processing of the fifth frame or the seventh frame from B picture to I picture.
【0140】図28の実施例は、さらに、カメラフラッ
シュの発生した第6フレームの処理を、Pピクチャから
Bピクチャに変更するばかりでなく、1フレーム前の第
5フレームと、1フレーム後の第7フレームの処理を、
BピクチャからPピクチャに変更し、さらに1フレーム
前後の第4フレームと第8フレームの処理を、Pピクチ
ャからBピクチャに変更するようにしている。The embodiment of FIG. 28 not only changes the processing of the sixth frame generated by the camera flash from the P picture to the B picture, but also changes the fifth frame one frame before and the fifth frame one frame after. 7 frame processing,
The B picture is changed to the P picture, and the processing of the fourth and eighth frames before and after one frame is changed from the P picture to the B picture.
【0141】尚、図24(C)に示すように、Iピクチ
ャまたはPピクチャとして処理されるピクチャの輝度の
平均値の和を検出することによっても、カメラフラッシ
ュを検出することが可能であることは、上述した場合と
同様である。As shown in FIG. 24C, it is possible to detect the camera flash by detecting the sum of the average luminance values of the pictures processed as I pictures or P pictures. Is similar to the case described above.
【0142】図29は、予測距離が2であって、シーン
チェンジがBピクチャにおいて発生した場合の実施例を
表している。この場合、第5フレームと第7フレームの
予測誤差の絶対値の和が、基準値N×MAEより大きく
なる。従って、このことから、上述した場合と同様にし
て、シーンチェンジを検出することが可能である。FIG. 29 shows an embodiment in which the prediction distance is 2 and a scene change occurs in a B picture. In this case, the sum of the absolute values of the prediction errors of the fifth frame and the seventh frame becomes larger than the reference value N × MAE. Therefore, from this, it is possible to detect the scene change in the same manner as in the case described above.
【0143】図30は、この場合におけるピクチャタイ
プの最適化処理の例を表している。この実施例において
は、シーン2の2番目のフレームである第7フレームの
処理が、PピクチャからIピクチャに変更されている。FIG. 30 shows an example of picture type optimization processing in this case. In this embodiment, the processing of the seventh frame, which is the second frame of scene 2, is changed from P picture to I picture.
【0144】図31は、予測距離が2であって、カメラ
フラッシュがBピクチャにおいて発生した場合の実施例
を表している。この場合、同図(B)に示すように、カ
メラフラッシュがBピクチャにおいて発生しているた
め、その予測誤差の絶対値和がサンプリングされず、予
測誤差の絶対値の和が、基準値N×MAEより大きくな
ることがない。即ち、カメラフラッシュを検出すること
ができない。FIG. 31 shows an embodiment in which the prediction distance is 2 and the camera flash occurs in the B picture. In this case, as shown in FIG. 7B, since the camera flash has occurred in the B picture, the sum of the absolute values of the prediction errors is not sampled, and the sum of the absolute values of the prediction errors is the reference value N × It is never larger than MAE. That is, the camera flash cannot be detected.
【0145】同様に、図31(C)に示すように、奇数
フレームにおいて得られる輝度の平均値の値は、複数の
フレーム間における平均値とほぼ同様の値となる。この
ため、この場合においても、カメラフラッシュを検出す
ることができない。Similarly, as shown in FIG. 31C, the average value of the luminance obtained in the odd frames is almost the same as the average value among the plurality of frames. Therefore, even in this case, the camera flash cannot be detected.
【0146】従って、この場合においては、図32に示
すように、ピクチャタイプの最適化処理が実質的に行わ
れないことになる。しかしながら、この場合、カメラフ
ラッシュが発生しているフレームが、そもそもBピクチ
ャの処理となされているため、その処理の悪影響が他の
フレームに及ぶようなことがない。換言すれば、図25
乃至図28に示したように、カメラフラッシュが発生し
たフレームがPピクチャとされている場合、これをBピ
クチャとして最適化を行うようにするのであるが、図3
1の場合においては、もともとBピクチャとして処理さ
れる予定であるので、既に最適化が行われていると考え
ることができる。Therefore, in this case, as shown in FIG. 32, the picture type optimizing process is not substantially performed. However, in this case, since the frame in which the camera flash is generated is originally processed as the B picture, the adverse effect of the processing does not affect other frames. In other words, FIG.
As shown in FIG. 28, when the frame generated by the camera flash is a P picture, the optimization is performed by using this as a B picture.
In the case of 1, since it is originally planned to be processed as a B picture, it can be considered that optimization has already been performed.
【0147】以上においては、予測距離を2としたが、
さらに予測距離を3とすることも可能である。この場合
も、上述した場合と同様にして、予測誤差の絶対値の
和、あるいは輝度の平均値から、シーンチェンジまたは
カメラフラッシュを検出することができる。In the above, the prediction distance is set to 2, but
Further, the predicted distance can be set to 3. Also in this case, the scene change or the camera flash can be detected from the sum of the absolute values of the prediction errors or the average value of the brightness in the same manner as described above.
【0148】図33は、予測距離が3である場合におけ
るシーンチェンジ検出の原理を表している。同図に示す
ように、この実施例の場合、第4フレームと第7フレー
ムの間の予測誤差の絶対値の和が、基準値N×MAEよ
り大きくなる。従って、シーンチェンジを検出すること
ができる。FIG. 33 shows the principle of scene change detection when the predicted distance is 3. As shown in the figure, in the case of this embodiment, the sum of the absolute values of the prediction errors between the fourth frame and the seventh frame is larger than the reference value N × MAE. Therefore, a scene change can be detected.
【0149】図34は、図33に示すようにして、予測
距離が3である場合において、シーンチェンジが検出さ
れた場合におけるピクチャタイプの最適化処理を表して
いる。この実施例においては、シーン2の第2番目のピ
クチャである第7フレームのピクチャの処理が、Pピク
チャからIピクチャに変更されている。FIG. 34 shows a picture type optimization process when a scene change is detected when the prediction distance is 3 as shown in FIG. In this embodiment, the processing of the picture of the seventh frame, which is the second picture of scene 2, is changed from P picture to I picture.
【0150】第7フレームは、シーン2の先頭のフレー
ムではないが、シーン2の先頭のフレームである第6フ
レームは、Bピクチャとされているため、Iピクチャと
された第7フレームのピクチャから予測することによ
り、正確な予測が可能となる。即ち、シーンチェンジが
あった場合においては、シーンチェンジ後の最初のPピ
クチャをIピクチャに変更すれば、それより前のBピク
チャは、そのIピクチャから後方予測することにより、
正確な処理が可能となる。The seventh frame is not the first frame of scene 2, but the sixth frame, which is the first frame of scene 2, is a B picture, and therefore, from the picture of the seventh frame, which is an I picture. Accurate prediction is possible by predicting. That is, when there is a scene change, if the first P picture after the scene change is changed to an I picture, the B pictures before that are backward predicted from the I picture.
Accurate processing is possible.
【0151】図35は、予測距離が3である場合におけ
るカメラフラッシュの検出の原理を表している。この実
施例においては、第3フレームと第6フレームの予測誤
差の絶対値の和と、第6フレームと第9フレームの予測
誤差の絶対値の和が、基準値N×MAEより大きくな
る。従って、カメラフラッシュを検出することが可能で
ある。FIG. 35 shows the principle of camera flash detection when the predicted distance is 3. In this embodiment, the sum of the absolute values of the prediction errors of the third frame and the sixth frame and the sum of the absolute values of the prediction errors of the sixth frame and the ninth frame are larger than the reference value N × MAE. Therefore, it is possible to detect the camera flash.
【0152】また、図35(C)に示すように、第6フ
レームの輝度の平均値の和が、基準値M×MYより大き
くなるため、この輝度の平均値からも、カメラフラッシ
ュを検出することができる。As shown in FIG. 35C, the sum of the average luminance values of the sixth frame is larger than the reference value M × MY. Therefore, the camera flash is also detected from this average luminance value. be able to.
【0153】図36は、このようにして、予測距離が3
である場合において、カメラフラッシュが検出された場
合におけるピクチャタイプの最適化処理の例を表してい
る。この実施例においては、カメラフラッシュが発生し
た第6フレームの処理が、PピクチャからBピクチャに
変更されるとともに、その前後の第5フレームと第7フ
レームの処理が、BピクチャからPピクチャに変更され
ている。FIG. 36 shows that the predicted distance is 3
, The picture type optimization process is performed when the camera flash is detected. In this embodiment, the processing of the sixth frame in which the camera flash has occurred is changed from the P picture to the B picture, and the processing of the fifth and seventh frames before and after that is changed from the B picture to the P picture. Has been done.
【0154】図37は、予測距離が3である場合におい
て、カメラフラッシュがBピクチャで発生した場合を表
している。この場合、同図(B)および(C)に示すよ
うに、カメラフラッシュを検出することができない。し
かしながら、予測距離が2である場合において説明した
場合と同様に、カメラフラッシュのピクチャがBピクチ
ャであれば、実質的に既に最適化処理が行われているこ
とになるため、特別な処理を施す必要がない。FIG. 37 shows the case where the camera flash occurs in the B picture when the prediction distance is 3. In this case, the camera flash cannot be detected, as shown in FIGS. However, as in the case where the prediction distance is 2, as in the case described above, if the picture in the camera flash is a B picture, the optimization processing is substantially already performed, so special processing is performed. No need.
【0155】以上のシーンチェンジのピクチャタイプの
最適化処理をまとめて表すと、表1に示すようになる。
また、カメラフラッシュの場合におけるピクチャタイプ
の最適化処理をまとめて表すと、表2に示すようにな
る。[0155] The above-mentioned scene change picture type optimization processing is summarized and shown in Table 1.
Further, the picture type optimization processing in the case of the camera flash is collectively shown in Table 2.
【0156】[0156]
【表1】 [Table 1]
【0157】[0157]
【表2】 [Table 2]
【0158】尚、図12において、シーンチェンジとカ
メラフラッシュの両方を、予測誤差の絶対値の和から検
出する場合においては、輝度DC値演算器103は不要
となる。また、カメラフラッシュのみを検出するのであ
れば、動きベクトル検出回路102およびフレームメモ
リ101だけを設けるか、あるいは輝度DC値演算器1
03だけを設けるようにすればよい。Incidentally, in FIG. 12, when both the scene change and the camera flash are detected from the sum of the absolute values of the prediction errors, the luminance DC value calculator 103 is not necessary. If only the camera flash is detected, only the motion vector detection circuit 102 and the frame memory 101 are provided, or the brightness DC value calculator 1 is used.
Only 03 should be provided.
【0159】また、以上のようにして、ピクチャ判定回
路49における予測距離を、1,2または3など、所定
の値に設定したとき、その後段の動きベクトル検出回路
50における予測距離も、これに対応した値に設定する
必要がある。Further, as described above, when the prediction distance in the picture determination circuit 49 is set to a predetermined value such as 1, 2 or 3, the prediction distance in the motion vector detection circuit 50 at the subsequent stage is also set to this. Must be set to the corresponding value.
【0160】さらに、図24、図31、図35および図
37に示した実施例においては、輝度データの処理をす
る場合にも、ピクチャタイプの処理に対応してPピクチ
ャ距離を設定したが、異なる距離にする(例えば、輝度
データの処理は、毎フレーム毎行うようにする)ことも
可能である。Furthermore, in the embodiments shown in FIGS. 24, 31, 35 and 37, the P picture distance is set in correspondence with the picture type processing even when the luminance data is processed. It is also possible to set different distances (for example, the processing of the luminance data is performed for each frame).
【0161】図38は、エンコーダの他の実施例を表し
ている。この実施例においては、動きベクトル検出回路
50とフレームメモリ51が、図12のピクチャ判定回
路49における動きベクトル検出回路102とフレーム
メモリ101として利用されるようになされている。即
ち、動きベクトル検出回路50とフレームメモリ51を
用いて予測誤差の絶対値の和を演算し、その演算結果を
選択回路122に出力し、選択回路122において、ピ
クチャタイプを選択、決定するようになされている。そ
して、選択回路122において、選択、決定されたピク
チャタイプが、ハードディスク、固体メモリなどの記憶
装置123に供給され、記憶されるようになされてい
る。FIG. 38 shows another embodiment of the encoder. In this embodiment, the motion vector detection circuit 50 and the frame memory 51 are used as the motion vector detection circuit 102 and the frame memory 101 in the picture determination circuit 49 of FIG. That is, the motion vector detection circuit 50 and the frame memory 51 are used to calculate the sum of absolute values of prediction errors, and the calculation result is output to the selection circuit 122, and the selection circuit 122 selects and determines the picture type. Has been done. The picture type selected and determined by the selection circuit 122 is supplied to and stored in the storage device 123 such as a hard disk or a solid-state memory.
【0162】このようにして、一旦、入力画像が動きベ
クトル検出回路50とフレームメモリ51に供給され、
処理され、ピクチャタイプが記憶装置123に記憶され
た後、同一のデータが再び最初から動きベクトル検出回
路50に入力される。動きベクトル検出回路50は、再
びデータが入力されたとき、記憶装置123から供給さ
れるピクチャタイプに対応して、入力画像データを処理
する。In this way, the input image is once supplied to the motion vector detection circuit 50 and the frame memory 51,
After being processed and the picture type is stored in the storage device 123, the same data is input to the motion vector detection circuit 50 again from the beginning. When the data is input again, the motion vector detection circuit 50 processes the input image data according to the picture type supplied from the storage device 123.
【0163】勿論、この場合においても、入力画像デー
タを輝度DC値演算器121に供給し、輝度DC値を検
出し、その検出結果を選択回路122に供給し、選択回
路122において、この輝度DC値からカメラフラッシ
ュを検出するようにすることもできる。Of course, also in this case, the input image data is supplied to the brightness DC value calculator 121, the brightness DC value is detected, and the detection result is supplied to the selection circuit 122. The camera flash can be detected from the value.
【0164】[0164]
【発明の効果】以上の如く、請求項1に記載の画像処理
方法によれば、画像データの差の絶対値と平均値とを比
較し、その比較結果に対応して、ピクチャの連続性を判
定するようにしたので、ピクチャのシーンチェンジおよ
びカメラフラッシュに代表されるピクチャの不連続性を
検出し、より適正な画像処理を実行することが可能とな
る。As described above, according to the image processing method of the first aspect, the absolute value and the average value of the difference between the image data are compared with each other, and the continuity of the picture is determined according to the comparison result. Since the determination is made, it becomes possible to detect the scene change of the picture and the discontinuity of the picture represented by the camera flash, and to execute more appropriate image processing.
【0165】また、請求項2に記載の画像処理方法によ
れば、第1の値と第2の値とを比較し、その比較結果に
対応して、ピクチャの連続性を判定するようにしたの
で、ピクチャのカメラフラッシュを確実に検出すること
が可能になる。そして、その検出結果に対応して、適正
な画像処理を実行することが可能となる。According to the image processing method of the second aspect, the first value and the second value are compared with each other, and the continuity of the picture is determined according to the comparison result. Therefore, it is possible to reliably detect the camera flash of the picture. Then, appropriate image processing can be executed according to the detection result.
【図1】高能率符号化の原理を説明する図である。FIG. 1 is a diagram illustrating the principle of high efficiency encoding.
【図2】画像データを圧縮する場合におけるピクチャの
タイプを説明する図である。[Fig. 2] Fig. 2 is a diagram illustrating a type of a picture when image data is compressed.
【図3】画像データを圧縮する場合におけるピクチャの
タイプを説明する図である。[Fig. 3] Fig. 3 is a diagram for describing a type of a picture when image data is compressed.
【図4】動画像信号を符号化する原理を説明する図であ
る。FIG. 4 is a diagram illustrating a principle of encoding a moving image signal.
【図5】画像信号符号化装置と復号化装置の構成例を示
すブロック図である。[Fig. 5] Fig. 5 is a block diagram illustrating a configuration example of an image signal encoding device and a decoding device.
【図6】図5におけるフォーマット変換回路17のフォ
ーマット変換の動作を説明する図である。FIG. 6 is a diagram illustrating a format conversion operation of a format conversion circuit 17 in FIG.
【図7】図5におけるエンコーダ18の構成例を示すブ
ロック図である。7 is a block diagram showing a configuration example of an encoder 18 in FIG.
【図8】図7の予測モード切り替え回路52の動作を説
明する図である。8 is a diagram illustrating the operation of the prediction mode switching circuit 52 of FIG.
【図9】図7の予測モード切り替え回路52の動作を説
明する図である。9 is a diagram for explaining the operation of the prediction mode switching circuit 52 in FIG.
【図10】図7のDCTモード切り替え回路55の動作
を説明する図である。10 is a diagram illustrating an operation of the DCT mode switching circuit 55 in FIG.
【図11】図7のDCTモード切り替え回路55の動作
を説明する図である。11 is a diagram illustrating an operation of the DCT mode switching circuit 55 in FIG.
【図12】図7のピクチャ判定回路49の構成例を示す
ブロック図である。12 is a block diagram showing a configuration example of a picture determination circuit 49 in FIG.
【図13】図12の選択回路104の動作を説明するフ
ローチャートである。13 is a flowchart illustrating the operation of the selection circuit 104 of FIG.
【図14】シーンチェンジを検出する原理を説明する図
である。FIG. 14 is a diagram illustrating the principle of detecting a scene change.
【図15】カメラフラッシュを検出する原理を説明する
図である。FIG. 15 is a diagram illustrating the principle of detecting a camera flash.
【図16】シーンチェンジ時におけるピクチャタイプ最
適化処理を説明する図である。FIG. 16 is a diagram illustrating a picture type optimizing process at the time of a scene change.
【図17】カメラフラッシュ時におけるピクチャタイプ
最適化処理を説明する図である。FIG. 17 is a diagram illustrating a picture type optimizing process at the time of camera flash.
【図18】カメラフラッシュ検出の他の原理を説明する
図である。FIG. 18 is a diagram illustrating another principle of camera flash detection.
【図19】図12の選択回路104の他の動作例を表す
フローチャートである。FIG. 19 is a flowchart showing another operation example of the selection circuit 104 of FIG.
【図20】ピクチャの輝度の検出範囲を説明する図であ
る。FIG. 20 is a diagram illustrating a luminance detection range of a picture.
【図21】図5のデコーダ31の構成例を示すブロック
図である。21 is a block diagram showing a configuration example of a decoder 31 of FIG.
【図22】予測距離が2である場合におけるシーンチェ
ンジの検出の原理を説明する図である。FIG. 22 is a diagram illustrating the principle of scene change detection when the predicted distance is 2.
【図23】予測距離が2である場合におけるシーンチェ
ンジ時のピクチャタイプの最適化処理を説明する図であ
る。[Fig. 23] Fig. 23 is a diagram for describing a picture type optimization process at the time of a scene change when the prediction distance is 2.
【図24】予測距離が2である場合におけるカメラフラ
ッシュの検出の原理を説明する図である。FIG. 24 is a diagram illustrating the principle of camera flash detection when the predicted distance is 2.
【図25】予測距離が2である場合におけるカメラフラ
ッシュ時のピクチャタイプの最適化処理を説明する図で
ある。[Fig. 25] Fig. 25 is a diagram for describing a picture type optimization process at the time of camera flash when the prediction distance is 2.
【図26】予測距離が2である場合におけるカメラフラ
ッシュ時のピクチャタイプの最適化処理を説明する図で
ある。[Fig. 26] Fig. 26 is a diagram for describing picture type optimization processing at the time of camera flash when the prediction distance is 2.
【図27】予測距離が2である場合におけるカメラフラ
ッシュ時のピクチャタイプの最適化処理を説明する図で
ある。[Fig. 27] Fig. 27 is a diagram for describing a picture type optimization process at the time of a camera flash when the prediction distance is 2.
【図28】予測距離が2である場合におけるカメラフラ
ッシュ時のピクチャタイプの最適化処理を説明する図で
ある。[Fig. 28] Fig. 28 is a diagram for describing a picture type optimization process at the time of camera flash when the prediction distance is 2.
【図29】予測距離が2である場合におけるシーンチェ
ンジ検出の他の原理を説明する図である。FIG. 29 is a diagram illustrating another principle of scene change detection when the predicted distance is 2.
【図30】予測距離が2である場合におけるシーンチェ
ンジ時のピクチャタイプの最適化処理を説明する図であ
る。[Fig. 30] Fig. 30 is a diagram for describing a picture type optimization process at the time of a scene change in the case where the prediction distance is 2.
【図31】予測距離が2である場合におけるカメラフラ
ッシュ検出の他の原理を説明する図である。FIG. 31 is a diagram illustrating another principle of camera flash detection when the predicted distance is 2.
【図32】予測距離が2である場合におけるカメラフラ
ッシュ時のピクチャタイプの最適化処理を説明する図で
ある。[Fig. 32] Fig. 32 is a diagram for describing a picture type optimization process at the time of camera flash when the prediction distance is 2.
【図33】予測距離が3である場合におけるシーンチェ
ンジ検出の原理を説明する図である。FIG. 33 is a diagram illustrating the principle of scene change detection when the predicted distance is 3.
【図34】予測距離が3である場合におけるシーンチェ
ンジ時のピクチャタイプの最適化処理を説明する図であ
る。[Fig. 34] Fig. 34 is a diagram for describing a picture type optimization process at the time of a scene change in the case where the prediction distance is 3.
【図35】予測距離が3である場合におけるカメラフラ
ッシュ検出の原理を説明する図である。FIG. 35 is a diagram illustrating the principle of camera flash detection when the predicted distance is 3.
【図36】予測距離が3である場合におけるカメラフラ
ッシュ時のピクチャタイプの最適化処理を説明する図で
ある。[Fig. 36] Fig. 36 is a diagram for describing a picture type optimization process at the time of camera flash when the prediction distance is 3.
【図37】予測距離が3である場合におけるカメラフラ
ッシュ検出の他の原理を説明する図である。FIG. 37 is a diagram illustrating another principle of camera flash detection when the predicted distance is 3.
【図38】図5のエンコーダの他の構成例を示すブロッ
ク図である。FIG. 38 is a block diagram illustrating another configuration example of the encoder in FIG.
1 符号化装置 2 復号化装置 3 記録媒体 12,13 A/D変換器 14 フレームメモリ 15 輝度信号フレームメモリ 16 色差信号フレームメモリ 17 フォーマット変換回路 18 エンコーダ 31 デコーダ 32 フォーマット変換回路 33 フレームメモリ 34 輝度信号フレームメモリ 35 色差信号フレームメモリ 36,37 D/A変換器 49 ピクチャ判定回路 50 動きベクトル検出回路 51 フレームメモリ 52 予測モード切り替え回路 53 演算部 54 予測判定回路 55 DCTモード切り替え回路 56 DCT回路 57 量子化回路 58 可変長符号化回路 59 送信バッファ 60 逆量子化回路 61 IDCT回路 62 DCTブロック並び替え回路 63 演算器 64 フレームメモリ 65 動き補償回路 81 受信バッファ 82 可変長復号化回路 83 逆量子化回路 84 IDCT回路 85 DCTブロック並び替え回路 86 演算器 87 フレームメモリ 88 動き補償回路 101 フレームメモリ 102 動きベクトル検出回路 103 輝度DC値演算器 104 選択回路 105 遅延回路 1 Encoding Device 2 Decoding Device 3 Recording Medium 12, 13 A / D Converter 14 Frame Memory 15 Luminance Signal Frame Memory 16 Color Difference Signal Frame Memory 17 Format Conversion Circuit 18 Encoder 31 Decoder 32 Format Conversion Circuit 33 Frame Memory 34 Luminance Signal Frame memory 35 Color difference signal frame memory 36, 37 D / A converter 49 Picture determination circuit 50 Motion vector detection circuit 51 Frame memory 52 Prediction mode switching circuit 53 Calculator 54 Prediction determination circuit 55 DCT mode switching circuit 56 DCT circuit 57 Quantization Circuit 58 Variable length coding circuit 59 Transmission buffer 60 Inverse quantization circuit 61 IDCT circuit 62 DCT block rearrangement circuit 63 Arithmetic unit 64 Frame memory 65 Motion compensation circuit 81 Reception buffer 8 Variable-length decoding circuit 83 inverse quantization circuit 84 IDCT circuit 85 DCT block rearrangement circuit 86 calculator 87 frame memory 88 the motion compensation circuit 101 frame memory 102 motion vector detection circuit 103 the luminance DC value calculator 104 selecting circuit 105 delay circuits
Claims (10)
理方法において、 複数の前記ピクチャの所定の範囲の画像データの差の絶
対値を演算し、 複数の前記ピクチャの前記差の絶対値の平均値を演算
し、 個々の前記ピクチャの前記差の絶対値と、前記平均値と
を比較し、 その比較結果に対応して、前記ピクチャの連続性を判定
することを特徴とする画像処理方法。1. An image processing method for processing image data of a picture, wherein an absolute value of a difference between image data in a predetermined range of the plurality of pictures is calculated, and an average value of absolute values of the difference of the plurality of pictures is calculated. Is calculated, the absolute value of the difference between the individual pictures is compared with the average value, and the continuity of the pictures is determined according to the comparison result.
理方法において、 前記ピクチャの所定の範囲の画像データの輝度の平均値
を演算して第1の値とし、 複数の前記ピクチャの前記第1の値の平均値を演算して
第2の値とし、 前記第1の値と第2の値とを比較し、 その比較結果に対応して、前記ピクチャの連続性を判定
することを特徴とする画像処理方法。2. An image processing method for processing image data of a picture, wherein an average value of luminance of image data in a predetermined range of the picture is calculated to obtain a first value, and the first value of a plurality of the pictures is calculated. An average value of values is calculated to be a second value, the first value and the second value are compared, and the continuity of the picture is determined according to the comparison result. Image processing method.
られる連続性、または、前記第1の値と第2の値とを比
較して得られる連続性に対応して、前記ピクチャを他の
前記ピクチャから予測する場合の予測モードを選択する
ことを特徴とする請求項1または2に記載の画像処理方
法。3. The picture corresponding to continuity obtained by comparing the absolute value and the average value or continuity obtained by comparing the first value and the second value. 3. The image processing method according to claim 1 or 2, wherein a prediction mode is selected when predicting a picture from another picture.
る前記ピクチャの間で演算することを特徴とする請求項
1または3に記載の画像処理方法。4. The image processing method according to claim 1, wherein the absolute value of the difference between the image data is calculated between successive pictures.
離れた前記ピクチャの間で演算することを特徴とする請
求項1または3に記載の画像処理方法。5. The image processing method according to claim 1, wherein the absolute value of the difference between the image data is calculated between the pictures separated by two or more.
だけ独立に発生したとき、前記ピクチャのシーンチェン
ジと判定し、2回連続して発生したとき、前記ピクチャ
のカメラフラッシュと判定することを特徴とする請求項
4または5に記載の画像処理方法。6. When the absolute value, which is larger than the average value, independently occurs only once, it is determined as a scene change of the picture, and when it occurs twice in succession, it is determined as a camera flash of the picture. The image processing method according to claim 4 or 5, wherein:
なったとき、前記ピクチャのカメラフラッシュと判定す
ることを特徴とする請求項2に記載の画像処理方法。7. The image processing method according to claim 2, wherein when the first value becomes larger than the second value, the camera flash of the picture is determined.
られる連続性に対応して、前記ピクチャを他の前記ピク
チャから予測する場合の予測モードを選択するように
し、 前記平均値より大きい前記絶対値が1回だけ独立に発生
したとき、前記ピクチャのシーンチェンジと判定し、2
回連続して発生したとき、前記ピクチャのカメラフラッ
シュと判定し、 シーンチェンジのとき、前記ピクチャのうち、シーンチ
ェンジのピクチャまたはその後のピクチャであって、そ
の近傍のピクチャの少なくとも1つをIピクチャとして
処理し、 カメラフラッシュのとき、カメラフラッシュの前記ピク
チャをBピクチャとして処理するか、またはその直後の
前記ピクチャを、Iピクチャとして処理することを特徴
とする請求項1に記載の画像処理方法。8. A prediction mode for predicting the picture from another picture is selected in accordance with continuity obtained by comparing the absolute value and the average value, When the large absolute value occurs independently only once, it is determined as a scene change of the picture, and 2
When it occurs consecutively, it is determined to be the camera flash of the picture. At the time of a scene change, at least one of the pictures of the scene change and subsequent pictures of the pictures is an I picture. 2. The image processing method according to claim 1, wherein, in the case of a camera flash, the picture in the camera flash is processed as a B picture, or the picture immediately after that is processed as an I picture.
て得られる連続性に対応して、前記ピクチャを他の前記
ピクチャから予測する場合の予測モードを選択するよう
にし、 前記第1の値が前記第2の値より大きくなったとき、前
記ピクチャのカメラフラッシュと判定し、カメラフラッ
シュの前記ピクチャをBピクチャとして処理するか、ま
たはその直後の前記ピクチャを、Iピクチャとして処理
することを特徴とする請求項2に記載の画像処理方法。9. A prediction mode for predicting the picture from other pictures is selected according to the continuity obtained by comparing the first value and the second value, When the first value becomes larger than the second value, it is determined as the camera flash of the picture, and the picture of the camera flash is processed as a B picture, or the picture immediately after that is regarded as an I picture. The image processing method according to claim 2, wherein the image processing is performed.
像処理方法を適用したことを特徴とする画像処理装置。10. An image processing apparatus to which the image processing method according to claim 1 is applied.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP32950893A JP3240024B2 (en) | 1993-12-27 | 1993-12-27 | Image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP32950893A JP3240024B2 (en) | 1993-12-27 | 1993-12-27 | Image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH07193818A true JPH07193818A (en) | 1995-07-28 |
| JP3240024B2 JP3240024B2 (en) | 2001-12-17 |
Family
ID=18222164
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP32950893A Expired - Fee Related JP3240024B2 (en) | 1993-12-27 | 1993-12-27 | Image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3240024B2 (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6100931A (en) * | 1996-03-19 | 2000-08-08 | Sony Corporation | Method and apparatus for controlling a target amount of code and for compressing video data |
| JP2001527344A (en) * | 1997-12-23 | 2001-12-25 | サーノフ コーポレイション | Conversion detection in Videokens |
| JP2002344972A (en) * | 2001-05-15 | 2002-11-29 | Sony Corp | Moving picture coding apparatus, moving picture coding method, moving picture coding program storage medium, and moving picture coding program |
| US6748114B1 (en) | 1999-09-03 | 2004-06-08 | Nec Corporation | Moving picture encoding method and moving picture encoding apparatus |
| JP2007243813A (en) * | 2006-03-10 | 2007-09-20 | Canon Inc | Image encoding method and image encoding apparatus |
| US7466365B2 (en) | 2000-09-21 | 2008-12-16 | Canon Kabushiki Kaisha | Moving image processing apparatus and method, and computer readable memory |
| WO2014112076A1 (en) * | 2013-01-17 | 2014-07-24 | Nttエレクトロニクス株式会社 | Video encoding device |
| JP2016171510A (en) * | 2015-03-13 | 2016-09-23 | 日本放送協会 | Predictive coding determination device, coding device, and program |
| WO2019244931A1 (en) * | 2018-06-19 | 2019-12-26 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device |
-
1993
- 1993-12-27 JP JP32950893A patent/JP3240024B2/en not_active Expired - Fee Related
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6198769B1 (en) * | 1996-03-19 | 2001-03-06 | Sony Corporation | Method and apparatus for controlling a target amount of code and for compressing video data |
| US6100931A (en) * | 1996-03-19 | 2000-08-08 | Sony Corporation | Method and apparatus for controlling a target amount of code and for compressing video data |
| JP2001527344A (en) * | 1997-12-23 | 2001-12-25 | サーノフ コーポレイション | Conversion detection in Videokens |
| EP1048169A4 (en) * | 1997-12-23 | 2004-08-11 | Sarnoff Corp | Detection of transitions in video sequences |
| US6748114B1 (en) | 1999-09-03 | 2004-06-08 | Nec Corporation | Moving picture encoding method and moving picture encoding apparatus |
| US8525935B2 (en) | 2000-09-21 | 2013-09-03 | Canon Kabushiki Kaisha | Moving image processing apparatus and method, and computer readable memory |
| US7466365B2 (en) | 2000-09-21 | 2008-12-16 | Canon Kabushiki Kaisha | Moving image processing apparatus and method, and computer readable memory |
| JP2002344972A (en) * | 2001-05-15 | 2002-11-29 | Sony Corp | Moving picture coding apparatus, moving picture coding method, moving picture coding program storage medium, and moving picture coding program |
| JP2007243813A (en) * | 2006-03-10 | 2007-09-20 | Canon Inc | Image encoding method and image encoding apparatus |
| WO2014112076A1 (en) * | 2013-01-17 | 2014-07-24 | Nttエレクトロニクス株式会社 | Video encoding device |
| JPWO2014112076A1 (en) * | 2013-01-17 | 2017-01-19 | Nttエレクトロニクス株式会社 | Video encoding device |
| JP2016171510A (en) * | 2015-03-13 | 2016-09-23 | 日本放送協会 | Predictive coding determination device, coding device, and program |
| WO2019244931A1 (en) * | 2018-06-19 | 2019-12-26 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3240024B2 (en) | 2001-12-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3163830B2 (en) | Image signal transmission method and apparatus | |
| EP0542195B1 (en) | Interframe predicting method and picture signal coding/decoding apparatus | |
| US6415055B1 (en) | Moving image encoding method and apparatus, and moving image decoding method and apparatus | |
| US6628713B1 (en) | Method and device for data encoding and method for data transmission | |
| JPH08163594A (en) | Moving picture decoding method and moving picture decoding apparatus | |
| JP3911035B2 (en) | Moving picture coding method and moving picture coding apparatus | |
| JP3980659B2 (en) | Video encoding method and apparatus, video decoding method and apparatus. | |
| JP3240024B2 (en) | Image processing method | |
| JPH07231449A (en) | Image signal encoding device and image signal decoding device | |
| JP3700801B2 (en) | Image coding apparatus and image coding method | |
| JPH07131793A (en) | Video signal high efficiency encoder | |
| JP3240737B2 (en) | Image signal encoding method and apparatus, decoding method and apparatus | |
| JP3516622B2 (en) | Decoding apparatus and method | |
| JP3307379B2 (en) | Decoding apparatus and method | |
| JPH06343171A (en) | Method and device for encoding picture | |
| JP3516621B2 (en) | Encoding device and method | |
| JP3481207B2 (en) | Image signal transmission method and apparatus, and image signal decoding method and apparatus | |
| JP3500340B2 (en) | Coding apparatus and method | |
| JP4596277B2 (en) | Encoding device, encoding method, decoding device, and decoding method | |
| JP3164110B2 (en) | Encoding device and method | |
| JP4000581B2 (en) | Image coding apparatus and method | |
| JP3480980B2 (en) | Image signal transmission method and apparatus, and image signal decoding method and apparatus | |
| JP3590976B2 (en) | Video compression device | |
| JPH06276504A (en) | Image signal encoding method, apparatus, decoding method and apparatus | |
| JPH09154136A (en) | Image signal encoding method and apparatus, signal recording medium, and image signal decoding method and apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20010914 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091012 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091012 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101012 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101012 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111012 Year of fee payment: 10 |
|
| LAPS | Cancellation because of no payment of annual fees |