JP7450078B1 - Video encoding device and video encoding method - Google Patents

Video encoding device and video encoding method Download PDF

Info

Publication number
JP7450078B1
JP7450078B1 JP2023021544A JP2023021544A JP7450078B1 JP 7450078 B1 JP7450078 B1 JP 7450078B1 JP 2023021544 A JP2023021544 A JP 2023021544A JP 2023021544 A JP2023021544 A JP 2023021544A JP 7450078 B1 JP7450078 B1 JP 7450078B1
Authority
JP
Japan
Prior art keywords
value
circuit
offset
buffer
blocks
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
JP2023021544A
Other languages
Japanese (ja)
Inventor
直樹 澤田
亜希子 島崎
Original Assignee
Nttイノベーティブデバイス株式会社
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 Nttイノベーティブデバイス株式会社 filed Critical Nttイノベーティブデバイス株式会社
Priority to JP2023021544A priority Critical patent/JP7450078B1/en
Application granted granted Critical
Publication of JP7450078B1 publication Critical patent/JP7450078B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

【課題】映像データの符号化時にバッファ破綻が発生する可能性を改善する。【解決手段】映像符号化装置1は、異なるサイズのブロックの組み合わせに基づいて映像を画像毎にブロック単位で符号化し、前記ブロックを任意に組み合わせた複数の組み合わせ候補の各コスト値を計算する符号化回路11と、前記ブロック単位で符号化された前記画像の符号化データを蓄積するバッファ回路12と、前記バッファ回路のバッファ残量と1画像内のブロック数または前記1画像内のブロック数に相当する指標とに基づいてオフセット値を計算するオフセット計算回路13と、前記オフセット値を含む前記各コスト値に基づいて前記複数の組み合わせ候補の中から符号化用の組み合わせを決定するブロックサイズ決定回路14と、を備える。【選択図】図1An object of the present invention is to improve the possibility of buffer failure occurring when encoding video data. A video encoding device 1 encodes a video in block units for each image based on combinations of blocks of different sizes, and calculates cost values for each of a plurality of combination candidates obtained by arbitrarily combining the blocks. a buffer circuit 12 that stores encoded data of the image encoded in units of blocks; and a buffer circuit 12 that stores encoded data of the image encoded in block units; an offset calculation circuit 13 that calculates an offset value based on a corresponding index; and a block size determination circuit that determines a combination for encoding from among the plurality of combination candidates based on each of the cost values including the offset value. 14. [Selection diagram] Figure 1

Description

本開示は、映像符号化装置、および、映像符号化方法に関する。 The present disclosure relates to a video encoding device and a video encoding method.

映像信号の符号化は、ブロック単位で行われている。H.264では、MB(Macro Block)という16×16画素単位で符号化処理が行われていた。 Video signals are encoded on a block-by-block basis. H. In H.264, encoding processing was performed in units of 16×16 pixels called MB (Macro Block).

一方、HEVC(High Efficiency Video Coding)では、CU(Coding Unit)と称される64×64画素、32×32画素、16×16画素、8×8画素の4種類のブロックサイズで符号化処理が行われる。具体的には、映像信号はCTU(Coding Tree Unit)に分割され、各CTUは可変サイズのCUに分割される。CTUは、CUの組み合わせとして表現される。 On the other hand, in HEVC (High Efficiency Video Coding), encoding processing is performed using four types of block sizes called CU (Coding Unit): 64 x 64 pixels, 32 x 32 pixels, 16 x 16 pixels, and 8 x 8 pixels. It will be done. Specifically, the video signal is divided into CTUs (Coding Tree Units), and each CTU is divided into variable-sized CUs. A CTU is expressed as a combination of CUs.

CUの組み合わせは、符号化時の演算量、符号化後の符号量、符号化後の画像品質等に基づいて、最適なCUを選択する必要がある。特許文献1~特許文献4では、様々なCU選択方法が提案されている。 As for the combination of CUs, it is necessary to select the optimal CU based on the amount of calculation during encoding, the amount of code after encoding, the image quality after encoding, and the like. Patent Documents 1 to 4 propose various CU selection methods.

特許文献1では、CUの大きいブロックサイズから小さなブロックサイズの順に、各画素の輝度値のバラツキを示す指標のアクティビティから分散値を求め、その分散値と閾値とを比較してCUを選択する方法を開示している。 Patent Document 1 discloses a method in which a variance value is calculated from the activity of an index indicating the variation in luminance value of each pixel in order from a large block size to a small block size of a CU, and a CU is selected by comparing the variance value and a threshold value. is disclosed.

特許文献2では、RD(Rate Distortion)コスト(発生情報量とフラグ情報を合算したもの)を算出する際に、従来では全てのブロックサイズに対してRDコストを算出していたが、プレ処理部の処理動作を行った後に決定したブロックサイズについてのみRDコストの算出を行う。これにより、従来複数回必要であったコスト算出の処理回数を1回にでき、符号化の演算量を抑制している。 In Patent Document 2, when calculating the RD (Rate Distortion) cost (the sum of the amount of generated information and the flag information), the RD cost was conventionally calculated for all block sizes, but the pre-processing unit The RD cost is calculated only for the block size determined after performing the processing operations. As a result, the number of times of cost calculation, which was conventionally required multiple times, can be reduced to one, thereby suppressing the amount of encoding calculations.

特許文献3では、予測処理の予測結果を受けて、符号化コストを計算し、その符号化コストが最小となる予測モードおよびブロックサイズの組み合わせを選択する。符号化コストは、「D+λ・R」(Dは歪み量、λは所定値、Rは符号量)の値を使用するとしている。その値の算出が困難な場合には、Dの代わりに差分絶対値等を使用し、Rには仮見積もり符号量を使用するとしている。 In Patent Document 3, the prediction result of the prediction process is received, the encoding cost is calculated, and the combination of the prediction mode and block size that minimizes the encoding cost is selected. For the encoding cost, a value of "D+λ·R" (D is the amount of distortion, λ is a predetermined value, and R is the amount of code) is used. If it is difficult to calculate the value, an absolute difference value or the like is used instead of D, and a tentative estimated code amount is used for R.

更に、当該特許文献3では、符号化コストにオフセット値を設定することで、CTUの中で画像の特徴量が異なる領域が混在する場合に、複雑な領域と平坦な領域が一つのCUの中に混在することを抑制できることを開示している。この場合、オフセット値は、大きなブロックサイズを抑制してそれより小さなブロックサイズの発生比率を増加させるために加算するもの、または、CUへの分割を促進するために加算するものと示されている。 Furthermore, in Patent Document 3, by setting an offset value in the encoding cost, when regions with different image feature amounts coexist in a CTU, a complex region and a flat region are included in one CU. It discloses that it is possible to suppress the mixture of In this case, the offset value is indicated to be added to suppress large block sizes and increase the occurrence ratio of smaller block sizes, or to promote division into CUs. .

特許文献4では、画面間予測処理において、符号化対象ピクチャの参照構造における階層の深さ(Temporal ID)と符号化済みピクチャの動きベクトルの統計値情報とに基づき、ブロックサイズ候補のコスト比較におけるオフセット値を決定し、コスト比較によりブロックサイズ候補を適切に絞り込むことで、動き探索に要する演算量を削減することが開示されている。 In Patent Document 4, in inter-picture prediction processing, cost comparison of block size candidates is performed based on the layer depth (Temporal ID) in the reference structure of the picture to be encoded and the statistical value information of the motion vector of the encoded picture. It is disclosed that the amount of calculation required for motion search can be reduced by determining an offset value and appropriately narrowing down block size candidates through cost comparison.

当該特許文献4では、64×64ブロックサイズにのみ負のオフセット値を設定することによって、より大きいブロックサイズが選ばれやすくなるため、動きがばらけているピクチャは動きのばらけによってブロックサイズが小さくなりすぎることを防ぎ、Temporal IDが大きいピクチャではより大きなブロックで動き予測が行われることで符号量削減が望めることが示されている。オフセット値は、Temporal IDを用いて決定している。 In Patent Document 4, by setting a negative offset value only for the 64×64 block size, a larger block size is more likely to be selected. It has been shown that it is possible to prevent the amount of code from becoming too small and to reduce the amount of code by performing motion prediction using larger blocks for pictures with large Temporal IDs. The offset value is determined using Temporal ID.

特開2015-109586号公報Japanese Patent Application Publication No. 2015-109586 特開2016-187140号公報Japanese Patent Application Publication No. 2016-187140 特開2017-005505号公報Japanese Patent Application Publication No. 2017-005505 特開2017-028337号公報JP2017-028337A

しかしながら、特許文献1は、CU選択処理の演算量の低減を目的としており、符号量の低減が不十分である。特に、細かな絵柄を符号化するシーンでは、ブロックサイズが小さくなり、符号化対象のブロック数が増えるため、符号化データのオーバーヘッドが増加し、符号量の増加を抑制できず、符号化データを蓄積するバッファが供給データを蓄積しきれないというバッファ破綻が発生する恐れがあった。 However, Patent Document 1 aims to reduce the amount of calculation in the CU selection process, and the reduction in the amount of code is insufficient. In particular, in scenes where detailed pictures are encoded, the block size becomes smaller and the number of blocks to be encoded increases, which increases the overhead of the encoded data, making it impossible to suppress the increase in the amount of code and reducing the amount of encoded data. There was a risk that a buffer failure would occur, where the storage buffer would not be able to store the supplied data.

特許文献2は、CUを選択するためのコスト算出の処理回数の低減を目的としている。バッファ破綻の可能性があったとしても、プレ処理において仮決定したブロックサイズのCUをそのまま維持して処理してしまうため、必ずしも情報量の削減につながらない場合があり、バッファ破綻の可能性が生じる。 Patent Document 2 aims to reduce the number of times of cost calculation processing for selecting a CU. Even if there is a possibility of buffer failure, the CU of the block size tentatively determined in pre-processing is maintained and processed, so it may not necessarily lead to a reduction in the amount of information, and there is a possibility of buffer failure. .

特許文献3は、複雑な領域と平坦な領域が一つのCUの中に混在することを抑制することを目的としている。その目的を達成するため、コスト計算にオフセット値を設定することで、小さなブロックサイズの発生比率を増加させ、CUへの分割を促進するようにしているが、CU数が多い場合には必ずしも符号量の削減につながらない場合があるため、バッファ破綻の可能性が生じる。 Patent Document 3 aims to suppress the coexistence of a complex area and a flat area in one CU. To achieve this purpose, by setting an offset value in cost calculation, the occurrence ratio of small block sizes is increased and division into CUs is promoted. However, when the number of CUs is large, it is not always possible to Since this may not lead to a reduction in the amount, there is a possibility that the buffer will collapse.

特許文献4は、ブロックサイズ候補を適切に絞り込んで動き探索処理を行うことで、符号化効率を低下させずに画面間予測処理に要する処理量を削減することを目的としている。コスト計算の際、64×64ブロックサイズにのみ負のオフセット値を設定することで、大きなブロックサイズが選ばれやすくなり符号量削減が望めるとしているが、処理量の低減による符号量の増加を抑制するためと考えられ、符号量の低減については十分でなく(画面内予測処理に要する処理量など)、バッファ破綻の恐れがある。また、オフセット値の計算においては、Temporal IDおよび動きベクトル統計値から算出するため、複雑な計算が必要となる。 Patent Document 4 aims to reduce the amount of processing required for inter-screen prediction processing without reducing encoding efficiency by appropriately narrowing down block size candidates and performing motion search processing. It is said that by setting a negative offset value only for 64x64 block size when calculating the cost, a large block size will be more likely to be selected and a reduction in code amount can be expected, but the increase in code amount due to the reduction in processing amount will be suppressed. This is thought to be due to the fact that the amount of code is not reduced sufficiently (such as the amount of processing required for intra-screen prediction processing), and there is a risk of buffer failure. Further, in calculating the offset value, since it is calculated from the Temporal ID and the motion vector statistical value, complicated calculation is required.

すなわち、映像信号の符号化処理における従来のCU選択方法では、符号量の低減が十分でないため、符号化データの出力時において、符号化データを一時蓄積するバッファ回路でバッファ破綻が生じる可能性が小さくないという課題があった。 In other words, the conventional CU selection method in video signal encoding processing does not reduce the amount of code sufficiently, so there is a possibility that buffer failure will occur in the buffer circuit that temporarily stores encoded data when outputting encoded data. The problem was that it was not small.

本開示は、上記事情に鑑みてなされたものであり、映像データの符号化時にバッファ破綻が発生する可能性を改善可能な技術を提供することを目的とする。 The present disclosure has been made in view of the above circumstances, and aims to provide a technique that can improve the possibility of buffer failure occurring during encoding of video data.

本開示の一態様の映像符号化装置は、異なるサイズのブロックの組み合わせに基づいて映像を画像毎にブロック単位で符号化し、前記ブロックを任意に組み合わせた複数の組み合わせ候補の各コスト値を計算する符号化回路と、前記ブロック単位で符号化された前記画像の符号化データを蓄積するバッファ回路と、前記バッファ回路のバッファ残量と1画像内のブロック数または前記1画像内のブロック数に相当する指標とに基づいてオフセット値を計算するオフセット計算回路と、前記オフセット値を含む前記各コスト値に基づいて前記複数の組み合わせ候補の中から符号化用の組み合わせを決定するブロックサイズ決定回路と、を備える。 A video encoding device according to an aspect of the present disclosure encodes a video in units of blocks for each image based on a combination of blocks of different sizes, and calculates a cost value for each of a plurality of combination candidates obtained by arbitrarily combining the blocks. an encoding circuit, a buffer circuit for accumulating encoded data of the image encoded in units of blocks, and a buffer remaining amount of the buffer circuit and the number of blocks in one image or equivalent to the number of blocks in the one image. an offset calculation circuit that calculates an offset value based on an index; and a block size determination circuit that determines a combination for encoding from among the plurality of combination candidates based on each of the cost values including the offset value. Equipped with

本開示の一態様の映像符号化方法は、映像符号化装置で行う映像符号化方法において、符号化回路が、異なるサイズのブロックの組み合わせに基づいて映像を画像毎にブロック単位で符号化し、前記ブロックを任意に組み合わせた複数の組み合わせ候補の各コスト値を計算し、バッファ回路が、前記ブロック単位で符号化された前記画像の符号化データを蓄積し、オフセット計算回路が、前記バッファ回路のバッファ残量と1画像内のブロック数または前記1画像内のブロック数に相当する指標とに基づいてオフセット値を計算し、ブロックサイズ決定回路が、前記オフセット値を含む前記各コスト値に基づいて前記複数の組み合わせ候補の中から符号化用の組み合わせを決定する。 A video encoding method according to an aspect of the present disclosure is a video encoding method performed by a video encoding device, in which an encoding circuit encodes a video in units of blocks for each image based on a combination of blocks of different sizes; A cost value for each of a plurality of combination candidates obtained by arbitrarily combining blocks is calculated, a buffer circuit accumulates coded data of the image encoded in units of blocks, and an offset calculation circuit calculates a cost value for a plurality of combination candidates in which blocks are arbitrarily combined. An offset value is calculated based on the remaining amount and the number of blocks in one image or an index corresponding to the number of blocks in the one image, and the block size determination circuit calculates the offset value based on the respective cost values including the offset value. A combination for encoding is determined from among a plurality of combination candidates.

本開示によれば、映像データの符号化時にバッファ破綻が発生する可能性を低減可能な技術を提供できる。 According to the present disclosure, it is possible to provide a technique that can reduce the possibility that a buffer failure will occur when encoding video data.

映像符号化装置の構成例を示す図である。1 is a diagram illustrating a configuration example of a video encoding device. イントラ/インター予測回路の構成例を示す図である。FIG. 2 is a diagram illustrating a configuration example of an intra/inter prediction circuit. ブロックサイズの大きさの違いによる符号量の比較例を示す図である。FIG. 6 is a diagram illustrating an example of comparison of code amounts due to differences in block size. ブロックサイズ決定回路の構成例を示す図である。FIG. 2 is a diagram illustrating a configuration example of a block size determination circuit. 映像符号化方法の処理フローを示す図である。FIG. 3 is a diagram showing a processing flow of a video encoding method. オフセット値の計算処理フローを示す図である。FIG. 3 is a diagram illustrating a process flow for calculating an offset value. コスト値の比較およびブロックサイズの組み合わせ選択の処理フローを示す図である。FIG. 7 is a diagram showing a processing flow of cost value comparison and block size combination selection. 図7に示したステップS301の処理イメージを示す図である。8 is a diagram showing a processing image of step S301 shown in FIG. 7. FIG. 図7に示したステップS302の処理イメージを示す図である。8 is a diagram showing a processing image of step S302 shown in FIG. 7. FIG. 図7に示したステップS303の処理イメージを示す図である。8 is a diagram showing a processing image of step S303 shown in FIG. 7. FIG. オフセット値のかかり方の概念を示す図である。FIG. 3 is a diagram illustrating the concept of how offset values are applied. 映像符号化装置の実施例を示す図である。1 is a diagram showing an example of a video encoding device. 本開示適用前および適用後の各ブロックサイズ数の選択比率のシミュレーション結果を示す図である。FIG. 7 is a diagram showing simulation results of the selection ratio of each block size number before and after application of the present disclosure. 本開示適用前および適用後のSN比を示す図である。FIG. 2 is a diagram showing the SN ratio before and after application of the present disclosure. 本開示適用前および適用後のバッファ残量を示す図である。FIG. 7 is a diagram showing the remaining buffer amount before and after the present disclosure is applied.

以下、図面を参照して、本開示の実施形態を説明する。図面の記載において同一部分には同一符号を付し説明を省略する。 Embodiments of the present disclosure will be described below with reference to the drawings. In the description of the drawings, the same parts are denoted by the same reference numerals and explanations will be omitted.

[本開示の概要]
特許文献3では、小さなブロックサイズの発生比率を増加させる(CU数を多くする)ためにオフセット値を符号化コストに設定していた。反対に本開示では、大きなブロックサイズの発生比率を増加させる(CU数を少なくする)ためにオフセット値を符号化コストに設定する点に特徴がある。この点、特許文献4では、大きなブロックサイズの発生比率を増加させているが、本開示では、更に符号化データを蓄積するバッファ回路でバッファ破綻が生じないようにオフセット値を設定する点に特徴がある。
[Summary of this disclosure]
In Patent Document 3, an offset value is set in the encoding cost in order to increase the occurrence ratio of small block sizes (increase the number of CUs). On the contrary, the present disclosure is characterized in that an offset value is set in the encoding cost in order to increase the occurrence ratio of large block sizes (reduce the number of CUs). In this regard, Patent Document 4 increases the occurrence ratio of large block sizes, but the present disclosure is characterized in that an offset value is set to prevent buffer failure in the buffer circuit that stores encoded data. There is.

以降、本実施形態に係る映像符号化装置について説明する。本実施形態に係る映像符号化装置は、HEVCやHEVCに準じる規格に基づく映像符号化装置である。本実施形態では、HEVCに基づいて映像符号化を行う場合を例に説明する。ただし、HEVCにおけるCUのように、符号化の基本単位が複数のブロックサイズで定義され、その複数のブロックサイズを組み合わせてピクチャ(画像)毎に映像符号化を行う映像符号化装置や映像符号化方法に適用可能である。 Hereinafter, a video encoding device according to this embodiment will be explained. The video encoding device according to this embodiment is a video encoding device based on HEVC or a standard similar to HEVC. In this embodiment, a case where video encoding is performed based on HEVC will be described as an example. However, like the CU in HEVC, the basic unit of encoding is defined by multiple block sizes, and video encoding devices and video encoding devices that combine the multiple block sizes and perform video encoding for each picture (image). Applicable to methods.

[映像符号化装置の構成例]
図1は、本実施形態に係る映像符号化装置1の構成例を示す図である。映像符号化装置1は、符号化回路11と、バッファ回路12と、オフセット計算回路13と、ブロックサイズ決定回路14と、を備える。
[Configuration example of video encoding device]
FIG. 1 is a diagram showing a configuration example of a video encoding device 1 according to the present embodiment. The video encoding device 1 includes an encoding circuit 11, a buffer circuit 12, an offset calculation circuit 13, and a block size determination circuit 14.

[符号化回路11]
符号化回路11は、映像符号化装置1に入力された画像データをピクチャ毎に、更にそれを分割したCTU毎にCUのブロック単位で符号化する回路である。符号化回路11は、予測残差生成部111と、DCT(Discrete Cosine Transform)変換部112と、量子化部113と、可変長符号化部114と、逆量子化部115と、逆DCT部116と、復号部117と、イントラ/インター予測回路118と、を備える。
[Encoding circuit 11]
The encoding circuit 11 is a circuit that encodes image data input to the video encoding device 1 for each picture and further for each CTU obtained by dividing the image data in units of CU blocks. The encoding circuit 11 includes a prediction residual generation section 111, a DCT (Discrete Cosine Transform) transformation section 112, a quantization section 113, a variable length encoding section 114, an inverse quantization section 115, and an inverse DCT section 116. , a decoding unit 117 , and an intra/inter prediction circuit 118 .

予測残差生成部111は、映像符号化装置1に入力された画像データとイントラ/インター予測回路118から出力された予測信号との差分を予測残差信号として生成する。その後、DCT変換部112、量子化部113、可変長符号化部114は、その予測残差信号を符号化し、符号化した符号化データをバッファ回路12に蓄積する。 The prediction residual generation unit 111 generates the difference between the image data input to the video encoding device 1 and the prediction signal output from the intra/inter prediction circuit 118 as a prediction residual signal. Thereafter, the DCT transform section 112, the quantization section 113, and the variable length encoding section 114 encode the prediction residual signal and store the encoded encoded data in the buffer circuit 12.

その際、復号部117は、逆量子化部115および逆DCT部116によって復元された予測残差信号と、イントラ/インター予測回路118で過去に予測されていた予測信号と、を基に、実際の映像データを示す復号信号を生成する。このとき、1ピクチャ分の復号信号が生成される。その後、イントラ/インター予測回路118は、その1ピクチャ分または複数ピクチャ分の復号信号に基づき、再び次の予測信号を生成する。 At this time, the decoding unit 117 calculates the actual prediction based on the prediction residual signal restored by the inverse quantization unit 115 and the inverse DCT unit 116 and the prediction signal predicted in the past by the intra/inter prediction circuit 118. A decoded signal representing the video data is generated. At this time, a decoded signal for one picture is generated. Thereafter, the intra/inter prediction circuit 118 generates the next predicted signal again based on the decoded signals for one picture or multiple pictures.

なお、「予測」とは、時刻tの画像フレームから時刻tの画像フレームを予測することをいう。「予測信号」とは、時刻tの画像フレームを基に予測した時刻tの画像フレームである。時刻tとは、符号化順で時刻tよりも過去の時刻のことである。「予測残差信号」とは、予測した時刻tの画像フレームと時刻tの画像フレームとの差の信号である。予測が正確であるほど、予測残差信号は小さくなる。 Note that "prediction" refers to predicting the image frame at time t from the image frame at time tr . The "prediction signal" is an image frame at time t predicted based on the image frame at time tr . Time tr is a time that is earlier than time t in the encoding order. The "prediction residual signal" is a signal of the difference between the predicted image frame at time t and the image frame at time t. The more accurate the prediction, the smaller the prediction residual signal.

上記動作は、HEVCで行われる符号化の基本動作である。図1に示した符号化回路11は、HEVCで符号化を行うための典型例である。符号化回路11は、図1に示した構成に限定されず、HEVCの符号化を実行可能であればその他の構成でも構わない。 The above operation is the basic encoding operation performed in HEVC. The encoding circuit 11 shown in FIG. 1 is a typical example for encoding in HEVC. The encoding circuit 11 is not limited to the configuration shown in FIG. 1, and may have any other configuration as long as it can perform HEVC encoding.

[バッファ回路12]
バッファ回路12は、符号化回路11でCTU毎に符号化された符号化データを1ピクチャ分または複数ピクチャ分一時的に蓄積し、蓄積した1ピクチャ分または複数ピクチャ分の符号化データを映像符号化装置1から外部へ出力する回路である。
[Buffer circuit 12]
The buffer circuit 12 temporarily stores the encoded data for each CTU in the encoding circuit 11 for one picture or multiple pictures, and converts the stored encoded data for one picture or multiple pictures into a video code. This is a circuit for outputting from the conversion device 1 to the outside.

[符号化回路11のイントラ/インター予測回路118]
符号化回路11を構成するイントラ/インター予測回路118について説明する。上記の通り、イントラ/インター予測回路118は、1ピクチャ分の復号信号に基づき、再び次の予測信号を生成する回路である。
[Intra/inter prediction circuit 118 of encoding circuit 11]
The intra/inter prediction circuit 118 that constitutes the encoding circuit 11 will be explained. As described above, the intra/inter prediction circuit 118 is a circuit that generates the next prediction signal again based on the decoded signal for one picture.

符号化回路11での符号化は、1ピクチャをCTUに分割したCTU毎に行われる。HEVCでは、CTUは更にCUに分割され、CU毎に符号化が行われる。CU毎の符号化によって生成された符号化データが合成されてCTUの符号化データとなる。 Encoding in the encoding circuit 11 is performed for each CTU obtained by dividing one picture into CTUs. In HEVC, the CTU is further divided into CUs, and encoding is performed for each CU. The encoded data generated by the encoding for each CU is combined to become the encoded data of the CTU.

HEVCで規定されているCUのブロックサイズは、64×64画素、32×32画素、16×16画素、8×8画素の4種類である。以降、それぞれを64×64、32×32、16×16、8×8と表記する。CTUからCUへの分割は、ブロックサイズ決定回路14でのブロックサイズの決定結果に基づいて行われる。 There are four types of CU block sizes defined by HEVC: 64 x 64 pixels, 32 x 32 pixels, 16 x 16 pixels, and 8 x 8 pixels. Hereinafter, each will be expressed as 64×64, 32×32, 16×16, and 8×8. Division of CTUs into CUs is performed based on the result of block size determination by the block size determination circuit 14.

図2は、イントラ/インター予測回路118の構成例を示す図である。イントラ/インター予測回路118は、予測信号候補生成部1181と、予測信号決定部1182と、を備える。 FIG. 2 is a diagram showing a configuration example of the intra/inter prediction circuit 118. The intra/inter prediction circuit 118 includes a predicted signal candidate generation section 1181 and a predicted signal determination section 1182.

予測信号候補生成部1181は、イントラ/インター予測回路118の予測時点で候補となりうるCUのブロックサイズの組み合わせの予測信号の候補を生成し、予測信号決定部1182へ供給する。この時、予測信号候補生成部1181は、生成した複数の予測信号候補にそれぞれ対応したコスト値を算出し、算出した各予測信号候補のコスト値をブロックサイズ決定回路14へ供給する。 The predicted signal candidate generation unit 1181 generates predicted signal candidates for combinations of CU block sizes that can be candidates at the time of prediction by the intra/inter prediction circuit 118, and supplies them to the predicted signal determination unit 1182. At this time, the predicted signal candidate generation unit 1181 calculates cost values corresponding to the plurality of generated predicted signal candidates, and supplies the calculated cost values of each predicted signal candidate to the block size determination circuit 14.

予測信号決定部1182は、予測信号候補生成部1181から供給された複数の予測信号候補の中から、ブロックサイズ決定回路14で決定された決定ブロックサイズに対応する予測信号候補を選択し、選択した予測信号候補を予測信号として予測残差生成部111および復号部117へ出力する。 The predicted signal determining unit 1182 selects a predicted signal candidate corresponding to the determined block size determined by the block size determining circuit 14 from among the plurality of predicted signal candidates supplied from the predicted signal candidate generating unit 1181. The predicted signal candidate is output as a predicted signal to prediction residual generation section 111 and decoding section 117.

[コスト値]
コスト値とは、符号化データの映像品質・画像品質や符号量を表す指標・評価値である。符号化に係るコストであり、符号化コストとも言う。
[Cost value]
The cost value is an index/evaluation value representing the video quality, image quality, and code amount of encoded data. This is a cost related to encoding, and is also called encoding cost.

例えば、コスト値は、特許文献3に示すように、「D+λ・R」(Dは歪み量、λは所定値、Rは符号量)で計算する。Dの代わりに、差分絶対値和(SAD値:Sum of Absolute Difference)やアダマール変換後の差分絶対値和(SATD値:Sum of Absolute Transformed Difference)を使用してもよい。Rには、仮見積もり符号量を使用してもよい。 For example, as shown in Patent Document 3, the cost value is calculated by "D+λ·R" (D is the amount of distortion, λ is a predetermined value, and R is the amount of code). Instead of D, a Sum of Absolute Difference (SAD value) or a Sum of Absolute Transformed Difference (SATD value) after Hadamard transformation may be used. A tentative estimated code amount may be used for R.

コスト値は、映像品質の劣化量や符号量に対応するものであれば、直接それらを示す値に限定されない。それらに関連付けられた他のパラメータも使用可能である。 The cost value is not limited to a value that directly indicates the amount of deterioration in video quality or the amount of code, as long as it corresponds to the amount of deterioration in video quality or the amount of code. Other parameters associated with them are also available.

コスト値は、小さいほど、少ない符号量で画像劣化量の少ない(画像品質の高い)符号化が行えることを示す。コスト値は、一般的にはブロックサイズが小さいほど小さい。従って、ブロックサイズ決定回路14で行うCUのブロックサイズの決定においては、基本的には、コスト値が小さくなる(ブロックサイズが小さくなる)ようにブロックサイズの組み合わせを選択する。 A smaller cost value indicates that encoding can be performed with a smaller amount of code and less amount of image deterioration (higher image quality). Generally, the smaller the block size, the smaller the cost value. Therefore, when determining the block size of a CU performed by the block size determining circuit 14, a combination of block sizes is basically selected such that the cost value is small (the block size is small).

[ブロックサイズの選択方法]
一方、大きなブロックサイズの方(CU数の少ない方)が全体の符号量が小さくなる場合がある。ブロックサイズの大きさ(CU数)の違いによる符号量の比較例を図3に示す。図3(a)は、4個の8×8の符号量を示す図である。図3(b)は、1個の16×16の符号量を示す図である。図3(a)では、1個の16×16を4個の8×8に分割した場合を示している。
[How to select block size]
On the other hand, the larger the block size (the smaller the number of CUs), the smaller the overall code amount may be. FIG. 3 shows a comparison example of the amount of code depending on the block size (number of CUs). FIG. 3(a) is a diagram showing four 8×8 code amounts. FIG. 3(b) is a diagram showing the amount of one 16×16 code. FIG. 3(a) shows a case where one 16×16 is divided into four 8×8.

それぞれの符号量は、主にcoeffとオーバーヘッド(OH)とで構成される。coeffは、予測残差を符号化した符号化データの符号量であり、画像に直接寄与する。OHは、画像に直接寄与しない補助的情報であり、CU毎に必要である。OHは、CUの大きさによらずほぼ一定量である。 Each code amount is mainly composed of coeff and overhead (OH). Coeff is the code amount of encoded data obtained by encoding the prediction residual, and directly contributes to the image. OH is auxiliary information that does not directly contribute to the image, and is required for each CU. OH is a substantially constant amount regardless of the size of the CU.

図3の右側には、符号量の削減により、coeffを例えば1/2に削減した場合も示している。この場合、OHは符号量の削減に寄与しない。なお、符号量の削減は、例えば、量子化部113でのステップのQP(Quantization Parameter)値を上げる方法等が考えられる。 The right side of FIG. 3 also shows a case where the coeff is reduced to, for example, 1/2 by reducing the amount of code. In this case, OH does not contribute to reducing the amount of code. Note that the code amount can be reduced by, for example, increasing the QP (Quantization Parameter) value of the step in the quantization unit 113.

ここで、一般的には、小さなブロックサイズの方が予測残差は小さくなるため、coeffが小さくなる傾向があり、1個の16×16よりも4個の8×8の方がOHも含めて全体の符号量は小さい。 Here, in general, the smaller the block size, the smaller the prediction residual, so the coeff tends to be smaller. Therefore, the total code amount is small.

しかし、それぞれについてcoeffの符号量を例えば1/2に削減すると、全体の符号量は16×16の方が小さくなる。これは、ブロックサイズが小さい(CU数が多い)と符号量の削減に寄与しないOHの数がその分多くなるため、全体として符号量の削減効果が小さくなるからである。この場合、大きなブロックサイズの方が符号量の削減効果が大きい。 However, if the code amount of the coeff is reduced to, for example, 1/2 for each, the total code amount becomes smaller in 16×16. This is because when the block size is small (the number of CUs is large), the number of OHs that do not contribute to the reduction of the code amount increases accordingly, and the overall effect of reducing the code amount becomes smaller. In this case, the larger the block size, the greater the effect of reducing the amount of code.

従って、符号量の削減を伴う場合には、大きなブロックサイズの方が全体の符号量が小さくなる場合があると言える。そのため、バッファ回路12でバッファ破綻が発生するような状況においては、より大きなブロックサイズを選択することで、バッファ破綻を抑制することが可能となる。大きなブロックサイズの選択により多少の画質劣化が想定されるが、バッファ破綻による画質劣化に比べると許容範囲と考えられる。 Therefore, when the amount of code is reduced, it can be said that the larger the block size, the smaller the overall amount of code may be. Therefore, in a situation where a buffer failure occurs in the buffer circuit 12, by selecting a larger block size, it is possible to suppress the buffer failure. Although some image quality deterioration is expected due to the selection of a large block size, it is considered to be within an acceptable range compared to image quality deterioration due to buffer failure.

具体的には、オフセット計算回路13において、より大きなブロックサイズの発生比率を増加させる(CU数をより少なくする)ように誘導させるオフセット値を算出する。そして、ブロックサイズ決定回路14において、オフセット加算後のコスト値が最小となるブロックサイズの組み合わせを選択する。 Specifically, the offset calculation circuit 13 calculates an offset value that induces an increase in the occurrence ratio of larger block sizes (reduces the number of CUs). Then, the block size determination circuit 14 selects a combination of block sizes that minimizes the cost value after adding the offset.

以降、オフセット計算回路13およびブロックサイズ決定回路14について説明する。 Hereinafter, the offset calculation circuit 13 and the block size determination circuit 14 will be explained.

[オフセット計算回路13]
オフセット計算回路13は、オフセット値を計算する回路である。具体的には、オフセット計算回路13は、1ピクチャにおけるCU数およびバッファ回路12のバッファ占有量(バッファ残量)に基づき、より大きなブロックサイズ(より少ないCU数)が選択されやすいように誘導する各ブロックサイズのオフセット値を計算する。
[Offset calculation circuit 13]
The offset calculation circuit 13 is a circuit that calculates an offset value. Specifically, the offset calculation circuit 13 guides the selection of a larger block size (smaller number of CUs) based on the number of CUs in one picture and the buffer occupancy (buffer remaining amount) of the buffer circuit 12. Calculate the offset value for each block size.

1ピクチャにおけるCU数に代えて、1ピクチャにおける符号量のオーバーヘッド比率(OH比率)を用いてもよい。OH比率は、図3に示した通り、CU数に関連付けられるからである。 Instead of the number of CUs in one picture, the overhead ratio (OH ratio) of the amount of code in one picture may be used. This is because the OH ratio is associated with the number of CUs, as shown in FIG.

「1ピクチャにおけるCU数」および「1ピクチャにおける符号量のオーバーヘッド比率(OH比率)」について補足(例示)しておく。CU数やOH比率は、1ピクチャ毎に計算される。例えば、4つの8×8の符号量におけるCU数は、4となる。4つの8×8の符号量におけるOH比率は、「4つのOHのデータ量/{(4つのcoeff+4つのOH)のデータ量(=全符号量)}」で計算する。 Supplementary information (examples) will be given regarding the "number of CUs in one picture" and the "overhead ratio (OH ratio) of code amount in one picture." The number of CUs and the OH ratio are calculated for each picture. For example, the number of CUs in four 8×8 code amounts is 4. The OH ratio in the four 8×8 code amounts is calculated as “data amount of four OH/{data amount of (4 coeff+4 OH) (=total code amount)}”.

なお、オフセット値の具体的な計算方法については、後述する。このオフセット値は、ブロックサイズ決定回路14に供給される。 Note that a specific method for calculating the offset value will be described later. This offset value is supplied to the block size determination circuit 14.

[ブロックサイズ決定回路14]
ブロックサイズ決定回路14は、CTUからCUのブロックサイズへの分割の組み合わせを決定する回路である。CUのブロックサイズの組み合わせは、イントラ/インター予測回路118から供給された各組み合わせのコスト値と、オフセット計算回路13から供給されたオフセット値と、に基づいて決定される。
[Block size determination circuit 14]
The block size determining circuit 14 is a circuit that determines a combination of divisions from CTU to CU block size. The combination of CU block sizes is determined based on the cost value of each combination supplied from the intra/inter prediction circuit 118 and the offset value supplied from the offset calculation circuit 13.

なお、コスト値とは、上記の通り、符号化した際の符号量や画像品質(歪量等)を示す評価値であり、コスト値が小さい程、低符号量および低歪を示し、符号化効率がよいとされる。 As mentioned above, the cost value is an evaluation value that indicates the amount of code and image quality (amount of distortion, etc.) when encoding.The smaller the cost value, the lower the amount of code and the lower distortion. It is said to be efficient.

図4は、ブロックサイズ決定回路14の構成例を示す図である。ブロックサイズ決定回路14は、加算部141と、サイズ選択部142と、を備える。 FIG. 4 is a diagram showing a configuration example of the block size determination circuit 14. The block size determination circuit 14 includes an addition section 141 and a size selection section 142.

加算部141は、イントラ/インター予測回路118からのコスト値に対し、オフセット計算回路13からのオフセット値を加算する。なお、加算以外に乗算等の四則演算や係数を掛けても構わない。 The adding unit 141 adds the offset value from the offset calculation circuit 13 to the cost value from the intra/inter prediction circuit 118. Note that in addition to addition, four arithmetic operations such as multiplication or multiplication by a coefficient may be used.

サイズ選択部142は、オフセット値加算後のコスト値を複数の組み合わせ間で比較し、オフセット値加算後のコスト値が最小となるブロックサイズの組み合わせを選択する。サイズ選択部142は、選択したブロックサイズの組み合わせを決定ブロックサイズとして予測信号決定部1182に供給する。コスト値の具体的な比較方法およびブロックサイズの組み合わせの選択方法については、後述する。 The size selection unit 142 compares the cost values after addition of the offset value among a plurality of combinations, and selects a combination of block sizes that provides the minimum cost value after addition of the offset value. The size selection unit 142 supplies the selected combination of block sizes to the predicted signal determination unit 1182 as a determined block size. A specific method of comparing cost values and a method of selecting a combination of block sizes will be described later.

コスト値にオフセット値を加算することで、ブロックサイズの組み合わせの選択に方向づけが行われることになる。本実施形態では、より大きなブロックサイズが選択されやすいように誘導される。オフセット値は、上記の通り、1ピクチャにおけるCU数およびバッファ回路12のバッファ占有量(バッファ残量)を基に決定する。CU数が求められない場合には、1ピクチャ分の符号量のOH比率から推定可能である。 By adding an offset value to the cost value, direction is given to the selection of block size combinations. In this embodiment, a larger block size is more likely to be selected. As described above, the offset value is determined based on the number of CUs in one picture and the buffer occupation amount (buffer remaining amount) of the buffer circuit 12. If the number of CUs cannot be determined, it can be estimated from the OH ratio of the code amount for one picture.

このように、より大きなブロックサイズが選択されるようにすることで、1ピクチャにおけるCU数の増加と、その結果としてのOH数の増加による符号量の増加と、の2点を抑制可能となる。 By selecting a larger block size in this way, it is possible to suppress two points: an increase in the number of CUs in one picture, and an increase in the amount of code due to the resulting increase in the number of OHs. .

一般的には、符号化回路11では、符号化における符号量の削減が行われる。符号量削減の例として、上述した量子化部113でのステップのQP値を上げる方法、量子化部113のスケーリングリストを調整して高周波成分をカットする方法等が考えられる。しかし、これら符号量の削減を図っても、符号量がバッファ回路12の蓄積容量をオーバーして全ての符号化データが映像符号化装置1から伝送されないバッファ破綻が発生する場合がある。 Generally, the encoding circuit 11 reduces the amount of code during encoding. Examples of code amount reduction include a method of increasing the QP value of the step in the quantization unit 113 described above, a method of adjusting the scaling list of the quantization unit 113 to cut high frequency components, and the like. However, even if these efforts are made to reduce the amount of code, the amount of code may exceed the storage capacity of the buffer circuit 12 and a buffer failure may occur in which all encoded data is not transmitted from the video encoding device 1.

一方、本実施形態では、イントラ/インター予測後の符号化を実施する際、CUのブロックサイズの組み合わせの選択時により大きなブロックサイズが選定されるので、CU数の増加やOH比率の増加による符号量の増加を抑制可能となり、バッファ破綻を解消することが可能となる。本実施形態に係る映像符号化装置1は、符号量の削減が図られてもバッファ破綻が発生するような場合に適用できる。 On the other hand, in this embodiment, when performing encoding after intra/inter prediction, a larger block size is selected when selecting a combination of block sizes of CUs, so that the code is It becomes possible to suppress the increase in the amount, and it becomes possible to eliminate buffer failure. The video encoding device 1 according to this embodiment can be applied to a case where a buffer failure occurs even if the amount of code is reduced.

[映像符号化装置1の動作]
図5は、映像符号化装置1で行う映像符号化方法の処理フローを示す図である。
[Operation of video encoding device 1]
FIG. 5 is a diagram showing a processing flow of a video encoding method performed by the video encoding device 1.

ステップS101;
まず、符号化回路11は、決定ブロックサイズに基づいて映像データをピクチャ毎にブロック単位で符号化する。そして、バッファ回路12は、ブロック単位で符号化された各ピクチャの符号化データを一時的に蓄積する。
Step S101;
First, the encoding circuit 11 encodes video data in units of blocks for each picture based on the determined block size. Then, the buffer circuit 12 temporarily stores the encoded data of each picture encoded in units of blocks.

その際、符号化回路11は、そのブロックを任意に組み合わせた複数の組み合わせ候補に対応する複数の予測信号候補を生成し、生成した複数の予測信号候補にそれぞれ対応したコスト値を算出し、算出した各予測信号候補のコスト値をブロックサイズ決定回路14へ供給する。 At this time, the encoding circuit 11 generates a plurality of predicted signal candidates corresponding to a plurality of combination candidates obtained by arbitrarily combining the blocks, calculates a cost value corresponding to each of the generated plurality of predicted signal candidates, and calculates The cost value of each predicted signal candidate is supplied to the block size determination circuit 14.

ステップS102;
次に、オフセット計算回路13は、1ピクチャにおけるCU数およびバッファ回路12のバッファ占有量(バッファ残量)に基づき、後述するように、CU数が多いほど、バッファ占有量が大きい(バッファ残量が少ない)ほど、より大きな値が設定されたオフセット値を求め、求めたオフセット値をブロックサイズ決定回路14へ供給する。
Step S102;
Next, the offset calculation circuit 13 calculates, based on the number of CUs in one picture and the buffer occupancy (buffer remaining amount) of the buffer circuit 12, as described later, the larger the CU number, the larger the buffer occupancy (buffer remaining amount). The smaller the offset value is, the larger the offset value set is determined, and the determined offset value is supplied to the block size determining circuit 14.

ステップS103;
次に、ブロックサイズ決定回路14は、各予測信号候補のコスト値にオフセット値を加算し、オフセット値加算後のコスト値を複数の予測信号候補間で比較し、最小となるコスト値の予測信号候補を選択し、選択した予測信号候補を決定ブロックサイズ(符号化用のブロックサイズ組み合わせ)として決定して符号化回路11へ供給する。
Step S103;
Next, the block size determination circuit 14 adds an offset value to the cost value of each predicted signal candidate, compares the cost value after adding the offset value among the plurality of predicted signal candidates, and selects the predicted signal with the minimum cost value. A candidate is selected, and the selected predicted signal candidate is determined as a determined block size (block size combination for encoding) and is supplied to the encoding circuit 11.

ステップS104;
最後に、符号化回路11は、決定ブロックサイズに対応する予測信号候補を選択し、選択した予測信号候補を予測信号とし、その予測信号と映像符号化装置1に入力された画像データと差分を予測残差信号として生成して符号化し、符号化した符号化データをバッファ回路12に蓄積する。
Step S104;
Finally, the encoding circuit 11 selects a predicted signal candidate corresponding to the determined block size, uses the selected predicted signal candidate as a predicted signal, and calculates the difference between the predicted signal and the image data input to the video encoding device 1. The prediction residual signal is generated and encoded, and the encoded data is stored in the buffer circuit 12.

[オフセット計算回路13の動作]
図6は、オフセット計算回路13で行うオフセット値の計算処理フローを示す図である。図中、オフセット8、オフセット16、オフセット32、オフセット64は、それぞれ、ブロックサイズ8×8、ブロックサイズ16×16、ブロックサイズ32×32、ブロックサイズ64×64の各コスト値に加算するオフセット値を示す。1ピクチャ内において、同じブロックサイズのオフセットは、CTUやCUによらず同じにできる。
[Operation of offset calculation circuit 13]
FIG. 6 is a diagram showing the flow of the offset value calculation process performed by the offset calculation circuit 13. In the figure, offset 8, offset 16, offset 32, and offset 64 are offset values to be added to each cost value of block size 8×8, block size 16×16, block size 32×32, and block size 64×64, respectively. shows. Within one picture, the offset of the same block size can be the same regardless of CTU or CU.

また、バッファ回路12の蓄積状況、および、1ピクチャあたりのCU数の状況によって、ブロックサイズ毎に4通りのオフセット(0、a、b、c)を設定する。オフセット(0、a、b、c)の大きさは、同じブロックサイズにおいて、0<a<b<cとする。 Furthermore, four offsets (0, a, b, c) are set for each block size depending on the storage status of the buffer circuit 12 and the status of the number of CUs per picture. The sizes of the offsets (0, a, b, c) satisfy 0<a<b<c in the same block size.

以下のアルゴリズムに従って、オフセット計算回路13は、ピクチャ毎に、バッファ回路12の破綻状況およびCU数の状況からオフセット値を計算する。 According to the following algorithm, the offset calculation circuit 13 calculates an offset value for each picture from the failure status of the buffer circuit 12 and the status of the number of CUs.

ステップS201;
まず、オフセット計算回路13は、バッファ回路12でバッファ破綻が起こっているか否かを判定する。
Step S201;
First, the offset calculation circuit 13 determines whether a buffer failure has occurred in the buffer circuit 12.

ステップS202;
次に、オフセット計算回路13は、バッファ破綻が起こっていない場合(バッファ残量≧α)、数秒後にバッファ破綻の可能性があるか否かを判定する。
Step S202;
Next, if a buffer failure has not occurred (remaining buffer amount≧α), the offset calculation circuit 13 determines whether there is a possibility of a buffer failure after several seconds.

ステップS203;
次に、オフセット計算回路13は、数秒後にバッファ破綻の可能性がある場合(バッファ残量<β)、CU数が多いか否かを判定する。
Step S203;
Next, the offset calculation circuit 13 determines whether the number of CUs is large if there is a possibility that the buffer will fail after several seconds (remaining buffer amount <β).

ステップS204;
オフセット計算回路13は、バッファ破綻が起こっている場合(バッファ残量<α)、CU数に関係なく、オフセット8~オフセット64にc8~c64をそれぞれ設定(オフセットc設定)する。
Step S204;
The offset calculation circuit 13 sets c8 to c64 to offset 8 to offset 64 (offset c setting), respectively, when a buffer failure occurs (buffer remaining amount<α), regardless of the number of CUs.

ステップS205;
オフセット計算回路13は、バッファ破綻が起こっていない(バッファ残量≧α)が、数秒後にバッファ破綻の可能性があり(バッファ残量<β)、CU数が多い場合(OH比率≧γ)、オフセット8~オフセット64にb8~b64をそれぞれ設定(オフセットb設定)する。
Step S205;
The offset calculation circuit 13 calculates that if a buffer failure has not occurred (buffer remaining amount ≧ α), but there is a possibility that the buffer failure will occur after a few seconds (buffer remaining amount < β) and the number of CUs is large (OH ratio ≧ γ), Set b8 to b64 in offset 8 to offset 64, respectively (offset b setting).

ステップS206;
オフセット計算回路13は、バッファ破綻が起こっていない(バッファ残量≧α)が、数秒後にバッファ破綻の可能性があり(バッファ残量<β)、CU数が少ない場合(OH比率<γ)、オフセット8~オフセット64にa8~a64をそれぞれ設定(オフセットa設定)する。
Step S206;
The offset calculation circuit 13 calculates that if a buffer failure has not occurred (buffer remaining amount ≧ α), but there is a possibility that the buffer failure will occur after a few seconds (buffer remaining amount < β), and the number of CUs is small (OH ratio < γ), Set a8 to a64 in offset 8 to offset 64, respectively (offset a setting).

ステップS207;
オフセット計算回路13は、数秒後にバッファ破綻の可能性がない場合(バッファ残量≧β)、CU数に関係なく、オフセット8~オフセット64に0をそれぞれ設定(オフセット0設定)する。オフセット0設定は、オフセットを設定しない場合となる。
Step S207;
If there is no possibility that the buffer will fail after several seconds (buffer remaining amount≧β), the offset calculation circuit 13 sets each of offset 8 to offset 64 to 0 (offset 0 setting), regardless of the number of CUs. Offset 0 setting is the case where no offset is set.

なお、α、β、γは、経験的に求めた値である。例えば、αは、0か0に近い値(負値も可能)に設定でき、βは、比較的0に近い値に設定でき、γは、数十%程度に設定できる。 Note that α, β, and γ are values determined empirically. For example, α can be set to 0 or a value close to 0 (negative values are also possible), β can be set to a value relatively close to 0, and γ can be set to about several tens of percent.

また、1ピクチャあたりのCU数は、全体の符号量に対するOHの符号量の比率から推測することができる。CU数とOHの比率には相関関係があるため、CU数の条件を、OHの比率の条件に置き換えることができる。OH比率は、全体の符号量のうちOHの符号量が占める割合である。OHの符号量はブロックサイズに関係なくほぼ一定であるため、例えばOH比率が高いとCUの数が多い傾向にあるとわかる。このことから、CU数の傾向を推測することができる。なお、OHの比率の他に、CU数と相関があるパラメータがある場合は、それを使用することもできる。 Further, the number of CUs per picture can be estimated from the ratio of the OH code amount to the overall code amount. Since there is a correlation between the number of CUs and the ratio of OH, the condition of the number of CUs can be replaced with the condition of the ratio of OH. The OH ratio is the ratio of the OH code amount to the total code amount. Since the OH code amount is almost constant regardless of the block size, it can be seen that, for example, when the OH ratio is high, the number of CUs tends to be large. From this, it is possible to infer the trend of the number of CUs. Note that if there is a parameter that has a correlation with the number of CUs in addition to the OH ratio, it can also be used.

図6に示したフローチャートにおいては、CU数が多いほど、バッファ破綻の可能性が高いほど、より大きなオフセット値を設定する(0<a<b<c)。CU数が少ないほど、バッファ破綻の可能性が低いほど、より小さなオフセット値を設定する。つまり、CU数が多い場合(すなわち、ブロックサイズが小さい場合)には、オフセット値を比較的大きく設定する。 In the flowchart shown in FIG. 6, the larger the number of CUs and the higher the possibility of buffer failure, the larger the offset value is set (0<a<b<c). The smaller the number of CUs and the lower the possibility of buffer failure, the smaller the offset value is set. That is, when the number of CUs is large (that is, when the block size is small), the offset value is set relatively large.

即ち、ブロックサイズ決定回路14では、オフセット値をコスト値に加算し、ブロックサイズが小さい方のオフセットを比較的大きくすることで、より大きなブロックサイズが選ばれやすくなる。これにより、バッファ破綻の可能性を低減できる。 That is, the block size determining circuit 14 adds the offset value to the cost value and makes the offset of the smaller block size relatively larger, thereby making it easier to select a larger block size. This reduces the possibility of buffer failure.

なお、オフセットa8~a64、b8~b64、c8~c64は、既存のコスト値よりも小さい値を設定する。既存のコスト値より大きな値を設定すると、コスト値よりもオフセットの方が支配的となり、オフセットの本来の役割である微調整の範囲を超える。 Note that offsets a8 to a64, b8 to b64, and c8 to c64 are set to values smaller than the existing cost values. If a value larger than the existing cost value is set, the offset becomes more dominant than the cost value, exceeding the scope of fine adjustment, which is the original role of the offset.

[ブロックサイズ決定回路14のサイズ選択部142の動作]
図7は、ブロックサイズ決定回路14のサイズ選択部142で行うコスト値の比較およびブロックサイズの組み合わせ選択の処理フローを示す図である。
[Operation of size selection unit 142 of block size determination circuit 14]
FIG. 7 is a diagram showing a processing flow of cost value comparison and block size combination selection performed by the size selection unit 142 of the block size determination circuit 14.

サイズ選択部142は、イントラ/インター予測回路118の予測信号候補生成部1181で生成されたCUのブロックサイズの組み合わせの予測信号候補の全てのコスト値に、オフセット計算回路13で決定されたオフセットを加算し、オフセット加算後のコスト値を予測信号候補間で比較し、最適な予測信号候補を選択する。 The size selection unit 142 applies the offset determined by the offset calculation circuit 13 to all cost values of the prediction signal candidates of the combination of CU block sizes generated by the prediction signal candidate generation unit 1181 of the intra/inter prediction circuit 118. The cost values after adding the offset are compared between the predicted signal candidates, and the optimal predicted signal candidate is selected.

サイズ選択部142での比較および選択の動作は、以下のステップで行われる。ここでは、CTUが64×64であり、16個の16×16に分割された場合について説明する。 The comparison and selection operations in the size selection unit 142 are performed in the following steps. Here, a case where the CTU is 64×64 and is divided into 16 16×16 pieces will be explained.

ステップS301;
まず、サイズ選択部142は、16個の16×16のそれぞれについて、4個の8×8に分割したパターンの場合と、分割しない1個の16×16のパターンの場合と、について、コスト値+オフセット値を比較する。4個の8×8のコスト値は、それぞれのコスト値+オフセットの合計値とする。そして、値が小さい方のCU分割パターンを選択する。これを16個の16×16について行う。
Step S301;
First, the size selection unit 142 determines the cost value for each of the 16 16×16 patterns in the case of a pattern divided into four 8×8 patterns and in the case of a single 16×16 pattern without division. + Compare offset values. The four 8×8 cost values are the total value of each cost value+offset. Then, the CU division pattern with the smaller value is selected. This is done for 16 16×16 pieces.

ステップS302;
次に、サイズ選択部142は、ステップS301で選択した16個のCU分割パターンと、32×32の分割しないパターンの場合と、について、コスト値+オフセットを比較する。16個のCU分割パターンのコスト値は、ステップS301で選択したパターンのコスト値+オフセットの合計値とする。そして、値が小さい方のCU分割パターンを選択する。これを4個の32×32について行う。
Step S302;
Next, the size selection unit 142 compares the cost value+offset between the 16 CU division patterns selected in step S301 and the 32×32 non-division pattern. The cost value of the 16 CU division patterns is the total value of the cost value of the pattern selected in step S301+the offset. Then, the CU division pattern with the smaller value is selected. This is done for four 32×32 pieces.

ステップS303;
最後に、サイズ選択部142は、ステップS302で選択した4個のCU分割パターンと、64×64の分割しないパターンの場合と、について、コスト値+オフセットを比較する。4個のCU分割パターンのコスト値は、ステップS302で選択したパターンのコスト値+オフセットの合計値とする。そして、値が小さい方のCU分割パターンを選択する。
Step S303;
Finally, the size selection unit 142 compares the cost value+offset between the four CU division patterns selected in step S302 and the 64×64 non-division pattern. The cost value of the four CU division patterns is the total value of the cost value of the pattern selected in step S302+offset. Then, the CU division pattern with the smaller value is selected.

(ステップS301の動作)
図8は、ステップS301の処理イメージを示す図である。
(Operation of step S301)
FIG. 8 is a diagram showing a processing image of step S301.

上位サイズの4分割時の左上のブロックをブロックA、右上のブロックをブロックB、左下のブロックをブロックC、右下のブロックをブロックDで示す。 Block A is the upper left block, block B is the upper right block, block C is the lower left block, and block D is the lower right block when the upper size is divided into four parts.

また、コストn_Mを、上位サイズの4分割時のブロックM(=A~D)におけるn×nのコスト値と定義する。オフセットnを、ピクチャにおけるサイズn×nに対するオフセットと定義する。 Furthermore, the cost n_M is defined as the cost value of n×n in block M (=A to D) when the upper size is divided into four. An offset n is defined as an offset for a size n×n in a picture.

但し、コストn_Mは、同じ名称でも、上位のブロックが異なれば、値は異なる。例えば、コスト8_Aは、16×16のブロックAにおける8×8のコスト値であり、オフセット8は、サイズ8×8に対するオフセットである。但し、16×16のブロックAにおける8×8は、32×32のブロックAおよびブロックBに存在するが、それらのコスト8_Aの値は、同じではない。しかし、オフセット8は、共通である。 However, even if the cost n_M has the same name, the value will be different if the upper block is different. For example, cost 8_A is the 8x8 cost value in 16x16 block A, and offset 8 is the offset for size 8x8. However, although 8x8 in 16x16 block A exists in 32x32 block A and block B, the values of their costs 8_A are not the same. However, offset 8 is common.

図8(a)に示すように、4個の16×16のうち、ブロックAは、それを4個の8×8に分割したパターンの場合と、分割しない16×16のパターンの場合とで、コスト値が比較される。4個の8×8のコスト値は、コスト8_A+オフセット8、コスト8_B+オフセット8、コスト8_C+オフセット8、コスト8_D+オフセット8の合計値となる。対して、分割しない16×16のコスト値は、コスト16_A+オフセット16である。ここでは、両者のコスト値を比較して小さい方のサイズパターンを選択する。 As shown in FIG. 8(a), among the four 16×16 blocks, block A is divided into four 8×8 patterns and a 16×16 pattern without the blocks. , the cost values are compared. The four 8×8 cost values are the total value of cost 8_A+offset 8, cost 8_B+offset 8, cost 8_C+offset 8, and cost 8_D+offset 8. On the other hand, the cost value of 16×16 without division is cost 16_A+offset 16. Here, the cost values of both are compared and the smaller size pattern is selected.

また、図8(b)、(c)、(d)についても、4個の16×16のうち、ブロックB、C、Dで、同様に4個の8×8のパターンのコスト値の合計と、分割しない16×16のパターンのコスト値とを比較し、小さい方のサイズパターンを選択する。この選択状況は、画像の状況によって変わる。 8(b), (c), and (d), similarly, the sum of the cost values of the four 8×8 patterns in blocks B, C, and D among the four 16×16 and the cost value of the undivided 16×16 pattern, and select the smaller size pattern. This selection situation changes depending on the image situation.

(ステップS302の動作)
図9は、ステップS302の処理イメージを示す図である。
(Operation of step S302)
FIG. 9 is a diagram showing a processing image of step S302.

図7に示したステップS301の動作では、4個に分割した8×8のパターンにするか、分割しない16×16のパターンにするかを選択した。図9に示すステップS302では、分割した4個の16×16をステップS301で選択したパターンにするか、分割しない32×32のパターンにするかを選択する。なお、コストn_Mおよびオフセットnの定義は、図8の説明において示した内容と同じである。 In the operation of step S301 shown in FIG. 7, it was selected whether to use an 8×8 pattern divided into four parts or a 16x16 pattern without division. In step S302 shown in FIG. 9, it is selected whether to use the four divided 16×16 patterns as the pattern selected in step S301 or the undivided 32×32 pattern. Note that the definitions of cost n_M and offset n are the same as those shown in the explanation of FIG.

図9(a)では、4個の32×32のうち、ブロックAについて、それを4個の16×16に分割したパターンと、分割しない32×32のパターンとで、コスト値が比較される。4個の16×16のコスト値は、ステップS301で選択したブロックAのパターンの合計コスト、ステップS301で選択したブロックBのパターンの合計コスト、ステップS301で選択したブロックCのパターンの合計コスト、ステップS301で選択したブロックDのパターンの合計コストの総合計値となる。対して、分割しない32×32のパターンのコスト値は、コスト32_A+オフセット32である。ここでは、両者のコスト値を比較して小さい方のサイズパターンを選択する。 In FIG. 9(a), for block A among four 32×32 blocks, the cost values are compared between a pattern in which it is divided into four 16×16 blocks and a 32×32 pattern in which it is not divided. . The four 16×16 cost values are the total cost of the block A pattern selected in step S301, the total cost of the block B pattern selected in step S301, the total cost of the block C pattern selected in step S301, This is the total value of the total costs of the patterns of block D selected in step S301. On the other hand, the cost value of a 32×32 pattern that is not divided is cost 32_A+offset 32. Here, the cost values of both are compared and the smaller size pattern is selected.

また、図9(b)、(c)、(d)についても、4個の32×32のうち、ブロックB、C、Dで、同様に4個の16×16のパターンのコスト値の合計と、分割しない32×32のパターンのコスト値とを比較し、小さい方のサイズパターンを選択する。 9(b), (c), and (d), similarly, the sum of the cost values of four 16×16 patterns in blocks B, C, and D among the four 32×32 and the cost value of the undivided 32×32 pattern, and select the smaller size pattern.

(ステップS303の動作)
図10は、ステップS303の処理イメージを示す図である。
(Operation of step S303)
FIG. 10 is a diagram showing a processing image of step S303.

図9に示したステップS302の動作では、4個に分割した16×16のパターンにするか、分割しない32×32のパターンにするかを選択した。図10に示すステップS303では、分割した4個の32×32をそれぞれステップS302で選択したパターンにするか、分割しない64×64のパターンのままにするかを選択する。なお、コストn_Mおよびオフセットnは、図8の説明において示した内容と同じである。 In the operation of step S302 shown in FIG. 9, it was selected whether to use a 16x16 pattern divided into four parts or a 32x32 pattern without division. In step S303 shown in FIG. 10, it is selected whether to make each of the four divided 32×32 patterns selected in step S302 or to leave the undivided 64×64 pattern as it is. Note that the cost n_M and the offset n are the same as shown in the explanation of FIG.

図10(a)では、64×64を4個の32×32に分割したパターンと、分割しない64×64のパターンについて、コスト値が比較される。4個の32×32のコスト値は、ステップS302で選択したブロックAのパターンの合計コスト、ステップS302で選択したブロックBのパターンの合計コスト、ステップS302で選択したブロックCのパターンの合計コスト、ステップS302で選択したブロックDのパターンの合計コストの総合計値となる。対して、分割しない64×64のパターンのコスト値は、コスト64+オフセット64である。ここでは、両者のコスト値を比較して小さい方のサイズパターンを選択する。なお、コスト64は、上位のサイズが無いため、“_M”は付かない。 In FIG. 10A, the cost values are compared between a pattern in which 64×64 is divided into four 32×32 patterns and a pattern in which 64×64 is not divided. The four 32×32 cost values are the total cost of the block A pattern selected in step S302, the total cost of the block B pattern selected in step S302, the total cost of the block C pattern selected in step S302, This is the total value of the total costs of the patterns of block D selected in step S302. On the other hand, the cost value of a 64×64 pattern that is not divided is 64+offset 64. Here, the cost values of both are compared and the smaller size pattern is selected. Note that "_M" is not attached to the cost 64 because there is no upper size.

図10(b)に、最終的に選択されたCU分割パターンの例を示す。この例では、ステップS301において、64×64のブロックAおよびその32×32のブロックAで4個の8×8のパターンが選択され、64×64のブロックAおよびその32×32のブロックB、C、Dで16×16のパターンが選択され、ステップS302において、64×64のブロックAは、そのまま選択され、64×64のブロックB、C、Dは、それぞれ32×32のパターンが選択され、ステップS303において、64×64のブロックA、B、C、Dがそのまま選択された場合を示している。結果的に、64×64において左上の方向に、より小さなCUブロックサイズが選択されている。 FIG. 10(b) shows an example of the finally selected CU division pattern. In this example, in step S301, four 8x8 patterns are selected in the 64x64 block A and its 32x32 block A, and the 64x64 block A and its 32x32 block B, A 16×16 pattern is selected in C and D, and in step S302, the 64×64 block A is selected as is, and the 32×32 pattern is selected in each of the 64×64 blocks B, C, and D. , shows a case where 64×64 blocks A, B, C, and D are selected as they are in step S303. As a result, smaller CU block sizes are selected toward the upper left in 64×64.

[オフセット値のかかり方]
図11は、オフセット値のかかり方の概念を示す図である。
[How to apply offset value]
FIG. 11 is a diagram showing the concept of how offset values are applied.

64×64内で、ブロックサイズのコスト値を比較する際、8×8、16×16、32×32が複数ある場合、それぞれ共通したオフセット値が加算される。また、1つのピクチャにおいても、同じブロックサイズに対して、同じオフセット値が加算される。 When comparing cost values of block sizes within 64x64, if there are multiple 8x8, 16x16, and 32x32 blocks, a common offset value is added to each block size. Furthermore, even in one picture, the same offset value is added to the same block size.

[実施例]
図12は、本実施形態に係る映像符号化装置1の実施例を示す図である。
[Example]
FIG. 12 is a diagram showing an example of the video encoding device 1 according to this embodiment.

図12は、図8に示したステップS301の具体的なコスト値およびオフセットを設定した場合を例示している。ステップS301では、32×32のブロックAである16×16を4個の8×8(ブロックA~D)に分割した場合のコスト値と、分割しない16×16のコスト値と、が比較される。 FIG. 12 illustrates a case where specific cost values and offsets in step S301 shown in FIG. 8 are set. In step S301, the cost value when the 32x32 block A, 16x16, is divided into four 8x8 blocks (blocks A to D) is compared with the cost value when the 16x16 block A is not divided. Ru.

図12(a)は、オフセット値を加算しないでコスト値のみを比較した場合である。図12(b)は、オフセット値加算後のコスト値を比較した場合である。なお、8×8のコスト値、コスト8_A~コスト8_Dは、ブロックA~Dで共通の100と算出され、ブロックAの16×16のコスト値、コスト16_Aは、410と算出されているものとする。また、8×8のオフセットであるオフセット8は5と算出され、16×16のオフセットであるオフセット16は3と算出されているものとする。 FIG. 12A shows a case where only cost values are compared without adding offset values. FIG. 12(b) shows a comparison of cost values after addition of offset values. Note that the 8×8 cost value, cost 8_A to cost 8_D, is calculated as 100, which is common to blocks A to D, and the 16×16 cost value of block A, cost 16_A, is calculated as 410. do. Further, it is assumed that offset 8, which is an 8×8 offset, is calculated to be 5, and offset 16, which is a 16×16 offset, is calculated to be 3.

図12(a)では、4個の8×8のコスト値の合計は、100×4=400となる。これを16×16のコスト値410と比較すると、前者の方が小さい。従って、この場合、4個の8×8のパターンが選択される。 In FIG. 12(a), the total of four 8×8 cost values is 100×4=400. Comparing this with the 16×16 cost value 410, the former is smaller. Therefore, in this case, four 8x8 patterns are selected.

一方、図12(b)では、4個の8×8のコスト値+オフセットの合計は、(100+5)×4=420となる。これを16×16のコスト値+オフセットの410+3=413と比較すると、後者の方が小さい。従って、この場合、16×16のパターンが選択される。 On the other hand, in FIG. 12(b), the total of the four 8×8 cost values+offset is (100+5)×4=420. Comparing this with 16×16 cost value+offset of 410+3=413, the latter is smaller. Therefore, in this case, a 16×16 pattern is selected.

このように、コスト値に対してオフセット値を加算することで、より大きなブロックサイズが選ばれやすくなる。なお、オフセット値は、図6に示したアルゴリズムに則って設定するが、値は経験的に求められる。他のステップにおいても同様にオフセット値が設定される。CU数が多いほど、バッファ回路12の破綻の可能性が高いほど、大きなオフセット値がコスト値に加算されるので、より大きなブロックサイズが選ばれやすくなるように誘導される。 In this way, by adding the offset value to the cost value, a larger block size is more likely to be selected. Note that the offset value is set according to the algorithm shown in FIG. 6, but the value is determined empirically. Offset values are similarly set in other steps. The larger the number of CUs and the higher the possibility of failure of the buffer circuit 12, the larger the offset value is added to the cost value, so that a larger block size is more likely to be selected.

[シミュレーション結果および実施形態の効果]
図13は、本開示適用前および適用後の各ブロックサイズ数の選択比率のシミュレーション結果を示す図である。図13(a)は、本開示を適用しない従来の映像符号化装置におけるブロックサイズの選択比率を示す。図13(b)は、本開示を適用した映像符号化装置におけるブロックサイズの選択比率を示す。
[Simulation results and effects of embodiment]
FIG. 13 is a diagram showing simulation results of selection ratios for each block size number before and after application of the present disclosure. FIG. 13(a) shows the block size selection ratio in a conventional video encoding device to which the present disclosure is not applied. FIG. 13(b) shows the block size selection ratio in the video encoding device to which the present disclosure is applied.

横軸は、双方共に、ピクチャの枚数を示す。縦軸は、1ピクチャあたりの各ブロックサイズ数の比率を示す。ピクチャ枚数は、時間の経過に相当する。縦軸の数値が高いほど、対象の映像シーンにおいて、そのブロックサイズが多く選択されていることを示す。 Both horizontal axes indicate the number of pictures. The vertical axis indicates the ratio of the number of each block size per picture. The number of pictures corresponds to the passage of time. The higher the value on the vertical axis, the more block sizes are selected in the target video scene.

このシミュレーションは、マラソンがスタートした映像シーンについて行った。特に、後半の映像シーンP1は、マラソンスタート時に紙吹雪が舞うシーンである。紙吹雪が舞うシーンでは、細かな絵柄のシーンのため、それらを表現するためブロックサイズが小さくなる傾向がある。 This simulation was performed for the video scene where the marathon started. In particular, the second half of the video scene P1 is a scene in which confetti is thrown at the start of a marathon. In a scene where confetti is falling, the block size tends to be small to express the detailed patterns in the scene.

本開示を適用しない図13(a)では、この映像シーンP1において、32×32に加えて16×16が目立ち、反対に64×64は減少している。また、8×8もやや存在している。一方、本開示を適用した図13(b)では、同様の映像シーンP1において、16×16や8×8は減少し、64×64や32×32が増加している。 In FIG. 13A to which the present disclosure is not applied, in this video scene P1, 16×16 is noticeable in addition to 32×32, and 64×64 is decreasing. In addition, 8×8 also exists to some extent. On the other hand, in FIG. 13B to which the present disclosure is applied, in the similar video scene P1, 16×16 and 8×8 are decreased, and 64×64 and 32×32 are increased.

この結果によって、本開示を適用した映像符号化装置1では、小さなブロックサイズが多くなるようなシーンでは、バッファ回路12の破綻可能性が推定される場合、大きなブロックサイズが選ばれやすく誘導されることが分かる。これにより、符号量が減少しバッファ回路12の破綻も解消できる。 Based on this result, in the video encoding device 1 to which the present disclosure is applied, in a scene where there are many small block sizes, when the possibility of failure of the buffer circuit 12 is estimated, a large block size is likely to be selected. I understand that. This reduces the amount of code and eliminates the failure of the buffer circuit 12.

図14は、本開示適用前および適用後の画像符号化装置のSN比を示す図である。 FIG. 14 is a diagram showing the SN ratio of the image encoding device before and after the present disclosure is applied.

図14(a)は、本開示を適用しない場合である。図14(b)は、本開示を適用した場合である。横軸は、映像シーン毎のピクチャの枚数、すなわち映像の時間経過を示す。縦軸は、符号化後の映像のSN比のシミュレーション結果を示す。SN比は、信号対歪を示しており、SN比が低い程、画像品質の劣化量が大きい。 FIG. 14(a) is a case where the present disclosure is not applied. FIG. 14(b) shows a case where the present disclosure is applied. The horizontal axis indicates the number of pictures for each video scene, that is, the elapsed time of the video. The vertical axis shows the simulation result of the SN ratio of the encoded video. The SN ratio indicates signal versus distortion, and the lower the SN ratio, the greater the amount of deterioration in image quality.

本開示を適用しない場合において、マラソンの後半の映像シーンP2や水球の映像シーンP3でバッファ回路12のバッファ破綻によってSN比が大きく劣化しているが、本開示を適用することによって、同様の映像シーンP2、P3においてSN比が大きく改善している様子を把握できる。 In the case where the present disclosure is not applied, the S/N ratio is greatly degraded due to the buffer failure of the buffer circuit 12 in the video scene P2 of the second half of the marathon and the video scene P3 of the water polo, but by applying the present disclosure, the S/N ratio is greatly degraded in the video scene P2 of the second half of the marathon and the video scene P3 of the water polo. It can be seen that the SN ratio has greatly improved in scenes P2 and P3.

図15は、本開示適用前および適用後の画像符号化装置のバッファ残量を示す図である。バッファ回路の状況のシミュレーション結果を示す。図15(a)は、本開示を適用しない場合である。図15(b)は、本開示を適用した場合である。横軸は、ピクチャの枚数、すなわち映像の時間経過を示す。縦軸は、バッファ回路12のバッファ残量を示す。特に、この例においては、バッファ残量がゼロ以下の部分をバッファ回路12が破綻している状況とした。 FIG. 15 is a diagram showing the remaining buffer capacity of the image encoding device before and after the present disclosure is applied. The simulation results of the buffer circuit situation are shown. FIG. 15(a) is a case where the present disclosure is not applied. FIG. 15(b) shows a case where the present disclosure is applied. The horizontal axis indicates the number of pictures, that is, the elapsed time of the video. The vertical axis indicates the remaining buffer capacity of the buffer circuit 12. In particular, in this example, the portion where the remaining buffer capacity is zero or less is assumed to be a situation in which the buffer circuit 12 has failed.

本開示を適用しない場合、図15(a)に示すように、後半の映像シーンP4において、バッファ残量がゼロ以下になり、バッファが破綻している。一方、本開示を適用した場合は、図15(b)に示すように、図15(a)においてバッファが破綻している映像シーンP4において、バッファ残量が0以上となりバッファ破綻が解消されている。 If the present disclosure is not applied, as shown in FIG. 15(a), in the second half of the video scene P4, the remaining buffer capacity becomes zero or less, and the buffer is broken. On the other hand, when the present disclosure is applied, as shown in FIG. 15(b), in the video scene P4 in which the buffer is corrupted in FIG. There is.

[本実施形態の手段、作用、効果]
本開示に係る映像符号化装置1は、バッファ回路12の符号化データの蓄積状況や1ピクチャにおけるCU数の状況に応じたオフセット値を算出し、算出したオフセット値をCUの各ブロックサイズの組み合わせ候補のコスト値にそれぞれ加算し、オフセット値加算後のコスト値が最小となるブロックサイズの組み合わせを選択する。
[Means, actions, and effects of this embodiment]
The video encoding device 1 according to the present disclosure calculates an offset value according to the accumulation status of encoded data in the buffer circuit 12 and the status of the number of CUs in one picture, and uses the calculated offset value as a combination of each block size of the CU. These are added to the cost values of the candidates, and the combination of block sizes that minimizes the cost value after adding the offset value is selected.

オフセット値には、CU数が多いほど、バッファ破綻の可能性が高いほど、より大きなオフセット値を設定し、CU数が少ないほど、バッファ破綻の可能性が低いほど、より小さなオフセット値を設定する。つまり、CU数が多い場合(すなわち、ブロックサイズが小さい場合)には、オフセット値を比較的大きく設定する。 For the offset value, the larger the number of CUs and the higher the possibility of buffer failure, the larger the offset value is set, and the smaller the number of CUs and the lower the possibility of buffer failure, the smaller the offset value is set. . That is, when the number of CUs is large (that is, when the block size is small), the offset value is set relatively large.

基本的にはコスト値が小さくなる(ブロックサイズが小さくなる)ようにブロックサイズの組み合わせを決定するが、上記オフセット値をコスト値に加算し、ブロックサイズが小さい方のオフセットを比較的大きくすることで、より大きなブロックサイズが選ばれやすくなる。 Basically, the combination of block sizes is determined so that the cost value becomes smaller (the block size becomes smaller), but the above offset value is added to the cost value and the offset of the one with the smaller block size is made relatively larger. Therefore, larger block sizes are more likely to be selected.

これにより、バッファ回路12のバッファ破綻の可能性が高い場合、より大きなブロックサイズが選ばれやすく誘導でき、それにより全体の符号量を低減しバッファ回路12のバッファ破綻を抑制できる。 As a result, when there is a high possibility of buffer failure in the buffer circuit 12, a larger block size can be easily selected, thereby reducing the overall code amount and suppressing the buffer failure in the buffer circuit 12.

[本開示の効果]
本開示によれば、映像符号化装置1が、異なるサイズのブロックの組み合わせに基づいて映像を画像毎にブロック単位で符号化し、前記ブロックを任意に組み合わせた複数の組み合わせ候補の各コスト値を計算する符号化回路11と、前記ブロック単位で符号化された前記画像の符号化データを蓄積するバッファ回路12と、前記バッファ回路のバッファ残量と1画像内のブロック数または前記1画像内のブロック数に相当する指標とに基づいてオフセット値を計算するオフセット計算回路13と、前記オフセット値を含む前記各コスト値に基づいて前記複数の組み合わせ候補の中から符号化用の組み合わせを決定するブロックサイズ決定回路14と、を備えるので、映像データの符号化時にバッファ破綻が発生する可能性を低減できる。
[Effects of this disclosure]
According to the present disclosure, the video encoding device 1 encodes a video in units of blocks for each image based on combinations of blocks of different sizes, and calculates each cost value of a plurality of combination candidates arbitrarily combining the blocks. a buffer circuit 12 that stores encoded data of the image encoded in block units, and a buffer remaining amount of the buffer circuit and the number of blocks in one image or the blocks in the one image. an offset calculation circuit 13 that calculates an offset value based on an index corresponding to a number; and a block size that determines a combination for encoding from among the plurality of combination candidates based on each of the cost values including the offset value. Since the determination circuit 14 is provided, the possibility of buffer failure occurring during encoding of video data can be reduced.

本開示によれば、前記1画像内のブロック数に相当する指標は、前記1画像における、全符号化データのデータ量および前記全符号化データの全オーバーヘッドのデータ量に対する、前記全符号化データの全オーバーヘッドのデータ量の比率であるので、映像データの符号化時にバッファ破綻が発生する可能性を低減できる。 According to the present disclosure, the index corresponding to the number of blocks in one image is determined based on the total amount of encoded data and the total overhead data amount of all encoded data in the one image. Since this is the ratio of the total overhead data amount, it is possible to reduce the possibility that a buffer failure will occur when encoding video data.

本開示によれば、前記オフセット値は、前記バッファ回路のバッファ残量が第1の閾値未満の場合、第1の値であり、前記バッファ回路のバッファ残量が前記第1の閾値以上で第2の閾値未満、かつ、前記1画像内のブロック数が多い場合、第2の値であり、前記バッファ回路のバッファ残量が前記第1の閾値以上で前記第2の閾値未満、かつ、前記1画像内のブロック数が少ない場合、第3の値であり、前記バッファ回路のバッファ残量が前記第2の閾値以上の場合、ゼロの値であり、前記第1の値は、前記第2の値よりも大きい値であり、前記第2の値は、前記第3の値よりも大きい値であり、前記第3の値は、前記ゼロよりも大きい値であるので、映像データの符号化時にバッファ破綻が発生する可能性を低減できる。 According to the present disclosure, the offset value is a first value when the buffer remaining amount of the buffer circuit is less than the first threshold, and the offset value is the first value when the buffer remaining amount of the buffer circuit is equal to or greater than the first threshold. 2 and the number of blocks in the one image is large, the second value is set, and the remaining buffer capacity of the buffer circuit is equal to or greater than the first threshold and less than the second threshold, and the When the number of blocks in one image is small, it is a third value, and when the buffer remaining amount of the buffer circuit is equal to or more than the second threshold, it is a zero value, and the first value is the second value. The second value is a value larger than the third value, and the third value is a value larger than the zero, so that encoding of video data is performed. This can reduce the possibility of buffer failure occurring at times.

本開示によれば、前記コスト値は、符号量と映像品質とのうち少なくとも1つに関する値であるので、映像データの符号化時にバッファ破綻が発生する可能性を低減できる。 According to the present disclosure, since the cost value is a value related to at least one of the code amount and video quality, it is possible to reduce the possibility that a buffer failure will occur during encoding of video data.

本開示によれば、前記コスト値は、符号量と映像の歪量とのうち少なくとも1つに関する値であり、前記ブロックサイズ決定回路は、前記オフセット値を含む前記コスト値が最も小さい組み合わせ候補を前記符号化用の組み合わせとして決定するので、映像データの符号化時にバッファ破綻が発生する可能性を低減できる。 According to the present disclosure, the cost value is a value related to at least one of the amount of code and the amount of video distortion, and the block size determining circuit selects a combination candidate with the smallest cost value including the offset value. Since the combination for encoding is determined, the possibility of buffer failure occurring during encoding of video data can be reduced.

1 映像符号化装置
11 符号化回路
12 バッファ回路
13 オフセット計算回路
14 ブロックサイズ決定回路
111 予測残差生成部
112 DCT変換部
113 量子化部
114 可変長符号化部
115 逆量子化部
116 逆DCT部
117 復号部
118 イントラ/インター予測回路
1181 予測信号候補生成部
1182 予測信号決定部
141 加算部
142 サイズ選択部
1 Video encoding device 11 Encoding circuit 12 Buffer circuit 13 Offset calculation circuit 14 Block size determination circuit 111 Prediction residual generation section 112 DCT transformation section 113 Quantization section 114 Variable length encoding section 115 Inverse quantization section 116 Inverse DCT section 117 Decoding unit 118 Intra/inter prediction circuit 1181 Prediction signal candidate generation unit 1182 Prediction signal determination unit 141 Addition unit 142 Size selection unit

Claims (6)

異なるサイズのブロックの組み合わせに基づいて映像を画像毎にブロック単位で符号化し、前記ブロックを任意に組み合わせた複数の組み合わせ候補の各コスト値を計算する符号化回路と、
前記ブロック単位で符号化された前記画像の符号化データを蓄積するバッファ回路と、
前記バッファ回路のバッファ残量と1画像内のブロック数または前記1画像内のブロック数に相当する指標とに基づいてオフセット値を計算するオフセット計算回路と、
前記オフセット値を含む前記各コスト値に基づいて前記複数の組み合わせ候補の中から符号化用の組み合わせを決定するブロックサイズ決定回路と、
を備える映像符号化装置。
an encoding circuit that encodes a video image by block based on a combination of blocks of different sizes, and calculates a cost value for each of a plurality of combination candidates obtained by arbitrarily combining the blocks;
a buffer circuit that stores encoded data of the image encoded in units of blocks;
an offset calculation circuit that calculates an offset value based on the remaining buffer amount of the buffer circuit and the number of blocks in one image or an index corresponding to the number of blocks in the one image;
a block size determining circuit that determines a combination for encoding from among the plurality of combination candidates based on each of the cost values including the offset value;
A video encoding device comprising:
前記1画像内のブロック数に相当する指標は、
前記1画像における、全符号化データのデータ量および前記全符号化データの全オーバーヘッドのデータ量に対する、前記全符号化データの全オーバーヘッドのデータ量の比率である請求項1に記載の映像符号化装置。
The index corresponding to the number of blocks in one image is
2. The video encoding according to claim 1, wherein the ratio is the amount of total overhead of the entire encoded data to the amount of total encoded data and the total overhead of the entire encoded data in the one image. Device.
前記オフセット値は、前記バッファ回路のバッファ残量が第1の閾値未満の場合、第1の値であり、前記バッファ回路のバッファ残量が前記第1の閾値以上で第2の閾値未満、かつ、前記1画像内のブロック数が多い場合、第2の値であり、前記バッファ回路のバッファ残量が前記第1の閾値以上で前記第2の閾値未満、かつ、前記1画像内のブロック数が少ない場合、第3の値であり、前記バッファ回路のバッファ残量が前記第2の閾値以上の場合、ゼロの値であり、
前記第1の値は、前記第2の値よりも大きい値であり、
前記第2の値は、前記第3の値よりも大きい値であり、
前記第3の値は、前記ゼロよりも大きい値である請求項1に記載の映像符号化装置。
The offset value is a first value when the remaining buffer amount of the buffer circuit is less than a first threshold, and the offset value is a first value when the remaining buffer amount of the buffer circuit is greater than or equal to the first threshold and less than a second threshold, and , if the number of blocks in the one image is large, the second value is the buffer remaining capacity of the buffer circuit is greater than or equal to the first threshold and less than the second threshold, and the number of blocks in the one image is a second value; is a third value when the buffer capacity of the buffer circuit is small, and is a zero value when the remaining buffer capacity of the buffer circuit is equal to or greater than the second threshold value,
the first value is larger than the second value,
The second value is larger than the third value,
The video encoding device according to claim 1, wherein the third value is a value larger than the zero.
前記コスト値は、
符号量と映像品質とのうち少なくとも1つに関する値である請求項1に記載の映像符号化装置。
The cost value is
The video encoding device according to claim 1, wherein the value is related to at least one of code amount and video quality.
前記コスト値は、符号量と映像の歪量とのうち少なくとも1つに関する値であり、
前記ブロックサイズ決定回路は、
前記オフセット値を含む前記コスト値が最も小さい組み合わせ候補を前記符号化用の組み合わせとして決定する請求項1に記載の映像符号化装置。
The cost value is a value related to at least one of the amount of code and the amount of distortion of the video,
The block size determining circuit is
The video encoding apparatus according to claim 1, wherein a candidate combination having the smallest cost value including the offset value is determined as the combination for encoding.
映像符号化装置で行う映像符号化方法において、
符号化回路が、異なるサイズのブロックの組み合わせに基づいて映像を画像毎にブロック単位で符号化し、前記ブロックを任意に組み合わせた複数の組み合わせ候補の各コスト値を計算し、
バッファ回路が、前記ブロック単位で符号化された前記画像の符号化データを蓄積し、
オフセット計算回路が、前記バッファ回路のバッファ残量と1画像内のブロック数または前記1画像内のブロック数に相当する指標とに基づいてオフセット値を計算し、
ブロックサイズ決定回路が、前記オフセット値を含む前記各コスト値に基づいて前記複数の組み合わせ候補の中から符号化用の組み合わせを決定する、
映像符号化方法。
In a video encoding method performed by a video encoding device,
an encoding circuit encodes the video in block units for each image based on combinations of blocks of different sizes, calculates each cost value of a plurality of combination candidates arbitrarily combining the blocks,
a buffer circuit accumulates encoded data of the image encoded in units of blocks;
an offset calculation circuit calculates an offset value based on the remaining buffer amount of the buffer circuit and the number of blocks in one image or an index corresponding to the number of blocks in the one image,
a block size determining circuit determines a combination for encoding from among the plurality of combination candidates based on each of the cost values including the offset value;
Video encoding method.
JP2023021544A 2023-02-15 2023-02-15 Video encoding device and video encoding method Active JP7450078B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023021544A JP7450078B1 (en) 2023-02-15 2023-02-15 Video encoding device and video encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023021544A JP7450078B1 (en) 2023-02-15 2023-02-15 Video encoding device and video encoding method

Publications (1)

Publication Number Publication Date
JP7450078B1 true JP7450078B1 (en) 2024-03-14

Family

ID=90183429

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023021544A Active JP7450078B1 (en) 2023-02-15 2023-02-15 Video encoding device and video encoding method

Country Status (1)

Country Link
JP (1) JP7450078B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120269274A1 (en) 2009-10-01 2012-10-25 Sk Telecom Co., Ltd. Method and apparatus for encoding/decoding video using split layer
JP2016187140A (en) 2015-03-27 2016-10-27 日本電信電話株式会社 Block size determination method, block size determination device and block size determination program
JP2017005505A (en) 2015-06-10 2017-01-05 日本電信電話株式会社 Video encoding device, video encoding method and video encoding program
JP2017028337A (en) 2015-07-15 2017-02-02 日本電信電話株式会社 Video coding apparatus and video coding program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120269274A1 (en) 2009-10-01 2012-10-25 Sk Telecom Co., Ltd. Method and apparatus for encoding/decoding video using split layer
JP2016187140A (en) 2015-03-27 2016-10-27 日本電信電話株式会社 Block size determination method, block size determination device and block size determination program
JP2017005505A (en) 2015-06-10 2017-01-05 日本電信電話株式会社 Video encoding device, video encoding method and video encoding program
JP2017028337A (en) 2015-07-15 2017-02-02 日本電信電話株式会社 Video coding apparatus and video coding program

Similar Documents

Publication Publication Date Title
US8432964B2 (en) Image processing device, method, and program
EP1551186B1 (en) Video coding apparatus with resolution converter
CN114223207B (en) Method and apparatus for encoding and decoding video data using secondary transforms
EP2323407A1 (en) Video image encoding method, video image decoding method, video image encoding apparatus, video image decoding apparatus, program and integrated circuit
JP5133290B2 (en) Video encoding apparatus and decoding apparatus
US10652570B2 (en) Moving image encoding device, moving image encoding method, and recording medium for recording moving image encoding program
EP1667464B1 (en) Method and apparatus for encoding moving pictures
JPWO2008142956A1 (en) Video encoding apparatus, video encoding method, and video encoding program
KR100796857B1 (en) Moving image encoding method and apparatus
JP4532980B2 (en) Moving picture coding apparatus and method, computer program, and computer-readable storage medium
JP2012034352A (en) Stereo moving image encoding apparatus and stereo moving image encoding method
US8290041B2 (en) Communication terminal
JP4828950B2 (en) Video decoding device
JP2010087771A (en) Image-coding device and method
JP4485996B2 (en) Image encoding apparatus and image encoding program
JP2011172137A (en) Encoding apparatus, encoding method, and encoding program
JP5649296B2 (en) Image encoding device
JP7450078B1 (en) Video encoding device and video encoding method
JP5136470B2 (en) Moving picture coding apparatus and moving picture coding method
JP4942208B2 (en) Encoder
JP4586340B2 (en) Encoding apparatus, encoding method, and program
JP2008271213A (en) Image encoding device
US20130308702A1 (en) Motion picture encoding apparatus
JP2005303555A (en) Moving image encoding apparatus and its method
JP2008153802A (en) Moving picture encoding device and moving picture encoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230215

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240304

R150 Certificate of patent or registration of utility model

Ref document number: 7450078

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150