JP5094760B2 - Video encoding device - Google Patents

Video encoding device Download PDF

Info

Publication number
JP5094760B2
JP5094760B2 JP2009031279A JP2009031279A JP5094760B2 JP 5094760 B2 JP5094760 B2 JP 5094760B2 JP 2009031279 A JP2009031279 A JP 2009031279A JP 2009031279 A JP2009031279 A JP 2009031279A JP 5094760 B2 JP5094760 B2 JP 5094760B2
Authority
JP
Japan
Prior art keywords
offset
chroma
encoding
picture
code amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009031279A
Other languages
Japanese (ja)
Other versions
JP2010187302A (en
Inventor
優一 出原
和夫 杉本
裕介 伊谷
健一 新房
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2009031279A priority Critical patent/JP5094760B2/en
Publication of JP2010187302A publication Critical patent/JP2010187302A/en
Application granted granted Critical
Publication of JP5094760B2 publication Critical patent/JP5094760B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、ディジタル映像信号の各ピクチャを所定の単位領域に分割し、単位領域毎に圧縮符号化を実施する動画像符号化装置に関するものである。   The present invention relates to a moving picture coding apparatus that divides each picture of a digital video signal into predetermined unit areas and performs compression coding for each unit area.

例えば、MPEG(Moving Picture Experts Group)やITU−T H.26xなどの国際標準映像符号化方式では、映像信号の各フレームにおいて、輝度信号16×16画素と、その輝度信号16×16画素に対応する色差信号8×8画素分とをまとめたブロックデータ(以下、「マクロブロック」と称する)を一単位として、圧縮符号化(動き探索/補償技術や、直交変換/変換係数量子化技術に基づく圧縮符号化)を実施する方法が採用されている。
上記の国際標準映像符号化方式を採用する動画像符号化装置から出力された動画像圧縮データであるビットストリームを復号する場合も、マクロブロック単位に復号処理を実施し、最終的に1画像全部のマクロブロックを復号した後、復号画像として出力する。
For example, MPEG (Moving Picture Experts Group) and ITU-T H.264. In an international standard video encoding scheme such as 26x, block data (16 × 16 pixels of luminance signal and color difference signals corresponding to 8 × 8 pixels corresponding to the luminance signal of 16 × 16 pixels in each frame of the video signal ( Hereinafter, a method of performing compression coding (compression coding based on motion search / compensation technology and orthogonal transform / transform coefficient quantization technology) is adopted using “macroblock” as a unit.
Even when decoding a bitstream that is compressed moving image data output from a moving image encoding apparatus that employs the above international standard video encoding method, decoding processing is performed in units of macroblocks, and finally all the images are Are decoded and output as a decoded image.

国際標準映像符号化方式ITU−T H.264では、復号画像の画質向上を図ることができるようにするために、輝度信号と色差信号の量子化幅を異なる値に設定することが可能な方式を採用している。
即ち、国際標準映像符号化方式ITU−T H.264では、色差信号の量子化幅を輝度信号の量子化幅からの差分値で符号化する方式を規格化している。
International standard video encoding system ITU-T H.264. In H.264, in order to improve the image quality of the decoded image, a method is adopted in which the quantization width of the luminance signal and the color difference signal can be set to different values.
That is, the international standard video encoding method ITU-T H.264. H.264 standardizes a method of encoding the quantization width of the color difference signal with a difference value from the quantization width of the luminance signal.

例えば、以下の特許文献1には、輝度信号と色差信号の量子化幅を決定する動画像符号化装置が開示されている。
即ち、この動画像符号化装置では、輝度信号や色差信号の分散や平均値からの差分絶対値和を画素単位で計算することで、輝度信号の変化量が小さく、色差信号の変化量が大きい場合には、色差信号の量子化幅を小さくするようにしている。
したがって、色差を重視して符号化する場合には、色差信号の量子化幅を小さくすることができるため、画質の向上を図ることができる。
For example, Patent Document 1 below discloses a moving image encoding apparatus that determines the quantization width of a luminance signal and a color difference signal.
That is, in this moving image coding apparatus, the variance of the luminance signal and the color difference signal and the sum of absolute differences from the average value are calculated in units of pixels, so that the variation amount of the luminance signal is small and the variation amount of the color difference signal is large. In this case, the quantization width of the color difference signal is reduced.
Therefore, when encoding with an emphasis on color difference, the quantization width of the color difference signal can be reduced, so that the image quality can be improved.

特開2007−116558号公報(段落番号[0014])JP 2007-116558 A (paragraph number [0014])

従来の動画像符号化装置は以上のように構成されているので、色差を重視して符号化する場合には、色差信号の量子化幅を小さくして、画質の向上を図ることができる。しかし、輝度を重視して符号化する場合には、画質の向上を図るための手段がなく、画質の向上を図ることができない課題があった。
また、輝度信号や色差信号の分散や平均値からの差分絶対値和を画素単位で計算するなどの前処理が必要であるため、演算の処理量が多く、リアルタイム処理に不向きである課題もあった。
Since the conventional moving image encoding apparatus is configured as described above, when encoding with an emphasis on color difference, the quantization width of the color difference signal can be reduced to improve the image quality. However, when encoding is performed with emphasis on luminance, there is no means for improving the image quality, and there is a problem that the image quality cannot be improved.
In addition, pre-processing such as calculating the sum of absolute differences from the variance and average value of luminance signals and chrominance signals in units of pixels is necessary, so there is a problem that the amount of processing is large and unsuitable for real-time processing. It was.

この発明は上記のような課題を解決するためになされたもので、色差を重視して符号化する場合に限らず、輝度を重視して符号化する場合にも、リアルタイム処理に適用可能な少ない処理量で、画質の向上を図ることができる動画像符号化装置を得ることを目的とする。   The present invention has been made in order to solve the above-described problems, and is not limited to encoding with emphasis on color difference, but is applicable to real-time processing not only when encoding with emphasis on luminance. It is an object of the present invention to obtain a moving image coding apparatus capable of improving the image quality with a processing amount.

この発明に係る動画像符号化装置は、符号化の設定内容に含まれている符号化のモード情報である画質と動きのいずれを重視するかを示す情報に応じてオフセット値を決定するオフセット値決定手段を設け、上記圧縮符号化手段が単位領域毎に圧縮符号化を実施する際、上記オフセット値決定手段により決定されたオフセット値に応じて、上記輝度信号及び上記色差信号に割り当てる符号量を設定するようにしたものである。 The moving image encoding apparatus according to the present invention determines an offset value according to information indicating which of image quality and motion, which is encoding mode information included in encoding settings , is important. Determining means, and when the compression encoding means performs compression encoding for each unit area, the code amount to be assigned to the luminance signal and the color difference signal is determined according to the offset value determined by the offset value determination means. It is something that is set.

この発明によれば、符号化の設定内容に含まれている符号化のモード情報である画質と動きのいずれを重視するかを示す情報に応じてオフセット値を決定するオフセット値決定手段を設け、上記圧縮符号化手段が単位領域毎に圧縮符号化を実施する際、上記オフセット値決定手段により決定されたオフセット値に応じて、上記輝度信号及び上記色差信号に割り当てる符号量を設定するように構成しているので、色差を重視して符号化する場合に限らず、輝度を重視して符号化する場合にも、リアルタイム処理に適用可能な少ない処理量で、画質の向上を図ることができる効果がある。
According to this invention, there is provided an offset value determining means for determining an offset value according to information indicating which of image quality and motion, which is encoding mode information included in the setting content of encoding, is important , When the compression encoding unit performs compression encoding for each unit region, the code amount allocated to the luminance signal and the color difference signal is set according to the offset value determined by the offset value determination unit. Therefore, not only when encoding with emphasis on color difference, but also when encoding with emphasis on luminance, the effect of improving image quality with a small amount of processing applicable to real-time processing There is.

この発明の実施の形態1による動画像符号化装置と動画像復号装置からなるシステムを示す構成図である。It is a block diagram which shows the system which consists of a moving image encoding device and a moving image decoding device by Embodiment 1 of this invention. 動画像符号化装置1に与えられる符号化設定情報の一例を示す説明図である。It is explanatory drawing which shows an example of the encoding setting information given to the moving image encoder 1. この発明の実施の形態1による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 1 of this invention. この発明の実施の形態1による動画像符号化装置のクロマQPオフセット決定部11を示す構成図である。It is a block diagram which shows the chroma QP offset determination part 11 of the moving image encoder by Embodiment 1 of this invention. クロマQPオフセット算出部11bにおける閾値処理の一例を示す説明図である。It is explanatory drawing which shows an example of the threshold value process in the chroma QP offset calculation part 11b. この発明の実施の形態2による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 2 of this invention. この発明の実施の形態2による動画像符号化装置のクロマQPオフセット決定部13を示す構成図である。It is a block diagram which shows the chroma QP offset determination part 13 of the moving image encoder by Embodiment 2 of this invention. この発明の実施の形態3による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 3 of this invention. この発明の実施の形態3による動画像符号化装置のクロマQPオフセット決定部14を示す構成図である。It is a block diagram which shows the chroma QP offset determination part 14 of the moving image encoder by Embodiment 3 of this invention. この発明の実施の形態4による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 4 of this invention. この発明の実施の形態4による動画像符号化装置のクロマQPオフセット決定部16を示す構成図である。It is a block diagram which shows the chroma QP offset determination part 16 of the moving image encoder by Embodiment 4 of this invention. この発明の実施の形態5による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 5 of this invention. この発明の実施の形態5による動画像符号化装置のクロマQPオフセット決定部17を示す構成図である。It is a block diagram which shows the chroma QP offset determination part 17 of the moving image encoder by Embodiment 5 of this invention. この発明の実施の形態6による動画像符号化装置を示す構成図である。It is a block diagram which shows the moving image encoder by Embodiment 6 of this invention. この発明の実施の形態6による動画像符号化装置のクロマQPオフセット決定部18を示す構成図である。It is a block diagram which shows the chroma QP offset determination part 18 of the moving image encoder by Embodiment 6 of this invention. クロマQPオフセット算出部18aにおけるマクロブロック平均符号量の閾値処理の一例を示す説明図である。It is explanatory drawing which shows an example of the threshold value process of the macroblock average code amount in the chroma QP offset calculation part 18a. クロマQPオフセット算出部18aにおけるピクチャタイプ依存変動幅の算出処理の一例を示す説明図である。It is explanatory drawing which shows an example of the calculation process of the picture type dependence fluctuation range in the chroma QP offset calculation part 18a.

実施の形態1.
図1はこの発明の実施の形態1による動画像符号化装置と動画像復号装置からなるシステムを示す構成図である。
図1において、動画像符号化装置1は例えばH.264/AVCの符号化方式を採用しており、ディジタル映像信号である動画像データと、符号化の設定内容を示す符号化設定情報とを入力すると、その動画像データの各ピクチャをマクロブロック単位(所定の単位領域)に分割し、マクロブロック毎に圧縮符号化を実施して、その符号化設定情報が示す符号化の設定内容を満足する動画像圧縮データをビットストリームとして出力する処理を実施する。
動画像復号装置2は動画像符号化装置1から出力されたビットストリームをマクロブロック単位に復号して、最終的に1画像全部のマクロブロックを復号した後、復号画像として表示動画像データを出力する処理を実施する。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a system comprising a moving picture coding apparatus and a moving picture decoding apparatus according to Embodiment 1 of the present invention.
In FIG. 1, the moving image encoding apparatus 1 is, for example, H.264. H.264 / AVC encoding scheme is adopted, and when moving image data that is a digital video signal and encoding setting information indicating the setting content of encoding are input, each picture of the moving image data is converted into macroblock units. Dividing into (predetermined unit areas), performing compression encoding for each macroblock, and executing processing to output moving image compressed data that satisfies the encoding settings indicated by the encoding setting information as a bit stream To do.
The video decoding device 2 decodes the bit stream output from the video encoding device 1 in units of macroblocks, and finally decodes all macroblocks of one image, and then outputs display video data as a decoded image. Perform the process.

図2は動画像符号化装置1に与えられる符号化設定情報の一例を示す説明図である。
図2の例では、符号化の設定内容として、ビットレート、フレームレート、画像解像度、符号化ピクチャタイプ(I/P/Bピクチャ)、符号化モード情報(画質重視であるのか、動き重視であるのかを示す情報)、GOP構成、ピクチャタイプ符号量比が示されている。
このような符号化設定情報は、一般に広く知られている情報である。
FIG. 2 is an explanatory diagram showing an example of the coding setting information given to the moving picture coding apparatus 1.
In the example of FIG. 2, the bit rate, frame rate, image resolution, coded picture type (I / P / B picture), coding mode information (whether emphasizing image quality or emphasizing motion are set as coding settings. ), GOP configuration, and picture type code amount ratio.
Such encoding setting information is generally well-known information.

図3はこの発明の実施の形態1による動画像符号化装置1を示す構成図である。
図3において、クロマQPオフセット決定部11は符号化設定情報が示す符号化の設定内容に応じて、動画像データにおける輝度信号の量子化幅に対する色差信号の量子化幅のオフセット値を決定する処理を実施する。
以下、輝度信号の量子化幅に対する色差信号の量子化幅のオフセット値を「クロマQPオフセット」と称する。
「クロマQPオフセット」は、色差のQPを輝度のQPとの差分値で示している情報であり、H.264/AVC符号化規格に記載されている「chroma_qp_index_offset」と「second_chroma_qp_index_offset」のことである。この値は、“−12”から“+12”の範囲の値をとることがH.264/AVC符号化規格で定められている。
ここで、「クロマ」は色差を意味し、「QP」は量子化幅を意味する。
なお、クロマQPオフセット決定部11はオフセット値決定手段を構成している。
FIG. 3 is a block diagram showing a moving picture coding apparatus 1 according to Embodiment 1 of the present invention.
In FIG. 3, the chroma QP offset determination unit 11 determines an offset value of the quantization width of the chrominance signal with respect to the quantization width of the luminance signal in the moving image data in accordance with the encoding setting content indicated by the encoding setting information. To implement.
Hereinafter, the offset value of the quantization width of the color difference signal with respect to the quantization width of the luminance signal is referred to as “chroma QP offset”.
“Chroma QP offset” is information indicating a color difference QP as a difference value from a luminance QP. It is “chroma_qp_index_offset” and “second_chroma_qp_index_offset” described in the H.264 / AVC coding standard. This value has a value in the range of “−12” to “+12”. It is defined in the H.264 / AVC encoding standard.
Here, “chroma” means a color difference, and “QP” means a quantization width.
The chroma QP offset determining unit 11 constitutes an offset value determining unit.

H.264/AVCエンコードコア部12はH.264/AVCの符号化方式を採用しており、動画像データの各ピクチャをマクロブロック単位に分割し、マクロブロック毎に圧縮符号化を実施して、その符号化設定情報が示す符号化の設定内容を満足するビットストリームを出力する処理を実施する。
H.264/AVCエンコードコア部12は、一般のH.264/AVCエンコーダと同様に、マクロブロックを一単位として、イントラ画素予測/動き探索/補償技術や、直交変換/変換係数量子化/可変長符号化技術に基づいて、圧縮符号化を実施するものである。
ただし、ITU−T H.264では、輝度信号と色差信号の量子化幅を異なる値に設定することが可能な方式を採用しているが、一般のH.264/AVCエンコーダでは、クロマQPオフセットを“0”として符号化している。
これに対して、H.264/AVCエンコードコア部12では、マクロブロック毎に圧縮符号化を実施する際、クロマQPオフセット決定部11により決定されたクロマQPオフセットに応じて、動画像データにおける輝度信号及び色差信号に割り当てる符号量を設定して、各マクロブロックをH.264/AVC符号化している。
なお、H.264/AVCエンコードコア部12は圧縮符号化手段を構成している。
H. The H.264 / AVC encoding core unit 12 is an H.264 / AVC encoding core unit. H.264 / AVC encoding method is adopted, each picture of moving image data is divided into macroblock units, compression encoding is performed for each macroblock, and the encoding setting indicated by the encoding setting information is performed. A process of outputting a bit stream satisfying the contents is executed.
H. The H.264 / AVC encoding core unit 12 is a general H.264 standard. Similar to the H.264 / AVC encoder, a macroblock is used as a unit, and compression coding is performed based on intra pixel prediction / motion search / compensation technology and orthogonal transform / transform coefficient quantization / variable length coding technology. It is.
However, ITU-TH. H.264 uses a method that can set the quantization width of the luminance signal and the color difference signal to different values. The H.264 / AVC encoder encodes the chroma QP offset as “0”.
On the other hand, H.H. In the H.264 / AVC encoding core unit 12, when compression encoding is performed for each macroblock, codes assigned to luminance signals and color difference signals in moving image data according to the chroma QP offset determined by the chroma QP offset determination unit 11 Set the amount of each macroblock. H.264 / AVC encoding.
H. The H.264 / AVC encoding core unit 12 constitutes compression encoding means.

図4はこの発明の実施の形態1による動画像符号化装置1のクロマQPオフセット決定部11を示す構成図である。
図4において、マクロブロック平均符号量算出部11aは符号化設定情報が示す符号化の設定内容に含まれているビットレート、フレームレート及び画像解像度からマクロブロック平均符号量(単位領域当りの符号量)の期待値として、マクロブロック平均符号量avg_code_per_MBを算出する処理を実施する。
FIG. 4 is a block diagram showing the chroma QP offset determining unit 11 of the moving picture encoding apparatus 1 according to Embodiment 1 of the present invention.
In FIG. 4, the macroblock average code amount calculation unit 11a calculates the macroblock average code amount (the code amount per unit area) from the bit rate, the frame rate, and the image resolution included in the encoding setting content indicated by the encoding setting information. ) To calculate the macroblock average code amount avg_code_per_MB.

クロマQPオフセット算出部11bはマクロブロック平均符号量算出部11aにより算出されたマクロブロック平均符号量avg_code_per_MBからクロマQPオフセットを算出する処理を実施する。
即ち、クロマQPオフセット算出部11bはマクロブロック平均符号量avg_code_per_MBに対する閾値処理を実施することで、マクロブロック平均符号量avg_code_per_MBが小さい場合には、大きな値のクロマQPオフセットを算出し、マクロブロック平均符号量avg_code_per_MBが大きい場合には、小さな値のクロマQPオフセットを算出する。
図5はクロマQPオフセット算出部11bにおける閾値処理の一例を示す説明図である。
The chroma QP offset calculation unit 11b performs a process of calculating a chroma QP offset from the macroblock average code amount avg_code_per_MB calculated by the macroblock average code amount calculation unit 11a.
That is, the chroma QP offset calculation unit 11b performs threshold processing on the macroblock average code amount avg_code_per_MB, and when the macroblock average code amount avg_code_per_MB is small, calculates a large value of the chroma QP offset, When the amount avg_code_per_MB is large, a chroma QP offset having a small value is calculated.
FIG. 5 is an explanatory diagram showing an example of threshold processing in the chroma QP offset calculation unit 11b.

次に動作について説明する。
クロマQPオフセット決定部11は、外部から符号化設定情報が与えられると、その符号化設定情報が示す符号化の設定内容に応じて、クロマQPオフセットを決定する。
即ち、クロマQPオフセット決定部11のマクロブロック平均符号量算出部11aは、下記の式(1)に示すように、符号化設定情報が示す符号化の設定内容に含まれているビットレート、フレームレート及び画像解像度からマクロブロック平均符号量の期待値として、マクロブロック平均符号量avg_code_per_MBを算出する。
Next, the operation will be described.
When the encoding setting information is given from the outside, the chroma QP offset determining unit 11 determines the chroma QP offset according to the encoding setting content indicated by the encoding setting information.
That is, the macroblock average code amount calculation unit 11a of the chroma QP offset determination unit 11 performs the bit rate and frame included in the encoding setting content indicated by the encoding setting information as shown in the following equation (1). The macroblock average code amount avg_code_per_MB is calculated as an expected value of the macroblock average code amount from the rate and the image resolution.

avg_code_per_MB
=bit_rate
/((width/16)×(height/16)×frame_rate)
(1)
ただし、bit_rate:ビットレート(bits/sec)
frame_rate:フレームレート(frames/sec)
width,height:画像解像度(pixels)
avg_code_per_MB
= Bit_rate
/ ((Width / 16) × (height / 16) × frame_rate)
(1)
Bit_rate: Bit rate (bits / sec)
frame_rate: Frame rate (frames / sec)
width, height: image resolution (pixels)

一般に、符号化設定情報が示す符号化の設定内容のうち、ピクチャ単位に値が変化するのは符号化ピクチャタイプだけである。
このため、式(1)の計算は、H.264/AVCエンコードコア部12がH.264/AVC符号化を開始する前に、外部から符号化設定情報が与えられたときに、1回だけ実施すれば十分であり、クロマQPオフセット算出部11bにおける演算の処理量として、極めて少ないものとなる。
Generally, only the encoded picture type has a value that changes in units of pictures among the encoding setting contents indicated by the encoding setting information.
For this reason, the calculation of equation (1) H.264 / AVC encoding core unit 12 is H.264. Before the start of H.264 / AVC encoding, when encoding setting information is given from the outside, it is sufficient to perform only once, and the amount of processing in the chroma QP offset calculation unit 11b is extremely small. It becomes.

クロマQPオフセット算出部11bは、マクロブロック平均符号量算出部11aがマクロブロック平均符号量avg_code_per_MBを算出すると、そのマクロブロック平均符号量avg_code_per_MBに対する閾値処理を実施することで、マクロブロック平均符号量avg_code_per_MBが小さい場合には、大きな値のクロマQPオフセットを算出し、マクロブロック平均符号量avg_code_per_MBが大きい場合には、小さな値のクロマQPオフセットを算出する。   When the macroblock average code amount calculation unit 11a calculates the macroblock average code amount avg_code_per_MB, the chroma QP offset calculation unit 11b performs the threshold processing on the macroblock average code amount avg_code_per_MB, thereby obtaining the macroblock average code amount avg_code_per_MB. When the value is small, the chroma QP offset having a large value is calculated. When the macroblock average code amount avg_code_per_MB is large, the chroma QP offset having a small value is calculated.

例えば、5段階の閾値処理を実施する場合には、予め、4つの閾値Th1〜Th4(Th<Th2<Th3<Th4)を設定し、図5に示すように、マクロブロック平均符号量avg_code_per_MBが閾値Th1未満であれば、クロマQPオフセットを“+12”に決定する。
マクロブロック平均符号量avg_code_per_MBが閾値Th1以上であるが、閾値Th2未満であれば、クロマQPオフセットを“+6”に決定する。
同様に、マクロブロック平均符号量avg_code_per_MBが閾値Th2以上であるが、閾値Th3未満であれば、クロマQPオフセットを“0”に決定し、マクロブロック平均符号量avg_code_per_MBが閾値Th3以上であるが、閾値Th4未満であれば、クロマQPオフセットを“−6”に決定する。
また、マクロブロック平均符号量avg_code_per_MBが閾値Th4以上であれば、クロマQPオフセットを“−12”に決定する。
ここでは、クロマQPオフセット算出部11bが5段階の閾値処理を実施するものについて示したが、これは一例に過ぎず、例えば、より細かな25段階の閾値処理を実施するようにしてもよい。
For example, when five levels of threshold processing are performed, four threshold values Th1 to Th4 (Th <Th2 <Th3 <Th4) are set in advance, and as shown in FIG. 5, the macroblock average code amount avg_code_per_MB is a threshold value. If it is less than Th1, the chroma QP offset is determined to be “+12”.
If the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th1, but less than the threshold Th2, the chroma QP offset is determined to be “+6”.
Similarly, if the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th2, but if it is less than the threshold Th3, the chroma QP offset is determined to be “0” and the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th3. If it is less than Th4, the chroma QP offset is determined to be “−6”.
If the macroblock average code amount avg_code_per_MB is greater than or equal to the threshold Th4, the chroma QP offset is determined to be “−12”.
In this example, the chroma QP offset calculation unit 11b performs the five-step threshold processing. However, this is only an example, and for example, more detailed 25-step threshold processing may be performed.

H.264/AVCエンコードコア部12は、動画像データと符号化設定情報を入力すると、その動画像データの各ピクチャをマクロブロック単位に分割し、マクロブロック毎に圧縮符号化を実施して、その符号化設定情報が示す符号化の設定内容を満足するビットストリームを出力する。
ただし、H.264/AVCエンコードコア部12は、マクロブロック毎に圧縮符号化を実施する際、クロマQPオフセット決定部11により決定されたクロマQPオフセットに応じて、動画像データにおける輝度信号及び色差信号に割り当てる符号量を設定して、各マクロブロックをH.264/AVC符号化する。
H. When the moving image data and the encoding setting information are input, the H.264 / AVC encoding core unit 12 divides each picture of the moving image data into macroblock units, performs compression encoding for each macroblock, A bit stream that satisfies the encoding setting content indicated by the encoding setting information is output.
However, H. The H.264 / AVC encoding core unit 12 is a code assigned to a luminance signal and a color difference signal in moving image data according to the chroma QP offset determined by the chroma QP offset determination unit 11 when performing compression encoding for each macroblock. Set the amount of each macroblock. H.264 / AVC encoding.

即ち、H.264/AVCエンコードコア部12は、クロマQPオフセット決定部11により決定されたクロマQPオフセットの値が大きい場合(マクロブロック平均符号量avg_code_per_MBが小さい場合)、与えられる少ない符号量を輝度に重点的に割り振るようにする。これにより、マクロブロック平均符号量avg_code_per_MBが小さい場合には、輝度が重視されることになり、その結果、主観画質が向上する利点が得られる。
一方、クロマQPオフセット決定部11により決定されたクロマQPオフセットの値が小さい場合(マクロブロック平均符号量avg_code_per_MBが大きい場合)、与えられる大きな符号量を色差にも十分に割り振るようにする。これにより、マクロブロック平均符号量avg_code_per_MBが大きい場合には、色差信号にも十分な符号量が割り当てられることになり、その結果、主観画質が向上する利点が得られる。
That is, H.C. When the chroma QP offset value determined by the chroma QP offset determination unit 11 is large (when the macroblock average code amount avg_code_per_MB is small), the H.264 / AVC encoding core unit 12 focuses on the small code amount given to luminance. Try to allocate. As a result, when the macroblock average code amount avg_code_per_MB is small, the luminance is emphasized, and as a result, the advantage of improving the subjective image quality is obtained.
On the other hand, when the value of the chroma QP offset determined by the chroma QP offset determination unit 11 is small (when the macroblock average code amount avg_code_per_MB is large), the given large code amount is sufficiently allocated to the color difference. As a result, when the macroblock average code amount avg_code_per_MB is large, a sufficient code amount is also assigned to the color difference signal, and as a result, an advantage of improving the subjective image quality is obtained.

以上で明らかなように、この実施の形態1によれば、符号化設定情報が示す符号化の設定内容に応じてクロマQPオフセットを決定するクロマQPオフセット決定部11を設け、H.264/AVCエンコードコア部12がマクロブロック毎に圧縮符号化を実施する際、クロマQPオフセット決定部11により決定されたクロマQPオフセットに応じて、動画像データにおける輝度信号及び色差信号に割り当てる符号量を設定するように構成しているので、色差を重視して符号化する場合に限らず、輝度を重視して符号化する場合にも、リアルタイム処理に適用可能な少ない処理量で、画質の向上を図ることができる効果を奏する。   As apparent from the above, according to the first embodiment, the chroma QP offset determining unit 11 that determines the chroma QP offset according to the setting content of the encoding indicated by the encoding setting information is provided. When the H.264 / AVC encoding core unit 12 performs compression encoding for each macroblock, the code amount allocated to the luminance signal and the color difference signal in the moving image data according to the chroma QP offset determined by the chroma QP offset determination unit 11 Therefore, not only when encoding with emphasis on color difference but also when encoding with emphasis on luminance, image quality can be improved with a small amount of processing applicable to real-time processing. The effect which can aim at is produced.

即ち、この実施の形態1によれば、マクロブロック平均符号量算出部11aがビットレート、フレームレート及び画像解像度からマクロブロック平均符号量avg_code_per_MBを算出し、クロマQPオフセット算出部11bがマクロブロック平均符号量算出部11aにより算出されたマクロブロック平均符号量avg_code_per_MBからクロマQPオフセットを算出するように構成したので、H.264/AVC符号化を開始する前に、外部から符号化設定情報が与えられたときに、1回だけクロマQPオフセットを算出すればよく、少ない演算の処理量で、輝度と色差のバランスをとることができる効果を奏する。   That is, according to the first embodiment, the macroblock average code amount calculation unit 11a calculates the macroblock average code amount avg_code_per_MB from the bit rate, the frame rate, and the image resolution, and the chroma QP offset calculation unit 11b calculates the macroblock average code amount. Since the chroma QP offset is calculated from the macroblock average code amount avg_code_per_MB calculated by the amount calculation unit 11a, Before starting the H.264 / AVC encoding, when the encoding setting information is given from the outside, the chroma QP offset needs to be calculated only once, and the luminance and color difference are balanced with a small amount of processing. There is an effect that can be.

実施の形態2.
図6はこの発明の実施の形態2による動画像符号化装置1を示す構成図であり、図において、図3と同一符号は同一又は相当部分を示すので説明を省略する。
クロマQPオフセット決定部13は図3のクロマQPオフセット決定部11と同様に、符号化設定情報が示す符号化の設定内容に応じてクロマQPオフセットを決定する処理を実施する。
ただし、クロマQPオフセットの決定方法が、図3のクロマQPオフセット決定部11と相違している。
なお、クロマQPオフセット決定部13はオフセット値決定手段を構成している。
Embodiment 2. FIG.
6 is a block diagram showing a moving picture encoding apparatus 1 according to Embodiment 2 of the present invention. In the figure, the same reference numerals as those in FIG.
Similar to the chroma QP offset determination unit 11 in FIG. 3, the chroma QP offset determination unit 13 performs a process of determining a chroma QP offset according to the encoding setting content indicated by the encoding setting information.
However, the chroma QP offset determining method is different from the chroma QP offset determining unit 11 of FIG.
The chroma QP offset determining unit 13 constitutes an offset value determining unit.

図7はこの発明の実施の形態2による動画像符号化装置1のクロマQPオフセット決定部13を示す構成図である。
図7において、クロマQPオフセット算出部13aは符号化設定情報が示す符号化の設定内容に含まれているピクチャタイプに応じてクロマQPオフセットを算出する処理を実施する。
FIG. 7 is a block diagram showing the chroma QP offset determination unit 13 of the moving picture coding apparatus 1 according to Embodiment 2 of the present invention.
In FIG. 7, a chroma QP offset calculation unit 13a performs a process of calculating a chroma QP offset according to the picture type included in the setting content of encoding indicated by the encoding setting information.

次に動作について説明する。
ただし、上記実施の形態1と比較して、図3のクロマQPオフセット決定部11の代わりに、クロマQPオフセット決定部13が設けられた点以外は同様であるため、クロマQPオフセット決定部13の動作のみを説明する。
Next, the operation will be described.
However, as compared with the first embodiment, since the chroma QP offset determining unit 13 in FIG. 3 is replaced by a chroma QP offset determining unit 13, the chroma QP offset determining unit 13 has the same configuration. Only the operation will be described.

クロマQPオフセット決定部13のクロマQPオフセット算出部13aは、外部から符号化設定情報が与えられると、その符号化設定情報が示す符号化の設定内容に含まれている符号化ピクチャタイプに応じてクロマQPオフセットを算出する。
具体的には、下記のようにして、クロマQPオフセットを決定する例が考えられる。
例えば、符号化ピクチャタイプがIピクチャの場合には、クロマQPオフセットを“0”に決定する。
また、符号化ピクチャタイプがPピクチャや参照Bピクチャの場合には、クロマQPオフセットを“+6”に決定し、符号化ピクチャタイプが非参照Bピクチャの場合には、クロマQPオフセットを“+12”に決定する。
When the coding setting information is given from the outside, the chroma QP offset calculating unit 13a of the chroma QP offset determining unit 13 responds to the coded picture type included in the coding setting content indicated by the coding setting information. A chroma QP offset is calculated.
Specifically, an example in which the chroma QP offset is determined as follows can be considered.
For example, when the encoded picture type is an I picture, the chroma QP offset is determined to be “0”.
When the encoded picture type is a P picture or a reference B picture, the chroma QP offset is determined to be “+6”, and when the encoded picture type is a non-reference B picture, the chroma QP offset is set to “+12”. To decide.

一般のH.264/AVC符号化では、すべての符号化画像にとって、参照元を辿っていけば、すべてIピクチャに辿り着くことが知られている。
つまり、IピクチャでクロマQPオフセットを“0”として、色差信号を輝度信号と同等に扱って符号化しておくことにより、PピクチャやBピクチャで、クロマQPオフセットを“+6”や“+12”として色差信号を軽視したとしても、その参照元であるIピクチャで符号化された色差信号を参照しつつ間接的に引き継ぐことが可能であり、結果として、全体の主観画質を向上する効果が得られる。
General H. In H.264 / AVC encoding, it is known that all encoded images can reach all I pictures if the reference source is traced.
In other words, the chroma QP offset is set to “0” in the I picture and the color difference signal is handled in the same manner as the luminance signal, and the chroma QP offset is set to “+6” or “+12” in the P picture or B picture. Even if the color difference signal is neglected, it can be taken over indirectly while referring to the color difference signal encoded by the I picture that is the reference source. As a result, the effect of improving the overall subjective image quality can be obtained. .

同様の理由で、参照される可能性のあるPピクチャや参照Bピクチャについては、クロマQPオフセットを“+6”程度としておき、参照されない非参照Bピクチャについては、クロマQPオフセットを“+12”とすることで、参照される可能性のある画像について、色差信号の扱いをやや重視しておくことで、全体の主観画質を向上する効果が得られる。   For the same reason, the chroma QP offset is set to about “+6” for P pictures and reference B pictures that may be referred to, and the chroma QP offset is set to “+12” for non-reference B pictures that are not referenced. Thus, with respect to an image that can be referred to, the effect of improving the overall subjective image quality can be obtained by placing a little emphasis on the handling of the color difference signal.

以上で明らかなように、この実施の形態2によれば、クロマQPオフセット算出部13aがピクチャタイプに応じてクロマQPオフセットを算出するように構成したので、参照されない画像ほど、色差信号を軽視するようにクロマQPオフセットを決定することが可能になり、結果的に全体の主観画質の向上につながる効果が得られる。   As is apparent from the above, according to the second embodiment, the chroma QP offset calculation unit 13a is configured to calculate the chroma QP offset according to the picture type. Thus, it is possible to determine the chroma QP offset, and as a result, an effect of improving the overall subjective image quality can be obtained.

実施の形態3.
図8はこの発明の実施の形態3による動画像符号化装置1を示す構成図であり、図において、図3と同一符号は同一又は相当部分を示すので説明を省略する。
クロマQPオフセット決定部14は図3のクロマQPオフセット決定部11と同様に、符号化設定情報が示す符号化の設定内容に応じてクロマQPオフセットを決定する処理を実施する。
ただし、クロマQPオフセットの決定方法が、図3のクロマQPオフセット決定部11と相違している。
なお、クロマQPオフセット決定部14はオフセット値決定手段を構成している。
Embodiment 3 FIG.
FIG. 8 is a block diagram showing a moving picture encoding apparatus 1 according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG.
Similarly to the chroma QP offset determination unit 11 of FIG. 3, the chroma QP offset determination unit 14 performs a process of determining the chroma QP offset according to the encoding setting content indicated by the encoding setting information.
However, the chroma QP offset determining method is different from the chroma QP offset determining unit 11 of FIG.
The chroma QP offset determining unit 14 constitutes an offset value determining unit.

図9はこの発明の実施の形態3による動画像符号化装置1のクロマQPオフセット決定部14を示す構成図である。
図9において、クロマQPオフセット算出部14aは符号化設定情報が示す符号化の設定内容に含まれている符号化モード情報(画質重視であるのか、動き重視であるのかを示す情報)に応じてクロマQPオフセットを算出する処理を実施する。
FIG. 9 is a block diagram showing the chroma QP offset determining unit 14 of the moving picture coding apparatus 1 according to Embodiment 3 of the present invention.
In FIG. 9, the chroma QP offset calculation unit 14a responds to encoding mode information (information indicating whether image quality is important or motion is important) included in the setting content of encoding indicated by the encoding setting information. A process of calculating a chroma QP offset is performed.

次に動作について説明する。
ただし、上記実施の形態1と比較して、図3のクロマQPオフセット決定部11の代わりに、クロマQPオフセット決定部14が設けられた点以外は同様であるため、クロマQPオフセット決定部14の動作のみを説明する。
Next, the operation will be described.
However, as compared with the first embodiment, since the chroma QP offset determining unit 14 in FIG. 3 is replaced by a chroma QP offset determining unit 14, the chroma QP offset determining unit 14 has the same configuration. Only the operation will be described.

クロマQPオフセット決定部14のクロマQPオフセット算出部14aは、外部から符号化設定情報が与えられると、その符号化設定情報が示す符号化の設定内容に含まれている符号化モード情報に応じてクロマQPオフセットを算出する。
具体的には、下記のようにして、クロマQPオフセットを決定する例が考えられる。
例えば、符号化モード情報が画質重視である旨を示していれば、クロマQPオフセットを“0”に決定し、その符号化モード情報が動き重視である旨を示していれば、クロマQPオフセットを“+12”に決定する。
When the coding setting information is given from the outside, the chroma QP offset calculating unit 14a of the chroma QP offset determining unit 14 responds to the coding mode information included in the coding setting content indicated by the coding setting information. A chroma QP offset is calculated.
Specifically, an example in which the chroma QP offset is determined as follows can be considered.
For example, if the encoding mode information indicates that image quality is important, the chroma QP offset is determined to be “0”, and if the encoding mode information indicates that motion is important, the chroma QP offset is determined. Determine “+12”.

一般のH.264/AVC符号化では、特に、符号化設定情報が示す符号化の設定内容に含まれているビットレートの値が小さい場合、そのビットレートを満足するように符号化することが困難であることがよくある。
このような場合、画質を保ちながら、コマ落としを行うことで、小さいビットレートを維持する際には、「画質重視」である旨を示す符号化モード情報を含む符号化設定情報が動画像符号化装置1に与えられ、逆に、画質を落としてでも、フレームレートを維持する際には、「動き重視」である旨を示す符号化モード情報を含む符号化設定情報が動画像符号化装置1に与えられるのが一般的である。
General H. In H.264 / AVC encoding, particularly when the bit rate value included in the encoding setting content indicated by the encoding setting information is small, it is difficult to perform encoding so as to satisfy the bit rate. There is often.
In such a case, when maintaining a small bit rate by performing frame dropping while maintaining the image quality, the coding setting information including the coding mode information indicating that “image quality is emphasized” is the moving image code. On the other hand, when the frame rate is maintained even when the image quality is lowered, the encoding setting information including the encoding mode information indicating “motion-oriented” is given to the moving image encoding device. Generally, it is given to 1.

したがって、クロマQPオフセット算出部14aは、画質重視の場合、輝度と色差の扱いを同等にして、できるだけ画質を保つことになる。また、動き重視の場合、色差を最大限軽視してでも、できるだけコマが落ちないようにすることになり、その結果として、所望の符号化設定情報にできる限り従う形で、符号化が行われることになるため、結果的に全体の主観画質を向上する効果が得られる。   Therefore, the chroma QP offset calculation unit 14a maintains the image quality as much as possible by making the handling of the luminance and the color difference equal when the image quality is important. In addition, in the case of emphasizing motion, even if the color difference is neglected to the utmost, frames are prevented from dropping as much as possible, and as a result, encoding is performed in a manner that complies with the desired encoding setting information as much as possible. As a result, the effect of improving the overall subjective image quality can be obtained.

この実施の形態3では、符号化モード情報が、画質重視であるのか、動き重視であるのかを示す情報であるものについて示したが、「画質重視」と「動き重視」の2段階ではなく、例えば、「やや画質重視」や「やや動き重視」などを含めて、数多くの段階に分ける符号化モード情報を入力して、クロマQPオフセットをきめ細かく決定するようにしてもよい。   In the third embodiment, the encoding mode information is information indicating whether the image quality is important or the motion is important. However, the encoding mode information is not two stages of “image quality importance” and “motion importance”. For example, the chroma QP offset may be determined finely by inputting coding mode information divided into a number of stages, including “slightly emphasizing image quality” and “slightly emphasizing motion”.

以上で明らかなように、この実施の形態3によれば、クロマQPオフセット算出部14aが符号化モード情報(画質重視であるのか、動き重視であるのかを示す情報)に応じてクロマQPオフセットを算出するように構成したので、動きを重視するモードであるほど、色差を軽視するようにクロマQPオフセットを決定することが可能になり、その結果として、所望の符号化設定情報にできる限り従う形で符号化が行われることになるため、全体の主観画質の向上につながる効果が得られる。   As apparent from the above, according to the third embodiment, the chroma QP offset calculation unit 14a sets the chroma QP offset according to the coding mode information (information indicating whether the image quality is important or the motion is important). Since it is configured to calculate, it is possible to determine the chroma QP offset so that the color difference is neglected as the mode in which the movement is emphasized, and as a result, the mode that follows the desired encoding setting information as much as possible. Therefore, the effect of improving the overall subjective image quality can be obtained.

実施の形態4.
図10はこの発明の実施の形態4による動画像符号化装置1を示す構成図であり、図において、図3と同一符号は同一又は相当部分を示すので説明を省略する。
シーンチェンジ検出部15は動画像データを監視してシーンチェンジを検出し、シーンチェンジの有無を示すシーンチェンジ情報を出力する処理を実施する。
クロマQPオフセット決定部16は符号化設定情報が示す符号化の設定内容と、シーンチェンジ検出部15から出力されるシーンチェンジ情報とに応じて、クロマQPオフセットを決定する処理を実施する。
なお、クロマQPオフセット決定部16はオフセット値決定手段を構成している。
Embodiment 4 FIG.
10 is a block diagram showing a moving picture encoding apparatus 1 according to Embodiment 4 of the present invention. In the figure, the same reference numerals as those in FIG.
The scene change detection unit 15 monitors the moving image data, detects a scene change, and executes a process of outputting scene change information indicating the presence or absence of the scene change.
The chroma QP offset determining unit 16 performs a process of determining a chroma QP offset according to the encoding setting content indicated by the encoding setting information and the scene change information output from the scene change detecting unit 15.
The chroma QP offset determining unit 16 constitutes an offset value determining unit.

図11はこの発明の実施の形態4による動画像符号化装置1のクロマQPオフセット決定部16を示す構成図である。
図11において、クロマQPオフセット算出部16aは符号化設定情報が示す符号化の設定内容に含まれているピクチャタイプと、シーンチェンジ検出部15から出力されるシーンチェンジ情報とに応じて、クロマQPオフセットを算出する処理を実施する。
FIG. 11 is a block diagram showing the chroma QP offset determining unit 16 of the moving picture coding apparatus 1 according to Embodiment 4 of the present invention.
In FIG. 11, the chroma QP offset calculation unit 16 a performs chroma QP according to the picture type included in the setting content of encoding indicated by the encoding setting information and the scene change information output from the scene change detection unit 15. A process for calculating the offset is performed.

次に動作について説明する。
ただし、上記実施の形態1と比較して、図3のクロマQPオフセット決定部11の代わりに、クロマQPオフセット決定部16が設けられ、動画像符号化装置1の外部にシーンチェンジ検出部15が設けられている点で相違している。
Next, the operation will be described.
However, as compared with the first embodiment, a chroma QP offset determining unit 16 is provided instead of the chroma QP offset determining unit 11 in FIG. 3, and a scene change detecting unit 15 is provided outside the moving image encoding device 1. It differs in that it is provided.

シーンチェンジ検出部15は、動画像符号化装置1に与えられる動画像データを監視してシーンチェンジを検出し、シーンチェンジの有無を示すシーンチェンジ情報をクロマQPオフセット決定部16に出力する。
ただし、シーンチェンジの検出処理は公知の技術であるため、ここでは詳細な説明を省略する。
The scene change detection unit 15 monitors the moving image data provided to the moving image encoding device 1 to detect a scene change, and outputs scene change information indicating the presence or absence of a scene change to the chroma QP offset determination unit 16.
However, since the scene change detection process is a known technique, a detailed description thereof is omitted here.

クロマQPオフセット決定部16のクロマQPオフセット算出部16aは、シーンチェンジ検出部15からシーンチェンジ情報を受けると、そのシーンチェンジ情報と符号化ピクチャタイプに応じてクロマQPオフセットを算出する。
具体的には、下記のようにして、クロマQPオフセットを決定する例が考えられる。
例えば、シーンチェンジ検出部15から出力されたシーンチェンジ情報が「シーンチェンジあり」を示し、かつ、符号化ピクチャタイプが「Iピクチャ以外」であれば、クロマQPオフセットを“+12”に決定し、シーンチェンジ情報が「シーンチェンジなし」を示し、あるいは、符号化ピクチャタイプが「Iピクチャ」であれば、クロマQPオフセットを“0”に決定する。
When the chroma QP offset calculation unit 16a of the chroma QP offset determination unit 16 receives the scene change information from the scene change detection unit 15, the chroma QP offset calculation unit 16a calculates a chroma QP offset according to the scene change information and the encoded picture type.
Specifically, an example in which the chroma QP offset is determined as follows can be considered.
For example, if the scene change information output from the scene change detection unit 15 indicates “with scene change” and the encoded picture type is “other than I picture”, the chroma QP offset is determined to be “+12”, If the scene change information indicates “no scene change” or the encoded picture type is “I picture”, the chroma QP offset is determined to be “0”.

一般のH.264/AVC符号化では、Iピクチャについては、参照画像がなく、圧縮効率的に低いにもかかわらず、間接的に全ての画像から参照されるような重要な画像であるために、PピクチャやBピクチャよりも、かなり多くの符号量が割り当てられるのが普通である。
また一般に、IピクチャとPピクチャとBピクチャの切り替えは、例えば、符号化順でIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBB…などのように、単に画像の順番だけで決定される場合が多くある。
しかし、シーンチェンジが何処にあるのか一般には分からないため、シーンチェンジがたまたまIピクチャになる可能性は極めて低い。
PピクチャやBピクチャにシーンチェンジがあたると、一般には想定された割り当て符号量より突発的に大きな符号量が発生するため、その後でビットレートを保つためのコマ落ちが発生し易くなってしまう。
このようなシーンチェンジを要因とする急激な符号量の発生を防ぐためには、「シーンチェンジあり」かつ「ピクチャタイプがIピクチャ以外」の場合に、クロマQPオフセットを“+12”として出力すればよい。
General H. In H.264 / AVC coding, an I picture has no reference image and is an important image that is indirectly referenced from all images even though the compression efficiency is low. Usually, a considerably larger amount of code is assigned than B picture.
In general, switching between an I picture, a P picture, and a B picture is often determined only by the order of images, for example, IBBPBBPBBPBBPBBIBBBPBBPBBPBBPBBIBBPBB.
However, since it is generally unknown where the scene change is, the possibility that the scene change happens to be an I picture is extremely low.
When a scene change occurs in a P picture or a B picture, a code amount that is suddenly larger than an assumed assigned code amount is generally generated, so that frame dropping for maintaining a bit rate is likely to occur thereafter.
In order to prevent abrupt code generation due to such a scene change, the chroma QP offset may be output as “+12” when “there is a scene change” and “the picture type is other than I picture”. .

そこで、クロマQPオフセット決定部16のクロマQPオフセット算出部16aは、上述したように、シーンチェンジ情報が「シーンチェンジあり」を示し、かつ、符号化ピクチャタイプが「Iピクチャ以外」であれば、クロマQPオフセットを“+12”に決定することで、PピクチャやBピクチャなどの割り当て符号量が少ないピクチャタイプでシーンチェンジが発生した場合における突発的な符号量の大量発生を抑えることを可能にして、コマ落ちを防ぐようにしている。   Therefore, as described above, the chroma QP offset calculation unit 16a of the chroma QP offset determination unit 16 indicates that the scene change information indicates “with scene change” and the encoded picture type is “other than I picture”. By determining the chroma QP offset to “+12”, it is possible to suppress a sudden large amount of code generation when a scene change occurs in a picture type with a small allocated code amount such as a P picture or B picture. , I try to prevent dropped frames.

以上で明らかなように、この実施の形態4によれば、クロマQPオフセット算出部16aが符号化設定情報が示す符号化の設定内容に含まれているピクチャタイプと、シーンチェンジ検出部15から出力されるシーンチェンジ情報とに応じて、クロマQPオフセットを算出するように構成したので、PピクチャやBピクチャなどの割り当て符号量が少ないピクチャタイプでシーンチェンジが発生した場合における突発的な符号量の大量発生を抑えることを可能にして、コマ落ちを防ぐことができるようになり、その結果として、所望の符号化設定情報にできる限り従う形で符号化が行われることになるため、全体の主観画質の向上につながる効果が得られる。   As is apparent from the above, according to the fourth embodiment, the chroma QP offset calculation unit 16a outputs the picture type included in the encoding setting content indicated by the encoding setting information and the scene change detection unit 15. Since the chroma QP offset is calculated in accordance with the scene change information to be changed, the sudden code amount when a scene change occurs in a picture type with a small assigned code amount such as a P picture or B picture. It is possible to suppress a large number of occurrences and prevent frame dropping, and as a result, encoding is performed in a manner that follows the desired encoding setting information as much as possible. An effect that leads to an improvement in image quality can be obtained.

実施の形態5.
図12はこの発明の実施の形態5による動画像符号化装置1を示す構成図であり、図において、図3と同一符号は同一又は相当部分を示すので説明を省略する。
クロマQPオフセット決定部17は符号化設定情報が示す符号化の設定内容に含まれているビットレート及びフレームレート等から、その設定内容に含まれているピクチャタイプの符号量の期待値を算出し、その符号量の期待値とH.264/AVCエンコードコア部12から出力されたビットストリーム(1つ前のピクチャの動画像圧縮データ)の符号量とに応じて、クロマQPオフセットを決定する処理を実施する。
なお、クロマQPオフセット決定部17はオフセット値決定手段を構成している。
Embodiment 5 FIG.
FIG. 12 is a block diagram showing a moving picture encoding apparatus 1 according to Embodiment 5 of the present invention. In the figure, the same reference numerals as those in FIG.
The chroma QP offset determination unit 17 calculates the expected value of the code amount of the picture type included in the setting content from the bit rate and the frame rate included in the setting content of the encoding indicated by the encoding setting information. , The expected value of the code amount and H.264. A process for determining a chroma QP offset is performed according to the code amount of the bit stream (moving image compressed data of the previous picture) output from the H.264 / AVC encoding core unit 12.
The chroma QP offset determining unit 17 constitutes an offset value determining unit.

図13はこの発明の実施の形態5による動画像符号化装置1のクロマQPオフセット決定部17を示す構成図である。
図13において、ピクチャ平均符号量算出部17aは符号化設定情報が示す符号化の設定内容に含まれているビットレート及びフレームレート等から、その設定内容に含まれているピクチャタイプの符号量の期待値として、ピクチャ平均符号量を算出する処理を実施する。
クロマQPオフセット算出部17bはピクチャ平均符号量算出部17aにより算出されたピクチャ平均符号量と、H.264/AVCエンコードコア部12から出力されたビットストリーム(1つ前のピクチャの動画像圧縮データ)の符号量とを比較して、クロマQPオフセットを算出する処理を実施する。
FIG. 13 is a block diagram showing the chroma QP offset determining unit 17 of the moving picture coding apparatus 1 according to Embodiment 5 of the present invention.
In FIG. 13, the picture average code amount calculation unit 17a determines the code amount of the picture type included in the setting content from the bit rate and the frame rate included in the setting content of encoding indicated by the encoding setting information. A process of calculating the average picture code amount as the expected value is performed.
The chroma QP offset calculation unit 17b is configured to calculate the picture average code amount calculated by the picture average code amount calculation unit 17a, H.264 / AVC encoding core unit 12 is compared with the code amount of the bit stream (moving image compressed data of the previous picture) to calculate a chroma QP offset.

次に動作について説明する。
ただし、上記実施の形態1と比較して、図3のクロマQPオフセット決定部11の代わりに、クロマQPオフセット決定部17が設けられた点以外は同様であるため、クロマQPオフセット決定部17の動作のみを説明する。
Next, the operation will be described.
However, as compared with the first embodiment, since the chroma QP offset determining unit 17 is the same as the chroma QP offset determining unit 17 in FIG. 3 except that a chroma QP offset determining unit 17 is provided, the chroma QP offset determining unit 17 Only the operation will be described.

クロマQPオフセット決定部17のピクチャ平均符号量算出部17aは、外部から符号化設定情報が与えられると、下記の式(2)に示すように、その符号化設定情報が示す符号化の設定内容に含まれているビットレート及びフレームレート等から、その設定内容に含まれているピクチャタイプ(I,P,Bのいずれかのピクチャタイプ)の符号量の期待値として、ピクチャ平均符号量avg_code_per_PIC_X(X=I,P,Bのいずれか)を算出する。   When the picture average code amount calculation unit 17a of the chroma QP offset determination unit 17 is provided with encoding setting information from the outside, as shown in the following equation (2), the setting contents of encoding indicated by the encoding setting information As the expected value of the code amount of the picture type (any one of I, P, and B) included in the setting content from the bit rate and frame rate included in the picture, the picture average code amount avg_code_per_PIC_X ( X = I, P, or B) is calculated.

・ avg_code_per_PIC_B
=((1+np+nb)×bit_rate)
/((wi+np・wp+nb)×frame_rate)
・ avg_code_per_PIC_P
=avg_code_per_PIC_B×wp
・ avg_code_per_PIC_I
=avg_code_per_PIC_B×wi
(2)
ただし、bit_rate:ビットレート(bits/sec)
frame_rate:フレームレート(frames/sec)
np:1GOPに含まれるPピクチャ数
nb:1GOPに含まれるBピクチャ数
wi,wp:I/P/B各ピクチャのピクチャ符号量期待値比
Avg_code_per_PIC_B
= ((1 + np + nb) × bit_rate)
/ ((Wi + np · wp + nb) × frame_rate)
Avg_code_per_PIC_P
= Avg_code_per_PIC_B × wp
Avg_code_per_PIC_I
= Avg_code_per_PIC_B × wi
(2)
Bit_rate: Bit rate (bits / sec)
frame_rate: Frame rate (frames / sec)
np: Number of P pictures included in 1 GOP
nb: Number of B pictures included in 1 GOP
wi, wp: Expected picture code amount ratio of each picture of I / P / B

このため、式(2)の計算は、1ピクチャの符号化に対して、1回で十分であるため、ピクチャ平均符号量算出部17aにおける演算の処理量として、極めて少ないものとなる。   For this reason, since the calculation of Expression (2) is sufficient for one picture encoding, the processing amount of calculation in the picture average code amount calculation unit 17a is extremely small.

クロマQPオフセット算出部17bは、ピクチャ平均符号量算出部17aがピクチャ平均符号量avg_code_per_PIC_Xを算出すると、そのピクチャ平均符号量avg_code_per_PIC_Xとビットストリームを1ピクチャの符号化終了毎に入力し、そのピクチャ平均符号量avg_code_per_PIC_Xとビットストリームの符号量CVを比較して、クロマQPオフセットを算出する。
例えば、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α1以上小さい場合、クロマQPオフセットの値を現ピクチャのクロマQPオフセットより小さい値に決定する。
CV+α1 < avg_code_per_PIC_X
→ クロマQPオフセットの値を小さくする
When the picture average code amount calculation unit 17a calculates the picture average code amount avg_code_per_PIC_X, the chroma QP offset calculation unit 17b inputs the picture average code amount avg_code_per_PIC_X and the bitstream every time one picture is encoded, and the picture average code The chroma QP offset is calculated by comparing the amount avg_code_per_PIC_X with the bitstream code amount CV.
For example, when the bitstream code amount CV is smaller than the picture average code amount avg_code_per_PIC_X by a certain value α1 or more, the chroma QP offset value is determined to be smaller than the chroma QP offset of the current picture.
CV + α1 <avg_code_per_PIC_X
→ Decrease the value of chroma QP offset

逆に、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α2以上大きい場合、クロマQPオフセットの値を現ピクチャのクロマQPオフセットより大きい値に決定する。
CV > avg_code_per_PIC_X+α2
→ クロマQPオフセットの値を大きくする
なお、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α1以上小さくなく、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α2以上大きくもない場合、クロマQPオフセットの値を現ピクチャのクロマQPオフセットと同じ値に決定する。
ただし、最初の符号化ピクチャのクロマQPオフセットについては、例えば、初期値として“0”を設定し、次の符号化ピクチャのクロマQPオフセットから、上記のように比較して決定する。
Conversely, if the bitstream code amount CV is larger than the picture average code amount avg_code_per_PIC_X by a certain value α2 or more, the chroma QP offset value is determined to be larger than the chroma QP offset of the current picture.
CV> avg_code_per_PIC_X + α2
→ Increase the value of the chroma QP offset Note that the bitstream code amount CV is not smaller than the picture average code amount avg_code_per_PIC_X by a constant value α1 or more, and the bitstream code amount CV is larger than the picture average code amount avg_code_per_PIC_X by a constant value α2 or more. If not, the value of the chroma QP offset is determined to be the same as the chroma QP offset of the current picture.
However, for the chroma QP offset of the first encoded picture, for example, “0” is set as an initial value, and the chroma QP offset of the next encoded picture is determined by comparison as described above.

一般のH.264/AVC符号化では、実際に発生した符号量にかかわらず一律でクロマQPオフセットを“0”、もしくは、クロマQPオフセットを一定の値とするのが普通である。
これに対して、この実施の形態5では、例えば、実際の発生符号量が小さい場合、符号量に余裕があることに鑑みて、クロマQPオフセットの値を現ピクチャのクロマQPオフセットより小さくしているので、次のピクチャの色差符号量を増やすことになる。その結果、次のピクチャの発生符号量の期待値がピクチャ平均符号量に近づくようになる。
逆に、実際の発生符号量が大きい場合、符号量に余裕がないことに鑑みて、クロマQPオフセットの値を現ピクチャのクロマQPオフセットより大きくしているので、次のピクチャの色差符号量を減らすことになる。その結果、次のピクチャの発生符号量の期待値がピクチャ平均符号量に近づくようになる。
General H. In H.264 / AVC encoding, it is normal that the chroma QP offset is uniformly “0” or the chroma QP offset is constant regardless of the actually generated code amount.
On the other hand, in the fifth embodiment, for example, when the actual generated code amount is small, the chroma QP offset value is set to be smaller than the chroma QP offset of the current picture in view of the margin of the code amount. Therefore, the color difference code amount of the next picture is increased. As a result, the expected value of the generated code amount of the next picture comes closer to the picture average code amount.
On the contrary, when the actual generated code amount is large, the chroma QP offset value is made larger than the chroma QP offset of the current picture in view of the fact that there is no margin in the code amount. Will be reduced. As a result, the expected value of the generated code amount of the next picture comes closer to the picture average code amount.

以上で明らかなように、この実施の形態5によれば、符号化設定情報が示す符号化の設定内容に含まれているビットレート及びフレームレート等から、その設定内容に含まれているピクチャタイプのピクチャ平均符号量avg_code_per_PIC_Xを算出し、そのピクチャ平均符号量avg_code_per_PIC_XとH.264/AVCエンコードコア部12から出力されたビットストリーム(1つ前のピクチャの動画像圧縮データ)の符号量CVとに応じて、クロマQPオフセットを決定するように構成したので、次のピクチャの発生符号量の期待値がピクチャ平均符号量に近づくようになり、その結果として、所望の符号化設定情報にできる限り近づく符号量で符号化が行われることになるため、全体の主観画質の向上につながる効果が得られる。   As is apparent from the above, according to the fifth embodiment, the picture type included in the setting content is determined from the bit rate and the frame rate included in the setting content of the encoding indicated by the encoding setting information. Picture average code amount avg_code_per_PIC_X is calculated, and the picture average code amount avg_code_per_PIC_X and the H.H. Since the chroma QP offset is determined according to the code amount CV of the bitstream (moving image compressed data of the previous picture) output from the H.264 / AVC encoding core unit 12, the next picture The expected value of the generated code amount approaches the picture average code amount, and as a result, encoding is performed with the code amount as close as possible to the desired encoding setting information, so that the overall subjective image quality is improved. The effect that leads to is obtained.

実施の形態6.
図14はこの発明の実施の形態6による動画像符号化装置1を示す構成図であり、図において、図3及び図10と同一符号は同一又は相当部分を示すので説明を省略する。
クロマQPオフセット決定部18は符号化設定情報が示す符号化の設定内容に含まれているビットレート、フレームレート及び画像解像度からマクロブロック平均符号量avg_code_per_MBを算出するとともに、その設定内容に含まれているビットレート及びフレームレート等から、その設定内容に含まれているピクチャタイプのピクチャ平均符号量avg_code_per_PIC_Xを算出し、そのマクロブロック平均符号量avg_code_per_MB、そのピクチャ平均符号量avg_code_per_PIC_X、その設定内容に含まれている符号化モード情報(画質重視であるのか、動き重視であるのかを示す情報)、シーンチェンジ検出部15から出力されたシーンチェンジ情報及びH.264/AVCエンコードコア部12から出力されたビットストリーム(1つ前のピクチャの動画像圧縮データ)の符号量に応じて、クロマQPオフセットを決定する処理を実施する。
なお、クロマQPオフセット決定部18はオフセット値決定手段を構成している。
Embodiment 6 FIG.
FIG. 14 is a block diagram showing a moving picture encoding apparatus 1 according to Embodiment 6 of the present invention. In the figure, the same reference numerals as those in FIGS.
The chroma QP offset determining unit 18 calculates the macroblock average code amount avg_code_per_MB from the bit rate, the frame rate, and the image resolution included in the encoding setting content indicated by the encoding setting information, and is included in the setting content. The picture average code amount avg_code_per_PIC_X of the picture type included in the setting content is calculated from the bit rate, the frame rate, etc., the macro block average code amount avg_code_per_MB, the picture average code amount avg_code_per_PIC_X, included in the setting content Encoding mode information (information indicating whether the image quality is important or the motion is important), the scene change information output from the scene change detection unit 15, and the H.264 encoding information. A process for determining a chroma QP offset is performed according to the code amount of the bit stream (moving image compressed data of the previous picture) output from the H.264 / AVC encoding core unit 12.
The chroma QP offset determining unit 18 constitutes an offset value determining unit.

図15はこの発明の実施の形態6による動画像符号化装置1のクロマQPオフセット決定部18を示す構成図であり、図において、図4及び図13と同一符号は同一又は相当部分を示すので説明を省略する。
クロマQPオフセット算出部18aはマクロブロック平均符号量算出部11aにより算出されたピクチャ平均符号量avg_code_per_MB、ピクチャ平均符号量算出部17aにより算出されたピクチャ平均符号量avg_code_per_PIC_X、符号化モード情報(画質重視であるのか、動き重視であるのかを示す情報)、シーンチェンジ検出部15から出力されたシーンチェンジ情報及びH.264/AVCエンコードコア部12から出力されたビットストリーム(1つ前のピクチャの動画像圧縮データ)の符号量に応じて、クロマQPオフセットを算出する処理を実施する。
FIG. 15 is a block diagram showing the chroma QP offset determining unit 18 of the moving picture coding apparatus 1 according to Embodiment 6 of the present invention. In the figure, the same reference numerals as those in FIGS. 4 and 13 indicate the same or corresponding parts. Description is omitted.
The chroma QP offset calculation unit 18a includes a picture average code amount avg_code_per_MB calculated by the macroblock average code amount calculation unit 11a, a picture average code amount avg_code_per_PIC_X calculated by the picture average code amount calculation unit 17a, and coding mode information (in consideration of image quality). Information indicating whether or not there is an emphasis on motion), the scene change information output from the scene change detection unit 15, and H.264. A process of calculating a chroma QP offset is performed according to the code amount of the bit stream (moving image compressed data of the previous picture) output from the H.264 / AVC encoding core unit 12.

この実施の形態6では、一般のH.264/AVC符号化の場合と同様に、符号化設定情報のうち、ピクチャ単位に値が変化するのは符号化ピクチャタイプだけであるとして説明する。
クロマQPオフセット決定部18におけるクロマQPオフセット算出部18aの処理は、下記のステップ1〜3で構成されている。
ステップ1:クロマQPオフセットのベース値CQPOFF1の算出処理
ステップ2:クロマQPオフセットのピクチャタイプ依存変動幅CQPOFF2の算出
処理
ステップ3:クロマQPオフセットのピクチャタイプ更新幅CQPOFF3の算出処理
In the sixth embodiment, the general H.264 standard is used. As in the case of H.264 / AVC encoding, description will be made assuming that only the encoded picture type has a value that changes in units of pictures in the encoding setting information.
The processing of the chroma QP offset calculation unit 18a in the chroma QP offset determination unit 18 includes the following steps 1 to 3.
Step 1: Calculation processing of base value CQPOFF1 of chroma QP offset Step 2: Calculation of picture type-dependent variation width CQPOFF2 of chroma QP offset
Processing Step 3: Calculation processing of picture type update width CQPOFF3 of chroma QP offset

以下、ステップ1〜3の処理内容を具体的に説明する。
[ステップ1]
ステップ1の処理は、外部から符号化設定情報が与えられたとき1回だけ実行される。
まず、クロマQPオフセット算出部18aは、クロマQPオフセットのピクチャタイプ更新幅CQPOFF3を“0”に初期化する。
次に、クロマQPオフセット算出部18aは、マクロブロック平均符号量算出部11aにより算出されたピクチャ平均符号量avg_code_per_MBに対する閾値処理を実施することで、マクロブロック平均符号量avg_code_per_MBが小さい場合には、大きな値のクロマQPオフセットのベース値CQPOFF1を算出し、マクロブロック平均符号量avg_code_per_MBが大きい場合には、小さな値のクロマQPオフセットのベース値CQPOFF1を算出する。
ただし、クロマQPオフセット算出部18aは、画質重視の場合、色差を軽視しないようにするために、符号化モード情報(画質重視/動き重視)を加味して、クロマQPオフセットのベース値CQPOFF1を算出する。
Hereinafter, the processing content of steps 1-3 will be described in detail.
[Step 1]
The process of step 1 is executed only once when the encoding setting information is given from the outside.
First, the chroma QP offset calculation unit 18a initializes the picture type update width CQPOFF3 of the chroma QP offset to “0”.
Next, the chroma QP offset calculation unit 18a performs threshold processing on the picture average code amount avg_code_per_MB calculated by the macroblock average code amount calculation unit 11a, so that the macroblock average code amount avg_code_per_MB is large. The base value CQPOFF1 of the chroma QP offset of the value is calculated, and when the macroblock average code amount avg_code_per_MB is large, the base value CQPOFF1 of the chroma QP offset of the small value is calculated.
However, the chroma QP offset calculation unit 18a calculates the base value CQPOFF1 of the chroma QP offset in consideration of the coding mode information (image quality emphasis / motion emphasis) in order not to neglect the color difference when the image quality is important. To do.

図16はクロマQPオフセット算出部18aにおけるマクロブロック平均符号量の閾値処理の一例を示す説明図である。
図16の例では、画質重視の場合、マクロブロック平均符号量avg_code_per_MBが閾値Th3未満であれば、クロマQPオフセットのベース値CQPOFF1を“0”に決定する。
また、マクロブロック平均符号量avg_code_per_MBが閾値Th3以上であるが、閾値Th4未満であれば、クロマQPオフセットのベース値CQPOFF1を“−6”に決定し、マクロブロック平均符号量avg_code_per_MBが閾値Th4以上であれば、クロマQPオフセットのベース値CQPOFF1を“−12”に決定する。
FIG. 16 is an explanatory diagram showing an example of threshold processing for the average macroblock code amount in the chroma QP offset calculation unit 18a.
In the example of FIG. 16, when the image quality is emphasized, if the macroblock average code amount avg_code_per_MB is less than the threshold Th3, the chroma QP offset base value CQPOFF1 is determined to be “0”.
Further, if the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th3, but less than the threshold Th4, the base value CQPOFF1 of the chroma QP offset is determined to be “−6”, and the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th4. If there is, the base value CQPOFF1 of the chroma QP offset is determined to be “−12”.

動き重視の場合、マクロブロック平均符号量avg_code_per_MBが閾値Th1未満であれば、クロマQPオフセットのベース値CQPOFF1を“+12”に決定する。
マクロブロック平均符号量avg_code_per_MBが閾値Th1以上であるが、閾値Th2未満であれば、クロマQPオフセットのベース値CQPOFF1を“+6”に決定する。
同様に、マクロブロック平均符号量avg_code_per_MBが閾値Th2以上であるが、閾値Th3未満であれば、クロマQPオフセットのベース値CQPOFF1を“0”に決定し、マクロブロック平均符号量avg_code_per_MBが閾値Th3以上であるが、閾値Th4未満であれば、クロマQPオフセットのベース値CQPOFF1を“−6”に決定する。
マクロブロック平均符号量avg_code_per_MBが閾値Th4以上であれば、クロマQPオフセットのベース値CQPOFF1を“−12”に決定する。
In the case of emphasizing motion, if the macroblock average code amount avg_code_per_MB is less than the threshold Th1, the base value CQPOFF1 of the chroma QP offset is determined to be “+12”.
If the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold value Th1, but less than the threshold value Th2, the base value CQPOFF1 of the chroma QP offset is determined to be “+6”.
Similarly, if the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th2, but less than the threshold Th3, the base value CQPOFF1 of the chroma QP offset is determined to be “0”, and the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th3. If it is less than the threshold Th4, the base value CQPOFF1 of the chroma QP offset is determined to be “−6”.
If the macroblock average code amount avg_code_per_MB is equal to or greater than the threshold Th4, the base value CQPOFF1 of the chroma QP offset is determined to be “−12”.

ここでは、クロマQPオフセット算出部18aが5段階の閾値処理を実施するものについて示したが、これは一例に過ぎず、例えば、より細かな25段階の閾値処理を実施するようにしてもよい。
また、符号化モード情報が、画質重視であるのか、動き重視であるのかを示す情報であるものについて示したが、「画質重視」と「動き重視」の2段階ではなく、例えば、「やや画質重視」や「やや動き重視」などを含めて、数多くの段階に分ける符号化モード情報を入力して、クロマQPオフセットのベース値CQPOFF1をきめ細かく決定するようにしてもよい。
In this example, the chroma QP offset calculation unit 18a performs the five-step threshold processing. However, this is only an example, and for example, more detailed 25-step threshold processing may be performed.
In addition, although the encoding mode information is information indicating whether the image quality is important or the motion is important, the encoding mode information is not two stages of “image quality importance” and “motion importance”, but, for example, “slight image quality” The base value CQPOFF1 of the chroma QP offset may be determined finely by inputting encoding mode information divided into a number of stages including “important” and “slightly important”.

[ステップ2]
ステップ2の処理は、ステップ1の処理の後、各ピクチャの符号化前に1回実行される。
クロマQPオフセット算出部18aは、シーンチェンジ検出部15から出力されたシーンチェンジ情報と、符号化ピクチャタイプと、符号化モード情報(画質重視/動き重視)とに応じて、クロマQPオフセットのピクチャタイプ依存変動幅CQPOFF2を算出する。
図17はクロマQPオフセット算出部18aにおけるピクチャタイプ依存変動幅CQPOFF2の算出処理の一例を示す説明図である。
[Step 2]
The process of step 2 is executed once after the process of step 1 and before the encoding of each picture.
The chroma QP offset calculation unit 18a determines the picture type of the chroma QP offset according to the scene change information output from the scene change detection unit 15, the encoded picture type, and the encoding mode information (image quality priority / motion priority). The dependence fluctuation range CQPOFF2 is calculated.
FIG. 17 is an explanatory diagram showing an example of a calculation process of the picture type dependent variation width CQPOFF2 in the chroma QP offset calculation unit 18a.

図17の例では、シーンチェンジなしの場合と、シーンチェンジありの場合とにテーブルを分けて、ピクチャタイプ依存変動幅CQPOFF2を算出している。
シーンチェンジなしの場合、動き重視であれば、上記実施の形態2と同様の考え方であり、符号化ピクチャタイプがIピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“0”、符号化ピクチャタイプがPピクチャ又は参照Bピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“+6”、符号化ピクチャタイプが非参照Bピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“+12”に決定する。
画質重視であれば、色差を軽視しないようにするために、符号化ピクチャタイプにかかわらず、ピクチャタイプ依存変動幅CQPOFF2を一律に“0”に決定する。
In the example of FIG. 17, the picture type-dependent variation width CQPOFF2 is calculated by dividing the table into the case where there is no scene change and the case where there is a scene change.
In the case of no scene change, if motion is emphasized, the concept is the same as in the second embodiment. If the encoded picture type is an I picture, the picture type-dependent variation width CQPOFF2 is “0”, and the encoded picture type is If is a P picture or a reference B picture, the picture type dependent variation width CQPOFF2 is determined to be “+6”, and if the encoded picture type is a non-reference B picture, the picture type dependent variation width CQPOFF2 is determined to be “+12”.
If the image quality is important, the picture type dependent variation width CQPOFF2 is uniformly determined to be “0” regardless of the encoded picture type so as not to neglect the color difference.

シーンチェンジありの場合、動き重視であれば、上記実施の形態4と同様の考え方であり、符号化ピクチャタイプがIピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“0”、符号化ピクチャタイプが、Pピクチャ、参照Bピクチャ又は非参照Bピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“+12”に決定する。
画質重視であれば、シーンチェンジと言えども、ピクチャタイプによるクロマQPオフセットの変動幅をできるだけ抑えて、色差を軽視しないようにするため、Iピクチャ、Pピクチャ又は参照Bピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“0”、符号化ピクチャタイプが非参照Bピクチャであれば、ピクチャタイプ依存変動幅CQPOFF2を“+6”に決定する。
When there is a scene change, if motion is important, the concept is the same as in the fourth embodiment. If the encoded picture type is an I picture, the picture type-dependent variation width CQPOFF2 is “0”, and the encoded picture type is If it is a P picture, a reference B picture or a non-reference B picture, the picture type-dependent variation width CQPOFF2 is determined to be “+12”.
If the image quality is important, even if it is a scene change, in order to minimize the variation of the chroma QP offset depending on the picture type and to avoid neglecting the color difference, if it is an I picture, P picture or reference B picture, the picture type If the dependent variation width CQPOFF2 is “0” and the encoded picture type is a non-reference B picture, the picture type dependent variation width CQPOFF2 is determined to be “+6”.

ここでは、符号化モード情報が、画質重視であるのか、動き重視であるのかを示す情報であるものについて示したが、「画質重視」と「動き重視」の2段階ではなく、例えば、「やや画質重視」や「やや動き重視」などを含めて、数多くの段階に分ける符号化モード情報を入力して、ピクチャタイプ依存変動幅CQPOFF2をきめ細かく決定するようにしてもよい。   Here, the encoding mode information is information indicating whether the image quality is important or the motion is important. However, the encoding mode information is not in two stages of “image quality importance” and “motion importance”. The picture type dependent variation width CQPOFF2 may be determined in detail by inputting coding mode information divided into a number of stages including “emphasis on image quality” and “a little emphasis on motion”.

クロマQPオフセット算出部18aは、上記のようにして、ピクチャタイプ依存変動幅CQPOFF2を算出すると、クロマQPオフセットのベース値CQPOFF1+ピクチャタイプ依存変動幅CQPOFF2+ピクチャタイプ更新幅CQPOFF3の値を“−12”から“+12”の間の値にクリッピングし、クリッピングした値をクロマQPオフセットとしてH.264/AVCエンコードコア部12に出力する。   When the chroma QP offset calculation unit 18a calculates the picture type-dependent variation width CQPOFF2 as described above, the value of the base value CQPOFF1 of the chroma QP offset + the picture type-dependent variation width CQPOFF2 + the picture type update width CQPOFF3 is determined from “−12”. Clip to a value between “+12”, and use the clipped value as a chroma QP offset. H.264 / AVC encoding core unit 12 for output.

[ステップ3]
ステップ3の処理は、ステップ2の処理の後(各ピクチャの符号化後)に1回実行され、その後、ステップ2の処理に戻る。
クロマQPオフセット算出部18aは、ピクチャ平均符号量算出部17aにより算出されたピクチャ平均符号量avg_code_per_PIC_Xと、H.264/AVCエンコードコア部12から出力されたビットストリーム(1つ前のピクチャの動画像圧縮データ)の符号量とに応じて、クロマQPオフセットのピクチャタイプ更新幅CQPOFF3を決定する。
[Step 3]
The process of step 3 is executed once after the process of step 2 (after encoding of each picture), and then the process returns to step 2.
The chroma QP offset calculation unit 18a includes a picture average code amount avg_code_per_PIC_X calculated by the picture average code amount calculation unit 17a, The picture type update width CQPOFF3 of the chroma QP offset is determined according to the code amount of the bit stream (moving image compressed data of the previous picture) output from the H.264 / AVC encoding core unit 12.

ピクチャ平均符号量avg_code_per_PIC_Xとビットストリームの符号量とからクロマQPオフセットのピクチャタイプ更新幅CQPOFF3を決定する方法の具体例は下記の通りである。
例えば、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α3以上小さい場合、ピクチャタイプ更新幅CQPOFF3を現ピクチャのピクチャタイプ更新幅CQPOFF3より小さい値に決定する。
CV+α3 < avg_code_per_PIC_X
→ CQPOFF3=CQPOFF3−1
A specific example of a method for determining the picture type update width CQPOFF3 of the chroma QP offset from the picture average code amount avg_code_per_PIC_X and the bitstream code amount is as follows.
For example, when the bitstream code amount CV is smaller than the picture average code amount avg_code_per_PIC_X by a certain value α3 or more, the picture type update width CQPOFF3 is determined to be smaller than the picture type update width CQPOFF3 of the current picture.
CV + α3 <avg_code_per_PIC_X
→ CQPOFF3 = CQPOFF3-1

逆に、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α4以上大きい場合、ピクチャタイプ更新幅CQPOFF3を現ピクチャのピクチャタイプ更新幅CQPOFF3より大きい値に決定する。
CV > avg_code_per_PIC_X+α4
→ CQPOFF3=CQPOFF3+1
なお、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α3以上小さくなく、ビットストリームの符号量CVが、ピクチャ平均符号量avg_code_per_PIC_Xより一定値α4以上大きくもない場合、ピクチャタイプ更新幅CQPOFF3を現ピクチャのピクチャタイプ更新幅CQPOFF3と同じ値に決定する。
Conversely, when the bitstream code amount CV is larger than the picture average code amount avg_code_per_PIC_X by a certain value α4 or more, the picture type update width CQPOFF3 is determined to be larger than the picture type update width CQPOFF3 of the current picture.
CV> avg_code_per_PIC_X + α4
→ CQPOFF3 = CQPOFF3 + 1
If the bitstream code amount CV is not smaller than the picture average code amount avg_code_per_PIC_X by a certain value α3 or more, and the bitstream code amount CV is not larger than the picture average code amount avg_code_per_PIC_X by a certain value α4 or more, the picture type update width CQPOFF3 is determined to be the same value as the picture type update width CQPOFF3 of the current picture.

以上で明らかなように、この実施の形態6によれば、クロマQPオフセット決定部18が符号化設定情報が示す符号化の設定内容に含まれているビットレート、フレームレート及び画像解像度からマクロブロック平均符号量avg_code_per_MBを算出するとともに、その設定内容に含まれているビットレート及びフレームレート等から、その設定内容に含まれているピクチャタイプのピクチャ平均符号量avg_code_per_PIC_Xを算出し、そのマクロブロック平均符号量avg_code_per_MB、そのピクチャ平均符号量avg_code_per_PIC_X、その設定内容に含まれている符号化モード情報(画質重視であるのか、動き重視であるのかを示す情報)、シーンチェンジ検出部15から出力されたシーンチェンジ情報及びH.264/AVCエンコードコア部12から出力されたビットストリームの符号量に応じて、クロマQPオフセットを決定するように構成したので、上記実施の形態1〜5で得られる効果と同様の効果が得られ、結果的に全体の主観画質の向上につながる効果が得られる。   As is apparent from the above, according to the sixth embodiment, the macro QP offset determination unit 18 determines the macroblock based on the bit rate, frame rate, and image resolution included in the encoding setting content indicated by the encoding setting information. The average code amount avg_code_per_MB is calculated, the picture average code amount avg_code_per_PIC_X of the picture type included in the setting content is calculated from the bit rate and the frame rate included in the setting content, and the macroblock average code The amount avg_code_per_MB, the picture average code amount avg_code_per_PIC_X, the coding mode information included in the setting contents (information indicating whether the image quality is important or the motion is important), output from the scene change detection unit 15 Scene change information and H. Since the chroma QP offset is determined according to the code amount of the bit stream output from the H.264 / AVC encoding core unit 12, the same effects as those obtained in the first to fifth embodiments can be obtained. As a result, the effect of improving the overall subjective image quality can be obtained.

上記実施の形態1〜6では、映像符号化方式として、H.264/AVCを用いるものについて示したが、H.264/AVCに類似する符号化方式(例えば、MPEG−2、MPEG−4 Visual、SMPTE VC−1など)を用いるようにしてもよく、同様の効果を奏することができる。   In the first to sixth embodiments, the video encoding method is H.264. H.264 / AVC has been shown. An encoding method similar to H.264 / AVC (for example, MPEG-2, MPEG-4 Visual, SMPTE VC-1, etc.) may be used, and similar effects can be obtained.

1 動画像符号化装置、2 動画像復号装置、11 クロマQPオフセット決定部(オフセット値決定手段)、11a マクロブロック平均符号量算出部、11b クロマQPオフセット算出部、12 H.264/AVCエンコードコア部(圧縮符号化手段)、13 クロマQPオフセット決定部(オフセット値決定手段)、13a クロマQPオフセット算出部、14 クロマQPオフセット決定部(オフセット値決定手段)、14a クロマQPオフセット算出部、15 シーンチェンジ検出部、16 クロマQPオフセット決定部(オフセット値決定手段)、16a クロマQPオフセット算出部、17 クロマQPオフセット決定部(オフセット値決定手段)、17a ピクチャ平均符号量算出部、17b クロマQPオフセット算出部、18 クロマQPオフセット決定部(オフセット値決定手段)、18a クロマQPオフセット算出部。   DESCRIPTION OF SYMBOLS 1 moving image encoder, 2 moving image decoder, 11 chroma QP offset determination part (offset value determination means), 11a macroblock average code amount calculation part, 11b chroma QP offset calculation part, 12H. H.264 / AVC encoding core unit (compression encoding unit), 13 chroma QP offset determination unit (offset value determination unit), 13a chroma QP offset calculation unit, 14 chroma QP offset determination unit (offset value determination unit), 14a chroma QP offset Calculation unit, 15 Scene change detection unit, 16 Chroma QP offset determination unit (offset value determination unit), 16a Chroma QP offset calculation unit, 17 Chroma QP offset determination unit (offset value determination unit), 17a Picture average code amount calculation unit, 17b Chroma QP offset calculator, 18 Chroma QP offset determiner (offset value determiner), 18a Chroma QP offset calculator.

Claims (3)

ディジタル映像信号の各ピクチャを所定の単位領域に分割し、単位領域毎に圧縮符号化を実施して、外部から与えられる符号化の設定内容を満足するビットストリームを出力する圧縮符号化手段を備えた動画像符号化装置において、上記符号化の設定内容に含まれている符号化のモード情報である画質と動きのいずれを重視するかを示す情報に応じてオフセット値を決定するオフセット値決定手段を設け、上記圧縮符号化手段が単位領域毎に圧縮符号化を実施する際、上記オフセット値決定手段により決定されたオフセット値に応じて、上記輝度信号及び上記色差信号に割り当てる符号量を設定することを特徴とする動画像符号化装置。 Compression coding means that divides each picture of a digital video signal into predetermined unit areas, performs compression coding for each unit area, and outputs a bitstream that satisfies the setting contents of coding given from the outside In the moving image encoding apparatus, an offset value determining means for determining an offset value according to information indicating which of image quality and motion, which is encoding mode information included in the setting content of the encoding, is important When the compression encoding unit performs compression encoding for each unit area, the code amount allocated to the luminance signal and the color difference signal is set according to the offset value determined by the offset value determination unit. A moving picture coding apparatus characterized by the above. ディジタル映像信号の各ピクチャを所定の単位領域に分割し、単位領域毎に圧縮符号化を実施して、外部から与えられる符号化の設定内容を満足するビットストリームを出力する圧縮符号化手段を備えた動画像符号化装置において、上記符号化の設定内容に含まれているピクチャタイプと、外部から与えられるシーンチェンジの有無を示すシーンチェンジ情報とに応じてオフセット値を決定するオフセット値決定手段を設け、上記圧縮符号化手段が単位領域毎に圧縮符号化を実施する際、上記オフセット値決定手段により決定されたオフセット値に応じて、上記輝度信号及び上記色差信号に割り当てる符号量を設定することを特徴とする動画像符号化装置。 Compression coding means that divides each picture of a digital video signal into predetermined unit areas, performs compression coding for each unit area, and outputs a bitstream that satisfies the setting contents of coding given from the outside In the moving image encoding apparatus, an offset value determining means for determining an offset value according to a picture type included in the setting content of the encoding and scene change information indicating presence / absence of a scene change given from outside And when the compression coding means performs compression coding for each unit area, setting a code amount to be assigned to the luminance signal and the color difference signal according to the offset value determined by the offset value determination means A video encoding apparatus characterized by the above. ディジタル映像信号の各ピクチャを所定の単位領域に分割し、単位領域毎に圧縮符号化を実施して、外部から与えられる符号化の設定内容を満足するビットストリームを出力する圧縮符号化手段を備えた動画像符号化装置において、上記符号化の設定内容に含まれているビットレート、フレームレート及び解像度から単位領域当りの符号量の期待値を算出するとともに、上記設定内容に含まれているビットレート及びフレームレートから、上記設定内容に含まれているピクチャタイプの符号量の期待値を算出し、上記単位領域当りの符号量の期待値、上記ピクチャタイプの符号量の期待値、上記設定内容に含まれている符号化のモード情報である画質と動きのいずれを重視するかを示す情報、外部から与えられるシーンチェンジの有無を示すシーンチェンジ情報及び圧縮符号化手段から出力されたビットストリームの符号量に応じて、オフセット値を決定するオフセット値決定手段を設け、上記圧縮符号化手段が単位領域毎に圧縮符号化を実施する際、上記オフセット値決定手段により決定されたオフセット値に応じて、上記輝度信号及び上記色差信号に割り当てる符号量を設定することを特徴とする動画像符号化装置。 Compression coding means that divides each picture of a digital video signal into predetermined unit areas, performs compression coding for each unit area, and outputs a bitstream that satisfies the setting contents of coding given from the outside In the moving image encoding apparatus, the expected value of the code amount per unit area is calculated from the bit rate, the frame rate, and the resolution included in the setting content of the encoding, and the bit included in the setting content The expected value of the code amount of the picture type included in the setting content is calculated from the rate and the frame rate, the expected value of the code amount per unit area, the expected value of the code amount of the picture type, and the setting content Information indicating whether image quality or motion, which is encoding mode information included in the image, is important, and whether there is a scene change given from the outside Nchenji information and in accordance with the code amount of the output bit stream from the compression encoding means, the provided offset value determining means for determining the offset value, when the compression coding means for carrying out compression coding for each unit area, A moving picture encoding apparatus, wherein a code amount to be assigned to the luminance signal and the color difference signal is set according to the offset value determined by the offset value determining means.
JP2009031279A 2009-02-13 2009-02-13 Video encoding device Active JP5094760B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009031279A JP5094760B2 (en) 2009-02-13 2009-02-13 Video encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009031279A JP5094760B2 (en) 2009-02-13 2009-02-13 Video encoding device

Publications (2)

Publication Number Publication Date
JP2010187302A JP2010187302A (en) 2010-08-26
JP5094760B2 true JP5094760B2 (en) 2012-12-12

Family

ID=42767662

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009031279A Active JP5094760B2 (en) 2009-02-13 2009-02-13 Video encoding device

Country Status (1)

Country Link
JP (1) JP5094760B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107371036A (en) * 2011-03-09 2017-11-21 佳能株式会社 Image encoding apparatus and method and image decoding apparatus and method

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013108688A1 (en) * 2012-01-18 2013-07-25 ソニー株式会社 Image processing device and method
KR102079803B1 (en) 2012-06-12 2020-04-07 엘지전자 주식회사 Image decoding method and apparatus using same
US9414054B2 (en) * 2012-07-02 2016-08-09 Microsoft Technology Licensing, Llc Control and use of chroma quantization parameter values
US9591302B2 (en) 2012-07-02 2017-03-07 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
CN107852512A (en) * 2015-06-07 2018-03-27 夏普株式会社 The system and method for optimization Video coding based on brightness transition function or video color component value
CN117176951A (en) 2018-03-30 2023-12-05 交互数字Vc控股公司 Chroma quantization parameter adjustment in video encoding and decoding
CN113055607B (en) * 2019-12-28 2022-10-04 浙江宇视科技有限公司 Image processing method, device, equipment and storage medium
CN112004088B (en) * 2020-08-06 2024-04-16 杭州当虹科技股份有限公司 CU-level QP allocation algorithm suitable for AVS2 encoder

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2266635B (en) * 1992-02-28 1995-11-15 Sony Broadcast & Communication Image data compression
JPH0638191A (en) * 1992-07-20 1994-02-10 Canon Inc Animation signal coding device
JPH07284093A (en) * 1994-04-06 1995-10-27 Mitsubishi Electric Corp Picture transmitter system
JP4593437B2 (en) * 2005-10-21 2010-12-08 パナソニック株式会社 Video encoding device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107371036A (en) * 2011-03-09 2017-11-21 佳能株式会社 Image encoding apparatus and method and image decoding apparatus and method
US10554995B2 (en) 2011-03-09 2020-02-04 Canon Kabushiki Kaisha Image coding apparatus, method for coding image, program therefor, image decoding apparatus, method for decoding image, and program therefor
US10567785B2 (en) 2011-03-09 2020-02-18 Canon Kabushiki Kaisha Image coding apparatus, method for coding image, program therefor, image decoding apparatus, method for decoding image, and program therefor
CN107371036B (en) * 2011-03-09 2020-03-10 佳能株式会社 Image encoding apparatus and method, and image decoding apparatus and method

Also Published As

Publication number Publication date
JP2010187302A (en) 2010-08-26

Similar Documents

Publication Publication Date Title
JP5094760B2 (en) Video encoding device
JP6618439B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method
US10708594B2 (en) Adaptive skip or zero block detection combined with transform size decision
US8279923B2 (en) Video coding method and video coding apparatus
JP2017535148A (en) Hash-based encoder decision for video coding
JP2013524740A (en) Rate control in video coding.
JP2007281949A (en) Image encoding device, image encoding decoding system, image encoding method, and image encoding decoding method
JP7343817B2 (en) Encoding device, encoding method, and encoding program
JP2011015117A (en) Image coding apparatus, image coding method and video camera
JP2006352198A (en) Image coding device and image-coding program
CN102210150A (en) Dynamic image encoding device and dynamic image decoding device
JP4469904B2 (en) Moving picture decoding apparatus, moving picture decoding method, and storage medium storing moving picture decoding program
JP4073444B2 (en) Video encoding device
JP3889013B2 (en) Moving picture coding apparatus and moving picture coding method
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
KR20100137022A (en) Compressed image noise removal device and reproduction device
JP2009284058A (en) Moving image encoding device
JP2006295503A (en) Reencoding apparatus and method, and program for reencoding
JP2005303362A (en) Image coder and program
JP2005303555A (en) Moving image encoding apparatus and its method
JP2004007498A (en) Encoding device, encoding method, program, and recording medium
JP4186544B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2004328799A (en) Motion picture coding apparatus and motion picture coding method
JP2015019319A (en) Encoding apparatus, encoding method, and program
JP5272940B2 (en) Image encoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110927

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120524

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120605

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120803

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 5094760

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150928

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250