JP2010034939A - Moving image coding device and moving image coding method - Google Patents

Moving image coding device and moving image coding method Download PDF

Info

Publication number
JP2010034939A
JP2010034939A JP2008195922A JP2008195922A JP2010034939A JP 2010034939 A JP2010034939 A JP 2010034939A JP 2008195922 A JP2008195922 A JP 2008195922A JP 2008195922 A JP2008195922 A JP 2008195922A JP 2010034939 A JP2010034939 A JP 2010034939A
Authority
JP
Japan
Prior art keywords
picture
code amount
encoding
scene change
moving image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008195922A
Other languages
Japanese (ja)
Inventor
Yasuaki Yamada
康明 山田
Yoshinobu Tsuji
良信 辻
Shohei Okinaga
昌平 沖永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2008195922A priority Critical patent/JP2010034939A/en
Publication of JP2010034939A publication Critical patent/JP2010034939A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent the degradation of an image quality of a moving image coding signal after a scene change. <P>SOLUTION: A coding control part controls a quantization part 20 to code a P-picture after the scene change by a code amount (quantization distribution) corresponding to I-picture when a first reference picture after the scene change is the P-picture even though the scene change is generated in GOP final M (in the example of the embodiment, M=3) picture. The total code amount of the GOP to date including the code amount generated by the coding of the P-picture added by "(M-1)×Lcbb" is determined whether exceeding the uppper limit of the total code amount required for the GOP. If it exceeds, the results of coding of the P-picture are disposed, instead, the Cbb signal of a backward prediction (or a forward prediction)/motion vector 0/prediction error 0 is output. The degradation of the moving image quality after the scene change can be prevented as keeping the generated code amount of the GOP not more than a constant value. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、動画像信号を符号化する動画像符号化装置および動画像符号化方法に関する。   The present invention relates to a moving image encoding apparatus and a moving image encoding method for encoding a moving image signal.

従来の動画像符号化装置には、動画像信号にてシーンの切り替わるシーンチェンジを検出した場合、シーンチェンジ前の画像に対しては粗い量子化を行う一方、シーンチェンジ後の画像に対しては相対的に大きな情報量を割当てて、シーンチェンジ後の画質向上に寄与するようにしたものがある(例えば、特許文献1参照。)。これは、シーンチェンジ前の画像よりも、シーンチェンジ後の画像のほうが、視聴者の意識に残るという一般的な人の視覚的特性を考慮しているからである。
特開2007−94762号公報
In a conventional moving image encoding device, when a scene change in which a scene changes is detected in a moving image signal, coarse quantization is performed on an image before the scene change, while on an image after the scene change. There is one that allocates a relatively large amount of information and contributes to an improvement in image quality after a scene change (see, for example, Patent Document 1). This is because it takes into account the general human visual characteristic that the image after the scene change remains in the viewer's consciousness than the image before the scene change.
JP 2007-94762 A

ところで、動画像符号化装置では、動画像符号化信号の編集性を高めるためにGOP単位で符号量を所定の規定値以下にすることが要求される場合がある。かかる場合、GOP後半でシーンチェンジが発生すると、シーンチェンジ後の画像の符号化には通常平均的な符号量以上の符号量が必要となるので、シーンチェンジ後の画像に対して十分な符号量を割り当てることが出来ず、シーンチェンジ後の動画像符号化信号の画質が劣化する、という問題がある。   By the way, in a moving picture coding apparatus, in order to improve the editability of a moving picture coded signal, it may be required to make code amount below a predetermined regulation value per GOP. In such a case, if a scene change occurs in the second half of the GOP, the encoding amount of the image after the scene change usually requires a code amount that is greater than the average code amount. Cannot be assigned, and the image quality of the moving image encoded signal after the scene change deteriorates.

そこで、本発明は、シーンチェンジ後の動画像符号化信号の画質劣化を防止することができる、動画像符号化装置および動画像符号化方法を提供することを目的とする。   Accordingly, an object of the present invention is to provide a moving image encoding apparatus and a moving image encoding method capable of preventing image quality deterioration of a moving image encoded signal after a scene change.

上記課題を解決するため、本発明に係る動画像符号化装置は、動画像信号を符号化する符号化手段と、動画像信号内でシーンチェンジが発生するか否かを検出するシーンチェンジ検出手段と、前記シーンチェンジ検出手段によってシーンチェンジが検出された場合、当該シーンチェンジ検出後の最初のリファレンスピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の符号化配分で符号化するよう前記符号化手段を制御する符号量制御手段と、前記符号化手段によって符号化された動画像信号を出力するバッファと、を有する。
ここで、シーン検出手段は、動画像信号のGOP毎に各GOP最後のMピクチャや、各GOP最後の数Mピクチャ内でシーンチェンジが発生するか否かを検出するようにしても良い。
また、前記符号量制御手段は、さらに、前記PピクチャをIピクチャと同等の量子化配分で符号化した符号量を含めたGOP先頭から当該Pピクチャまでの符号量と、予めピクチャを示すための符号長が最小限の最小限信号の符号量に前記Mの値から1減算した値を乗算したPピクチャ以降の最低必要符号量とを加算した値と、GOPに対して要求される総符号量上限値とに基づいて、前記加算した値が前記総符号量上限値を超えそうもない場合には、当該Pピクチャの符号化結果を出力するよう前記バッファを制御する一方、超えそうである場合には、当該Pピクチャの符号化結果を廃棄するよう前記バッファを制御する、ようにしても良い。
また、前記符号量制御手段は、前記加算した値と前記総符号量上限値とに基づいて、前記加算した値が、GOPに対して要求される総符号量上限値を超えそうな場合には、当該Pピクチャの符号化結果を廃棄するよう前記バッファを制御し、さらに、前記最小限信号を前記バッファを介して出力させる、ようにしても良い。
また、前記符号量制御手段は、前記加算した値と前記総符号量上限値とに基づいて、前記加算した値が、GOPに対して要求される総符号量上限値を超えそうな場合には、当該Pピクチャの符号化結果を廃棄するよう前記バッファを制御し、かつ、前記シーンチェンジ直前のピクチャをPピクチャとして符号化させ、その符号化結果および前記最小限信号を前記バッファを介して出力するよう前記符号化手段を制御する、ようにしても良い。
また、前記符号量制御手段は、さらに、前記加算した値と前記総符号量上限値とに基づいて、前記加算値が前記総符号量上限値を超えそうもない場合、当該Pピクチャの符号化結果を出力するよう前記バッファを制御すると共に、シーンチェンジ直前のピクチャをBピクチャ相当の量子化配分で前記符号化手段に符号化させ、当該シーンチェンジ直前のBピクチャをBピクチャ相当の量子化配分で符号化した符号量を含めたGOP先頭から当該Bピクチャまでの符号量と、前記最小限信号の符号量に前記Mの値から2減算した値を乗算した当該Bピクチャ以降の最低必要符号量とを加算した値と、GOPに対して要求される総符号量上限値とに基づいて、前記加算した値が前記総符号量上限値をを超えそうもない場合には、当該Bピクチャの符号化結果を出力するよう前記バッファを制御する一方、超えそうな場合には、当該Bピクチャの符号化結果を廃棄するよう前記バッファを制御し、かつ、前記最小限信号を前記バッファを介して出力させる、ようにしても良い。
また、前記符号量制御手段は、さらに、前記シーンチェンジ直前のピクチャと、前記シーンチェンジより前のPピクチャとの間に、符号化すべきピクチャが存在するか否かを判断し、存在する場合には、当該符号化すべきピクチャをBピクチャとして符号化させ、その符号化結果を出力するよう前記符号化手段を制御する、ようにしても良い。
また、本発明の別の動画像符号化装置は、動画像信号を符号化する符号化手段と、動画像信号のGOP毎にM(Mは、MN値のMの値)ピクチャ毎に分割し、各Mピクチャ内でシーンチェンジが発生するか否かを検出するシーンチェンジ検出手段と、シーンチェンジ検出後の最初のリファレンスピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の量子化配分で符号化するよう前記符号化手段を制御する符号量制御手段と、前記符号化手段によって符号化された動画像信号を出力するバッファと、を有する。
また、本発明の動画像符号化方法は、動画像信号内でシーンチェンジが発生するか否かを検出するステップと、動画像信号内でーンチェンジが検出された場合、当該シーンチェンジ検出後の最初のリファレンスピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の符号化配分で符号化するステップと、符号化された前記動画像信号を出力するステップと、を有する。ここで、本発明の動画像符号化方法でも、上記動画像符号化装置における符号量制御手段と同等の符号量制御を行っても良い。
In order to solve the above problems, a moving picture coding apparatus according to the present invention includes a coding means for coding a moving picture signal, and a scene change detection means for detecting whether or not a scene change occurs in the moving picture signal. If a scene change is detected by the scene change detecting means, it is determined whether or not the first reference picture after the scene change is detected is a P picture. If it is determined that the P picture is a P picture, Code amount control means for controlling the coding means so as to be coded with a coding distribution equivalent to that of an I picture, and a buffer for outputting a moving picture signal coded by the coding means.
Here, the scene detection means may detect whether or not a scene change occurs in the last M picture of each GOP or the last number M pictures of each GOP for each GOP of the moving image signal.
Further, the code amount control means further includes a code amount from the GOP head to the P picture including the code amount obtained by encoding the P picture with a quantization distribution equivalent to that of the I picture, and a picture for indicating the picture in advance. A value obtained by adding a minimum required code amount after the P picture obtained by multiplying a value obtained by subtracting 1 from the value of M to the code amount of the minimum signal having the minimum code length, and the total code amount required for the GOP When the added value is unlikely to exceed the total code amount upper limit value based on the upper limit value, the buffer is controlled to output the encoding result of the P picture, while it is likely to exceed Alternatively, the buffer may be controlled so as to discard the encoding result of the P picture.
Further, the code amount control means, based on the added value and the total code amount upper limit value, when the added value is likely to exceed the total code amount upper limit value required for GOP. The buffer may be controlled so as to discard the encoding result of the P picture, and the minimum signal may be output via the buffer.
Further, the code amount control means, based on the added value and the total code amount upper limit value, when the added value is likely to exceed the total code amount upper limit value required for GOP. , Controlling the buffer to discard the encoding result of the P picture, encoding the picture immediately before the scene change as a P picture, and outputting the encoding result and the minimum signal through the buffer The encoding means may be controlled to do so.
The code amount control means may further encode the P picture when the added value is unlikely to exceed the total code amount upper limit value based on the added value and the total code amount upper limit value. The buffer is controlled so as to output the result, and the encoding unit encodes the picture immediately before the scene change by quantization distribution equivalent to the B picture, and the B picture immediately before the scene change is quantized distribution equivalent to the B picture. The minimum required code amount after the B picture obtained by multiplying the code amount from the beginning of the GOP including the code amount encoded in step B to the B picture by the value obtained by subtracting 2 from the M value to the code amount of the minimum signal When the added value is unlikely to exceed the total code amount upper limit value based on the value obtained by adding the above and the total code amount upper limit value required for the GOP, The buffer is controlled to output the encoding result, and if it is likely to be exceeded, the buffer is controlled to discard the encoding result of the B picture, and the minimum signal is passed through the buffer. You may make it output.
The code amount control means further determines whether or not a picture to be encoded exists between the picture immediately before the scene change and the P picture before the scene change. May encode the picture to be encoded as a B picture and control the encoding means to output the encoding result.
Further, another moving picture coding apparatus according to the present invention divides each moving picture signal by M (M is a value of M of MN values) for each GOP of the moving picture signal. A scene change detection means for detecting whether or not a scene change occurs in each M picture, and whether or not the first reference picture after the scene change is detected is a P picture, and is determined to be a P picture. In this case, a code amount control unit that controls the encoding unit to encode the P picture with a quantization distribution equivalent to that of the I picture, and a buffer that outputs a moving image signal encoded by the encoding unit Have.
The moving picture encoding method of the present invention includes a step of detecting whether or not a scene change occurs in the moving picture signal, and an initial change after the scene change is detected when an end change is detected in the moving picture signal. Whether or not the reference picture is a P picture, and when it is determined that the reference picture is a P picture, encoding the P picture with an encoding distribution equivalent to that of the I picture, and the encoded moving picture Outputting a signal. Here, even in the moving picture coding method of the present invention, code amount control equivalent to the code amount control means in the moving picture coding apparatus may be performed.

本発明によれば、少なくとも、動画像信号内あるいは動画像信号のGOP毎にMピクチャ毎に分割し、各Mピクチャ内でシーンチェンジが発生するか否かを検出し、シーンチェンジが検出された場合、当該シーンチェンジ検出後の最初のピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の符号化配分で符号化するので、シーンチェンジ後の動画像符号化信号の画質劣化を防止することができる。   According to the present invention, at least a M-picture is divided within a moving image signal or for each GOP of the moving image signal, and it is detected whether or not a scene change occurs in each M picture, and a scene change is detected. In this case, it is determined whether or not the first picture after detection of the scene change is a P picture. If it is determined that the first picture is a P picture, the P picture is encoded with an encoding distribution equivalent to that of an I picture. It is possible to prevent image quality deterioration of a moving image encoded signal after a scene change.

実施の形態1.
本発明の実施の形態について図面を参照して詳細に説明する。
Embodiment 1 FIG.
Embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の実施の形態である動画像符号化装置の構成例を示すブロック図である。   FIG. 1 is a block diagram illustrating a configuration example of a moving image encoding apparatus according to an embodiment of the present invention.

図1において、動画像符号化装置は、シーン検出部10、並び替え部12、減算器14、第1モード切替え部16、DCT部18、量子化部20、可変長符号化部22、バッファ24、逆量士化部26、逆DDCT部28、加算器30、第2モード切り替え部32、参照画像メモリ34、動き補償予測部36、符号化制御部38を有する。なお、これら以外の構成要素を有していても勿論、良い。また、本装置では、MPEG2やH.264/AVC符号化方式により説明するが、本発明では、これに限られない。   In FIG. 1, the moving image encoding apparatus includes a scene detection unit 10, a rearrangement unit 12, a subtracter 14, a first mode switching unit 16, a DCT unit 18, a quantization unit 20, a variable length encoding unit 22, and a buffer 24. , An inverse quantification unit 26, an inverse DDCT unit 28, an adder 30, a second mode switching unit 32, a reference image memory 34, a motion compensation prediction unit 36, and an encoding control unit 38. Needless to say, it may have other components. In this apparatus, MPEG2 or H.264 is also used. The H.264 / AVC encoding method will be described, but the present invention is not limited to this.

次に、動作を説明する。   Next, the operation will be described.

本装置にビデオカメラ等によって撮影された動画像信号が入力すると、まず、シーン検出部10は、その動画像信号のGOP毎に、各GOP最後のM(Mは、MN値のMの値)ピクチャ内で、シーンが急激に切り替わるシーンチェンジが発生するか否かを検出して並び替え部12へ出力する。その際、シーンチェンジを検出した場合、シーン検出部10は、シーンチェンジ検出信号として、符号化制御部38へ出力する。なお、シーンチェンジ検出の方法は、周知の方法、例えば、動画像信号における輝度信号等の変化に基づいて行う。また、本実施形態では、MN値が例えば、それぞれN=15、M=3のGOP構造により説明する。また、動画像信号のGOP毎に、各GOP最後のM(Mは、MN値のMの値)ピクチャ内であるか否かは、シーン検出部10が、符号化制御部36または並び替え部12からGOP構造を示す信号を入力して判断してもよいし、並び替え部12で判断するようにしても良い。   When a moving image signal photographed by a video camera or the like is input to this apparatus, the scene detection unit 10 firstly, for each GOP of the moving image signal, the last M of each GOP (M is the value of M of the MN value). In the picture, it is detected whether or not a scene change in which the scene changes suddenly occurs and is output to the rearrangement unit 12. At that time, when a scene change is detected, the scene detection unit 10 outputs the scene change detection signal to the encoding control unit 38. The scene change detection method is performed based on a known method, for example, based on a change in a luminance signal or the like in a moving image signal. In the present embodiment, the GOP structure in which the MN values are N = 15 and M = 3, respectively, will be described. Also, for each GOP of the moving image signal, whether the scene detection unit 10 determines whether it is within the last M picture of each GOP (M is the value of M of the MN value), the encoding control unit 36 or the rearrangement unit. 12 may be determined by inputting a signal indicating the GOP structure, or may be determined by the rearrangement unit 12.

次に、並び替え部12は、動画像信号を、符号化の順に並び替えて、減算器14、第1モード切替え部16および動き補償予測部36へ出力する。ここで、並び替え部12は、DCT部18における符号化モードに応じて、DCT部18がI(画面内符号化)ピクチャを出力するイントラ符号化モードの場合は、符号化対象の動画像信号を、減算器14を介さずに第1モード切替え部16へ出力し、DCT部18がP(前方向予測符号化)ピクチャまたはB(両方向予測符号化)ピクチャを出力するインター符号化モードの場合は、減算器14を介してDCT部18へ出力する。なお、並び替えが不要な場合は、並び替え部12を省略しても良い。   Next, the rearrangement unit 12 rearranges the moving image signals in the order of encoding, and outputs them to the subtracter 14, the first mode switching unit 16, and the motion compensation prediction unit 36. Here, the rearrangement unit 12, when the DCT unit 18 is in an intra coding mode that outputs an I (intra-screen coding) picture according to the coding mode in the DCT unit 18, In the inter coding mode in which the DCT unit 18 outputs a P (forward prediction coding) picture or a B (bidirectional prediction coding) picture. Is output to the DCT unit 18 via the subtractor 14. If rearrangement is unnecessary, the rearrangement unit 12 may be omitted.

減算器14は、DCT部18における符号化モードに応じて、インター符号化モードの場合は、並び替え部12からの動画像信号と、動き補償予測部36からの予測画像と差分(残差)をとった差分信号を第1モード切替え部16へ出力する。   In the case of the inter coding mode, the subtractor 14 differs from the moving image signal from the rearrangement unit 12 and the prediction image from the motion compensation prediction unit 36 (residual) according to the coding mode in the DCT unit 18. The difference signal obtained by taking is output to the first mode switching unit 16.

第1モード切替え部16は、並び替え部12からの動画像信号を、DCT部18における符号化モードに応じて、イントラ符号化モードの場合はそのまま、インター符号化モードの場合は減算器14により予測画像と差分をとった差分信号とを切替えて、DCT部18へ出力する。   The first mode switching unit 16 uses the moving image signal from the rearranging unit 12 as it is in the intra coding mode, or in the sub coding unit 14 in the inter coding mode, according to the coding mode in the DCT unit 18. The predicted image and the difference signal obtained by the difference are switched and output to the DCT unit 18.

DCT部18は、符号化モードに応じて、第1モード切替え部16からの動画像信号をDCT変換して量子化部20へ出力する。   The DCT unit 18 DCT-transforms the moving image signal from the first mode switching unit 16 according to the encoding mode, and outputs it to the quantization unit 20.

量子化部20は、DCT部18からDCT係数を、符号化制御部38から指示された量子化ステップにより量子化して、量子化係数を可変長符号化部22および逆量士化部26へ出力する。   The quantization unit 20 quantizes the DCT coefficient from the DCT unit 18 by the quantization step instructed from the encoding control unit 38 and outputs the quantized coefficient to the variable length encoding unit 22 and the inverse quantification unit 26. To do.

可変長符号化部22は、その量子化係数を可変長符号化してバッファ24へ出力し、外部へ符号化ビット列として出力する。   The variable length coding unit 22 performs variable length coding on the quantization coefficient, outputs the quantized coefficient to the buffer 24, and outputs the coded coefficient as a coded bit string to the outside.

一方、逆量士化部26では、量子化部20からの量子化係数を量子化部20における量子化とは反対に逆量子化して、DCT係数を復元し、逆DDCT部28へ出力する。   On the other hand, the inverse quantification unit 26 inversely quantizes the quantization coefficient from the quantization unit 20, opposite to the quantization in the quantization unit 20, restores the DCT coefficient, and outputs it to the inverse DDCT unit 28.

逆DCT(IDCT)部28では、逆量士化部26からの復元されたDCT係数を逆DCT(IDCT)変換して復号信号とし、DCT部18の符号化モードに応じて、加算器30および第2モード切り替え部32へ出力する。つまり、イントラ符号化モードの場合は加算器30を介さず第2モード切り替え部32へ出力し、インター符号化モードの場合は加算器30を出力する。   In the inverse DCT (IDCT) unit 28, the restored DCT coefficient from the inverse quantification unit 26 is subjected to inverse DCT (IDCT) conversion to be a decoded signal. Depending on the encoding mode of the DCT unit 18, an adder 30 and Output to the second mode switching unit 32. That is, in the intra coding mode, the signal is output to the second mode switching unit 32 without going through the adder 30, and in the inter coding mode, the adder 30 is output.

加算器30は、インター符号化モードの場合のみ、逆DCT(IDCT)部28からの復号信号と、減算器14に入力した予測信号と同じ予測信号動き補償予測部36からの予測信号とを加算して復元画像信号として、第2モード切り替え部32へ出力する。   The adder 30 adds the decoded signal from the inverse DCT (IDCT) unit 28 and the prediction signal from the prediction signal motion compensation prediction unit 36 that is the same as the prediction signal input to the subtracter 14 only in the inter coding mode. Then, it is output to the second mode switching unit 32 as a restored image signal.

第2モード切り替え部32は、符号化モードに応じて、復元画像信号を参照画像メモリ34に出力する。参照画像メモリ34は、第2モード切り替え部32からの復元画像信号を、参照画像として記憶する。   The second mode switching unit 32 outputs the restored image signal to the reference image memory 34 according to the encoding mode. The reference image memory 34 stores the restored image signal from the second mode switching unit 32 as a reference image.

動き補償予測部36は、インター符号化モードの場合、並び替え部12からの入力動画像信号を入力して、その入力動画像信号に最も差分の少ない参照画像を参照画像メモリ34にて検索して、予測画像および動きベクトルを出力する動き補償予測を行う。なお、動き補償予測をした予測画像は、減算器14および加算器30へ出力し、動きベクトルは、可変長符号化部22へ出力する。   In the inter coding mode, the motion compensation prediction unit 36 inputs the input moving image signal from the rearrangement unit 12 and searches the reference image memory 34 for a reference image having the smallest difference in the input moving image signal. Then, motion compensated prediction for outputting a predicted image and a motion vector is performed. Note that the predicted image subjected to motion compensation prediction is output to the subtractor 14 and the adder 30, and the motion vector is output to the variable length coding unit 22.

そして、符号化制御部38は、シーンチェンジ検出部10からのシーンチェンジ検出信号に基づいて、後述するように量子化部20に量子化制御信号を出力する一方、バッファ24に符号化結果のバッファ制御信号等を出力する。   Based on the scene change detection signal from the scene change detection unit 10, the encoding control unit 38 outputs a quantization control signal to the quantization unit 20 as will be described later, while the buffer 24 stores the encoding result buffer. Outputs control signals and the like.

図2は、シーンチェンジが発生しない場合におけるGOPにおけるピクチャの符号化順等を示す図である。   FIG. 2 is a diagram illustrating a coding order of pictures in the GOP when a scene change does not occur.

図2は、MN値が例えば、それぞれN=15、M=3のGOP構造の一例を示しているが、本発明は、勿論このGOP構造に限定されることはない。なお、MN値のN値は、GOPを構成するピクチャ数、M値は、Pピクチャの繰り返し周期、すなわち(M−1)がPピクチャ間のBピクチャの数を示す。   FIG. 2 shows an example of a GOP structure with MN values of N = 15 and M = 3, for example, but the present invention is not limited to this GOP structure. Note that the N value of the MN value indicates the number of pictures constituting the GOP, and the M value indicates the P picture repetition period, that is, (M−1) indicates the number of B pictures between the P pictures.

まず、図2(a)に示すように、入力動画像信号(INPUT)は、例えば、画像0〜14を有している。   First, as shown to Fig.2 (a), the input moving image signal (INPUT) has the images 0-14, for example.

次に、並び替え部12は、図2(a)に示す入力動画像信号を、図2(b)に示すようにイントラピクチャが先頭になるように符号化順に並び替え、DCT部18や量子化部20、可変長符号化部22では、並び替えられたその順に入力動画像信号の符号化を行う。図2(b)では、Iピクチャ2(I2)、Bピクチャ0(B0)、Bピクチャ1(B1)、Pピクチャ5(P5)、Bピクチャ画像3(B3)、Bピクチャ4(B4)、…の順に並び替えられる。   Next, the rearrangement unit 12 rearranges the input moving image signal shown in FIG. 2A in the encoding order so that the intra picture comes first as shown in FIG. The encoding unit 20 and the variable length encoding unit 22 encode the input moving image signal in the rearranged order. In FIG. 2B, I picture 2 (I2), B picture 0 (B0), B picture 1 (B1), P picture 5 (P5), B picture image 3 (B3), B picture 4 (B4), Sorted in the order ...

そして、バッファ24は、図2(c)に示すように、すなわち図2(b)と同じ並びで可変長符号化部24からの符号化画像を保持し、1タイミング遅延してその並びで出力する。   Then, as shown in FIG. 2C, the buffer 24 holds the encoded images from the variable length encoding unit 24 in the same arrangement as in FIG. 2B, and outputs them in an arrangement with a delay of one timing. To do.

一方、図示しない動画像復号装置では、この動画像符号化装置から出力された図2(c)に示すような符号化画像列を入力して、図2(d)に示すように復号して、図2(e)に示すように復号信号を再生順に並べ替えて出力する。   On the other hand, in a moving picture decoding apparatus (not shown), an encoded picture sequence as shown in FIG. 2 (c) output from the moving picture encoding apparatus is input and decoded as shown in FIG. 2 (d). As shown in FIG. 2 (e), the decoded signals are rearranged in the reproduction order and output.

以上が、本装置におけるシーンチェンジが発生しない場合の各ピクチャの符号化順等である。   The above is the encoding order of each picture when no scene change occurs in the present apparatus.

図3は、シーンチェンジが発生した場合におけるGOPにおけるピクチャの符号化順等を示す図である。本実施の形態1では、GOPの最後のM(本実施形態の例では、M=3である。)ピクチャ内でシーンチェンジが発生する場合を想定している。   FIG. 3 is a diagram illustrating the coding order of pictures in the GOP when a scene change occurs. In the first embodiment, it is assumed that a scene change occurs in the last M of the GOP (M = 3 in the example of the present embodiment).

つまり、図3(a)に示すように、例えば、Bピクチャ13(B13)と、Pピクチャ14(P13)との間でシーンチェンジが検出された場合における本実施の形態の処理を示している。   That is, as shown in FIG. 3A, for example, the processing of this embodiment when a scene change is detected between the B picture 13 (B13) and the P picture 14 (P13) is shown. .

つまり、シーンチェンジ検出部10は、画像間の輝度の変化などを監視していて、輝度が予め設定した所定閾値を超えた場合、シーンチェンジが検出されたことを示すフラグFcngを1にして、符号化制御部38へ出力する。ここで、図3(a)に示すように、Bピクチャ13(B13)とピクチャ14(P13)との間でシーンチェンジが発生したことを検出したので、シーンチェンジ検出部10は、図3(b)に示すように、Pピクチャ14(P13)の後シーンチェンジ検出フラグFcngを1をセットする。   That is, the scene change detection unit 10 monitors a change in luminance between images, and when the luminance exceeds a predetermined threshold, a flag Fcng indicating that a scene change has been detected is set to 1, The data is output to the encoding control unit 38. Here, as shown in FIG. 3A, since it is detected that a scene change has occurred between the B picture 13 (B13) and the picture 14 (P13), the scene change detection unit 10 performs the process shown in FIG. As shown in b), the post scene change detection flag Fcng is set to 1 after the P picture 14 (P13).

符号化制御部38は、シーンチェンジ検出部10からシーンチェンジ検出フラグFcngの状態、すなわちFcngが0であるか、あるいは1であるかに基づいて、ピクチャタイプ毎に、次に示すような手順で符号量制御を行う。その結果、DCT部18、量子化部20および可変長符号化部22は、図3(c)に示すような画像の並びで符号化を行う。   The encoding control unit 38 performs the following procedure for each picture type based on the state of the scene change detection flag Fcng from the scene change detection unit 10, that is, whether Fcng is 0 or 1. Code amount control is performed. As a result, the DCT unit 18, the quantization unit 20, and the variable length coding unit 22 perform the coding in the arrangement of images as shown in FIG.

(1)Iピクチャの符号
Iピクチャについては、符号化制御部38は、シーンチェンジ検出フラグFcngの値にかかわらず、通常通り符号化を行い、符号化終了後、シーンチェンジ検出フラグFcngを0にする。つまり、Iピクチャの符号化により、必ず、シーンチェンジ検出フラグFcngをリセットにする。
(1) I Picture Code For the I picture, the coding control unit 38 performs coding as usual regardless of the value of the scene change detection flag Fcng, and sets the scene change detection flag Fcng to 0 after the completion of coding. To do. That is, the scene change detection flag Fcng is always reset by encoding the I picture.

(2)Pピクチャの符号化
Pピクチャについては、符号化制御部38は、シーンチェンジ検出フラグFcng値が0のときは、通常通り、すなわち通常のPピクチャ相当の符号量(量子化配分)により符号化を行うよう量子化部20に量子化制御信号を送り制御する。
(2) Coding of P picture For P pictures, the coding control unit 38, when the scene change detection flag Fcng value is 0, as usual, that is, by a code amount (quantization distribution) equivalent to a normal P picture. A quantization control signal is sent to the quantization unit 20 so as to perform encoding.

これに対し、シーンチェンジ検出フラグFcng値が1のとき、すなわちシーンチェンジ後の最初のレファレンスピクチャがPピクチャである場合、符号化制御部38は、該当するシーンチェンジ後のPピクチャを、Iピクチャ相当の符号量(量子化配分)により符号化を行うよう量子化部20に対し量子化制御信号を送る。なお、符号量(量子化配分)は、Iピクチャが最も大きく、次に、Pピクチャ、Bピクチャの順になり、GOPの総符号量の上限値を超えないようにGOPを構成する各ピクチャの符号量が決められる。これにより、シーンチェンジ後のPピクチャをIピクチャ相当の量子化配分、すなわちIピクチャと同等の符号化配分により符号化を行うことができるので、そのPピクチャに十分な符号量を割り当てることができ、シーンチェンジ後の動画像符号化信号の画質劣化を防止することができる。   On the other hand, when the scene change detection flag Fcng value is 1, that is, when the first reference picture after the scene change is a P picture, the encoding control unit 38 converts the corresponding P picture after the scene change into an I picture. A quantization control signal is sent to the quantization unit 20 so as to perform encoding with a considerable amount of code (quantization distribution). It should be noted that the code amount (quantization distribution) is the largest for I pictures, then P pictures and B pictures in this order, and the code of each picture constituting the GOP so as not to exceed the upper limit of the total GOP code amount. The amount is decided. As a result, the P picture after the scene change can be encoded by quantization distribution equivalent to the I picture, that is, encoding distribution equivalent to the I picture, so that a sufficient code amount can be allocated to the P picture. Further, it is possible to prevent the deterioration of the image quality of the moving image encoded signal after the scene change.

次に、符号化制御部38は、入力される動画像信号に依存しない符号長が最小限の固定長の最小限信号として、Bピクチャに対する最低限度の符号語となる後(未来)または前(過去)の画像をそのまま使用することを示す後方向予測(または前方向予測)/動きベクトル0/予測誤差0のCbb信号の符号長をLcbbとして、このPピクチャの符号化により発生した符合量を含めた現在までのGOPの総符号量に、"(M−1)×Lcbb"を加えた値が、GOPに対して要求される総符号量の上限を超えるか否かを判断する。これは、そのシーンチェンジ発生直後のPピクチャであるPピクチャ14(P14)の後に、Bピクチャ12(B12)、Bピクチャ13(B13)の符号化が続くので、そのシーンチェンジ発生直後のPピクチャであるピクチャ14(P14)をIピクチャ相当の符号量で符号化しても、GOPの総符号量上限値を超えることがない否かを判断している。   Next, the encoding control unit 38 becomes the minimum codeword for the B picture as a minimum signal with a fixed code length that is not dependent on the input moving image signal, and becomes the minimum codeword for the B picture (future) or before (before) The code length of the C picture of backward prediction (or forward prediction) / motion vector 0 / prediction error 0 indicating that the past image is used as it is is assumed to be Lcbb, and the code amount generated by the encoding of this P picture is It is determined whether or not the value obtained by adding “(M−1) × Lcbb” to the total GOP code amount to date including the present exceeds the upper limit of the total code amount required for the GOP. This is because the P picture 14 (P14), which is the P picture immediately after the occurrence of the scene change, is followed by the encoding of the B picture 12 (B12) and the B picture 13 (B13). Whether or not picture 14 (P14) is encoded with a code amount equivalent to an I picture is determined whether or not the GOP total code amount upper limit value is not exceeded.

ここで、本実施形態では、M=3であるので、符号化制御部38は、"2×Lcbb"を加えた値が、GOPに対して要求される総符号量の上限を超えるか否かを判断し、超える場合には、このPピクチャの符号化結果を廃棄し、Pピクチャの符号化結果を廃棄することを示すPピクチャスキップフラグFPskipを1とし、シーンチェンジ検出フラグFcngを0にする。これに対し、超えない場合は、このPピクチャの符号化結果をそのまま採用し、PピクチャスキップフラグFPskipを0とし、シーンチェンジ検出フラグFcngを0にする。   In this embodiment, since M = 3, the encoding control unit 38 determines whether or not the value obtained by adding “2 × Lcbb” exceeds the upper limit of the total code amount required for the GOP. If the P picture encoding result is discarded, the P picture skip flag FPskip indicating that the P picture encoding result is discarded is set to 1, and the scene change detection flag Fcng is set to 0. . On the other hand, if not exceeding, the encoding result of the P picture is adopted as it is, the P picture skip flag FPskip is set to 0, and the scene change detection flag Fcng is set to 0.

図3では、"2×Lcbb"を加えた値がGOP総符号量上限値を超える場合を示しているので、符号化制御部38は、Pピクチャ14(P14)を符号化した後に、バッファ24に対しPピクチャ14(P14)の符号化結果を廃棄するようバッファ制御信号を送信する一方、図3(d)に示すように、Pピクチャ14(P14)の符号化結果を廃棄することを示すPピクチャスキップフラグFPskipを1にセットする一方、図3(b)に示すように、シーンチェンジ検出フラグFcngを0に戻す。   Since FIG. 3 shows a case where the value obtained by adding “2 × Lcbb” exceeds the GOP total code amount upper limit value, the encoding control unit 38 encodes the P picture 14 (P14), In contrast, a buffer control signal is transmitted so as to discard the encoding result of P picture 14 (P14), while the encoding result of P picture 14 (P14) is discarded as shown in FIG. While the P picture skip flag FPskip is set to 1, the scene change detection flag Fcng is returned to 0 as shown in FIG.

これにより、バッファ24は、PピクチャスキップフラグFPskipが1の場合、符号化制御部38からのバッファ制御信号により、図3(f)に示すように、Pピクチャ14(P14)の符号化結果を廃棄する。   Thereby, when the P picture skip flag FPskip is 1, the buffer 24 uses the buffer control signal from the encoding control unit 38 to change the encoding result of the P picture 14 (P14) as shown in FIG. Discard.

また、符号化制御部38は、PピクチャスキップフラグFPskipが1の場合、すなわち図3(f)に示すようにPピクチャ14(P14)の符号化結果を廃棄する場合には、それ以降に続くBピクチャ12(B12)、Bピクチャ13(B13)の参照画像がなくなるので、図3(c)に示すように、シーンチェンジ直前のBピクチャ13(B13)を、Pピクチャ13(P13)に変換して、Pピクチャ相当の符号量で量子化されるよう量子化部20に対し量子化制御信号を送り、量子化部20はその量子化制御信号に基づいてDCT係数を量子化する。   In addition, when the P picture skip flag FPskip is 1, that is, when the encoding result of the P picture 14 (P14) is discarded as shown in FIG. Since there are no reference images for B picture 12 (B12) and B picture 13 (B13), B picture 13 (B13) immediately before the scene change is converted to P picture 13 (P13) as shown in FIG. Then, a quantization control signal is sent to the quantization unit 20 so as to be quantized with a code amount equivalent to a P picture, and the quantization unit 20 quantizes the DCT coefficient based on the quantization control signal.

(3)Bピクチャの符号化
Bピクチャについては、符号化制御部38は、PピクチャスキップフラグFPskipが0の場合、通常のBピクチャ相当の符号量で量子化されるよう量子化部20に対し量子化制御信号を送り、量子化部20はその量子化制御信号に基づいてDCT係数を量子化する。
(3) Encoding B picture For B pictures, the encoding control unit 38 instructs the quantization unit 20 to quantize with a code amount equivalent to a normal B picture when the P picture skip flag FPskip is 0. The quantization control signal is sent, and the quantization unit 20 quantizes the DCT coefficient based on the quantization control signal.

次に、符号化制御部38は、このBピクチャの符号化により発生した符合量を含めた現在までのGOPの総符号量に、(M−2)×Lcbb、ここでは1×Lcbbを加えた値が、GOPに対して要求される総符号量上限値を超えるか否かを判断する。そして、(M−2)×LcbbがGOP総符号量上限値を超える場合、このBピクチャの符号化結果を廃棄し、その結果を示すBピクチャスキップフラグFBskipを1にする。これに対し、(M−2)×LcbbがGOP総符号量上限値を超えない場合、このBピクチャの符号化結果をそのまま利用し、その結果を示すBピクチャスキップフラグFBskipを0にする。図3に示す例では、後者の(M−2)×LcbbがGOP総符号量上限値を超えない場合である。   Next, the encoding control unit 38 adds (M−2) × Lcbb, here 1 × Lcbb, to the total code amount of the GOP up to now including the code amount generated by encoding the B picture. It is determined whether or not the value exceeds the total code amount upper limit value required for the GOP. When (M−2) × Lcbb exceeds the GOP total code amount upper limit value, the encoding result of the B picture is discarded and the B picture skip flag FBskip indicating the result is set to 1. On the other hand, when (M−2) × Lcbb does not exceed the GOP total code amount upper limit value, the B picture encoding result is used as it is, and the B picture skip flag FBskip indicating the result is set to 0. In the example shown in FIG. 3, the latter (M−2) × Lcbb does not exceed the GOP total code amount upper limit value.

PピクチャスキップフラグFPskipが1の場合、シーンチェンジ直前ピクチャと、廃棄されていない1つ前のPピクチャとの間に符号化すべきピクチャが存在する場合には、当該ピクチャを符号化し、その後に符号化列Cbbを付加した上で、PピクチャスキップフラグFPskipを0に戻す。   When the P picture skip flag FPskip is 1, if there is a picture to be encoded between the picture immediately before the scene change and the previous P picture that has not been discarded, the picture is encoded, and then the code is encoded. After adding the conversion column Cbb, the P picture skip flag FPskip is returned to 0.

例えば、図3の場合、シーンチェンジ直前Bピクチャ13(B13)と、廃棄されていない1つ前のPピクチャ11(P11)との間に、Bピクチャ12(B12)が存在するので、図3(f)に示すように、Bピクチャ12(B12)を符号化し、その後に符号化列Cbbを付加した上で、PピクチャスキップフラグFPskipを0に戻す。   For example, in the case of FIG. 3, the B picture 12 (B12) exists between the B picture 13 (B13) immediately before the scene change and the previous P picture 11 (P11) that has not been discarded. As shown in (f), the B picture 12 (B12) is encoded, after which the encoded sequence Cbb is added, and then the P picture skip flag FPskip is returned to 0.

なお、図示はしていないが、PピクチャスキップフラグFPskipが0、BピクチャスキップフラグFBskipが1の場合は、Pピクチャ(P13)に続きBピクチャ12(B12)の符号化結果も廃棄する場合なので、Pピクチャ(P13)に続きBピクチャ12(B12)の符号化結果の代わりに、後方向予測(または前方向予測)/動きベクトル0/予測誤差0のCbb信号を2回続けて出力した上で、PピクチャスキップフラグFPskipを0に戻す。なお、この場合は、例えば、Bピクチャ(B12)と、Pピクチャ(P13)との間でシーンチェンジが検出された場合が該当する。   Although not shown, when the P picture skip flag FPskip is 0 and the B picture skip flag FBskip is 1, the encoding result of the B picture 12 (B12) is also discarded after the P picture (P13). After the P picture (P13), instead of the encoding result of the B picture 12 (B12), the backward prediction (or forward prediction) / motion vector 0 / prediction error 0 Cbb signal is output twice in succession. Thus, the P picture skip flag FPskip is returned to zero. In this case, for example, a case where a scene change is detected between a B picture (B12) and a P picture (P13) is applicable.

そして、PピクチャスキップフラグFPskipおよびBピクチャスキップフラグFBskipが共に0の場合は、通常の手続通り、Bピクチャを符号化する。そして、GOP最後のBピクチャの符号化により発生した符合量を含めた現在までの総符号量が、GOP全体の総符号量の上限を超えるか否かを判断し、超えてしまう場合は、GOP最後のこのBピクチャの符号化結果を廃棄し、その代わりに後方向予測(または前方向予測)/動きベクトル0/予測誤差0のCbb信号を付加する一方、超えない場合はGOP最後のこのBピクチャの符号化結果をそのまま出力する。   When both the P picture skip flag FPskip and the B picture skip flag FBskip are 0, the B picture is encoded according to a normal procedure. Then, it is determined whether or not the total code amount up to the present including the code amount generated by encoding the last B picture of the GOP exceeds the upper limit of the total code amount of the entire GOP. The encoding result of the last B picture is discarded, and instead a backward prediction (or forward prediction) / motion vector 0 / prediction error 0 Cbb signal is added. The picture encoding result is output as it is.

従って、本実施の形態1の動画像符号化装置によれば、GOPの最後のM(本実施形態の例では、M=3である。)ピクチャ内でシーンチェンジが発生しても、シーンチェンジ後の最初のレファレンスピクチャがPピクチャである場合、符号化制御部38は、シーンチェンジ後のPピクチャを、Iピクチャ相当の符号量(量子化配分)により符号化を行うよう量子化部20を制御するので、シーンチェンジ後のPピクチャに十分な符号量を割り当てることができ、シーンチェンジ後の動画像符号化信号の画質劣化を防止することができる。   Therefore, according to the moving picture coding apparatus of the first embodiment, even if a scene change occurs in the last M of the GOP (M = 3 in the example of the present embodiment), a scene change occurs. When the subsequent first reference picture is a P picture, the encoding control unit 38 causes the quantization unit 20 to encode the P picture after the scene change with a code amount (quantization distribution) equivalent to the I picture. Since the control is performed, a sufficient amount of code can be assigned to the P picture after the scene change, and deterioration of the image quality of the moving image encoded signal after the scene change can be prevented.

また、本実施の形態1では、GOPの最後のM(本実施形態の例では、M=3である。)ピクチャ内でシーンチェンジが発生した場合、Pピクチャの符号化により発生した符合量を含めた現在までのGOPの総符号量に、"(M−1)×Lcbb"を加えた値が、GOPに対して要求される総符号量の上限を超えるか否かを判断し、超える場合には、このPピクチャの符号化結果を廃棄し、その代わりに後方向予測(または前方向予測)/動きベクトル0/予測誤差0のCbb信号、すなわち後(未来)または前(過去)の画像をそのまま使用することを示すCbb信号を出力するので、シーンチェンジ後の動画像の画質劣化を防止することができると共に、GOPの発生符号量を一定値以下にできる。   Further, in the first embodiment, when a scene change occurs in the last M picture of the GOP (M = 3 in the example of the present embodiment), the code amount generated by encoding the P picture is changed. It is determined whether or not the value obtained by adding “(M−1) × Lcbb” to the total code amount of the GOP including the present exceeds the upper limit of the total code amount required for the GOP. In this case, the encoding result of this P picture is discarded, and instead, backward prediction (or forward prediction) / motion vector 0 / prediction error 0 Cbb signal, that is, a backward (future) or previous (past) image Since the Cbb signal indicating that the signal is used as it is is output, it is possible to prevent the deterioration of the image quality of the moving image after the scene change and to reduce the generated code amount of GOP to a certain value or less.

また、本実施の形態1によれば、GOP構造を変えるような複雑な処理をすることなく、メモリなどの資源を大量に必要とすることもない。   Further, according to the first embodiment, a large amount of resources such as memory is not required without performing complicated processing that changes the GOP structure.

なお、上記実施の形態では、MN値がそれぞれN=15、M=3の場合で説明したが、本発明では、このMN値に制限されることはなく、他のMN値でも勿論よい。このことは、実施の形態2でも同様である。   In the above embodiment, the case where the MN values are N = 15 and M = 3 has been described. However, in the present invention, the MN value is not limited to this, and other MN values may of course be used. The same applies to the second embodiment.

また、本実施の形態1では、Bピクチャとして挿入する最小限信号として、後方向予測(または前方向予測)/動きベクトル0/予測誤差0のCbb信号、すなわち後(未来)または前(過去)の画像をそのまま使用することを示すCbb信号を挿入するように説明したが、本発明では、これに限らず、後(未来)および前(過去)の画像の双方を使用して平均化(1/2)等しても勿論良く、要は、入力される動画像信号に依存しない、符号長の短い符号化ビット列の信号であれば何でもよい。このことは、実施の形態2でも同様である。   In the first embodiment, as a minimum signal to be inserted as a B picture, backward prediction (or forward prediction) / motion vector 0 / prediction error 0 Cbb signal, that is, backward (future) or forward (past) However, the present invention is not limited to this, and averaging (1) is performed using both the subsequent (future) and previous (previous) images. Of course, it may be anything as long as it is a signal of a coded bit string having a short code length that does not depend on the input video signal. The same applies to the second embodiment.

また、本実施の形態1では、PピクチャをIピクチャと同等の符号化配分で符号化した符号量を含めたGOP先頭から当該Pピクチャまでの符号量と、予めピクチャを示すための符号長が最小限の最小限信号の符号量に前記Mの値から1または2減算した値を乗算したPピクチャ以降の最低必要符号量とを加算した値が、GOPに対して要求される総符号量上限値を超えるか否かを判断するように説明したが、本発明では、これに限らず、その加算値と総符号量上限値との差分を求めて、その差分が所定の閾値を超えるか否かにより、その加算値が総符号量上限値を超えそうか、超えそうもない、と判断するようにしても勿論よい。このことは、実施の形態2でも同様である。   Further, in the first embodiment, the code amount from the GOP head to the P picture including the code amount obtained by encoding the P picture with the same encoding distribution as the I picture, and the code length for indicating the picture in advance The total code amount upper limit required for the GOP is a value obtained by adding the minimum necessary code amount after the P picture obtained by multiplying the value of the minimum signal by 1 or 2 from the value of M to the minimum signal amount. In the present invention, the present invention is not limited to this. However, the present invention is not limited to this, and a difference between the added value and the total code amount upper limit value is obtained, and whether or not the difference exceeds a predetermined threshold value. Of course, it may be determined that the added value is likely to exceed the total code amount upper limit value or not. The same applies to the second embodiment.

また、本実施の形態1では、前記加算値と前記総符号量上限値とに基づいて、前記加算した値が、GOPに対して要求される総符号量上限値を超える場合、当該Pピクチャの符号化結果を廃棄するようバッファ24を制御し、かつ、最小限信号であるCbbをバッファ24を介して出力させるように説明したが、本発明では、これに限らず、当該Pピクチャの符号化結果を廃棄するようバッファ24を制御するだけで、後のGOP構造を崩さない限り、最小限信号であるCbbをバッファ24を介して出力させなくても良い。このことは、実施の形態2でも同様である。   Further, in the first embodiment, when the added value exceeds the total code amount upper limit value required for the GOP based on the addition value and the total code amount upper limit value, Although it has been described that the buffer 24 is controlled so as to discard the encoding result and the minimum signal Cbb is output via the buffer 24, the present invention is not limited to this, and the encoding of the P picture is not limited thereto. Only by controlling the buffer 24 to discard the result, the minimum signal Cbb does not have to be output via the buffer 24 unless the GOP structure is destroyed later. The same applies to the second embodiment.

また、本実施の形態1では、動画像信号のGOP毎に各GOP最後のM(Mは、MN値のMの値)ピクチャ内でシーンチェンジが発生するか否かを検出するように説明したが、本発明では、これに限らず、GOP最後の数Mピクチャ数内でも、さらには、GOP最後のMピクチャでなく、GOPの最初の方でも、中央付近でも、GOP内であればどこでも良い。   Further, in the first embodiment, for each GOP of the moving image signal, it has been described that whether or not a scene change occurs in the last M picture of each GOP (M is the value of M of the MN value) is detected. However, in the present invention, the present invention is not limited to this, and may be within the number of M pictures at the end of the GOP, or even at the beginning of the GOP, near the center, or anywhere within the GOP, not the last M picture of the GOP. .

実施の形態2.
上記実施の形態1では、例えば、GOP最後のM(本実施形態の例では、M=3である。)ピクチャ内でシーンチェンジが発生した場合に、GOP単位で総符号量がGOPの上限値を超えないように説明したが、シーンチェンジは何時発生するのかわからないのが普通である。
Embodiment 2.
In the first embodiment, for example, when a scene change occurs in the last M of the GOP (M = 3 in the example of the present embodiment), the total code amount is the upper limit of the GOP in GOP units. Although it was explained not to exceed, it is normal not to know when a scene change occurs.

そこで、本実施の形態2では、GOPをM値で区切り、M値単位でシーンチェンジが発生しても、M値単位で総符号量がGOPの上限値を超えないようにする。   Therefore, in the second embodiment, the GOP is divided into M values so that even if a scene change occurs in M value units, the total code amount does not exceed the upper limit value of GOP in M value units.

例えば、上記実施の形態1と同様に、GOPのMN値がそれぞれN=15、M=3の場合、1GOPをPピクチャの出現割合を示すM値の3ピクチャ毎に区切った場合、この3ピクチャ(フレーム)毎に一単位としてGOP先頭からの総符号量を決めておき、この3フレーム毎の一単位により、上記実施の形態1の同様の処理を行っても勿論よい。   For example, in the same manner as in the first embodiment, when the MN values of the GOP are N = 15 and M = 3, respectively, when the 1 GOP is divided into every 3 pictures of the M value indicating the appearance ratio of the P picture, these 3 pictures Of course, the total amount of codes from the beginning of the GOP is determined as one unit for each (frame), and the same processing as in the first embodiment may be performed using one unit for every three frames.

従って、本実施の形態2によれば、上記実施の形態1と同様に、シーンチェンジ後の動画像の画質劣化を防止することができると共に、GOPの発生符号量を一定値以下にできる。   Therefore, according to the second embodiment, as in the first embodiment, it is possible to prevent image quality deterioration of a moving image after a scene change and to reduce the generated code amount of GOP to a certain value or less.

また、本実施の形態2では、GOPをM値で区切り、Mピクチャ単位でシーンチェンジが発生しても、Mピクチャ単位で総符号量がGOPの上限値を超えないようにしているため、GOP内のいずれの箇所でシーンチェンジが発生しても、そのシーンチェンジが発生したMピクチャ内で上記実施の形態1と同様の処理を行い、それ以降のピクチャの符号化には影響を与えないので、GOPの最初や前半等でシーンチェンジが発生しても、シーンチェンジによる画質劣化等の悪影響が及ぶピクチャを少なくすることが出来る。   In the second embodiment, the GOP is divided into M values, and even if a scene change occurs in units of M pictures, the total code amount does not exceed the upper limit value of GOPs in units of M pictures. Even if a scene change occurs in any part of the picture, the same processing as in the first embodiment is performed in the M picture in which the scene change has occurred, and the subsequent picture coding is not affected. Even if a scene change occurs in the first or first half of the GOP, it is possible to reduce pictures that are adversely affected by image quality deterioration due to the scene change.

本発明の実施の形態である動画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the moving image encoder which is embodiment of this invention. シーンチェンジが発生しない場合のGOPにおけるピクチャの符号化順等を示す図である。It is a figure which shows the encoding order etc. of the picture in GOP when a scene change does not occur. シーンチェンジが発生した場合のGOPにおけるピクチャの符号化順等を示す図である。抽出した撮影情報を記録したテーブルの一例を示す図である。It is a figure which shows the encoding order etc. of the picture in GOP when a scene change generate | occur | produces. It is a figure which shows an example of the table which recorded the imaging | photography information extracted.

符号の説明Explanation of symbols

10 シーン検出部、12 並び替え部、14 減算器、16 第1モード切替え部、18 DCT部、20 量子化部、22 可変長符号化部、24 バッファ、26 逆量士化部、28 逆DDCT部28、30 加算器、32 第2モード切り替え部、34 参照画像メモリ、36 動き補償予測部、38 符号化制御部。   10 scene detection unit, 12 rearrangement unit, 14 subtractor, 16 first mode switching unit, 18 DCT unit, 20 quantization unit, 22 variable length coding unit, 24 buffer, 26 inverse quantification unit, 28 inverse DDCT Units 28, 30 adder, 32 second mode switching unit, 34 reference image memory, 36 motion compensation prediction unit, 38 encoding control unit.

Claims (8)

動画像信号を符号化する符号化手段と、
動画像信号内でシーンチェンジが発生するか否かを検出するシーンチェンジ検出手段と、
前記シーンチェンジ検出手段によってシーンチェンジが検出された場合、当該シーンチェンジ検出後の最初のリファレンスピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の符号化配分で符号化するよう前記符号化手段を制御する符号量制御手段と、
前記符号化手段によって符号化された動画像信号を出力するバッファと、
を有する動画像符号化装置。
Encoding means for encoding a moving image signal;
Scene change detection means for detecting whether or not a scene change occurs in the moving image signal;
When a scene change is detected by the scene change detection means, it is determined whether or not the first reference picture after the scene change is detected is a P picture. A code amount control means for controlling the coding means to perform coding with a coding distribution equivalent to that of a picture;
A buffer for outputting a moving image signal encoded by the encoding means;
A moving picture encoding apparatus having:
請求項1に記載の動画像符号化装置であって、
前記符号量制御手段は、
さらに、
前記PピクチャをIピクチャと同等の量子化配分で符号化した符号量を含めたGOP先頭から当該Pピクチャまでの符号量と、予めピクチャを示すための符号長が最小限の最小限信号の符号量に前記Mの値から1減算した値を乗算したPピクチャ以降の最低必要符号量とを加算した値と、GOPに対して要求される総符号量上限値とに基づいて、前記加算した値が前記総符号量上限値を超えそうもない場合には、当該Pピクチャの符号化結果を出力するよう前記バッファを制御する一方、超えそうである場合には、当該Pピクチャの符号化結果を廃棄するよう前記バッファを制御する、動画像符号化装置。
The moving image encoding device according to claim 1,
The code amount control means includes:
further,
The code amount from the GOP head to the P picture including the code amount obtained by encoding the P picture with the same quantization distribution as that of the I picture, and the code of the minimum signal with the minimum code length for indicating the picture in advance Based on a value obtained by adding a minimum required code amount after the P picture obtained by multiplying a value obtained by subtracting 1 from the value of M to the amount, and the total code amount upper limit value required for the GOP, the added value Is not likely to exceed the total code amount upper limit value, the buffer is controlled so as to output the encoding result of the P picture, while if it is likely to exceed, the encoding result of the P picture is A moving picture coding apparatus for controlling the buffer to be discarded.
請求項2に記載の動画像符号化装置であって、
前記符号量制御手段は、
前記加算した値と前記総符号量上限値とに基づいて、前記加算した値が、GOPに対して要求される総符号量上限値を超えそうな場合には、当該Pピクチャの符号化結果を廃棄するよう前記バッファを制御し、さらに、前記最小限信号を前記バッファを介して出力させる、動画像符号化装置。
The moving image encoding device according to claim 2,
The code amount control means includes:
Based on the added value and the total code amount upper limit value, if the added value is likely to exceed the total code amount upper limit value required for the GOP, the encoding result of the P picture is A moving picture coding apparatus that controls the buffer to be discarded and further outputs the minimum signal through the buffer.
請求項2に記載の動画像符号化装置であって、
前記符号量制御手段は、
前記加算した値と前記総符号量上限値とに基づいて、前記加算した値が、GOPに対して要求される総符号量上限値を超えそうな場合には、当該Pピクチャの符号化結果を廃棄するよう前記バッファを制御し、かつ、前記シーンチェンジ直前のピクチャをPピクチャとして符号化させ、その符号化結果および前記最小限信号を前記バッファを介して出力するよう前記符号化手段を制御する、動画像符号化装置。
The moving image encoding device according to claim 2,
The code amount control means includes:
Based on the added value and the total code amount upper limit value, if the added value is likely to exceed the total code amount upper limit value required for the GOP, the encoding result of the P picture is The buffer is controlled to be discarded, and the picture immediately before the scene change is encoded as a P picture, and the encoding means is controlled to output the encoding result and the minimum signal through the buffer. , Moving picture coding apparatus.
請求項2に記載の動画像符号化装置であって、
前記符号量制御手段は、
さらに、
前記加算した値と前記総符号量上限値とに基づいて、前記加算値が前記総符号量上限値を超えそうもない場合、当該Pピクチャの符号化結果を出力するよう前記バッファを制御すると共に、シーンチェンジ直前のピクチャをBピクチャ相当の量子化配分で前記符号化手段に符号化させ、当該シーンチェンジ直前のBピクチャをBピクチャ相当の量子化配分で符号化した符号量を含めたGOP先頭から当該Bピクチャまでの符号量と、前記最小限信号の符号量に前記Mの値から2減算した値を乗算した当該Bピクチャ以降の最低必要符号量とを加算した値と、GOPに対して要求される総符号量上限値とに基づいて、前記加算した値が前記総符号量上限値をを超えそうもない場合には、当該Bピクチャの符号化結果を出力するよう前記バッファを制御する一方、超えそうな場合には、当該Bピクチャの符号化結果を廃棄するよう前記バッファを制御し、かつ、前記最小限信号を前記バッファを介して出力させる、動画像符号化装置。
The moving image encoding device according to claim 2,
The code amount control means includes:
further,
Based on the added value and the total code amount upper limit value, when the added value is unlikely to exceed the total code amount upper limit value, the buffer is controlled to output the encoding result of the P picture. The GOP head including the code amount obtained by encoding the picture immediately before the scene change by the encoding means with the quantization distribution equivalent to the B picture and encoding the B picture immediately before the scene change with the quantization distribution equivalent to the B picture. A value obtained by adding the code amount from the B picture to the B picture, the minimum required code amount after the B picture obtained by multiplying the code amount of the minimum signal by the value obtained by subtracting 2 from the M value, and GOP Based on the requested total code amount upper limit value, if the added value is unlikely to exceed the total code amount upper limit value, the buffer outputs the encoding result of the B picture. While control, if exceeded likely controls the buffer to discard the encoded result of the B-picture, and the minimum signal to output through the buffer, the moving picture coding apparatus.
請求項4に記載の動画像符号化装置であって、
前記符号量制御手段は、
さらに、
前記シーンチェンジ直前のピクチャと、前記シーンチェンジより前のPピクチャとの間に、符号化すべきピクチャが存在するか否かを判断し、存在する場合には、当該符号化すべきピクチャをBピクチャとして符号化させ、その符号化結果を出力するよう前記符号化手段を制御する、動画像符号化装置。
The moving image encoding device according to claim 4,
The code amount control means includes:
further,
It is determined whether or not there is a picture to be encoded between the picture immediately before the scene change and the P picture before the scene change, and if so, the picture to be encoded is determined as a B picture. A moving picture coding apparatus for controlling the coding means to perform coding and to output the coding result.
動画像信号を符号化する符号化手段と、
動画像信号のGOP毎にM(Mは、MN値のMの値)ピクチャ毎に分割し、各Mピクチャ内でシーンチェンジが発生するか否かを検出するシーンチェンジ検出手段と、
シーンチェンジ検出後の最初のリファレンスピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の量子化配分で符号化するよう前記符号化手段を制御する符号量制御手段と、
前記符号化手段によって符号化された動画像信号を出力するバッファと、
を有する動画像符号化装置。
Encoding means for encoding a moving image signal;
Scene change detecting means for dividing each MOP of a moving image signal for each M (M is the value of M of MN values) and detecting whether or not a scene change occurs in each M picture;
It is determined whether or not the first reference picture after detection of a scene change is a P picture. If it is determined that the P picture is a P picture, the encoding is performed so that the P picture is encoded with a quantization distribution equivalent to that of an I picture. Code amount control means for controlling the means;
A buffer for outputting a moving image signal encoded by the encoding means;
A moving picture encoding apparatus having:
動画像信号内でシーンチェンジが発生するか否かを検出するステップと、
動画像信号内でーンチェンジが検出された場合、当該シーンチェンジ検出後の最初のリファレンスピクチャがPピクチャであるか否かを判断し、Pピクチャであると判断した場合、当該PピクチャをIピクチャと同等の符号化配分で符号化するステップと、
符号化された前記動画像信号を出力するステップと、
を有する動画像符号化方法。
Detecting whether a scene change occurs in the moving image signal;
If an end change is detected in the video signal, it is determined whether or not the first reference picture after the scene change is detected is a P picture. If it is determined that the P picture is a P picture, the P picture is referred to as an I picture. Encoding with an equivalent encoding distribution;
Outputting the encoded video signal;
A video encoding method comprising:
JP2008195922A 2008-07-30 2008-07-30 Moving image coding device and moving image coding method Pending JP2010034939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008195922A JP2010034939A (en) 2008-07-30 2008-07-30 Moving image coding device and moving image coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008195922A JP2010034939A (en) 2008-07-30 2008-07-30 Moving image coding device and moving image coding method

Publications (1)

Publication Number Publication Date
JP2010034939A true JP2010034939A (en) 2010-02-12

Family

ID=41738904

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008195922A Pending JP2010034939A (en) 2008-07-30 2008-07-30 Moving image coding device and moving image coding method

Country Status (1)

Country Link
JP (1) JP2010034939A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016213698A (en) * 2015-05-11 2016-12-15 日本放送協会 Image coding device and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0630396A (en) * 1992-07-10 1994-02-04 Victor Co Of Japan Ltd Animation coding decoding device
JPH11196422A (en) * 1997-12-16 1999-07-21 Texas Instr Inc <Ti> Encode method of image signal
JP2008153946A (en) * 2006-12-18 2008-07-03 Ntt Electornics Corp Image encoding device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0630396A (en) * 1992-07-10 1994-02-04 Victor Co Of Japan Ltd Animation coding decoding device
JPH11196422A (en) * 1997-12-16 1999-07-21 Texas Instr Inc <Ti> Encode method of image signal
JP2008153946A (en) * 2006-12-18 2008-07-03 Ntt Electornics Corp Image encoding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016213698A (en) * 2015-05-11 2016-12-15 日本放送協会 Image coding device and program

Similar Documents

Publication Publication Date Title
US8279923B2 (en) Video coding method and video coding apparatus
US20070230574A1 (en) Method and Device for Encoding Digital Video Data
JP2871316B2 (en) Video encoding device
US20010026587A1 (en) Image encoding apparatus and method of same, video camera, image recording apparatus, and image transmission apparatus
US9113174B2 (en) Predictive coding apparatus, control method thereof, and computer program
JP4828950B2 (en) Video decoding device
US20230300363A1 (en) Systems and methods for template matching for adaptive mvd resolution
JP2007507128A (en) Video picture encoding and decoding with delayed reference picture refresh
US6226326B1 (en) Coding device and coding method
KR101996775B1 (en) An encoding apparatus including a video switching apparatus and an encoding method including a video switching detecting method
JP2004523985A (en) Video encoding method and corresponding encoding device
JP2010050911A (en) Encoding apparatus
JP4357560B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
KR20130032807A (en) Method and apparatus for encoding a moving picture
JP2006246277A (en) Re-encoding apparatus, re-encoding method, and re-encoding program
US20090316787A1 (en) Moving image encoder and decoder, and moving image encoding method and decoding method
JP2010034939A (en) Moving image coding device and moving image coding method
JP4769392B2 (en) Signal processing device
JP2003069997A (en) Moving picture encoder
JP2002199408A (en) Moving image coding method and moving image coder
JP5579730B2 (en) Brightness change coding
JPH05308628A (en) Moving image encoder
JP4223577B2 (en) Image coding apparatus and method thereof, and image decoding apparatus and method thereof
JP2000013802A (en) Video signal coder employing inter-frame prediction
JP4762860B2 (en) Video encoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111007

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111122

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120403