JP2009094645A - Moving image encoding apparatus and method for controlling the same - Google Patents

Moving image encoding apparatus and method for controlling the same Download PDF

Info

Publication number
JP2009094645A
JP2009094645A JP2007261244A JP2007261244A JP2009094645A JP 2009094645 A JP2009094645 A JP 2009094645A JP 2007261244 A JP2007261244 A JP 2007261244A JP 2007261244 A JP2007261244 A JP 2007261244A JP 2009094645 A JP2009094645 A JP 2009094645A
Authority
JP
Japan
Prior art keywords
picture
encoding
scene
calculating
amount
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.)
Withdrawn
Application number
JP2007261244A
Other languages
Japanese (ja)
Inventor
Katsumi Otsuka
克己 大塚
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2007261244A priority Critical patent/JP2009094645A/en
Publication of JP2009094645A publication Critical patent/JP2009094645A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Color Television Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To control a target encoding amount according to the degree of deterioration in picture quality caused by block distortion and visual statistic information on a picture. <P>SOLUTION: An encoding unit 105 performs encoding in units of blocks comprising a plurality of pixels to generate encoded data. An encoding amount detection unit 107 detects the amount of encoded data of the picture generated by the encoding unit 105. An encoding distortion detection unit 104 calculates, as a picture distortion amount, the amount of distortion in a block boundary position between a picture obtained by decoding the encoded data and the picture before the encoding. A statistic information calculation unit 101 calculates statistic information on properties affecting the distortion of the block boundary position when a picture of interest is encoded from the picture of interest. Then a first picture target encoding amount calculation unit 103 generates encoding parameters of a picture following the picture of interest on the basis of a sequence target encoding amount, the amount of the encoded data, the statistic information, and the picture distortion amount, and sets them to the encoding unit 105. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、可変ビットレートでリアルタイム符号化する動画像符号化技術に関するものである。   The present invention relates to a moving image coding technique for performing real-time coding at a variable bit rate.

近年のデジタル信号処理技術の飛躍的な進歩により、従来ならば困難であった動画像の蓄積メディアへの記録や伝送路を介した動画像の伝送が行われている。この場合に、動画像を構成する各々のピクチャは圧縮符号化処理が施され、そのデータ量が大幅に削減される。この圧縮符号化処理として代表的な手法の一つが、例えばMPEG(Moving Picture Experts Group)方式である。   Due to dramatic progress in digital signal processing technology in recent years, recording of moving images to a storage medium and transmission of moving images via a transmission path, which have been difficult in the past, are performed. In this case, each picture constituting the moving image is subjected to compression encoding processing, and the data amount is greatly reduced. One typical technique for this compression encoding processing is, for example, the MPEG (Moving Picture Experts Group) system.

MPEG方式に準拠して一連のピクチャを一定のビットレートという条件下で圧縮符号化する場合に、複数ピクチャからなるシーン、ピクチャの空間周波数特性、ピクチャ間の相関、及び量子化スケール値に応じて符号量が大きく異なる。この様な符号化特性をもつ装置を実現する上で符号化歪みを最小限にするための重要な技術が符号量制御である。   When a series of pictures are compression-encoded under the condition of a constant bit rate according to the MPEG system, depending on the scene composed of multiple pictures, the spatial frequency characteristics of pictures, the correlation between pictures, and the quantization scale value The code amount is greatly different. An important technique for minimizing coding distortion in realizing an apparatus having such coding characteristics is code amount control.

符号量制御を実現するためのアルゴリズムは、固定ビットレート符号化方式(以後CBR方式)、及び、可変ビットレート符号化方式(VBR方式)の2つに大別出来る。一般にVBR方式では符号化難易度に応じて符号を適応的に割り当てるため、CBR方式に比べて、復号ピクチャの画質が良い事が知られている。符号の適応的な割り当て方は、例えば符号化難易度が高いシーンには高いビットレートを割り当て、符号化難易度が低いシーンには低いビットレートを割り当てる事により実現される。   Algorithms for realizing the code amount control can be broadly classified into two types: a fixed bit rate encoding method (hereinafter referred to as CBR method) and a variable bit rate encoding method (VBR method). In general, it is known that in the VBR system, codes are adaptively assigned according to the encoding difficulty level, so that the picture quality of decoded pictures is better than that in the CBR system. An adaptive code allocation method is realized, for example, by assigning a high bit rate to a scene with a high degree of encoding difficulty and assigning a low bit rate to a scene with a low degree of encoding difficulty.

CBR方式としては、MPEG−2符号化方式の標準化の過程で提案されたTM5(Test Model 5(Test Model Editing Commitee: "Test Model 5", ISO/IEC JTC/SC29/WG11/N0400(Apr.1993)))や特許文献1などの方式が知られている。   As the CBR system, TM5 (Test Model Editing Commitee: “Test Model 5”, ISO / IEC JTC / SC29 / WG11 / N0400 (Apr. 1993) proposed in the process of standardization of the MPEG-2 encoding system. ))) And Patent Document 1 are known.

リアルタイムで(すなわち1パスで)VBR方式を実現する技術として、特許文献2、3が知られている。更には、シーンに応じて適応的に符号量を割り当てる技術として、撮像制御情報を用いて実現を試みている特許文献4が知られている。次に、それぞれの従来技術について説明する。   Patent Documents 2 and 3 are known as techniques for realizing the VBR method in real time (that is, in one pass). Further, as a technique for adaptively allocating a code amount according to a scene, Patent Document 4 that is attempted to be implemented using imaging control information is known. Next, each prior art will be described.

特許文献2、3では図2に示す通りに、複数のピクチャからなるピクチャ群及び符号化対象であるピクチャに対して、符号化難易度算出部(201及び202)と称する符号化難易度を検出する手段を用いる。これにより、フィード・フォワード型のVBR方式を実現している。この方法によれば、複数ピクチャからなるピクチャ群をピクチャ群分割部200で分割し、シーケンス全体に対する、ピクチャ群の符号化難易度を符号化難易度情報算出部201において算出している。この算出した符号化難易度に応じて、該ピクチャ群の目標符号量を可変に割り当てる事で復号ピクチャの画質のばらつきが抑えている。   In Patent Documents 2 and 3, as shown in FIG. 2, a coding difficulty level called a coding difficulty level calculation unit (201 and 202) is detected for a group of pictures and a picture to be coded. Use the means to do. This realizes a feed-forward VBR system. According to this method, a picture group consisting of a plurality of pictures is divided by the picture group dividing unit 200, and the encoding difficulty level of the picture group for the entire sequence is calculated by the encoding difficulty level information calculating unit 201. Variations in the picture quality of the decoded picture are suppressed by variably assigning the target code amount of the picture group according to the calculated encoding difficulty level.

特許文献4では、図3に示す通りに、撮像機器における符号化部302に対して撮像制御情報を用いる事によりピクチャの目標符号量を可変に割り当てている。この方法によれば特に、マイクロコンピュータ304が、撮像制御情報算出部301からのフォーカス情報及びズーム位置から得られる合焦条件を確認する。そして、マイクロコンピュータ304は、現在撮影中のピクチャが、ワイド端でかつ画像焦点が合いやすい場合にはピクチャ符号量を多く割り当てる事でVBR方式を実現している。この方式によれば、撮像制御情報のみを用いてピクチャ目標符号量を制御出来るので、従来のVBR方式よりも簡易に実現できるとしている。
特許第3112035号公報 特許第3265818号公報 特許第3399472号公報 特開2003−18521号公報
In Patent Document 4, as shown in FIG. 3, the target code amount of a picture is variably assigned by using imaging control information to the encoding unit 302 in the imaging apparatus. In particular, according to this method, the microcomputer 304 confirms the focusing condition obtained from the focus information and the zoom position from the imaging control information calculation unit 301. The microcomputer 304 realizes the VBR method by assigning a large amount of picture code when the picture currently being photographed is at the wide end and the image is easily focused. According to this method, since the picture target code amount can be controlled using only the imaging control information, it can be realized more easily than the conventional VBR method.
Japanese Patent No. 3112035 Japanese Patent No. 3265818 Japanese Patent No. 3399472 JP 2003-18521 A

しかしながら、前記特許文献2乃至4においては、それぞれ以下の問題を有している。   However, Patent Documents 2 to 4 each have the following problems.

先ず、特許文献2によれば、符号化難易度情報算出部201及び202には、符号化部205と同様な符号化手段が必要となり、処理負荷が非常に重い。   First, according to Patent Document 2, the encoding difficulty level information calculation units 201 and 202 require encoding means similar to the encoding unit 205, and the processing load is very heavy.

また、特許文献3には、更に符号化難易度として空間アクティビティを用いる事が開示されているが、空間アクティビティでは符号化部205における符号化難易度を予測するには不十分である。更には、符号化難易度に応じてのみピクチャ目標符号量を制御しているので、ピクチャの視覚的な情報は一切考慮しておらず、シーンに応じて適応的な符号量の割り当てを行っているとは言い難い。   Further, Patent Document 3 discloses that a spatial activity is further used as an encoding difficulty level, but the spatial activity is insufficient to predict the encoding difficulty level in the encoding unit 205. Furthermore, since the picture target code amount is controlled only according to the encoding difficulty level, no visual information of the picture is considered, and adaptive code amount allocation is performed according to the scene. It ’s hard to say.

また、特許文献4であるが、これによると、ズーム情報からシーンに応じて適応的は符号量の割り当てを行っている。しかし、この提案においてもピクチャの視覚的な情報は一切考慮しておらず、ワイド端でかつ画像焦点が合いやすい場合にのみ符号量を増加させているのみである。更には、符号化難易度が一切考慮されおらず、撮影開始時に与えられる目標ビットレートから定まるシーケンス目標符号量内で符号化する事が困難でもある。   Further, as disclosed in Patent Document 4, according to this, the code amount is adaptively allocated according to the scene from the zoom information. However, this proposal does not consider any visual information of the picture, and only increases the amount of code only when the image is easily focused at the wide end. Furthermore, the degree of difficulty in encoding is not considered at all, and it is difficult to perform encoding within a sequence target code amount determined from a target bit rate given at the start of imaging.

本発明は、上記問題に鑑みなされたものである。すなわち、本発明は、符号化難易度から得られる画質の劣化具合及びピクチャの視覚的な統計情報から得られるシーンの画質重要度を考慮する。そして、本発明は、シーンに対する目標符号量を制御する事で、与えられた目標ビットレートの条件下において良好な画質の符号化動画像データを得る技術を提供するものである。   The present invention has been made in view of the above problems. That is, the present invention considers the degree of image quality deterioration obtained from the degree of difficulty in encoding and the importance of the image quality of the scene obtained from visual statistical information of the picture. The present invention provides a technique for obtaining encoded moving image data with good image quality under a given target bit rate condition by controlling a target code amount for a scene.

かかる課題を解決するため、例えば本発明の動画像符号化装置は以下の構成を備える。すなわち、
連続して入力されるピクチャを、目標ビットレートから定まるシーケンス目標符号量内で符号化する動画像符号化装置であって、
時間軸に並んだピクチャで構成される動画像を、予め設定された複数個のピクチャで構成されるシーンに分割する分割手段と、
与えられた量子化スケールを決定する符号化パラメータに従って、入力したピクチャを、複数画素で構成されるブロック単位に符号化し、符号化データを生成する符号化手段と、
前記符号化手段で生成されたピクチャの符号化データ量を検出する符号量検出手段と、
着目ピクチャより得られた符号化データを復号する復号手段と、
前記復号手段により復号して得られたピクチャと、符号化前のピクチャとの間の、前記ブロックの境界位置における歪み量をピクチャ歪み量として算出する歪み量算出手段と、
着目ピクチャから、当該ピクチャの符号化処理する場合の、前記ブロック境界位置の歪みに影響を与える属性の統計情報を算出する統計情報算出手段と、
前記シーケンス目標符号量、前記符号量検出手段で検出された符号化データ量、前記統計情報算出手段で算出された統計情報、及び、前記歪み量算出手段で算出されたピクチャ歪み量に基づき、着目ピクチャに後続するピクチャの符号化パラメータを生成し、前記符号化手段に設定する設定手段とを備える。
In order to solve this problem, for example, a moving image encoding apparatus of the present invention has the following configuration. That is,
A moving image encoding apparatus that encodes continuously input pictures within a sequence target code amount determined from a target bit rate,
A dividing unit that divides a moving image composed of pictures arranged in a time axis into scenes composed of a plurality of preset pictures;
Encoding means for encoding an input picture in block units composed of a plurality of pixels and generating encoded data in accordance with an encoding parameter for determining a given quantization scale;
Code amount detection means for detecting the amount of encoded data of the picture generated by the encoding means;
Decoding means for decoding the encoded data obtained from the picture of interest;
A distortion amount calculating means for calculating a distortion amount at a boundary position of the block between a picture obtained by decoding by the decoding means and a picture before encoding as a picture distortion amount;
Statistical information calculating means for calculating statistical information of attributes that affect the distortion of the block boundary position when encoding the picture from the picture of interest;
Based on the sequence target code amount, the encoded data amount detected by the code amount detection unit, the statistical information calculated by the statistical information calculation unit, and the picture distortion amount calculated by the distortion amount calculation unit Setting means for generating coding parameters for a picture following the picture and setting the coding parameters in the coding means.

本発明によれば、ブロック歪みによる画質の劣化の度合、及びピクチャの視覚的な統計情報に従い、シーンに対する目標符号量を制御する事で、与えられた目標ビットレートの条件下において良好な画質の符号化動画像データを得る事が可能となる。   According to the present invention, by controlling the target code amount for a scene according to the degree of deterioration in image quality due to block distortion and visual statistical information of a picture, a good image quality can be obtained under a given target bit rate condition. Encoded moving image data can be obtained.

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。   Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

[第1の実施形態]
図1は、実施形態における時間軸に並んだピクチャで構成される動画像を符号化する動画像符号化装置のブロック構成図である。実施形態では、符号化方式としてMPEG−4を例にして説明する。
[First Embodiment]
FIG. 1 is a block configuration diagram of a moving image encoding apparatus that encodes a moving image composed of pictures arranged on a time axis in the embodiment. In the embodiment, MPEG-4 will be described as an example of an encoding method.

符号化部105は、符号化パラメータとして与えられるピクチャ目標符号量Rp以下になる様に入力ピクチャをMPEG−4符号化(DCT変換、量子化、エントロピー符号化)する。つまり、符号化部105は、与えられたパラメータに従い符号化ストリームを生成し、出力する。一般に、生成される符号量の制御は、量子化処理における量子化ステップ値に依存するので、ピクチャ目標符号量Rpは量子化ステップ(もしくは量子化スケール)を決定するためのパラメータと言うこともできる。また、局所復号化部106は、該符号化ストリームを入力としてMPEG−4復号化を行い、局所復号ピクチャを出力する。詳細は後述する説明から明らかになるが、DCT変換は複数画素(8×8画素)で構成されるブロック単位に行なう。このため、この局所復号化部106は、8×8画素のブロック内の境界の画素を復号する(境界より1画素分内側の6×6画素の復号処理は行なわない)。   The encoding unit 105 performs MPEG-4 encoding (DCT conversion, quantization, entropy encoding) on the input picture so that it is less than or equal to the picture target code amount Rp given as an encoding parameter. That is, the encoding unit 105 generates and outputs an encoded stream according to the given parameters. In general, since the control of the generated code amount depends on the quantization step value in the quantization process, the picture target code amount Rp can also be said to be a parameter for determining the quantization step (or quantization scale). . Also, the local decoding unit 106 performs MPEG-4 decoding using the encoded stream as an input, and outputs a locally decoded picture. Although details will become clear from the description to be described later, the DCT conversion is performed in units of blocks each composed of a plurality of pixels (8 × 8 pixels). For this reason, the local decoding unit 106 decodes the pixels at the boundary in the 8 × 8 pixel block (the 6 × 6 pixel decoding process one pixel inside the boundary is not performed).

符号量検出部107は、符号化部105で生成された1ピクチャ分の符号化データ量を検出し、検出した結果を後述の第1のピクチャ目標符号量算出部103に出力する。   The code amount detection unit 107 detects the encoded data amount for one picture generated by the encoding unit 105 and outputs the detected result to a first picture target code amount calculation unit 103 described later.

符号化歪み検出部は、MPEG−4符号化方式における符号化歪みとして代表的なブロック歪みを検出する。ブロック歪みの程度を表すスカラー値であるブロック歪み量をBpは、符号化部105に供給される符号化前のピクチャ、及び、局所復号化部106から出力される局所復号ピクチャを用いて次の通りに算出する。   The coding distortion detection unit detects typical block distortion as coding distortion in the MPEG-4 coding method. The block distortion amount Bp, which is a scalar value indicating the degree of block distortion, is calculated using the pre-encoding picture supplied to the encoding unit 105 and the local decoded picture output from the local decoding unit 106 as follows. Calculate as follows.

符号化部105の、入力ピクチャの水平方向の画素数をx_siz、垂直方向の画素数をy_sizとする。図4で示す通りに、水平方向の座標をJ、垂直方向の座標をIとした際、符号化前の座標(I,J)の画素値をCIN(I,J)とする。同様に、局所復号化部106より得られた復号画像中の座標(I,J)の画素値をCOUT(I,J)とする。符号化部105は、基本的に8×8画素のブロック単位に符号化することになるので、ブロック歪みは、8×8画素のブロックの境界位置に発生する。従って、画像全体に対するブロック歪み量(ピクチャ歪み量)Bpは次に示すアルゴリズムによって求めることができる。
for (I=0;I < y_size -1; I++){
for (J= 0; J < x_size -1; J++){
if (J % 8 == 7){
EDGEin = ABS (CIN(J,I) - CIN(J,I+1));
EDGEout =ABS (COUT(J,I) - COUT(J,I+1));
MSEblk ++ = POWER(EDGEin - EDGEout));}
else{
if( I % 8 == 7){
EDGEin = ABS(CIN(J,I) - CIN(J+1,I));
EDGEout =ABS(COUT(J,I) - COUT(J+1,I));
MSEblk++ = POWER(EDGEin - EDGEout));}
} }
Bp= MSEblk/MSEall; …(1)
上記において、MSEallはCIN(J,I)とCOUT(J,I)とのピクチャ全体における差分二乗和である。また、「X % Y」は、整数Xを整数Yで除算した際の余りを返す関数である。また、ブロック歪み量Bpは、ブロックの境界の画素値のみを参照して算出するので、ブロック境界よりも内側の6×6画素は参照しない。先に説明したように、局所復号化部106が復号するのが、ブロック内の境界の画素値とするのは、この理由による。
Assume that the number of pixels in the horizontal direction of the input picture of the encoding unit 105 is x_siz, and the number of pixels in the vertical direction is y_siz. As shown in FIG. 4, when the horizontal coordinate is J and the vertical coordinate is I, the pixel value of the coordinate (I, J) before encoding is CIN (I, J). Similarly, the pixel value of the coordinates (I, J) in the decoded image obtained from the local decoding unit 106 is defined as COUT (I, J). Since the encoding unit 105 basically performs encoding in block units of 8 × 8 pixels, block distortion occurs at the boundary position of the block of 8 × 8 pixels. Therefore, the block distortion amount (picture distortion amount) Bp for the entire image can be obtained by the following algorithm.
for (I = 0; I <y_size -1; I ++) {
for (J = 0; J <x_size -1; J ++) {
if (J% 8 == 7) {
EDGEin = ABS (CIN (J, I)-CIN (J, I + 1));
EDGEout = ABS (COUT (J, I)-COUT (J, I + 1));
MSEblk ++ = POWER (EDGEin-EDGEout));}
else {
if (I% 8 == 7) {
EDGEin = ABS (CIN (J, I)-CIN (J + 1, I));
EDGEout = ABS (COUT (J, I)-COUT (J + 1, I));
MSEblk ++ = POWER (EDGEin-EDGEout));}
}}
Bp = MSEblk / MSEall; (1)
In the above, MSEall is the sum of squares of differences in the entire picture between CIN (J, I) and COUT (J, I). “X% Y” is a function that returns the remainder when the integer X is divided by the integer Y. Further, since the block distortion amount Bp is calculated by referring only to the pixel value at the block boundary, 6 × 6 pixels inside the block boundary are not referred to. As described above, it is for this reason that the local decoding unit 106 decodes the pixel value at the boundary in the block.

ここで上記アルゴリズムについて簡単に説明する。先に説明したように、ブロック境界位置は、画像の水平、垂直とも8の整数倍の座標位置である。画像の左上隅の座標は一般に原点(0,0)と表現するから、隣接する2つのブロックの境界に位置する画素の座標位置は、座標を8で除算した際に、余りが7となる座標と、その座標+1となる。上記のアルゴリズによると、オリジナル(符号化前)の画像の2つのブロック境界に位置する2つの画素の差と復号後のブロック境界に位置する2つの画素の差の差分が、隣接する2つのブロック歪みを表わす指標値と言える。隣接するブロックは水平方向、垂直方向の2種類が存在するので、それぞれにおいて歪み値を累積することで、画像全体に対するブロック歪み量Bpが算出できることになる。   Here, the algorithm will be briefly described. As described above, the block boundary position is a coordinate position that is an integral multiple of 8 in both the horizontal and vertical directions of the image. Since the coordinates of the upper left corner of the image are generally expressed as the origin (0, 0), the coordinate position of the pixel located at the boundary between two adjacent blocks is a coordinate whose remainder is 7 when the coordinates are divided by 8 And its coordinate is +1. According to the above algorithm, the difference between the two pixels located at the two block boundaries of the original (before encoding) image and the difference between the two pixels located at the block boundary after decoding is determined as two adjacent blocks. It can be said that it is an index value representing distortion. Since there are two types of adjacent blocks in the horizontal direction and the vertical direction, the block distortion amount Bp for the entire image can be calculated by accumulating the distortion values in each.

従って、ブロック歪み量Bpが大きければ、復号した画像がオリジナルの画像に対して画質劣化が激しく符号化歪みが大きいといえることは明らかである。本実施形態においては、MPEG-4符号化方式を対象としたので、上記アルゴリズムでは8の整数倍の座標でブロック歪みを求めたが、ブロックのサイズが8×8以外の場合には、それに応じて求めればよい。   Therefore, it is clear that if the block distortion amount Bp is large, it can be said that the decoded image has a significant image quality deterioration compared to the original image and the coding distortion is large. In this embodiment, since the MPEG-4 encoding method is targeted, the above algorithm calculates block distortion at coordinates that are an integral multiple of 8. However, if the block size is other than 8 × 8, the block distortion is determined accordingly. Find it.

上記のようにして符号化歪み検出部104は、着目ピクチャのブロック歪み量Bpを算出する。そして、符号化歪み検出部104は、算出したブロック歪み長Bpを符号化パラメータ算出部103に出力する。   As described above, the coding distortion detection unit 104 calculates the block distortion amount Bp of the picture of interest. Then, the coding distortion detection unit 104 outputs the calculated block distortion length Bp to the coding parameter calculation unit 103.

統計情報算出部101は、ブロック境界位置の歪みに影響を与える属性の統計情報を算出する。本実施形態では、ピクチャ内の画素を8×8画素で構成されるブロック毎に、以下に説明する4つの統計情報Ph、Ps、Py,Paを算出する。前提として、符号化対象の画像データの各画素は、輝度(Y)、クロマ(Cb,Cr)の3つの成分で構成されるものとする。なお、サブサンプルが4−2−0であるMPEG−4プロファイルの場合には、クロマのブロックとしては4×4画素ブロックである。 The statistical information calculation unit 101 calculates statistical information of attributes that affect the distortion of the block boundary position. In the present embodiment, a pixel in a picture for each block consisting of 8 × 8 pixels, four statistics P h as described below, P s, P y, and calculates the P a. As a premise, it is assumed that each pixel of image data to be encoded is composed of three components of luminance (Y) and chroma (Cb, Cr). In the case of the MPEG-4 profile in which the subsample is 4-2-0, the chroma block is a 4 × 4 pixel block.

以下、本実施形態の統計情報算出部101が算出する統計情報を構成する情報Ph、Ps、Py,Paについて説明する。 Hereinafter, information P h constituting statistics statistics calculator 101 of the present embodiment is calculated, P s, P y, for P a will be described.

[統計情報Ph
情報Phは、該ブロックが肌色であるか否かを示す情報である。
[Statistical information P h ]
Information P h is the block is information indicating whether or not the skin color.

人間の視覚特性が、肌色の色相に対しては非常に敏感である事が知られている。よって、ピクチャ画質重要度算出部102におけるピクチャ画質重要度を算出する情報の一つとして、入力ピクチャ内に肌色の色相に相当するブロック数がどの程度存在するかを算出する。   It is known that human visual characteristics are very sensitive to the hue of skin color. Therefore, as one piece of information for calculating the picture quality importance in the picture quality importance calculation unit 102, the number of blocks corresponding to the flesh color hue in the input picture is calculated.

肌色であるか否かの判定は、図5に示すCb−Crの2次元座標を用いる事により実現される。入力ピクチャのブロック内の、Cbの平均値をCb’、Crの平均値をCr’として、図5上の座標をPbr(Cb’,Cr’)とすれば、当該ブロックの色相Hθは以下の式で得られる。
Hθ = tan(Cb/Cr)-1 …(2)
The determination of whether or not the skin color is used is realized by using the two-dimensional coordinates of Cb-Cr shown in FIG. If the average value of Cb in the block of the input picture is Cb ′, the average value of Cr is Cr ′, and the coordinates on FIG. 5 are Pbr (Cb ′, Cr ′), the hue Hθ of the block is It is obtained by the formula.
Hθ = tan (Cb / Cr) −1 (2)

肌色の色相は、Cb−Cr空間では、123度近辺である事が知られているが、本実施形態では肌色の色相として100乃至150度の区間(角度範囲)を予め定義しておき、色相Hθが該区間内の角度であるか否かを判定する。   The skin color hue is known to be around 123 degrees in the Cb-Cr space, but in this embodiment, a section (angle range) of 100 to 150 degrees is defined in advance as the hue of the skin color. It is determined whether Hθ is an angle within the section.

この判定結果をPとし、ブロックが肌色であればPh =1、そうでなければPh=0とする。 The determination results and P h, blocks P h = 1 if the skin color, and P h = 0 otherwise.

[統計情報Ps
情報Psは、該ブロックの彩度情報である。彩度情報Psも、図5に示すCb−Crの2次元座標を用いる事により算出できる。人間の視覚特性は、彩度が比較的低い領域(無彩色に近い領域)におけるブロック歪み対して敏感である。それ故、ピクチャ画質重要度算出部102におけるピクチャ画質重要度を算出する情報の一つとして、入力ピクチャ内の各ブロックの彩度情報Psを算出する。
[Statistical information P s ]
Information P s is saturation information of the block. The saturation information P s can also be calculated by using the Cb—Cr two-dimensional coordinates shown in FIG. Human visual characteristics are sensitive to block distortions in regions with relatively low saturation (regions close to achromatic colors). Therefore, the saturation information P s of each block in the input picture is calculated as one piece of information for calculating the picture quality importance in the picture quality importance calculation unit 102.

彩度情報Psは、座標Pbrの原点からの距離を算出すればよい。
Ps=√(Cb’2+Cr’2) …(3)
[統計情報Py
情報Pyは、ブロック内の輝度情報(Y)の平均値である。人間の視覚特性が、輝度Yが比較的高い領域におけるブロック歪みに対して敏感である。それ故、ピクチャ画質重要度算出部103におけるピクチャ画質重要度を算出する情報の一つとして、入力ピクチャ内の、ブロックの輝度Yの平均値Pyを算出する。1つのブロックは8×8画素であるので、各画素の輝度をYi(i=0,1,2,…,63)とするなら、輝度平均値は次式で求めることができる。
y={ΣYi}/64 …(4)
For the saturation information P s , the distance from the origin of the coordinate Pbr may be calculated.
Ps = √ (Cb ′ 2 + Cr ′ 2 ) (3)
[Statistical information P y ]
Information Py is an average value of the luminance information (Y) in the block. Human visual characteristics are sensitive to block distortion in regions where luminance Y is relatively high. Therefore, the average value P y of the luminance Y of the block in the input picture is calculated as one piece of information for calculating the picture quality importance in the picture quality importance calculation unit 103. Since one block is 8 × 8 pixels, if the luminance of each pixel is Y i (i = 0, 1, 2,..., 63), the average luminance value can be obtained by the following equation.
P y = {ΣY i } / 64 (4)

[統計情報Pa
情報Paは、ブロック中の各画素の輝度情報Yの値から求まる分散値情報である。
Statistics P a]
Information P a is the variance value information obtained from the values of the luminance information Y of each pixel in the block.

人間の視覚特性は、空間周波数が比較的低い領域におけるブロック歪みに対して敏感である。それ故、ピクチャ画質重要度算出部102におけるピクチャ画質重要度を算出する情報の一つとして、入力ピクチャ内の、各ブロックにおける輝度Yの分散値を算出する。ブロックの各画素の輝度の平均値をY’として、ブロック内の各画素の輝度Yの値をYi(i=0,1,2,…,63)とすれば、次式で得られる。
a=Σ(Yi−Y’)2 …(5)
なお、厳密には、分散は、上記式(5)を標本数(実施形態では8×8=64)で除算するものであるが、分散の指標値が判ればよいので、除算することは行なっていない。
Human visual characteristics are sensitive to block distortion in regions where the spatial frequency is relatively low. Therefore, the variance value of the luminance Y in each block in the input picture is calculated as one piece of information for calculating the picture image quality importance in the picture image quality importance calculating unit 102. If the average luminance value of each pixel in the block is Y ′ and the luminance Y value of each pixel in the block is Yi (i = 0, 1, 2,..., 63), the following equation is obtained.
P a = Σ (Y i −Y ′) 2 (5)
Strictly speaking, the variance is obtained by dividing the above equation (5) by the number of samples (8 × 8 = 64 in the embodiment). However, since it is sufficient to know the index value of the variance, the division is performed. Not.

以上、実施形態における統計情報算出部101で生成する4つの統計情報を説明した。   Heretofore, the four pieces of statistical information generated by the statistical information calculation unit 101 in the embodiment have been described.

例えば、図4の入力ピクチャの水平方向の画素数x_sizeが“640”、垂直方向の画素数y_sizが“480”とすれば、この画像中には4800個(=(640/8)×(480/8))のブロックが存在することになる。図6は、或るピクチャのブロック分割例を示している。先頭のブロックの番号を0とし、その先頭ブロックをブロック#0と表わすと、ブロック#0乃至ブロック#4799について、統計情報算出部101が上記4つの統計情報を算出することになる。各ブロックの統計情報は、配列Ph[N],Ps[N],Py[N],Pa[N](N=0,1,2,…,4799)と表わせる。 For example, if the number of pixels x_size in the horizontal direction of the input picture in FIG. 4 is “640” and the number of pixels y_siz in the vertical direction is “480”, 4800 (= (640/8) × (480) in this image. / 8)) block exists. FIG. 6 shows an example of block division of a certain picture. If the number of the first block is 0 and the first block is represented as block # 0, the statistical information calculation unit 101 calculates the above four statistical information for block # 0 to block # 4799. The statistical information of each block can be expressed as an array P h [N], P s [N], P y [N], P a [N] (N = 0, 1, 2,..., 4799).

次に、ピクチャ画質重要度算出部102について説明する。ピクチャ画質重要度算出部102は、統計情報算出部101から入力される統計情報Ph[N],Ps[N],Py[N],Pa[N]、及び、図16に示す予め定めた視覚感度テーブルを用いて、入力ピクチャのピクチャ画質重要度Piを算出する。視覚感度テーブルは、重み付け係数Cw[k]及び正規化係数Cd[k](k=0〜3)を、4つの統計情報それぞれについて定義している。つまり、k=0の重み付け係数Cw[0]及び正規化係数Cd[0]は、統計情報Ph[N]に対するものである。k=1の重み付け係数Cw[1]及び正規化係数Cd[1]は、統計情報Ps[N]に対するものである。k=2の重み付け係数Cw[2]及び正規化係数Cd[2]は、統計情報Py[N]に対するものである。そして、k=3は、重み付け係数Cw[3]及び正規化係数Cd[3]は、統計情報Pa[N]に対するものである。 Next, the picture image quality importance calculation unit 102 will be described. The picture image quality importance calculation unit 102 includes statistical information P h [N], P s [N], P y [N], P a [N] input from the statistical information calculation unit 101, and FIG. The picture quality importance Pi of the input picture is calculated using a predetermined visual sensitivity table. The visual sensitivity table defines a weighting coefficient Cw [k] and a normalization coefficient Cd [k] (k = 0 to 3) for each of four pieces of statistical information. That is, the k = 0 weighting coefficient Cw [0] and the normalization coefficient Cd [0] are for the statistical information P h [N]. The weighting coefficient Cw [1] and the normalization coefficient Cd [1] with k = 1 are for the statistical information P s [N]. The weighting coefficient Cw [2] and the normalization coefficient Cd [2] for k = 2 are for the statistical information P y [N]. K = 3 is the weighting coefficient Cw [3] and the normalization coefficient Cd [3] is for the statistical information P a [N].

ピクチャ画質重要度算出部102は、ピクチャ内の各々ブロックの、統計情報Ph[N]を除く、3つの統計情報と正規化係数Cd[k]を乗算し、“1”以下の値にクリップする。統計情報Ph[N]は、既に0、1の2値の値に正規化済みである点に注意されたい。例えば、彩度情報Ps [N]については、以下の処理により正規化された彩度情報Ps’[N]を得る。
for(N = 0; N < 48000; N++) {
Ps’[N] = Ps[N] × Cd[1];
if(Ps’[N] > 1){
Ps’[N] = 1;
}
} …(6)
The picture image quality importance calculation unit 102 multiplies three pieces of statistical information excluding the statistical information Ph [N] and the normalization coefficient Cd [k] for each block in the picture, and clips it to a value of “1” or less. . It should be noted that the statistical information P h [N] has already been normalized to binary values of 0 and 1. For example, with respect to the saturation information P s [N], the saturation information Ps ′ [N] normalized by the following processing is obtained.
for (N = 0; N <48000; N ++) {
Ps' [N] = Ps [N] × Cd [1];
if (Ps'[N]> 1) {
Ps' [N] = 1;
}
} (6)

同様に、Py [N]及びPa [N]についても処理を行い、正規化された統計情報であるPy'[N]及びPa'[N]を算出する。 Similarly, P y [N] and P a [N] are also processed, and normalized statistical information P y '[N] and P a ' [N] are calculated.

次にピクチャ画質重要度算出部102は、Ph[N]及び式(6)で求めた正規化された統計情報Ps'[N]、PY'[N]及びPa'[N]に基づき、以下の処理を行なうことで、ピクチャ画質重要度Piを求める。なお、ピクチャ画質重要度Piを求める際、Piを“0”に初期化する。
for(N = 0; N < 48000; N++) {
Pi = Pi + Ph[N]×Cw[0] + Ps’[N]×Cw[1] + PY’[N]×Cw[2] + Pa’[N]×Cw[3];
} …(7)
Next, the picture image quality importance calculation unit 102 based on P h [N] and the normalized statistical information Ps ′ [N], PY ′ [N], and Pa ′ [N] obtained by Expression (6), The picture quality importance Pi is obtained by performing the following processing. When obtaining the picture image quality importance Pi, Pi is initialized to “0”.
for (N = 0; N <48000; N ++) {
Pi = Pi + Ph [N] x Cw [0] + Ps' [N] x Cw [1] + PY '[N] x Cw [2] + Pa' [N] x Cw [3];
} (7)

つまり、ピクチャ画質重要度Piは、着目ピクチャの各ブロック毎の4つの正規化された統計情報それぞれの、重み付け係数を適用した合算値と言うことができる。   That is, the picture image quality importance level Pi can be said to be a sum value obtained by applying a weighting coefficient to each of the four normalized statistical information for each block of the target picture.

次に第1のピクチャ目標量算出部103について説明する。ここで、本実施形態の動画像符号化装置に与えられる目標ビットレートを「Ts」であるものとする。第1のピクチャ目標量算出部103は、この目標ビットレートTs、符号化歪み算出部104から入力されるブロック歪み量Bp、及び、ピクチャ画質重要度算出部から入力されるピクチャ画質重要度Piから、次のピクチャ(後続するピクチャ)に対する符号化部105のピクチャ目標符号量Rp(符号化パラメータ)を算出する。ピクチャ目標符号量Rpの算出方法について、図7を用いて説明する。   Next, the first picture target amount calculation unit 103 will be described. Here, it is assumed that the target bit rate given to the moving picture encoding apparatus of the present embodiment is “Ts”. The first picture target amount calculation unit 103 uses the target bit rate Ts, the block distortion amount Bp input from the coding distortion calculation unit 104, and the picture quality importance Pi input from the picture quality importance calculation unit. Then, the picture target code amount Rp (encoding parameter) of the encoding unit 105 for the next picture (subsequent picture) is calculated. A method for calculating the picture target code amount Rp will be described with reference to FIG.

本実施形態の動画像符号化装置において、予め設定された複数個のピクチャから構成されるシーンの目標符号量Rsを次式により求める。なお、実施形態での1シーンは15個のピクチャ(Ns=15)であるものとする。ここでシーンの先頭のピクチャはIピクチャとする。入力ピクチャのフレームレートを30fpsとすれば、シーン目標符号量Rs(15フレームの目標符号量)を、次式(8)に従って算出する。
Rs=Ts×1/2 …(8)
In the moving picture encoding apparatus of the present embodiment, a target code amount Rs of a scene composed of a plurality of preset pictures is obtained by the following equation. Note that one scene in the embodiment is assumed to be 15 pictures (Ns = 15). Here, the first picture in the scene is an I picture. If the frame rate of the input picture is 30 fps, the scene target code amount Rs (target code amount of 15 frames) is calculated according to the following equation (8).
Rs = Ts × 1/2 (8)

更に、本動画像符号化装置に入力される着目ピクチャが、着目シーン内の先頭ピクチャ以外である場合(2番目以降のピクチャの場合)、例えば、図7中のピクチャP5であるとすると、ピクチャP5のピクチャ目標符号量の初期値Rp’を次式(9)から求める。
Rp’=(Rs−Rf)/Nr …(9)
ここで、Nrは、シーケンス内のピクチャP5を含む残りピクチャ数(未符号化のピクチャ数)であり、Rfはシーン内におけるピクチャP1からピクチャP4までの総発生符号量である。
Furthermore, if the target picture input to the moving picture encoding apparatus is other than the first picture in the target scene (in the case of the second and subsequent pictures), for example, if it is picture P5 in FIG. The initial value Rp ′ of the picture target code amount of P5 is obtained from the following equation (9).
Rp ′ = (Rs−Rf) / Nr (9)
Here, Nr is the number of remaining pictures including the picture P5 in the sequence (number of uncoded pictures), and Rf is the total generated code amount from the picture P1 to the picture P4 in the scene.

ここで、シーンの初期のピクチャ目標符号量Rp’を、ブロック歪み量Bp及びピクチャ画質重要度Piに応じて、図8に示す処理フローにより増減させることで、最終的なピクチャ目標符号量Rpを算出する。   Here, the final picture target code amount Rp ′ is increased or decreased by the processing flow shown in FIG. 8 according to the block distortion amount Bp and the picture quality importance Pi according to the block distortion amount Bp. calculate.

図8の処理において、Bp’及びPi’は、直前のシーンを構成する全てのピクチャのブロック歪み量Bp及びピクチャ画質重要度Piの平均値である。図8における、ステップS800において、ブロック歪み量Bpと予め定めた閾値Bminとを比較する。このステップS800における比較の結果、ブロック歪み量Bpが閾値Bminより小さい場合には、次にステップS801において初期値Rp’を減少させるか否かを判定する。閾値Bminには、再構成ピクチャにおいて視覚特性の観点から認識困難なブロック歪み量の限界値を予め定義する。ステップS801において、ピクチャP5のピクチャ画質重要度Piと直前のシーンのPi平均値であるピクチャ重要度Pi’とを比較し、ピクチャ画質重要度Piの方が小さい場合には、初期値Rp’をステップS807の式に従い減少させる。ステップS807における式中のβは、予め定めた0.0以上の小数点を含む定数である。   In the process of FIG. 8, Bp ′ and Pi ′ are the average values of the block distortion amounts Bp and the picture image quality importance levels Pi of all the pictures constituting the immediately preceding scene. In step S800 in FIG. 8, the block distortion amount Bp is compared with a predetermined threshold value Bmin. If the block distortion amount Bp is smaller than the threshold value Bmin as a result of the comparison in step S800, it is next determined in step S801 whether or not the initial value Rp ′ is to be decreased. The threshold value Bmin defines in advance a limit value of the block distortion amount that is difficult to recognize from the viewpoint of visual characteristics in the reconstructed picture. In step S801, the picture quality importance Pi of the picture P5 is compared with the picture importance Pi ′ which is the Pi average value of the immediately preceding scene. If the picture quality importance Pi is smaller, the initial value Rp ′ is set. Decrease in accordance with the formula in step S807. Β in the expression in step S807 is a constant including a predetermined decimal point of 0.0 or more.

一方、ステップS800における比較の結果、ブロック歪み量Bpが閾値Bmin以上の場合には、ステップS802及びS803において初期値Rp’を増加させるか否かの判定を行う。ステップS802において、ピクチャP5のピクチャ画質重要度Piが直前のシーンのPiの平均値であるピクチャ重要度Pi’より大きく、かつブロック歪み量Bpが直前のシーンのBp平均値であるブロック歪み量Bp’より大きく、更にステップS804において“Re>0”である場合に、初期値Rp’をステップS805の式に従い増加させる。ここで“Re”は、直前のシーンまで符号化した結果得られた、目標ビットレートTsに対する余剰符号量に相当するRrから、現在のシーン内で初期値Rp’を増加させた符号量を減算した符号量である。Rr及びReはシーンの符号化が完了する毎に次式を演算する事により得られる。
Rr=Rr+Rs−Rs’
Re=Rr …(10)
ただし、Rs’はシーン内において発生したシーン発生符号量である。式(10)で求めたReをシーンの先頭ピクチャに用いる初期値とし、更にステップS805において随時更新する。
On the other hand, if the block distortion amount Bp is greater than or equal to the threshold value Bmin as a result of the comparison in step S800, it is determined in steps S802 and S803 whether or not the initial value Rp ′ is to be increased. In step S802, the picture quality importance Pi of the picture P5 is larger than the picture importance Pi ′ that is the average value of Pi of the immediately preceding scene, and the block distortion amount Bp is the block distortion amount Bp that is the Bp average value of the immediately preceding scene. If “Re> 0” in step S804, the initial value Rp ′ is increased according to the equation in step S805. Here, “Re” subtracts the code amount obtained by increasing the initial value Rp ′ in the current scene from Rr corresponding to the surplus code amount for the target bit rate Ts obtained as a result of encoding up to the immediately preceding scene. Code amount. Rr and Re are obtained by calculating the following equation each time the encoding of the scene is completed.
Rr = Rr + Rs−Rs ′
Re = Rr (10)
Here, Rs ′ is a scene generation code amount generated in the scene. Re obtained by Expression (10) is set as an initial value used for the first picture of the scene, and is updated as needed in step S805.

次に図9を用いて、本実施形態における動画像の符号化処理を説明する。図9には、動画像の先頭から連続する3つのシーンに対する本実施形態によるピクチャ目標符号量Rpの推移を示している。   Next, a moving image encoding process according to this embodiment will be described with reference to FIG. FIG. 9 shows the transition of the picture target code amount Rp according to the present embodiment for three consecutive scenes from the beginning of the moving image.

シーン0においては、シーケンスの先頭シーンであるので、直前のシーンのPi平均値であるピクチャ重要度Pi’及び直前のシーンのBp平均値であるブロック歪み量Bp’の算出が出来ない。よって、図8中のステップS806の処理のみが実施されピクチャ目標符号量の初期値Rp’がそのままピクチャ目標符号量Rpとして符号化部105に与えられる。   Since scene 0 is the first scene in the sequence, it is not possible to calculate the picture importance Pi ′, which is the Pi average value of the immediately preceding scene, and the block distortion amount Bp ′, which is the Bp average value of the immediately preceding scene. Therefore, only the process of step S806 in FIG. 8 is performed, and the initial value Rp ′ of the picture target code amount is directly supplied to the encoding unit 105 as the picture target code amount Rp.

次にシーン1においては、ステップS806に加えて、ピクチャ目標符号量の初期値Rp’に対して符号量を減少させるステップS807の処理が行われる。一方、符号量を増加させるステップS805の処理はシーン1では行われない。これは、図9においてシーン0の符号化結果においてシーン目標符号量Rsがシーン発生符号量Rs’と等しくRrが0であるからである。勿論、シーン0において、ステップS807の処理において積極的に符号量の減少を行わなくとも、式(10)によりRr>0と判定された場合には、ステップS805の処理をシーン1において実行する事が可能である。図9中のシーン1において、ピクチャP2、P3及ぶP4においてステップS807の処理が行われている事がわかる。   Next, in scene 1, in addition to step S806, the process of step S807 for reducing the code amount with respect to the initial value Rp ′ of the picture target code amount is performed. On the other hand, the process of step S805 for increasing the code amount is not performed in the scene 1. This is because the scene target code amount Rs is equal to the scene generation code amount Rs ′ and Rr is 0 in the encoding result of the scene 0 in FIG. Of course, in the scene 0, even if the code amount is not actively reduced in the process of step S807, the process of step S805 is executed in the scene 1 when it is determined that Rr> 0 according to the equation (10). Is possible. In the scene 1 in FIG. 9, it can be seen that the process of step S807 is performed in the pictures P2, P3 and P4.

次にシーン2においては、ステップS806、ステップS807に加えてステップS805の処理が行われている。これはシーン2の符号化に先立ち演算する式(10)の演算結果により、Rr>0が得られたからである。これは、シーン1におけるピクチャP2、P3及びP4に対するステップS807の処理により発生した余剰符号量に相当する。シーン2のピクチャP0、P1及びP2、更にはピクチャP7、P8、及びP9に対してステップS805の処理により、ピクチャ目標符号量の初期値Rp’に対して符号量が増加させる事によりピクチャ目標符号量Rpが算出されている事がわかる。   Next, in scene 2, in addition to steps S806 and S807, the process of step S805 is performed. This is because Rr> 0 is obtained from the calculation result of the equation (10) calculated prior to the encoding of the scene 2. This corresponds to the surplus code amount generated by the process of step S807 for the pictures P2, P3, and P4 in the scene 1. For the pictures P0, P1, and P2 of the scene 2, and further for the pictures P7, P8, and P9, the processing of step S805 causes the code amount to increase with respect to the initial value Rp ′ of the picture target code amount. It can be seen that the amount Rp is calculated.

なお、本実施形態においては、変数Pi’及びBp’を求めるに際して、直前のシーンのピクチャ画質重要度Pi及びブロック歪み量Bpを用いたが、直前の複数ピクチャのピクチャ画質重要度Pi及びブロック歪み量Bpを用いても良い。この場合には、例えば入力ピクチャがP5の場合には、現在のシーンのピクチャI及びピクチャP0乃至P4及び直前のシーンの、ピクチャP5乃至P13のピクチャ画質重要度Pi及びブロック歪み量Bpを用いる事となる。   In the present embodiment, when obtaining the variables Pi ′ and Bp ′, the picture quality importance Pi and the block distortion amount Bp of the immediately preceding scene are used, but the picture quality importance Pi and block distortion of the immediately preceding multiple pictures are used. The amount Bp may be used. In this case, for example, when the input picture is P5, the picture quality importance Pi and the block distortion amount Bp of the pictures P5 to P13 of the current scene are used. It becomes.

[第2の実施形態]
第2の実施形態を説明する。図10は本第2の実施形態における動画像符号化装置のブロック構成図である。第1の実施形態と同様の構成については、同じ参照符号を付した。従って、本第2の実施形態における符号化部105は、第1の実施形態と同様、MPEG−4に準拠した符号化処理を行なうものとなる。
[Second Embodiment]
A second embodiment will be described. FIG. 10 is a block diagram of the moving picture coding apparatus according to the second embodiment. The same reference numerals are assigned to the same configurations as those in the first embodiment. Accordingly, the encoding unit 105 according to the second embodiment performs an encoding process based on MPEG-4 as in the first embodiment.

図10は、図1の構成に、シーン画質重要度算出部1000と、シーン分割手段1001、シーン目標符号量算出部1002、及び符号化パラメータ算出部1003を追加したものと言える。なお、図10において、上記新たに追加された4つの処理部以外は、第1の実施形態と同様の処理を行うものであり、ここでの詳述は省略する。   10 can be said to be obtained by adding a scene image quality importance calculation unit 1000, a scene dividing unit 1001, a scene target code amount calculation unit 1002, and an encoding parameter calculation unit 1003 to the configuration of FIG. In FIG. 10, except for the four newly added processing units, the same processing as in the first embodiment is performed, and detailed description thereof is omitted here.

第2の実施形態と第1の実施形態で実現される処理の比較を図17のテーブルに示す。本第2の実施形態において、符号量を制御する対象はシーン目標符号量Rsであり、ピクチャ目標符号量Riを制御する第1の実施形態とはこの点で異なる。   A comparison of the processing realized in the second embodiment and the first embodiment is shown in the table of FIG. In the second embodiment, the code amount control target is the scene target code amount Rs, which is different from the first embodiment in which the picture target code amount Ri is controlled.

シーン画質重要度算出部1000の処理を、図11及び図12を用いて説明する。シーン画質重要度算出部1000ではピクチャ画質重要度Piを用いてシーン画質重要度を算出する。   Processing of the scene image quality importance calculation unit 1000 will be described with reference to FIGS. 11 and 12. The scene image quality importance calculation unit 1000 calculates the scene image quality importance using the picture image quality importance Pi.

まず、シーン画質重要度算出部1000は、先に示した式(7)から得られる、小数点を含むスカラー値であるピクチャ画質重要度Piを、値の大きさに応じて複数のクラス値のいずれか分類する。分類するクラスの数は実施形態に応じて最適な数を選択する事が可能であるが、本実施形態におけるクラスの数は“5”であるものとして説明する。   First, the scene image quality importance calculation unit 1000 obtains the picture image quality importance Pi, which is a scalar value including a decimal point, obtained from the equation (7), from any of a plurality of class values according to the magnitude of the value. Classify. Although it is possible to select an optimum number of classes to be classified according to the embodiment, the description will be made assuming that the number of classes in this embodiment is “5”.

図11(a)、(b)には、横軸をピクチャ画質重要度算出部102から入力されるピクチャ画質重要度Piを、縦軸を分割後のピクチャ画質重要度クラス番号Cpを示したものである。5つのクラスに分割するために、予め4つの閾値T1乃至T4を定義する。ここで、必ずピクチャ画質重要度Piを等間隔に分割する必要はない。図11(a)は、本実施形態の動画像符号化装置の符号化モードとして画質安定重視型を定義した場合の符号化モードにおける閾値T1乃至T4の設定例を示している。同図(b)は、画質メリハリ重視型を定義した場合における、符号化モードの閾値T1乃至T4の設定例である。   In FIGS. 11A and 11B, the horizontal axis represents the picture quality importance Pi input from the picture quality importance calculation unit 102, and the vertical axis represents the divided picture quality importance class number Cp. It is. In order to divide into five classes, four threshold values T1 to T4 are defined in advance. Here, it is not always necessary to divide the picture quality importance Pi into equal intervals. FIG. 11A shows a setting example of threshold values T1 to T4 in the encoding mode when the image quality stability importance type is defined as the encoding mode of the moving image encoding apparatus of the present embodiment. FIG. 6B shows an example of setting the encoding mode thresholds T1 to T4 when the image quality sharpening type is defined.

更に、シーン画質重要度算出部1000は、分割したピクチャ画質重要度クラス番号Cpを用いてシーン画質重要度Siを算出する。シーン画質重要度Siは、過去に符号化した複数のピクチャ及び入力ピクチャのピクチャ画質重要度クラス番号Cpを重み付け加算後に平均する事で求める。参照する過去のピクチャ数は、実施形態に応じて選択する事が可能であり、本実施形態では、説明を簡単にするためにピクチャ数を“5”とする。   Further, the scene image quality importance calculation unit 1000 calculates the scene image quality importance Si using the divided picture image quality importance class number Cp. The scene image quality importance Si is obtained by averaging the picture image quality importance class numbers Cp of a plurality of pictures encoded in the past and the input picture after weighted addition. The number of past pictures to be referred to can be selected according to the embodiment. In this embodiment, the number of pictures is “5” for the sake of simplicity.

図12に、シーン画質重要度Ci及びピクチャ画質重要度クラス番号Cpの推移を示す。ここで、ピクチャ画質重要度クラスCpの過去の5ピクチャを格納した配列をArrayCp[N](N=0〜4)とすれば、シーン画質重要度Siは次式で求める事が可能である。ただし、N=0は直前のピクチャの、N=4は5ピクチャ前のピクチャ画質重要度クラスCpを格納するとする。   FIG. 12 shows changes in scene image quality importance Ci and picture image quality importance class number Cp. Here, if the array storing the past five pictures of the picture quality importance class Cp is ArrayCp [N] (N = 0 to 4), the scene quality importance Si can be obtained by the following equation. However, N = 0 stores the picture quality importance class Cp of the previous picture, and N = 4 stores 5 pictures before.

Si= (Cwp0×Ci + Cwp1×ArrayPi[0] + Cwp2×ArrayPi[1]+ Cwp3×ArrayPi[2] + Cwp4×ArrayPi[3] + Cwp5×ArrayPi[4] )/(Cwp0+ Cwp1+ Cwp2+ Cwp3+ Cwp4 + Cwp5 ) …(11)
ただし、Cwp0〜Cwp5は予め定めた重み付け係数であり、1以上の整数である。本実施形態においては、Cwp0〜Cwp4はすべて値“1”とする。式(11)の処理をピクチャ毎にピクチャ画質重要度算出部102からピクチャ画質重要度Piが入力される毎に行う。すなわち、式(11)で求めるシーン画質重要度Siは直前に符号化した複数ピクチャのピクチャ画質重要度Piの傾向を重み付け加算により求めている事になる。なお、図12において、ピクチャ番号1〜5までは、シーン画質重要度が“1”である。これは、それ以前の5つ全てのピクチャが存在しないためであり、5つ全てのピクチャが出揃うまで、式(11)では、ピクチャ番号0のピクチャ画質重要度を用いるようにしたためである。
Si = (C wp0 × Ci + C wp1 × ArrayPi [0] + C wp2 × ArrayPi [1] + C wp3 × ArrayPi [2] + C wp4 × ArrayPi [3] + C wp5 × ArrayPi [4]) / ( C wp0 + C wp1 + C wp2 + C wp3 + C wp4 + C wp5 )… (11)
However, C wp0 to C wp5 are predetermined weighting coefficients and are integers of 1 or more. In this embodiment, C wp0 to C wp4 are all set to the value “1”. The processing of Expression (11) is performed for each picture every time the picture quality importance Pi is input from the picture quality importance calculator 102. That is, the scene image importance Si obtained by the equation (11) is obtained by weighted addition of the tendency of the picture image importance Pi of a plurality of pictures encoded immediately before. In FIG. 12, the scene image quality importance is “1” for picture numbers 1 to 5. This is because all five previous pictures do not exist and the picture quality importance of picture number 0 is used in equation (11) until all five pictures are available.

シーン分割部1001は、シーン画質重要度算出部1000からシーンを適応的に構成する。本第2の実施形態においては、シーン分割部1001によって分割されたシーンを対象として符号量制御を行う。シーンは複数ピクチャから構成されるが、予めシーンの最大ピクチャ数を定義する。シーンを構成するピクチャ数Nsを、予め設定されたNmax以下になるようにする(1シーンに含まれるピクチャの数は、この上限数以下にする)。本第2の実施形態においては説明を簡単にするためにNmax=15とする。シーン分割部1001において、式(11)によって得られたシーン画質重要度Siが同じである連続するピクチャ群を、1つのシーンを構成するピクチャとする。ここでシーン画質重要度算出部1000から入力されるシーン画質重要度Siは小数点を含むスカラー値を、小数点第1位を四捨五入する事で整数としたものをシーン画質重要度クラスCsとする。このシーン画質重要度クラスCsが同じで連続するピクチャをシーンとして構成する。シーン画質重要度クラスCs及びシーンの構成を示した図を図13に示す。   The scene division unit 1001 adaptively configures a scene from the scene image quality importance calculation unit 1000. In the second embodiment, code amount control is performed for the scene divided by the scene dividing unit 1001. Although a scene is composed of a plurality of pictures, the maximum number of pictures in the scene is defined in advance. The number Ns of pictures constituting the scene is set to be equal to or less than a preset Nmax (the number of pictures included in one scene is set to be equal to or less than the upper limit number). In the second embodiment, Nmax = 15 is set to simplify the description. In the scene dividing unit 1001, consecutive picture groups having the same scene image quality importance Si obtained by Expression (11) are set as pictures constituting one scene. Here, the scene image quality importance Si input from the scene image quality importance calculator 1000 is a scene image quality importance class Cs obtained by rounding the first decimal place to a scalar value including a decimal point. Consecutive pictures having the same scene image quality importance class Cs are configured as a scene. FIG. 13 shows a scene image importance class Cs and a scene configuration.

次にシーン目標符号量算出部1002について説明する。シーン目標符号量算出部1002はシーン画質重要度算出部1000から入力されるシーン画質重要度Si、シーン分割部1001から入力されるシーンの切り替わりを示す情報、及び、符号化歪み算出部104から入力されるブロック歪み量Bpからシーン目標符号量Rsを算出する。シーン目標符号量Rsは、シーンの先頭ピクチャを符号化するに先立ち算出されるのみである。シーン目標符号量Rsを算出する際には、次に示す式(12)で示される目標ビットレートTs及びフレームレートFr及びNmaxから得られるCBR符号量Rcbrを基準として増減させる。
Rcbr = Ts × Nmax × 1/Fr …(12)
Next, the scene target code amount calculation unit 1002 will be described. The scene target code amount calculation unit 1002 receives scene quality importance Si input from the scene image quality importance calculation unit 1000, information indicating scene switching input from the scene division unit 1001, and input from the coding distortion calculation unit 104. The scene target code amount Rs is calculated from the block distortion amount Bp. The scene target code amount Rs is only calculated prior to encoding the first picture of the scene. When calculating the scene target code amount Rs, the CBR code amount Rcbr obtained from the target bit rate Ts and the frame rates Fr and Nmax shown by the following equation (12) is increased or decreased.
Rcbr = Ts × Nmax × 1 / Fr (12)

シーン目標符号量をCBR符号量Rcbrから減少させる状況は、ブロック歪み量Bpが小さくかつ、シーン画質重要度Siが小さいシーンの場合である。ただし、シーン目標符号量Rsはシーンを符号化するに先立ち算出する必要があるために、これから符号化するシーンのブロック歪み量Bp及びシーン画質重要度Siの予測を行う必要がある。そこで、本第2の実施形態においては、次に示す方法を用いて、この予測を実現する。   The situation in which the scene target code amount is decreased from the CBR code amount Rcbr is a scene in which the block distortion amount Bp is small and the scene image quality importance Si is small. However, since the scene target code amount Rs needs to be calculated before the scene is encoded, it is necessary to predict the block distortion amount Bp and the scene image quality importance Si of the scene to be encoded. Therefore, in the second embodiment, this prediction is realized using the following method.

ブロック歪み量Bpの予測においては、直前に符号化した複数ピクチャのブロック歪み量Bpから重み加算平均(加重平均)を算出する事により、シーンのブロック歪み量Bpを予測する。予測するブロック歪み量Bsは、過去5ピクチャのブロック歪み量Bpを格納した配列をArrayBp[N](N=0〜4)とすれば、次式(13)で求めることができる。
Bs = (Cwb0×ArrayBp[0] +Cwb1×ArrayBp[1]+ Cwp2×ArrayBp[2] + Cwb3×ArrayBp[3] + Cwp4×ArrayBp[4] )/( Cwb0+ Cwb1+ Cwb2+ Cwb3+ Cwb4) …(13)
ただし、Cwb0〜Cwb4は予め定めた重み付け係数でありCwb0=4、及びCwb1〜Cwb4=1とする。
In the prediction of the block distortion amount Bp, the block distortion amount Bp of the scene is predicted by calculating the weighted average (weighted average) from the block distortion amounts Bp of a plurality of pictures encoded immediately before. The block distortion amount Bs to be predicted can be obtained by the following equation (13) if the array storing the block distortion amounts Bp of the past five pictures is ArrayBp [N] (N = 0 to 4).
Bs = (C wb0 × ArrayBp [0] + C wb1 × ArrayBp [1] + C wp2 × ArrayBp [2] + C wb3 × ArrayBp [3] + C wp4 × ArrayBp [4]) / (C wb0 + C wb1 + C wb2 + C wb3 + C wb4 )… (13)
However, C wb0 to C wb4 are predetermined weighting coefficients, and C wb0 = 4 and C wb1 to C wb4 = 1.

次にシーン画質重要度Siの予測は、シーン分割部1001のシーン分割方法に準ずれば良い。すなわち、シーン画質重要度Siを四捨五入したシーン画質重要度クラスCsが同じピクチャ同士をシーンとして分割するので、シーンのシーン画質重要度Siは対応するシーン画質重要度クラスCsとすれば良い。   Next, the prediction of the scene image quality importance Si may be performed in accordance with the scene dividing method of the scene dividing unit 1001. That is, since the scene image importance class Cs obtained by rounding off the scene image importance Si is divided into scenes having the same scene image importance class Cs, the scene image importance Si of the scene may be set to the corresponding scene image importance class Cs.

次にシーン目標符号量Rsの算出方法について図14を用いて説明する。   Next, a method for calculating the scene target code amount Rs will be described with reference to FIG.

まず、ステップS1400において、予測したブロック歪み量Bsが予め定めた定数Bminより小さいか否かを判定する。更に、ステップS1401において、予測したシーン画質重要度クラスCsが、予め定めた定数CSminより小さいか否かを判定する。2つの判定結果が真(Yes)である場合には、CBR符号量Rcbrから予測したシーン画質重要度クラスCs及びブロック歪み量Bsに応じて減少させた符号量をシーン目標符号量Rsとする。   First, in step S1400, it is determined whether the predicted block distortion amount Bs is smaller than a predetermined constant Bmin. In step S1401, it is determined whether the predicted scene image quality importance class Cs is smaller than a predetermined constant CSmin. When the two determination results are true (Yes), the code amount reduced according to the scene image quality importance class Cs and the block distortion amount Bs predicted from the CBR code amount Rcbr is set as the scene target code amount Rs.

一方、ステップS1402において予測したブロック歪み量Bsが予め定めた定数Bminより大きい場合には、ステップS1403において、直前シーンを符号化した結果得られた目標ビットレートTsに対する余剰符号量に相当するRrが0より大きい場合には、CBR符号量Rcbrに対して符号量を増加させてシーン目標符号量Rrとする。   On the other hand, if the block distortion amount Bs predicted in step S1402 is larger than a predetermined constant Bmin, Rr corresponding to the surplus code amount for the target bit rate Ts obtained as a result of encoding the immediately preceding scene in step S1403. When it is larger than 0, the code amount is increased with respect to the CBR code amount Rcbr to obtain the scene target code amount Rr.

なお、ステップS1406中のγ及びステップS1404中のθは予め定めた定数である。   Note that γ in step S1406 and θ in step S1404 are predetermined constants.

最後に第2のピクチャ目標符号量算出部段の処理について説明する。シーン目標符号量Rsを入力として、符号化部105に対してピクチャ目標符号量Rpを出力する。第2の実施形態においては、ピクチャ目標符号量Rpを算出する処理は従来技術を用いる事で実現する事が可能であり、例えば前記TM5アルゴリズムを用いる事によって次の様に実現する。   Finally, the processing of the second picture target code amount calculation unit will be described. With the scene target code amount Rs as an input, the picture target code amount Rp is output to the encoding unit 105. In the second embodiment, the process of calculating the picture target code amount Rp can be realized by using a conventional technique, and for example, realized by using the TM5 algorithm as follows.

I、P及びBピクチャ毎に、符号化部105における符号化結果からピクチャの複雑度Xi、Xp及びXb(それぞれI,P,Bピクチャに対応する)を次式で求める。
i=RAi×Qi
p=RAp×Qp
b=RAb×Qb …(14)
ただし、RAi,RAp,RAbはそれぞれI,P及びBピクチャを符号化した結果得られる符号量を示し、Qi,Qp及びQbは、それぞれI,P及びBピクチャ内のすべてのマクロブロックに対するQスケールの平均値である。式(14)から、次式(15)を用いて、I,P及びBピクチャそれぞれについてピクチャ目標符号量Ti、Tp及びTbを求めて、符号化部5で符号化するピクチャタイプに応じて、ピクチャ目標符号量Ti,Tp,Tbから選択し、符号化部に出力する。
For each of the I, P, and B pictures, the picture complexity X i , X p, and X b (corresponding to the I, P, and B pictures, respectively) are obtained from the encoding result in the encoding unit 105 using the following equations.
X i = RA i × Q i
X p = RA p × Q p
X b = RA b × Q b (14)
However, RA i , RA p , and RA b indicate code amounts obtained as a result of encoding the I, P, and B pictures, respectively, and Q i , Q p, and Q b are all in the I, P, and B pictures, respectively. The average value of the Q scale for the macroblocks. From the equation (14), using the following equation (15), the picture target code amounts T i , T p and T b are obtained for each of the I, P and B pictures, and the picture type to be encoded by the encoding unit 5 is obtained. Accordingly, the picture target code amounts T i , T p and T b are selected and output to the encoding unit.

Figure 2009094645
ただし、Kp=1.0、Kb=1.4である。
Figure 2009094645
However, Kp = 1.0 and Kb = 1.4.

[第3の実施形態]
図15は、第3の実施形態における動画像符号化装置のブロック構成図である。図15の動画像符号化装置は、第2の実施形態の動画像符号化装置に対して、新たに撮像制御情報算出部1500及び動き情報算出部1501が追加されたものでもある。ここで、先ず、撮像制御情報算出部1500が算出する撮像制御情報(AE情報Pae、AF情報Paf)について説明する。
[Third Embodiment]
FIG. 15 is a block diagram of a moving picture encoding apparatus according to the third embodiment. The moving picture coding apparatus in FIG. 15 is a moving picture coding apparatus according to the second embodiment in which an imaging control information calculation unit 1500 and a motion information calculation unit 1501 are newly added. Here, first, imaging control information (AE information Pae , AF information Paf ) calculated by the imaging control information calculation unit 1500 will be described.

・撮影制御情報:AE情報Pae
これは、図示しない被写体から撮像し、本第3の実施形態の動画像符号化装置に対して入力ピクチャを与える、撮像手段の露出及びシャッタースピードを調整するための情報である。撮像制御情報算出部1500は、入力ピクチャの輝度(Y)を用いて算出する事によってAE情報Paeを得る。ここで、AE情報Paeは、撮像制御情報算出部1500において、入力ピクチャが露出オーバー或いは露出アンダーである状況下であると判断した場合にはPae>0であり、露出オーバー及びアンダーの度合いが数値として表される。Paeの値が大きければ露出オーバー及びアンダーが激しい状況である事を示す。それ以外はPae=0を、ピクチャ画質重要度算出部102に出力する。
-Shooting control information: AE information Pae
This is information for adjusting the exposure and shutter speed of the image pickup means that picks up an image from a subject (not shown) and gives an input picture to the moving picture coding apparatus of the third embodiment. The imaging control information calculation unit 1500 obtains AE information P ae by calculating using the luminance (Y) of the input picture. Here, the AE information P ae is P ae > 0 when the imaging control information calculation unit 1500 determines that the input picture is underexposed or underexposed, and the degree of overexposure and underexposure. Is expressed as a number. It indicates that if the value of P ae is greater exposure over and under is a violent situation. Otherwise, P ae = 0 is output to the picture quality importance calculator 102.

・撮影制御情報:AF情報Paf
図示しない撮像手段のレンズ位置を制御する事によって焦点距離を調整するための情報である。撮像制御情報算出部1500においては、入力ピクチャの輝度(Y)を用いて算出する事によってAF情報Pafを得る。撮像制御情報算出部1500において、入力ピクチャが焦点距離を調整中のピクチャであると判断した場合には、Paf=1であり、それ以外はPaf=0をピクチャ画質重要度算出部102に出力する。
Shooting control information: AF information P af
This is information for adjusting the focal length by controlling the lens position of an imaging means (not shown). The imaging control information calculation unit 1500 obtains AF information P af by calculating using the luminance (Y) of the input picture. If the imaging control information calculation unit 1500 determines that the input picture is a picture whose focal length is being adjusted, P af = 1, otherwise P af = 0 is sent to the picture image quality importance calculation unit 102. Output.

次にピクチャ重要度算出部102の処理について説明する。第1の実施形態で示した式(6)及び式(7)の右辺に、前記AE情報Pae及びAF情報Pafを追加する事で、第1の実施形態で示したピクチャ目標符号量Rp及び第2の実施形態で示したシーケンス目標符号量Rsを同様に算出することが出来る。第1の実施形態で示した視覚感度テーブルは、重み付け係数Cw[k]及び正規化係数Cd[k](k=0〜3)であったが、kの取り得る範囲を0乃至5として、重み付け係数Cw[4]及び正規化係数Cd[4]をそれぞれ、AE情報Paeに対応する値を定義し、更に重み付け係数Cw[5]及び正規化係数Cd[5]をそれぞれ、AF情報Pafに対応する値を定義すれば良い。 Next, the processing of the picture importance calculation unit 102 will be described. The right side of equation (6) and (7) shown in the first embodiment, the AE information P ae and By adding AF information P af, picture target code amount Rp shown in the first embodiment The sequence target code amount Rs shown in the second embodiment can be calculated in the same manner. The visual sensitivity table shown in the first embodiment is the weighting coefficient Cw [k] and the normalization coefficient Cd [k] (k = 0 to 3). The weighting coefficient Cw [4] and the normalization coefficient Cd [4] are respectively defined as values corresponding to the AE information Pae , and the weighting coefficient Cw [5] and the normalization coefficient Cd [5] are respectively defined as the AF information P Define a value corresponding to af .

更に、撮像モードに応じて重み付け係数Cw[k](k=0〜5)を予め定めた複数の組み合わせから適用的に選択、変更する事も可能である。重み付け係数Cw[k](k=0〜5)の設定例を図18に示す。第2の実施形態で説明した図11で示される画質安定重視型及び画質メリハリ重視型に応じたピクチャ画質重要度クラスCpの算出方法と同時に組み合わせる事も可能である。   Furthermore, the weighting coefficient Cw [k] (k = 0 to 5) can be selected and changed from a plurality of predetermined combinations according to the imaging mode. An example of setting the weighting coefficient Cw [k] (k = 0 to 5) is shown in FIG. It is also possible to combine the picture quality importance class Cp calculation method corresponding to the image quality stability importance type and the image quality sharpness importance type shown in FIG. 11 described in the second embodiment.

以上説明したように本実施形態によれば、ブロック歪みによる画質の劣化の度合、及びピクチャの視覚的な統計情報から得られるシーンの画質重要度に従い、シーンに対する目標符号量を制御する。この結果、与えられた目標ビットレートの条件下において良好な画質の符号化動画像データを得る事が可能となる。   As described above, according to the present embodiment, the target code amount for a scene is controlled according to the degree of deterioration of image quality due to block distortion and the importance of the image quality of the scene obtained from the visual statistical information of the picture. As a result, it is possible to obtain encoded moving image data with good image quality under the condition of a given target bit rate.

また、更には、シーンの画質重要度に、撮像手段の撮像制御情報を考慮し撮影状況に応じたシーンに対する目標符号量の制御を行う事で、与えられた目標ビットレートの条件下において良好な画質の符号化動画像データを得る事が可能となる。   In addition, by controlling the target code amount for the scene according to the shooting situation in consideration of the imaging control information of the imaging means for the importance of the image quality of the scene, it is favorable under the condition of the given target bit rate. It is possible to obtain encoded moving image data with image quality.

第1の実施形態における動画像符号化装置のブロック構成図である。It is a block block diagram of the moving image encoder in 1st Embodiment. 従来の動画像符号化装置のブロック構成図である。It is a block block diagram of the conventional moving image encoder. 従来の動画像符号化装置のブロック構成図である。It is a block block diagram of the conventional moving image encoder. 符号化歪み検出部104の動作を説明するための図である。6 is a diagram for explaining the operation of a coding distortion detection unit 104. FIG. Cb−Cr座標を用いた肌色検出の原理を説明するための図である。It is a figure for demonstrating the principle of the skin color detection using a Cb-Cr coordinate. 画像をブロック分割した例を示す図である。It is a figure which shows the example which divided the image into blocks. シーンの構成を説明した図Diagram explaining the structure of the scene 第1のピクチャ目標符号量算出部の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the 1st picture target code amount calculation part. ピクチャ目標符号量の推移を示す図である。It is a figure which shows transition of the picture target code amount. 第2の実施形態における動画像符号化装置のブロック構成図である。It is a block block diagram of the moving image encoder in 2nd Embodiment. 第2の実施形態におけるピクチャ画質重要度のクラス分類の例を示す図である。It is a figure which shows the example of the class classification | category of the picture quality importance in 2nd Embodiment. ピクチャ画質重要度クラスの推移を示す図である。It is a figure which shows transition of a picture image quality importance class. シーン画質重要度クラスの推移を示す図である。It is a figure which shows transition of a scene image quality importance class. シーン目標符号量算出部の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of a scene target code amount calculation part. 第3の実施形態における動画像符号化装置のブロック構成図である。It is a block block diagram of the moving image encoder in 3rd Embodiment. 第1の実施形態における視覚感度テーブルの例を示す図である。It is a figure which shows the example of the visual sensitivity table in 1st Embodiment. 第1、第2の実施形態の符号化処理に用いる情報の対応関係を示すテーブルを示す図である。It is a figure which shows the table which shows the correspondence of the information used for the encoding process of 1st, 2nd embodiment. 第3の実施形態における重み付け係数Cwの設定のためのテーブルの例を示す図である。It is a figure which shows the example of the table for the setting of the weighting coefficient Cw in 3rd Embodiment.

Claims (9)

連続して入力されるピクチャを、目標ビットレートから定まるシーケンス目標符号量内で符号化する動画像符号化装置であって、
時間軸に並んだピクチャで構成される動画像を、予め設定された複数個のピクチャで構成されるシーンに分割する分割手段と、
与えられた量子化スケールを決定する符号化パラメータに従って、入力したピクチャを、複数画素で構成されるブロック単位に符号化し、符号化データを生成する符号化手段と、
前記符号化手段で生成されたピクチャの符号化データ量を検出する符号量検出手段と、
着目ピクチャより得られた符号化データを復号する復号手段と、
前記復号手段により復号して得られたピクチャと、符号化前のピクチャとの間の、前記ブロックの境界位置における歪み量をピクチャ歪み量として算出する歪み量算出手段と、
着目ピクチャから、当該ピクチャの符号化処理する場合の、前記ブロック境界位置の歪みに影響を与える属性の統計情報を算出する統計情報算出手段と、
前記シーケンス目標符号量、前記符号量検出手段で検出された符号化データ量、前記統計情報算出手段で算出された統計情報、及び、前記歪み量算出手段で算出されたピクチャ歪み量に基づき、着目ピクチャに後続するピクチャの符号化パラメータを生成し、前記符号化手段に設定する設定手段と
を備えることを特徴とする動画像符号化装置。
A moving image encoding apparatus that encodes continuously input pictures within a sequence target code amount determined from a target bit rate,
A dividing unit that divides a moving image composed of pictures arranged in a time axis into scenes composed of a plurality of preset pictures;
Encoding means for encoding an input picture in block units composed of a plurality of pixels and generating encoded data in accordance with an encoding parameter for determining a given quantization scale;
Code amount detection means for detecting the amount of encoded data of the picture generated by the encoding means;
Decoding means for decoding the encoded data obtained from the picture of interest;
A distortion amount calculating means for calculating a distortion amount at a boundary position of the block between a picture obtained by decoding by the decoding means and a picture before encoding as a picture distortion amount;
Statistical information calculating means for calculating statistical information of attributes that affect the distortion of the block boundary position when encoding the picture from the picture of interest;
Based on the sequence target code amount, the encoded data amount detected by the code amount detection unit, the statistical information calculated by the statistical information calculation unit, and the picture distortion amount calculated by the distortion amount calculation unit A moving picture coding apparatus comprising: setting means for generating coding parameters for a picture following the picture and setting the coding parameters in the coding means.
前記統計情報算出手段は、前記ブロック毎の、肌色であるか否かを示す情報、彩度情報、輝度情報、輝度の分散を示す情報を算出し、更に、算出した各情報からピクチャ全体に対するピクチャ重要度を示す情報を算出することを特徴とする請求項1に記載の動画像符号化装置。   The statistical information calculation means calculates information indicating whether the color is a skin color, saturation information, luminance information, and information indicating luminance dispersion for each block, and further calculates a picture for the entire picture from each calculated information. The moving image encoding apparatus according to claim 1, wherein information indicating importance is calculated. 前記設定手段は、
着目シーンの先頭ピクチャについては、着目シーンよりも前のシーンを構成する各ピクチャのブロック歪み量の平均値及びピクチャ重要度を用いて、前記符号化パラメータを決定し、
着目シーンの2番目以降のピクチャについては、予め設定されたシーン目標符号量と、着目シーン内の既に符号化されたピクチャの符号化データ量と、着目シーンの未符号化のピクチャ数に基づき、前記符号化パラメータを決定する
ことを特徴とする請求項2に記載の動画像符号化装置。
The setting means includes
For the first picture of the scene of interest, the encoding parameter is determined using the average value of the block distortion amount and the picture importance of each picture constituting the scene before the scene of interest,
For the second and subsequent pictures of the target scene, based on the preset scene target code amount, the encoded data amount of the already encoded picture in the target scene, and the number of unencoded pictures of the target scene, The moving picture coding apparatus according to claim 2, wherein the coding parameter is determined.
連続して入力されるピクチャを、目標ビットレートから定まるシーケンス目標符号量内で符号化する動画像符号化装置の制御方法であって、
時間軸に並んだピクチャで構成される動画像を、予め設定された複数個のピクチャで構成されるシーンに分割する分割工程と、
与えられた量子化スケールを決定する符号化パラメータに従って、入力したピクチャを、複数画素で構成されるブロック単位に符号化し、符号化データを生成する符号化工程と、
前記符号化工程で生成されたピクチャの符号化データ量を検出する符号量検出工程と、
着目ピクチャより得られた符号化データを復号する復号工程と、
前記復号工程により復号して得られたピクチャと、符号化前のピクチャとの間の、前記ブロックの境界位置における歪み量をピクチャ歪み量として算出する歪み量算出工程と、
着目ピクチャから、当該ピクチャの符号化処理する場合の、前記ブロック境界位置の歪みに影響を与える属性の統計情報を算出する統計情報算出工程と、
前記シーケンス目標符号量、前記符号量検出工程で検出された符号化データ量、前記統計情報算出工程で算出された統計情報、及び、前記歪み量算出工程で算出されたピクチャ歪み量に基づき、着目ピクチャに後続するピクチャの符号化パラメータを生成し、前記符号化工程に設定する設定工程と
を備えることを特徴とする動画像符号化装置の制御方法。
A method for controlling a moving image encoding apparatus that encodes continuously input pictures within a sequence target code amount determined from a target bit rate,
A dividing step of dividing a moving image composed of pictures arranged in a time axis into a scene composed of a plurality of preset pictures;
An encoding step of encoding the input picture in units of blocks composed of a plurality of pixels and generating encoded data according to an encoding parameter for determining a given quantization scale;
A code amount detection step of detecting the amount of encoded data of the picture generated in the encoding step;
A decoding step of decoding the encoded data obtained from the picture of interest;
A distortion amount calculating step of calculating, as a picture distortion amount, a distortion amount at a boundary position of the block between a picture obtained by decoding in the decoding step and a picture before encoding;
A statistical information calculating step of calculating statistical information of an attribute that affects the distortion of the block boundary position when encoding the picture from the target picture;
Based on the sequence target code amount, the encoded data amount detected in the code amount detection step, the statistical information calculated in the statistical information calculation step, and the picture distortion amount calculated in the distortion amount calculation step And a setting step of generating an encoding parameter of a picture following the picture and setting the encoding parameter in the encoding step.
連続して入力されるピクチャを、目標ビットレートから定まるシーケンス目標符号量内に符号化する動画像符号化装置であって、
与えられた量子化スケールを決定する符号化パラメータに従って、入力したピクチャを、複数画素で構成されるブロック単位に符号化し、符号化データを生成する符号化手段と、
前記符号化手段で生成された符号化データの符号量を検出する符号量検出手段と、
前記符号化手段で生成された符号化データを復号する復号手段と、
前記復号手段により復号して得られたピクチャと、符号化前のピクチャとの間の、前記ブロックの境界位置における歪み量をピクチャ歪み量として算出する歪み量算出手段と、
着目ピクチャから、当該ピクチャの符号化処理する場合の、前記ブロック境界位置の歪みに影響を与える属性の統計情報を算出する統計情報算出手段と、
該統計情報算出手段で算出した統計情報に基づき、着目ピクチャの重要度を算出し、算出した重要度を予め設定された複数の閾値と比較することで、複数のクラス値のいずれかに分類し、前記着目ピクチャ及び着目ピクチャの以前の予め設定された複数のピクチャそれぞれのクラス値の加重平均を、ピクチャ画質重要度として算出するピクチャ画質重要度算出手段と、
該ピクチャ画質重要度算出手段で算出したピクチャ画質重要度が、予め設定した上限数以下で、連続して同じである1以上のピクチャをシーンとして分割するシーン分割手段と、
前記ピクチャ画質重要度算出手段で算出された各ピクチャのピクチャ画質重要度から、前記シーンのシーン画質重要度を算出するシーン画質重要度算出手段と、
前記シーケンス目標符号量、前記符号量検出手段で検出された符号化データ量、前記歪み量算出手段で算出されたピクチャ歪み量、前記シーン画質重要度算出手段で算出されたシーン画質重要度に応じて、シーン目標符号量を算出するシーン目標符号量算出手段と、
該シーン目標符号量算出手段で算出されたシーン目標符号量に基づき、着目ピクチャに後続するピクチャの符号化パラメータを生成し、前記符号化手段に設定する設定手段と
を備えることを特徴とする動画像符号化装置。
A moving image encoding apparatus that encodes continuously input pictures within a sequence target code amount determined from a target bit rate,
Encoding means for encoding an input picture in block units composed of a plurality of pixels and generating encoded data in accordance with an encoding parameter for determining a given quantization scale;
Code amount detection means for detecting the code amount of the encoded data generated by the encoding means;
Decoding means for decoding the encoded data generated by the encoding means;
A distortion amount calculating means for calculating a distortion amount at a boundary position of the block between a picture obtained by decoding by the decoding means and a picture before encoding as a picture distortion amount;
Statistical information calculating means for calculating statistical information of attributes that affect the distortion of the block boundary position when encoding the picture from the picture of interest;
Based on the statistical information calculated by the statistical information calculation means, the importance level of the picture of interest is calculated, and the calculated importance level is compared with a plurality of preset threshold values to classify it into one of a plurality of class values. A picture quality importance calculating means for calculating a weighted average of class values of each of a plurality of previously set pictures of the current picture and the current picture as a picture quality importance;
Scene dividing means for dividing one or more pictures whose picture quality importance calculated by the picture quality importance calculating means is equal to or less than a preset upper limit and continuously the same as a scene;
Scene image quality importance calculating means for calculating the scene image quality importance of the scene from the picture image quality importance of each picture calculated by the picture image quality importance calculating means;
According to the sequence target code amount, the amount of encoded data detected by the code amount detection means, the picture distortion amount calculated by the distortion amount calculation means, and the scene image quality importance calculated by the scene image importance calculation means A scene target code amount calculating means for calculating a scene target code amount;
A moving image comprising: a setting unit configured to generate an encoding parameter of a picture subsequent to the picture of interest based on the scene target code amount calculated by the scene target code amount calculating unit, and to set the encoding parameter in the encoding unit Image encoding device.
前記統計情報算出手段は、前記ブロック毎の、肌色であるか否かを示す情報、彩度情報、輝度情報、輝度の分散を示す情報を算出し、更に、算出した各情報からピクチャ全体に対するピクチャ重要度を示す情報を算出することを特徴とする請求項5に記載の動画像符号化装置。   The statistical information calculation means calculates information indicating whether the color is a skin color, saturation information, luminance information, and information indicating luminance dispersion for each block, and further calculates a picture for the entire picture from each calculated information. 6. The moving picture coding apparatus according to claim 5, wherein information indicating importance is calculated. 更に、
撮像手段と、
撮像手段で撮像した撮像制御情報を算出する撮像制御情報算出手段とを備え、
前記ピクチャ画質重要度算出手段は、前記撮像制御情報算出手段で算出された撮像制御情報に応じてピクチャ画質重要度を算出することを特徴とする請求項5に記載の動画像符号化装置。
Furthermore,
Imaging means;
Imaging control information calculating means for calculating imaging control information imaged by the imaging means,
6. The moving picture encoding apparatus according to claim 5, wherein the picture image quality importance calculating unit calculates the picture image quality importance according to the image capture control information calculated by the image capture control information calculating unit.
前記ピクチャ画質重要度算出手段は、前記撮像手段の撮像モードに応じて、前記撮像制御情報、前記統計情報、前記歪み量の重み付けを適用的に変更して、ピクチャ画質重要度を算出することを特徴とする請求項7に記載の動画像符号化装置。   The picture quality importance calculating means calculates the picture quality importance by appropriately changing the imaging control information, the statistical information, and the weighting of the distortion amount according to the imaging mode of the imaging means. 8. The moving picture encoding apparatus according to claim 7, wherein 連続して入力されるピクチャを、目標ビットレートから定まるシーケンス目標符号量内に符号化する動画像符号化装置の制御方法であって、
与えられた量子化スケールを決定する符号化パラメータに従って、入力したピクチャを、複数画素で構成されるブロック単位に符号化し、符号化データを生成する符号化工程と、
前記符号化工程で生成された符号化データの符号量を検出する符号量検出工程と、
前記符号化工程で生成された符号化データを復号する復号工程と、
前記復号工程により復号して得られたピクチャと、符号化前のピクチャとの間の、前記ブロックの境界位置における歪み量をピクチャ歪み量として算出する歪み量算出工程と、
着目ピクチャから、当該ピクチャの符号化処理する場合の、前記ブロック境界位置の歪みに影響を与える属性の統計情報を算出する統計情報算出工程と、
該統計情報算出工程で算出した統計情報に基づき、着目ピクチャの重要度を算出し、算出した重要度を予め設定された複数の閾値と比較することで、複数のクラス値のいずれかに分類し、前記着目ピクチャ及び着目ピクチャの以前の予め設定された複数のピクチャそれぞれのクラス値の加重平均を、ピクチャ画質重要度として算出するピクチャ画質重要度算出工程と、
該ピクチャ画質重要度算出工程で算出したピクチャ画質重要度が、予め設定した上限数以下で、連続して同じである1以上のピクチャをシーンとして分割するシーン分割工程と、
前記ピクチャ画質重要度算出工程で算出された各ピクチャのピクチャ画質重要度から、前記シーンのシーン画質重要度を算出するシーン画質重要度算出工程と、
前記シーケンス目標符号量、前記符号量検出工程で検出された符号化データ量、前記歪み量算出工程で算出されたピクチャ歪み量、前記シーン画質重要度算出工程で算出されたシーン画質重要度に応じて、シーン目標符号量を算出するシーン目標符号量算出工程と、
該シーン目標符号量算出工程で算出されたシーン目標符号量に基づき、着目ピクチャに後続するピクチャの符号化パラメータを生成し、前記符号化工程に設定する設定工程と
を備えることを特徴とする動画像符号化装置の制御方法。
A method for controlling a moving picture coding apparatus for coding pictures that are continuously input within a sequence target code amount determined from a target bit rate,
An encoding step of encoding the input picture in units of blocks composed of a plurality of pixels and generating encoded data according to an encoding parameter for determining a given quantization scale;
A code amount detection step of detecting a code amount of the encoded data generated in the encoding step;
A decoding step of decoding the encoded data generated in the encoding step;
A distortion amount calculating step of calculating, as a picture distortion amount, a distortion amount at a boundary position of the block between a picture obtained by decoding in the decoding step and a picture before encoding;
A statistical information calculating step of calculating statistical information of an attribute that affects the distortion of the block boundary position when encoding the picture from the target picture;
Based on the statistical information calculated in the statistical information calculation step, the importance of the picture of interest is calculated, and the calculated importance is compared with a plurality of preset threshold values, thereby classifying it into one of a plurality of class values. A picture quality importance calculating step for calculating a weighted average of class values of each of a plurality of preset pictures before the current picture and the current picture as a picture quality importance;
A scene division step of dividing one or more pictures that have the same or lower number of picture quality importance calculated in the picture quality importance calculation step into a scene that is equal to or less than a preset upper limit number;
A scene image quality importance calculating step of calculating a scene image quality importance of the scene from the picture image quality importance of each picture calculated in the picture image quality importance calculating step;
According to the sequence target code amount, the amount of encoded data detected in the code amount detection step, the picture distortion amount calculated in the distortion amount calculation step, and the scene image quality importance calculated in the scene image importance calculation step A scene target code amount calculating step for calculating a scene target code amount;
And a setting step of generating a coding parameter of a picture following the picture of interest based on the scene target code amount calculated in the scene target code amount calculation step and setting the encoding parameter in the encoding step. A method for controlling an image coding apparatus.
JP2007261244A 2007-10-04 2007-10-04 Moving image encoding apparatus and method for controlling the same Withdrawn JP2009094645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007261244A JP2009094645A (en) 2007-10-04 2007-10-04 Moving image encoding apparatus and method for controlling the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007261244A JP2009094645A (en) 2007-10-04 2007-10-04 Moving image encoding apparatus and method for controlling the same

Publications (1)

Publication Number Publication Date
JP2009094645A true JP2009094645A (en) 2009-04-30

Family

ID=40666193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007261244A Withdrawn JP2009094645A (en) 2007-10-04 2007-10-04 Moving image encoding apparatus and method for controlling the same

Country Status (1)

Country Link
JP (1) JP2009094645A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015065517A (en) * 2013-09-24 2015-04-09 日本電信電話株式会社 Video coding parameter calculation device, video coding parameter calculation method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015065517A (en) * 2013-09-24 2015-04-09 日本電信電話株式会社 Video coding parameter calculation device, video coding parameter calculation method, and program

Similar Documents

Publication Publication Date Title
US9743089B1 (en) Moving picture coding device, moving picture coding method, and moving picture coding program, and moving picture decoding device, moving picture decoding method, and moving picture decoding program
US7023914B2 (en) Video encoding apparatus and method
JP5969389B2 (en) Object recognition video coding strategy
Meddeb et al. Region-of-interest-based rate control scheme for high-efficiency video coding
WO2014139396A1 (en) Video coding method using at least evaluated visual quality and related video coding apparatus
JP2008263529A (en) Coder, coding method, program of coding method and recording medium with program of coding method recorded thereon
KR20010043760A (en) Content-adaptive compression encoding
EP2041984A1 (en) Method and apparatus for adapting a default encoding of a digital video signal during a scene change period
JP2007013471A (en) Imaging device
US11792399B2 (en) Systems and methods for quantization of video content
JP2000350211A (en) Method and device for encoding moving picture
US9736485B2 (en) Encoding apparatus, encoding method, and image capture apparatus
JP5032936B2 (en) Video encoding apparatus and control method thereof
JP5178616B2 (en) Scene change detection device and video recording device
JP6946979B2 (en) Video coding device, video coding method, and video coding program
JP2009094645A (en) Moving image encoding apparatus and method for controlling the same
Paul et al. Pattern-based video coding with dynamic background modeling
KR100390167B1 (en) Video encoding method and video encoding apparatus
JP2005005862A (en) Picture coding device
JP6871147B2 (en) Image generator, image generation method and image generation program
US10034011B2 (en) Video coding apparatus
JP2007081744A (en) Device and method for encoding moving image
JP2007020216A (en) Encoding apparatus, encoding method, filtering apparatus and filtering method
JP2021118404A (en) Imaging device and control method thereof, and program
Cai Video Coding Strategies for Machine Comprehension

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20101207