JP2010124486A - Image control apparatus - Google Patents

Image control apparatus Download PDF

Info

Publication number
JP2010124486A
JP2010124486A JP2010006436A JP2010006436A JP2010124486A JP 2010124486 A JP2010124486 A JP 2010124486A JP 2010006436 A JP2010006436 A JP 2010006436A JP 2010006436 A JP2010006436 A JP 2010006436A JP 2010124486 A JP2010124486 A JP 2010124486A
Authority
JP
Japan
Prior art keywords
scene change
state
difference
value
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2010006436A
Other languages
Japanese (ja)
Other versions
JP5146470B2 (en
Inventor
Yuji Takenaka
裕二 竹中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010006436A priority Critical patent/JP5146470B2/en
Publication of JP2010124486A publication Critical patent/JP2010124486A/en
Application granted granted Critical
Publication of JP5146470B2 publication Critical patent/JP5146470B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve encoding efficiency and image quality of an image signal. <P>SOLUTION: On the basis of an inter-frame differential average value obtained by averaging an inter-frame differential for each block or for each pixel between images of the same image type, a scene change detecting means 21 detects occurrence of a scene change. In the case where the occurrence of the scene change is detected, an image insertion control means 22 inserts an I image into a stream. Furthermore, the scene change detecting means 21 determines a differential between a block average value obtained by blocking an image and averaging pixel data for each block and the inter-frame differential average value and in the case where blocks each having the differential greater than a fixed value are existent more than a fixed number, the scene change detecting means regards such a case as the occurrence of a scene change. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像制御装置に関し、特に画像信号の符号化制御を行う画像制御装置に関する。   The present invention relates to an image control apparatus, and more particularly to an image control apparatus that performs encoding control of an image signal.

ISO/IECで国際標準化されているMPEGや、ITU−Tで国際標準化されているH.262等の画像符号化方式では、フレ−ム内予測画像(Iピクチャ)、フレ−ム間順方向予測画像(Pピクチャ)に加え、双方向予測符号化画像(Bピクチャ)が導入されている。   MPEG that is internationally standardized by ISO / IEC and H.264 that is internationally standardized by ITU-T. In image coding schemes such as H.262, bi-predictive coded images (B pictures) are introduced in addition to intra-frame predicted images (I pictures) and inter-frame forward predicted images (P pictures). .

それぞれのピクチャ内のデータは、小ブロックに分割され、ブロック単位の処理が行われている。双方向予測とは、過去及び未来の画像フレ−ムを使って予測するものであり、予測のためにIピクチャ及びPピクチャを用いている。   Data in each picture is divided into small blocks and processed in units of blocks. Bidirectional prediction is prediction using past and future image frames, and I and P pictures are used for prediction.

そのため、結果的にエンコードデータストリームではIピクチャを先頭とし、IピクチャとPピクチャの間、またはPピクチャの間にいくつかのBピクチャが挿入される形となる(IBBPBBPB・・)。また、Iピクチャを先頭とした、ピクチャの集合をGOP(グル−プ・オブ・ピクチャ)と呼んでいる。   Therefore, as a result, in the encoded data stream, I picture is the head, and some B pictures are inserted between I picture and P picture or between P pictures (IBBPBBPB...). A set of pictures starting from the I picture is called a GOP (Group of Pictures).

しかし、上記のような従来のGOPでは、Bピクチャの繰り返し数は2が一般的に用いられているが、これは平均的な絵柄に対する適正値であり、絵柄によっては、2以外が適する場合がある。このため、従来では最適な符号化が行われていないといった問題があった。   However, in the conventional GOP as described above, a B picture repetition number of 2 is generally used, but this is an appropriate value for an average picture, and other than 2 may be suitable depending on the picture. is there. For this reason, there has been a problem that optimum encoding has not been performed conventionally.

例えば、入力画像が静止画に近いほど、Bピクチャの適正値は大きくなるため、入力画像の動きを検出し、動きの度合いにより、Bピクチャの繰り返し数を変えた方が符号化効率は上がる。   For example, the closer the input image is to a still image, the greater the appropriate value of the B picture. Therefore, the coding efficiency increases when the motion of the input image is detected and the number of repetitions of the B picture is changed depending on the degree of motion.

一方、シーンチェンジが発生した場合には、フレーム内符号化を行った方が画質の良くなる場合が多いが、従来、フレーム内符号化を行うタイミングは、シーンチェンジに関係無く固定的なタイミングで行われていた。このように、従来では、入力画像の状態に応じてのフレーム内符号化が、適切に行われていなかったので、符号化効率が悪いといった問題があった。   On the other hand, when a scene change occurs, it is often the case that image quality is better when intra-frame coding is performed. Conventionally, the timing of intra-frame coding is a fixed timing regardless of the scene change. It was done. As described above, conventionally, intra-frame encoding according to the state of the input image has not been appropriately performed, and there has been a problem that encoding efficiency is poor.

本発明はこのような点に鑑みてなされたものであり、画像信号の符号化効率及び画質の向上を図った画像制御装置を提供することを目的とする。   The present invention has been made in view of these points, and an object of the present invention is to provide an image control apparatus that improves the encoding efficiency and image quality of an image signal.

上記課題を解決するために、画像制御装置が提供される。この画像制御装置は、同一ピクチャタイプのピクチャ間でのブロック毎または画素毎のフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、前記シーンチェンジの発生を検出した場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段とを有する。 In order to solve the above problems, an image control apparatus is provided. This image control device includes a scene change detection means for detecting the occurrence of a scene change based on an average value of inter-frame differences obtained by averaging the inter-frame differences for each block or pixel between pictures of the same picture type . And a picture insertion control means for inserting an I picture in the stream when the occurrence of the scene change is detected.

ここで、シーンチェンジ検出手段は、ピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、フレーム間差分平均値との差分を求め、差分が一定の値より大きいブロックが一定の数より多く存在する場合には、シーンチェンジの発生とみなすHere, the scene change detection means obtains a difference between a block average value obtained by blocking a picture and averaging pixel data for each block and an inter-frame difference average value, and blocks whose difference is greater than a certain value are constant. If there are more than the number, it is considered that a scene change has occurred .

入力画像の状態に応じて適切にフレーム内符号化を行うことができ、符号化効率を向上させることが可能になる。Intraframe encoding can be performed appropriately according to the state of the input image, and encoding efficiency can be improved.

画像制御装置の原理図である。It is a principle diagram of an image control apparatus. Bピクチャ繰り返し数の適応制御の概念を示す図である。It is a figure which shows the concept of the adaptive control of the B picture repetition number. 画像制御装置の原理図である。It is a principle diagram of an image control apparatus. 画像制御装置の構成を示す図である。It is a figure which shows the structure of an image control apparatus. 符号化制御部の構成を示す図である。It is a figure which shows the structure of an encoding control part. B値制御部の構成を示す図である。It is a figure which shows the structure of a B value control part. メモリの構成を示す図である。It is a figure which shows the structure of a memory. マトリクス処理部が管理するマトリクステーブルを示す図である。It is a figure which shows the matrix table which a matrix process part manages. シーンチェンジ検出部の構成を示す図である。It is a figure which shows the structure of a scene change detection part. シーンチェンジ検出部の構成を示す図である。It is a figure which shows the structure of a scene change detection part. シーンチェンジ検出部の構成を示す図である。It is a figure which shows the structure of a scene change detection part. シーンチェンジ検出部の構成を示す図である。It is a figure which shows the structure of a scene change detection part. シーンチェンジ検出部の構成を示す図である。It is a figure which shows the structure of a scene change detection part. 書き込み側の状態遷移図である。It is a state transition diagram on the writing side. 書き込み側の状態遷移図である。It is a state transition diagram on the writing side. 読み出し側の状態遷移図である。It is a state transition diagram on the reading side. 読み出し側の状態遷移図である。It is a state transition diagram on the reading side. B増加時の書き込み/読み出しシーケンス図である。FIG. 6 is a sequence diagram of writing / reading when B increases. B減少時の書き込み/読み出しシーケンス図である。FIG. 6 is a sequence diagram of writing / reading when B decreases. シーンチェンジ時の書き込み/読み出しシーケンス図である。It is a write / read sequence diagram at the time of a scene change. シーンチェンジ時の書き込み/読み出しシーケンス図である。It is a write / read sequence diagram at the time of a scene change. シーンチェンジ時の書き込み/読み出しシーケンス図である。It is a write / read sequence diagram at the time of a scene change.

以下、本発明の実施の形態を図面を参照して説明する。図1は画像制御装置の原理図である。画像制御装置10は、画像信号の符号化制御を行う。
比較処理手段11は、第1〜第3の比較処理を行う。第1の比較処理は、動きベクトル(前フレームとの前方向予測ベクトル)としきい値との比較を行う。第2の比較処理は、動き補償予測誤差としきい値との比較を行う。第3の比較処理は、減算値(=フレーム間差分−動き補償予測誤差)としきい値との比較を行う。そして、これらの比較結果の情報を、繰り返し数制御手段12へ出力する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a principle diagram of an image control apparatus. The image control apparatus 10 performs encoding control of an image signal.
The comparison processing means 11 performs first to third comparison processes. In the first comparison process, a motion vector (forward prediction vector with respect to the previous frame) is compared with a threshold value. The second comparison process compares the motion compensation prediction error with a threshold value. In the third comparison process, the subtraction value (= interframe difference−motion compensation prediction error) is compared with a threshold value. Then, information of these comparison results is output to the repetition number control means 12.

繰り返し数制御手段12は、比較処理手段11での比較結果の情報にもとづいて、GOP中のBピクチャの繰り返し数を適応的に制御する。図では繰り返し数=3を示している。なお、以降の説明では、Iピクチャ、Bピクチャ、PピクチャをそれぞれI、B、Pと略して呼ぶ。   The repetition number control means 12 adaptively controls the repetition number of the B picture in the GOP based on the information of the comparison result in the comparison processing means 11. In the figure, the number of repetitions = 3. In the following description, I picture, B picture, and P picture are abbreviated as I, B, and P, respectively.

次にB繰り返し数の適応制御について説明する。図2はBピクチャ繰り返し数の適応制御の概念を示す図である。Bの繰り返し数制御方向Fは、関係図Z1によって定まるB繰り返し数制御方向F(v)と、不等式Z2によって定まるB繰り返し数制御方向F(e)との和によって決定される。 Next, adaptive control of the B repetition number will be described. FIG. 2 is a diagram showing the concept of adaptive control of the B picture repetition number. The B repetition rate control direction F is determined by the sum of the B repetition rate control direction F (v) determined by the relationship diagram Z1 and the B repetition rate control direction F (e) determined by the inequality Z2.

まず、関係図Z1について、関係図Z1は、横軸に動きベクトル、縦軸に動き補償予測誤差をとる。また、動きベクトルと動き補償予測誤差から決まるF(v)は、左斜め上に向かうほどB繰り返し数制御方向は増加方向へ、右斜め下に向かうほどB繰り返し数制御方向は減少方向へ向かう。   First, regarding the relationship diagram Z1, the relationship diagram Z1 has a motion vector on the horizontal axis and a motion compensation prediction error on the vertical axis. In addition, F (v) determined from the motion vector and the motion compensation prediction error increases in the B repetition rate control direction toward the upper left, and decreases in the B repetition rate control direction toward the lower right.

ここで、動きベクトルの値が小さいほど、符号化対象画像は静止画に近いので、F(v)はBの繰り返し数を大きくする方向に制御される。
また、動き補償予測誤差が小さい場合は、符号化対象画像が静止画に近いか、または動きベクトル検出が正しく行われている場合なので、F(v)はBの繰り返し数を大きくする方向に制御される。
Here, the smaller the value of the motion vector, the closer the encoding target image is to a still image, so F (v) is controlled in a direction to increase the number of repetitions of B.
Further, when the motion compensation prediction error is small, the encoding target image is close to a still image or the motion vector detection is correctly performed, so that F (v) is controlled so as to increase the number of repetitions of B. Is done.

なお、この場合、Bの繰り返し数を大きくすると、基準となるピクチャと符号化対象ピクチャとの時間差が大きくなる。そのため、動きベクトル検出が外れる方向に働き、動き補償予測誤差が増加する傾向がある。つまり、Bの繰り返し数を増やすと、GOP内のBの割合が増え、符号化効率があがるが、動き補償の効果が減る傾向があるので、Bの増加によるプラス効果とベクトルが外れることによるマイナス効果とのトレードオフを考慮して、F(v)をバランスの良い値にする。   In this case, when the number of repetitions of B is increased, the time difference between the reference picture and the current picture is increased. For this reason, the motion vector detection tends to deviate, and the motion compensation prediction error tends to increase. That is, if the number of repetitions of B is increased, the ratio of B in the GOP increases and the coding efficiency increases, but the effect of motion compensation tends to decrease. Therefore, the positive effect due to the increase in B and the negative due to the deviation of the vector. Considering a trade-off with the effect, F (v) is set to a well-balanced value.

次に不等式Z2について、フレーム間差分から動き補償予測誤差を減算した減算値としきい値との大小を比較し、減算値がしきい値より大きければ、B繰り返し数制御方向F(e)は増加の方向へ、減算値がしきい値より小さければ、B繰り返し数制御方向F(e)は減少の方向となる。   Next, for the inequality Z2, the subtraction value obtained by subtracting the motion compensation prediction error from the interframe difference is compared with the threshold value. If the subtraction value is larger than the threshold value, the B repetition rate control direction F (e) increases. If the subtraction value is smaller than the threshold value in the direction of B, the B repetition rate control direction F (e) is a decreasing direction.

ここで、動き補償予測誤差とフレーム間差分を比較した場合、前者の値が後者の値と比べて、小さな値になっていない場合は、動き検出が上手く機能していないので、Bの繰り返し数を減少する方向に制御する。また、逆の場合は、Bの繰り返し数を増加する方向に制御する。   Here, when comparing the motion compensation prediction error and the inter-frame difference, if the former value is not smaller than the latter value, motion detection does not function well, so the number of repetitions of B Is controlled in a decreasing direction. In the opposite case, control is performed so that the number of repetitions of B is increased.

次にシーンチェンジ発生時にIを挿入する、画像制御装置について説明する。図3は画像制御装置の原理図である。画像制御装置20は、画像信号の符号化制御を行う。
シーンチェンジ検出手段21は、同一ピクチャ間でのフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出する。
Next, an image control apparatus that inserts I when a scene change occurs will be described. FIG. 3 is a principle diagram of the image control apparatus. The image control device 20 performs encoding control of the image signal.
The scene change detection means 21 detects the occurrence of a scene change based on the average value of interframe differences obtained by averaging the interframe differences between the same pictures.

フレーム間差分平均値とは、同一のピクチャ(例えば、P)である(t−1)フレームとtフレームに対し、すべてのブロック毎またはすべての画素毎に差分をとり、その差分値の平均をとった値のことである。   The average difference between frames is the difference between every block or every pixel in the (t-1) frame and t frame, which are the same picture (for example, P), and the average of the difference values is calculated. It is the value taken.

ピクチャ挿入制御手段22は、シーンチェンジの発生が検出された場合には、ストリーム中にIピクチャを挿入する(フレーム内符号化を行う)。
次にシーンチェンジ検出について説明する。シーンチェンジ検出については以下の5つのいずれかの状態に該当する場合には、シーンチェンジ発生とみなす。
(1) フレーム間差分平均値が、しきい値より大きい場合。このような場合は、全画面のシーンチェンジと考えられる。
(2) ピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、フレーム間差分平均値との差分を求め、その差分が大きいブロックが多く存在する場合。このような場合は、部分的画面のシーンチェンジ(風景が同じで、突然、人が現れたなど)と考えられる。
(3) (1)と(2)を合わせた場合。すなわち、フレーム間差分平均値がしきい値より大きく、かつピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、フレーム間差分平均値との差分を求め、その差分が大きいブロックが多く存在する場合。
(4) フレーム間差分平均値の変化分が一定の値より大きく、急激変化を示した場合。
(5) フレーム間差分平均値がしきい値より低い状態で、かつ変化分が一定の値より大きく、急激変化を示した場合。
When the occurrence of a scene change is detected, the picture insertion control means 22 inserts an I picture in the stream (performs intra-frame coding).
Next, scene change detection will be described. When a scene change is detected, any of the following five states is considered to be a scene change.
(1) The average difference between frames is greater than the threshold value. In such a case, it can be considered as a full screen scene change.
(2) A case where there are many blocks having a large difference between a block average value obtained by blocking a picture and calculating an average of pixel data for each block and an average difference value between frames. In such a case, it is considered that the scene has been changed on the partial screen (scenery is the same, a person suddenly appeared).
(3) When (1) and (2) are combined. That is, the average difference between frames is larger than the threshold value, and the difference between the block average obtained by blocking the picture and averaging the pixel data for each block and the average difference between frames is large. When there are many blocks.
(4) When the change of the inter-frame difference average value is larger than a certain value and shows a sudden change.
(5) When the average difference value between frames is lower than the threshold value and the change is larger than a certain value, indicating a sudden change.

次に上記の画像制御装置10、20の両方を併せ持つ画像制御装置について以降詳しく説明する。図4は画像制御装置の構成を示す図である。
画像制御装置30は、上述したB繰り返し数適応制御及びシーンチェンジ発生時のI挿入制御の両方の機能を具体化した装置である。
Next, an image control apparatus having both of the image control apparatuses 10 and 20 will be described in detail. FIG. 4 is a diagram showing the configuration of the image control apparatus.
The image control device 30 is a device that embodies both the above-described B repetition number adaptive control and I insertion control when a scene change occurs.

固定遅延部31は、時間調整のために、入力画像データをシーンチェンジ検出に要する時間分遅延させる。動きベクトル検出部32は、(t−1)フレームとtフレームとの動きベクトルを検出し、動きベクトルの値を符号化制御部4へ送信する。なお、動き補償(以下、MC)は、エンコーダ37でも行われるが、B繰り返し数決定制御のために、動きベクトル検出部32で動きベクトルを事前に検出している。   The fixed delay unit 31 delays the input image data by the time required for scene change detection for time adjustment. The motion vector detection unit 32 detects the motion vector of the (t−1) frame and the t frame, and transmits the value of the motion vector to the encoding control unit 4. Although motion compensation (hereinafter referred to as MC) is also performed by the encoder 37, the motion vector detection unit 32 detects a motion vector in advance for B repetition rate determination control.

MC予測誤差検出部33は、格納している前フレームを、動きベクトルにしたがってずらして、現フレームとのずれであるMC予測誤差を検出し、MC予測誤差の値を符号化制御部4へ送信する。   The MC prediction error detection unit 33 shifts the stored previous frame according to the motion vector, detects an MC prediction error that is a deviation from the current frame, and transmits the value of the MC prediction error to the encoding control unit 4 To do.

フレーム間差分検出部34は、(t−1)フレームとtフレームとのフレーム間差分を検出する。固定遅延部35は、シーンチェンジ検出部100で行われる処理の時間調整のために、受信したフレーム間差分を遅延させ、遅延後のフレーム間差分の値を符号化制御部4へ送信する。   The inter-frame difference detection unit 34 detects an inter-frame difference between the (t−1) frame and the t frame. The fixed delay unit 35 delays the received inter-frame difference and transmits the delayed inter-frame difference value to the encoding control unit 4 in order to adjust the time of the process performed by the scene change detection unit 100.

シーンチェンジ検出部100は、フレーム間差分にもとづいて、シーンチェンジ発生を検出する。そして、シーンチェンジが発生したか否かの1ビット信号を符号化制御部4へ送信する。   The scene change detection unit 100 detects the occurrence of a scene change based on the interframe difference. Then, a 1-bit signal indicating whether or not a scene change has occurred is transmitted to the encoding control unit 4.

符号化制御部4は、フレームCLKにもとづいて、上記の入力データを処理して、メモリ36を制御するメモリ制御信号を生成し、メモリ36へ送信する。また、エンコーダ37に対し、I、P、Bのいずれかの指示を設定する予測モード信号をエンコーダ37へ送信する。   The encoding control unit 4 processes the input data based on the frame CLK, generates a memory control signal for controlling the memory 36, and transmits the memory control signal to the memory 36. Further, a prediction mode signal for setting any one of I, P, and B is transmitted to the encoder 37.

メモリ36は、メモリ制御信号にもとづいて、固定遅延部31から送信された画像データの書き込み/読み出し処理を行う。
エンコーダ37は、メモリ36から送信された画像信号を、予測モード信号にもとづいて符号化する。例えば、予測モード信号がIを指示する場合は、メモリ36から送信された画像信号にフレーム内予測符号化処理を施す。
The memory 36 performs writing / reading processing of the image data transmitted from the fixed delay unit 31 based on the memory control signal.
The encoder 37 encodes the image signal transmitted from the memory 36 based on the prediction mode signal. For example, when the prediction mode signal indicates I, the image signal transmitted from the memory 36 is subjected to intraframe prediction encoding processing.

図5は符号化制御部4の構成を示す図である。符号化制御部4は、B値制御部40と、状態遷移ブロック400とから構成される。
B値制御部40は、動きベクトル、MC予測誤差、フレーム間差分にもとづいて、Bの繰り返し数のInc/H/Dec(増加/保持/減少)の判定を行う。
FIG. 5 is a diagram showing the configuration of the encoding control unit 4. The encoding control unit 4 includes a B value control unit 40 and a state transition block 400.
The B value control unit 40 determines Inc / H / Dec (increase / hold / decrease) of the number of repetitions of B based on the motion vector, the MC prediction error, and the interframe difference.

状態遷移ブロック400は、シーンチェンジが検出された場合及びB値制御部40によりBの繰り返し数の増減が必要と判断された場合に(判定結果がIncもしくはDecの場合)、I、P、Bの遷移状態を制御する。   The state transition block 400 displays I, P, B when a scene change is detected and when the B value control unit 40 determines that it is necessary to increase or decrease the number of repetitions of B (when the determination result is Inc or Dec). Control the transition state.

図6はB値制御部40の構成を示す図である。比較部41は、動きベクトルとしきい値との比較を行う。累積部42a、42bは、ブロック単位(画像符号化の基本単位)でのリセット信号を受けて、MC予測誤差とフレーム間差分をブロック単位でそれぞれ累積する。   FIG. 6 is a diagram showing a configuration of the B value control unit 40. The comparison unit 41 compares the motion vector with a threshold value. The accumulating units 42a and 42b receive the reset signal in block units (basic units for image coding) and accumulate MC prediction errors and interframe differences in block units, respectively.

比較部43は、累積MC予測誤差としきい値との比較を行う。減算器44は、累積フレーム間差分から累積MC予測誤差を減算する。比較部45は、減算値としきい値との比較を行う。   The comparison unit 43 compares the accumulated MC prediction error with a threshold value. The subtracter 44 subtracts the accumulated MC prediction error from the accumulated interframe difference. The comparison unit 45 compares the subtraction value with a threshold value.

マトリクス処理部46は、比較部41、43、45からの比較結果を受信して、内部で設定してある判定基準にもとづいて、ブロック単位でInc/H/Decを求め、出力する。   The matrix processing unit 46 receives the comparison results from the comparison units 41, 43, and 45, and calculates and outputs Inc / H / Dec in units of blocks based on the determination criteria set internally.

カウンタ47a〜47cは、フレーム(1画面)あたりのInc/H/Decのブロック数を、ブロックCLKにもとづいてカウントする。重み付け部48は、カウンタ47a〜47cから出力されるそれぞれのカウント値に、重み付けをして、信号W1〜W3を出力する。選択部49は、信号W1〜W3の中から最も数の大きい信号を選択し、それをフレームにおける最終的なInc/H/Decの判定結果とする。   The counters 47a to 47c count the number of Inc / H / Dec blocks per frame (one screen) based on the block CLK. The weighting unit 48 weights the count values output from the counters 47a to 47c and outputs signals W1 to W3. The selection unit 49 selects the largest signal from the signals W1 to W3 and uses it as the final Inc / H / Dec determination result in the frame.

図7はメモリ36の構成を示す図である。メモリ36は、I、B、P用の3つのFIFO36a〜36cと、OR素子36dと、P増加のためのフレームメモリ36eとから構成される。   FIG. 7 is a diagram showing the configuration of the memory 36. The memory 36 includes three FIFOs 36a to 36c for I, B, and P, an OR element 36d, and a frame memory 36e for increasing P.

メモリ36は、符号化制御部4からのメモリ制御信号にもとづき、I/P/Bを分離してFIFO36a〜36cに格納する。また、エンコーダ37に出力データを渡す際に、I/B/Pにしたがい、画像フレームの並び替えが必要となるが、それは読み出すFIFO36a〜36cの選択先を変えることで行う。また、Bを増加させる場合は、Pの繰り返しが1回発生する。さらに、Bを減少させる場合はBを1枚廃棄する。   The memory 36 separates the I / P / B based on the memory control signal from the encoding control unit 4 and stores it in the FIFOs 36a to 36c. Further, when the output data is transferred to the encoder 37, it is necessary to rearrange the image frames in accordance with I / B / P. This is done by changing the selection destination of the FIFOs 36a to 36c to be read. When B is increased, P repeats once. Further, when reducing B, one B is discarded.

なお、図中のWE−I、B、PとRE−I、B、Pと廃棄フラグとRE−P(増)は、メモリ制御信号に含まれる。
図8はマトリクス処理部46が管理するマトリクステーブルを示す図である。
マトリクス処理部46は、マトリクステーブルTを利用して、動きベクトル、MC予測誤差、フレーム間差分値に対するしきい値との比較結果である計3ビットの情報に対応して、Inc/H/Decの判定結果を図のように関連付けている。なお、表中、1でしきい値より大、0でしきい値より小である。
In the figure, WE-I, B, P and RE-I, B, P, a discard flag, and RE-P (increase) are included in the memory control signal.
FIG. 8 is a diagram illustrating a matrix table managed by the matrix processing unit 46.
The matrix processing unit 46 uses the matrix table T to correspond to the information of 3 bits in total, which is a comparison result of the motion vector, the MC prediction error, and the threshold value for the inter-frame difference value, Inc / H / Dec. Are determined as shown in the figure. In the table, 1 is larger than the threshold value, and 0 is smaller than the threshold value.

次にシーンチェンジ検出部100について説明する。図9〜図13に示すシーンチェンジ検出部の構成は、上述したシーンチェンジ発生に関する状態(1)〜(5)にそれぞれ対応する。   Next, the scene change detection unit 100 will be described. The configuration of the scene change detection unit shown in FIGS. 9 to 13 corresponds to the states (1) to (5) related to the occurrence of the scene change described above.

図9はシーンチェンジ検出部の構成を示す図である。シーンチェンジ検出部100−1に対し、累積部111は、フレームリセットを受信して、フレーム間差分をフレーム単位で累積する。平均値処理部112は、フレームCLKにしたがって、累積したフレーム間差分の平均値をとり、フレーム間差分平均値を生成する。   FIG. 9 is a diagram showing the configuration of the scene change detection unit. For the scene change detecting unit 100-1, the accumulating unit 111 receives a frame reset and accumulates inter-frame differences in units of frames. The average value processing unit 112 takes the average value of accumulated inter-frame differences according to the frame CLK, and generates an inter-frame difference average value.

比較部113は、フレーム間差分平均値としきい値とを比較する。そして、フレーム間差分平均値がしきい値よりも大きい場合はシーンチェンジ発生とみなす。この場合、例えば、出力信号OUTは“1”となる。   The comparison unit 113 compares the inter-frame difference average value with the threshold value. If the inter-frame difference average value is larger than the threshold value, it is considered that a scene change has occurred. In this case, for example, the output signal OUT is “1”.

図10はシーンチェンジ検出部の構成を示す図である。シーンチェンジ検出部100−2に対し、累積部121は、フレームリセットを受信して、フレーム間差分をフレーム単位で累積する。平均値処理部122は、フレームCLKにしたがって、累積したフレーム間差分の平均値をとり、フレーム間差分平均値を生成する。   FIG. 10 is a diagram showing the configuration of the scene change detection unit. For the scene change detecting unit 100-2, the accumulating unit 121 receives a frame reset and accumulates inter-frame differences in units of frames. The average value processing unit 122 takes the average value of the accumulated inter-frame differences according to the frame CLK, and generates an inter-frame difference average value.

累積部124は、ブロックリセットを受信して、フレーム間差分をブロック単位で累積し、ブロック平均値を生成する。
ここで、フレーム間差分平均値とブロック平均値との差が大きいか否かを判断するために、加算器123で、フレーム間差分平均値にオフセットを加算する。そして、比較部125は、オフセット加算後のフレーム間差分平均値とブロック平均値とを比較し、差が大きいか否かの1ビット信号をブロック単位で出力する。
The accumulating unit 124 receives the block reset, accumulates the inter-frame differences in units of blocks, and generates a block average value.
Here, in order to determine whether or not the difference between the interframe difference average value and the block average value is large, an adder 123 adds an offset to the interframe difference average value. Then, the comparison unit 125 compares the inter-frame difference average value after the offset addition and the block average value, and outputs a 1-bit signal indicating whether or not the difference is large in units of blocks.

カウンタ126は、フレームリセットを受信して、比較部125からの出力信号をブロックCLKにしたがってカウントし、フレーム単位でカウント値を出力する。
取り込み部127は、フレームCLKにしたがって、カウント値を取り込む。比較部128は、取り込んだカウント値としきい値とを比較する。そして、差分値がしきい値よりも大きい場合はシーンチェンジ発生とみなす。この場合、例えば、出力信号OUTは“1”となる。
The counter 126 receives the frame reset, counts the output signal from the comparison unit 125 according to the block CLK, and outputs the count value in units of frames.
The capturing unit 127 captures the count value according to the frame CLK. The comparison unit 128 compares the captured count value with a threshold value. If the difference value is larger than the threshold value, it is considered that a scene change has occurred. In this case, for example, the output signal OUT is “1”.

図11はシーンチェンジ検出部の構成を示す図である。なお、図10のシーンチェンジ検出部100−2と同じ構成要素には、同一の符号を付けてそれらの説明は省略する。
比較部131は、平均値処理部122から出力されるフレーム間差分平均値としきい値とを比較する。そして、フレーム間差分平均値がしきい値よりも大きい場合は、例えば、出力信号OUT2は“1”となる。
FIG. 11 is a diagram showing the configuration of the scene change detection unit. The same components as those of the scene change detection unit 100-2 in FIG. 10 are denoted by the same reference numerals, and the description thereof is omitted.
The comparison unit 131 compares the inter-frame difference average value output from the average value processing unit 122 with a threshold value. When the inter-frame difference average value is larger than the threshold value, for example, the output signal OUT2 is “1”.

AND素子は、比較部128と比較部131の出力の論理積をとる。シーンチェンジ発生時の出力は“1”となる。
図12はシーンチェンジ検出部の構成を示す図である。シーンチェンジ検出部100−4に対し、累積部141は、フレームリセットを受信して、フレーム間差分をフレーム単位で累積する。平均値処理部142は、フレームCLKにしたがって、累積したフレーム間差分の平均値をとり、フレーム間差分平均値を生成する。
The AND element takes the logical product of the outputs of the comparison unit 128 and the comparison unit 131. The output when a scene change occurs is “1”.
FIG. 12 is a diagram showing the configuration of the scene change detection unit. For the scene change detecting unit 100-4, the accumulating unit 141 receives the frame reset and accumulates the inter-frame differences in units of frames. The average value processing unit 142 takes the average value of the accumulated inter-frame differences according to the frame CLK, and generates an inter-frame difference average value.

取り込み部143は、フレームCLKにしたがって、フレーム間差分平均値を取り込む。取り込み部144は、フレームCLKにしたがって、取り込み部143から出力されるフレーム間差分平均値を取り込む。   The capturing unit 143 captures the inter-frame difference average value according to the frame CLK. The capturing unit 144 captures the inter-frame difference average value output from the capturing unit 143 according to the frame CLK.

減算器145は、取り込み部143から出力されたフレーム間差分平均値(前フレーム側)と、取り込み部144から出力されたフレーム間差分平均値(現フレーム側)との差分を求める。   The subtracter 145 obtains a difference between the inter-frame difference average value (previous frame side) output from the capturing unit 143 and the inter-frame difference average value (current frame side) output from the capturing unit 144.

比較部146は、減算器145から出力される差分値と、しきい値とを比較する。そして、差分値がしきい値よりも大きい場合はシーンチェンジ発生とみなす。この場合、例えば、出力信号OUTは“1”となる。   The comparison unit 146 compares the difference value output from the subtractor 145 with a threshold value. If the difference value is larger than the threshold value, it is considered that a scene change has occurred. In this case, for example, the output signal OUT is “1”.

図13はシーンチェンジ検出部の構成を示す図である。なお、図12のシーンチェンジ検出部100−4と同じ構成要素には、同一の符号を付けてそれらの説明は省略する。
取り込み部151は、減算器145から出力される差分値を取り込む。比較部152は、取り込み部151から出力される差分値INと、しきい値とを比較する。そして、IN<しきい値の場合には、安定状態とみなし、比較部152は“1”を出力する。
FIG. 13 is a diagram showing the configuration of the scene change detection unit. It should be noted that the same components as those of the scene change detection unit 100-4 in FIG.
The capturing unit 151 captures the difference value output from the subtracter 145. The comparing unit 152 compares the difference value IN output from the capturing unit 151 with a threshold value. If IN <threshold, it is regarded as a stable state, and the comparator 152 outputs “1”.

4段のフリップフロップFF154は、フレームCLKにしたがって、“1”を保持し、AND素子155にそれぞれ出力する。各フリップフロップFFの出力がすべて1の場合、同じような絵柄のフレームが連続したことになる。比較部153は、取り込み部151から出力される差分値INと、しきい値とを比較する。そして、IN>しきい値の場合には、比較部152は“1”を出力する。   The four-stage flip-flop FF154 holds “1” in accordance with the frame CLK and outputs it to the AND element 155. When all the outputs of the flip-flops FF are 1, the frames with the same pattern are continuous. The comparison unit 153 compares the difference value IN output from the capturing unit 151 with a threshold value. If IN> threshold, the comparator 152 outputs “1”.

AND素子155は、すべての入力が“1”の場合(安定状態から急激変化状態に変化した場合)に、シーンチェンジ発生を意味する“1”を出力する。
次に状態遷移ブロック400で行う状態遷移動作について詳しく説明する。図14、図15は書き込み側の状態遷移図である。図16、図17は読み出し側の状態遷移図である。図18はB増加時の書き込み/読み出しシーケンス図である。図19はB減少時の書き込み/読み出しシーケンス図である。
The AND element 155 outputs “1” indicating that a scene change has occurred when all the inputs are “1” (when the input changes from a stable state to a sudden change state).
Next, the state transition operation performed in the state transition block 400 will be described in detail. 14 and 15 are state transition diagrams on the writing side. 16 and 17 are state transition diagrams on the reading side. FIG. 18 is a write / read sequence diagram when B increases. FIG. 19 is a write / read sequence diagram when B decreases.

まず、書き込み側の動作について説明する。なお、以降の状態遷移動作の共通事項としては、状態の遷移はフレーム単位に行われ、Bの増減とシーンチェンジによる状態変数設定は、非同期に行われる。   First, the operation on the writing side will be described. In addition, as a common matter of subsequent state transition operations, state transition is performed in units of frames, and state variable setting by increasing / decreasing B and scene change is performed asynchronously.

最初にINITステートで、Bの繰り返し周期=M0と、GOP中のIまたはPの回数=N0の設定及び、変数のリセットを行う。初期化直後の状態は、Bステートになる。ここで、M0とN0をテンポラル変数N、Mにセットする。また、クローズドGOPの場合は、前方予測を禁止するためにBBフラグをセットする(図18では、書き込みシーケンスB1に相当する。)。   First, in the INIT state, the B repetition cycle = M0, the number of I or P in the GOP = N0, and the variable are reset. The state immediately after initialization is the B state. Here, M0 and N0 are set in temporal variables N and M. In the case of a closed GOP, the BB flag is set to prohibit forward prediction (corresponding to the write sequence B1 in FIG. 18).

この状態では、N=3、M=2、BB=setであるので、“M≠1 and INC1=DEC=0”の条件が成り立ち、次の遷移先は図14、15より、Bステートになる(図18では、書き込みシーケンスB2に相当する。)。   In this state, since N = 3, M = 2, and BB = set, the condition “M ≠ 1 and INC1 = DEC = 0” is satisfied, and the next transition destination is the B state from FIGS. (This corresponds to the write sequence B2 in FIG. 18).

図14、15の遷移図のように、Bに戻る時にMの値を1減ずるので、この状態(B2)では、N=3、M=1、BB=setになる。したがって、“M=1 and N=3”が成り立つので次の遷移先は図14、15より、Iステートになる。   As shown in the transition diagrams of FIGS. 14 and 15, since the value of M is reduced by 1 when returning to B, in this state (B2), N = 3, M = 1, and BB = set. Accordingly, since “M = 1 and N = 3” holds, the next transition destination is the I state from FIGS.

また、図14、15のように、Iステートに入る時に、BBをリセットする。そのことにより、GOP境界にある、Bピクチャの前方予測を禁止し、クローズドGOPを実現可能にする。Iステートの次は、無条件にBステートに遷移する(図18では、書き込みシーケンスB3に相当する)。   Also, as shown in FIGS. 14 and 15, BB is reset when entering the I state. As a result, forward prediction of B pictures at the GOP boundary is prohibited, and a closed GOP can be realized. After the I state, the state is unconditionally transited to the B state (corresponding to the write sequence B3 in FIG. 18).

Bステートに入る時に、Nの値を1減じ、Mの値を初期値に戻し、DEC2、INC2をリセットする。DEC2、INC2は元々セットされていないので、N=M=2、その他のフラグは全てリセットになる。したがって、“M≠1 and INC1=DEC=0”の条件が成り立ち、次の遷移先は図14、15より、再度Bステートになる(図18では、書き込みシーケンスB4に相当する)。   When entering the B state, the value of N is decremented by 1, the value of M is returned to the initial value, and DEC2 and INC2 are reset. Since DEC2 and INC2 are not originally set, N = M = 2 and all other flags are reset. Therefore, the condition of “M ≠ 1 and INC1 = DEC = 0” is satisfied, and the next transition destination becomes the B state again from FIGS. 14 and 15 (corresponding to the write sequence B4 in FIG. 18).

また、図14、15のように、Bに戻る時にMの値を1減ずるので、この状態では、N=2、M=1になる。この場合、“M=1 and N≠3”の条件が成り立つので、次の遷移先はPステートになる(図18では、書き込みシーケンスP1に相当する)。   Further, as shown in FIGS. 14 and 15, since the value of M is reduced by 1 when returning to B, in this state, N = 2 and M = 1. In this case, since the condition “M = 1 and N ≠ 3” is satisfied, the next transition destination is the P state (corresponding to the write sequence P1 in FIG. 18).

この状態では、N=2、M=0、CHG≠1なので、次の遷移先はBになり、Bステートに入る時にNの値を1減じ、Mの値を再設定し、DEC2とINC2をリセットする。
Bの増加や減少及び、シーンチェンジが発生しない場合は、以下同様に、B、B、P、B、B、P、B、B、P、B・・・と遷移していく。Pステートに入った時に、Nの値が0である場合は、他の場合と同様に、次のステートはBステートになるが、他の場合とは違い、Nの値も初期値に戻す。このようにして、GOP周期の遷移(BBI BBP BBP BBP B・・BP BBP)(BBI BBP・・・)を行えるようにする。
In this state, since N = 2, M = 0, and CHG ≠ 1, the next transition destination is B. When entering the B state, the value of N is decremented by 1, the value of M is reset, and DEC2 and INC2 are set. Reset.
When the increase or decrease of B and the scene change do not occur, in the same manner, transition is made to B, B, P, B, B, P, B, B, P, B. When the value of N is 0 when entering the P state, the next state is the B state as in the other cases, but unlike the other cases, the value of N is also returned to the initial value. In this way, the transition of the GOP cycle (BBI BBP BBP BBP B ·· BP BBP) (BBI BBP...) Can be performed.

次に読み出し側の動作について説明する。読み出し側は、書き込み側に比べ、固定遅延分だけ送れてスタートする。最初の状態はIステートで(図16、17参照)、M0とN0をテンポラル変数N、Mに代入する。次の遷移先は図16、17に示すように、無条件にBステートとなる(図18では、読み出しシーケンスB1に相当する)。Bステートに遷移する時に、Mの値を1減ずるので、この状態では、M=1、N=3になる。すると、この状態では、“M≠0 and DecSet≠1”の条件が成立するので、次の遷移先もBになる(図18では、読み出しシーケンスB2に相当する)。   Next, the operation on the reading side will be described. The reading side starts by sending a fixed delay compared to the writing side. The first state is the I state (see FIGS. 16 and 17), and M0 and N0 are substituted into temporal variables N and M. The next transition destination is unconditionally in the B state as shown in FIGS. 16 and 17 (corresponding to the read sequence B1 in FIG. 18). Since the value of M is decremented by 1 when transitioning to the B state, M = 1 and N = 3 in this state. In this state, since the condition “M ≠ 0 and DecSet ≠ 1” is satisfied, the next transition destination is also B (corresponding to the read sequence B2 in FIG. 18).

Bステートに遷移する時に、Mの値を1減ずるので、この状態では、M=0、N=3になる。すると、この状態では、“M=0 and N≠0”の条件が成立するので、次の遷移先はPステートになる(図18では、読み出しシーケンスP1に相当する)。   Since the value of M is decremented by 1 when transitioning to the B state, M = 0 and N = 3 in this state. In this state, since the condition “M = 0 and N ≠ 0” is satisfied, the next transition destination is the P state (corresponding to the read sequence P1 in FIG. 18).

Pに遷移する時に、Mの値を再設定し、Nの値を1減じるので、この状態では、M=2、N=2になる。すると、Bの増加やシーンチェンジが発生していない場合は“IncSet=0”の条件が成立するので、次の遷移先はBになる。以下同様に、B、B、P、B、B、P、B、B、P、B・・と遷移していく。   At the time of transition to P, the value of M is reset and the value of N is decremented by 1. Therefore, in this state, M = 2 and N = 2. Then, if no increase in B or no scene change has occurred, the condition “IncSet = 0” is satisfied, and the next transition destination is B. Similarly, B, B, P, B, B, P, B, B, P, B,.

Bステートに入った時に、Nの値が0であり、Bステートをループしている間に、M=0になると、図16、17に示すように、Iステートに遷移し、初期状態(GOPの先頭)に戻る。このようにして、GOP周期の遷移(IBB PBB PBB PBB PB・・PBB)(IBB PBB・・・)を行えるようにする。   When entering the B state, the value of N is 0, and when M = 0 while looping through the B state, the state transitions to the I state as shown in FIGS. 16 and 17, and the initial state (GOP Return to the top of In this way, transition of the GOP cycle (IBB PBB PBB PBB PB... PBB) (IBB PBB...) Can be performed.

次にB増加時の動作について説明する。Bの増加は、書き込み側のBステートで監視している(図14、15参照)。書き込み側でBステートにいる時に、前回の増加要求の処理が終わっており(INC2≠1)、Mの値が最大値を超していない場合でかつ、増加判定が行われた場合、増加要求フラグである、INC1/2を非同期にセットし、MとM0の値を1増加させる。そして、Mの値が1になるまでBステート内をループする。   Next, the operation when B increases will be described. The increase in B is monitored in the B state on the writing side (see FIGS. 14 and 15). When in the B state on the writing side, the processing of the previous increase request has been completed (INC2 ≠ 1), and if the value of M does not exceed the maximum value and an increase determination is made, an increase request The flag INC1 / 2 is set asynchronously, and the values of M and M0 are incremented by one. Then, the B state is looped until the value of M becomes 1.

図18において、書き込みシーケンスB5の所で増加判定が行われた場合、図18に示すように、B5の最後の方で、INC1、2がセットされ、M0の値が1増加され3に変更されると共に、Mの値も現状値の2に1加算されて3になる。B5の次の遷移先はINC1=1が成立するので、図14、15より、再度Bになる。   In FIG. 18, when an increase determination is made at the write sequence B5, INC1 and INC2 are set near the end of B5, and the value of M0 is increased by 1 and changed to 3, as shown in FIG. At the same time, the value of M is also added to the current value of 2 to become 3. Since the next transition destination of B5 is INC1 = 1, it becomes B again from FIGS.

図18の書き込みシーケンスB6に遷移する時、図14、15に示すように、Mの値を1減じ、INC1をリセットする。したがってB6ではM=2、INC1=0、INC2=1となる。そして、図14、15の遷移図に従い、Mの値が1になるまで、Bステートをループする。   When transitioning to the write sequence B6 in FIG. 18, the value of M is decremented by 1 and INC1 is reset, as shown in FIGS. Therefore, in B6, M = 2, INC1 = 0, and INC2 = 1. Then, according to the transition diagrams of FIGS. 14 and 15, the B state is looped until the value of M becomes 1.

図18の書き込みシーケンスB7の所で、“M=1 and N≠3”の条件が成立するので、次の遷移先はPステートになる。図18の書き込みシーケンスP2の所で、INC2=1であるので、読み出し側のB増加用フラグである、IncSetを1に設定する。   Since the condition “M = 1 and N ≠ 3” is satisfied at the write sequence B7 in FIG. 18, the next transition destination is the P state. Since INC2 = 1 at the write sequence P2 in FIG. 18, IncSet, which is the B increase flag on the read side, is set to 1.

書き込み側の次の遷移先は、CHG≠1なのでBステートになり、図18の書き込みシーケンスB8に遷移する時に、Nの減算とMの再設定とINC2のリセットが行われる。以下は同様に、Mが1になるまで、BステートをループしPステートに遷移した後、Bステートに戻る。Pステートに遷移した時、“N=0 and M=0”が成り立つ場合(例えば、図18の書き込みシーケンスP3)、Bステートに遷移する時に、Nの初期化を行うことでGOPの初期化を行う。   The next transition destination on the writing side is in the B state because CHG ≠ 1, and when transitioning to the writing sequence B8 in FIG. 18, N is subtracted, M is reset, and INC2 is reset. Similarly, until the M becomes 1, the B state is looped, transitioned to the P state, and then returned to the B state. When “N = 0 and M = 0” holds (for example, the write sequence P3 in FIG. 18) when transitioning to the P state, initialization of GOP is performed by initializing N when transitioning to the B state. Do.

Bの増加判定条件にINC2を入れているのは、IまたはP間のBの増加単位を1に制限するためである。図18に示すように、通常は、書き込みのI、Pと読み出しのI、Pは約1ピクチャーの時間差がある。I−P間または、P−P間での、Bの増加量は最大1なので、書き込み側でBの増加が行われた場合は、I、Pの書き込みと読み出しが、ほぼ同位相になる(読み出しの方が若干遅い)。   The reason why INC2 is included in the increase determination condition for B is to limit the increase unit of B between I or P to 1. As shown in FIG. 18, normally, there is a time difference of about 1 picture between I and P for writing and I and P for reading. Since the increase amount of B between I and P or between P and P is 1 at the maximum, when B is increased on the writing side, writing and reading of I and P are substantially in phase ( Reading is slightly slower).

したがって、図18に示すように、書き込み側でIncSetを設定した場合、IncSetの出る位相は、読み出し側のPステートの位相と一致する。読み出し側では、Pステートに遷移した時にIncSetがセットされていると(図18の読み出しシーケンスP2)、図16、17の状態遷移図に示すように、P Incステートに遷移する。そしてP Incステートに遷移する時に、Mの値を1増加させ、IncSetをリセットし、P増加フラグをこのステートにいる間、出力する。   Therefore, as shown in FIG. 18, when IncSet is set on the writing side, the phase at which IncSet is output matches the phase of the P state on the reading side. On the reading side, if IncSet is set when the state transitions to the P state (reading sequence P2 in FIG. 18), the state transitions to the P Inc state as shown in the state transition diagrams of FIGS. When transitioning to the P Inc state, the value of M is incremented by 1, the IncSet is reset, and the P increase flag is output while in this state.

P増加フラグはメモリ部ブロック図のREN−P増に接続され、FM側のデータを出力することで、P2ステートのデータを再出力させる。P Incステートの後の遷移は、通常のPステートと同じであるが、Mの値が1増加しているので、Bが増加する。   The P increase flag is connected to the REN-P increase in the memory block diagram, and outputs the data on the FM side to re-output the data in the P2 state. The transition after the P Inc state is the same as the normal P state, but since the value of M has increased by 1, B increases.

次にB減少時の動作について説明する。Bの減少は書き込み側のBステートで監視している(図14、15参照)。書き込み側でBステートにいる時に、前回の減少要求の処理が終わっており、Mの値が1を超している場合でかつ、減少判定が行われた場合、減少要求フラグである、DEC1/2を非同期にセットし、MとM0の値を1減少させる。そして、Mの値が1になるまでBステート内をループする。   Next, the operation when B decreases will be described. The decrease in B is monitored in the B state on the writing side (see FIGS. 14 and 15). When the write side is in the B state, the process of the previous decrease request is completed, and if the value of M exceeds 1 and a decrease determination is made, the decrease request flag DEC1 / 2 is set asynchronously and the values of M and M0 are decremented by one. Then, the B state is looped until the value of M becomes 1.

図19において、書き込みシーケンスB5の所で減少判定が行われた場合、図19に示すように、B5の最後の方で、DEC1、2がセットされ、M0の値が1減少され1に変更されると共に、Mの値も現状値の2から1減算されて1になる。図14、15において、B5の次の遷移先は“M=1 and N≠3”が成り立つのでPステートになる。   In FIG. 19, when the decrease determination is performed at the write sequence B5, as shown in FIG. 19, DEC1 and DEC2 are set near the end of B5, and the value of M0 is decreased by 1 and changed to 1. At the same time, the value of M is also subtracted from the current value of 1 to become 1. 14 and 15, the next transition destination of B5 is P state because “M = 1 and N ≠ 3” holds.

図19の書き込みシーケンスP2に遷移する時、図14に示すように、Mの値を1減じ、DEC1をリセットし、DecSetをセットする。したがって図19の書き込みシーケンスP2ではM=0、DEC1=0、DEC2=1となる。そして、図14、15の遷移図に従い、Mの値が1になるまで、Bステートをループする。この場合は、Mの値は最初から1なので、BとPの間を交互に遷移する。Pステートに遷移した時に“N=0 and M=0”が成り立つ場合、(例えば、図19の書き込みシーケンスP3) Bステートに遷移する時に、Nの初期化を行うことでGOPの初期化を行う。   At the time of transition to the write sequence P2 in FIG. 19, as shown in FIG. 14, the value of M is decreased by 1, DEC1 is reset, and DecSet is set. Therefore, in the write sequence P2 of FIG. 19, M = 0, DEC1 = 0, and DEC2 = 1. Then, according to the transition diagrams of FIGS. 14 and 15, the B state is looped until the value of M becomes 1. In this case, since the value of M is 1 from the beginning, the transition is alternately made between B and P. When “N = 0 and M = 0” is satisfied when the state transitions to the P state (for example, the write sequence P3 in FIG. 19), when the state transitions to the B state, the GOP is initialized by initializing N. .

Bの増加判定条件にDEC2を入れているのは、IまたはP間のBの減少単位を1に制限するためである。Mが2以上でないとBの減少モードには行かないので、図19を見て明らかなように、DecSetが1になる場合、読み出しシーケンス側は、Bステートにいる。そのため、図16、17の状態遷移図(READ)では、B STATE でDecSetの監視を行っている。   The reason why DEC2 is included in the increase determination condition for B is to limit the decrease unit of B between I and P to 1. If M is not 2 or more, the B decrease mode is not performed. Therefore, as is apparent from FIG. 19, when DecSet becomes 1, the read sequence side is in the B state. Therefore, in the state transition diagrams (READ) of FIGS. 16 and 17, DecSet is monitored by B STATE.

図19の例では、読み出しシーケンスB3にいる時にDecSetがセットされている。この場合、N=2、M=1、DecSet=1なので、“M≦1 and DecSet=1 N≠0”の条件が成り立ち、図16、17における、次の遷移先はP Dec STATEになる。このステートに遷移する時に、Nの値とM0の値を1減じ、Mの初期化を行い、DecSetをリセットする。またこのステートにいる間は、Pステートなので、Pフレームのデータを読み出しているが、廃棄フラグを出力することで、同時にBフレームのデータも読み出している。しかし、このデータ(B4)は使用せずに廃棄される。   In the example of FIG. 19, DecSet is set when in the read sequence B3. In this case, since N = 2, M = 1, and DecSet = 1, the condition “M ≦ 1 and DecSet = 1 N ≠ 0” is satisfied, and the next transition destination in FIGS. 16 and 17 is P Dec STATE. At the time of transition to this state, the value of N and the value of M0 are decremented by 1, M is initialized, and DecSet is reset. While in this state, since it is in the P state, data in the P frame is read out, but by outputting a discard flag, data in the B frame is also read out at the same time. However, this data (B4) is discarded without being used.

P Dec STATEの次の遷移先は、図16、17より、無条件にBステートになる。後は、BとPの間を交互に遷移し、“N=0 and M=0”の条件が成り立つ時、(例えば、図19の読み出しシーケンスB6)次のタイミングでIステートに遷移し、GOP単位の初期化を行う。   As shown in FIGS. 16 and 17, the next transition destination of P Dec STATE is in the B state unconditionally. After that, when the condition of “N = 0 and M = 0” is met alternately between B and P (for example, the read sequence B6 in FIG. 19), the transition is made to the I state at the next timing, and the GOP Perform unit initialization.

次にシーンチェンジ時の動作について説明する。図20〜図22はシーンチェンジ時の書き込み/読み出しシーケンス図である。シーンチェンジは、書き込み側のBステートとPステートで監視している。シーンチェンジ検出は他の処理に比べて、2フレーム先行しているので、シーンチェンジ画面の2フレーム前のところで処理が行われる。 Next, the operation at the time of a scene change will be described. 20 to 22 are write / read sequence diagrams at the time of a scene change. Scene changes are monitored in the B state and P state on the writing side. Since scene change detection is two frames ahead of other processes, the process is performed two frames before the scene change screen.

例えば、図20のP2→I2の所で、シーンチェンジが発生した場合、B5とB6−P及びP2→I2の所でシーンチェンジの処理が行われる。書き込み側での処理は、Mの値をMCとして保持し、Pステートを経由してIステートに遷移させることで、シーンチェンジのフレームを強制的にIピクチャにすると共に、書き込み側でのGOP最後のピクチャをPに固定する。   For example, when a scene change occurs at P2 → I2 in FIG. 20, scene change processing is performed at B5, B6-P, and P2 → I2. The process on the writing side holds the value of M as MC, and transits to the I state via the P state to forcibly change the frame of the scene change to the I picture and the last GOP on the writing side. Is fixed to P.

読み出し側は、Pステート時にChgSetフラグとMCの値にしたがってその後の遷移をコントロールする。ChgSet=1 and MC=0の場合、Iステートに遷移させた後、Pステートに遷移させ、その後は通常遷移を行わせる。ChgSet=1 and MC≠0の場合、M0+1−MC回、B CHGステートを遷移させた後、I、Pと遷移させその後は通常遷移を行わせる。   The reading side controls the subsequent transition according to the ChgSet flag and the value of MC in the P state. When ChgSet = 1 and MC = 0, the transition is made to the I state, the P state, and then the normal transition. When ChgSet = 1 and MC ≠ 0, the B CHG state is transitioned M0 + 1-MC times, then the transition is made to I and P, and then the normal transition is performed.

次に図20〜図22にしたがって動作を説明する。図20の書き込みシーケンスP2→I2のところに来るピクチャが、シーンチェンジピクチャとすると、B5の所でシーンチェンジが検出される。すると図14、15のBステート内で、MC=2、CHG1=1に設定される。次の遷移先は、図14、15のBステートにおいて“(M=1 and N≠3) or CHG1=1”の条件が成立するので、Pステートになる(図20のB6−P)。このステートに入る時に、Mの値が1減じられM=1になる。   Next, the operation will be described with reference to FIGS. If the picture in the write sequence P2 → I2 in FIG. 20 is a scene change picture, a scene change is detected at B5. Then, MC = 2 and CHG1 = 1 are set in the B state of FIGS. The next transition destination is the P state because the condition “(M = 1 and N ≠ 3) or CHG1 = 1” is satisfied in the B state in FIGS. 14 and 15 (B6-P in FIG. 20). When entering this state, the value of M is decremented by 1 and M = 1.

次の遷移先は、図14、15のP STATEにおいて“CHG1=1”が成立しているので I STATEになる(図20のP2→I2)。このステートに入る時に、CHG1、M、Nの初期化を行うと共に、読み出し側のシーンチェンジ検出フラグであるChgSetを1に設定する。   The next transition destination is I STATE because “CHG1 = 1” is established in P STATE of FIGS. 14 and 15 (P2 → I2 of FIG. 20). When entering this state, CHG1, M, and N are initialized, and ChgSet that is a scene change detection flag on the reading side is set to 1.

次の遷移先は無条件にB STATEになり、これ以降の遷移は通常動作になる。読み出し側は、Bの繰り返し=2で動作し始めるので、I1 → B1 → B2 → P1 → B3 → B4 →P(B6−P)と遷移して行く。図16、17のP STATEの所では、“ChgSet=1 MC≠0”の条件が成り立つので、次の遷移先は B CHG STATE(図21読み出しシーケンスB5)になる。   The next transition destination is unconditionally set to B STATE, and the subsequent transition is normal operation. Since the reading side starts to operate with repetition of B = 2, it transitions from I1 → B1 → B2 → P1 → B3 → B4 → P (B6-P). 16 and 17, the condition “ChgSet = 1 MC ≠ 0” is satisfied, so that the next transition destination is B CHG STATE (read sequence B5 in FIG. 21).

また、CNT=2−2−1=1なので、“CNT≦1”の条件が成り立ち、次の遷移先はI CHG STATE(図21読み出しシーケンスI2)になる。ここで、Nの初期化を行い、次のタイミングで無条件にP STATE(図21読み出しシーケンスP3)に遷移する。P STATEに遷移する時に、Nの減算とMの初期化とChgSetのリセットを行い、後の動作は通常動作になる。   Further, since CNT = 2-2-1 = 1, the condition “CNT ≦ 1” is satisfied, and the next transition destination is I CHG STATE (read sequence I2 in FIG. 21). Here, N is initialized, and transition is made unconditionally to P STATE (read sequence P3 in FIG. 21) at the next timing. At the transition to P STATE, N is subtracted, M is initialized, and ChgSet is reset, and the subsequent operation is a normal operation.

したがって、図20に示すように、シーンチェンジ画面をIピクチャにすると共に、シーンチェンジ画面をまたがった予測値の参照を禁止することが可能となる。
図21の書き込みシーケンスB7→I2のところに来るピクチャが、シーンチェンジピクチャとすると、B6の所でシーンチェンジが検出される。すると図14、15のBステート内で、MC=1、CHG1=1に設定される。
Therefore, as shown in FIG. 20, it is possible to make the scene change screen an I picture and prohibit the reference of the predicted value across the scene change screen.
If the picture in the write sequence B7 → I2 in FIG. 21 is a scene change picture, a scene change is detected at B6. Then, MC = 1 and CHG1 = 1 are set in the B state of FIGS.

次の遷移先は、図14、15のBステートにおいて“(M=1 and N≠3) or CHG1=1”の条件が成立するので、Pステートになる(図21のP2Chg)。このステートに入る時に、Mの値が1減じられM=0になる。   The next transition destination is the P state because the condition “(M = 1 and N ≠ 3) or CHG1 = 1” is satisfied in the B state in FIGS. 14 and 15 (P2Chg in FIG. 21). When entering this state, the value of M is decremented by 1 and M = 0.

次の遷移先は、図14、15のP STATEおいて“CHG1=1”が成立しているので I STATEになる(図21のB7→I2)。このステートに入る時に、CHG1、M、Nの初期化を行うと共に、読み出し側のシーンチェンジ検出フラグであるChgSetを1に設定する。   The next transition destination is I STATE because “CHG1 = 1” is established in P STATE of FIGS. 14 and 15 (B7 → I2 in FIG. 21). When entering this state, CHG1, M, and N are initialized, and ChgSet that is a scene change detection flag on the reading side is set to 1.

次の遷移先は無条件にB STATEになり、これ以降の遷移は通常動作になる。読み出し側は、Bの繰り返し=2で動作し始めるので、I1 → B1 → B2 → P1 → B3 → B4 →P2と遷移して行く。このステートでは、“ChgSet=1 MC≠0”の条件が成り立つので、次の遷移先は B CHG STATE(図21読み出しシーケンスB5)になる。また、CNT=2−1−1=2なので、“CNT>1”の条件が成り立ち、B CHG STATEにもう1回遷移した後(図21読み出しシーケンスB6)、I CHG STATE(図21の読み出しシーケンスI2)に遷移する。   The next transition destination is unconditionally set to B STATE, and the subsequent transition is normal operation. Since the reading side starts to operate with repetition of B = 2, transition is made from I1 → B1 → B2 → P1 → B3 → B4 → P2. In this state, the condition “ChgSet = 1 MC ≠ 0” is satisfied, so that the next transition destination is B CHG STATE (read sequence B5 in FIG. 21). Also, since CNT = 2-1-1 = 2, the condition “CNT> 1” is satisfied, and after transitioning to B CHG STATE once again (FIG. 21 read sequence B6), I CHG STATE (read sequence in FIG. 21). Transition to I2).

ここで、Nの初期化を行い、次のタイミングで、無条件にP STATE(図21読み出しシーケンスP3)に遷移する。P STATEに遷移する時に、Nの減算とMの初期化とChgSetのリセットを行い、後の動作は通常動作になる。したがって、図21に示すように、シーンチェンジ画面をIピクチャにすると共に、シーンチェンジ画面をまたがった予測値の参照を禁止することが可能となる。   Here, N is initialized, and at the next timing, transition is made unconditionally to P STATE (read sequence P3 in FIG. 21). At the transition to P STATE, N is subtracted, M is initialized, and ChgSet is reset, and the subsequent operation is a normal operation. Therefore, as shown in FIG. 21, it is possible to make the scene change screen an I picture and prohibit the reference of the predicted value across the scene change screen.

図22の書き込みシーケンスB8→I2のところに来るピクチャが、シーンチェンジピクチャとすると、P2の所でシーンチェンジが検出される。すると図14、15のPステート内で、MC=0、CHG2=1に設定される。   If the picture at the write sequence B8 → I2 in FIG. 22 is a scene change picture, a scene change is detected at P2. Then, MC = 0 and CHG2 = 1 are set in the P state of FIGS.

次の遷移先は、図14、15のPステートにおいて“CHG2=1”の条件が成立するので、Pステート(図22のB7−P)となる。このステートに戻る時に、CHG2がリセットされCHG1がセットされるので、次の遷移先はI STATE(図22のB8→I2)になる。このステートに入る時に、CHG1、M、Nの初期化を行うと共に、読み出し側のシーンチェンジ検出フラグであるChgSetを1に設定する。   The next transition destination is the P state (B7-P in FIG. 22) because the condition “CHG2 = 1” is satisfied in the P state in FIGS. When returning to this state, CHG2 is reset and CHG1 is set, so that the next transition destination is I STATE (B8 → I2 in FIG. 22). When entering this state, CHG1, M, and N are initialized, and ChgSet that is a scene change detection flag on the reading side is set to 1.

次の遷移先は無条件にB STATEになり、これ以降の遷移は通常動作になる。読み出し側は、Bの繰り返し=2で動作し始めるので、I1 → B1 → B2 → P1 → B3 → B4 →P2→ B5 → B6 →B7−Pと遷移して行く。   The next transition destination is unconditionally set to B STATE, and the subsequent transition is normal operation. Since the read side starts to operate at B repetition = 2, the transition is made as I1 → B1 → B2 → P1 → B3 → B4 → P2 → B5 → B6 → B7−P.

図16、17のP STATEの所では“ChgSet=1 MC=0”の条件が成り立つので、次の遷移先は I CHG STATE(図22の読み出しシーケンスI2)になる。ここで、Nの初期化を行い、次のタイミングで、無条件にP STATE(図22の読み出しシーケンスP3)に遷移する。   16 and 17, the condition “ChgSet = 1 MC = 0” is satisfied, so that the next transition destination is I CHG STATE (read sequence I2 in FIG. 22). Here, initialization of N is performed, and at the next timing, transition is made unconditionally to P STATE (read sequence P3 in FIG. 22).

P STATEに遷移する時に、Nの減算とMの初期化とChgSetのリセットを行い、後の動作は通常動作になる。したがって、図22に示すように、シーンチェンジ画面をIピクチャにすると共に、シーンチェンジ画面をまたがった予測値の参照を禁止することが可能となる。   At the transition to P STATE, N is subtracted, M is initialized, and ChgSet is reset, and the subsequent operation is a normal operation. Therefore, as shown in FIG. 22, it is possible to make the scene change screen an I picture and prohibit the reference of predicted values across the scene change screen.

以上説明したように、動きベクトルの大きさ、MC予測誤差、フレーム間差分の関係から、最適なBの値に自動的に収束することができるので、符号化効率及び画質の向上を図ることが可能になる。また、シーンチェンジ発生時にIを挿入することで、Iの周期が固定である従来方式に比べ、シーンチェンジによる情報量の増加を押さえることができるので、符号化効率及び画質の向上を図ることが可能になる。   As described above, since it is possible to automatically converge to the optimum B value from the relationship between the magnitude of the motion vector, the MC prediction error, and the inter-frame difference, it is possible to improve encoding efficiency and image quality. It becomes possible. Also, by inserting I when a scene change occurs, an increase in the amount of information due to a scene change can be suppressed as compared with the conventional method in which the period of I is fixed, so that it is possible to improve encoding efficiency and image quality. It becomes possible.

(付記1) 画像信号の符号化制御を行う画像制御装置において、
動きベクトルとしきい値との比較を行う第1の比較処理、動き補償予測誤差としきい値との比較を行う第2の比較処理、フレーム間差分から動き補償予測誤差を減算した減算値としきい値との比較を行う第3の比較処理、の少なくとも1つの比較処理を行う比較処理手段と、
比較結果の情報にもとづいて、ストリーム中に挿入すべきBピクチャの繰り返し数を適応的に制御する繰り返し数制御手段と、
を有することを特徴とする画像制御装置。
(Supplementary Note 1) In an image control apparatus that performs encoding control of an image signal,
A first comparison process for comparing a motion vector and a threshold; a second comparison process for comparing a motion compensation prediction error and a threshold; a subtraction value obtained by subtracting a motion compensation prediction error from an interframe difference; A comparison processing means for performing at least one comparison process of a third comparison process for comparing with
Repetition number control means for adaptively controlling the number of repetitions of the B picture to be inserted into the stream based on the information of the comparison result;
An image control apparatus comprising:

(付記2) 前記繰り返し数制御手段は、前記第1の比較処理で、前記動きベクトルが前記しきい値よりも小さいと判定された場合は、前記Bピクチャの繰り返し数を増加する方向へ、大きいと判定された場合には、繰り返し数を減少する方向へ制御することを特徴とする付記1記載の画像制御装置。   (Supplementary Note 2) When it is determined in the first comparison process that the motion vector is smaller than the threshold value, the repetition number control means increases in a direction to increase the repetition number of the B picture. The image control apparatus according to appendix 1, wherein the control is performed in a direction to decrease the number of repetitions.

(付記3) 前記繰り返し数制御手段は、前記第2の比較処理で、前記動き補償予測誤差が前記しきい値よりも小さいと判定された場合は、前記Bピクチャの繰り返し数を増加する方向へ、大きいと判定された場合には、繰り返し数を減少する方向へ制御することを特徴とする付記1記載の画像制御装置。   (Supplementary Note 3) When the second comparison process determines that the motion compensation prediction error is smaller than the threshold value, the repetition number control unit increases the repetition number of the B picture. The image control apparatus according to appendix 1, wherein when it is determined that the number of repetitions is large, the number of repetitions is controlled to decrease.

(付記4) 前記繰り返し数制御手段は、前記第3の比較処理で、前記減算値が前記しきい値よりも大きい場合は、前記Bピクチャの繰り返し数を増加する方向へ、小さい場合には、繰り返し数を減少する方向へ制御することを特徴とする付記1記載の画像制御装置。   (Supplementary Note 4) In the third comparison process, when the subtraction value is larger than the threshold value, the repetition number control unit increases the repetition number of the B picture. The image control apparatus according to appendix 1, wherein the number of repetitions is controlled in a decreasing direction.

(付記5) 前記繰り返し数制御手段は、前記第1の比較処理と、前記第2の比較処理と、前記第3の比較処理とによる比較結果を関連付けて、前記Bピクチャの繰り返し数を増加、保持、減少のいずれかの方向へ制御することを特徴とする付記1記載の画像制御装置。   (Supplementary Note 5) The repetition number control means increases the number of repetitions of the B picture by associating the comparison results of the first comparison process, the second comparison process, and the third comparison process. The image control apparatus according to appendix 1, wherein control is performed in either a holding direction or a decreasing direction.

(付記6) 画像信号の符号化制御を行う画像制御装置において、
同一ピクチャ間でのフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、
前記シーンチェンジの発生を検出した場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段と、
を有することを特徴とする画像制御装置。
(Additional remark 6) In the image control apparatus which performs encoding control of an image signal,
Scene change detection means for detecting the occurrence of a scene change based on an average difference between frames obtained by averaging the differences between frames between the same pictures;
When the occurrence of the scene change is detected, picture insertion control means for inserting an I picture in the stream;
An image control apparatus comprising:

(付記7) 前記シーンチェンジ検出手段は、前記フレーム間差分平均値がしきい値より大きい場合には、シーンチェンジ発生とみなすことを特徴とする付記6記載の画像制御装置。   (Supplementary note 7) The image control apparatus according to supplementary note 6, wherein the scene change detection means regards the occurrence of a scene change when the inter-frame difference average value is greater than a threshold value.

(付記8) 前記シーンチェンジ検出手段は、ピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、前記フレーム間差分平均値との差分を求め、前記差分が一定の値より大きいブロックが一定の数より多く存在する場合には、シーンチェンジ発生とみなすことを特徴とする付記6記載の画像制御装置。   (Supplementary Note 8) The scene change detection means obtains a difference between a block average value obtained by blocking a picture and averaging pixel data for each block, and the inter-frame difference average value, and the difference is determined from a constant value. The image control apparatus according to appendix 6, wherein when there are more than a certain number of large blocks, it is considered that a scene change has occurred.

(付記9) 前記シーンチェンジ検出手段は、前記フレーム間差分平均値がしきい値より大きく、かつピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、前記フレーム間差分平均値との差分を求め、前記差分が一定の値より大きいブロックが一定の数より多く存在する場合には、シーンチェンジ発生とみなすことを特徴とする付記6記載の画像制御装置。   (Supplementary Note 9) The scene change detection means includes a block average value in which the inter-frame difference average value is larger than a threshold value and blocks the picture and averages pixel data for each block, and the inter-frame difference average 7. The image control apparatus according to appendix 6, wherein a difference from the value is obtained, and when there are more than a certain number of blocks in which the difference is greater than a certain value, it is regarded that a scene change has occurred.

(付記10) 前記シーンチェンジ検出手段は、前記フレーム間差分平均値の変化分が一定の値より大きく、急激変化を示した場合には、シーンチェンジ発生とみなすことを特徴とする付記6記載の画像制御装置。   (Supplementary note 10) The supplementary note 6, wherein the scene change detection means considers that a scene change has occurred when a change in the inter-frame difference average value is larger than a certain value and shows a sudden change. Image control device.

(付記11) 前記シーンチェンジ検出手段は、前記フレーム間差分平均値がしきい値より低い状態で、かつ変化分が一定の値より大きく、急激変化を示した場合に、シーンチェンジ発生とみなすことを特徴とする付記6記載の画像制御装置。   (Supplementary Note 11) The scene change detection means considers that a scene change has occurred when the inter-frame difference average value is lower than a threshold value and the change is greater than a certain value and indicates a sudden change. The image control device according to appendix 6, characterized by:

(付記12) 画像信号の符号化制御を行う画像制御装置において、
動きベクトルとしきい値との比較を行う第1の比較処理、動き補償予測誤差としきい値との比較を行う第2の比較処理、フレーム間差分から動き補償予測誤差を減算した減算値としきい値との比較を行う第3の比較処理、の少なくとも1つの比較処理を行う比較処理手段と、
比較結果の情報にもとづいて、ストリーム中に挿入すべきBピクチャの繰り返し数を適応的に制御する繰り返し数制御手段と、
同一ピクチャ間でのフレーム間差分の平均であるフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、
前記シーンチェンジの発生が検出された場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段と、
を有することを特徴とする画像制御装置。
(Additional remark 12) In the image control apparatus which performs encoding control of an image signal,
A first comparison process for comparing a motion vector and a threshold; a second comparison process for comparing a motion compensation prediction error and a threshold; a subtraction value obtained by subtracting a motion compensation prediction error from an interframe difference; A comparison processing means for performing at least one comparison process of a third comparison process for comparing with
Repetition number control means for adaptively controlling the number of repetitions of the B picture to be inserted into the stream based on the information of the comparison result;
Scene change detection means for detecting the occurrence of a scene change based on an average difference between frames that is an average of differences between frames between the same pictures;
When the occurrence of the scene change is detected, picture insertion control means for inserting an I picture in the stream;
An image control apparatus comprising:

10 画像制御装置
11 比較処理手段
12 繰り返し数制御手段
DESCRIPTION OF SYMBOLS 10 Image control apparatus 11 Comparison processing means 12 Repeat number control means

Claims (4)

画像信号の符号化制御を行う画像制御装置において、
同一ピクチャタイプのピクチャ間でのブロック毎または画素毎のフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、
前記シーンチェンジの発生を検出した場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段と、
を備え、
前記シーンチェンジ検出手段は、ピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、前記フレーム間差分平均値との差分を求め、前記差分が一定の値より大きいブロックが一定の数より多く存在する場合には、前記シーンチェンジの発生とみなす、
ことを特徴とする画像制御装置。
In an image control apparatus that performs encoding control of an image signal,
A scene change detection means for detecting the occurrence of a scene change based on an average difference between frames obtained by averaging the difference between frames for each block or pixel between pictures of the same picture type ;
When the occurrence of the scene change is detected, picture insertion control means for inserting an I picture in the stream;
With
The scene change detection means calculates a difference between a block average value obtained by blocking a picture and averaging pixel data for each block, and the inter-frame difference average value, and blocks where the difference is greater than a certain value are constant. If there are more than the number of
An image control apparatus characterized by that.
画像信号の符号化制御を行う画像制御装置において、  In an image control apparatus that performs encoding control of an image signal,
同一ピクチャタイプのピクチャ間でのブロック毎または画素毎のフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、  A scene change detection means for detecting the occurrence of a scene change based on an average difference between frames obtained by averaging the difference between frames for each block or pixel between pictures of the same picture type;
前記シーンチェンジの発生を検出した場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段と、  When the occurrence of the scene change is detected, picture insertion control means for inserting an I picture in the stream;
を備え、  With
前記シーンチェンジ検出手段は、前記フレーム間差分平均値がしきい値より大きく、かつピクチャをブロック化してブロック毎に画素データの平均をとったブロック平均値と、前記フレーム間差分平均値との差分を求め、前記差分が一定の値より大きいブロックが一定の数より多く存在する場合には、前記シーンチェンジの発生とみなす、  The scene change detecting means has a difference between a block average value in which the average difference between frames is larger than a threshold value and a picture is blocked and pixel data is averaged for each block, and the average difference between frames. If there are more than a certain number of blocks in which the difference is greater than a certain value, it is considered that the scene change has occurred.
ことを特徴とする画像制御装置。  An image control apparatus characterized by that.
画像信号の符号化制御を行う画像制御装置において、  In an image control apparatus that performs encoding control of an image signal,
同一ピクチャタイプのピクチャ間でのブロック毎または画素毎のフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、  A scene change detection means for detecting the occurrence of a scene change based on an average difference between frames obtained by averaging the difference between frames for each block or pixel between pictures of the same picture type;
前記シーンチェンジの発生を検出した場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段と、  When the occurrence of the scene change is detected, picture insertion control means for inserting an I picture in the stream;
を備え、  With
前記シーンチェンジ検出手段は、前記フレーム間差分平均値の変化分が一定の値より大きく、急激変化を示した場合には、前記シーンチェンジの発生とみなす、  The scene change detection means, when the change amount of the inter-frame difference average value is larger than a certain value and shows a sudden change, it is regarded as the occurrence of the scene change,
ことを特徴とする画像制御装置。  An image control apparatus characterized by that.
画像信号の符号化制御を行う画像制御装置において、  In an image control apparatus that performs encoding control of an image signal,
同一ピクチャタイプのピクチャ間でのブロック毎または画素毎のフレーム間差分の平均をとったフレーム間差分平均値にもとづいて、シーンチェンジの発生を検出するシーンチェンジ検出手段と、  A scene change detection means for detecting the occurrence of a scene change based on an average difference between frames obtained by averaging the difference between frames for each block or pixel between pictures of the same picture type;
前記シーンチェンジの発生を検出した場合には、ストリーム中にIピクチャを挿入するピクチャ挿入制御手段と、  When the occurrence of the scene change is detected, picture insertion control means for inserting an I picture in the stream;
を備え、  With
前記シーンチェンジ検出手段は、前記フレーム間差分平均値がしきい値より低い状態で、かつ変化分が一定の値より大きく、急激変化を示した場合に、前記シーンチェンジの発生とみなす、  The scene change detection means considers the occurrence of the scene change when the inter-frame difference average value is lower than a threshold value and the change is larger than a certain value and indicates a sudden change.
ことを特徴とする画像制御装置。  An image control apparatus characterized by that.
JP2010006436A 2010-01-15 2010-01-15 Image control device Expired - Lifetime JP5146470B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010006436A JP5146470B2 (en) 2010-01-15 2010-01-15 Image control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010006436A JP5146470B2 (en) 2010-01-15 2010-01-15 Image control device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2000290015A Division JP2002101416A (en) 2000-09-25 2000-09-25 Image controller

Publications (2)

Publication Number Publication Date
JP2010124486A true JP2010124486A (en) 2010-06-03
JP5146470B2 JP5146470B2 (en) 2013-02-20

Family

ID=42325353

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010006436A Expired - Lifetime JP5146470B2 (en) 2010-01-15 2010-01-15 Image control device

Country Status (1)

Country Link
JP (1) JP5146470B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012049611A (en) * 2010-08-24 2012-03-08 Sony Corp Image processor and image processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0622300A (en) * 1992-06-30 1994-01-28 Victor Co Of Japan Ltd Inter-frame or inter-field prediction coding method
JPH06259052A (en) * 1993-03-08 1994-09-16 Nec Corp Editing device and method for detecting change of picture
JPH09238353A (en) * 1995-12-28 1997-09-09 Sony Corp Image coding method and device, image transmission method, and image recording medium
JP2000115786A (en) * 1998-07-22 2000-04-21 Matsushita Electric Ind Co Ltd Coder, recorder and coding method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0622300A (en) * 1992-06-30 1994-01-28 Victor Co Of Japan Ltd Inter-frame or inter-field prediction coding method
JPH06259052A (en) * 1993-03-08 1994-09-16 Nec Corp Editing device and method for detecting change of picture
JPH09238353A (en) * 1995-12-28 1997-09-09 Sony Corp Image coding method and device, image transmission method, and image recording medium
JP2000115786A (en) * 1998-07-22 2000-04-21 Matsushita Electric Ind Co Ltd Coder, recorder and coding method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012049611A (en) * 2010-08-24 2012-03-08 Sony Corp Image processor and image processing method

Also Published As

Publication number Publication date
JP5146470B2 (en) 2013-02-20

Similar Documents

Publication Publication Date Title
US11228772B2 (en) Rate control in video coding
US20190297347A1 (en) Picture-level rate control for video encoding
US5903673A (en) Digital video signal encoder and encoding method
US8472524B2 (en) Motion compensated frame rate conversion with protection against compensation artifacts
JP4402219B2 (en) Detection and encoding of flash frames in video data
US20070291131A1 (en) Apparatus and Method for Controlling Image Coding Mode
US20070223585A1 (en) Video decoding apparatus and video decoding method
JP2002101416A (en) Image controller
US9319682B2 (en) Moving image encoding apparatus, control method therefor, and non-transitory computer readable storage medium
US9386310B2 (en) Image reproducing method, image reproducing device, image reproducing program, imaging system, and reproducing system
JP5146470B2 (en) Image control device
JP4644097B2 (en) A moving picture coding program, a program storage medium, and a coding apparatus.
JP2006203597A (en) Digital image decoder and decoding method
JP2008141354A (en) Image coding apparatus and imaging apparatus
US20120201520A1 (en) Video reproducing apparatus, video reproducing method, and program
JP2008005183A (en) Video image coding method and coding device suitable for movie material
US10051270B2 (en) Video encoding method using at least two encoding methods, device and computer program
JP4130197B2 (en) Video coding method and apparatus
JP2003032685A (en) Noise reduction method and image processing device
JP5300568B2 (en) Video processing apparatus and control method thereof
JP4962609B2 (en) Moving picture coding apparatus and moving picture coding program
US7289564B2 (en) Video encoding method with support for editing when scene changed
Ramkishor et al. Adaptation of video encoders for improvement in quality
JP6028544B2 (en) Image reproduction apparatus, image reproduction method, and image reproduction program
WO2022117369A1 (en) Content adaptive collocated reference picture selection

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111227

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120227

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121030

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121112

R150 Certificate of patent or registration of utility model

Ref document number: 5146470

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20151207

Year of fee payment: 3