JP2018101907A - Image encoder, method for controlling the same, and program - Google Patents

Image encoder, method for controlling the same, and program Download PDF

Info

Publication number
JP2018101907A
JP2018101907A JP2016247009A JP2016247009A JP2018101907A JP 2018101907 A JP2018101907 A JP 2018101907A JP 2016247009 A JP2016247009 A JP 2016247009A JP 2016247009 A JP2016247009 A JP 2016247009A JP 2018101907 A JP2018101907 A JP 2018101907A
Authority
JP
Japan
Prior art keywords
code amount
image
block
target
encoding
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
JP2016247009A
Other languages
Japanese (ja)
Other versions
JP6916618B2 (en
Inventor
大 宮内
Masaru Miyauchi
大 宮内
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 JP2016247009A priority Critical patent/JP6916618B2/en
Publication of JP2018101907A publication Critical patent/JP2018101907A/en
Application granted granted Critical
Publication of JP6916618B2 publication Critical patent/JP6916618B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To control the amount of encoding while suppressing variations in quantization parameter and maintaining image quality.SOLUTION: An image encoder comprises: a quantization part that quantizes image data of a frame of interest in moving image data in a preset block unit according to a quantization parameter determined according to a target encoding amount; an encoding part that encodes the data after quantization obtained in the quantization part in the block unit; and an encoding amount control part that controls the encoding part so that the amount of encoding performed by the encoding part becomes a set block target encoding amount. The encoding amount control part obtains the degree of correlation between an image of the frame of interest and an image of a frame immediately before the frame of interest, and sets the block target encoding amount on the basis of the degree of correlation.SELECTED DRAWING: Figure 1

Description

本発明は動画像データの符号化技術に関するものである。   The present invention relates to a moving image data encoding technique.

現在、デジタルビデオカメラ等、動画像を記録するデジタル機器が普及している。このようなデジタル機器では、所定の記録媒体に一定時間の動画像が記録できるよう、動画像データの圧縮符号化を行っている。   Currently, digital devices that record moving images, such as digital video cameras, are in widespread use. In such a digital device, moving image data is compressed and encoded so that a moving image for a predetermined time can be recorded on a predetermined recording medium.

従来の代表的な圧縮符号化方式として、H.264(H.264/ MPEG-4 Part10 : Advanced Video Coding)が知られている。このような圧縮符号化方式は、1フレーム内にて、所定画素数で構成されるブロック毎に、その動画像が有する時間冗長性と空間冗長性を利用してデータ量を圧縮するものである。   H.264 (H.264 / MPEG-4 Part 10: Advanced Video Coding) is known as a typical conventional compression coding method. Such a compression encoding method compresses the amount of data using temporal redundancy and spatial redundancy of a moving image for each block composed of a predetermined number of pixels within one frame. .

上記のH.264では、時間冗長性に対する動き検出及び動き補償、空間冗長性に対する周波数変換として離散コサイン変換(Descrete Cosine Transform;DCT) 、更に量子化やエントロピー符号化といった技術を組み合わせることで圧縮符号化を実現している。   In the above H.264, motion detection and motion compensation for temporal redundancy, discrete cosine transform (DCT) as frequency transform for spatial redundancy, and compression coding by combining techniques such as quantization and entropy coding Has been realized.

ただし、ある程度以上にまで圧縮率を上げると、DCT変換特有のブロック歪みが顕著になり画像劣化が目立つようになる。そこで、JPEG2000方式等では、周波数変換として、水平方向と垂直方向に低域フィルタリングと高域フィルタリングをそれぞれ適用することで、複数のサブバンドと呼ばれる周波数帯に分解する離散ウェーブレット変換(Discrete Wavelet Transform; DWT)を採用している。DWTを用いたサブバンド符号化は、DCTを用いた符号化技術に比べ、ブロック歪みが生じにくく、高圧縮時の圧縮特性が良いといった特徴を有する。   However, if the compression rate is increased to a certain level or more, block distortion peculiar to DCT conversion becomes remarkable and image degradation becomes conspicuous. Therefore, in JPEG2000, etc., discrete wavelet transform (Discrete Wavelet Transform; which is decomposed into frequency bands called multiple subbands by applying low-pass filtering and high-pass filtering in the horizontal and vertical directions respectively as frequency conversion. DWT) is adopted. Subband coding using DWT has characteristics such that block distortion is less likely to occur and compression characteristics at high compression are better than coding techniques using DCT.

一般的な符号量制御は、符号化が完了しているフレームの発生符号量を元に、次に符号化するフレームの目標符号量を決定する。そして、1フレームあたりの目標符号量へ発生符号量を収束させるために、量子化に利用する量子化パラメータQpを画像の所定の領域毎に変更する量子化制御を行うことで符号量の制御を行う。なお、Qpは、その値が大きい程符号量を削減することができるパラメータである一方、画質劣化の原因になるため、出来るだけ小さく、かつ画面内で一定であることが望ましい。量子化制御により、所望の符号量へ画像データを圧縮することが可能である。   In general code amount control, a target code amount of a frame to be encoded next is determined based on a generated code amount of a frame that has been encoded. In order to converge the generated code amount to the target code amount per frame, the control of the code amount is performed by performing the quantization control for changing the quantization parameter Qp used for quantization for each predetermined region of the image. Do. Note that Qp is a parameter that can reduce the amount of code as the value increases. On the other hand, Qp is preferably as small as possible and constant in the screen because it causes image quality degradation. It is possible to compress image data to a desired code amount by quantization control.

上述のように、Qpは画質の観点から画面内で一定であることが望ましい。実現するためには、画像の所定の領域毎にQpが画面内で一定になるような目標符号量を設定する必要がある。Qpが大きいほど発生符号量が小さくなる関係から、画像の中でも難しく発生符号量が出る領域の目標符号量は大きく、易しく発生符号量が出ない領域の目標符号量は小さく割り当てることで、画面内でQpを一定にすることが可能である。ただし、動画の圧縮符号化にリアルタイム性が求められるため、画像内の難易度は、1フレーム前の画像からフィードバックする必要がある。   As described above, Qp is preferably constant in the screen from the viewpoint of image quality. In order to realize this, it is necessary to set a target code amount such that Qp is constant in the screen for each predetermined region of the image. Since the generated code amount becomes smaller as Qp is larger, the target code amount in the region where the generated code amount is difficult in the image is large, and the target code amount in the region where the generated code amount is not easily generated is allocated to be small in the screen. Thus, it is possible to make Qp constant. However, since the real-time property is required for the compression encoding of the moving image, the difficulty in the image needs to be fed back from the image one frame before.

しかし、動画の圧縮符号化は、リアルタイムに行う必要がある。このため、例えば動画記録中にフラッシュが炊かれるようなシーンチェンジが起きると、シーンが変わっていない前提の設定値で符号量制御を行うことになるので、1フレーム当たりの目標符号量を大きく超えた発生符号量が出てしまう可能性がある。それ故、場合によっては記録メディアに書き込めなくなってしまう。   However, it is necessary to compress and encode moving images in real time. For this reason, for example, if a scene change occurs, such as when a flash is fired during video recording, the code amount control is performed with a set value on the assumption that the scene has not changed, so the target code amount per frame is greatly exceeded. There is a possibility that the generated code amount will be output. Therefore, in some cases, it becomes impossible to write to the recording medium.

そこで、所定の領域毎に発生符号量を積算し、発生符号量が上限値よりも大きい場合、符号量を抑制するように次の領域の量子化パラメータを変更することで、符号量制御性を向上する技術が特許文献1に記載されている。   Therefore, the amount of generated code is integrated for each predetermined area, and when the amount of generated code is larger than the upper limit, the amount of code controllability can be improved by changing the quantization parameter of the next area so as to suppress the amount of code. A technique to improve is described in Patent Document 1.

特許文献1によれば、発生符号量を所定の値以上にしないことが可能であるため、記録メディアに書き込めないような破たんを回避することができる。   According to Patent Document 1, since it is possible to prevent the generated code amount from being a predetermined value or more, it is possible to avoid the breakdown that cannot be written on the recording medium.

特許第5451487号公報Japanese Patent No. 5451487

しかしながら、特許文献1に記載された技術は、発生符号量の上限値を画像によらず一意に定めていることで、発生符号量を抑制しなくても良い画像でも、量子化パラメータを変更してしまう場合がある。   However, the technique described in Patent Document 1 uniquely determines the upper limit value of the generated code amount regardless of the image, and thus changes the quantization parameter even in an image that does not require suppression of the generated code amount. May end up.

例えば、画像の上部は極端に難しく符号量が発生し、下部は極端に易しく符号量が発生しない画像の場合を考察する。通常、符号化は画像の上部から下部に向かうラスタースキャン順に圧縮符号化を行う際ので、上記のような画像の場合、発生符号量の上限値を一意に定める場合、量子化パラメータが画像中盤から変化してしまい、画質劣化を引き起こす可能性がある。   For example, consider the case where the upper part of the image is extremely difficult and the code amount is generated, and the lower part is extremely easy and the code amount is not generated. Normally, encoding is performed when compression encoding is performed in the order of raster scanning from the top to the bottom of the image. In the case of the above image, when the upper limit value of the generated code amount is uniquely determined, the quantization parameter is set from the middle of the image. It may change and cause image quality degradation.

本発明は上記の問題点に鑑み、量子化パラメータの変動を抑えて画質を保ちつつ、符号量の制御を行う技術を提供するものである。   In view of the above problems, the present invention provides a technique for controlling the amount of code while maintaining the image quality by suppressing the fluctuation of the quantization parameter.

この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
撮像手段で撮像した動画像データを符号化する画像符号化装置であって、
前記動画像データにおける着目フレームの画像データを、予め設定されたブロック単位に、目標符号量に応じて決定される量子化パラメータに従って量子化する量子化手段と、
該量子化手段で得られた量子化後のデータを、前記ブロック単位に符号化する符号化手段と、
前記符号化手段により発生する符号量が、設定されたブロック目標符号量になるように前記符号化手段を制御する符号量制御手段とを有し、
前記符号量制御手段は、前記着目フレームの画像と直前のフレームの画像の相関度を求め、当該相関度に基づいて前記ブロック目標符号量を設定することを特徴とする。
In order to solve this problem, for example, an image encoding device of the present invention has the following configuration. That is,
An image encoding device that encodes moving image data captured by an imaging means,
Quantizing means for quantizing the image data of the frame of interest in the moving image data in a preset block unit according to a quantization parameter determined according to a target code amount;
Encoding means for encoding the quantized data obtained by the quantization means in units of the blocks;
Code amount control means for controlling the encoding means so that the code amount generated by the encoding means becomes a set block target code amount;
The code amount control means obtains the degree of correlation between the image of the frame of interest and the image of the immediately preceding frame, and sets the block target code amount based on the degree of correlation.

本発明によれば、量子化パラメータの変動を抑えて画質を保ちつつ、符号量の制御を行うことが可能となる。   According to the present invention, it is possible to control the code amount while maintaining the image quality by suppressing the variation of the quantization parameter.

第1の実施形態に係る画像符号化装置のブロック構成図。The block block diagram of the image coding apparatus which concerns on 1st Embodiment. 第1の実施形態に係る画素データの入力順を示す図。The figure which shows the input order of the pixel data which concern on 1st Embodiment. 第1の実施形態に係るシーンチェンジの動画像パターンA,Bを示す図。The figure which shows the moving image pattern A and B of the scene change which concerns on 1st Embodiment. 第1の実施形態に係るシーンチェンジ前後のライン単位目標符号量の推移の説明するための図。The figure for demonstrating transition of the line unit target code amount before and behind the scene change which concerns on 1st Embodiment. 第1の実施形態に係る符号量上限値を設定した場合のパターンAにおけるライン単位の目標符号量の推移及びQpの推移の説明するための図。The figure for demonstrating the transition of the target code amount of the line unit in the pattern A at the time of setting the code amount upper limit which concerns on 1st Embodiment, and transition of Qp. 第1の実施形態に係るパターンBにおける、符号量上限値を設定しない場合のライン単位の目標符号量の推移及びQpの推移の説明するための図。The figure for demonstrating transition of the target code amount of a line unit in case the code amount upper limit is not set in the pattern B which concerns on 1st Embodiment, and transition of Qp. 第1の実施形態に係るパターンBにおける、符号量上限値を設定した場合のライン単位の目標符号量の推移及びQpの推移の説明するための図。The figure for demonstrating transition of the target code amount of a line unit at the time of setting the code amount upper limit in the pattern B which concerns on 1st Embodiment, and transition of Qp. 第1の実施形態に係るブロック目標符号量変更部の処理フローチャート。The processing flowchart of the block target code amount change part which concerns on 1st Embodiment. 第1の実施形態に係る画像相関度に応じた符号量上限値の傾きの違いを説明するための図。The figure for demonstrating the difference in the inclination of the code amount upper limit according to the image correlation degree which concerns on 1st Embodiment. 第1の実施形態に係る効果を説明する動画パターンを示す図。The figure which shows the moving image pattern explaining the effect which concerns on 1st Embodiment. 第1の実施形態に係る図10の動画パターンにおけるフレーム毎のライン単位の目標符号量の推移及びQpの推移の説明するための図。FIG. 11 is a diagram for explaining a transition of a target code amount in units of lines and a transition of Qp for each frame in the moving image pattern of FIG. 10 according to the first embodiment. 第2の実施形態に係る画像符号化装置のブロック構成図。The block block diagram of the image coding apparatus which concerns on 2nd Embodiment. 第2の実施形態に係る離散ウェーブレット変換を水平、垂直それぞれ三回施したサブバンド形成の説明するための図。The figure for demonstrating the subband formation which performed discrete wavelet transformation which concerns on 2nd Embodiment 3 times each horizontally and vertically. 第3の実施形態に係る画像符号化装置のブロック構成図。The block block diagram of the image coding apparatus which concerns on 3rd Embodiment. 第5の実施形態に係る画像符号化装置のブロック構成図。The block block diagram of the image coding apparatus which concerns on 5th Embodiment. 離散ウェーブレット変換を3回施した場合の各サブバンドの離散ウェーブレット変換前の画像に対する同一画素位置の関係を示す図。The figure which shows the relationship of the same pixel position with respect to the image before discrete wavelet transformation of each subband at the time of performing discrete wavelet transformation 3 times.

以下図面を参照しながら本発明の好適な実施の形態を説明する。なお、実施形態で説明する画像符号化装置は、デジタルビデオカメラに代表される撮像装置に搭載されるものとして説明する。従って、符号化対象は、撮像部が所定のフレームレートで撮像して得た画像データとなる。   Preferred embodiments of the present invention will be described below with reference to the drawings. Note that the image encoding apparatus described in the embodiment will be described as being mounted on an imaging apparatus typified by a digital video camera. Therefore, the encoding target is image data obtained by the imaging unit imaging at a predetermined frame rate.

[第1の実施形態]
図1は、第1の実施形態に係る画像符号化装置のブロック構成図である。図2は、図1の画像符号化部100に入力される画像データがラスタースキャン順であることを示す図である。図2のように、画像データは画素ライン単位で、ラスタ順に画像符号化部100へ供給され、圧縮符号化される。本実施形態では、1画素ライン単位で量子化パラメータを変更(更新)し、符号量制御を行う例を説明する。なお、画像データは撮像装置へ入力される画素値そのものでも、その画素値に何らかの処理を施したデータでも良い。
[First Embodiment]
FIG. 1 is a block configuration diagram of an image encoding device according to the first embodiment. FIG. 2 is a diagram illustrating that the image data input to the image encoding unit 100 in FIG. 1 is in raster scan order. As shown in FIG. 2, the image data is supplied to the image encoding unit 100 in a raster order in units of pixel lines, and is compressed and encoded. In the present embodiment, an example will be described in which the quantization parameter is changed (updated) in units of one pixel line and the code amount control is performed. Note that the image data may be a pixel value itself input to the imaging apparatus or data obtained by performing some processing on the pixel value.

以下、図1を参照して本実施形態に係る画像符号化装置における符号化処理の概要について説明する。   The outline of the encoding process in the image encoding apparatus according to this embodiment will be described below with reference to FIG.

画像符号化部100は、符号量制御部101により符号量制御を行う。符号量制御部101は、量子化設定部102で設定される画像の基準となる量子化パラメータ、目標符号量設定部103で設定される当該画像の画像目標符号量、及び、複雑度設定部111で設定される画像複雑度に従って画像データを圧縮符号化する。なお、量子化設定部102が設定する、画像の基準となる量子化パラメータを単に基準量子化パラメータと言う。   The image encoding unit 100 performs code amount control by the code amount control unit 101. The code amount control unit 101 includes a quantization parameter serving as a reference of an image set by the quantization setting unit 102, an image target code amount of the image set by the target code amount setting unit 103, and a complexity setting unit 111. The image data is compression-encoded according to the image complexity set in step (1). Note that a quantization parameter that is set by the quantization setting unit 102 and serves as a reference of an image is simply referred to as a reference quantization parameter.

量子化部104は、量子化制御部105で出力される量子化パラメータQpを利用し、入力される画像データを1画素毎に量子化する。Qpは、その値が大きいほど符号量を削減できる一方、その値が大きいほど画質劣化が顕著になる。故に、Qpは画像劣化度を表す指標値とも言うことができる。   The quantization unit 104 uses the quantization parameter Qp output from the quantization control unit 105 and quantizes input image data for each pixel. As the value of Qp increases, the amount of code can be reduced. On the other hand, as the value of Qp increases, image quality deterioration becomes more significant. Therefore, Qp can also be said to be an index value representing the degree of image degradation.

符号化部106は、量子化部104で量子化された画像データを符号化し、生成された符号化データを出力する。この際、生成された符号化データの量(符号量)が発生符号量保持部107に保持される。   The encoding unit 106 encodes the image data quantized by the quantization unit 104 and outputs the generated encoded data. At this time, the amount of generated encoded data (code amount) is held in the generated code amount holding unit 107.

量子化パラメータ保持部108は、基準量子化パラメータQpbase及び量子化制御部105で決定した、次に符号化するラインに用いる量子化パラメータQp[i]を保持する。なお、以降、変数iは当該符号化対象ライン番号を示し、Qp[i]は、当該フレームの第iラインのQpを意味する。   The quantization parameter holding unit 108 holds a reference quantization parameter Qpbase and a quantization parameter Qp [i] determined by the quantization control unit 105 and used for a line to be encoded next. Hereinafter, the variable i indicates the line number to be encoded, and Qp [i] means Qp of the i-th line of the frame.

複雑度算出部109は、次に符号化する第iラインに対し、1ライン前のラインの複雑度X[i-1]を算出する(詳細後述)。   The complexity calculation unit 109 calculates the complexity X [i-1] of the previous line for the i-th line to be encoded next (details will be described later).

目標符号量算出部110は、目標符号量設定部103で設定される画像の基準目標符号量Tn、複雑度設定部111で設定される画像複雑度Xn-1、及び、複雑度X[i-1]に従って、次に符号化する第iラインの目標符号量T[i]を算出する。ここで示すnは、符号化対象画像番号を示し、例えばTnは、第nフレームの画像目標符号量を表し、画像複雑度Xn-1は符号化対象の着目画像の1つ前の画像の複雑度を表す。   The target code amount calculation unit 110 includes the reference target code amount Tn of the image set by the target code amount setting unit 103, the image complexity Xn-1 set by the complexity setting unit 111, and the complexity X [i− 1], the target code amount T [i] for the i-th line to be encoded next is calculated. Here, n represents the encoding target image number, for example, Tn represents the image target code amount of the nth frame, and the image complexity Xn-1 is the complexity of the image immediately before the target image to be encoded. Represents degrees.

目標符号量変更部112は、符号化が完了したラインまでの発生符号量と、相関度判定部115の画像相関度からある一定条件を満たした場合、目標符号量算出部110で算出した目標符号量を変更する(詳細後述)。   The target code amount changing unit 112, when a certain condition is satisfied from the generated code amount up to the encoded line and the image correlation degree of the correlation determining unit 115, the target code amount calculated by the target code amount calculating unit 110 The amount is changed (details will be described later).

差分算出部113は、画素ライン毎に、発生符号量保持部107で保持されたライン発生符号量S[i-1]と、目標符号量変更部113から出力される目標符号量T’[i]の差分E[i-1]を算出し、算出結果を差分保持部114に出力する。差分保持部114は、画像の先頭ラインからの積算差分値ΣE[i-1]を保持する。   The difference calculating unit 113, for each pixel line, the line generated code amount S [i-1] held by the generated code amount holding unit 107 and the target code amount T ′ [i output from the target code amount changing unit 113. ] Is calculated, and the calculation result is output to the difference holding unit 114. The difference holding unit 114 holds the integrated difference value ΣE [i−1] from the first line of the image.

量子化制御部105は、差分保持部114で保持された積算差分値ΣE[i-1]と、量子化パラメータ保持部108で保持された基準量子化パラメータQpbaseを用いて、次のラインの量子化パラメータQp[i]を決定する。量子化パラメータは、当該画像の当該ラインまでの発生符号量積算量が、同目標符号量積算量へ近付くように制御される。   The quantization control unit 105 uses the integrated difference value ΣE [i−1] held by the difference holding unit 114 and the reference quantization parameter Qpbase held by the quantization parameter holding unit 108 to quantize the next line. The parameter Qp [i] is determined. The quantization parameter is controlled such that the generated code amount integrated amount up to the line of the image approaches the target code amount integrated amount.

量子化制御部105は、積算差分値ΣE[i-1]の絶対値が小さくなるように、次に符号化するラインの量子化パラメータQp[i]を算出する。その詳細な算出方法は後述する。
以上により符号量を制御する。
The quantization control unit 105 calculates the quantization parameter Qp [i] of the line to be encoded next so that the absolute value of the integrated difference value ΣE [i−1] becomes small. The detailed calculation method will be described later.
The code amount is controlled as described above.

<複雑度の算出>
複雑度は、難易度を示す指標であり、画像が複雑であるほど大きく、平坦であるほど小さくなる値である。
<Complexity calculation>
The complexity is an index indicating the degree of difficulty, and is a value that increases as the image becomes more complex and decreases as the image becomes flatter.

複雑度算出部109は、着目ラインの目標符号量を算出するために、1つ前に符号化したラインの複雑度を算出する。   The complexity calculation unit 109 calculates the complexity of the previously encoded line in order to calculate the target code amount of the line of interest.

1ライン前の符号化に利用した量子化パラメータQp[i-1]と、その際の発生符号量S[i-1]を用いて、1ライン前の複雑度X[i-1]を次式(1)により算出する。
X[i-1] = Qp[i-1] × S[i-1] … (1)
Using the quantization parameter Qp [i-1] used for encoding one line before and the generated code amount S [i-1], the complexity X [i-1] one line before is Calculated according to equation (1).
X [i-1] = Qp [i-1] × S [i-1] (1)

<目標符号量の算出>
画像の難しいラインほど目標符号量を多く割り当て、易しいラインほど目標符号量を小さく割り当てることで、画質劣化度を意味するQpの変動を画面内で極力小さくすることができる。そこで、実施形態における目標符号量算出部110は、目標符号量設定部103で設定される画像の基準目標符号量Tn、複雑度設定部111で設定される画像複雑度Xn-1[i]及び、複雑度X[i-1]に従い、次に符号化する着目ラインの目標符号量T[i]を算出する。目標符号量の算出式は次式(2)の通りである。
T[i] = Tn × X[i-1] / Xn-1[i] …(2)
式(1)のように、複雑度は符号化しなければ算出できないフィードバック量であるため、次に符号化するラインの目標符号量は、1ライン前の複雑度、1フレーム前の第iラインの複雑度をフィードバック算出する。
<Calculation of target code amount>
By assigning a larger target code amount to a difficult line in an image and assigning a smaller target code amount to an easy line, the variation in Qp, which means the degree of image quality degradation, can be minimized within the screen. Therefore, the target code amount calculation unit 110 in the embodiment includes the reference target code amount Tn of the image set by the target code amount setting unit 103, the image complexity Xn-1 [i] set by the complexity setting unit 111, and Then, according to the complexity X [i-1], the target code amount T [i] of the target line to be encoded next is calculated. The calculation formula of the target code amount is as the following formula (2).
T [i] = Tn × X [i-1] / Xn-1 [i] (2)
Since the complexity is a feedback amount that cannot be calculated unless it is encoded as in equation (1), the target code amount of the next line to be encoded is the complexity of the previous line and the i-th line of the previous frame. Calculate complexity feedback.

<量子化制御>
量子化パラメータ算出方法の一つに、MPEG2 Test Model 5に示された公知技術がある。このTest Model 5を参照し、実施形態では、差分保持部114で保持された積算差分値ΣE[i-1]と量子化パラメータ保持部108で保持された基準量子化パラメータQpbaseを用いて、次のラインの量子化パラメータQp[i]を次式(3)として算出する。
Qp[i]=Qpbase + r ×ΣE[i-1] …(3)
なお、式中、rは制御感度を示し、大きいほど積算差分値に応じて急峻にQp[i]を変動させて符号量の制御性が良くなるパラメータである。
<Quantization control>
One of the quantization parameter calculation methods is a known technique shown in MPEG2 Test Model 5. With reference to this Test Model 5, in the embodiment, the integrated difference value ΣE [i−1] held by the difference holding unit 114 and the reference quantization parameter Qpbase held by the quantization parameter holding unit 108 are used to The line quantization parameter Qp [i] is calculated as the following equation (3).
Qp [i] = Qpbase + r × ΣE [i−1] (3)
In the equation, r represents the control sensitivity, and the larger the parameter, the sharper the Qp [i] is changed in accordance with the integrated difference value, thereby improving the controllability of the code amount.

Test Model5を利用することで、目標符号量に対して発生符号量が大きければ量子化パラメータを大きく、小さければ量子化パラメータを小さく設定し、符号量を制御することが可能である。   By using Test Model 5, it is possible to set the quantization parameter to be larger if the generated code amount is larger than the target code amount, and to control the code amount by setting the quantization parameter to be smaller if it is smaller.

<シーンチェンジ時の動作>
本実施形態におけるシーンチェンジは、1フレーム前の画像に対して着目フレームの画像難易度が乖離しているフレーム間の関係を指す。例えば、暗闇の中で動画像を撮影してN番目のフレームでフラッシュが炊かれた場合である。直前のN−1フレームでは暗闇で物体が視認できないような画像であったのに対し、Nフレームではフラッシュにより物体が視認できる画像になり、Nフレームの画像難易度はN−1フレームに対して十分に高くなる。
<Operation during scene change>
The scene change in the present embodiment indicates a relationship between frames in which the image difficulty level of the frame of interest deviates from the image one frame before. For example, when a moving image is taken in the dark and a flash is cooked in the Nth frame. The previous N-1 frame is an image in which the object cannot be visually recognized in the dark, whereas the N frame is an image in which the object can be visually recognized by flash, and the image difficulty of the N frame is higher than that of the N-1 frame. High enough.

以上のような動画像におけるシーンチェンジは通常の撮影時に頻繁に起こる。このため、シーンチェンジ時における実施形態の符号量制御部101の動作を以下に説明する。   Such scene changes in moving images frequently occur during normal shooting. Therefore, the operation of the code amount control unit 101 of the embodiment at the time of a scene change will be described below.

符号量制御部101は、上述のように量子化設定部102、目標符号量設定部103、複雑度設定部111の設定値に従い符号量制御を行う。動画像の圧縮符号化においては、一般的に、上記の設定値はリアルタイム処理のためフィードバック量を利用する。また、符号量制御部101内部でも、式(2)に示すように、符号化対象の着目ラインの目標符号量の算出には、フィードバック量を利用する。以上から、シーンチェンジが発生した場合、符号量制御性が悪くなる問題がある。   The code amount control unit 101 performs code amount control according to the set values of the quantization setting unit 102, the target code amount setting unit 103, and the complexity setting unit 111 as described above. In compression encoding of moving images, generally, the set value uses a feedback amount for real-time processing. Also, within the code amount control unit 101, as shown in Expression (2), the feedback amount is used to calculate the target code amount of the target line to be encoded. From the above, when a scene change occurs, there is a problem that the code amount controllability deteriorates.

ここで、シーンチェンジ時の問題を説明する。図3(a),(b)は、シーンチェンジ時の動作説明に用いる2種の動画像パターンA,Bを示している。図4は動画像パターンAにおけるシーンチェンジ前後のライン単位の目標符号量の推移を示している。   Here, the problem at the time of a scene change is demonstrated. FIGS. 3A and 3B show two types of moving image patterns A and B used for explanation of operations at the time of a scene change. FIG. 4 shows the transition of the target code amount in line units before and after the scene change in the moving image pattern A.

図4を見てわかるように、図3(a)のパターンAのように突然映像に物体が入った場合、式(2)に示すXn-1は、シーンチェンジ前の画像の値を設定されているため、目標符号量積算量は画面目標符号量以上になり、上記目標符号量に追従して発生符号量は大きく発生してしまう。なお、簡単のためライン発生符号量はライン目標符号量と一致しているものとする。そこで、符号量を収束させるためには、符号量の上限値を設定しておくことが有効である。   As can be seen from FIG. 4, when an object suddenly enters the image as in pattern A of FIG. 3A, Xn-1 shown in equation (2) is set to the value of the image before the scene change. Therefore, the target code amount integrated amount becomes equal to or larger than the screen target code amount, and the generated code amount is generated largely following the target code amount. For simplicity, it is assumed that the line generation code amount matches the line target code amount. Therefore, in order to converge the code amount, it is effective to set an upper limit value of the code amount.

図5(a)は、符号量上限値を設定した場合の図3(a)のパターンAにおけるライン単位の目標符号量の推移を、同図(b)はQpの推移を示している。図5(a),(b)に示すように、符号量上限値に到達した以降のライン単位の目標符号量を、符号量上限値になるように設定することで、発生符号量は画面目標符号量に収束させることができる。ただし、Qpは発生符号量を抑えるために増加する。   FIG. 5A shows the transition of the target code amount in units of lines in the pattern A of FIG. 3A when the code amount upper limit value is set, and FIG. 5B shows the transition of Qp. As shown in FIGS. 5A and 5B, by setting the target code amount in units of lines after reaching the code amount upper limit value so as to become the code amount upper limit value, the generated code amount becomes the screen target. The code amount can be converged. However, Qp increases in order to suppress the generated code amount.

次に、符号量上限値を設定することによる問題を説明する。図6(a),(b)、図7(a,(b)に、図3(b)のパターンBにおけるライン単位の目標符号量の推移及びQpの推移を示す。図6(a),(b)は、符号量上限値を設定しない場合、図7(a)、(b)は符号量上限値を設定する場合の推移をそれぞれ示している。   Next, a problem caused by setting the code amount upper limit value will be described. 6 (a), 6 (b), and 7 (a) and 7 (b) show the transition of the target code amount in units of lines and the transition of Qp in the pattern B of Fig. 3 (b). 7B shows transitions when the code amount upper limit value is not set, and FIGS. 7A and 7B show transitions when the code amount upper limit value is set.

図6(a),(b)に示すように、符号量上限値を設定しなければ、パターンBはシーンチェンジが起きておらず符号量制御に利用するフィードバック量が正しいため、画面目標符号量に収束する。   As shown in FIGS. 6A and 6B, if the code amount upper limit value is not set, the pattern B has no scene change and the feedback amount used for the code amount control is correct. Converge to.

一方、パターンAのときと同様に符号量上限値を設定する場合、図7(a),(b)に示すように、シーンチェンジが起きていないにも関わらず、Qpが変動する可能性がある。   On the other hand, when the code amount upper limit value is set as in the case of the pattern A, as shown in FIGS. 7A and 7B, there is a possibility that Qp may fluctuate despite no scene change. is there.

図3(b)のパターンBを見ると、画面の上部に物体が集中しているため、図6(a)、(b)に示すように、ライン目標符号量は、前半のラインで大きく設定することが望ましい。しかし、前半のラインに目標符号量を多く割り当てるが故、発生符号量が符号量上限値を超えてしまい、以降のラインでQpを余計に増加させてしまうことで、Qpの増加により画質劣化を引き起こす。以上から画像に依らず固定的に符号量上限値を設定することは好ましくないのは理解できよう。   Looking at the pattern B in FIG. 3B, since the objects are concentrated on the upper part of the screen, as shown in FIGS. 6A and 6B, the line target code amount is set large in the first half line. It is desirable to do. However, since a large amount of target code is allocated to the first half line, the generated code amount exceeds the code amount upper limit value, and Qp is excessively increased in the subsequent lines. cause. From the above, it can be understood that it is not preferable to set the code amount upper limit value fixedly regardless of the image.

<目標符号量変更部>
上記の理由で、実施形態における目標符号量変更部112は、符号量上限値を画像相関度に応じて適応的に変更することで、符号量制御性と画質劣化の抑制を両立させる。具体的には、目標符号量変更部112は、シーンチェンジの度合いに応じて、先に示した式(2)における1ライン当たりの基準となる目標符号量Tnを変更する。
<Target code amount changing unit>
For the above reason, the target code amount changing unit 112 in the embodiment makes the code amount controllability and the suppression of image quality degradation compatible by adaptively changing the code amount upper limit value according to the degree of image correlation. Specifically, the target code amount changing unit 112 changes the target code amount Tn serving as a reference per line in the equation (2) shown above according to the degree of scene change.

相関度判定部115は、符号化対象の着目フレームの輝度成分の合計値を求める。そして、相関度判定部115は、着目フレームの輝度合計値と、直前のフレームの輝度合計値とを、着目フレームの符号化前に比較し、画像相関度を決定する。実施形態における画像相関度は、着目フレームと直前のフレームの輝度合計値の差が小さいほど1に近づき、差が大きいほど0に近づく値とする。このため、画像符号化部100は、符号化対象の動画像を1フレーム分だけ遅延させるためのバッファ116を有し、相関度判定部115は撮像部からのフレームを遅延無しで入力し、着目フレームの符号化に先立って、その着目フレームの輝度合計値を算出する。なお、上記説明から、相関度判定部115は、直前のフレームの輝度合計値を保持する記憶部(メモリ又はレジスタ)を有する。   The correlation degree determination unit 115 obtains the total value of the luminance components of the target frame to be encoded. Correlation degree determination section 115 compares the luminance total value of the frame of interest with the luminance total value of the immediately previous frame before encoding the frame of interest, and determines the image correlation degree. The image correlation degree in the embodiment is closer to 1 as the difference between the luminance total values of the frame of interest and the immediately preceding frame is smaller, and closer to 0 as the difference is larger. For this reason, the image encoding unit 100 has a buffer 116 for delaying the moving image to be encoded by one frame, and the correlation degree determination unit 115 inputs the frame from the imaging unit without delay. Prior to frame coding, the luminance total value of the frame of interest is calculated. Note that, from the above description, the correlation degree determination unit 115 includes a storage unit (memory or register) that holds the luminance total value of the immediately preceding frame.

図8に、目標符号量変更部112の1フレーム当たりの処理フローを示す。以下、同図を参照して、実施形態の目標符号量変更部112の処理を説明する。   FIG. 8 shows a processing flow per frame of the target code amount changing unit 112. Hereinafter, processing of the target code amount changing unit 112 of the embodiment will be described with reference to FIG.

S801にて、目標符号量変更部112は、符号化しようとする着目フレームと符号化が完了した直前のフレームとの画像相関度を相関度判定部115から取得する。   In S801, the target code amount changing unit 112 acquires, from the correlation degree determining unit 115, the image correlation degree between the target frame to be encoded and the frame immediately before the encoding is completed.

S802で、目標符号量変更部112は、先に説明した符号量上限値を表す線分の傾きを、画像相関度が大きければ小さく、画像相関度が小さければ大きくなるように、着目フレームに対して設定する。   In S802, the target code amount changing unit 112 applies the inclination of the line segment representing the code amount upper limit described above to the target frame so that the inclination of the line segment is small when the image correlation degree is large and is large when the image correlation degree is small. To set.

符号量上限値は、符号化終了間際のラインほど符号量制御可能なライン数が減っていくため、先頭ラインほど小さく、最終ラインに近づくほど大きくする。なお、本実施形態では最終ラインの符号量上限値を画像目標符号量と一致させているが、画質の観点から、画像目標符号量よりも大きい値に設定してもよい。   Since the number of lines whose code amount can be controlled decreases as the line is just before the end of encoding, the code amount upper limit value is smaller as the first line is closer to the last line. In the present embodiment, the code amount upper limit value of the final line is made to coincide with the image target code amount, but may be set to a value larger than the image target code amount from the viewpoint of image quality.

S803にて、目標符号量変更部112は、最終ラインでなければS804に分岐する。S804で、目標符号量変更部112は、発生符号量積算量が符号量上限値よりも大きければS805に、そうでなければS803に分岐する。S805で、目標符号量変更部112は、目標符号量積算量が符号量上限値になるように着目ラインの目標符号量を変更する。以上の処理により、シーンチェンジ等でフィードバック量が適切でない場合も、発生符号量を画面目標符号量に近付けることができる。   In S803, the target code amount changing unit 112 branches to S804 if it is not the last line. In S804, the target code amount changing unit 112 branches to S805 if the generated code amount integrated amount is larger than the code amount upper limit value, and otherwise branches to S803. In S805, the target code amount changing unit 112 changes the target code amount of the target line so that the target code amount integrated amount becomes the code amount upper limit value. With the above processing, even when the feedback amount is not appropriate due to a scene change or the like, the generated code amount can be brought close to the screen target code amount.

<効果>
図9に画像相関度に応じた符号量上限値の傾きの違いを示す。図9に示す座標空間において水平軸はラインの位置を示し、垂直軸は総符号量を示している。図9のように画像相関度が小さいほどライン単位の目標符号量を速い段階から変更し易く、画像相関度が大きいほど変更されづらいように符号量上限値を設定する。
<Effect>
FIG. 9 shows the difference in the slope of the code amount upper limit value according to the image correlation degree. In the coordinate space shown in FIG. 9, the horizontal axis indicates the position of the line, and the vertical axis indicates the total code amount. As shown in FIG. 9, the code amount upper limit value is set so that the target code amount in units of lines is easily changed from the early stage as the image correlation degree is small, and is difficult to change as the image correlation degree is large.

図示において、符号量上限値が表す各線分は、最後のライン位置でのフレームの目標符号量と一致するものであり、異なるのはその傾きである。なお、最後のライン位置との目標符号量が、各線分毎に異なるようにしても構わない。この場合、傾きと切片を、予め設定できるようにしても構わない。   In the figure, each line segment represented by the code amount upper limit value matches the target code amount of the frame at the last line position, and the difference is its inclination. Note that the target code amount with the last line position may be different for each line segment. In this case, the inclination and intercept may be set in advance.

目標符号量変更部112は、着目フレームと直前のフレームの輝度合計値の差が小さいほど(シーンチェンジの度合いが小さいほど)“1”に近づき、その差が大きいほど(シーンチェンジの度合いが大きいほど)“0”に近づく相関度を求めるとして説明した。目標符号量変更部112は、この相関度を図9の符号量上限値の傾きとして用いるものである。   The target code amount changing unit 112 approaches “1” as the difference between the luminance total values of the frame of interest and the immediately preceding frame is smaller (the degree of scene change is smaller), and as the difference is larger (the degree of scene change is larger). It was explained that the degree of correlation approaching “0” is obtained. The target code amount changing unit 112 uses this degree of correlation as the gradient of the code amount upper limit value in FIG.

そして実施形態における目標符号量変更部112は、先に説明した式(2)に従って次に符号化する第iラインの目標符号量を決定していくが、先頭から直前の第i−1ラインまでの実際の符号量の合計が、そのシーンに対して設定した符号量上限値の線分を超えた場合には、T[i]を、設定された符号量上限値に沿うように変更する。   Then, the target code amount changing unit 112 in the embodiment determines the target code amount of the i-th line to be encoded next according to Equation (2) described above, but from the head to the immediately preceding i-th line. When the total of the actual code amount exceeds the line segment of the code amount upper limit value set for the scene, T [i] is changed to conform to the set code amount upper limit value.

図10に、本実施形態を実施することによる効果を説明する動画パターンCを示す。図11に、動画像パターンCにおけるフレーム毎のライン単位の目標符号量の推移及びQpの推移を示す。   FIG. 10 shows a moving image pattern C for explaining the effect of carrying out this embodiment. FIG. 11 shows the transition of the target code amount in units of lines and the transition of Qp in the moving image pattern C for each frame.

Nフレーム、N+1フレームでは、シーンチェンジ等が起こっておらず、安定しているため、符号量上限値を高く設定し、発生符号量が画像目標符号量に収束し、かつQpも一定で推移する。   In the N frame and N + 1 frame, since no scene change has occurred and is stable, the code amount upper limit value is set high, the generated code amount converges to the image target code amount, and Qp is also constant. Transition to.

N+2フレームでは、それ以前のN+1フレームには存在しなかった物体が画像上部に出現するため、符号量上限値を設定しない場合、発生符号量積算量が画像目標符号量より多く発生する。   In the N + 2 frame, an object that did not exist in the previous N + 1 frame appears in the upper part of the image. Therefore, if the code amount upper limit is not set, the generated code amount integrated amount is generated more than the image target code amount. To do.

一方で、符号量上限値を、N+1フレームに対して相関が小さいため、N+1フレームより小さく設定した場合、発生符号量積算量が符号量上限値を超える時点で目標符号量積算量を符号量上限値に変更するため、画像目標符号量に発生符号量積算量は収束する。   On the other hand, when the code amount upper limit value is set smaller than the N + 1 frame because the correlation with the N + 1 frame is small, when the generated code amount integrated amount exceeds the code amount upper limit value, the target code amount integrated amount Therefore, the generated code amount integrated amount converges to the image target code amount.

N+3フレームでは、N+2フレーム目に対して下部の物体が消失し、画像相関度が更に低くなる。このため、符号量上限値をN+2フレーム目よりに小さく設定する。N+3フレームでは上部が複雑な画像のため、前半ラインで発生符号量が多く発生し、符号量上限値に達することで、目標符号量積算量が符号用上限値に変更され、画像目標符号量に発生符号量は収束するものの、発生符号量を抑え込もうとQpが増加する。   In the (N + 3) th frame, the lower object disappears from the (N + 2) th frame, and the degree of image correlation is further reduced. For this reason, the code amount upper limit value is set smaller than the (N + 2) th frame. Since the upper part of the N + 3 frame is a complex image, a large amount of generated code occurs in the first half line, and when the code amount upper limit is reached, the target code amount integrated amount is changed to the upper limit value for code, and the image target code Although the generated code amount converges to the amount, Qp increases to suppress the generated code amount.

N+4フレームでは、N+3フレームと画像相関度が非常に高い画像のため、符号量上限値は高く設定する。符号量上限値が高いため、N+3フレームのように目標符号量積算量は変更されず、Qpが一定のまま画像目標符号量に発生符号量積算量は収束する。   The N + 4 frame is an image having a very high image correlation with the N + 3 frame, so the code amount upper limit value is set high. Since the code amount upper limit value is high, the target code amount integrated amount is not changed as in the case of the N + 3 frame, and the generated code amount integrated amount converges to the image target code amount while Qp is constant.

符号量上限値が画像に依らず一定の場合、N+4フレームは画像が変化していないにも関わらずQpが増加し画像劣化の原因になる一方で、符号量上限値を画像相関度に応じて変更することで、シーンチェンジ直後のフレームを除いて、Qpの変化を小さく、画質劣化を抑制することができる。   When the code amount upper limit is constant regardless of the image, the N + 4 frame causes Qp to increase despite the fact that the image has not changed. By changing it accordingly, the change in Qp can be reduced and image quality deterioration can be suppressed except for the frame immediately after the scene change.

以上のようにすることで、Qpの変化を小さくして画質劣化を抑制し、かつ符号量制御性の高い画像符号化装置を提供することができる。   By doing as described above, it is possible to provide an image encoding device that suppresses deterioration in image quality by reducing the change in Qp and has high code amount controllability.

なお、相関度判定部は、当該フレームと1つ前のフレームの画像相関度を他のパラメータを利用し判定してもよい。例えば、画像の特徴を示すパラメータであるヒストグラムを比較することで、画像相関度を判定することも、本発明の範疇である。   Note that the correlation degree determination unit may determine the image correlation degree between the frame and the previous frame using another parameter. For example, it is also within the scope of the present invention to determine the degree of image correlation by comparing histograms that are parameters indicating image characteristics.

また、上記実施例では、ライン単位に量子化、符号化を行うものとして説明した。しかし、量子化、符号化単位は、m×n画素で構成されるブロック単位として良い。この場合、目標符号量算出部110は、符号化対象の着目ブロックのブロック目標符号量算出し、目標符号量変更部112は着目ブロックに対するブロック目標符号量を変更することになる。例えば、8×8画素等のブロック単位に量子化し、その量子化後のブロックに符号化しても良い。上記実施形態での符号化単位のラインは、高さが1画素、水平方向が画像の水平方向の画素数とするブロックであると言える。かかる点は、以下に説明する各実施形態でも同じである。   In the above-described embodiment, the description has been made assuming that quantization and encoding are performed in units of lines. However, the quantization and coding unit may be a block unit composed of m × n pixels. In this case, the target code amount calculation unit 110 calculates the block target code amount of the target block to be encoded, and the target code amount change unit 112 changes the block target code amount for the target block. For example, quantization may be performed in units of blocks such as 8 × 8 pixels and encoded into the quantized blocks. It can be said that the line of the encoding unit in the above embodiment is a block whose height is one pixel and whose horizontal direction is the number of pixels in the horizontal direction of the image. This point is the same in each embodiment described below.

[第2の実施形態]
図12は、第2の実施形態に係る画像符号化装置のブロック構成図である。本第2の実施形態は、符号量制御部で制御する対象が、画像データに対する離散ウェーブレット変換して得られた変換係数データであり、符号量制御部101は離散ウェーブレット変換により生成されるサブバンド毎に符号量制御を行う場合を想定したものである。なお、参照符号100〜115は、第1の実施形態における構成と同じとし、その説明は省略する。
[Second Embodiment]
FIG. 12 is a block configuration diagram of an image encoding device according to the second embodiment. In the second embodiment, the object to be controlled by the code amount control unit is transform coefficient data obtained by performing discrete wavelet transform on image data, and the code amount control unit 101 is a subband generated by discrete wavelet transform. It is assumed that code amount control is performed every time. Reference numerals 100 to 115 are the same as those in the first embodiment, and a description thereof is omitted.

図12において、離散ウェーブレット変換部1216は、画像データを周波数領域の信号へ変換し、その変換係数をサブバンド毎に符号量制御部101の量子化部104へ出力する。   In FIG. 12, a discrete wavelet transform unit 1216 transforms image data into a frequency domain signal and outputs the transform coefficient to the quantization unit 104 of the code amount control unit 101 for each subband.

<離散ウェーブレット変換>
図13は、離散ウェーブレット変換(DWT)に係る垂直、水平フィルタリングをそれぞれ3回実行した場合に得られるサブバンドを示している。
<Discrete wavelet transform>
FIG. 13 shows subbands obtained when vertical and horizontal filtering according to the discrete wavelet transform (DWT) is executed three times.

離散ウェーブレット変換は、垂直、水平にそれぞれフィルタをかけることで画像データの周波数帯域を複数のサブバンドに分解する。そして、この変換により生成された低域サブバンドLLに対して再帰的にDWTを施すことで分解レベルを増加させ、図3に示すように、周波数分解の粒度を細かくすることができる。なお、図3における“L”,“H”はそれぞれ低域、高域を示し、その順序は、前側が水平フィルタリングを行った結果の帯域、後側が垂直フィルタリングを行った結果の帯域を示し、“Lv”の後の数字はDWTの分解レベルを示す。なお、図示のサブバンドLLに“Lv”が付かないのは、DWTを複数回行う場合には直前のDWTで得たサブバンドLLが変換対象となって、サブバンドLLは常に1つとなり、分解レベルで区別する必要がないためである。   In the discrete wavelet transform, the frequency band of the image data is decomposed into a plurality of subbands by filtering each vertically and horizontally. Then, by applying DWT recursively to the low-frequency subband LL generated by this conversion, the decomposition level can be increased, and the granularity of frequency decomposition can be reduced as shown in FIG. Note that “L” and “H” in FIG. 3 indicate a low band and a high band, respectively, and the order indicates a band obtained as a result of performing horizontal filtering on the front side, and a band obtained as a result of performing vertical filtering on the rear side. The number after “Lv” indicates the decomposition level of DWT. It should be noted that the subband LL shown in the figure does not have “Lv” because when the DWT is performed a plurality of times, the subband LL obtained by the immediately preceding DWT becomes the conversion target, and the subband LL is always one. This is because it is not necessary to distinguish at the decomposition level.

符号量制御部101では、高域のサブバンドほど量子化パラメータを大きく、低域のサブバンドほど量子化パラメータを小さく設定し符号量制御を行うことで、人間の視覚特性上視認しづらい画像データの高域ほど発生符号量を圧縮し、符号化効率を向上させることが一般的である。   In the code amount control unit 101, image data that is difficult to visually recognize due to human visual characteristics by setting the quantization parameter to be larger for the high frequency sub-band and setting the quantization parameter to be smaller for the low frequency sub-band. It is common to compress the amount of generated code and improve the encoding efficiency as the frequency increases.

<符号量制御部の動作>
本第2の実施形態における符号量制御部101は、上記離散ウェーブレット変換により生成されるサブバンド毎に、符号量制御を行う。つまり、量子化設定部102は各サブバンドの基準量子化パラメータを設定する。また、目標符号量設定部103ではサブバンド目標符号量を設定する。そして、複雑度設定部111ではサブバンド毎に画像複雑度を設定する。そして、符号量制御部101はサブバンド毎に上記設定値に基づき、ライン(又はブロック)ごとの符号量制御を行う。
<Operation of Code Quantity Control Unit>
The code amount control unit 101 in the second embodiment performs code amount control for each subband generated by the discrete wavelet transform. That is, the quantization setting unit 102 sets the reference quantization parameter for each subband. Further, the target code amount setting unit 103 sets a subband target code amount. The complexity setting unit 111 sets the image complexity for each subband. The code amount control unit 101 performs code amount control for each line (or block) based on the set value for each subband.

以上のようにすることで、各サブバンドの符号量制御を独立して行うことができ、Qpの変化を小さくして画質劣化を抑制し、かつ符号量制御性の高い画像符号化装置を提供することができる。   By doing as described above, it is possible to independently control the code amount of each subband, to reduce the change in Qp, to suppress image quality deterioration, and to provide an image encoding device with high code amount controllability. can do.

[第3の実施形態]
図14は、第3の実施形態に係る画像符号化装置のブロック構成図である。同図における参照符号100〜115は、第1の実施形態における構成と同じとし、その説明は省略する。
[Third Embodiment]
FIG. 14 is a block configuration diagram of an image encoding device according to the third embodiment. Reference numerals 100 to 115 in the figure are the same as those in the first embodiment, and a description thereof will be omitted.

本第3の実施形態は、着目フレームの着目サブバンドの符号化処理を以下のように行う。   In the third embodiment, the encoding process of the target subband of the target frame is performed as follows.

着目サブバンドの第iラインを符号化する際、その先頭ラインから第i−1ラインまでの符号量と、1つ前のフレーム(符号化済み)の同じ分解レベル、同じ種類のサブバンドの先頭ラインから第i−1ラインまでの符号量との差を求める。そして、その差が符号量差分閾値を超えた場合、符号化する着目ライン(第iライン)の目標符号量を変更する。更に、符号量差分閾値を超えたサブバンド数に応じて、他のサブバンドの閾値を小さくすることで、画像相関度に応じた目標符号量の修正を行う。   When encoding the i-th line of the target subband, the code amount from the first line to the (i-1) -th line, the same decomposition level of the previous frame (encoded), and the head of the same type of subband The difference from the code amount from the line to the (i-1) th line is obtained. When the difference exceeds the code amount difference threshold, the target code amount of the target line (i-th line) to be encoded is changed. Further, the target code amount is corrected in accordance with the degree of image correlation by reducing the threshold values of other subbands in accordance with the number of subbands exceeding the code amount difference threshold.

<目標符号量変更部>
発生符号量保持部107は、直前のフレームのサブバンド毎の発生符号量積算量を保持する。或る1つのサブバンドに着目したとき、そのサブバンドの発生符号量積算量は所定のライン間隔で積算符号量を意味する。例えば、ライン間隔(ブロック数)を“8”とし、先頭ラインを第1ラインと定義する。この場合、発生符号量保持部107は、着目サブバンドの第1乃至8ラインの符号化データの合計量である積算符号量、第1乃至16ラインの積算符号量、第1乃至24ラインの積算符号量、…を保持する。以降、積算符号量として保持されるラインを符号量比較ラインと言う。
<Target code amount changing unit>
The generated code amount holding unit 107 holds the generated code amount integrated amount for each subband of the immediately preceding frame. When attention is paid to a certain subband, the generated code amount integrated amount of the subband means the integrated code amount at a predetermined line interval. For example, the line interval (number of blocks) is “8”, and the first line is defined as the first line. In this case, the generated code amount holding unit 107 includes an integrated code amount that is a total amount of encoded data of the first to eighth lines of the target subband, an integrated code amount of the first to 16th lines, and an integrated amount of the first to 24th lines. The code amount is held. Hereinafter, the line held as the integrated code amount is referred to as a code amount comparison line.

以下は、1つのサブバンドに着目した場合のものであり、単にラインと表現した場合には、そのラインは着目サブバンド内のラインを意味することに注意されたい。   The following is a case where attention is paid to one subband, and it should be noted that, when simply expressed as a line, the line means a line within the attention subband.

目標符号量変更部112は、符号化対象の着目ラインが符号量比較ライン+1(=1、9、17…のいずれか)となるとき、先頭から直前ラインまでに発生した符号量(以下、単に現符号量という)と直前フレームの該当サブバンド内の対応するラインまでの符号量積算量(以下、単に前符号量という)とを比較する。そして、現符号量が前符号量より大きい場合、目標符号量変更部112は、着目ライン以降のラインの目標符号量T’[i]を、サブバンドの目標符号量Tnに対する発生符号量積算量ΣS[i]の差に対して、まだ符号化が完了していない残りのライン数で除した値に変更する。変更後のライン目標符号量は次式(4)で与えられる。
T’ [i] = (Tn-ΣS[i]) / (itotal-icheck) …(4)
ここで、icheckは、ライン目標符号量を変更し始めるラインまでのライン数である。
The target code amount changing unit 112, when the target line to be encoded is the code amount comparison line + 1 (= 1, 9, 17,...), The code amount generated from the head to the immediately preceding line (hereinafter simply referred to as the code amount comparison line + 1). The current code amount) is compared with the integrated code amount up to the corresponding line in the corresponding subband of the immediately preceding frame (hereinafter simply referred to as the previous code amount). When the current code amount is larger than the previous code amount, the target code amount changing unit 112 uses the target code amount T ′ [i] of the lines after the target line as the generated code amount integrated amount with respect to the target code amount Tn of the subband. The difference of ΣS [i] is changed to a value divided by the number of remaining lines that have not yet been encoded. The changed line target code amount is given by the following equation (4).
T '[i] = (Tn-ΣS [i]) / (itotal-icheck) (4)
Here, icheck is the number of lines up to the line where the line target code amount starts to be changed.

<画像相関度変更部>
画像相関度変更部1417は、相関度判定部115で設定された画像相関度を、目標符号量が変更されたサブバンドの数に応じて変更する。本第3の実施形態では、画像相関度は符号量差分閾値を示す。
<Image correlation degree change unit>
The image correlation change unit 1417 changes the image correlation set by the correlation determination unit 115 according to the number of subbands whose target code amount has been changed. In the third embodiment, the image correlation degree indicates a code amount difference threshold.

符号量制御部101は、サブバンド毎に独立に符号量制御を行うため、他のサブバンドの目標符号量が変更されて、着目サブバンドの目標符号量は変更されない可能性がある。符号化終了間際のラインで目標符号量を変更しようとするほど、発生符号量を抑え込むためにQpを大きくする変化量は増加する。   Since the code amount control unit 101 performs code amount control independently for each subband, there is a possibility that the target code amount of another subband is changed and the target code amount of the target subband is not changed. As the target code amount is changed on the line just before the end of encoding, the amount of change to increase Qp increases to suppress the generated code amount.

そこで、他のサブバンドで1フレーム前と着目フレームの発生符号量積算量が異なるのであれば、画像相関度は高くないと判断できるため、画像相関度変更部1417は、目標符号量が変更されたサブバンドの数に応じて各サブバンドの符号量差分閾値を小さく設定する。これにより符号化開始後早い段階で、ライン単位の目標符号量を変更することで符号量制御性を向上させる。   Accordingly, if the accumulated amount of generated code of the frame of interest differs from that of the previous frame in other subbands, it can be determined that the image correlation is not high, so the image correlation changing unit 1417 changes the target code amount. The code amount difference threshold value of each subband is set small according to the number of subbands. As a result, the code amount controllability is improved by changing the target code amount for each line at an early stage after the start of encoding.

以上のように、サブバンド毎の符号量制御において、各サブバンドの画像の相関度に応じて符号量差分閾値を変更することで、Qpの変化を小さくして画質劣化を抑制し、かつ符号量制御性の高い画像符号化装置を提供することができる。   As described above, in the code amount control for each subband, by changing the code amount difference threshold according to the degree of correlation between the images of each subband, the change in Qp is reduced, image quality deterioration is suppressed, and It is possible to provide an image encoding device with high amount controllability.

なお、本実施形態ではサブバンドを8等分してサブバンド発生符号量積算量を比較したが、その限りではなく、保持する容量に制限がなければ更に細かく分割することも、本実施形態の範疇である。   In this embodiment, the subbands are divided into eight equal parts and the subband generation code amount integration amount is compared. However, the present invention is not limited to this. Category.

また、等分割するだけでなく、符号化開始直後のラインのみ細かく比較するような構成も、本実施形態の範疇である。   In addition to the equal division, a configuration in which only a line immediately after the start of encoding is compared finely is also in the category of this embodiment.

更に、符号量制御部が複数コア構成の画像符号化装置も本実施形態の範疇であり、他コアのサブバンドが目標符号量を変更した数も含めて当該コアの相関度を変更することも可能である。   Furthermore, an image encoding apparatus having a code amount control unit having a plurality of cores is also within the scope of the present embodiment, and the correlation degree of the core can be changed including the number of changes in the target code amount by subbands of other cores. Is possible.

[第4の実施形態]
本第4の実施形態は、フィードバックパラメータである複雑度を変更することでラインの目標符号量の変更を行う。本第4の実施形態における装置構成は、第1の実施形態(図1)と同じである。
[Fourth Embodiment]
In the fourth embodiment, the target code amount of a line is changed by changing the complexity that is a feedback parameter. The apparatus configuration in the fourth embodiment is the same as that in the first embodiment (FIG. 1).

式(2)に示すように、複雑度は符号化が完了しなければ取得できないパラメータであることから、目標符号量算出部110では、1つ前のフレームの複雑度Xn-1を利用してライン目標符号量を算出するため、符号量制御対象の目標符号量に目標符号量積算量が収束しない場合がある。   As shown in equation (2), since the complexity is a parameter that cannot be acquired unless encoding is completed, the target code amount calculation unit 110 uses the complexity Xn-1 of the previous frame. Since the line target code amount is calculated, the target code amount integrated amount may not converge to the target code amount to be controlled by the code amount.

<目標符号量変更部>
そこで、目標符号量変更部112では、着目ラインの目標符号量を変更する場合には、Xn-1に重みづけをすることでその目標符号量を変更する。変更後の目標符号量T’[i]を、次式(5)に示す。なお、α(≧1)は上記重み付けを行うための重み付け係数である。
T’[i] = Tn × X[i-1] / (Xn-1×α) … (5)
上記の式(5)を用いることにより、画面目標符号量に必ずしも収束はしないものの、ラインの目標符号量を変更することで発生符号量積算量は、変更しない場合よりも抑制され、かつ、複雑度は、式(1)で示されることから、αの値に応じて、Qpの大きさを調整可能である。Qpの大きさを調整できるため、より画質優先の符号量制御を行うことができる。
<Target code amount changing unit>
Therefore, the target code amount changing unit 112 changes the target code amount by weighting Xn−1 when changing the target code amount of the target line. The changed target code amount T ′ [i] is shown in the following equation (5). Α (≧ 1) is a weighting coefficient for performing the weighting.
T ′ [i] = Tn × X [i-1] / (Xn-1 × α) (5)
By using the above formula (5), the screen target code amount does not necessarily converge, but by changing the target code amount of the line, the generated code amount integrated amount is suppressed and complicated compared to the case where it is not changed. Since the degree is expressed by the equation (1), the magnitude of Qp can be adjusted according to the value of α. Since the magnitude of Qp can be adjusted, code amount control with higher priority on image quality can be performed.

以上のようにすることで、Qpの調整を任意に行い、画質劣化を抑制しつつ、かつ符号量制御性の高い画像符号化装置を提供することができる。   By doing as described above, it is possible to provide an image encoding device that arbitrarily adjusts Qp, suppresses image quality deterioration, and has high code amount controllability.

[第5の実施形態]
図15は、第5の実施形態に係る画像符号化装置のブロック構成図である。図示において、参照符号100〜115,1216は、第2の実施形態と同じであるので、その説明は省略する。
[Fifth Embodiment]
FIG. 15 is a block configuration diagram of an image encoding device according to the fifth embodiment. In the drawing, reference numerals 100 to 115 and 1216 are the same as those in the second embodiment, and thus the description thereof is omitted.

サブバンド発生符号量積算部1518は、各サブバンドの発生符号量を同一画素位置に相当するライン毎に積算する。本実施形態は、ラインごとの目標符号量の変更を、全サブバンド同時に行い、全サブバンドの符号化が並列に行われるものとする。   The subband generated code amount integrating unit 1518 integrates the generated code amount of each subband for each line corresponding to the same pixel position. In the present embodiment, it is assumed that the target code amount for each line is changed at the same time for all subbands, and all subbands are encoded in parallel.

<サブバンドの同一画素位置>
図16は、離散ウェーブレット変換(DWT)の垂直、水平フィルタリングをそれぞれ3回施した場合の各サブバンドの離散ウェーブレット変換前の画像が表す空間での同一画素位置の関係を示している。
<Subband same pixel position>
FIG. 16 shows the relationship between the same pixel positions in the space represented by the image before the discrete wavelet transform of each subband when vertical and horizontal filtering of the discrete wavelet transform (DWT) is performed three times.

DWTは、変換前の画像の2画素ラインに対して1画素ライン分の変換係数が生成される。また、DWTはサブバンドLLに対して再帰的に行われるため、分解レベル2の1ライン分の変換係数は、分解レベル1の2画素ラインの変換係数から生成される。以降分解レベルを増やしても同様の関係である。   In DWT, conversion coefficients for one pixel line are generated for two pixel lines of an image before conversion. In addition, since DWT is performed recursively on the subband LL, the conversion coefficient for one line of decomposition level 2 is generated from the conversion coefficient of two pixel lines of decomposition level 1. Even if the decomposition level is increased thereafter, the same relationship is obtained.

上記の関係から、最高域であるLv1のNラインに対して、Lv2のN/2ライン、Lv3のN/4ラインが同一画素位置に相当する。DWTを3回実行する場合、図16のように、同一画素位置と見なせるラインは、Lv1の4ラインに対して、Lv2の2ライン、Lv3の1ラインである。   From the above relationship, the N / 2 line of Lv2 and the N / 4 line of Lv3 correspond to the same pixel position with respect to the N line of Lv1 which is the highest range. When the DWT is executed three times, as shown in FIG. 16, the lines that can be regarded as the same pixel position are two lines of Lv2 and one line of Lv3 with respect to four lines of Lv1.

<目標符号量変更部>
目標符号量変更部112は、符号量上限値を、サブバンド合計符号量上限値として全サブバンドの発生符号量積算量に対して設定し、サブバンド発生符号量積算部1518で積算したサブバンド発生符号量積算量と比較する。サブバンド発生符号量積算量がサブバンド合計符号量上限値よりも大きければ各サブバンドの着目ラインの目標符号量T’[i]を、式(5)を用いて変更する。
<Target code amount changing unit>
The target code amount changing unit 112 sets the code amount upper limit value as the subband total code amount upper limit value for the generated code amount integrated amount of all the subbands, and the subband generated by the subband generated code amount integrating unit 1518 The generated code amount is compared with the integrated amount. If the subband generation code amount integration amount is larger than the subband total code amount upper limit value, the target code amount T ′ [i] of the target line of each subband is changed using Equation (5).

このように、全サブバンド一斉に目標符号量を変更することで、Qpも同様に全サブバンド一斉に変更される。Qpは一般に画像データの高域成分ほど大きく、低域成分ほど小さく設定するが、サブバンド独立で目標符号量を変更すると、上記の関係が崩れる場合がある。例えば、サブバンドHLのQpがサブバンドLHのQpより非常に大きい値であった場合、画像の縦エッジのみ極端に劣化し、主観画質の劣化が目立つ。   In this way, Qp is also changed at the same time for all subbands by changing the target code amount at the same time for all the subbands. Qp is generally set larger as the high frequency component of the image data and smaller as the low frequency component. However, if the target code amount is changed independently of the subband, the above relationship may be lost. For example, when the Qp of the subband HL is much larger than the Qp of the subband LH, only the vertical edge of the image is extremely deteriorated, and the deterioration of the subjective image quality is conspicuous.

一方で、本実施形態を適応すれば、一斉に式(5)のαを所定の値に変更できるため、画質の極端な劣化を抑制することができる。   On the other hand, if this embodiment is applied, α in the equation (5) can be changed to a predetermined value all at once, and thus it is possible to suppress extreme deterioration in image quality.

以上のようにすることで、各サブバンドの目標符号量の変更を同一画素位置から行うことで、Qpの変更も同様に同一画素位置から行い、画質劣化を抑制しつつ、かつ符号量制御性の高い画像符号化装置を提供することができる。   As described above, by changing the target code amount of each subband from the same pixel position, Qp is also changed from the same pixel position, and the code amount controllability is suppressed while suppressing image quality deterioration. A high image encoding device can be provided.

なお、必ずしも全サブバンドで目標符号量を変更する必要は無く、例えば最も低域成分であるサブバンドLLは画質を優先し、目標符号量を変更しない構成も、本発明の範疇である。   Note that it is not always necessary to change the target code amount in all subbands. For example, a configuration in which the subband LL which is the lowest frequency component gives priority to image quality and the target code amount is not changed is also within the scope of the present invention.

以上、各実施形態について詳述したが、特定の実施形態に限定されるものではなく、特許請求の範囲に記載された範囲内において、種々の変形及び変更が可能である。また、前述した実施形態の構成要素を全部又は複数を組み合わせることも可能である。   Each embodiment has been described in detail above. However, the present invention is not limited to the specific embodiment, and various modifications and changes can be made within the scope described in the claims. It is also possible to combine all or a plurality of the constituent elements of the above-described embodiment.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100…画像符号化部、101…符号量制御部、102…量子化設定部、103…目標符号量設定部、104…量子化部、105…量子化制御部、106…符号化部、107…発生符号量保持部、108…量子化パラメータ保持部、109…複雑度算出部、110…目標符号量算出部、111…複雑度設定部、112…目標符号量変更部、113…差分算出部、114…差分保持部、115…相関度判定部、116…バッファ、1216…離散ウェーブレット変換部、1417…画像相関度変更部、1518…サブバンド発生符号量積算部 DESCRIPTION OF SYMBOLS 100 ... Image encoding part 101 ... Code amount control part 102 ... Quantization setting part 103 ... Target code amount setting part 104 ... Quantization part 105 ... Quantization control part 106 ... Encoding part 107 ... Generated code amount holding unit, 108 ... quantization parameter holding unit, 109 ... complexity calculating unit, 110 ... target code amount calculating unit, 111 ... complexity setting unit, 112 ... target code amount changing unit, 113 ... difference calculating unit, 114: Difference holding unit, 115 ... Correlation degree determination unit, 116 ... Buffer, 1216 ... Discrete wavelet transform unit, 1417 ... Image correlation degree changing unit, 1518 ... Subband generation code amount integration unit

Claims (11)

撮像手段で撮像した動画像データを符号化する画像符号化装置であって、
前記動画像データにおける着目フレームの画像データを、予め設定されたブロック単位に、目標符号量に応じて決定される量子化パラメータに従って量子化する量子化手段と、
該量子化手段で得られた量子化後のデータを、前記ブロック単位に符号化する符号化手段と、
前記符号化手段により発生する符号量が、設定されたブロック目標符号量になるように前記符号化手段を制御する符号量制御手段とを有し、
前記符号量制御手段は、前記着目フレームの画像と直前のフレームの画像の相関度を求め、当該相関度に基づいて前記ブロック目標符号量を設定する
ことを特徴とする画像符号化装置。
An image encoding device that encodes moving image data captured by an imaging means,
Quantizing means for quantizing the image data of the frame of interest in the moving image data in a preset block unit according to a quantization parameter determined according to a target code amount;
Encoding means for encoding the quantized data obtained by the quantization means in units of the blocks;
Code amount control means for controlling the encoding means so that the code amount generated by the encoding means becomes a set block target code amount;
The code amount control means obtains the degree of correlation between the image of the frame of interest and the image of the immediately preceding frame, and sets the block target code amount based on the degree of correlation.
前記符号量制御手段は、
1フレームにおける先頭のブロックから最後のブロックに至る軸を水平軸、符号化データの積算量を合わす軸を垂直軸とする座標空間において、予め設定されたフレーム目標符号量が示す位置が表す座標を通る符号量上限値を表す線分の傾きを、前記相関度に基づいて決定する第1の決定手段と、
予め設定された基準目標符号量と、着目ブロックの直前の符号化済みのブロックの複雑度とに基づき、前記着目ブロックの前記ブロック目標符号量を決定する第2の決定手段と、
前記着目フレームの先頭のブロックから前記直前のブロックまでの合計の符号量が、前記第1の決定手段で決定した前記線分が示す符号量を超えた場合、前記着目ブロックの前記ブロック目標符号量を、前記線分に沿うように変更する変更手段と、
を有することを特徴とする請求項1に記載の画像符号化装置。
The code amount control means includes:
A coordinate represented by a position indicated by a predetermined frame target code amount in a coordinate space having a horizontal axis as an axis from the first block to the last block in one frame and a vertical axis as an axis that combines the integrated amounts of encoded data. First determination means for determining a slope of a line segment representing a code amount upper limit value to pass based on the degree of correlation;
Second determination means for determining the block target code amount of the block of interest based on a preset reference target code amount and the complexity of the encoded block immediately before the block of interest;
When the total code amount from the head block of the target frame to the immediately preceding block exceeds the code amount indicated by the line segment determined by the first determining unit, the block target code amount of the target block Changing means for changing the line to be along the line segment;
The image encoding apparatus according to claim 1, comprising:
前記第1の決定手段は、
前記着目フレームと直前のフレームの輝度合計値との差、ヒストグラムの差、或いは、着目ブロックまでの符号量の差のいずれかに基づき、前記傾きを決定する
ことを特徴とする請求項2に記載の画像符号化装置。
The first determining means includes
The inclination is determined based on any one of a difference between the luminance value of the frame of interest and the previous frame, a difference of a histogram, or a difference of code amount up to the block of interest. Image coding apparatus.
前記第2の決定手段は、
前記着目ブロックを第iのブロックとし、直前の第i−1のブロックの符号化データの符号量をS[i-1]、前記第iのブロックを符号化する際に用いた量子化パラメータをQp[i-1]と定義したとき、前記複雑度を表すX[i-1]を次式により求める
X[i-1]=Qp[i-1]×S[i-1]
ことを特徴とする請求項2又は3に記載の画像符号化装置。
The second determining means includes
The block of interest is the i-th block, the code amount of the encoded data of the immediately preceding i-1th block is S [i-1], and the quantization parameter used when the i-th block is encoded is When defined as Qp [i-1], X [i-1] representing the complexity is obtained by the following equation: X [i-1] = Qp [i-1] × S [i-1]
The image coding apparatus according to claim 2 or 3, wherein
前記第2の決定手段は、
前記着目ブロックまでの発生符号量の積算量が、当該着目ブロックの位置の符号量上限値に達したら、複雑度を小さなるように修正することで、前記ブロック目標符号量を決定する
ことを特徴とする請求項2又は3に記載の画像符号化装置。
The second determining means includes
When the integrated amount of the generated code amount up to the target block reaches the code amount upper limit value at the position of the target block, the block target code amount is determined by correcting to reduce the complexity. The image encoding device according to claim 2 or 3.
更に、前記動画像データにおける着目フレームの画像データを離散ウェーブレット変換する変換手段を有し、
前記量子化手段は、前記変換手段で得られた各サブバンドに対して量子化する
ことを特徴とする請求項3に記載の画像符号化装置。
Furthermore, it has conversion means for performing discrete wavelet transform on the image data of the frame of interest in the moving image data,
The image coding apparatus according to claim 3, wherein the quantization unit quantizes each subband obtained by the conversion unit.
前記符号量制御手段は画像相関度変更手段を有し、
当該画像相関度変更手段は、複数のサブバンドの内、符号量差分閾値を超えたサブバンドの数が多いほど画像相関度を小さく、少ないほど大きく変更する
ことを特徴とする請求項6に記載の画像符号化装置。
The code amount control means includes image correlation degree changing means,
The image correlation degree changing means changes the image correlation degree smaller as the number of subbands exceeding the code amount difference threshold among a plurality of subbands is larger, and larger as the number is smaller. Image coding apparatus.
前記第2の決定手段は、予め設定されたブロック数の符号化を終えるたびに、前記ブロック目標符号量を決定する
ことを特徴とする請求項5に記載の画像符号化装置。
The image coding apparatus according to claim 5, wherein the second determination unit determines the block target code amount each time encoding of a preset number of blocks is completed.
前記符号化手段は、全てのサブバンドにおける、画像が表す空間の同じ位置のブロックを並列に符号化し、
前記符号量制御手段は、1以上のサブバンドに対して量子化制御を行い、前記1以上のサブバンドごとにブロック目標符号量を決定すると共に、前記1以上のサブバンドにおける着目ブロックまでに発生した符号量の合計符号量に基づいて、各サブバンドにおける前記ブロック目標符号量を決定する
ことを特徴とする請求項6に記載の画像符号化装置。
The encoding means encodes blocks in the same position in the space represented by the image in all subbands in parallel,
The code amount control means performs quantization control on one or more subbands, determines a block target code amount for each of the one or more subbands, and is generated before the target block in the one or more subbands. The image coding apparatus according to claim 6, wherein the block target code amount in each subband is determined based on the total code amount of the obtained code amount.
撮像手段で撮像した動画像データを符号化する画像符号化装置の制御方法であって、
前記動画像データにおける着目フレームの画像データを、予め設定されたブロック単位に、目標符号量に応じて決定される量子化パラメータに従って量子化する量子化工程と、
該量子化工程で得られた量子化後のデータを、前記ブロック単位に符号化する符号化工程と、
前記符号化工程により発生する符号量が、設定されたブロック目標符号量になるように前記符号化工程を制御する符号量制御工程とを有し、
前記符号量制御工程は、前記着目フレームの画像と直前のフレームの画像の相関度を求め、当該相関度に基づいて前記ブロック目標符号量を設定する
ことを特徴とする画像符号化装置の制御方法。
A control method of an image encoding device that encodes moving image data captured by an imaging means,
A quantization step of quantizing the image data of the frame of interest in the moving image data in a predetermined block unit according to a quantization parameter determined according to a target code amount;
An encoding step for encoding the quantized data obtained in the quantization step in units of the blocks;
A code amount control step for controlling the encoding step so that a code amount generated by the encoding step becomes a set block target code amount,
The code amount control step obtains the degree of correlation between the image of the frame of interest and the image of the immediately preceding frame, and sets the block target code amount based on the degree of correlation. .
コンピュータが読み込み実行することで、前記コンピュータに請求項10に記載の方法の各工程を実行させるためのプログラム。   A program for causing a computer to execute each step of the method according to claim 10 by being read and executed by the computer.
JP2016247009A 2016-12-20 2016-12-20 Image coding device and its control method and program Active JP6916618B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016247009A JP6916618B2 (en) 2016-12-20 2016-12-20 Image coding device and its control method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016247009A JP6916618B2 (en) 2016-12-20 2016-12-20 Image coding device and its control method and program

Publications (2)

Publication Number Publication Date
JP2018101907A true JP2018101907A (en) 2018-06-28
JP6916618B2 JP6916618B2 (en) 2021-08-11

Family

ID=62714508

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016247009A Active JP6916618B2 (en) 2016-12-20 2016-12-20 Image coding device and its control method and program

Country Status (1)

Country Link
JP (1) JP6916618B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235576A (en) * 2020-11-16 2021-01-15 北京世纪好未来教育科技有限公司 Encoding method, encoding device, electronic device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008187571A (en) * 2007-01-31 2008-08-14 Sony Corp Information processing device and method, and program
US20090046778A1 (en) * 2007-08-17 2009-02-19 Samsung Electronics Co., Ltd. Bit rate control method and apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008187571A (en) * 2007-01-31 2008-08-14 Sony Corp Information processing device and method, and program
US20090046778A1 (en) * 2007-08-17 2009-02-19 Samsung Electronics Co., Ltd. Bit rate control method and apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHOI, HYOMIN ET AL.: "Reports on improvement of the rate control", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, vol. JCTVC-J0263 (version 2), JPN7020004105, 18 July 2012 (2012-07-18), pages 1 - 5, ISSN: 0004412782 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235576A (en) * 2020-11-16 2021-01-15 北京世纪好未来教育科技有限公司 Encoding method, encoding device, electronic device and storage medium
CN112235576B (en) * 2020-11-16 2024-04-30 北京世纪好未来教育科技有限公司 Encoding method, encoding device, electronic equipment and storage medium

Also Published As

Publication number Publication date
JP6916618B2 (en) 2021-08-11

Similar Documents

Publication Publication Date Title
US11082707B2 (en) Encoding method and apparatus, image processing system, and computer-readable storage medium
US11012698B2 (en) Image encoding apparatus and method for controlling the same
EP1821548B1 (en) Method for pre-suppressing image noise.
EP0659020A2 (en) Pre-processing filter apparatus for use in an image encoding system
US10897615B2 (en) Image encoding apparatus and control method therefor
JP6857973B2 (en) Image coding device and its control method
US10776956B2 (en) Image coding apparatus, image decoding apparatus, image coding method, image decoding method, and non-transitory computer-readable storage medium
US11792399B2 (en) Systems and methods for quantization of video content
US11140392B2 (en) Image encoding apparatus, image decoding apparatus, control methods thereof, and non- transitory computer-readable storage medium
US20200195931A1 (en) Image capturing apparatus, control method thereof, and non-transitory computer-readable storage medium
JP6806466B2 (en) Image coding device and its control method
JP7001383B2 (en) Coding device, coding method, and program
US10356408B2 (en) Image encoding apparatus and method of controlling the same
JP6916618B2 (en) Image coding device and its control method and program
US20230133895A1 (en) Image encoding apparatus and method for controlling the same and non-transitory computer-readable storage medium
JP4942208B2 (en) Encoder
JP6966936B2 (en) Image coding device and its control method and program
JP2018011120A (en) Imaging apparatus, control method for imaging apparatus, and program
US20190110051A1 (en) Coding apparatus capable of recording raw image, control method therefor, and storage medium storing control program therefor
JP6813991B2 (en) Image coding device and its control method and program
JP2016082395A (en) Encoder, coding method and program
JP7321237B2 (en) Image encoding device, image encoding method, program
JP2017098898A (en) Image encoding device, control method of the same, program, and storage medium
JP2020109923A (en) Video encoding device, method for controlling the same, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201222

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210210

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: 20210618

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210716

R151 Written notification of patent or utility model registration

Ref document number: 6916618

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151