JP2019097128A - Video image coding parameter adjustment device, video image coding parameter adjustment method, and program - Google Patents

Video image coding parameter adjustment device, video image coding parameter adjustment method, and program Download PDF

Info

Publication number
JP2019097128A
JP2019097128A JP2017227197A JP2017227197A JP2019097128A JP 2019097128 A JP2019097128 A JP 2019097128A JP 2017227197 A JP2017227197 A JP 2017227197A JP 2017227197 A JP2017227197 A JP 2017227197A JP 2019097128 A JP2019097128 A JP 2019097128A
Authority
JP
Japan
Prior art keywords
video
coding parameter
unit
small
parameter value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017227197A
Other languages
Japanese (ja)
Other versions
JP6867275B2 (en
Inventor
中村 健
Ken Nakamura
健 中村
小林 大祐
Daisuke Kobayashi
大祐 小林
裕江 岩崎
Hiroe Iwasaki
裕江 岩崎
清水 淳
Atsushi Shimizu
淳 清水
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017227197A priority Critical patent/JP6867275B2/en
Publication of JP2019097128A publication Critical patent/JP2019097128A/en
Application granted granted Critical
Publication of JP6867275B2 publication Critical patent/JP6867275B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

To simply and precisely adjust a video image coding parameter.SOLUTION: A control part 104 of a video image coding device 101 acquires a different video image coding parameter value used when coding each scene structuring a test video image loop-reproduced at a plurality of times. An RD cost calculation part 105 calculates an RD cost for coding performed to the video image of each scene by a video image coding part 103 by using the video image coding parameter value acquired by the control part 104. An optimal parameter determination part 106 determines the video image coding parameter value suitable for the coding on the basis of the association with the RD cost and the video image coding parameter value.SELECTED DRAWING: Figure 1

Description

本発明は、映像符号化パラメータ調整装置、映像符号化パラメータ調整方法及びプログラムに関する。   The present invention relates to a video coding parameter adjustment device, a video coding parameter adjustment method, and a program.

通常、映像符号化システムや映像符号化装置には、符号化効率を決定づける映像符号化パラメータ(以下、「符号化パラメータ」とも記載)が複数存在している。これら符号化パラメータを、符号化条件や入力映像の特性に応じて調整することが、圧縮時の符号化効率や画質向上につながる。そのため、符号化パラメータの調整は、重要な課題である。例えば、リアルタイム符号化処理を行う映像符号化装置においては、調整対象となる符号化パラメータの値を少しずつ変化させた設定データもしくはファームウェアを複数用意しておき、それらを用いて同じテスト映像を符号化したときの符号化結果の優劣に基づいて符号化パラメータの値を決定する。   Usually, in a video coding system or a video coding apparatus, a plurality of video coding parameters (hereinafter also referred to as “coding parameters”) which determine coding efficiency exist. Adjusting these coding parameters in accordance with the coding conditions and the characteristics of the input video leads to improvement in coding efficiency and image quality at the time of compression. Therefore, adjustment of coding parameters is an important issue. For example, in a video encoding apparatus that performs real-time encoding processing, a plurality of setting data or firmware in which the values of encoding parameters to be adjusted are gradually changed are prepared, and the same test video is encoded using these. The value of the coding parameter is determined based on the superiority or inferiority of the coding result at the time of coding.

具体的には、符号化時のログもしくは採取した符号化ストリームから各ピクチャの符号量Rを求める。さらに、デコード映像と原画像との差分を専用装置またはソフトウェア処理によって求めて、各ピクチャの符号化歪量Dを求める。これらを基に、符号量Rと符号化歪量Dとを線形結合した指標であるRDコスト、D+λRが最小となるような符号化パラメータの値を最適なパラメータ値として決定する(例えば、非特許文献1参照)。ここでλは、ラグランジュ係数と呼ばれる値であり、(RD特性曲線の接線の傾き)×(−1)に相当する。   Specifically, the code amount R of each picture is determined from the log at the time of encoding or the collected encoded stream. Furthermore, the difference between the decoded video and the original image is determined by a dedicated device or software processing, and the encoding distortion amount D of each picture is determined. Based on these, an RD cost which is an index obtained by linearly combining the code amount R and the coding distortion amount D, and a value of a coding parameter which minimizes D + λR are determined as an optimum parameter value (for example, non-patent) Reference 1). Here, λ is a value called a Lagrange coefficient, which corresponds to (slope of tangent of RD characteristic curve) × (−1).

監修 大久保榮,「H.265/HEVC教科書」,p.232-239,発行 インプレスジャパン,2013年Supervised by Kei Okubo, "H. 265 / HEVC Textbook", pp. 232-239, published Impress Japan, 2013

一般に符号化パラメータの多くは、量子化パラメータの大小によって、その設定値や最適値が異なる。そこで、固定ビットレート制御を行った通常の符号化ではなく、固定的な量子化パラメータ設定で符号化を行い、その時の符号量R、符号化歪量DからRDコストを求めて最適なパラメータを判定する。これにより、その量子化パラメータに対応するパラメータの最適値を求めることができる。また、最適なパラメータ値は、一般にピクチャ種別、例えばIピクチャやPピクチャ、Bピクチャといったピクチャタイプや、GOP(Group of Picture)内の参照関係の階層を表すTemporal_IDなどによっても異なる(例えば、非特許文献1参照)。そのため、各ピクチャタイプや各Temporal_IDのそれぞれに対してRDコストの集計を行ってパラメータ値を調整する必要がある。これらの作業は、映像入力、符号化、ストリーム採取、デコード映像の取得、各種ログの集計・分析といった作業に多くの時間と手間がかかるという問題があった。   In general, the setting value and the optimum value of most of the encoding parameters differ depending on the magnitude of the quantization parameter. Therefore, instead of normal encoding with fixed bit rate control, encoding is performed with fixed quantization parameter settings, and the RD cost is obtained from the code amount R and the encoding distortion amount D at that time, and the optimal parameter is determined. judge. Thereby, the optimum value of the parameter corresponding to the quantization parameter can be determined. In addition, the optimal parameter value also differs depending on the type of picture, for example, a picture type such as I picture, P picture or B picture, or Temporal_ID representing a hierarchy of reference relationships in a GOP (Group of Picture) (for example, non-patent Reference 1). Therefore, it is necessary to adjust RD by aggregating RD cost for each picture type and each Temporal_ID. In these operations, there is a problem that it takes much time and labor for operations such as video input, encoding, stream collection, acquisition of decoded video, aggregation and analysis of various logs.

また、上記のような方法の作業を効率化する方法として、映像符号化装置や映像符号化システムを模擬するソフトウェアを用意し、パラメータ調整をする方法もある。例えば、異なるパラメータ設定の設定ファイルを多数用意しておく。そして、計算機によりそれら各設定ファイルを用いた符号化を並列もしくは順次行い、RDコストを集計するまでをソフトウェアで自動実行する。これにより、効率的な調整が可能である。しかしながら、この方法は、非常に多くの計算機リソースが必要となるという問題や、模擬ソフトウェアの実行速度が遅いという問題、模擬ソフトウェアと映像符号化装置の動作の不一致により精度が低いといった問題があった。   Further, as a method of improving the operation of the method as described above, there is also a method of preparing software for simulating a video encoding apparatus or a video encoding system and adjusting parameters. For example, a large number of setting files with different parameter settings are prepared. Then, encoding using the setting files is performed in parallel or sequentially by a computer, and software automatically executes until RD costs are totaled. This enables efficient adjustment. However, this method has the problem that it requires a lot of computer resources, the problem that the execution speed of the simulation software is slow, and the problem that the accuracy is low due to the mismatch between the operation of the simulation software and the video encoding device .

上記事情に鑑み、本発明は、映像符号化パラメータの調整を精度よく簡易に行うことができる映像符号化パラメータ調整装置、映像符号化パラメータ調整方法及びプログラムを提供することを目的としている。   In view of the above circumstances, the present invention has an object of providing a video coding parameter adjusting device, a video coding parameter adjusting method, and a program capable of performing adjustment of video coding parameters accurately and easily.

本発明の一態様は、大映像に含まれる複数の小映像それぞれを符号化する際に使用された異なる映像符号化パラメータ値を取得する取得部と、前記小映像毎に、前記映像符号化パラメータ値を使用して前記小映像に行った符号化の評価を所定の指標に基づいて行う評価部と、前記評価と前記映像符号化パラメータ値との関連に基づいて、符号化に適した映像符号化パラメータ値を判定する判定部と、を備える映像符号化パラメータ調整装置である。   According to an aspect of the present invention, there is provided an acquisition unit for acquiring different video coding parameter values used in coding each of a plurality of small video included in a large video, and the video coding parameter for each small video. A video code suitable for coding based on an evaluation unit which performs coding evaluation performed on the small video using a value based on a predetermined index, and a relation between the evaluation and the video coding parameter value And a determination unit that determines an equalization parameter value.

本発明の一態様は、上述の映像符号化パラメータ調整装置であって、前記大映像は、ループ再生される前記小映像を含み、前記大映像の映像特徴量に基づいて、ループの先頭を検出する検出部と、前記検出部が検出した前記ループの先頭において、前記小映像を符号化する際に使用される前記映像符号化パラメータ値を変更する変更部と、前記検出部が検出した前記ループの先頭においてGOP(Group of Picture)位相を初期化し、前記ループ毎に、前記変更部により変更された前記映像符号化パラメータ値を用いてGOPの先頭から前記小映像を符号化する符号化部とを備える映像符号化パラメータ調整装置である。   One embodiment of the present invention is the above-described video coding parameter adjustment device, wherein the large video includes the small video to be loop-reproduced, and the head of the loop is detected based on the video feature of the large video. A detection unit, a change unit for changing the video coding parameter value used when encoding the small video at the head of the loop detected by the detection unit, and the loop detected by the detection unit And an encoding unit for initializing the GOP (Group of Picture) phase at the beginning of the group, and encoding the small image from the beginning of the GOP using the image encoding parameter value changed by the changing unit for each loop. A video coding parameter adjustment device.

本発明の一態様は、上述の映像符号化パラメータ調整装置であって、前記評価部は、ピクチャ種別ごとに、前記映像符号化パラメータ値を使用して前記小映像に含まれるピクチャに行った符号化の評価を所定の前記指標に基づいて行い、前記判定部は、前記ピクチャ種別毎の前記評価と前記映像符号化パラメータ値との関連に基づいて、前記ピクチャ種別毎に符号化に適した映像符号化パラメータ値を判定する。   One embodiment of the present invention is the above-described video coding parameter adjustment device, wherein the evaluation unit performs, for each picture type, a code performed on a picture included in the small video using the video coding parameter value. Evaluation is performed on the basis of the predetermined index, and the determination unit determines an image suitable for encoding for each of the picture types based on the relation between the evaluation for each of the picture types and the image encoding parameter value Determine coding parameter values.

本発明の一態様は、上述の映像符号化パラメータ調整装置であって、前記大映像は、ループ再生される前記小映像を含み、前記所定の指標は、発生符号量Rと符号化劣化Dを線形結合したRDコストであり、前記評価部は、前記大映像に含まれる2回分のループの前記小映像に、調整対象の量子化パラメータ値の前後の量子化パラメータ値を使用して符号化を行ったときの発生符号量R及び符号化劣化Dに基づいてRD特性曲線の傾きを求め、求めた前記傾きに基づいて、RDコストの算出に用いるラグランジュ係数を決定する。   One aspect of the present invention is the above-described video coding parameter adjustment device, wherein the large video includes the small video to be loop-reproduced, and the predetermined index includes a generated code amount R and a coding degradation D. The RD unit is a linear combination, and the evaluation unit encodes the small image of the two loops included in the large image using quantization parameter values before and after the quantization parameter value to be adjusted. The slope of the RD characteristic curve is determined based on the generated code amount R and the coding deterioration D when performed, and the Lagrange coefficient used to calculate the RD cost is determined based on the determined slope.

本発明の一態様は、上述の映像符号化パラメータ調整装置であって、前記大映像は、ループ再生される複数の前記小映像を含み、前記検出部は、前記大映像の映像特徴量に基づいて、前記小映像の先頭を検出し、前記符号化部は、前記検出部が検出した前記小映像の先頭においてGOP(Group of Picture)位相を初期化し、前記小映像毎に、前記変更部により変更された前記映像符号化パラメータ値を用いてGOPの先頭から符号化を行い、前記判定部は、前記小映像毎の前記評価と前記映像符号化パラメータ値との関連に基づいて、前記小映像毎に符号化に適した映像符号化パラメータ値を判定する。   One embodiment of the present invention is the above-described video coding parameter adjustment device, wherein the large video includes a plurality of small video to be loop reproduced, and the detection unit is based on the video feature amount of the large video. And the encoding unit initializes a GOP (Group of Picture) phase at the beginning of the small image detected by the detection unit, and the changing unit detects the small image for each small image. Coding is performed from the beginning of the GOP using the changed video coding parameter value, and the determination unit determines the small video based on the relation between the evaluation for each small video and the video coding parameter value. Each time, a video coding parameter value suitable for coding is determined.

本発明の一態様は、大映像に含まれる複数の小映像それぞれを符号化する際に使用された異なる映像符号化パラメータ値を取得する取得ステップと、前記小映像毎に、前記映像符号化パラメータ値を使用して前記小映像に行った符号化の評価を所定の指標に基づいて行う評価ステップと、前記評価と前記映像符号化パラメータ値との関連に基づいて、符号化に適した映像符号化パラメータ値を判定する判定ステップと、を有する映像符号化パラメータ調整方法である。   One aspect of the present invention is an acquisition step of acquiring different video coding parameter values used in coding each of a plurality of small video included in a large video, and the video coding parameter for each small video. A video code suitable for coding based on an evaluation step of performing an evaluation of coding performed on the small video using a value based on a predetermined index, and a relation between the evaluation and the video coding parameter value And a determination step of determining a quantization parameter value.

本発明の一態様は、コンピュータを、上述したいずれかの映像符号化パラメータ調整装置として機能させるプログラムである。   One aspect of the present invention is a program that causes a computer to function as any one of the video coding parameter adjustment devices described above.

本発明により、映像符号化パラメータの調整を精度よく簡易に行うことが可能となる。   According to the present invention, it is possible to adjust video coding parameters accurately and easily.

本発明の第1の実施形態による映像符号化装置の構成を示す機能ブロック図である。FIG. 1 is a functional block diagram showing a configuration of a video encoding apparatus according to a first embodiment of the present invention. 同実施形態による入力映像の構成を示す図である。It is a figure which shows the structure of the input imaging | video by the same embodiment. 同実施形態による符号化パラメータ自動調整処理を示すフロー図である。It is a flowchart which shows the encoding parameter automatic adjustment process by the embodiment. 同実施形態によるGOP位相の初期化を示す図である。It is a figure which shows initialization of the GOP phase by the embodiment. 第2の実施形態による符号化パラメータ自動調整処理を示すフロー図である。It is a flowchart which shows the encoding parameter automatic adjustment process by 2nd Embodiment. 同実施形態による発生符号量Rと符号化歪みDの関係を用いたλの算出を示す図である。It is a figure which shows calculation of (lambda) using the relationship of the generation code amount R and the encoding distortion D by the embodiment.

以下、図面を参照しながら本発明の実施形態を詳細に説明する。
本実施形態では、映像符号化装置又は映像符号化システムに、映像符号化パラメータ(符号化パラメータとも記載)の調整を行うパラメータ調整機能を追加し、テスト映像をループで繰り返し入力する。パラメータ調整機能は、そのループの周期に合わせて符号化パラメータ値の変更、変更した符号化パラメータ値を用いた映像符号化及びRDコスト集計を行う。そして、得られた符号化パラメータ値とRDコストとの関係に基づいて、自動的に最適な符号化パラメータ値を順次決定する。以下に、詳細な実施形態を説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
In this embodiment, a parameter adjustment function for adjusting a video coding parameter (also described as a coding parameter) is added to a video coding apparatus or a video coding system, and a test video is repeatedly input in a loop. The parameter adjustment function changes the coding parameter value in accordance with the cycle of the loop, and performs video coding and RD cost aggregation using the changed coding parameter value. Then, based on the relationship between the obtained coding parameter value and the RD cost, the optimum coding parameter value is automatically determined sequentially. Detailed embodiments will be described below.

[第1の実施形態]
図1は、本実施形態による映像符号化装置101の構成を示す機能ブロック図である。映像符号化装置101は、映像符号化パラメータ調整装置の一例である。同図では、本実施形態と関係する機能ブロックのみを抽出して示してある。同図に示すように、映像符号化装置101は、映像入力部102、映像符号化部103、制御部104、RDコスト計算部105、最適パラメータ判定部106及びメモリ107を備える。
First Embodiment
FIG. 1 is a functional block diagram showing the configuration of a video encoding device 101 according to the present embodiment. The video encoding device 101 is an example of a video encoding parameter adjustment device. In the same drawing, only functional blocks related to the present embodiment are extracted and shown. As shown in the figure, the video encoding device 101 includes a video input unit 102, a video encoding unit 103, a control unit 104, an RD cost calculation unit 105, an optimum parameter determination unit 106, and a memory 107.

映像入力部102は、映像信号を入力する。映像符号化部103は、映像信号を符号化する。制御部104は、映像符号化部103が符号化の際に用いる符号化パラメータ値を変更する。RDコスト計算部105は、映像符号化部103による符号化のRDコストを算出する。最適パラメータ判定部106は、符号化パラメータ値とRDコストとの関係に基づいて最適な符号化パラメータ値を決定する。メモリ107は、各種データを記憶する。メモリ107は、符号化パラメータ値と、RDコスト計算部105が算出したRDコストとを対応付けて記憶する。   The video input unit 102 inputs a video signal. The video encoding unit 103 encodes a video signal. The control unit 104 changes the coding parameter value used when the video coding unit 103 performs coding. The RD cost calculation unit 105 calculates an RD cost of encoding by the video encoding unit 103. The optimal parameter determination unit 106 determines an optimal coding parameter value based on the relationship between the coding parameter value and the RD cost. The memory 107 stores various data. The memory 107 stores the coding parameter value and the RD cost calculated by the RD cost calculation unit 105 in association with each other.

映像符号化装置101は、通常の映像符号化用の動作モードとは別に、パラメータ調整用の動作モードを有する。通常の映像符号化用の動作モードにおいて、映像符号化103は、所定の符号化パラメータ値を用いるなどして、入力映像に対して従来技術と同様の符号化を行う。以下に、パラメータ調整用の動作モードを説明する。   The video encoding device 101 has an operation mode for parameter adjustment, separately from the normal video encoding operation mode. In the normal video coding operation mode, the video coding 103 performs coding similar to that of the prior art on the input video, using a predetermined coding parameter value or the like. Below, the operation mode for parameter adjustment is explained.

図2は、パラメータ調整に用いられる入力映像の構成を示す図である。パラメータ調整用の動作モードにおいては、外部の装置がテスト映像を繰り返しループ再生して映像符号化装置101に入力する。入力映像におけるテスト映像のn回目のループ(nは1以上の整数)をループ#nと記載する。テスト映像は複数のシーンの映像から構成される。テスト映像に含まれるS個(Sは1以上の整数)のシーンを順にシーン#0、シーン#1、…、シーン#(S−1)と記載する。各シーンは、1GOP(Group of Picture)より長いフレーム数を有する。また、各ループのテスト映像の末尾(もしくは冒頭直前)には、ループ先頭検出用の黒画像が付加されている。   FIG. 2 is a diagram showing the configuration of an input video used for parameter adjustment. In the operation mode for parameter adjustment, an external device repeatedly reproduces a test video in a loop and inputs it to the video encoding device 101. The n-th loop (n is an integer of 1 or more) of the test video in the input video is described as loop #n. The test video is composed of videos of a plurality of scenes. The S (S is an integer of 1 or more) scenes included in the test video are sequentially described as scene # 0, scene # 1, ..., scene # (S-1). Each scene has a frame number longer than one GOP (Group of Picture). In addition, a black image for loop top detection is added to the end (or just before the start) of the test video of each loop.

図3は、本実施形態による符号化パラメータ調整処理を示すフロー図である。
映像入力部102は、入力した映像信号(入力映像)を映像符号化装置101の内部に画像データとして取り込む。映像入力部102は、画像データとして取り込んだピクチャ毎に、直前フレームとのフレーム間差分値を算出し、制御部104に出力する。フレーム間差分値は、ピクチャと、そのピクチャの直前フレームとの同画素位置における輝度値の差分の絶対値の総和である。さらに、映像入力部102は、ピクチャ毎の輝度値の累算であるピクチャ内輝度値累算値等の入力映像特徴量を算出し、制御部104に出力する。また、映像入力部102は、入力映像を映像符号化部103に出力する。映像符号化部103は、入力映像の符号化を行う。
FIG. 3 is a flow chart showing coding parameter adjustment processing according to the present embodiment.
The video input unit 102 takes the input video signal (input video) into the video encoding device 101 as image data. The video input unit 102 calculates an inter-frame difference value with the immediately preceding frame for each picture captured as image data, and outputs the calculated value to the control unit 104. The inter-frame difference value is a sum of absolute values of differences in luminance values at the same pixel position between the picture and the immediately preceding frame of the picture. Further, the video input unit 102 calculates an input video feature quantity such as an in-picture luminance value accumulated value which is an accumulation of luminance values for each picture, and outputs the calculated to the control unit 104. Also, the video input unit 102 outputs the input video to the video encoding unit 103. The video encoding unit 103 encodes an input video.

制御部104は、映像入力部102から受信したフレーム間差分値及びその変化量に基づいて、入力映像におけるシーンチェンジを検出する。また、制御部104は、シーンチェンジかつピクチャ内輝度値累算値が閾値以下である等の条件を満たすフレームを、ループの先頭のフレームとして識別する(ステップS101)。制御部104は、ループの先頭を検出した場合に映像符号化部103に通知する。   The control unit 104 detects a scene change in the input video based on the inter-frame difference value received from the video input unit 102 and the amount of change thereof. Further, the control unit 104 identifies a frame that satisfies the scene change and the in-picture luminance value accumulated value is equal to or less than the threshold value as the first frame of the loop (step S101). The control unit 104 notifies the video encoding unit 103 when the head of the loop is detected.

制御部104は、映像符号化部103による入力映像の映像符号化開始後、最初のループの先頭を識別した時点で、以下の通り符号化パラメータの調整を開始する。   The control unit 104 starts adjusting the encoding parameters as follows when the head of the first loop is identified after the video encoding unit 103 starts video encoding of the input video.

まず、制御部104は、映像符号化部103が映像符号化の際に用いる特定の符号化パラメータの値を、ループの先頭ごとに順次変更して、映像符号化部103に伝達する。例えば、各CU(coding unit)のモード判定時に選択肢となるモードのコストcost_modeは、以下の式(1)により算出される。   First, the control unit 104 sequentially changes the value of a specific coding parameter used by the video coding unit 103 during video coding for each head of the loop, and transmits the value to the video coding unit 103. For example, the cost cost_mode of the mode serving as an option at the time of mode determination of each CU (coding unit) is calculated by the following equation (1).

cost_mode=SATD_mode+λ_mode*R_mode …(1) cost_mode = SATD_mode + λ_mode * R_mode (1)

ここでは、上記の式(1)に用いるλ_modeの最適値を求める例について示す。なお、R_modeは、各CUにおいて選択肢となるモードの推定符号量であり、SATD_modeは、その予測誤差をアダマール変換して総和を取った値である。   Here, an example will be described in which the optimum value of λ_mode used in the above equation (1) is determined. Note that R_mode is an estimated code amount of a mode serving as an option in each CU, and SATD_mode is a value obtained by performing Hadamard transform of the prediction error and summing.

λ_modeについては、量子化パラメータQP及びピクチャ種別ptに応じて異なる初期設定値λ’_mode[pt][QP]が事前に定められている。そこで、制御部104は、処理対象となる量子化パラメータQPを設定する(ステップS102)。制御部104は、ループのn回目(nは1以上N以下の整数、Nは予め決められた上限値)において、量子化パラメータQP及びピクチャ種別ptであるときに、式(1)におけるλ_modeとして、以下の式(2)により算出したλ_mode[pt][QP]を用いて符号化を行うよう、映像符号化部103に伝達する(ステップS103)。   For λ_mode, different initial setting values λ′_mode [pt] [QP] are determined in advance according to the quantization parameter QP and the picture type pt. Therefore, the control unit 104 sets a quantization parameter QP to be processed (step S102). The control unit 104 sets λ_mode in Equation (1) when the quantization parameter QP and the picture type pt are the n-th loop (n is an integer of 1 or more and N or less and N is a predetermined upper limit). It is transmitted to the video encoding unit 103 to perform encoding using λ_mode [pt] [QP] calculated by the following equation (2) (step S103).

λ_mode[pt][QP]=λ’_mode[pt][QP]*(0.5+0.1*n) …(2) λ_mode [pt] [QP] = λ′_mode [pt] [QP] * (0.5 + 0.1 * n) (2)

従って、λ_modeは、ループ内でピクチャ種別毎に異なる値を取る。   Therefore, λ_mode takes a different value for each picture type in the loop.

映像符号化部103は、n回目のループのテスト映像を、制御部104から通知されたλ_mode[pt][QP]を使用して符号化する(ステップS104)。このとき、映像符号化部103は、制御部104による通常の固定ビットレート制御の符号化ではなく、あらかじめ設定された固定的な量子化パラメータで符号化を行う。例えば、Iピクチャでの量子化パラメータがQPiであるとすると、映像符号化部103は、それ以外のピクチャ種別については、そのピクチャ種別に応じて量子化パラメータを固定的に+1〜+3し、入力映像を符号化する。たとえば、SOP(Structure Of Pictures)サイズ8(以下、M=8と呼ぶ)のGOP構造の場合、映像符号化部103は、temporal_ID=0のBピクチャ(以下、B0ピクチャ)についてはQPi+1、temporal_ID=1,2のBピクチャ(以下、B1、B2ピクチャ)についてはQPi+2、temporal_ID=3のBピクチャ(以下、B3ピクチャ)についてはQPi+3で符号化を行う。   The video encoding unit 103 encodes the test video of the n-th loop using λ_mode [pt] [QP] notified from the control unit 104 (step S104). At this time, the video encoding unit 103 performs encoding using a fixed quantization parameter set in advance, instead of the encoding of the normal fixed bit rate control performed by the control unit 104. For example, assuming that the quantization parameter in the I picture is QPi, the video encoding unit 103 fixedly adds +1 to +3 to the quantization parameter according to the picture type for the other picture types, and inputs Encode the video. For example, in the case of a GOP structure of SOP (Structure Of Pictures) size 8 (hereinafter, referred to as M = 8), the video encoding unit 103 QPi + 1, temporal_ID = for a B picture (hereinafter referred to as B0 picture) of temporal_ID = 0. The encoding is performed with QPi + 2 for the 1 and 2 B pictures (hereinafter, B1 and B2 pictures) and QPi + 3 for the temporal_ID = 3 B picture (hereinafter, B3 picture).

また、映像符号化部103は、制御部104から符号化対象ピクチャがループの先頭であることを示す情報を受けると、GOPの位相を初期化する。図4は、GOP位相の初期化を示す図である。映像符号化部103は、ループの先頭をGOP先頭のIピクチャとし、このIピクチャから符号化する。これにより、毎回同じピクチャを、同じピクチャ種別で符号化することとなり、RDコストの比較を正確に行うことができる。なお、映像符号化部103は、制御部104から符号化対象ピクチャがシーンの先頭であることを示す情報を受け取った場合も、GOPの位相を初期化し、GOP先頭をIピクチャとする。   Also, upon receiving from the control unit 104 the information indicating that the encoding target picture is the head of the loop, the video encoding unit 103 initializes the phase of the GOP. FIG. 4 is a diagram showing the initialization of the GOP phase. The video encoding unit 103 sets the beginning of the loop as an I picture at the beginning of the GOP, and encodes from this I picture. This makes it possible to encode the same picture every time with the same picture type, and to compare RD costs accurately. Even when the video encoding unit 103 receives, from the control unit 104, information indicating that the encoding target picture is the beginning of a scene, it initializes the phase of the GOP and sets the GOP beginning as an I picture.

なお、映像符号化部103の機能の制約によりGOPの位相を初期化できない場合には、テスト映像の1ループ分のピクチャ数をGOPのピクチャ数の整数倍とすることで、ループ毎にGOP位相がずれることを回避することができる。   When the phase of the GOP can not be initialized due to the restriction of the function of the video encoding unit 103, the number of pictures in one loop of the test video is set to be an integral multiple of the number of pictures in GOP. Misalignment can be avoided.

映像符号化部103は、図3のステップS104において1ループ分の符号化を行うと、ピクチャ毎の発生符号量Rと符号化歪みDを算出し、RDコスト計算部105に伝達する。符号化歪みDは、原画と復号画像の画素値差分の2乗和とする。制御部104は、各ピクチャのピクチャ種別と、ループ先頭を検出したときにはループ先頭フラグとをRDコスト計算部105に出力している。RDコスト計算部105は、ループ内でピクチャ毎に符号量R、符号化歪みDを用いて以下の式(3)によりRDコストを算出する。   When encoding for one loop is performed in step S104 in FIG. 3, the video encoding unit 103 calculates the generated code amount R for each picture and the encoding distortion D, and transmits the amount to the RD cost calculation unit 105. The encoding distortion D is a sum of squares of pixel value differences of the original image and the decoded image. The control unit 104 outputs the picture type of each picture and the loop start flag when detecting the loop start to the RD cost calculation unit 105. The RD cost calculation unit 105 calculates the RD cost by the following equation (3) using the code amount R and the coding distortion D for each picture in the loop.

RDcost=D+λ*R …(3) RDcost = D + λ * R (3)

なお、λは量子化パラメータQPとピクチャ種別ptに応じて異なる値が事前に定められている(例えば、非特許文献1参照)。RDコスト計算部105は、最適パラメータ判定部106にRDコスト(RDcost)を出力する。   Note that different values of λ are determined in advance according to the quantization parameter QP and the picture type pt (see, for example, Non-Patent Document 1). The RD cost calculation unit 105 outputs the RD cost (RDcost) to the optimum parameter determination unit 106.

最適パラメータ判定部106は、ループ#n内の同じピクチャ種別ptについてRDコスト(RDcost)の総和を算出し、RDcost_Sum[n][pt]としてメモリ107に保存する(ステップS105)。このとき、最適パラメータ判定部106は、RDcost_Sum[n][pt]に、使用したλ_mode[pt][QP]を対応付けてメモリ107に保存する。
映像符号化装置101は、上記の処理をN回のループそれぞれについて実施する(ステップS106)。
The optimum parameter determination unit 106 calculates the sum of RD costs (RDcost) for the same picture type pt in the loop #n, and stores it in the memory 107 as RDcost_Sum [n] [pt] (step S105). At this time, the optimum parameter determination unit 106 associates RDcost_Sum [n] [pt] with the used λ_mode [pt] [QP] and stores the associated value in the memory 107.
The video encoding apparatus 101 performs the above-described process for each of N loops (step S106).

N回のループの終了後、最適パラメータ判定部106は、メモリ107に保存されたRDcost_Sum[n][pt]を元に、それぞれのピクチャ種別毎にRDcost_Sumが最小となるループ番号n_minを確定し、そのときのλ_modeをλ_mode[n_min][pt]とする(ステップS107)。最適パラメータ判定部106は、ピクチャ種別毎のλ_mode[n_min][pt]を、最適パラメータセットとして出力する。   After the end of N times of loops, the optimum parameter determination unit 106 determines a loop number n_min that minimizes RDcost_Sum for each picture type based on RDcost_Sum [n] [pt] stored in the memory 107, The λ_mode at that time is set to λ_mode [n_min] [pt] (step S107). The optimal parameter determination unit 106 outputs λ_mode [n_min] [pt] for each picture type as an optimal parameter set.

以上により、ある量子化パラメータ値における各ピクチャ種別のλ_modeのセットを最適化することができる。映像符号化装置101は、以上の処理を、量子化パラメータの値を順に変えて実施する(ステップS108)。これにより、λ_modeを、初期設定値λ'_mode[QP][pt]から、RDコストにより最適化した値に置き換えることが可能となる。   As described above, the set of λ_mode of each picture type in a certain quantization parameter value can be optimized. The video encoding device 101 performs the above-described processing by sequentially changing the value of the quantization parameter (step S108). This makes it possible to replace λ_mode from the initial set value λ′_mode [QP] [pt] to a value optimized by RD cost.

映像符号化装置101に、32フレームで構成されるシーンが7つ含まれるテスト映像を、21回ループ再生する映像信号が入力されると仮定する。映像符号化装置101は、上記処理を行って、テスト映像1ループごとに符号化パラメータを少しずつ変更させながら符号化を行う。例えば、映像符号化装置101は、6つの異なる値の量子化パラメータ、8つのピクチャ種別に対して、各ループごとに異なる21通りのλ_modeを用いて7つのシーンそれぞれを符号化し、RDコストの総和が最小となる符号化パラメータを順次決定する。この場合、映像入力から符号化パラメータの決定までに要する時間は、(QPの数)6×(ピクチャ種別の数)8×(ループ回数)21×(シーンの数)7×(1フレームの秒数)32/60=3763秒である。このように、従来映像入力、符号化、ストリーム採取、デコード映像の取得、各種ログの集計・分析といった作業やシミュレータ等で実施していたパラメータ調整を大幅に効率化することができる。   It is assumed that the video encoding apparatus 101 is input with a video signal for performing a loop reproduction 21 times on a test video including seven scenes composed of 32 frames. The video encoding apparatus 101 performs the above processing and performs encoding while changing the encoding parameter little by little for each test video 1 loop. For example, the video encoding apparatus 101 encodes each of seven scenes using 21 different λ_modes for each loop with respect to quantization parameters of six different values and eight picture types, and sums RD costs. The coding parameters for which is the smallest are sequentially determined. In this case, the time required from the video input to the determination of the coding parameter is (number of QPs) 6 x (number of picture types) 8 x (number of loops) 21 x (number of scenes) 7 x (one frame of seconds) Number) 32/60 = 3763 seconds. As described above, it is possible to greatly streamline the parameter adjustment conventionally performed in operations such as video input, encoding, stream collection, acquisition of decoded video, aggregation and analysis of various logs, and a simulator.

[第2の実施形態]
本実施形態では、符号化パラメータの自動調整方法の他の例について説明する。本実施形態では、映像符号化装置101は、ピクチャ種別毎に、ピクチャの参照順に従ってパラメータ調整を行い、さらに、RDコスト算出用のラグランジュ係数λをシーン毎に算出する。そのため、より精度の高いパラメータ調整を行うことができる。
Second Embodiment
In the present embodiment, another example of the automatic adjustment method of the coding parameter will be described. In the present embodiment, the video encoding apparatus 101 performs parameter adjustment in accordance with the reference order of pictures for each picture type, and further calculates the Lagrange coefficient λ for RD cost calculation for each scene. Therefore, more accurate parameter adjustment can be performed.

図5は、本実施形態による符号化パラメータ自動調整処理を示すフロー図である。まず、映像入力部102は、映像のループ先頭が来るまで待つ(ステップS201)。その間は、映像符号化装置101は、通常の映像符号化を行い、パラメータ調整の処理は行わない。映像のループの先頭は、黒画像からのシーンチェンジになっている。制御部104は、入力映像のフレーム間差分の値および変化量と映像の輝度累積値からループ先頭を識別し、映像符号化部103にループの先頭フラグを通知する。   FIG. 5 is a flowchart showing the encoding parameter automatic adjustment process according to the present embodiment. First, the video input unit 102 waits until the loop head of the video comes (step S201). In the meantime, the video encoding device 101 performs normal video encoding, and does not perform parameter adjustment processing. The top of the video loop is a scene change from the black image. The control unit 104 identifies the loop head from the value and the change amount of the inter-frame difference of the input video, and the luminance accumulation value of the video, and notifies the video encoding unit 103 of the loop top flag.

制御部104は、まだ処理対象としていない量子化パラメータの値(以下、QPと記載)の中から、符号化に用いる新たなQPを映像符号化部103に設定する(ステップS202)。本実施形態では、QPによって値の異なるパラメータを調整することを考慮し、調整するQPを7,12,17,22,27,32,37,42,47と順に変化させていく。取りうるQP全てについて全て調整してもよいが、実用上は離散的なQPについて得られたパラメータ値を補間することで、全てのQPに対するパラメータ値を得れば問題ない。また、一般にQPはIピクチャをベースとしてピクチャ種別によって+1〜+3されるため、本実施形態でもそのようにQPを変えて符号化する。   The control unit 104 sets a new QP to be used for encoding in the video encoding unit 103 out of values (hereinafter referred to as QP) of quantization parameters not to be processed yet (step S202). In the present embodiment, in consideration of adjusting parameters having different values according to the QP, the QP to be adjusted is sequentially changed to 7, 12, 17, 22, 27, 32, 37, 42, 47. Although all the possible QPs may be adjusted, in practice, it is not problematic if parameter values for all QPs are obtained by interpolating parameter values obtained for discrete QPs. Also, since QP is generally +1 to +3 depending on the picture type on the basis of an I picture, this embodiment changes the QP and encodes in this way.

制御部104は、まだ処理対象として選択していないピクチャ種別の中から、これから調整対象、集計対象とするピクチャ種別を決定する(ステップS203)。ここでピクチャ種別とは、GOP内で参照関係が類似しているピクチャのことである。M=8のGOP構造では、ピクチャ種別は、I,B0,B1,B2,B3などである。Bnはtemporal_id=nのBピクチャを表す。   The control unit 104 determines, from among the picture types that have not been selected as the process target, the picture types to be adjusted and counted from now (step S203). Here, the picture type is a picture having a similar reference relationship in the GOP. In the M = 8 GOP structure, the picture types are I, B0, B1, B2, B3 and so on. Bn represents a B picture of temporal_id = n.

続いて、ステップS204〜S206において、映像符号化装置101は、RDコスト算出用のλをシーン毎に算出する。まず、映像符号化部103は、QP−1で入力映像に含まれる最初の1ループ分のテスト映像を符号化する。RDコスト計算部105は、集計対象のピクチャ種別または全てのピクチャ種別について、ピクチャ毎の発生符号量Rと符号化歪みDを算出し、シーン#s毎に発生符号量Rの累積値R[QP−1][s]と符号化歪みDの累積値D[QP−1][s]を求める(ステップS204)。ここでsはシーン番号である。   Subsequently, in steps S204 to S206, the video encoding device 101 calculates λ for RD cost calculation for each scene. First, the video encoding unit 103 encodes a test video for the first one loop included in the input video at QP-1. The RD cost calculation unit 105 calculates the generated code amount R and the encoding distortion D for each picture for the picture type to be aggregated or all the picture types, and calculates the accumulated value R [QP of the generated code amount R for each scene #s. -1] [s] and the accumulated value D [QP-1] [s] of the encoding distortion D are obtained (step S204). Here, s is a scene number.

続いて、映像符号化装置101は、QP+1について同様の処理を行う(ステップS205)。すなわち、映像符号化部103は、入力映像に含まれる次の1ループ分のテスト映像をQP+1で符号化する。RDコスト計算部105は、集計対象のピクチャ種別または全てのピクチャ種別について、ピクチャ毎との発生符号量Rと符号化歪みDを算出し、シーン#s毎に発生符号量Rの累積値R[QP+1][s]と符号化歪みDの累積値D[QP+1][s]を求める。   Subsequently, the video encoding apparatus 101 performs the same process on QP + 1 (step S205). That is, the video encoding unit 103 encodes the next one loop of test video included in the input video using QP + 1. The RD cost calculation unit 105 calculates the generated code amount R and the encoding distortion D for each picture for the picture type to be aggregated or all the picture types, and accumulates the generated value R of the generated code amount R for each scene #s. An accumulated value D [QP + 1] [s] of QP + 1] [s] and the encoding distortion D is obtained.

図6は、発生符号量Rと符号化歪みDの関係を用いたλの算出を示す図である。同図に示すRD特性曲線に基づいて、RDコスト計算部105は、以下の式(4)のとおり、シーン#s毎のRDコスト算出用λ[s]を求める。   FIG. 6 is a diagram showing the calculation of λ using the relationship between the generated code amount R and the encoding distortion D. Based on the RD characteristic curve shown in the figure, the RD cost calculation unit 105 calculates RD [.lambda.] For RD cost calculation for each scene #s, as the following equation (4).

λ[s]=(−1)*(R[QP+1][s]−R[QP−1][s])/(D[QP+1][s]−D[QP−1][s]) …(4) λ [s] = (-1) * (R [QP + 1] [s] -R [QP-1] [s]) / (D [QP + 1] [s] -D [QP-1] [s]) ... (4)

図5において、制御部104は、次のループのテスト映像を符号化する際に用いる符号化パラメータの値を変更し、映像符号化部103に出力する(ステップS207)。例えば、動き探索時には、以下の式(5)により、各PU(Prediction Unit)の各探索点のコストcost_meを算出する。   In FIG. 5, the control unit 104 changes the value of the coding parameter used when coding the test video of the next loop, and outputs the value to the video coding unit 103 (step S207). For example, at the time of motion search, the cost cost_me of each search point of each PU (Prediction Unit) is calculated by the following equation (5).

cost_me=SAD+λ_me*R …(5) cost_me = SAD + λ_me * R (5)

符号化パラメータとして、上記の式(5)に用いるλ_meの最適値を求める例について示す。なお、Rは探索点のMV(動きベクトル)を符号化するのに必要な推定符号量であり、SADは予測誤差の絶対値の和である。   An example will be described in which the optimum value of λ_me used in the above equation (5) is determined as a coding parameter. Here, R is an estimated amount of code necessary to encode the MV (motion vector) of the search point, and SAD is the sum of absolute values of prediction errors.

一般にλ_meは、ピクチャ種別、QP毎に異なる初期設定値がある。そこで、制御部104は、ループ#n(nは1以上N以下の整数、Nは予め決められた上限値)においては、式(5)におけるλ_meを、以下の式(6)により算出される値とする。   In general, λ_me has different initial setting values for each picture type and QP. Therefore, in the loop #n (n is an integer of 1 or more and N or less, N is a predetermined upper limit value), the control unit 104 calculates λ_me in the equation (5) by the following equation (6) It will be a value.

λ_me[n]=λ_me*(0.5+0.1*n) …(6) λ_me [n] = λ_me * (0.5 + 0.1 * n) (6)

映像符号化部103は、1ループ分のテスト映像を符号化し、RDコスト計算部105は、集計対象のピクチャ種別について、ピクチャ毎の発生符号量Rと符号化歪みDを算出し、その1ループ分の発生符号量Rの累積値R[n]と符号化歪みDの累積値D[n]を求める。RDコスト計算部105は、ループ#nのシーン#sについてのRDコストを、以下の式(7)により求める(ステップS208)。   The video encoding unit 103 encodes a test image for one loop, and the RD cost calculation unit 105 calculates the generated code amount R and the encoding distortion D for each picture for the picture type of the aggregation target, and the one loop An accumulated value R [n] of the generated code amount R for a minute and an accumulated value D [n] of the encoding distortion D are obtained. The RD cost calculation unit 105 obtains the RD cost for the scene #s of loop #n according to the following equation (7) (step S208).

cost[s][n]=D[n]+λ[s]*R[n] …(7) cost [s] [n] = D [n] + λ [s] * R [n] ... (7)

最適パラメータ判定部106は、集計対象のピクチャ種別と、RDコスト計算部105が算出したRDコストcost[s][n]と、λ_me[n]とを対応付けてメモリ107に書き込む。   The optimum parameter determination unit 106 associates the picture type of the aggregation target, the RD cost cost [s] [n] calculated by the RD cost calculation unit 105, and λ_me [n] with each other and writes the result in the memory 107.

制御部104は、ループの回数がNに達したか否かを判定する(ステップS209)。制御部104が、ループの回数はN未満であると判定した場合、映像符号化装置101は、再度、ステップS207に戻り、次のループについて符号化パラメータを変更し、1ループ分の符号化を行い、RDコストを集計する。   The control unit 104 determines whether the number of loops has reached N (step S209). If the control unit 104 determines that the number of loops is less than N, the video encoding device 101 returns again to step S207, changes the encoding parameter for the next loop, and encodes one loop. Perform and aggregate RD costs.

制御部104が、ループの回数はNに達したと判定した場合(ステップS209)、最適パラメータ判定部106は、シーン毎に集計対象のピクチャ種別についてRDコストが最小となる符号化パラメータを決定する(ステップS210)。具体的には、最適パラメータ判定部106は、メモリ107を参照し、集計対象のピクチャ種別についてシーン#s毎に算出されたRDコストcost[s][n]が最小となるループ番号n_min[s]を特定する。最適パラメータ判定部106は、メモリ107から、特定したループ番号n_min[s]と対応付けられたλ_me[n]であるパラメータλ_me[n_min[s]]を取得する。   If the control unit 104 determines that the number of loops has reached N (step S 209), the optimum parameter determination unit 106 determines, for each scene, the coding parameter with the smallest RD cost for the type of picture to be aggregated. (Step S210). Specifically, the optimum parameter determination unit 106 refers to the memory 107, and the loop number n_min [s] in which the RD cost cost [s] [n] calculated for each scene #s for the picture type of the aggregation target is minimized. To identify. The optimum parameter determination unit 106 acquires, from the memory 107, the parameter λ_me [n_min [s]] which is λ_me [n] associated with the specified loop number n_min [s].

本実施形態ではさらに、最適パラメータ判定部106は、集計対象のピクチャ種別について全シーンで求められたλ_meの平均を取り、算出した平均を当該QP、ピクチャ種別でのλ_meの調整値として出力する。またこの値は、それ以降のピクチャ種別のパラメータ調整の際の符号化において用いる。これにより、参照画像は調整済みの値で調整することができ、より高い精度での調整が可能となる。   Further, in the present embodiment, the optimum parameter determination unit 106 takes the average of λ_me obtained for all scenes for the picture types to be aggregated, and outputs the calculated average as the QP and the adjustment value of λ_me for the picture type. Also, this value is used in coding in the subsequent parameter adjustment of the picture type. Thereby, the reference image can be adjusted with the adjusted value, and adjustment with higher accuracy is possible.

また別の実施形態として、最適パラメータ判定部106は、集計対象のピクチャ種別について各シーンのλ_me[n_min[s]]を求めた後、それらを当該QP、ピクチャ種別での各シーンのλ_meの調整値として出力するとともに、それ以降のピクチャ種別のパラメータ調整の際の各シーンの符号化において用いることができる。これにより、ほぼ同様の手順でシーン毎のパラメータ調整を行うことが可能である。   In another embodiment, the optimum parameter determination unit 106 determines λ_me [n_min [s]] of each scene for the picture type to be aggregated, and then adjusts them for the QP and the picture type to adjust λ_me of each scene. While outputting as a value, it can be used in encoding of each scene at the time of parameter adjustment of the picture type after that. By this, it is possible to perform parameter adjustment for each scene in substantially the same procedure.

制御部104は、全てのピクチャ種別について処理を終了したか否かを判定する(ステップS211)。制御部104は、未処理のピクチャ種別があると判定した場合(ステップS211:NO)、ステップS203に戻り、新たなピクチャ種別を選択してパラメータ調整を始める。制御部104は、全てのピクチャ種別について処理を終了したと判定した場合(ステップS211:YES)、ステップS212の判定を行う。   The control unit 104 determines whether the process has been completed for all picture types (step S211). If the control unit 104 determines that there is an unprocessed picture type (step S211: NO), the control unit 104 returns to step S203, selects a new picture type, and starts parameter adjustment. If the control unit 104 determines that the process has been completed for all picture types (step S211: YES), the control unit 104 performs the determination of step S212.

制御部104は、全てのQPについて処理を終了したか否かを判定する(ステップS212)。制御部104は、未処理のQPがあると判定した場合(ステップS212:NO)、ステップS202に戻り、新たなQPを用いてパラメータ調整を始める。制御部104は、全てのQPについて処理を終了したと判定した場合(ステップS212:YES)、図5に示す処理全体を終了する。   The control unit 104 determines whether the process has ended for all the QPs (step S212). If the control unit 104 determines that there is an unprocessed QP (step S212: NO), the control unit 104 returns to step S202 and starts parameter adjustment using a new QP. If the control unit 104 determines that the process has ended for all the QPs (step S212: YES), the entire process illustrated in FIG. 5 ends.

上記では、映像符号化装置101にパラメータ調整機能を追加する例を示したが、複数装置から構成される映像符号化システムにパラメータ調整機能を追加してもよい。   Although the example in which the parameter adjustment function is added to the video encoding device 101 has been described above, the parameter adjustment function may be added to a video encoding system configured with a plurality of devices.

以上説明した実施形態によれば、映像符号化パラメータ調整装置は、取得部と、評価部と、判定部とを備える。例えば、映像符号化パラメータ調整装置は、映像符号化装置101であり、取得部は制御部104であり、評価部はRDコスト計算部105であり、判定部は最適パラメータ判定部である。取得部は、大映像に含まれる複数の小映像それぞれを符号化する際に使用された異なる映像符号化パラメータ値を取得する。例えば、大映像は、映像符号化装置101の入力映像であり、小映像は、ループ再生されるテスト映像に含まれる1以上の各シーンである。評価部は、小映像毎に、映像符号化パラメータ値を使用して小映像に行った符号化の評価を所定の指標に基づいて行う。所定の指標は、例えば、RDコストである。判定部は、評価と映像符号化パラメータ値との関連に基づいて、符号化に適した映像符号化パラメータ値を判定する。   According to the embodiment described above, the video coding parameter adjustment device includes an acquisition unit, an evaluation unit, and a determination unit. For example, the video coding parameter adjustment device is the video coding device 101, the acquisition unit is the control unit 104, the evaluation unit is the RD cost calculation unit 105, and the determination unit is the optimum parameter determination unit. The acquisition unit acquires different video coding parameter values used in coding each of the plurality of small videos included in the large video. For example, the large video is an input video of the video encoding device 101, and the small video is one or more scenes included in the test video to be loop-reproduced. The evaluation unit performs, for each small video, the evaluation of coding performed on the small video using the video coding parameter value based on a predetermined index. The predetermined index is, for example, an RD cost. The determination unit determines a video coding parameter value suitable for coding based on the relation between the evaluation and the video coding parameter value.

映像符号化パラメータ調整装置は、検出部と、変更部と、符号化部とをさらに備えてもよい。例えば、検出部及び変更部は、制御部104であり、符号化部は、映像符号化部103である。検出部は、大映像の映像特徴量に基づいてループの先頭を検出する。変更部は、検出部が検出したループの先頭において、小映像を符号化する際に使用される映像符号化パラメータ値を変更する。符号化部は、検出部が検出したループの先頭においてGOP位相を初期化し、ループ毎に、変更部により変更された映像符号化パラメータ値を用いてGOPの先頭から小映像を符号化する。   The video coding parameter adjustment device may further include a detection unit, a change unit, and a coding unit. For example, the detection unit and the change unit are the control unit 104, and the encoding unit is the video encoding unit 103. The detection unit detects the head of the loop based on the video image feature amount of the large video. The change unit changes a video coding parameter value used when coding a small video at the beginning of the loop detected by the detection unit. The encoding unit initializes the GOP phase at the beginning of the loop detected by the detecting unit, and encodes the small image from the beginning of the GOP using the video encoding parameter value changed by the changing unit for each loop.

また、変更部は、GOP内の参照関係の順序に従って対象とするピクチャ種別を順次変更させる。評価部は、ピクチャ種別ごとに、映像符号化パラメータ値を使用して小映像に含まれるピクチャに行った符号化の評価を所定の指標に基づいて行ってもよい。判定部は、ピクチャ種別毎の評価と映像符号化パラメータ値との関連に基づいて、前記ピクチャ種別毎に符号化に適した映像符号化パラメータ値を判定する。   Also, the changing unit sequentially changes the target picture type in accordance with the order of the reference relationship in the GOP. The evaluation unit may evaluate, for each picture type, the coding performed on the picture included in the small video using the video coding parameter value based on a predetermined index. The determination unit determines a video coding parameter value suitable for coding for each of the picture types, based on the relationship between the evaluation for each of the picture types and the video coding parameter value.

所定の指標が、発生符号量Rと符号化劣化Dを線形結合したRDコストである場合、評価部は、大映像に含まれる2回分のループの小映像に、調整対象の量子化パラメータ値(QP)の前後の量子化パラメータ値を使用して符号化を行ったときの発生符号量R及び符号化劣化Dに基づいてRD特性曲線の傾きを求め、求めた傾きに基づいて、RDコストの算出に用いるラグランジュ係数を決定してもよい。   If the predetermined index is an RD cost obtained by linearly combining the generated code amount R and the coding degradation D, the evaluation unit determines the quantization parameter value of the adjustment target in the small images of the two loops included in the large image. The slope of the RD characteristic curve is determined based on the generated code amount R and the encoding degradation D when encoding is performed using quantization parameter values before and after QP), and the RD cost is calculated based on the determined slope. You may determine the Lagrange coefficient used for calculation.

また、検出部は、大映像の映像特徴量に基づいて、各ループに含まれる複数の小映像それぞれの先頭を検出してもよい。符号化部は、検出部が検出した小映像の先頭においてGOP位相を初期化し、小映像毎に、変更部により変更された映像符号化パラメータ値を用いてGOPの先頭から符号化を行う。判定部は、小映像毎の評価と映像符号化パラメータ値との関連に基づいて、小映像毎に符号化に適した映像符号化パラメータ値を判定する。   In addition, the detection unit may detect the head of each of the plurality of small videos included in each loop based on the video feature amount of the large video. The encoding unit initializes the GOP phase at the beginning of the small image detected by the detection unit, and performs encoding from the beginning of the GOP using the video encoding parameter value changed by the changing unit for each small image. The determination unit determines a video coding parameter value suitable for coding for each small video based on the relation between the evaluation for each small video and the video coding parameter value.

上述した実施形態によれば、従来の手法に比べて、より効率的かつ正確に映像符号化パラメータの最適化及び調整を行うことができる。また、上述した実施形態によれば、テスト映像のループ先頭・シーン先頭の識別と、それに合わせたGOP位相の初期化、ピクチャ種別毎やシーン毎のRDコストの集計、RDコスト算出に用いるラグランジュ係数の自動算出、等によって、映像符号化パラメータの調整を高い精度で行うことができる。   According to the above-described embodiment, it is possible to perform optimization and adjustment of video coding parameters more efficiently and accurately than the conventional method. Further, according to the above-described embodiment, identification of the loop head and scene head of the test video, initialization of the GOP phase according to it, aggregation of RD cost for each picture type and each scene, Lagrange coefficient used for RD cost calculation The adjustment of the video coding parameter can be performed with high accuracy by the automatic calculation of.

上述した映像符号化装置101は、バスで接続されたCPU(Central Processing Unit)やメモリや補助記憶装置などを備え、映像符号化パラメータ調整プログラムを実行することによって映像入力部102、映像符号化部103、制御部104、RDコスト計算部105及び最適パラメータ判定部106を備える装置として機能する。なお、映像入力部102、映像符号化部103、制御部104、RDコスト計算部105及び最適パラメータ判定部106の各機能の全て又は一部は、ASIC(Application Specific Integrated Circuit)やPLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等のハードウェアを用いて実現されても良い。映像符号化パラメータ調整プログラムは、コンピュータ読み取り可能な記録媒体に記録されても良い。コンピュータ読み取り可能な記録媒体とは、例えばフレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置である。映像符号化パラメータ調整プログラムは、電気通信回線を介して送信されても良い。   The above-described video encoding device 101 includes a CPU (Central Processing Unit), a memory, an auxiliary storage device, and the like connected by a bus, and by executing a video encoding parameter adjustment program, a video input unit 102 and a video encoding unit The control unit 104 functions as an apparatus including the control unit 104, the RD cost calculation unit 105, and the optimum parameter determination unit 106. Note that all or part of the functions of the video input unit 102, the video encoding unit 103, the control unit 104, the RD cost calculation unit 105, and the optimum parameter determination unit 106 can be implemented using an application specific integrated circuit (ASIC) or programmable logic (PLD). It may be realized using hardware such as Device) or FPGA (Field Programmable Gate Array). The video coding parameter adjustment program may be recorded on a computer readable recording medium. The computer readable recording medium is, for example, a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a storage device such as a hard disk built in a computer system. The video coding parameter adjustment program may be transmitted via a telecommunication line.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes design and the like within the scope of the present invention.

101…映像符号化装置, 102…映像入力部, 103…映像符号化部, 104…制御部, 105…RDコスト計算部, 106…最適パラメータ判定部, 107…メモリ DESCRIPTION OF SYMBOLS 101 ... Video coding apparatus, 102 ... Video input part, 103 ... Video coding part, 104 ... Control part, 105 ... RD cost calculation part, 106 ... Optimal parameter determination part, 107 ... Memory

Claims (7)

大映像に含まれる複数の小映像それぞれを符号化する際に使用された異なる映像符号化パラメータ値を取得する取得部と、
前記小映像毎に、前記映像符号化パラメータ値を使用して前記小映像に行った符号化の評価を所定の指標に基づいて行う評価部と、
前記評価と前記映像符号化パラメータ値との関連に基づいて、符号化に適した映像符号化パラメータ値を判定する判定部と、
を備える映像符号化パラメータ調整装置。
An acquisition unit for acquiring different video coding parameter values used in coding each of a plurality of small videos included in the large video;
An evaluation unit which performs, based on a predetermined index, an evaluation of coding performed on the small video using the video coding parameter value for each small video;
A determination unit that determines a video coding parameter value suitable for coding based on the relation between the evaluation and the video coding parameter value;
Video coding parameter adjustment device comprising:
前記大映像は、ループ再生される前記小映像を含み、
前記大映像の映像特徴量に基づいて、ループの先頭を検出する検出部と、
前記検出部が検出した前記ループの先頭において、前記小映像を符号化する際に使用される前記映像符号化パラメータ値を変更する変更部と、
前記検出部が検出した前記ループの先頭においてGOP(Group of Picture)位相を初期化し、前記ループ毎に、前記変更部により変更された前記映像符号化パラメータ値を用いてGOPの先頭から前記小映像を符号化する符号化部とを備える、
請求項1に記載の映像符号化パラメータ調整装置。
The large image includes the small image to be loop-played,
A detection unit that detects the head of the loop based on the video image feature amount of the large video;
A changing unit that changes the video coding parameter value used when coding the small video at the head of the loop detected by the detection unit;
The GOP (Group of Picture) phase is initialized at the head of the loop detected by the detection unit, and the small video is recorded from the head of the GOP using the video coding parameter value changed by the changing unit for each loop. And an encoding unit for encoding
The video coding parameter adjustment device according to claim 1.
前記評価部は、ピクチャ種別ごとに、前記映像符号化パラメータ値を使用して前記小映像に含まれるピクチャに行った符号化の評価を所定の前記指標に基づいて行い、
前記判定部は、前記ピクチャ種別毎の前記評価と前記映像符号化パラメータ値との関連に基づいて、前記ピクチャ種別毎に符号化に適した映像符号化パラメータ値を判定する、
請求項1に記載の映像符号化パラメータ調整装置。
The evaluation unit performs, based on a predetermined index, evaluation of coding performed on a picture included in the small video using the video coding parameter value for each picture type.
The determination unit determines a video coding parameter value suitable for coding for each of the picture types, based on a relation between the evaluation for each of the picture types and the video coding parameter value.
The video coding parameter adjustment device according to claim 1.
前記大映像は、ループ再生される前記小映像を含み、
前記所定の指標は、発生符号量Rと符号化劣化Dを線形結合したRDコストであり、
前記評価部は、前記大映像に含まれる2回分のループの前記小映像に、調整対象の量子化パラメータ値の前後の量子化パラメータ値を使用して符号化を行ったときの発生符号量R及び符号化劣化Dに基づいてRD特性曲線の傾きを求め、求めた前記傾きに基づいて、RDコストの算出に用いるラグランジュ係数を決定する、
請求項1に記載の映像符号化パラメータ調整装置。
The large image includes the small image to be loop-played,
The predetermined index is an RD cost obtained by linearly combining the generated code amount R and the coding degradation D,
The evaluation unit generates a generated code amount R when encoding is performed on the small image of the two loops included in the large image using quantization parameter values before and after the quantization parameter value to be adjusted. And determining the slope of the RD characteristic curve based on the coding deterioration D, and determining the Lagrange coefficient used to calculate the RD cost based on the determined slope.
The video coding parameter adjustment device according to claim 1.
前記大映像は、ループ再生される複数の前記小映像を含み、
前記検出部は、前記大映像の映像特徴量に基づいて、前記小映像の先頭を検出し、
前記符号化部は、前記検出部が検出した前記小映像の先頭においてGOP(Group of Picture)位相を初期化し、前記小映像毎に、前記変更部により変更された前記映像符号化パラメータ値を用いてGOPの先頭から符号化を行い、
前記判定部は、前記小映像毎の前記評価と前記映像符号化パラメータ値との関連に基づいて、前記小映像毎に符号化に適した映像符号化パラメータ値を判定する、
請求項2に記載の映像符号化パラメータ調整装置。
The large image includes a plurality of small images to be loop-played,
The detection unit detects the beginning of the small video based on the video feature amount of the large video.
The encoding unit initializes a GOP (Group of Picture) phase at the beginning of the small image detected by the detection unit, and uses the image encoding parameter value changed by the changing unit for each small image. Encoding from the beginning of the GOP,
The determination unit determines a video coding parameter value suitable for coding for each small video, based on the relation between the evaluation for each small video and the video coding parameter value.
The video coding parameter adjustment device according to claim 2.
大映像に含まれる複数の小映像それぞれを符号化する際に使用された異なる映像符号化パラメータ値を取得する取得ステップと、
前記小映像毎に、前記映像符号化パラメータ値を使用して前記小映像に行った符号化の評価を所定の指標に基づいて行う評価ステップと、
前記評価と前記映像符号化パラメータ値との関連に基づいて、符号化に適した映像符号化パラメータ値を判定する判定ステップと、
を有する映像符号化パラメータ調整方法。
Obtaining different video coding parameter values used in coding each of a plurality of small videos included in the large video;
An evaluation step of performing, based on a predetermined index, evaluation of encoding performed on the small video using the video coding parameter value for each small video;
Determining a video coding parameter value suitable for coding based on the relation between the evaluation and the video coding parameter value;
And a video coding parameter adjustment method.
コンピュータを、請求項1から請求項5のいずれか一項に記載の映像符号化パラメータ調整装置として機能させるプログラム。   A program that causes a computer to function as the video coding parameter adjustment device according to any one of claims 1 to 5.
JP2017227197A 2017-11-27 2017-11-27 Video coding parameter adjustment device, video coding parameter adjustment method and program Active JP6867275B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017227197A JP6867275B2 (en) 2017-11-27 2017-11-27 Video coding parameter adjustment device, video coding parameter adjustment method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017227197A JP6867275B2 (en) 2017-11-27 2017-11-27 Video coding parameter adjustment device, video coding parameter adjustment method and program

Publications (2)

Publication Number Publication Date
JP2019097128A true JP2019097128A (en) 2019-06-20
JP6867275B2 JP6867275B2 (en) 2021-04-28

Family

ID=66973174

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017227197A Active JP6867275B2 (en) 2017-11-27 2017-11-27 Video coding parameter adjustment device, video coding parameter adjustment method and program

Country Status (1)

Country Link
JP (1) JP6867275B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112584147A (en) * 2020-11-30 2021-03-30 北京金山云网络技术有限公司 Method, apparatus, computer device and storage medium for adjusting encoder parameters
WO2023024519A1 (en) * 2021-08-27 2023-03-02 华为技术有限公司 Video processing method and apparatus, device, and system
WO2024029812A1 (en) * 2022-08-01 2024-02-08 배태면 Adaptive encoding parameter management method and electronic device supporting same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112584147A (en) * 2020-11-30 2021-03-30 北京金山云网络技术有限公司 Method, apparatus, computer device and storage medium for adjusting encoder parameters
CN112584147B (en) * 2020-11-30 2023-05-05 北京金山云网络技术有限公司 Method, apparatus, computer device and storage medium for adjusting encoder parameters
WO2023024519A1 (en) * 2021-08-27 2023-03-02 华为技术有限公司 Video processing method and apparatus, device, and system
WO2024029812A1 (en) * 2022-08-01 2024-02-08 배태면 Adaptive encoding parameter management method and electronic device supporting same

Also Published As

Publication number Publication date
JP6867275B2 (en) 2021-04-28

Similar Documents

Publication Publication Date Title
US11423942B2 (en) Reference and non-reference video quality evaluation
US8718138B2 (en) Image encoding apparatus and image encoding method that determine an encoding method, to be used for a block to be encoded, on the basis of an intra-frame-prediction evaluation value calculated using prediction errors between selected reference pixels and an input image
US9942557B2 (en) Method and system of video encoding optimization
JP6867275B2 (en) Video coding parameter adjustment device, video coding parameter adjustment method and program
US9113170B2 (en) Motion vector decision apparatus, motion vector decision method and computer readable storage medium
JP2009530892A (en) Method and apparatus for adapting temporal frequency of video image sequences
Zhao et al. AOM common test conditions v2. 0
Menon et al. All-intra rate control using low complexity video features for Versatile Video Coding
JP2017224939A (en) Imaging apparatus
US9648336B2 (en) Encoding apparatus and method
JP5178616B2 (en) Scene change detection device and video recording device
US20130343449A1 (en) Image encoding apparatus and its control method
US8594195B2 (en) Method and apparatus for encoding and decoding at least one image frame that is artificially inserted into image sequence
Uhrina et al. Impact of H. 265 and VP9 compression standards on the video quality for 4K resolution
JP2015076765A (en) Image processing device, control method thereof, and computer program
US10516896B2 (en) Encoding device, encoding method, and storage medium
Uhrina et al. Coding efficiency of VP8 and VP9 compression standards for high resolutions
US20140270513A1 (en) Moving image encoding apparatus and method for controlling the same
JP6816137B2 (en) Image processing device, image processing method and image processing program
KR102071388B1 (en) Apparatus for summarizing video and apparatus for processing video
JP6486120B2 (en) Encoding apparatus, encoding apparatus control method, and program
KR20150140448A (en) Apparatus and method for storing active video in video surveillance system
US12028521B2 (en) Encoder, method, and non-transitory computer-readable storage medium
US11197014B2 (en) Encoding apparatus, decoding apparatus, and image processing system
JP2018186419A (en) Transcoder, transcoding method, and transcoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190521

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200630

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210125

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210408

R150 Certificate of patent or registration of utility model

Ref document number: 6867275

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150