[go: up one dir, main page]

JP2008124937A - Image encoding apparatus - Google Patents

Image encoding apparatus Download PDF

Info

Publication number
JP2008124937A
JP2008124937A JP2006308386A JP2006308386A JP2008124937A JP 2008124937 A JP2008124937 A JP 2008124937A JP 2006308386 A JP2006308386 A JP 2006308386A JP 2006308386 A JP2006308386 A JP 2006308386A JP 2008124937 A JP2008124937 A JP 2008124937A
Authority
JP
Japan
Prior art keywords
encoding
frame
image
image data
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006308386A
Other languages
Japanese (ja)
Other versions
JP4934411B2 (en
JP2008124937A5 (en
Inventor
Tadashi Kaneko
金子  唯史
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 JP2006308386A priority Critical patent/JP4934411B2/en
Publication of JP2008124937A publication Critical patent/JP2008124937A/en
Publication of JP2008124937A5 publication Critical patent/JP2008124937A5/ja
Application granted granted Critical
Publication of JP4934411B2 publication Critical patent/JP4934411B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

【課題】符号化開始直後の最初の画像に対して適切な目標符号量を決定することにより、安定した画質で符号化を行う画像符号化装置を提供することを課題とする。
【解決手段】入力された動画像データを複数フレーム記憶するフレームメモリ(101)と、前記フレームメモリ内の動画像データを符号化する符号化器(102)と、画面複雑度を演算する演算器(103)とを有し、前記符号化器は、符号化開始直後において符号化対象である動画像データの一部を前記フレームメモリから読み出して仮符号化し、前記演算器は、前記仮符号化の結果を基に画面複雑度を演算し、前記符号化器は、前記画面複雑度を基に前記動画像データを本符号化することを特徴とする画像符号化装置が提供される。
【選択図】図1
An object of the present invention is to provide an image encoding apparatus that performs encoding with stable image quality by determining an appropriate target code amount for the first image immediately after the start of encoding.
A frame memory (101) for storing a plurality of frames of input moving image data, an encoder (102) for encoding moving image data in the frame memory, and an arithmetic unit for calculating screen complexity (103), and the encoder reads out a part of the moving image data to be encoded immediately after the start of encoding from the frame memory and temporarily encodes the arithmetic unit, Based on the result, the image complexity is calculated, and the encoder encodes the moving image data based on the image complexity to provide an image encoding device.
[Selection] Figure 1

Description

本発明は、画像符号化装置に関するものである。   The present invention relates to an image encoding device.

画像の圧縮符号化の方式としてMPEG方式が広く知られている。MPEG方式は動き補償予測符号化とDCTにより、画像を圧縮符号化する高能率符号化方式である。画像は、フレーム内符号を行うIピクチャ、前方予測符号を行うPピクチャ、双方向予測を行うBピクチャで構成され、GOPと呼ばれる15フレーム前後でグループ化されている。   The MPEG system is widely known as an image compression encoding system. The MPEG system is a high-efficiency encoding system that compresses and encodes an image by motion compensation predictive encoding and DCT. An image is composed of an I picture that performs intra-frame code, a P picture that performs forward prediction code, and a B picture that performs bidirectional prediction, and is grouped around 15 frames called GOP.

MPEG方式では画像の絵柄によって発生する符号量が大きく異なる。精細で複雑な絵柄の画像は発生する符号量が多く、平坦で単純な絵柄の画像は発生する符号量が少ない。そのため、発生する符号量を一定に保つために符号量制御が行われている。符号量制御の代表的な方式としてTM(Test Model)がある。この方式は、1GOP単位でほぼ同じ符号量になるように以下のように制御を行う。   In the MPEG system, the amount of code generated varies greatly depending on the picture pattern. A fine and complex picture image generates a large amount of code, and a flat and simple pattern image generates a small amount of code. Therefore, code amount control is performed to keep the generated code amount constant. There is TM (Test Model) as a typical method of code amount control. In this method, control is performed as follows so that the code amount is almost the same in units of 1 GOP.

目標ビットレートをBitRate、1秒当たりのフレーム数をPictureRate、1GOPのフレーム数をNとすると1GOPに割り当てられる符号量Rは次の式で与えられる。   When the target bit rate is BitRate, the number of frames per second is PictureRate, and the number of GOP frames is N, the code amount R allocated to 1 GOP is given by the following equation.

R=(BitRate/PictureRate)* N (式1)     R = (BitRate / PictureRate) * N (Formula 1)

式1で求められた1GOPの符号量Rを1GOP内のピクチャ毎に配分を行う。各ピクチャへの配分は符号化を行うフレーム毎に、次のようにして行われる。まず、Iピクチャ、Pピクチャ、Bピクチャの画面複雑度を、既に符号化された同タイプのピクチャの発生符号量と平均量子化スケールの積により求め、Xi、Xp、Xbとする。次にGOP内の符号化していないPピクチャ、Bピクチャのフレーム数をNp、Nbとし、Iピクチャに対するPピクチャ、Bピクチャの量子化スケールの設定比率をそれぞれKp、Kbとする。各ピクチャの目標符号量Ti、Tp、Tbは次の式で求められる。max[a,b]はaとbのいずれか大きい方を選択する処理を示す。   The code amount R of 1 GOP obtained by Expression 1 is distributed for each picture in 1 GOP. Distribution to each picture is performed as follows for each frame to be encoded. First, the screen complexity of an I picture, a P picture, and a B picture is obtained from the product of the generated code amount of an already encoded picture of the same type and the average quantization scale, and is set as Xi, Xp, and Xb. Next, the number of unencoded P and B pictures in the GOP is set to Np and Nb, and the quantization scale setting ratios of the P and B pictures for the I picture are set to Kp and Kb, respectively. Target code amounts Ti, Tp, and Tb of each picture are obtained by the following equations. max [a, b] indicates a process of selecting a larger one of a and b.

Ti = max[ R/[ 1 + Np*Xp/(Xi*Kp) + Nb*Xb/(Xi*Kb)], Bitrate/(8*PictureRate)] (式2)
Tp = max[ R/[ Np + Nb*Kp*Xb/(Xp*Kb)], Bitrate/(8*PictureRate)] (式3)
Tb = max[ R/[ Nb + Np*Kb*Xp/(Xb*Kp)], Bitrate/(8*PictureRate)] (式4)
Ti = max [R / [1 + Np * Xp / (Xi * Kp) + Nb * Xb / (Xi * Kb)], Bitrate / (8 * PictureRate)] (Formula 2)
Tp = max [R / [Np + Nb * Kp * Xb / (Xp * Kb)], Bitrate / (8 * PictureRate)] (Formula 3)
Tb = max [R / [Nb + Np * Kb * Xp / (Xb * Kp)], Bitrate / (8 * PictureRate)] (Formula 4)

なお、符号量Rは1フレームの符号化が終了する毎に、そのフレームで実際に発生した発生符号量を減算し、1GOPの符号化を開始する毎に、式1の値を加算する。   The code amount R is subtracted from the generated code amount actually generated in one frame every time encoding of one frame is completed, and the value of Expression 1 is added every time encoding of 1 GOP is started.

このようにしてピクチャの目標符号量が決定されると、16画素×16画素のマクロブロック単位での符号量制御が行われる。マクロブロック単位での符号量制御はマクロブロック毎に発生した符号量によって量子化スケールを調整し、目標符号量に近づくように行われる。このような符号化装置は特許文献1に開示されている。   When the target code amount of the picture is determined in this way, the code amount control is performed in units of macroblocks of 16 pixels × 16 pixels. Code amount control in units of macroblocks is performed so that the quantization scale is adjusted according to the code amount generated for each macroblock and approaches the target code amount. Such an encoding apparatus is disclosed in Patent Document 1.

特開平10−164577号公報Japanese Patent Laid-Open No. 10-164577

上記、従来の方式ではピクチャ毎の画面複雑度Xi、Xp、Xbの算出に過去の符号化の発
生符号量と平均量子化スケールを用いているが、符号化開始直後の最初(先頭)の画像においては過去に符号化された画像がないため、ディフォルトの画面複雑度を用いる必要がある。そのため、実際の複雑度がディフォルト値と異なっていた場合、適切な符号量割り当てにならないため、フレームによって画質がよくなったり、悪くなったりする現象が数フレーム間連続して発生するという問題があった。
In the conventional method described above, the code amount generated in the past and the average quantization scale are used to calculate the screen complexity Xi, Xp, and Xb for each picture, but the first (first) image immediately after the start of encoding is used. Since there is no image encoded in the past, it is necessary to use the default screen complexity. For this reason, when the actual complexity is different from the default value, appropriate code amount allocation is not possible, and there is a problem that the image quality may be improved or deteriorated continuously for several frames depending on the frame. It was.

本発明はこのような状況に鑑みてなされたものであり、符号化開始直後の最初の画像に対して適切な目標符号量を決定することにより、安定した画質で符号化を行う画像符号化装置を提供することを目的とする。   The present invention has been made in view of such a situation, and an image encoding apparatus that performs encoding with stable image quality by determining an appropriate target code amount for the first image immediately after the start of encoding. The purpose is to provide.

本発明の画像符号化装置は、入力された動画像データを複数フレーム記憶するフレームメモリと、前記フレームメモリ内の動画像データを符号化する符号化器と、画面複雑度を演算する演算器とを有し、前記符号化器は、符号化開始直後において符号化対象である動画像データの一部を前記フレームメモリから読み出して仮符号化し、前記演算器は、前記仮符号化の結果を基に画面複雑度を演算し、前記符号化器は、前記画面複雑度を基に前記動画像データを本符号化することを特徴とする。   An image encoding device of the present invention includes a frame memory that stores a plurality of frames of input moving image data, an encoder that encodes moving image data in the frame memory, and an arithmetic unit that calculates screen complexity. The encoder reads a part of moving image data to be encoded immediately after the start of encoding from the frame memory and temporarily encodes the arithmetic unit, and the arithmetic unit is based on the result of the temporary encoding. Then, the screen complexity is calculated, and the encoder performs the main encoding of the moving image data based on the screen complexity.

画像データの仮符号化の結果を基に画面複雑度を演算し、これによって本符号化の符号量割り当て及び目標符号量を得ることができる。そのため、符号開始直後から安定した画質での符号化が可能となる。   The screen complexity is calculated based on the result of provisional encoding of the image data, whereby the code amount allocation and the target code amount of the main encoding can be obtained. For this reason, encoding with stable image quality is possible immediately after the start of encoding.

図1は、本発明の実施形態による画像符号化装置の構成例を示す。同図において、101は入力される動画像データを複数フレーム記憶可能な領域をもつフレームメモリであり、書き込み及び読み出しがそれぞれ別々に任意のフレーム領域に対して行えるよう構成されている。フレームメモリ101は、符号化処理の前段でフレームの並べ替えをするために複数フレームの入力画像を記憶する役割を担っている。   FIG. 1 shows a configuration example of an image encoding apparatus according to an embodiment of the present invention. In the figure, reference numeral 101 denotes a frame memory having an area capable of storing a plurality of frames of input moving image data, and is configured such that writing and reading can be performed separately for an arbitrary frame area. The frame memory 101 has a role of storing input images of a plurality of frames in order to rearrange the frames at the preceding stage of the encoding process.

102はMPEG(Moving Picture Experts Group)エンコーダであり、1ピクチャごとに任意のピクチャタイプで動画像データの符号化処理を行う。MPEGエンコーダ(符号化器)102は、フレームメモリ101内の動画像データをフレーム単位で順次MPEG方式により符号化する。   Reference numeral 102 denotes an MPEG (Moving Picture Experts Group) encoder, which encodes moving image data with an arbitrary picture type for each picture. An MPEG encoder (encoder) 102 sequentially encodes moving image data in the frame memory 101 in units of frames by the MPEG method.

103はフレームメモリ101とMPEGエンコーダ102を制御するコントローラである。コントローラ103は1フレームごとにフレームメモリ101に対し、書き込みフレーム番号を指示し入力される画像データがどのフレーム領域に書かれるかを制御する。また、コントローラ(演算器)103は、画面複雑度を演算する。   A controller 103 controls the frame memory 101 and the MPEG encoder 102. The controller 103 instructs a frame number for writing to the frame memory 101 for each frame and controls in which frame area the inputted image data is written. The controller (calculator) 103 calculates the screen complexity.

またコントローラ103は、1フレームごとにフレームメモリ101に対し、読み出しフレーム番号を指示し、MPEGエンコーダ102への画像データの読み出しをどのフレーム領域から行うかを制御する。   In addition, the controller 103 instructs the frame memory 101 for a frame number for each frame, and controls which frame area the image data is read from the MPEG encoder 102 from.

また、コントローラ103は、1フレームごとにMPEGエンコーダ102に対してピクチャタイプや目標符号量など符号化に必要なパラメータの設定を行い、さらにエンコードの開始、停止を指示する。   Further, the controller 103 sets parameters necessary for encoding such as a picture type and a target code amount for the MPEG encoder 102 for each frame, and further instructs start and stop of encoding.

このように構成した本画像符号化装置による画像符号化方法の処理を図2のタイミング図及び図3のフローチャートを用いて説明する。図2はMPEGエンコーダ102の符号化シーケンスを示しているとも表現できる。図2において、横軸は時間軸であり、1区間は画像フレームの1フレーム期間をあらわしている、またT0からT11はそれぞれのフレーム期間を示している。F0からF8は入力される動画像データのフレームを表している。F0は符号化開始の最初の第1の画像フレームであり、F1は第2の画像フレームである。また、本実施形態では1GOPは9フレームとし、符号化ピクチャタイプは表示順で「BBIBBPBBP」であり、符号化順は「IBBPBBPBB」である。なお、表示順で最初の2枚のBピクチャの予測方向は後方のみとしている。表示順で最初の2枚のBピクチャとは、F0及びF1に相当する。図中、矢印は画像データが書き込まれた期間と、読み出される期間を結ぶように書かれてあり、画像フレームの流れを示している。矢印の破線は仮符号化時のデータの流れであり、実線は、本符号化時のデータの流れを示している。なお、説明の便宜上1GOPを9フレームとしたが、1GOPが15フレーム、或いはその他のフレーム数であっても同様に実現できる。   The processing of the image coding method by the image coding apparatus configured as described above will be described with reference to the timing chart of FIG. 2 and the flowchart of FIG. FIG. 2 can also be expressed as showing an encoding sequence of the MPEG encoder 102. In FIG. 2, the horizontal axis is a time axis, one section represents one frame period of an image frame, and T0 to T11 represent respective frame periods. F0 to F8 represent frames of input moving image data. F0 is the first first image frame at the start of encoding, and F1 is the second image frame. In the present embodiment, 1 GOP is 9 frames, the encoded picture type is “BBIBBPBBP” in display order, and the encoding order is “IBBPBBPBB”. Note that the prediction direction of the first two B pictures in the display order is only backward. The first two B pictures in the display order correspond to F0 and F1. In the figure, the arrows are written so as to connect the period in which the image data is written and the period in which the data is read, and indicate the flow of the image frame. A broken line with an arrow indicates a data flow at the time of temporary encoding, and a solid line indicates a data flow at the time of main encoding. For convenience of explanation, 1 GOP is set to 9 frames, but the same can be realized even if 1 GOP is 15 frames or the number of other frames.

コントローラ103によって符号化の開始が命令されると、T0からT2の期間で、画面複雑度Xi、Xp、Xbを求めるために、以下のようにして、MPEGエンコーダ102は、仮符号化を行う(S301)。すなわち、MPEGエンコーダ102は、符号化開始直後の2ピクチャ(2フレーム)分の画像データをフレームメモリ101から読み出してIピクチャ及びPピクチャで仮符号化する。ここで、Iピクチャはフレーム内符号化によって生成されるピクチャであり、Pピクチャはフレーム間予測符号化の1つである前方予測符号化によって生成されるピクチャである。   When the controller 103 commands the start of encoding, the MPEG encoder 102 performs provisional encoding in the following manner to obtain the screen complexity Xi, Xp, and Xb in the period from T0 to T2 ( S301). That is, the MPEG encoder 102 reads out image data for two pictures (two frames) immediately after the start of encoding from the frame memory 101, and temporarily encodes the data with an I picture and a P picture. Here, the I picture is a picture generated by intraframe encoding, and the P picture is a picture generated by forward predictive encoding, which is one of interframe predictive encoding.

まず、期間T0においては、コントローラ103は、符号化対象として入力される動画像データのうち、符号化開始直後の1番目の画像フレームF0をフレームメモリ101のフレーム領域0に書き込む。ここではMPEGエンコーダ102は動作しない。   First, in the period T0, the controller 103 writes the first image frame F0 immediately after the start of encoding in the moving image data input as the encoding target in the frame area 0 of the frame memory 101. Here, the MPEG encoder 102 does not operate.

次に、期間T1において、コントローラ103は、符号化対象として入力される動画像データのうち、符号化開始直後の2番目の画像フレームF1をフレームメモリ101のフレーム領域1に書き込む。それと同時に、コントローラ103はフレームメモリ101のフレーム領域0から画像フレームF0を読み出し、MPEGエンコーダ102はその画像フレームF0の画像データについてIピクチャによる仮符号化を行う(S301)。この仮符号化での目標符号量はディフォルト値が用いられる。仮符号化されたときの符号化データは実際には出力されず、MPEGエンコーダ102は発生符号量と平均量子化スケール値をコントローラ103に出力する。コントローラ103は、発生符号量と平均量子化スケール値の積により、Iピクチャの画面複雑度Xiを演算する(S302)。   Next, in the period T1, the controller 103 writes the second image frame F1 immediately after the start of encoding among the moving image data input as the encoding target in the frame area 1 of the frame memory 101. At the same time, the controller 103 reads the image frame F0 from the frame area 0 of the frame memory 101, and the MPEG encoder 102 performs provisional encoding with the I picture for the image data of the image frame F0 (S301). A default value is used as the target code amount in the provisional encoding. The encoded data at the time of provisional encoding is not actually output, and the MPEG encoder 102 outputs the generated code amount and the average quantization scale value to the controller 103. The controller 103 calculates the screen complexity Xi of the I picture by the product of the generated code amount and the average quantization scale value (S302).

次に、期間T2において、コントローラ103は、画像フレームF2をフレームメモリ101のフレーム領域2に書き込む。それと同時に、コントローラ103はフレームメモリ101のフレーム領域1から画像フレームF1を読み出し、MPEGエンコーダ102はその画像フレームF1の画像データについてPピクチャの仮符号化を行う(S301)。ここでの目標符号量はディフォルト値が用いられる。また、フレーム間予測のための参照画像は先に仮符号化された前記フレームF0のIピクチャのローカルデコード画像を用いる。仮符号化されたときの符号化データは実際は出力されず、MPEGエンコーダ102は発生符号量の値と平均量子化スケール値をコントローラ103に出力する。   Next, in the period T2, the controller 103 writes the image frame F2 in the frame area 2 of the frame memory 101. At the same time, the controller 103 reads the image frame F1 from the frame area 1 of the frame memory 101, and the MPEG encoder 102 performs provisional encoding of a P picture on the image data of the image frame F1 (S301). A default value is used as the target code amount here. In addition, as a reference image for inter-frame prediction, a local decoded image of the I picture of the frame F0 previously provisionally encoded is used. The encoded data at the time of provisional encoding is not actually output, and the MPEG encoder 102 outputs the generated code amount value and the average quantization scale value to the controller 103.

コントローラ103は、発生符号量と平均量子化スケール値の積により、Pピクチャの画面複雑度Xpを演算する(S302)。Bピクチャ(双方向予測符号化)の画面複雑度Xbは、Pピクチャの画面複雑度Xpに所定の係数Kpbを乗じて算出する。Bピクチャの画面複雑度Xbは、Pピクチャの画面複雑度Xpの約0.4〜0.7倍であることから、係数Kpbは0.5程度が望ましい。   The controller 103 calculates the screen complexity Xp of the P picture by the product of the generated code amount and the average quantization scale value (S302). The screen complexity Xb of a B picture (bidirectional predictive coding) is calculated by multiplying the screen complexity Xp of a P picture by a predetermined coefficient Kpb. Since the screen complexity Xb of the B picture is about 0.4 to 0.7 times the screen complexity Xp of the P picture, the coefficient Kpb is preferably about 0.5.

このように、コントローラ103は、Iピクチャによる仮符号化の結果を基にIピクチャの画面複雑度Xiを演算し、Pピクチャによる仮符号化の結果を基にPピクチャの画面複雑度Xp及びBピクチャの画面複雑度Xbを演算する。   As described above, the controller 103 calculates the screen complexity Xi of the I picture based on the result of provisional encoding with the I picture, and the screen complexity Xp and B of the P picture based on the result of provisional encoding with the P picture. Calculate the screen complexity Xb of the picture.

ここまでの処理によって、画像フレームF0、F1から画面複雑度Xi、Xp、Xbが得られ、この後に行われる本符号化の目標符号量算出に用いられる。   Through the processing so far, the screen complexity Xi, Xp, and Xb are obtained from the image frames F0 and F1, and are used for calculation of the target code amount of the main encoding performed thereafter.

これ以降、本符号化として、通常と同様な符号化が行われる(S303)。すなわち、MPEGエンコーダ102は、画面複雑度Xi、Xp、Xbを基に目標符号量を設定して本符号化を行う。期間T3において、MPEGエンコーダ102は、フレームメモリ101に記憶された画像フレームF2の画像データをIピクチャで符号化する。そして、期間T4において、MPEGエンコーダ102は、フレームメモリ101に記憶された画像フレームF0の画像データをBピクチャで符号化する。そして、期間T5において、MPEGエンコーダ102は、フレームメモリ101に記憶された画像フレームF1の画像データをBピクチャで符号化する。そして、期間T6において、MPEGエンコーダ102は、フレームメモリ101に記憶された画像フレームF5の画像データをPピクチャで符号化する。以上のようにして、図2に示すように順次符号化が行われていく。この本符号化過程における少なくとも最初のピクチャの符号化時、或いは最初のGOP(Group Of Pictures)の符号化時の目標符号量算出において、上記仮符号化によって得られた画面複雑度Xi、Xp、Xbの各情報を利用する。   Thereafter, the same encoding as normal is performed as the main encoding (S303). That is, the MPEG encoder 102 performs the main encoding by setting a target code amount based on the screen complexity Xi, Xp, and Xb. In the period T3, the MPEG encoder 102 encodes the image data of the image frame F2 stored in the frame memory 101 with an I picture. In the period T4, the MPEG encoder 102 encodes the image data of the image frame F0 stored in the frame memory 101 with a B picture. In the period T5, the MPEG encoder 102 encodes the image data of the image frame F1 stored in the frame memory 101 with a B picture. In period T6, the MPEG encoder 102 encodes the image data of the image frame F5 stored in the frame memory 101 with a P picture. As described above, encoding is sequentially performed as shown in FIG. At the time of encoding at least the first picture in the main encoding process or the target code amount calculation at the time of encoding the first GOP (Group Of Pictures), the screen complexity Xi, Xp, Use Xb information.

以上のように、図3において、ステップS301では、MPEGエンコーダ102は、符号化開始直後において符号化対象である動画像データの一部をフレームメモリ101から読み出して仮符号化する(仮符号化ステップ)。例えば、MPEGエンコーダ102は、符号化開始直後の2フレーム分の画像データをフレームメモリ101から読み出して、一方のフレームをフレーム内予測符号化により仮符号化し、他方のフレームをフレーム間予測符号化により仮符号化する。次に、ステップS302では、コントローラ103は、前記仮符号化の結果を基に画面複雑度を演算する(演算ステップ)。次に、ステップS303では、MPEGエンコーダ102は、前記画面複雑度を基に前記動画像データを本符号化する(本符号化ステップ)。   As described above, in FIG. 3, in step S301, the MPEG encoder 102 reads part of the moving image data to be encoded immediately after the start of encoding from the frame memory 101 and temporarily encodes it (temporary encoding step). ). For example, the MPEG encoder 102 reads out image data for two frames immediately after the start of encoding from the frame memory 101, temporarily encodes one frame by intra-frame predictive encoding, and performs the other frame by inter-frame predictive encoding. Temporary encoding. Next, in step S302, the controller 103 calculates the screen complexity based on the result of the provisional encoding (calculation step). Next, in step S303, the MPEG encoder 102 performs main encoding of the moving image data based on the screen complexity (main encoding step).

従って、仮符号化によって得られた情報に応じて本符号化開始直後の目標符号量や符号量の割り当てを調整することができ、符号開始直後から安定した画質での符号化が可能となる。   Therefore, the target code amount and the code amount allocation immediately after the start of the main encoding can be adjusted according to the information obtained by the temporary encoding, and the encoding with stable image quality can be performed immediately after the start of the encoding.

本実施形態は、符号化開始直後の画質と発生符号量とを安定させるために、フレーム順入れ替えのための2フレーム分の空き時間を使って、最初の2フレームをIピクチャ、Pピクチャで仮符号化することで、画面複雑度を得、適切な符号量割り当てを可能にする。   In this embodiment, in order to stabilize the image quality immediately after the start of encoding and the amount of generated code, the first two frames are temporarily set as an I picture and a P picture using the free time for two frames for frame order change. By encoding, screen complexity is obtained and appropriate code amount allocation is enabled.

本実施形態の画像符号化装置によれば、実際の符号化対象である、画像フレームF0、F1を仮符号化して得られた発生符号量、及び平均量子化スケール値によって画面複雑度Xi、Xp、Xbを算出する。これによって適切な符号量割り当て及び目標符号量が得られるため、符号開始直後から安定した画質での符号化が可能となる。   According to the image encoding device of the present embodiment, the screen complexity Xi, Xp is determined by the generated code amount obtained by provisionally encoding the image frames F0 and F1 that are actual encoding targets, and the average quantization scale value. , Xb is calculated. As a result, an appropriate code amount allocation and a target code amount can be obtained, so that encoding with stable image quality can be performed immediately after the start of code.

また、仮符号化を行う期間T1及びT2はフレーム順番入れ替えのための空き期間であり、本実施形態を実施するにあたり、処理時間の増加やフレームメモリ領域の増加などは必要ない。   In addition, the periods T1 and T2 in which temporary encoding is performed are empty periods for changing the frame order, and it is not necessary to increase the processing time or the frame memory area when implementing this embodiment.

なお、上記実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

本発明の実施形態による画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image coding apparatus by embodiment of this invention. 本発明の実施形態による画像符号化装置の動作を示すタイミング図である。It is a timing diagram which shows operation | movement of the image coding apparatus by embodiment of this invention. 本発明の実施形態による画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the image coding apparatus by embodiment of this invention.

符号の説明Explanation of symbols

101 フレームメモリ
102 MPEGエンコーダ
103 コントローラ
101 frame memory 102 MPEG encoder 103 controller

Claims (10)

入力された動画像データを複数フレーム記憶するフレームメモリと、
前記フレームメモリ内の動画像データを符号化する符号化器と、
画面複雑度を演算する演算器とを有し、
前記符号化器は、符号化開始直後において符号化対象である動画像データの一部を前記フレームメモリから読み出して仮符号化し、
前記演算器は、前記仮符号化の結果を基に画面複雑度を演算し、
前記符号化器は、前記画面複雑度を基に前記動画像データを本符号化することを特徴とする画像符号化装置。
A frame memory for storing multiple frames of input moving image data;
An encoder for encoding moving image data in the frame memory;
An arithmetic unit for calculating the screen complexity,
The encoder reads a part of moving image data to be encoded immediately after the start of encoding from the frame memory and temporarily encodes it,
The computing unit computes screen complexity based on the result of the provisional encoding,
The image encoding device, wherein the encoder performs main encoding of the moving image data based on the screen complexity.
前記符号化器は、符号化開始直後の2フレーム分の画像データを前記フレームメモリから読み出して仮符号化することを特徴とする請求項1記載の画像符号化装置。   2. The image encoding apparatus according to claim 1, wherein the encoder reads out image data for two frames immediately after the start of encoding from the frame memory and performs temporary encoding. 前記符号化器は、符号化開始直後の1番目のフレームの画像データをフレーム内符号化により仮符号化し、符号化開始直後の2番目のフレームの画像データを前方予測符号化により仮符号化することを特徴とする請求項2記載の画像符号化装置。   The encoder temporarily encodes image data of the first frame immediately after the start of encoding by intra-frame encoding, and temporarily encodes image data of the second frame immediately after the start of encoding by forward predictive encoding. The image coding apparatus according to claim 2. 前記符号化器は、目標符号量としてディフォルト値を用いて前記仮符号化を行うことを特徴とする請求項1〜3のいずれか1項に記載の画像符号化装置。   The image encoder according to claim 1, wherein the encoder performs the provisional encoding using a default value as a target code amount. 前記演算器は、前記仮符号化による発生符号量及び平均量子化スケール値を基に前記画面複雑度を演算することを特徴とする請求項1〜4のいずれか1項に記載の画像符号化装置。   5. The image coding according to claim 1, wherein the computing unit computes the screen complexity based on a generated code amount and an average quantization scale value obtained by the provisional coding. apparatus. 前記演算器は、フレーム内符号化の画面複雑度、前方予測符号化の画面複雑度及び双方向予測符号化の画面複雑度を演算することを特徴とする請求項5記載の画像符号化装置。   6. The image coding apparatus according to claim 5, wherein the computing unit calculates a screen complexity of intra-frame coding, a screen complexity of forward predictive coding, and a screen complexity of bidirectional predictive coding. 前記符号化器は、符号化開始直後の2フレーム分の画像データを前記フレームメモリから読み出して、一方のフレームをフレーム内符号化により仮符号化し、他方のフレームをフレーム間予測符号化により仮符号化することを特徴とする請求項1記載の画像符号化装置。   The encoder reads image data for two frames immediately after the start of encoding from the frame memory, temporarily encodes one frame by intraframe encoding, and temporarily encodes the other frame by interframe predictive encoding. The image encoding apparatus according to claim 1, wherein 前記演算器は、前記フレーム内符号化による仮符号化の結果を基にフレーム内符号化の画面複雑度を演算し、前記フレーム間予測符号化による仮符号化の結果を基に前方予測符号化の画面複雑度及び双方向予測符号化の画面複雑度を演算することを特徴とする請求項7記載の画像符号化装置。   The computing unit calculates a screen complexity of intra-frame coding based on a result of provisional coding by the intra-frame coding, and forward predictive coding based on a result of provisional coding by the inter-frame prediction coding. The image encoding apparatus according to claim 7, wherein the image complexity and the screen complexity of bidirectional predictive encoding are calculated. 前記符号化器は、前記画面複雑度を基に目標符号量を設定して本符号化を行うことを特徴とする請求項1〜8のいずれか1項に記載の画像符号化装置。   The image encoding apparatus according to claim 1, wherein the encoder performs a main encoding by setting a target code amount based on the screen complexity. 前記符号化器は、MPEG方式による符号化を行うことを特徴とする請求項1〜9のいずれか1項に記載の画像符号化装置。   The image encoding apparatus according to claim 1, wherein the encoder performs encoding according to an MPEG system.
JP2006308386A 2006-11-14 2006-11-14 Image encoding device Expired - Fee Related JP4934411B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006308386A JP4934411B2 (en) 2006-11-14 2006-11-14 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006308386A JP4934411B2 (en) 2006-11-14 2006-11-14 Image encoding device

Publications (3)

Publication Number Publication Date
JP2008124937A true JP2008124937A (en) 2008-05-29
JP2008124937A5 JP2008124937A5 (en) 2010-01-07
JP4934411B2 JP4934411B2 (en) 2012-05-16

Family

ID=39509213

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006308386A Expired - Fee Related JP4934411B2 (en) 2006-11-14 2006-11-14 Image encoding device

Country Status (1)

Country Link
JP (1) JP4934411B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014200078A (en) * 2013-03-15 2014-10-23 キヤノン株式会社 Moving image encoding apparatus and method for controlling the same
CN116233447A (en) * 2023-03-02 2023-06-06 阿里巴巴(中国)有限公司 Image group size determination method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10164577A (en) * 1996-11-28 1998-06-19 Matsushita Electric Ind Co Ltd Video encoding device
JPH10308942A (en) * 1997-05-02 1998-11-17 Sony Corp Image encoding method and apparatus, recording medium, and image transmission method
JPH11341499A (en) * 1998-05-28 1999-12-10 Victor Co Of Japan Ltd Coding method for video signal
JP2004266640A (en) * 2003-03-03 2004-09-24 Nec Corp Moving image encoder, moving image encoding method, and program
JP2005176095A (en) * 2003-12-12 2005-06-30 Canon Inc Image coding apparatus and method
JP2006129153A (en) * 2004-10-29 2006-05-18 Victor Co Of Japan Ltd Moving image encoding device and moving image encoding program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10164577A (en) * 1996-11-28 1998-06-19 Matsushita Electric Ind Co Ltd Video encoding device
JPH10308942A (en) * 1997-05-02 1998-11-17 Sony Corp Image encoding method and apparatus, recording medium, and image transmission method
JPH11341499A (en) * 1998-05-28 1999-12-10 Victor Co Of Japan Ltd Coding method for video signal
JP2004266640A (en) * 2003-03-03 2004-09-24 Nec Corp Moving image encoder, moving image encoding method, and program
JP2005176095A (en) * 2003-12-12 2005-06-30 Canon Inc Image coding apparatus and method
JP2006129153A (en) * 2004-10-29 2006-05-18 Victor Co Of Japan Ltd Moving image encoding device and moving image encoding program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014200078A (en) * 2013-03-15 2014-10-23 キヤノン株式会社 Moving image encoding apparatus and method for controlling the same
US9049442B2 (en) 2013-03-15 2015-06-02 Canon Kabushiki Kaisha Moving image encoding apparatus and method for controlling the same
CN116233447A (en) * 2023-03-02 2023-06-06 阿里巴巴(中国)有限公司 Image group size determination method, electronic device and storage medium

Also Published As

Publication number Publication date
JP4934411B2 (en) 2012-05-16

Similar Documents

Publication Publication Date Title
CN103826121B (en) Scene switching detection based code rate control method in low-delay video coding
CN103686172B (en) Low latency Video coding variable bit rate bit rate control method
JP5267655B2 (en) Image coding apparatus, image coding control method, and image coding program
JP5128389B2 (en) Moving picture coding apparatus and moving picture coding method
JP3508916B2 (en) Moving image variable bit rate encoding method and apparatus
KR100588795B1 (en) Coding Device and Coding Method
JP2006135557A (en) Moving picture encoding device
JP4362795B2 (en) Video encoding apparatus and method
JP4934411B2 (en) Image encoding device
JP2008252562A (en) Moving image coding control method, and moving image coding device
JP5694674B2 (en) Image coding apparatus, image coding / decoding system, image coding method, and image display method
JP2007318617A (en) Image encoder and image encoding program
JP5871602B2 (en) Encoder
JP2001025016A (en) Moving image encoder and method therefor
JP2001025015A (en) Moving image encoder and method therefor
JP2005045736A (en) Image signal encoding method and apparatus, encoding control apparatus and program
JP3812269B2 (en) Video encoding apparatus and method
TW201338554A (en) Moving picture coding method, moving picture coding apparatus, and moving picture coding program
JP5419560B2 (en) Imaging device
KR100677128B1 (en) Apparatus and method for controlling bit rate of video encoder
US8761530B2 (en) Apparatus and method to control target code amount
JPWO2020008858A1 (en) Video coding device, video coding method, program
JP2005303576A (en) Image signal processing apparatus and method, recording medium, program, and video camera
JP4834535B2 (en) Imaging device
JP5825976B2 (en) Encoding apparatus and method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091112

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091112

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120126

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120214

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120220

R151 Written notification of patent or utility model registration

Ref document number: 4934411

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20150224

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees