JP2008098980A - Moving image encoding apparatus - Google Patents

Moving image encoding apparatus Download PDF

Info

Publication number
JP2008098980A
JP2008098980A JP2006278475A JP2006278475A JP2008098980A JP 2008098980 A JP2008098980 A JP 2008098980A JP 2006278475 A JP2006278475 A JP 2006278475A JP 2006278475 A JP2006278475 A JP 2006278475A JP 2008098980 A JP2008098980 A JP 2008098980A
Authority
JP
Japan
Prior art keywords
encoding
moving image
unit
parameter
complexity
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
JP2006278475A
Other languages
Japanese (ja)
Inventor
Hideki Takehara
英樹 竹原
Takashi Morishige
孝 森重
Shigeru Fukushima
茂 福島
Hiroyuki Kurashige
宏之 倉重
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 JP2006278475A priority Critical patent/JP2008098980A/en
Publication of JP2008098980A publication Critical patent/JP2008098980A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a picture signal encoding apparatus in which picture quality of a moving image is equalized as well as the processing amount is significantly reduced in comparison with a conventional apparatus. <P>SOLUTION: The moving image encoding apparatus extracts character information of the moving image in encoding an input moving image, and determines a GOP structure based thereon. The apparatus determines a first encoding parameter based on the character information of the moving image and the GOP structure, and calculates encoding complexity for each picture using the character information of the moving image and the GOP structure and the first encoding parameter (a first encoding section 20). Then, the apparatus stores the first encoding parameter and the encoding complexity in a recording medium 30. Next, the apparatus determines a second encoding parameter using the first encoding parameter and the encoding complexity stored in the recording medium 30 in encoding the input moving image of the same content as a previous image again, and encodes the input moving image using the second encoding parameter (a second encoding section 40). <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、動き補償予測を用いて符号化を行う動画像符号化装置に関する。   The present invention relates to a moving picture coding apparatus that performs coding using motion compensation prediction.

映像信号を第1のパスと第2のパスに分けて符号化する2パス型可変ビットレート映像信号符号化装置が知られている(例えば、特開平7-284097号公報、特開平8-265747号公報)。これらの従来の映像信号符号化装置では、例えば、入力された2時間の映像信号を、第1のパスの符号化において、発生データ量の大小にかかわらず一定の量子化幅で量子化した後、可変長符号化し、得られた符号化データ量の情報を記憶回路に所定単位毎に記録する。符号化方式としてMPEGによる圧縮符号化方式を採用した場合は、映像信号は全ビデオシーケンスに対してピクチャ単位に発生符号量を情報として記憶回路に記録される。なお、特開平8-265747号公報では第1のパスの前段にGOP構造を決める回路が付加されている。MPEGに代表されるような可変長符号化を行っている符号化方式は、量子化幅を固定にして第1のパスで符号化を行うと、符号化画像の複雑さや動き補償残差成分量に応じて発生符号量が多くなる。この性質を利用して、発生符号量の分布状態を予め調査しておく。   2. Description of the Related Art There are known two-pass variable bit rate video signal encoding apparatuses that encode a video signal by dividing it into a first pass and a second pass (for example, JP-A-7-284097 and JP-A-8-265747). Issue gazette). In these conventional video signal encoding devices, for example, after the input two-hour video signal is quantized with a constant quantization width regardless of the amount of generated data in the first pass encoding. Then, variable length coding is performed, and information of the obtained encoded data amount is recorded in the storage circuit for each predetermined unit. When a compression encoding method based on MPEG is adopted as the encoding method, the video signal is recorded in the storage circuit as information on the generated code amount for each video sequence as a picture unit. In JP-A-8-265747, a circuit for determining the GOP structure is added before the first pass. When encoding is performed in the first pass with a fixed quantization width, encoding schemes such as MPEG, which perform variable length encoding, the complexity of the encoded image and the amount of motion compensation residual component are as follows. Accordingly, the amount of generated code increases. Using this property, the distribution state of the generated code amount is investigated in advance.

そして、第2のパスの符号化で、その分布に極力近くなるように符号量の配分を行うことで、全ビデオシーケンスの画質を均一にすることが可能となる。
この場合、第1のパスでは一般的に量子化幅を小さめにして符号化を行い、第2のパスで出力される最終的な符号量より多くの符号量を発生させるのが一般的である。量子化幅を小さくすることで画像の高周波成分まで細かく情報を検出して、その画像の特性を検出する必要があるからである。その発生符号量と量子化幅の示すほぼ反比例の関係を用いて、第2のパスで目標とするピクチャごとの符号量を算出し、その値に制御するようにしている。
Then, in the second pass encoding, the code amount is distributed so as to be as close as possible to the distribution, so that the image quality of all video sequences can be made uniform.
In this case, in general, encoding is performed with a smaller quantization width in the first pass, and a larger code amount than the final code amount output in the second pass is generally generated. . This is because by reducing the quantization width, it is necessary to detect fine information up to the high frequency component of the image and to detect the characteristics of the image. Using the almost inversely proportional relationship between the generated code amount and the quantization width, the code amount for each target picture is calculated in the second pass and controlled to that value.

特開平11-275577号公報の2パス型可変ビットレート映像信号符号化装置は、上記従来例がピクチャ単位で符号量の見積もりを行っており、MB単位の符号量変動を再現できないという課題があるのを解決するためのものである。第1のパスの符号化においてMB単位の発生符号量を情報として記憶回路に記録し、第2のパスの符号化において、MB単位で符号量制御を行うことで精度を向上させている。   The two-pass variable bit rate video signal encoding apparatus disclosed in Japanese Patent Application Laid-Open No. 11-275577 has a problem that the above-described conventional example estimates the code amount in units of pictures and cannot reproduce code amount fluctuations in units of MB. It is for solving the problem. In the first pass encoding, the generated code amount in MB units is recorded in the storage circuit as information, and in the second pass encoding, the code amount control is performed in MB units to improve accuracy.

一方、2パス型可変ビットレート映像信号符号化装置に近い符号化効率を得るための1パス型可変ビットレート映像信号符号化装置が知られている(例えば、特開平10−66067号公報、特開2002−199398号公報)。この映像信号符号化装置では、2パス型可変ビットレート映像信号符号化装置が、第1のパスの符号化で得ている発生符号量の代わりに、符号化の前段において映像信号が持つ特徴情報から符号化難易度を算出し、符号化難易度に応じて目標符号量を割り当てることで、可変ビットレート制御を可能としている。このような1パス型可変ビットレート映像信号符号化装置では、ビデオシーケンス全体について画質を均一化することは理論上困難であるが、ビデオシーケンスの画質を周期的或いはシーンの区切り毎に均一にすることが可能である。
特開平7-284097号公報 特開平8-265747号公報 特開平11-275577号公報 特開平10−66067号公報 特開2002−199398号公報
On the other hand, a one-pass variable bit rate video signal encoding device for obtaining encoding efficiency close to that of a two-pass variable bit rate video signal encoding device is known (for example, Japanese Patent Laid-Open No. 10-66067, No. 2002-199398). In this video signal encoding device, the two-pass variable bit rate video signal encoding device uses the characteristic information of the video signal in the previous stage of encoding instead of the generated code amount obtained by the first pass encoding. Thus, it is possible to perform variable bit rate control by calculating the encoding difficulty level from the above and assigning a target code amount according to the encoding difficulty level. In such a one-pass variable bit rate video signal encoding apparatus, it is theoretically difficult to make the image quality uniform for the entire video sequence, but the image quality of the video sequence is made uniform periodically or every scene break. It is possible.
JP-A-7-284097 JP-A-8-265747 Japanese Patent Application Laid-Open No. 11-275577 Japanese Patent Laid-Open No. 10-66067 JP 2002-199398 A

MPEG−2よりも新しい符号化方式としてMPEG−4AVC(ISO/IEC14496−10)がある。MPEG−4AVCでは、選択可能な符号化パラメータをMPEG−2の数百倍用意し、その中から最適なパラメータを選択することで、MPEG−2に対して2倍以上の符号化効率の向上が可能となる。符号化パラメータとは、例えば、MB構造(フィールド/フレーム)、MB内ブロックサイズ、MB予測方式、動きベクトルなどである。   There is MPEG-4AVC (ISO / IEC14496-10) as a newer encoding method than MPEG-2. In MPEG-4AVC, selectable encoding parameters are prepared several hundred times that of MPEG-2, and by selecting the optimum parameters from among them, the encoding efficiency can be improved more than twice that of MPEG-2. It becomes possible. The encoding parameter is, for example, an MB structure (field / frame), an intra-MB block size, an MB prediction method, a motion vector, or the like.

そのため、MPEG−4AVCでは、多数の符号化パラメータ候補の中から最適な符号化パラメータを選択できるか否かが符号化効率向上のために重要である。注意しなければならないことは、最適な符号化パラメータはビットレート(主に量子化幅で制御される)によって変動することである。例えば、一般的には高ビットレートであれば、フレーム内符号化で用いるマクロブック(以下イントラMBと呼ぶ)の選択率を上げてもよいが、低ビットレートではイントラMBの選択率を下げる必要がある。また、MPEG−4AVCでは隣接MB間の符号化パラメータの相関性を利用して圧縮効率を向上させているため、最適な符号化パラメータは隣接するMBによっても変化する。   Therefore, in MPEG-4 AVC, whether or not an optimal encoding parameter can be selected from a large number of encoding parameter candidates is important for improving the encoding efficiency. It should be noted that the optimal encoding parameter varies with the bit rate (mainly controlled by the quantization width). For example, in general, if the bit rate is high, the selection rate of the macrobook (hereinafter referred to as intra MB) used for intra-frame coding may be increased, but the selection rate of intra MB needs to be decreased at a low bit rate. There is. In MPEG-4 AVC, since the compression efficiency is improved by utilizing the correlation of coding parameters between adjacent MBs, the optimum coding parameter varies depending on the adjacent MB.

ここで、上記の従来の2パス型可変ビットレート映像信号符号化装置に、MPEG−4AVCを適用した場合について考える。
従来の2パス型可変ビットレート映像信号符号化装置では、符号化パラメータの選択に関する符号量(主に量子化幅に依存する)について考慮されておらず、第1のパスと第2のパスとで異なる量子化幅を用いている。第1のパスと第2のパスの量子化幅が近いピクチャやMBであれば、あまり問題とはならないが、第1のパスと第2のパスとの量子化幅が大きく異なるようなピクチャやMBでは、第1のパスで見積もった符号量が第2のパスで発生する実際の符号量と大きく異なったものとなり、第1のパスと第2のパスとで最適な符号化パラメータが変化する。このように、従来例では、符号化パラメータの量子化幅による変動を考慮していないために、第1のパスにおける見積もり符号量が有効に作用せず、MPEG−4AVCのように多数の符号化パラメータを有する符号化方式においては、見積もり符号量の誤差が大きくなってしまう。一般的に、平均的な映像では第1のパスと第2のパスの量子化幅が近くなるが、難しい映像や簡単な映像では第1のパスと第2のパスの量子化幅が大きく異なる。可変ビットレート技術は難しい映像や簡単な映像に対する符号化効率を向上させることで、映像全体の画質を均一化されるための技術であり、本来の可変ビットレートの特徴を活かしきれないという課題がある。
Here, consider a case where MPEG-4 AVC is applied to the above-described conventional two-pass variable bit rate video signal encoding apparatus.
In the conventional two-pass variable bit rate video signal encoding apparatus, the code amount (mainly depending on the quantization width) related to the selection of the encoding parameter is not considered, and the first pass, the second pass, Different quantization widths are used. If the first pass and the second pass have similar quantization widths of pictures and MBs, this is not a problem, but the pictures and MBs whose quantization widths of the first pass and the second pass are significantly different In the MB, the code amount estimated in the first pass is significantly different from the actual code amount generated in the second pass, and the optimal encoding parameter changes between the first pass and the second pass. . As described above, in the conventional example, since the variation due to the quantization width of the encoding parameter is not considered, the estimated code amount in the first pass does not work effectively, and a large number of encodings are performed as in MPEG-4 AVC. In an encoding method having parameters, an error in the estimated code amount becomes large. In general, the quantization widths of the first pass and the second pass are close to each other in an average image, but the quantization widths of the first pass and the second pass are greatly different in difficult or simple images. . The variable bit rate technology is a technology for making the image quality of the entire video uniform by improving the coding efficiency for difficult video and simple video, and there is a problem that the characteristics of the original variable bit rate cannot be fully utilized. is there.

また、従来の2パス型可変ビットレート映像信号符号化装置には、隣接MB間の相関性を考慮した符号化についてはなんら記述されていない。
このように従来の2パス型可変ビットレート映像信号符号化装置にMPEG−4AVCのように多数の符号化パラメータを有する符号化方式を適用した場合、難しい映像や簡単な映像が混在しているような動画像に対して、第1のパスの符号化で見積もった符号量と、第2のパスの符号化で実際に発生する符号量との誤差が大きくなり、最適な符号量制御が行われないために、符号化した動画像の映像画質を均一化できない問題が起きる。
Further, the conventional two-pass variable bit rate video signal encoding device does not describe any encoding considering the correlation between adjacent MBs.
As described above, when an encoding method having a large number of encoding parameters such as MPEG-4AVC is applied to the conventional two-pass variable bit rate video signal encoding apparatus, it seems that difficult video and simple video are mixed. Therefore, an error between the code amount estimated by the first pass encoding and the code amount actually generated by the second pass encoding becomes large, and optimal code amount control is performed. Therefore, there is a problem that the image quality of the encoded moving image cannot be made uniform.

また、MPEG−4AVCでは片側予測において複数の参照画像を持つことができるため、MPEG−2と比較して動きベクトル検出に要する処理量が大幅に大きくなる。多数の符号化パラメータの中から最適なモードを選択する処理には莫大な処理量を要するのが一般的であり、高画質と処理量削減を両立するのが困難である課題もある。例えば、MPEG−4AVCの参照ソフトウェア(ISO/IEC14496−5)で紹介されているレート歪最適化方法では、全てのモードについて符号化と復号化を行ってから評価をしているため非常に処理量が大きくなってしまう。   In addition, since MPEG-4 AVC can have a plurality of reference images in one-sided prediction, the processing amount required for motion vector detection is significantly increased compared to MPEG-2. Processing for selecting an optimal mode from a large number of encoding parameters generally requires a huge amount of processing, and there is a problem that it is difficult to achieve both high image quality and reduction in processing amount. For example, in the rate distortion optimization method introduced in the MPEG-4 AVC reference software (ISO / IEC14496-5), since all modes are evaluated after encoding and decoding, the amount of processing is extremely high. Will become bigger.

従来の2パス型可変ビットレート映像信号符号化装置のように、処理量の莫大な符号化パラメータの選択を第1のパスと第2のパスとの両方で行うことは処理量の点から非効率であるといえる。   As in the conventional two-pass variable bit rate video signal encoding apparatus, selection of encoding parameters with a large amount of processing in both the first pass and the second pass is not from the viewpoint of processing amount. It can be said that it is efficient.

一方、従来の1パス型可変ビットレート映像信号符号化装置では、動画像が持つ特徴から符号化難易度を算出しているため、第1のパスと第2のパス間で符号量の見積もりの誤差による画質劣化は起きない。しかし、数百の符号化パラメータの中から最適な符号化パラメータを選択する精度に関して課題がある。また、ビデオシーケンス全体について画質を均一化することにも課題がある。更に、第1のパスと第2のパスとの間で処理の削減についての工夫がなされていない。   On the other hand, in the conventional one-pass variable bit rate video signal encoding device, since the encoding difficulty level is calculated from the characteristics of the moving image, the code amount is estimated between the first pass and the second pass. Image quality degradation due to errors does not occur. However, there is a problem regarding the accuracy of selecting an optimal encoding parameter from among hundreds of encoding parameters. There is also a problem in making the image quality uniform for the entire video sequence. Furthermore, no contrivance has been made for reducing processing between the first pass and the second pass.

映像符号化より高度な符号化を行なうには処理量が多く必要となるため、従来の映像信号符号化装置は、専用ハードウェアによって実現されていた。ところが、最近はCPUの高速化とマルチコア化が進み、ソフトウェアを用いた分散処理による映像信号符号化装置の実現が可能になりつつある。   Since a higher processing amount is required to perform higher-level encoding than video encoding, the conventional video signal encoding apparatus has been realized by dedicated hardware. However, recently, CPUs have been increased in speed and multi-core, and it has become possible to realize a video signal encoding device by distributed processing using software.

本願発明は、上記のような課題を鑑みてなされたものである。
量子化幅の影響が小さな符号化パラメータや隣接MBとの相関性の低い符号化パラメータについては第1のパスの符号化時に決定し、量子化幅の影響が大きな符号化パラメータや隣接MBとの相関性の高い符号化パラメータについては第2のパスの符号化時に決定することで、符号化パラメータの選択における量子化幅の依存性に関する課題を解決し、符号化後の動画像の映像画質の均一化を実現することが可能な2パス型可変ビットレート映像信号符号化装置を提供することを目的とする。
The present invention has been made in view of the above problems.
An encoding parameter having a small influence on the quantization width or an encoding parameter having a low correlation with the adjacent MB is determined at the time of encoding in the first pass, and the encoding parameter having a large influence on the quantization width or an adjacent MB is determined. An encoding parameter with high correlation is determined at the time of encoding in the second pass, thereby solving the problem relating to the dependency of the quantization width in the selection of the encoding parameter, and improving the video quality of the encoded moving image. An object of the present invention is to provide a two-pass variable bit rate video signal encoding device capable of realizing equalization.

また、第1のパスと第2のパスとで符号化に要する処理量を分散することで、従来の2パス型可変ビットレート映像信号符号化装置に比べて大幅に処理量の削減が可能な2パス型可変ビットレート映像信号符号化装置を提供することを目的とする。   Also, by distributing the processing amount required for encoding in the first pass and the second pass, the processing amount can be significantly reduced as compared with the conventional two-pass variable bit rate video signal encoding device. An object of the present invention is to provide a two-pass variable bit rate video signal encoding device.

そこで上記課題を解決するために本発明は、下記の装置を提供するものである。
(1)入力動画像を符号化する際に、シーンの切り換わり位置を示すシーンチェンジ情報、シーンがフェードイン及びフェードアウトする位置を示すフェード情報、画像間の動きの複雑さを示すアクティビティ情報のうち少なくともいずれかひとつを含む動画像の特徴情報を抽出する抽出部と、
前記動画像の特徴情報を基にGOP構造を決定する第1の決定部と、
前記動画像の特徴情報と前記GOP構造とを基に第1の符号化パラメータを決定する第2の決定部と、
前記動画像の特徴情報と前記GOP構造と前記第1の符号化パラメータとを用いてピクチャ毎の符号化複雑度を算出する算出部と、
前記第1の符号化パラメータと前記符号化複雑度とを記憶する記憶部と、
を有する第1の符号化手段と、
前記第1の符号化手段で符号化した入力動画像を再度符号化する際に、前記第1の符号化手段が前記入力動画像を符号化した際に前記記憶部に記憶した前記第1の符号化パラメータと前記符号化複雑度とを用いて、第2の符号化パラメータを決定する第3の決定部と、
前記第2の符号化パラメータを用いて、前記入力動画像を符号化する第2の符号化手段と、
を有することを特徴とする動画像符号化装置。
(2)前記第1の符号化パラメータは、画像毎の符号化タイプとピクチャ構造とであることを特徴とする上記(1)記載の動画像符号化装置。
(3)前記第1の符号化パラメータは、更に、MB構造と動きベクトルの候補値とを用いることを特徴とする上記(2)記載の動画像符号化装置。
Therefore, in order to solve the above problems, the present invention provides the following apparatus.
(1) When encoding an input moving image, among scene change information indicating a scene switching position, fade information indicating a position where a scene fades in and out, and activity information indicating complexity of movement between images An extraction unit for extracting feature information of a moving image including at least one of them,
A first determination unit that determines a GOP structure based on feature information of the moving image;
A second determination unit that determines a first encoding parameter based on the feature information of the moving image and the GOP structure;
A calculation unit that calculates coding complexity for each picture using the feature information of the moving image, the GOP structure, and the first coding parameter;
A storage unit for storing the first encoding parameter and the encoding complexity;
First encoding means comprising:
When the input moving image encoded by the first encoding unit is encoded again, the first encoding unit stores the first moving image stored in the storage unit when the first encoding unit encodes the input moving image. A third determination unit for determining a second encoding parameter using the encoding parameter and the encoding complexity;
Second encoding means for encoding the input moving image using the second encoding parameter;
A moving picture encoding apparatus comprising:
(2) The moving picture coding apparatus according to (1), wherein the first coding parameters are a coding type and a picture structure for each picture.
(3) The moving picture coding apparatus according to (2), wherein an MB structure and a motion vector candidate value are further used as the first coding parameter.

本願発明によれば、以下の効果を得ることが可能である。
第1のパスの符号化では、動画像の特徴情報から符号化複雑度を算出して、量子化幅の影響の小さな符号化パラメータや隣接MBとの相関性の低い符号化パラメータを決定する。そして、第2のパスの符号化では、量子化幅の影響の大きな符号化パラメータや隣接MBとの相関性の高い符号化パラメータを決定して符号化する。これにより、符号化パラメータの選択に関する量子化幅への依存性を排除することができるので、符号化後の動画像全体で均一な映像画質を実現することが可能となる。
According to the present invention, the following effects can be obtained.
In the first pass encoding, the encoding complexity is calculated from the feature information of the moving image, and the encoding parameter having a small influence of the quantization width and the encoding parameter having a low correlation with the adjacent MB are determined. In the second pass encoding, encoding parameters having a large influence on the quantization width and encoding parameters having high correlation with adjacent MBs are determined and encoded. As a result, it is possible to eliminate the dependency on the quantization width related to the selection of the encoding parameter, so that it is possible to realize a uniform image quality in the entire moving image after encoding.

また、最適な符号化パラメータを選択するのに要する処理を、第1のパスの符号化と第2のパスの符号化とで分散して行なうことで、従来の2パス型可変ビットレート映像信号符号化装置に比べて大幅に符号化の処理量の削減が可能となる。   In addition, the processing required to select the optimal encoding parameter is performed in a distributed manner between the first pass encoding and the second pass encoding, so that a conventional two-pass variable bit rate video signal is obtained. Compared to the encoding device, the amount of encoding processing can be greatly reduced.

以下、図面を参照しながら本発明の実施の形態を説明する。
図1は、本発明の実施の形態の構成を示す全体ブロック図である。また、図8は、この図1の構成における全体の処理の流れを説明するフローチャートである。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is an overall block diagram showing a configuration of an embodiment of the present invention. FIG. 8 is a flowchart for explaining the overall processing flow in the configuration of FIG.

第1符号化部20は、VTR10などの動画像再生装置から入力される動画像信号を、符号化するとともに、この動画像信号における動画像の特徴を解析し、各種の符号化パラメータを生成して記録媒体30に記録する(ステップS10)。   The first encoding unit 20 encodes a moving image signal input from a moving image reproducing device such as the VTR 10 and analyzes the characteristics of the moving image in the moving image signal to generate various encoding parameters. To be recorded on the recording medium 30 (step S10).

次に、第2符号化部40は、VTR10などの動画像再生装置から入力される、上記した第1符号化部20で符号化したものと同じ動画像信号を、記録媒体30に記録されているこの動画像信号に対応する符号化パラメータを読み出し、この符号化パラメータを用いて符号化を行って、得られたビットストリームを蓄積媒体50に記録する(ステップS20)。
[第1実施例]
次に、上記した実施の形態を用いた第1実施例について図面を用いて詳細に説明する。
<第1パス>
図2は、第1実施例における第1のパスの符号化を実現するブロックの内部構成を示す図である。また、図9はこの第1のパスの符号化の処理の流れを示すフローチャートである。
Next, the second encoding unit 40 records the same moving image signal input from the moving image reproducing device such as the VTR 10 as the one encoded by the first encoding unit 20 on the recording medium 30. The encoding parameter corresponding to the moving image signal is read out, encoding is performed using the encoding parameter, and the obtained bit stream is recorded in the storage medium 50 (step S20).
[First embodiment]
Next, a first example using the above-described embodiment will be described in detail with reference to the drawings.
<First pass>
FIG. 2 is a diagram illustrating an internal configuration of a block that realizes encoding of the first pass in the first embodiment. FIG. 9 is a flowchart showing the flow of the first pass encoding process.

入力画像蓄積部100は、入力される動画像信号(入力画像信号)を一時的に蓄積する(ステップS100)。
ここで、入力画像蓄積部100が蓄積する画像の枚数をNFとする。NFは、取り得る最大GOPサイズNmaxであるとする。
The input image storage unit 100 temporarily stores the input moving image signal (input image signal) (step S100).
Here, the number of images stored in the input image storage unit 100 is NF. Let NF be the maximum possible GOP size Nmax.

入力画像蓄積部100は、記録部600から次GOP処理開始信号を受け取ると、GOP構造決定部300から得たN枚の画像を消去し、新たにN枚の画像を蓄積する。入力画像蓄積部100が蓄積する画像の枚数NFは、動画像特徴抽出部200の構成によっては、2枚とすることも可能である。これらの処理の詳細は後述する。   When receiving the next GOP processing start signal from the recording unit 600, the input image storage unit 100 deletes the N images obtained from the GOP structure determination unit 300, and newly stores N images. Depending on the configuration of the moving image feature extraction unit 200, the number of images NF stored in the input image storage unit 100 may be two. Details of these processes will be described later.

動画像特徴抽出部200は、入力画像蓄積部100から供給される動画像信号における動画像の特徴を示す情報を抽出する(ステップS200)。
図4は、この動画像特徴抽出部200の具体的な構成例を示す図である。以下、この図4を用いて動画像特徴抽出部200の動作を説明する。
The moving image feature extraction unit 200 extracts information indicating the feature of the moving image in the moving image signal supplied from the input image storage unit 100 (step S200).
FIG. 4 is a diagram illustrating a specific configuration example of the moving image feature extraction unit 200. Hereinafter, the operation of the moving image feature extraction unit 200 will be described with reference to FIG.

動画像特徴抽出部200は、動画像のシーンの変化点を検出するシーンチェンジ検出部210と、動画像の信号レベルが徐々に変化するシーンを検出するフェード検出部220と、動画像を構成する各画像間の動きの複雑さを算出する動き複雑度算出部230と、各画像のアクティビティを算出するアクティビティ算出部240とで構成する。   The moving image feature extraction unit 200 configures a moving image with a scene change detection unit 210 that detects a scene change point of the moving image, a fade detection unit 220 that detects a scene where the signal level of the moving image gradually changes, and the like. It comprises a motion complexity calculator 230 that calculates the complexity of motion between images, and an activity calculator 240 that calculates the activity of each image.

シーンチェンジ検出部210は、入力画像蓄積部100に蓄積されている動画像信号における画像の切り替わり目であるシーンチェンジを検出する。各隣接画像の画素間における輝度情報の絶対差分和や、二乗平均誤差和の微分値などを算出し、この算出した値の大きな画像間をシーンチェンジとして検出し、シーンチェンジ情報aを1とする。シーンチェンジを検出しない時はシーンチェンジ情報aを0とする。   The scene change detection unit 210 detects a scene change that is an image switching point in the moving image signal stored in the input image storage unit 100. The absolute difference sum of luminance information between the pixels of each adjacent image, the differential value of the mean square error sum, and the like are calculated. Between the images having the large calculated values is detected as a scene change, and the scene change information a is set to 1. . When no scene change is detected, the scene change information a is set to 0.

なお、シーンチェンジの検出は、輝度情報のみでなく、輝度情報に加えて色差情報を用いて行なっても良い。また各画像を変換、縮小等の処理をした後にシーンチェンジを検出したり、各画像内の特定の一部の領域のみを抽出して、この領域内の情報を用いてシーンチェンジを検出したりしても良い。   The scene change may be detected using not only the luminance information but also the color difference information in addition to the luminance information. Also, scene changes can be detected after each image has been converted, reduced, etc., or only a specific area within each image can be extracted, and scene changes can be detected using information in these areas. You may do it.

フェード検出部220は、入力画像蓄積部100に蓄積されている動画像信号における画像全体の信号レベルが一定方向に変動するシーンを検出する。各隣接画像の画素間における輝度情報の絶対差分和や、二乗平均誤差和などを算出し、この算出した値がある一定以上であるシーンをフェードとして検出し、フェード情報bを1とする。フェードを検出しない時はフェード情報bを0とする。   The fade detection unit 220 detects a scene in which the signal level of the entire image in the moving image signal stored in the input image storage unit 100 varies in a certain direction. The absolute difference sum of the luminance information between the pixels of each adjacent image, the root mean square error sum, and the like are calculated. A scene where the calculated value is a certain value or more is detected as a fade, and the fade information b is set to 1. When no fade is detected, the fade information b is set to 0.

なお、フェードの検出は、輝度情報のみでなく、輝度情報に加えて色差情報を用いて行なっても良い。また各画像を変換、縮小等の処理をした後にフェードを検出したり、各画像内の特定の一部の領域のみを抽出して、この領域内の情報を用いてフェードを検出したりしても良い。   Note that the fade may be detected using not only the luminance information but also the color difference information in addition to the luminance information. Also, each image can be converted, reduced, etc., to detect fades, or only a specific part of each image can be extracted and fades can be detected using information in these regions. Also good.

動き複雑度算出部230は、入力画像蓄積部100に蓄積されている動画像信号における各画像間の動き、すなわち動き複雑度cを算出する。この動き複雑度cの算出には、時間的に隣接する2枚の画像の間、またはあらかじめ指定された時間差を持つ2枚の画像の間で行なう。本第1実施例での動き複雑度cの算出は、まず算出対象の2枚の画像のうち、一方の画像を16×16画素の小ブロック単位(MBと呼ぶ)に分割し、この各MB内の画素の輝度情報を用いて、MB毎に他方の画像と比較して動きベクトル探索を行い、動きベクトルMV(i)を算出する(iはMB番号)。結果として得られた各ブロックの動きベクトルの分散の度合いを動き複雑度cとする。これらの値が大きい場合は、動きが複雑であることを示し、一方これらの値が小さい場合は、動きが簡易であることを示す。   The motion complexity calculation unit 230 calculates the motion between the images in the moving image signal stored in the input image storage unit 100, that is, the motion complexity c. The calculation of the motion complexity c is performed between two images that are temporally adjacent or between two images that have a predetermined time difference. In the calculation of the motion complexity c in the first embodiment, first, one of the two images to be calculated is divided into small blocks of 16 × 16 pixels (referred to as MB), and each MB is divided. Using the luminance information of the pixels in the image, a motion vector search is performed for each MB in comparison with the other image, and a motion vector MV (i) is calculated (i is an MB number). The degree of dispersion of the motion vector of each block obtained as a result is defined as motion complexity c. When these values are large, it indicates that the movement is complicated, while when these values are small, it indicates that the movement is simple.

なお、この動き複雑度cの算出には、上記したようにMB毎に算出する動きベクトルを用いるのでは無く、画面全体の動きを示すグローバル動きベクトルの大きさや、この時間的変化量を利用することも可能である。 また、小ブロックとして16×8、8×16、8×8、8×4、4×8、4x4のように16×16のMBよりも小さな画素単位で動きベクトルを算出し、この動きベクトルを用いても良い。また、動き複雑度cの算出は、輝度情報のみでなく、輝度情報に加えて色差情報を用いて行なっても良い。また各画像を変換、縮小等の処理をした後に動き複雑度cを算出したり、各画像内の特定の一部の領域のみを抽出して、この領域内の情報を用いて動き複雑度cを算出したりしても良い。   The calculation of the motion complexity c does not use the motion vector calculated for each MB as described above, but uses the size of the global motion vector indicating the motion of the entire screen and the amount of temporal change. It is also possible. In addition, a motion vector is calculated as a small block in units of pixels smaller than 16 × 16 MB, such as 16 × 8, 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4. It may be used. Further, the calculation of the motion complexity c may be performed using not only luminance information but also color difference information in addition to luminance information. In addition, the motion complexity c is calculated after processing such as conversion and reduction of each image, or only a specific partial area in each image is extracted, and the motion complexity c is used using information in the area. Or may be calculated.

アクティビティ算出部240は、入力画像蓄積部100に蓄積されている動画像信号における各画像のアクティビティdと垂直アクティビティeを算出する。アクティビティdは下記式1のように、各MBアクティビティの画面内和として求める。ここで、NMBは画面内に含まれるMB数である。dMB(i)はi番目のMBのMBアクティビティであり、下記式2で求められる。式1、式2では絶対差分和を用いているが、二乗誤差和を用いても良い。   The activity calculation unit 240 calculates the activity d and the vertical activity e of each image in the moving image signal stored in the input image storage unit 100. The activity d is obtained as a screen internal sum of each MB activity as shown in the following formula 1. Here, NMB is the number of MBs included in the screen. dMB (i) is the MB activity of the i-th MB and is obtained by the following equation 2. Although the absolute difference sum is used in Equations 1 and 2, a square error sum may be used.

Figure 2008098980
・・・式1
Figure 2008098980
... Formula 1

Figure 2008098980
・・・式2

垂直アクティビティeは、、、、図6及び下記式3に示すように、各MB内の垂直方向に隣接する各画素間の絶対差分和として求めたMB垂直アクティビティの画面内和として求める。ここで、eMB(i)はi番目のMBのMB垂直アクティビティであり、下記式4で求められる。式3、式4では絶対差分和を用いているが、二乗誤差和を用いても良い。
Figure 2008098980
... Formula 2

The vertical activity e is obtained as an in-screen sum of MB vertical activities obtained as a sum of absolute differences between pixels adjacent in the vertical direction in each MB, as shown in FIG. Here, eMB (i) is the MB vertical activity of the i-th MB and is obtained by the following equation 4. Although the absolute difference sum is used in Equations 3 and 4, a square error sum may be used.

Figure 2008098980
・・・式3
Figure 2008098980
... Formula 3

Figure 2008098980
・・・式4

アクティビティd、垂直アクティビティeの算出は、輝度情報のみでなく、輝度情報に加えて色差情報を用いて行なっても良い。また各画像を変換、縮小等の処理をした後にアクティビティd、垂直アクティビティeを算出したり、各画像内の特定の一部の領域のみを抽出して、この領域内の情報を用いてアクティビティd、垂直アクティビティeを算出したりしても良い。
Figure 2008098980
... Formula 4

The calculation of the activity d and the vertical activity e may be performed using not only luminance information but also color difference information in addition to luminance information. Further, after converting and reducing each image, the activity d and the vertical activity e are calculated, or only a specific partial area in each image is extracted, and the activity d is used by using information in this area. The vertical activity e may be calculated.

図2及び図9の説明に戻る。
動画像特徴抽出部200は、上記のようにして検出した各画像のシーンチェンジ情報a、フェード情報b、動き複雑度cをGOP構造決定部300に送る。また、垂直アクティビティe、各MBのMB垂直アクティビティeMBをピクチャ構造決定部400に送る。さらに、動き複雑度c、アクティビティdを符号化複雑度計測部500に送る。
Returning to FIG. 2 and FIG.
The moving image feature extraction unit 200 sends the scene change information a, the fade information b, and the motion complexity c of each image detected as described above to the GOP structure determination unit 300. Also, the vertical activity e and the MB vertical activity eMB of each MB are sent to the picture structure determining unit 400. Further, the motion complexity c and activity d are sent to the encoding complexity measuring unit 500.

GOP構造決定部300は、GOPを構成する各画像の符号化構造を決定する(ステップS300)。
図5は、このGOP構造決定部300の具体的な構成例を示す図である。以下、この図5を用いてGOP構造決定部300の動作を説明する。
The GOP structure determination unit 300 determines the coding structure of each image constituting the GOP (step S300).
FIG. 5 is a diagram illustrating a specific configuration example of the GOP structure determination unit 300. Hereinafter, the operation of the GOP structure determination unit 300 will be described with reference to FIG.

GOP構造決定部300は、GOPサイズNを決定するGOPサイズ決定部310と、予測画像の間隔Mを決定する予測画像間隔決定部320とで構成する。
GOPサイズ決定部310は、シーンチェンジ情報aとNmaxからGOPサイズNを決定する。入力画像蓄積部100に蓄積されている最も古い画像からシーンチェンジ情報aが1になるまでか、またはNmaxになるまでの画像を1つのGOPとする。決定されたGOPに含まれる画像の枚数をGOPサイズNとして出力する。
The GOP structure determining unit 300 includes a GOP size determining unit 310 that determines the GOP size N and a predicted image interval determining unit 320 that determines the interval M between predicted images.
GOP size determining section 310 determines GOP size N from scene change information a and Nmax. An image from the oldest image stored in the input image storage unit 100 until the scene change information a becomes 1 or Nmax is defined as one GOP. The number of images included in the determined GOP is output as the GOP size N.

予測画像間隔決定部320は、GOPサイズ決定部310から得たGOPサイズN、および画像特徴抽出部300から得たN枚の画像の動き複雑度cから、対象GOPの符号化時の予測画像間隔Mを決定する。動き複雑度cが大きい場合には予測画像間隔Mを小さい値に設定し、動き複雑度cが小さい場合には予測画像間隔Mを大きい値に設定する。また、動き複雑度cがあらかじめ指定された値よりも小さい場合には、予測画像間隔Mを既定値とすることも可能である。なお、フェード情報bが1である場合には予測画像間隔Mは2とする。   The predicted image interval determination unit 320 uses the GOP size N obtained from the GOP size determination unit 310 and the motion complexity c of the N images obtained from the image feature extraction unit 300 to predict the predicted image interval at the time of encoding the target GOP. Determine M. When the motion complexity c is large, the predicted image interval M is set to a small value, and when the motion complexity c is small, the predicted image interval M is set to a large value. Further, when the motion complexity c is smaller than a value designated in advance, the predicted image interval M can be set as a default value. When the fade information b is 1, the predicted image interval M is 2.

図2及び図9の説明に戻る。
GOP構造決定部300は、上記のようにして決定したGOPサイズN、予測画像間隔Mをピクチャ構造決定部400と記憶部600とに送る。また、GOPサイズNを入力像蓄積部100に送る。
Returning to FIG. 2 and FIG.
The GOP structure determination unit 300 sends the GOP size N and the predicted image interval M determined as described above to the picture structure determination unit 400 and the storage unit 600. Also, the GOP size N is sent to the input image storage unit 100.

ピクチャ構造決定部400は、図3に示すMB符号化パラメータ決定部1000が行う符号化パラメータ決定の一部を担当する。本第1実施例では、符号化パラメータの中でも動画像が持つ本来の特性であって、量子化幅への依存度の低いパラメータであるフレーム/フィールド構造の決定を行う。ピクチャ構造決定部400は、GOP構造決定部300から得たGOPサイズNと予測画像間隔Mとから各画像の符号化タイプCT(I画像、P画像、B画像)を判定する(ステップS410)。また、画像特徴抽出部300から得た垂直アクティビティeから各画像を符号化するためのピクチャ構造情報PSを決定する(ステップS420)。ピクチャ構造情報PSがフレームである場合には画像を1つのフレームで符号化し、ピクチャ構造情報PSがフィールドである場合には画像を2つのフィールドで符号化する。垂直アクティビティeが小さい場合にはフレームとして符号化し、垂直アクティビティeが大きい場合にはフィールドとして符号化する。また、画像特徴抽出部300から得たMB垂直アクティビティeMBから各MBのMB構造情報MBSを決定する(ステップS430)。MB構造情報MBSがフレームである場合にはMBを1つのフレームで符号化し、MB構造情報MBSがフィールドである場合にはMBを2つのフィールドで符号化する。上記のようにして決定した符号化タイプCTとピクチャ構造情報PSとMB構造情報MBSとをまとめてピクチャタイプ情報PTとする。そして、このピクチャタイプ情報PTを、符号化複雑度計測部500、及び記録部600へ送る。   The picture structure determination unit 400 is responsible for part of the encoding parameter determination performed by the MB encoding parameter determination unit 1000 shown in FIG. In the first embodiment, the frame / field structure, which is an inherent characteristic of a moving image among the encoding parameters and has a low dependency on the quantization width, is determined. The picture structure determination unit 400 determines the coding type CT (I image, P image, B image) of each image from the GOP size N obtained from the GOP structure determination unit 300 and the predicted image interval M (step S410). Also, picture structure information PS for encoding each image is determined from the vertical activity e obtained from the image feature extraction unit 300 (step S420). When the picture structure information PS is a frame, the image is encoded with one frame, and when the picture structure information PS is a field, the image is encoded with two fields. When the vertical activity e is small, it is encoded as a frame, and when the vertical activity e is large, it is encoded as a field. Also, the MB structure information MBS of each MB is determined from the MB vertical activity eMB obtained from the image feature extraction unit 300 (step S430). When the MB structure information MBS is a frame, the MB is encoded with one frame, and when the MB structure information MBS is a field, the MB is encoded with two fields. The coding type CT, the picture structure information PS, and the MB structure information MBS determined as described above are collectively used as picture type information PT. Then, this picture type information PT is sent to the encoding complexity measuring unit 500 and the recording unit 600.

符号化複雑度計測部500は、画像特徴抽出部300から得たN枚の画像の動き複雑度cとアクティビティd、およびピクチャ構造決定部400から得たピクチャタイプ情報PTから、下記式5の関数fによって、ピクチャ毎に符号化複雑度Cを算出する(ステップS500)。下記式5の関数fは例えば、図7のような特性を持つとする。符号化画像がIピクチャの時は、同図(A)に示すように、符号化複雑度Cはアクティビティdに比例する。また、符号化画像がPピクチャ及びBピクチャの時は、同図(B)に示すように、符号化複雑度Cは動き複雑度cに比例する。なお、関数fは、Pピクチャ及びBピクチャの場合は、動き複雑度cのみではなくアクティビティdを考慮することもできる。   The encoding complexity measurement unit 500 calculates the function of Equation 5 below from the motion complexity c and activity d of N images obtained from the image feature extraction unit 300 and the picture type information PT obtained from the picture structure determination unit 400. Based on f, the encoding complexity C is calculated for each picture (step S500). It is assumed that the function f of the following formula 5 has characteristics as shown in FIG. When the encoded image is an I picture, the encoding complexity C is proportional to the activity d as shown in FIG. When the encoded image is a P picture and a B picture, the encoding complexity C is proportional to the motion complexity c as shown in FIG. In the case of the P picture and the B picture, the function f can consider not only the motion complexity c but also the activity d.

Figure 2008098980
・・・式5

符号化複雑度計測部500は、上記式5で算出した符号化複雑度Cを記録部600へ送る。
Figure 2008098980
... Formula 5

The encoding complexity measuring unit 500 sends the encoding complexity C calculated by the above equation 5 to the recording unit 600.

記録部600は、GOP構造決定部300から得たGOPサイズNとピクチャ構造決定部400から得たピクチャタイプ情報PTと符号化複雑度計測部500から得た符号化複雑度Cとを記録媒体700に記録する(ステップS600)。そして、次GOP処理開始信号を入力画像蓄積部100に送る。
<第2パス>
図3は、第1実施例における第2のパスの符号化を実現するブロックの内部構成を示す図である。また、図10はこの第2のパスの符号化の処理の流れを示すフローチャートである。
The recording unit 600 records the GOP size N obtained from the GOP structure determining unit 300, the picture type information PT obtained from the picture structure determining unit 400, and the coding complexity C obtained from the coding complexity measuring unit 500. (Step S600). Then, a next GOP processing start signal is sent to the input image storage unit 100.
<Second pass>
FIG. 3 is a diagram illustrating an internal configuration of a block that realizes encoding of the second pass in the first embodiment. FIG. 10 is a flowchart showing the flow of the second pass encoding process.

GOP符号量割当部800は、記録媒体700から得たGOPサイズNとGOP分の符号化複雑度からGOPの目標符号量TGBを求める(ステップS700)。
符号量制御部900は、GOP符号量割当部800から得た目標符号量TGBと符号部1100から出力されたビットストリームの符号量Bから、例えば、MPEGの代表的な圧縮アルゴリズムであるTM5(Test Model 5; ISO/IEC JTC/SC29 1993)において用いられている符号量制御方式によって符号量制御を行い、ピクチャ毎の目標符号量TBを決定する(ステップS800)。そして、目標符号量TBを符号部1100に送る。
The GOP code amount allocating unit 800 obtains the GOP target code amount TGB from the GOP size N obtained from the recording medium 700 and the GOP encoding complexity (step S700).
The code amount control unit 900 uses the target code amount TGB obtained from the GOP code amount allocating unit 800 and the bit amount code amount B output from the encoding unit 1100, for example, TM5 (Test Code amount control is performed by a code amount control method used in Model 5; ISO / IEC JTC / SC29 1993), and a target code amount TB for each picture is determined (step S800). Then, the target code amount TB is sent to the encoding unit 1100.

MB符号化パラメータ決定部1000は、MB構造情報MBS以外のMBの符号化に必要なMB符号化パラメータを決定し、符号部1100に送る。
符号部1100は、符号量制御部900から得た目標符号量TBと、記録媒体700から得たピクチャタイプ情報PTと、MB符号化パラメータ決定部1000から送られたMB符号化パラメータとにしたがって、前述の第1のパスで符号化したものと同じ内容の入力動画像信号(入力画像信号)を符号化する(ステップS900)。そして得られた符号化データ(ビットストリーム)を外部へ出力する。
[第2実施例]
次に、前述した実施の形態を用いた第2実施例について図面を用いて詳細に説明する。
<第1パス>
図11は、第2実施例における第1のパスの符号化を実現するブロックの内部構成を示す図である。
The MB encoding parameter determination unit 1000 determines MB encoding parameters necessary for encoding MBs other than the MB structure information MBS, and sends the MB encoding parameters to the encoding unit 1100.
The encoding unit 1100 follows the target code amount TB obtained from the code amount control unit 900, the picture type information PT obtained from the recording medium 700, and the MB coding parameter sent from the MB coding parameter determination unit 1000. An input moving image signal (input image signal) having the same content as that encoded in the first pass is encoded (step S900). The obtained encoded data (bit stream) is output to the outside.
[Second Embodiment]
Next, a second example using the above-described embodiment will be described in detail with reference to the drawings.
<First pass>
FIG. 11 is a diagram illustrating an internal configuration of a block that realizes the first pass encoding in the second embodiment.

入力画像蓄積部100、GOP構造決定部300、ピクチャ構造決定部400、及び符号化複雑度計測部500、記録媒体700は、それぞれ第1実施例と同じ機能を有しており、図2と同じ符号を付している。   The input image storage unit 100, the GOP structure determination unit 300, the picture structure determination unit 400, the encoding complexity measurement unit 500, and the recording medium 700 have the same functions as those in the first embodiment, and are the same as those in FIG. The code is attached.

動画像特徴抽出部201は、第1実施例の機能に加えて、図4に示す動き複雑度算出部230で求めた動きベクトル情報gを記録部600に送る。
記録部601は、第1実施例の機能に加えて、動画像特徴抽出部201から得た動きベクトル情報gを記録媒体700に記録する。
<第2パス>
図12は、第2実施例における第2のパスの符号化を実現するブロックの内部構成を示す図である。また、図10はこの第2のパスの符号化の処理の流れを示すフローチャートである。
In addition to the functions of the first embodiment, the moving image feature extraction unit 201 sends the motion vector information g obtained by the motion complexity calculation unit 230 shown in FIG. 4 to the recording unit 600.
The recording unit 601 records the motion vector information g obtained from the moving image feature extraction unit 201 on the recording medium 700 in addition to the functions of the first embodiment.
<Second pass>
FIG. 12 is a diagram illustrating an internal configuration of a block that realizes encoding of the second pass in the second embodiment. FIG. 10 is a flowchart showing the flow of the second pass encoding process.

記録媒体700、GOP符号量割当部800、及び符号量制御部900は、それぞれ第1実施例と同じ機能を有しており、図3と同じ符号を付している。
MB符号化パラメータ決定部1001は、記録媒体700から得た動きベクトル情報gを、動きベクトルの1つの候補として利用して、符号化する動きベクトル情報を求め、更にMB構造情報MBS以外のMBの符号化に必要なMB符号化パラメータを決定し、符号部1101に送る。
The recording medium 700, the GOP code amount assigning unit 800, and the code amount control unit 900 have the same functions as those in the first embodiment, and are given the same reference numerals as those in FIG.
The MB encoding parameter determination unit 1001 obtains motion vector information to be encoded by using the motion vector information g obtained from the recording medium 700 as one motion vector candidate, and further determines MBs other than the MB structure information MBS. MB encoding parameters necessary for encoding are determined and sent to the encoding unit 1101.

符号部1101は、符号量制御部900から得た目標符号量TBと記録媒体700から得たピクチャタイプ情報PTとMB符号化パラメータ決定部1001から送られたMB符号化パラメータとにしたがって、前述の第1のパスで符号化したものと同じ内容の入力動画像信号(入力画像信号)を符号化する。そして得られた符号化データ(ビットストリーム)を外部へ出力する。   The encoding unit 1101 is based on the target code amount TB obtained from the code amount control unit 900, the picture type information PT obtained from the recording medium 700, and the MB coding parameter sent from the MB coding parameter determination unit 1001. An input moving image signal (input image signal) having the same content as that encoded in the first pass is encoded. The obtained encoded data (bit stream) is output to the outside.

この第2実施例のように、第1のパスの符号化で動きベクトルの1つの候補を求めておき、第2のパスの符号化時にその動きベクトルを利用することで、符号化処理に置いて大きなウエートを占める動きベクトル検出の処理を行う符号部1101の処理量を大幅に削減することが可能となる。   As in the second embodiment, one candidate for a motion vector is obtained by encoding the first pass, and the motion vector is used at the time of encoding the second pass. Therefore, it is possible to greatly reduce the processing amount of the encoding unit 1101 that performs the motion vector detection process that occupies a large weight.

なお、本発明は上記した動画像符号化装置の機能をコンピュータに実現させるためのプログラムも含むものである。これらのプログラムは、記録媒体から読み取られてコンピュータに取り込まれてもよいし、通信ネットワークを介して伝送されてコンピュータに取り込まれてもよい。   The present invention also includes a program for causing a computer to realize the functions of the above-described moving picture coding apparatus. These programs may be read from a recording medium and loaded into a computer, or may be transmitted via a communication network and loaded into a computer.

本発明の実施の形態を示す全体ブロック図である。It is a whole block diagram which shows embodiment of this invention. 本発明の第1実施例における第1符号部を示す構成図である。It is a block diagram which shows the 1st code | symbol part in 1st Example of this invention. 本発明の第1実施例における第2符号部を示す構成図である。It is a block diagram which shows the 2nd code | symbol part in 1st Example of this invention. 本発明の実施例における動画像特徴抽出部を示す構成図である。It is a block diagram which shows the moving image feature extraction part in the Example of this invention. 本発明の実施例におけるGOPサイズ決定部を示す構成図である。It is a block diagram which shows the GOP size determination part in the Example of this invention. 本発明の実施例における垂直アクティビティを説明する図である。It is a figure explaining the vertical activity in the Example of this invention. 本発明の実施例における複雑度の算出方法を説明する図である。It is a figure explaining the calculation method of the complexity in the Example of this invention. 本発明の実施の形態における全体処理を示すフローチャートである。It is a flowchart which shows the whole process in embodiment of this invention. 本発明の実施例における第1符号部を示すフローチャートである。It is a flowchart which shows the 1st code | symbol part in the Example of this invention. 本発明の実施例における第2符号部を示すフローチャートである。It is a flowchart which shows the 2nd code | symbol part in the Example of this invention. 本発明の第2実施例における第1符号部を示す構成図である。It is a block diagram which shows the 1st code | symbol part in 2nd Example of this invention. 本発明の第2実施例における第2符号部を示す構成図である。It is a block diagram which shows the 2nd code | symbol part in 2nd Example of this invention.

符号の説明Explanation of symbols

10 VTR
20 第1符号部
30 記録媒体
40 第2符号部
50 記録媒体
100 入力画像蓄積部
200 動画像特徴抽出部
300 GOP構造決定部
310 GOPサイズ決定部
320 予測画像間隔決定部
400 ピクチャ構造決定部
500 符号化複雑度計測部
600 記録部
700 記録媒体
800 GOP符号量割当部
900 符号量制御部
1000 MB符号化パラメータ決定部
1100 符号部
201 動画像特徴抽出部(第2実施例)
601 記録部(第2実施例)
1001 MB符号化パラメータ決定部(第2実施例)
1101 符号部(第2実施例)
10 VTR
20 first encoding unit 30 recording medium 40 second encoding unit 50 recording medium 100 input image storage unit 200 moving image feature extraction unit 300 GOP structure determination unit 310 GOP size determination unit 320 predicted image interval determination unit 400 picture structure determination unit 500 Complexity measurement unit 600 recording unit 700 recording medium 800 GOP code amount allocation unit 900 code amount control unit 1000 MB coding parameter determination unit 1100 encoding unit 201 moving image feature extraction unit (second embodiment)
601 Recording unit (second embodiment)
1001 MB coding parameter determination unit (second embodiment)
1101 Code part (second embodiment)

Claims (3)

入力動画像を符号化する際に、シーンの切り換わり位置を示すシーンチェンジ情報、シーンがフェードイン及びフェードアウトする位置を示すフェード情報、画像間の動きの複雑さを示すアクティビティ情報のうち少なくともいずれかひとつを含む動画像の特徴情報を抽出する抽出部と、
前記動画像の特徴情報を基にGOP構造を決定する第1の決定部と、
前記動画像の特徴情報と前記GOP構造とを基に第1の符号化パラメータを決定する第2の決定部と、
前記動画像の特徴情報と前記GOP構造と前記第1の符号化パラメータとを用いてピクチャ毎の符号化複雑度を算出する算出部と、
前記第1の符号化パラメータと前記符号化複雑度とを記憶する記憶部と、
を有する第1の符号化手段と、
前記第1の符号化手段で符号化した入力動画像を再度符号化する際に、前記第1の符号化手段が前記入力動画像を符号化した際に前記記憶部に記憶した前記第1の符号化パラメータと前記符号化複雑度とを用いて、第2の符号化パラメータを決定する第3の決定部と、
前記第2の符号化パラメータを用いて、前記入力動画像を符号化する第2の符号化手段と、
を有することを特徴とする動画像符号化装置。
When encoding an input video, at least one of scene change information indicating the scene switching position, fade information indicating the position where the scene fades in and out, and activity information indicating the complexity of movement between images An extraction unit for extracting feature information of a moving image including one;
A first determination unit that determines a GOP structure based on feature information of the moving image;
A second determination unit that determines a first encoding parameter based on the feature information of the moving image and the GOP structure;
A calculation unit that calculates coding complexity for each picture using the feature information of the moving image, the GOP structure, and the first coding parameter;
A storage unit for storing the first encoding parameter and the encoding complexity;
First encoding means comprising:
When the input moving image encoded by the first encoding unit is encoded again, the first encoding unit stores the first moving image stored in the storage unit when the first encoding unit encodes the input moving image. A third determination unit for determining a second encoding parameter using the encoding parameter and the encoding complexity;
Second encoding means for encoding the input moving image using the second encoding parameter;
A moving picture encoding apparatus comprising:
前記第2の決定部は、前記第1の符号化パラメータとして、画像毎の符号化タイプとピクチャ構造とを決定する手段であることを特徴とする請求項1記載の動画像符号化装置。   The moving image encoding apparatus according to claim 1, wherein the second determination unit is a unit that determines an encoding type and a picture structure for each image as the first encoding parameter. 前記第2の決定部は、前記第1の符号化パラメータとして、更に、MB構造と動きベクトルの候補値とを決定する手段であることを特徴とする請求項2記載の動画像符号化装置。   3. The moving picture encoding apparatus according to claim 2, wherein the second determination unit is means for further determining an MB structure and a motion vector candidate value as the first encoding parameter.
JP2006278475A 2006-10-12 2006-10-12 Moving image encoding apparatus Pending JP2008098980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006278475A JP2008098980A (en) 2006-10-12 2006-10-12 Moving image encoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006278475A JP2008098980A (en) 2006-10-12 2006-10-12 Moving image encoding apparatus

Publications (1)

Publication Number Publication Date
JP2008098980A true JP2008098980A (en) 2008-04-24

Family

ID=39381361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006278475A Pending JP2008098980A (en) 2006-10-12 2006-10-12 Moving image encoding apparatus

Country Status (1)

Country Link
JP (1) JP2008098980A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010263263A (en) * 2009-04-30 2010-11-18 Nippon Hoso Kyokai <Nhk> Encoding device, and program for the same
WO2022113430A1 (en) * 2020-11-27 2022-06-02 シャープ株式会社 Image processing device, display device, and image processing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04266284A (en) * 1991-02-21 1992-09-22 Matsushita Electric Ind Co Ltd Orthogonal transformation device
JP2001086512A (en) * 1999-09-14 2001-03-30 Nec Corp Variable bit rate encoder
JP2002010270A (en) * 2000-06-27 2002-01-11 Mitsubishi Electric Corp Device and method for coding images
JP2002199398A (en) * 2000-12-27 2002-07-12 Kddi Corp Variable bit rate moving image encoding device and recording medium
JP2005094458A (en) * 2003-09-18 2005-04-07 Nec Corp Device and method for encoding moving image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04266284A (en) * 1991-02-21 1992-09-22 Matsushita Electric Ind Co Ltd Orthogonal transformation device
JP2001086512A (en) * 1999-09-14 2001-03-30 Nec Corp Variable bit rate encoder
JP2002010270A (en) * 2000-06-27 2002-01-11 Mitsubishi Electric Corp Device and method for coding images
JP2002199398A (en) * 2000-12-27 2002-07-12 Kddi Corp Variable bit rate moving image encoding device and recording medium
JP2005094458A (en) * 2003-09-18 2005-04-07 Nec Corp Device and method for encoding moving image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010263263A (en) * 2009-04-30 2010-11-18 Nippon Hoso Kyokai <Nhk> Encoding device, and program for the same
WO2022113430A1 (en) * 2020-11-27 2022-06-02 シャープ株式会社 Image processing device, display device, and image processing method

Similar Documents

Publication Publication Date Title
KR101744654B1 (en) Motion based dynamic resolution multiple bit rate video encoding
CN106961603B (en) Intracoded frame code rate allocation method and device
EP1797722B1 (en) Adaptive overlapped block matching for accurate motion compensation
US9936217B2 (en) Method and encoder for video encoding of a sequence of frames
US8718138B2 (en) Image encoding apparatus and image encoding method that determine an encoding method, to be used for a block to be encoded, on the basis of an intra-frame-prediction evaluation value calculated using prediction errors between selected reference pixels and an input image
CN1960495B (en) Picture coding device, picture coding method, and integated circuit apparatus
US20040001638A1 (en) Rate allocation for mixed content video
CN104885455A (en) Content adaptive bitrate and quality control by using frame hierarchy sensitive quantization for high efficiency next generation video coding
US7835438B2 (en) Method and device for encoding moving picture using reference frequency of reference frame
JP2005191706A (en) Moving picture coding method and apparatus adopting the same
CN101507277A (en) Image encoding/decoding method and apparatus
JP2003018603A (en) Method and device for encoding moving image
US20040218675A1 (en) Method and apparatus for determining reference picture and block mode for fast motion estimation
US20080075164A1 (en) Motion picture encoding apparatus and method
CN102271257A (en) Image processing device, method, and program
JP4908943B2 (en) Image coding apparatus and image coding method
KR20170126934A (en) Content-Adaptive B-Picture Pattern Video Encoding
CN102387362A (en) Image processing apparatus and image processing method
CN103517074A (en) Image encoding apparatus and control method thereof
US7751474B2 (en) Image encoding device and image encoding method
JP3815665B2 (en) Variable bit rate video encoding apparatus and recording medium
JP2008098980A (en) Moving image encoding apparatus
US9277213B2 (en) Video encoding device
JP4911625B2 (en) Image processing apparatus and imaging apparatus equipped with the same
KR20230053243A (en) Device and Method for Performing Distributed Parallel-Encoding

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101022

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101216

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110906

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120105