JP2015186120A - Encoding method conversion apparatus and program - Google Patents

Encoding method conversion apparatus and program Download PDF

Info

Publication number
JP2015186120A
JP2015186120A JP2014062258A JP2014062258A JP2015186120A JP 2015186120 A JP2015186120 A JP 2015186120A JP 2014062258 A JP2014062258 A JP 2014062258A JP 2014062258 A JP2014062258 A JP 2014062258A JP 2015186120 A JP2015186120 A JP 2015186120A
Authority
JP
Japan
Prior art keywords
encoding
encoding method
quantization parameter
decoding
unit
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.)
Pending
Application number
JP2014062258A
Other languages
Japanese (ja)
Inventor
中川 聰
Satoshi Nakagawa
聰 中川
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2014062258A priority Critical patent/JP2015186120A/en
Publication of JP2015186120A publication Critical patent/JP2015186120A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce a frequency at which a code amount more than necessity is consumed for making an image close to that including quantization distortion by a first encoding method and to improve encoding efficiency.SOLUTION: An encoding method conversion apparatus for converting an input stream of an image encoded by a first encoding method into a stream of an image encoded by a second encoding method includes: decoding means for decoding the image of the input stream by the first encoding method; encoding means for encoding a decoded image decoded by the decoding means by the second encoding method; and quantization parameter control means for referring to a first quantization parameter obtained by decoding with the decoding means and adjusting a second quantization parameter on encoding by the second encoding method.

Description

本発明は、符号化方式変換装置及びプログラムに関し、特に符号化方式の異なる映像ストリームのトランスコードを行う符号化方式変換装置及びプログラムに適用し得るものである。   The present invention relates to an encoding method conversion apparatus and program, and is particularly applicable to an encoding method conversion apparatus and program for transcoding video streams having different encoding methods.

例えば、MPEG(Moving Picture Experts Group)により規格化されたMPEG−2やH.264/MPEG−4 AVC(Advanced Video Coding:以下、AVCとも呼ぶ。)等に代表される映像符号化方式による映像情報の圧縮符号化処理は、入力された対象画像を分割した処理単位ごとに、動き補償予測等を行った予測画像と、入力された対象画像との差分である予測残差信号に、離散コサイン変換等の空間変換を施した変換係数を量子化して、これをエントロピー符号化することによって高効率の映像圧縮を実現している。   For example, MPEG-2 and H.264 standardized by the Moving Picture Experts Group (MPEG). The compression coding processing of video information by a video coding method represented by H.264 / MPEG-4 AVC (Advanced Video Coding: hereinafter also referred to as AVC) is performed for each processing unit obtained by dividing the input target image. The prediction residual signal, which is the difference between the predicted image subjected to motion compensation prediction and the input target image, is quantized with a transform coefficient obtained by performing spatial transformation such as discrete cosine transformation, and this is entropy-coded. This realizes highly efficient video compression.

近年、更なる高画質化、高圧縮効率化のため、H.265/MPEG−H HEVC(High Efficiency Video Coding:以下、HEVCとも呼ぶ。)が規定されている。   In recent years, in order to achieve higher image quality and higher compression efficiency, H.C. H.265 / MPEG-H HEVC (High Efficiency Video Coding: hereinafter also referred to as HEVC) is defined.

これら種々の映像符号化方式が混在して使用されており、符号化方式の異なる映像ストリームへのトランスコード技術が必要とされている。   These various video encoding methods are used in a mixed manner, and a transcoding technique for video streams with different encoding methods is required.

符号化方式の異なる映像ストリームへの変換の場合、入力となる第1の符号化方式によるストリームをデコードし、復号画像を入力として第2の符号化方式によるエンコードを行う方法が一般に用いられる(図3参照)。   In the case of conversion to a video stream with a different encoding method, a method is generally used in which a stream according to the first encoding method as an input is decoded, and the encoded image is used as an input to perform encoding according to the second encoding method (see FIG. 3).

このようなトランスコードを効率的に行う方法として、例えば特許文献1では、第1の符号化方式によるストリームから得られる動きベクトル情報を利用して第2の符号化方式によるエンコードを行う方法が開示されている。   As a method for efficiently performing such transcoding, for example, Patent Document 1 discloses a method of performing encoding by a second encoding method using motion vector information obtained from a stream by the first encoding method. Has been.

特開2003−309851号公報JP 2003-309851 A

しかしながら、第1の符号化方式による復号画像を入力画像として第2の符号化方式による符号化処理を行う場合、第1の符号化方式による復号画像は量子化による量子化歪みを含んでおり、第1の符号化方式による符号化前の本来の映像から劣化した映像を符号化することとなる。   However, when performing the encoding process according to the second encoding method using the decoded image according to the first encoding method as an input image, the decoded image according to the first encoding method includes quantization distortion due to quantization, The video deteriorated from the original video before encoding by the first encoding method is encoded.

このような場合、第2の符号化方式による符号化の際に、通常の符号化処理のように量子化歪みを小さくするように多くの符号量を使用しても第1の符号化方式による量子化歪みを含んだ画像に近づくだけで必ずしも本来の画像に対する画質を改善しているとは限らなかった。   In such a case, when encoding by the second encoding method, even if a large amount of code is used so as to reduce the quantization distortion as in normal encoding processing, the first encoding method is used. Just approaching an image containing quantization distortion does not necessarily improve the image quality of the original image.

そのため、第1の符号化方式による量子化歪みを含んだ画像に近づけるために必要以上の符号量を浪費することが少なくなり符号化効率を向上させることができる符号化方式変換装置及びプログラムが求められている。   Therefore, there is a need for an encoding method conversion apparatus and program that can reduce the amount of code more than is necessary to approximate an image including quantization distortion by the first encoding method and improve the encoding efficiency. It has been.

本発明は、前記課題を解決するためになされたものであり、次のような構成を備える。   The present invention has been made to solve the above-described problems, and has the following configuration.

第1の本発明は、第1の符号化方式により符号化された画像の入力ストリームを、第2の符号化方式により符号化した画像のストリームに変換する符号化方式変換装置において、(1)入力ストリームの画像を第1の符号化方式で復号する復号手段と、(2)復号手段により復号された復号画像を第2の符号化方式で符号化する符号化手段と、(3)復号手段による復号により得られる第1の量子化パラメータを参照して、第2の符号化方式による符号化に係る第2の量子化パラメータを調整する量子化パラメータ制御手段とを備えることを特徴とする符号化方式変換装置である。   According to a first aspect of the present invention, there is provided an encoding method conversion apparatus for converting an input stream of an image encoded by the first encoding method into an image stream encoded by the second encoding method. Decoding means for decoding the image of the input stream by the first encoding method; (2) encoding means for encoding the decoded image decoded by the decoding means by the second encoding method; and (3) decoding means. And a quantization parameter control means for adjusting a second quantization parameter related to encoding by the second encoding method with reference to the first quantization parameter obtained by decoding by This is a conversion method conversion device.

第2の本発明は、第1の符号化方式により符号化された画像の入力ストリームを、第2の符号化方式により符号化した画像のストリームに変換する符号化方式変換装置において、(1)入力ストリームの画像を第1の符号化方式で復号する復号手段と、(2)復号手段により復号された復号画像を第2の符号化方式で符号化する符号化手段と、(3)符号化手段において用いる、第2の符号化方式による符号化に係る第2の量子化パラメータに基づいて決定されるレート歪最適化処理に係るラグランジュ乗数を、復号手段による復号により得られる第1の量子化パラメータを参照して調整するラグランジュ乗数制御手段とを備えることを特徴とする符号化方式変換装置である。   According to a second aspect of the present invention, there is provided an encoding method conversion apparatus for converting an input stream of an image encoded by the first encoding method into an image stream encoded by the second encoding method. Decoding means for decoding the image of the input stream by the first encoding method; (2) encoding means for encoding the decoded image decoded by the decoding means by the second encoding method; and (3) encoding. The first quantization obtained by decoding the Lagrangian multiplier related to the rate distortion optimization processing determined based on the second quantization parameter relating to the encoding by the second encoding method used in the means A coding method conversion apparatus comprising: a Lagrange multiplier control unit that adjusts with reference to a parameter.

第3の本発明は、第1の符号化方式により符号化された画像の入力ストリームを、第2の符号化方式により符号化した画像のストリームに変換する符号化方式変換プログラムにおいて、コンピュータを、(1)入力ストリームの画像を第1の符号化方式で復号する復号手段、(2)復号手段により復号された復号画像を第2の符号化方式で符号化する符号化手段、(3)復号手段による復号により得られる第1の量子化パラメータを参照して、第2の符号化方式による符号化に係る第2の量子化パラメータを調整する量子化パラメータ制御手段として機能させることを特徴とする符号化方式変換プログラムである。   According to a third aspect of the present invention, there is provided an encoding method conversion program for converting an input stream of an image encoded by the first encoding method into an image stream encoded by the second encoding method. (1) Decoding means for decoding an image of the input stream by the first encoding method, (2) Encoding means for encoding the decoded image decoded by the decoding means by the second encoding method, (3) Decoding The first quantization parameter obtained by the decoding by the means is referred to function as a quantization parameter control means for adjusting the second quantization parameter related to the encoding by the second encoding method. It is an encoding system conversion program.

本発明によれば、第1の符号化方式による量子化歪みを含んだ画像に近づけるために必要以上の符号量を浪費することが少なくなり符号化効率を向上させることができる。   According to the present invention, it is possible to reduce the amount of code that is more than necessary in order to approach an image including quantization distortion by the first encoding method, and to improve encoding efficiency.

第1の実施形態に係る符号化方式変換装置の構成を示すブロック図である。It is a block diagram which shows the structure of the encoding system converter which concerns on 1st Embodiment. 第2の実施形態に係る符号化方式変換装置1Aの構成を示すブロック図である。It is a block diagram which shows the structure of 1 A of encoding system converters which concern on 2nd Embodiment. 従来の符号化方式変換装置の構成を示すブロック図である。It is a block diagram which shows the structure of the conventional encoding system converter.

(A)第1の実施形態
以下では、本発明に係る符号化方式変換装置及びプログラムの第1の実施形態を、図面を参照しながら詳細に説明する。
(A) 1st Embodiment Below, the 1st Embodiment of the encoding system converter and program which concern on this invention are described in detail, referring drawings.

(A−1)第1の実施形態の構成
図1は、第1の実施形態に係る符号化方式変換装置1の構成を示すブロック図である。第1の実施形態に係る符号化方式変換装置1は、各部を搭載した専用ICチップ等のハードウェア的に構成しても良いし、又は、CPUが実行するプログラムを中心としてソフトウェア的に構成して良いが、機能的には、図1で表すことができる。
(A-1) Configuration of First Embodiment FIG. 1 is a block diagram showing a configuration of a coding method conversion apparatus 1 according to the first embodiment. The encoding method conversion apparatus 1 according to the first embodiment may be configured as hardware such as a dedicated IC chip mounted with each unit, or configured as software centered on a program executed by the CPU. Functionally, it can be represented functionally in FIG.

図1において、第1の実施形態に係る符号化方式変換装置1は、デコード部11、エンコード部12、量子化パラメータ制御部111を有する。   In FIG. 1, the coding method conversion apparatus 1 according to the first embodiment includes a decoding unit 11, an encoding unit 12, and a quantization parameter control unit 111.

符号化方式変換装置1は、第1の符号化方式で符号化された入力ストリームを第1の符号化方式で復号し、その復号で得られた復号画像を、第2の符号化方式で符号化することで、符号化方式を変換した画像を出力ストリームとして出力するものである。   The encoding method conversion apparatus 1 decodes an input stream encoded by the first encoding method using the first encoding method, and encodes a decoded image obtained by the decoding using the second encoding method. In this way, an image obtained by converting the encoding method is output as an output stream.

ここで、第1の符号化方式及び第2の符号化方式は、種々の映像符号化方式とすることができ、例えば、MPEG−2、H.264/MPEG−4 AVC、H.265/MPEG−H HEVC等のいずれかを適用することができる。なお、第1の符号化方式と第2の符号化方式は、異なる種類の符号化方式であっても良いし、又は、同じ種類の符号化方式であっても良い。   Here, the first encoding method and the second encoding method can be various video encoding methods, for example, MPEG-2, H.264, and the like. H.264 / MPEG-4 AVC, H.264. Any one of H.265 / MPEG-H HEVC and the like can be applied. Note that the first encoding method and the second encoding method may be different types of encoding methods or the same type of encoding method.

デコード部11は、第1の符号化方式で符号化された入力ストリームを第1の符号化方式でエントロピー復号して復号画像を生成し、その復号画像をエンコード部12に与えるものである。また、デコード部11は、エントロピー復号により得られた符号化単位の量子化パラメータを、量子化パラメータ制御部111に与えるものである。   The decoding unit 11 entropy-decodes the input stream encoded by the first encoding method using the first encoding method, generates a decoded image, and gives the decoded image to the encoding unit 12. The decoding unit 11 gives the quantization parameter of the coding unit obtained by entropy decoding to the quantization parameter control unit 111.

図1に示すように、デコード部11は、エントロピー復号部101、逆量子化部102、逆変換部103、予測画像生成部104、加算部112を有する。   As illustrated in FIG. 1, the decoding unit 11 includes an entropy decoding unit 101, an inverse quantization unit 102, an inverse transformation unit 103, a predicted image generation unit 104, and an addition unit 112.

エントロピー復号部101は、入力された入力ストリームをエントロピー復号して、符号化処理単位毎の変換係数、符号化モード情報、動きベクトル情報等を獲得する。また、エントロピー復号部101は、復号により得た、量子化パラメータを逆量子化部102に与える。   The entropy decoding unit 101 performs entropy decoding on the input stream that is input, and obtains transform coefficients, encoding mode information, motion vector information, and the like for each encoding processing unit. Also, the entropy decoding unit 101 gives the quantization parameter obtained by decoding to the inverse quantization unit 102.

ここで、入力ストリームの符号化方式(第1の符号化方式)がMPEG−2の場合、エントロピー復号部101はハフマン符号化方式等を適用できる。この場合、エントロピー復号部101は、8×8離散コサイン変換の変換係数、16×16ブロック又は8×8ブロックのインター予測情報等を獲得する。   Here, when the encoding method (first encoding method) of the input stream is MPEG-2, the entropy decoding unit 101 can apply a Huffman encoding method or the like. In this case, the entropy decoding unit 101 obtains transform coefficients of 8 × 8 discrete cosine transform, 16 × 16 block or 8 × 8 block inter prediction information, and the like.

また、入力ストリームの符号化方式がAVCの場合、エントロピー復号部101はコンテキスト適応可変長符号化方式(CAVLC)やコンテキスト適応算術符号化方式(CABAC)等を適用でき、エントロピー復号部101は、4×4又は8×8の2通りのいずれかのブロックサイズの整数係数、4×4ブロックで9種類・8×8ブロックで9種類・16×16ブロックで4種類のいずれかのモードで予測したイントラ予測情報、16×16を7種類のいずれかのモードで動きを予測したインター予測情報等を獲得する。   When the encoding method of the input stream is AVC, the entropy decoding unit 101 can apply a context adaptive variable length coding method (CAVLC), a context adaptive arithmetic coding method (CABAC), or the like. Integer coefficient of either block size of x4 or 8x8, predicted in 9 modes with 4x4 blocks, 9 types with 8x8 blocks, and 4 types with 16x16 blocks Intra prediction information, inter prediction information in which motion is predicted in any of seven types of 16 × 16 modes, and the like are acquired.

さらに、入力ストリームの符号化方式がHEVCの場合、エントロピー復号部101はコンテキスト適用算術符号化方式(CABAC)等を適用でき、エントロピー復号部101は、4×4〜32×32のいずれかのブロックサイズの整数係数、4×4〜64×64ブロックの35種類のいずれかのモードで予測したイントラ予測情報、8×4/4×8〜64×64のいずれかで動きを予測したインター予測情報等を獲得する。   Furthermore, when the encoding method of the input stream is HEVC, the entropy decoding unit 101 can apply a context-applied arithmetic coding method (CABAC) or the like, and the entropy decoding unit 101 can select any block of 4 × 4 to 32 × 32 Integer coefficient of size, intra prediction information predicted in any one of 35 modes of 4 × 4 to 64 × 64 blocks, and inter prediction information predicted motion in any of 8 × 4/4 × 8 to 64 × 64 Etc.

エントロピー復号部101は、符号化処理単位毎の量子化パラメータを第1の量子化パラメータとして量子化パラメータ制御部111に供給する。   The entropy decoding unit 101 supplies the quantization parameter for each encoding processing unit to the quantization parameter control unit 111 as the first quantization parameter.

ここで、量子化パラメータについて簡単に説明する。例えば、第1の符号化方式がMEPG−2の場合、画像を符号化する符号化器では、映像を構成する画像を所定の符号化処理単位で、符号化処理を行う。このとき、符号化器は、入力された画像と、動き補償予測等の処理により得られた予測画像との差分を算出して、生成した予測残差信号に離散コサイン等の空間変換を行い、その空間変換により変換係数の組が得られる。符号化器では、符号化すべき情報量を削減するために、上記変換係数を量子化する。量子化とは、所定の量子化ステップで変換係数をスケーリングした後、スケーリング後の変換係数を所定のレベル値(整数値)に離散化することをいい、この量子化ステップを決定する指標を量子化パラメータという。   Here, the quantization parameter will be briefly described. For example, when the first encoding method is MPEG-2, an encoder that encodes an image performs an encoding process on an image constituting an image in a predetermined encoding process unit. At this time, the encoder calculates a difference between the input image and a predicted image obtained by processing such as motion compensation prediction, and performs spatial transformation such as discrete cosine on the generated prediction residual signal, A set of transform coefficients is obtained by the spatial transform. The encoder quantizes the transform coefficient in order to reduce the amount of information to be encoded. Quantization means to scale a transform coefficient at a predetermined quantization step and then discretize the scaled transform coefficient to a predetermined level value (integer value). An index for determining this quantization step is quantized. This is called a parameter.

量子化パラメータは、MPEG−2等の場合、量子化ステップサイズを表しており、AVCやHEVCの場合、量子化ステップサイズの対数に比例する値を示す。   The quantization parameter represents the quantization step size in the case of MPEG-2 or the like, and indicates a value proportional to the logarithm of the quantization step size in the case of AVC or HEVC.

エントロピー復号部101は、エントロピー復号により得られた符号化処理単位毎の量子化パラメータを抽出し、その符号化処理単位の量子化パラメータを第1の量子化パラメータとして量子化パラメータ制御部111に供給する。   The entropy decoding unit 101 extracts a quantization parameter for each coding processing unit obtained by entropy decoding, and supplies the quantization parameter for the coding processing unit to the quantization parameter control unit 111 as a first quantization parameter. To do.

逆量子化部102は、エントロピー復号部101により復号された変換係数を、量子化パラメータに従って逆量子化するものである。   The inverse quantization unit 102 inversely quantizes the transform coefficient decoded by the entropy decoding unit 101 according to a quantization parameter.

逆変換部103は、逆量子化された変換係数を逆変換(逆離散コサイン変換等)して、残差画像を生成するものである。   The inverse transform unit 103 performs inverse transform (such as inverse discrete cosine transform) on the inversely quantized transform coefficient to generate a residual image.

予測画像生成部104は、逆変換部103により逆変換された残差画像と、動き補償やイントラ予測等を行って予測画像を生成するものである。   The prediction image generation unit 104 generates a prediction image by performing motion compensation, intra prediction, and the like on the residual image inversely converted by the inverse conversion unit 103.

加算部112は、予測画像生成部104で予測画像と、逆変換部103からの残差画像とを加算して、復号画像を生成するものである。加算部112は、生成した復号画像をエンコード部12に出力する。   The addition unit 112 adds the predicted image and the residual image from the inverse transform unit 103 in the predicted image generation unit 104 to generate a decoded image. The adding unit 112 outputs the generated decoded image to the encoding unit 12.

エンコード部12は、デコード部11により復号された復号画像を、第2の符号化方式で符号化した符号化画像を出力ストリームとして出力するものである。   The encoding unit 12 outputs an encoded image obtained by encoding the decoded image decoded by the decoding unit 11 using the second encoding method as an output stream.

図1において、エンコード部12は、変換部105、量子化部106、エントロピー符号化部107、逆量子化部108、逆変換部109、予測画像生成部110、減算部113、加算部114を有する。   In FIG. 1, the encoding unit 12 includes a conversion unit 105, a quantization unit 106, an entropy encoding unit 107, an inverse quantization unit 108, an inverse conversion unit 109, a predicted image generation unit 110, a subtraction unit 113, and an addition unit 114. .

減算部113は、符号化処理単位毎に、予測画像生成部110で動き補償予測やイントラ予測を行って生成した予測画像と、入力された復号画像との差分である予測残差信号を求めるものである。   The subtraction unit 113 obtains a prediction residual signal that is a difference between a prediction image generated by performing motion compensation prediction or intra prediction in the prediction image generation unit 110 and an input decoded image for each encoding processing unit. It is.

変換部105は、減算部113からの映像情報を例えば離散コサイン等の空間変換を施すものである。   The conversion unit 105 performs spatial conversion such as discrete cosine on the video information from the subtraction unit 113.

量子化部106は、変換部105による空間変換により得られた変換係数等を、量子化パラメータ制御部111により制御された第2の量子化パラメータに従って量子化するものである。量子化部106は、量子化した変数係数を、エントロピー符号化部107及び逆量子化部108に与える。   The quantization unit 106 quantizes the transform coefficient obtained by the spatial transform by the transform unit 105 according to the second quantization parameter controlled by the quantization parameter control unit 111. The quantization unit 106 provides the quantized variable coefficient to the entropy encoding unit 107 and the inverse quantization unit 108.

逆量子化部108は、量子化部106からの量子化された変数係数を、第2の量子化パラメータに従って逆量子化するものである。   The inverse quantization unit 108 performs inverse quantization on the quantized variable coefficient from the quantization unit 106 in accordance with the second quantization parameter.

逆変換部109は、逆量子化部108により逆量子化された変換係数を逆変換(逆離散コサイン変換等)して、残差画像を生成するものである。   The inverse transform unit 109 performs inverse transform (such as inverse discrete cosine transform) on the transform coefficient inversely quantized by the inverse quantization unit 108 to generate a residual image.

予測画像生成部110は、動き補償予測やイントラ予測等を行って予測画像を生成するものである。予測画像生成部110は、生成した予測画像を減算部113及び加算部114に与える。   The predicted image generation unit 110 generates a predicted image by performing motion compensation prediction, intra prediction, or the like. The predicted image generation unit 110 gives the generated predicted image to the subtraction unit 113 and the addition unit 114.

加算部114は、予測画像生成部110で生成された予測画像と、逆変換部103からの残差画像とを加算して、出力ストリームを第2の符号化方式の復号器で復号した場合に得られる復号画像を生成するものである。この生成された復号画像は、符号化処理の参照画像として予測画像生成部110に与えられる。   The addition unit 114 adds the prediction image generated by the prediction image generation unit 110 and the residual image from the inverse conversion unit 103, and decodes the output stream by the decoder of the second encoding method. The obtained decoded image is generated. The generated decoded image is given to the predicted image generation unit 110 as a reference image for the encoding process.

エントロピー符号化部107は、量子化部106からの量子化された変換係数を、所定のエントロピー符号化方式で符号化を行い、予測画像生成部110が用いた動きベクトル情報や予測モード情報と共に出力ストリームとして出力するものである。   The entropy encoding unit 107 encodes the quantized transform coefficient from the quantization unit 106 using a predetermined entropy encoding method, and outputs it together with the motion vector information and prediction mode information used by the prediction image generation unit 110. Output as a stream.

なお、所定のエントロピー符号化方式は、第2の符号化方式がMPEG−2の場合、ハフマン符号化方式等を適用できる。また、第2の符号化方式がAVCの場合、コンテキスト適応可変長符号化方式(CAVLC)やコンテキスト適応算術符号化方式(CABAC)等を適用できる。さらに、第2の符号化方式がHEVCの場合、コンテキスト適用算術符号化方式(CABAC)等を適用できる。   As the predetermined entropy encoding method, when the second encoding method is MPEG-2, a Huffman encoding method or the like can be applied. In addition, when the second encoding scheme is AVC, a context adaptive variable length encoding scheme (CAVLC), a context adaptive arithmetic encoding scheme (CABAC), or the like can be applied. Furthermore, when the second encoding scheme is HEVC, a context-applied arithmetic encoding scheme (CABAC) or the like can be applied.

量子化パラメータ制御部111は、エントロピー復号部101から第1の量子化パラメータと、エンコード部12が施す第2の符号化方式に係る第2の量子化パラメータとを取得し、第1の量子化パラメータを参照して、第2の量子化パラメータの値が必要以上に小さくならないように制御するものである。   The quantization parameter control unit 111 acquires the first quantization parameter from the entropy decoding unit 101 and the second quantization parameter related to the second encoding method applied by the encoding unit 12, and performs the first quantization. With reference to the parameter, control is performed so that the value of the second quantization parameter does not become smaller than necessary.

ここで、第2の量子化パラメータは、符号化方式の変換先である第2の符号化方式で用いられるものであり、例えば出力ストリームのビットレートを制御するレート制御部等から供給できるようにしても良い。   Here, the second quantization parameter is used in the second encoding method that is the conversion destination of the encoding method, and can be supplied from, for example, a rate control unit that controls the bit rate of the output stream. May be.

(A−2)第1の実施形態の動作
次に、第1の実施形態に係る符号化方式変換装置1における動作を、図1を参照しながら詳細に説明する。
(A-2) Operation of the First Embodiment Next, the operation of the coding method conversion apparatus 1 according to the first embodiment will be described in detail with reference to FIG.

まず、図1において、第1の符号化方式により符号化されたストリームがデコード部11に入力する。デコード部11では、エントロピー復号部101が入力ストリームに対してエントロピー復号を行い、例えば離散コサイン変換等の変換係数、符号化モード情報、動きベクトル情報等が獲得される。   First, in FIG. 1, a stream encoded by the first encoding method is input to the decoding unit 11. In the decoding unit 11, the entropy decoding unit 101 performs entropy decoding on the input stream, and for example, transform coefficients such as discrete cosine transform, encoding mode information, motion vector information, and the like are acquired.

エントロピー復号部101により得られた変換係数は、逆量子化部102・逆変換部103により逆量子化・逆変換され、予測画像生成部104により動き補償やイントラ予測等が行なわれて生成された予測画像と加算されて、復号画像が求められる。   The transform coefficient obtained by the entropy decoding unit 101 is generated by performing inverse quantization / inverse transform by the inverse quantization unit 102 / inverse transform unit 103 and performing motion compensation or intra prediction by the predicted image generation unit 104. The decoded image is obtained by adding the predicted image.

加算部112で得られた復号画像は、第2の符号化方式による符号化対象画像として、エンコード部12に供給されると共に、後続する入力ストリームの復号処理の参照画像として予測画像生成部104に供給される。   The decoded image obtained by the adding unit 112 is supplied to the encoding unit 12 as an image to be encoded by the second encoding method, and is also supplied to the predicted image generation unit 104 as a reference image for subsequent input stream decoding processing. Supplied.

デコード部11において、エントロピー復号部101では逆量子化部102で用いる量子化パラメータが復号され、この符号化処理単位毎の量子化パラメータが第1の量子化パラメータとして量子化パラメータ制御部111に供給される。   In the decoding unit 11, the entropy decoding unit 101 decodes the quantization parameter used in the inverse quantization unit 102, and the quantization parameter for each encoding processing unit is supplied to the quantization parameter control unit 111 as the first quantization parameter. Is done.

量子化パラメータ制御部111では、第2の符号化方式による符号化のために、例えば図示しないレート制御部等から第2の量子化パラメータが設定される。   In the quantization parameter control unit 111, for example, a second quantization parameter is set from a rate control unit (not shown) or the like for encoding by the second encoding method.

ここで、エントロピー復号部101から得られる第1の量子化パラメータは復号画像がどの程度の量子化誤差を含んでいるかの指標となり、第2の量子化パラメータを必要以上に小さくしても量子化誤差を含んだ復号画像をより忠実に再現する方向に働くだけで、必ずしも第1の符号化方式による符号化前の本来の映像に近づくとは限らない。   Here, the first quantization parameter obtained from the entropy decoding unit 101 serves as an index of how much quantization error the decoded image contains. Even if the second quantization parameter is made smaller than necessary, quantization is performed. It only works in a direction to reproduce a decoded image including an error more faithfully, and does not necessarily approach an original video before encoding by the first encoding method.

つまり、第2の符号化方式での符号化の際、符号量を削減するために量子化がなされる。量子化パラメータの値を小さくすると、復号画像の歪みは小さくなるが、符号量は多くなる。逆に、量子化パラメータの値を大きくすると、復号画像の歪みは大きくなるが、符号量を少なくすることができる。従って、復号画像の画像品質を向上させるためには、量子化パラメータの値を小さくすることがなされる。しかし、必要以上に第2の量子化パラメータの値を小さくすぎても本来の映像に近づくことはなく、その一方で符号量が多くなるため、符号化効率が低下するとともに符号化方式変換に係る処理負荷が大きくなる。   That is, quantization is performed in order to reduce the amount of code when encoding with the second encoding method. When the quantization parameter value is decreased, the distortion of the decoded image is decreased, but the code amount is increased. Conversely, when the quantization parameter value is increased, the distortion of the decoded image increases, but the code amount can be reduced. Therefore, in order to improve the image quality of the decoded image, the value of the quantization parameter is reduced. However, if the value of the second quantization parameter is too small as necessary, it does not approach the original video, and on the other hand, the amount of code increases, resulting in a decrease in coding efficiency and a change in coding method conversion. Processing load increases.

そこで、量子化パラメータ制御部111は、第1の量子化パラメータを参照して、第2の量子化パラメータに対して、値が大きくならないように制限をかける制御を行う。   Therefore, the quantization parameter control unit 111 refers to the first quantization parameter and performs control to limit the second quantization parameter so that the value does not increase.

例えば、量子化パラメータ制御部111は、単純に第1の量子化パラメータが下限値となるように又は下限値に近くなるように、第2の量子化パラメータの値を制限するようにしても良い。これにより、第1の符号化方式で復号した復号画像と同等の画像品質としながら、第2の符号化方式での符号量を減らすことができる。   For example, the quantization parameter control unit 111 may simply limit the value of the second quantization parameter so that the first quantization parameter becomes the lower limit value or near the lower limit value. . As a result, it is possible to reduce the amount of code in the second encoding scheme while maintaining the same image quality as the decoded image decoded in the first encoding scheme.

また例えば、量子化パラメータ制御部111は、第1の量子化パラメータの値の大きさに応じて、所定の関数式を用いて、第2の量子化パラメータの値が第1の量子化パラメータの値に近づくように補正する等しても良い。   Further, for example, the quantization parameter control unit 111 uses a predetermined function equation according to the magnitude of the value of the first quantization parameter, and the value of the second quantization parameter is the first quantization parameter. You may correct | amend so that it may approach a value.

なお、上述したように、量子化パラメータは、符号化方式がMPEG−2等の場合、量子化ステップサイズであり、符号化方式がAVCやHEVCの場合、量子化ステップサイズに比例する値であり、量子化パラメータの種類は異なる。そこで、量子化パラメータ制御部111は、第1の量子化パラメータと第2の量子化パラメータとが同じ種類のパラメータとなるように変換処理を行う。   As described above, the quantization parameter is the quantization step size when the encoding method is MPEG-2 or the like, and is a value proportional to the quantization step size when the encoding method is AVC or HEVC. The types of quantization parameters are different. Therefore, the quantization parameter control unit 111 performs conversion processing so that the first quantization parameter and the second quantization parameter are the same type of parameters.

例えば、第1の符号化方式がMPEG−2であり、第2の符号化方式がHEVCである場合、量子化パラメータ制御部111は、第1の量子化パラメータである量子化ステップサイズを、量子化ステップサイズの対数に比例する値に変換するようにしても良い。逆に、第1の符号化方式がAVCであり、第2の符号化方式がMPEG−2である場合、量子化パラメータ制御部111は、第1の量子化パラメータである量子化ステップサイズの対数を、量子化ステップサイズに変換するようにしても良い。これにより、第1の量子化パラメータと第2の量子化パラメータとが同じ種類のパラメータにすることができる。   For example, when the first encoding method is MPEG-2 and the second encoding method is HEVC, the quantization parameter control unit 111 sets the quantization step size, which is the first quantization parameter, to the quantization step size. It may be converted to a value proportional to the logarithm of the conversion step size. Conversely, when the first encoding method is AVC and the second encoding method is MPEG-2, the quantization parameter control unit 111 calculates the logarithm of the quantization step size that is the first quantization parameter. May be converted into a quantization step size. As a result, the first quantization parameter and the second quantization parameter can be the same type of parameter.

また、第1の符号化方式と第2の符号化方式とでブロックサイズが異なる場合、量子化パラメータ制御部111は、ブロックサイズの変換処理を行うようにしても良い。これにより、変換後のブロックサイズにおいて対応する位置の量子化パラメータの値を求めることができる。   Further, when the block size is different between the first encoding method and the second encoding method, the quantization parameter control unit 111 may perform block size conversion processing. Thereby, the value of the quantization parameter at the corresponding position in the converted block size can be obtained.

エンコード部12では、デコード部11からの復号画像が符号化対象画像として入力される。   In the encoding unit 12, the decoded image from the decoding unit 11 is input as an encoding target image.

エンコード部12では、減算部113が、入力された復号画像を処理単位ごとに、予測画像生成部110で動き補償予測やイントラ予測を行って生成した予測画像と、入力された復号画像との差分である予測残差信号を求める。   In the encoding unit 12, the subtraction unit 113 performs the difference between the prediction image generated by performing the motion compensation prediction or the intra prediction on the prediction image generation unit 110 and the input decoded image for each processing unit. A prediction residual signal is obtained.

減算部113からの予測残差信号は、変換部105により、例えば離散コサイン変換等の空間変換がなされ、空間変換により変換係数の組が得られる。   The prediction residual signal from the subtraction unit 113 is subjected to spatial transformation such as discrete cosine transformation by the transformation unit 105, and a set of transformation coefficients is obtained by the spatial transformation.

量子化部106では、量子化パラメータ制御部111により制御された符号化処理単位毎の第2の量子化パラメータに従って、変換係数が量子化される。   In the quantization unit 106, the transform coefficient is quantized according to the second quantization parameter for each encoding processing unit controlled by the quantization parameter control unit 111.

量子化された変換係数は、エントロピー符号化部107により例えば可変長符号や算術符号を用いた所定のエントロピー符号化がなされる。そのエントロピー符号化された情報は、予測画像生成部110で用いられた動きベクトル情報や予測モード情報と共に、出力ストリームとして出力される。   The quantized transform coefficient is subjected to predetermined entropy coding using, for example, a variable length code or an arithmetic code by the entropy coding unit 107. The entropy-encoded information is output as an output stream together with the motion vector information and the prediction mode information used in the predicted image generation unit 110.

また、量子化部106により量子化された変換係数は、逆量子化部108、逆変換部109で逆量子化・逆変換される。逆変換された変換係数は、加算部114により、予測画像生成部110からの予測画像と加算される。これにより、出力ストリームを第2の符号化方式の復号器で復号した場合に得られる復号画像が生成される。また、加算部114からの出力される画像は、後続の画像の符号化処理の参照画像として予測画像生成部110に供給する。   The transform coefficient quantized by the quantization unit 106 is inversely quantized and inversely transformed by the inverse quantization unit 108 and the inverse transform unit 109. The inversely transformed transform coefficient is added to the predicted image from the predicted image generation unit 110 by the adding unit 114. Thereby, a decoded image obtained when the output stream is decoded by the decoder of the second encoding method is generated. Further, the image output from the adding unit 114 is supplied to the predicted image generation unit 110 as a reference image for the subsequent image encoding process.

以上の処理によって、第1の符号化方式によるストリームを第2の符号化方式によるストリームに変換することができる。   Through the above processing, a stream according to the first encoding method can be converted into a stream according to the second encoding method.

(A−3)第1の実施形態の効果
以上のように、第1の実施形態によれば、以下のような効果が得られる。
(A-3) Effects of First Embodiment As described above, according to the first embodiment, the following effects can be obtained.

第1の符号化方式による量子化歪みを含んだ画像に近づけるために必要以上の符号量を浪費することが少なくなり符号化効率を向上させることができる。   It is possible to improve the coding efficiency because less code amount is wasted than necessary in order to approach an image including quantization distortion by the first coding method.

(B)第2の実施形態
次に、本発明に係る符号化方式変換装置及びプログラムの第2の実施形態を、図面を参照しながら詳細に説明する。
(B) Second Embodiment Next, a second embodiment of the encoding method conversion apparatus and program according to the present invention will be described in detail with reference to the drawings.

(B−1)第2の実施形態の構成
第1の実施形態では、第2の符号化方式による符号化処理に用いる第2の量子化パラメータに対する制御を行う量子化パラメータ制御部を設けたのに対し、第2の実施形態では、第2の符号化方式による符号化処理で使用される、レート歪最適化処理のためのラグランジュ乗数に対して制御を行う点で異なる。
(B-1) Configuration of the Second Embodiment In the first embodiment, the quantization parameter control unit that controls the second quantization parameter used for the encoding process by the second encoding method is provided. On the other hand, the second embodiment is different in that control is performed on a Lagrangian multiplier for rate distortion optimization processing, which is used in encoding processing by the second encoding scheme.

図2は、第2の実施形態に係る符号化方式変換装置1Aの構成を示すブロック図である。第2の実施形態に係る符号化方式変換装置1Aは、各部を搭載した専用ICチップ等のハードウェア的に構成しても良いし、又は、CPUが実行するプログラムを中心としてソフトウェア的に構成して良いが、機能的には、図2で表すことができる。   FIG. 2 is a block diagram illustrating a configuration of an encoding scheme conversion apparatus 1A according to the second embodiment. The encoding method conversion apparatus 1A according to the second embodiment may be configured as hardware such as a dedicated IC chip mounted with each unit, or configured as software centered on a program executed by the CPU. However, functionally, it can be represented in FIG.

図2において、第2の実施形態に係る符号化方式変換装置1Aは、デコード部11、エンコード部22、ラグランジュ乗数制御部211を有する。   In FIG. 2, the coding method conversion apparatus 1A according to the second embodiment includes a decoding unit 11, an encoding unit 22, and a Lagrange multiplier control unit 211.

デコード部11は、第1の実施形態と同様に、エントロピー復号部101、逆量子化部102、逆変換部103、予測画像生成部104、加算部112を有する。デコード部11は、第1の実施形態と同一又は対応するものであるため、ここでの詳細な説明は省略する。   Similar to the first embodiment, the decoding unit 11 includes an entropy decoding unit 101, an inverse quantization unit 102, an inverse transform unit 103, a predicted image generation unit 104, and an addition unit 112. Since the decoding unit 11 is the same as or corresponds to the first embodiment, a detailed description thereof is omitted here.

ラグランジュ乗数制御部211は、デコード部11のエントロピー復号部101から第1の量子化パラメータと、エンコード部12が施す第2の符号化方式に係る第2の量子化パラメータとを取得し、第1の量子化パラメータを参照して、第2の量子化パラメータに基づいて決定されるレート歪み最適化処理のためのラグランジュ乗数を、必要以上に小さな値とならないように制御するものである。   The Lagrange multiplier control unit 211 acquires the first quantization parameter from the entropy decoding unit 101 of the decoding unit 11 and the second quantization parameter related to the second encoding method applied by the encoding unit 12, and first The Lagrangian multiplier for the rate distortion optimization process determined based on the second quantization parameter is controlled so as not to become a value smaller than necessary.

エンコード部22は、変換部105、量子化部206、エントロピー符号化部107、逆量子化部108、逆変換部109、予測画像生成部210、減算部113、加算部114を有する。なお、エンコード部22における、量子化部206及び予測画像生成部210以外の構成要素は、第1の実施形態と同一又は対応する構成要素であるため、図2では図1と同一の符号を付している。   The encoding unit 22 includes a conversion unit 105, a quantization unit 206, an entropy encoding unit 107, an inverse quantization unit 108, an inverse conversion unit 109, a predicted image generation unit 210, a subtraction unit 113, and an addition unit 114. Note that the components other than the quantization unit 206 and the predicted image generation unit 210 in the encoding unit 22 are the same as or correspond to those in the first embodiment, and therefore the same reference numerals as those in FIG. doing.

予測画像生成部210は、第1の実施形態と同様に、動き補償予測やイントラ予測等を行って予測画像を生成するものである。また、予測画像生成部210は、ラグランジュ乗数制御部211で算出されたラグランジュ乗数λを用いて、動き補償に用いる動きベクトルの探索や、予測モードの選択を行う。   The predicted image generation unit 210 generates a predicted image by performing motion compensation prediction, intra prediction, or the like, as in the first embodiment. Also, the predicted image generation unit 210 searches for a motion vector used for motion compensation and selects a prediction mode using the Lagrange multiplier λ calculated by the Lagrange multiplier control unit 211.

量子化部206は、ラグランジュ乗数制御部211により算出されたラグランジュ乗数λを用いたレート歪最適化処理により、変換部105により変換された変換係数を量子化するものである。   The quantization unit 206 quantizes the transform coefficient transformed by the transform unit 105 by rate distortion optimization processing using the Lagrange multiplier λ calculated by the Lagrange multiplier control unit 211.

(B−2)第2の実施形態の動作
次に、第2の実施形態に係る符号方式変換装置1Aにおける動作を、図2を参照しながら詳細に説明する。
(B-2) Operation of Second Embodiment Next, the operation of the coding method conversion apparatus 1A according to the second embodiment will be described in detail with reference to FIG.

第1の符号化方式により符号化されたストリームがデコード部11に入力する。デコード部11では、第1の実施形態と同様に、エントロピー復号部101が入力ストリームに対してエントロピー復号を行い、例えば離散コサイン変換等の変換係数、符号化モード情報、動きベクトル情報等が獲得される。   A stream encoded by the first encoding method is input to the decoding unit 11. In the decoding unit 11, as in the first embodiment, the entropy decoding unit 101 performs entropy decoding on the input stream, and for example, transform coefficients such as discrete cosine transform, coding mode information, motion vector information, and the like are acquired. The

エントロピー復号部101により得られた変換係数は、逆量子化部102・逆変換部103により逆量子化・逆変換され、予測画像生成部104により動き補償やイントラ予測等が行なわれて生成された予測画像と加算されて、復号画像が求められる。なお、デコード部11における復号画像を獲得する動作は、第1の実施形態と同様にして求めることができる。   The transform coefficient obtained by the entropy decoding unit 101 is generated by performing inverse quantization / inverse transform by the inverse quantization unit 102 / inverse transform unit 103 and performing motion compensation or intra prediction by the predicted image generation unit 104. The decoded image is obtained by adding the predicted image. In addition, the operation | movement which acquires the decoding image in the decoding part 11 can be calculated | required similarly to 1st Embodiment.

エントロピー復号部101では逆量子化部102で用いる量子化パラメータが復号され、この符号化処理単位毎の量子化パラメータが第1の量子化パラメータとしてラグランジュ乗数制御部211に供給される。   The entropy decoding unit 101 decodes the quantization parameter used by the inverse quantization unit 102 and supplies the quantization parameter for each encoding processing unit to the Lagrange multiplier control unit 211 as the first quantization parameter.

ラグランジュ乗数制御部211では、エントロピー復号部101から第1の量子化パラメータを参照して、入力される第2の符号化方式に係る第2の量子化パラメータに基づいて決定されるレート歪み最適化処理のためのラグランジュ乗数を、必要以上に小さな値とならないように制御する。   The Lagrange multiplier control unit 211 refers to the first quantization parameter from the entropy decoding unit 101, and is rate distortion optimized that is determined based on the second quantization parameter according to the second encoding method that is input. The Lagrange multiplier for processing is controlled so as not to be a value smaller than necessary.

ここで、HEVC等の符号化方式においては、予測モードや動き補償のための動きベクトルなど、複数の符号化候補から選択が可能であり、符号化候補選択を最適に行うことは符号化効率に大きな影響を与える。このような符号化候補の選択等に利用する技術としてレート歪最適化技術がある。   Here, in an encoding method such as HEVC, it is possible to select from a plurality of encoding candidates such as a prediction mode and a motion vector for motion compensation. Optimizing the encoding candidate selection improves encoding efficiency. It has a big impact. There is a rate distortion optimization technique as a technique used for selection of such encoding candidates.

レート歪最適化技術は、複数の符号化モード等の選択肢について、その選択肢を選択した場合の入力画像に対する歪Dと、その選択肢で符号化したときに発生する符号量Rと、ラグランジュ乗数入で表されるRDコストJ(J=D+λR)を最小化するような選択をすることによって、レートと歪のトレードオフが最適となるような符号化をする方法である。   In the rate distortion optimization technique, for a plurality of options such as encoding modes, a distortion D with respect to an input image when the option is selected, a code amount R generated when the option is encoded, and a Lagrange multiplier are included. In this method, encoding is performed so that the trade-off between rate and distortion is optimal by making a selection so as to minimize the expressed RD cost J (J = D + λR).

ラグランジュ乗数λは、通常量子化パラメータに依存する関数として算出され、歪Dとして2乗ノルムを用いる場合は量子化ステップの2乗に比例するような値、歪Dとして絶対値ノルムを用いる場合は量子化ステップに比例するような値として算出される。   The Lagrangian multiplier λ is usually calculated as a function depending on the quantization parameter. When the square norm is used as the distortion D, a value that is proportional to the square of the quantization step, and when the absolute value norm is used as the distortion D, It is calculated as a value proportional to the quantization step.

HEVC等では量子化パラメータが量子化ステップの対数を表すような値であるため、指数関数的な関数によりラグランジュ乗数λが算出される。したがって、例えば、量子化パラメータが小さくなるにしたがって、ラグランジュ乗数λは小さな値となり、符号量Rを小さくするよりも歪Dを小さくするような候補を優先するように働く。   In HEVC and the like, since the quantization parameter is a value representing the logarithm of the quantization step, the Lagrange multiplier λ is calculated by an exponential function. Therefore, for example, as the quantization parameter becomes smaller, the Lagrangian multiplier λ becomes a smaller value, and works to prioritize candidates that make the distortion D smaller than making the code amount R smaller.

しかしながら、第1の符号化方式により符号化されたストリームの復号画像を符号化対象画像とする符号化変換処理では、量子化誤差を含んだ復号画像に対する符号化効率を最適化しても、必ずしも第1の符号化方式による符号化前の本来の映像に対する符号化効率が最適であるとは限らない。これは、レート歪最適化処理において、量子化誤差を含んだ復号画像に対する歪DでRDコストJを評価しているためである。   However, in the encoding conversion process in which the decoded image of the stream encoded by the first encoding method is the encoding target image, even if the encoding efficiency for the decoded image including the quantization error is optimized, the first is not necessarily performed. The encoding efficiency for the original video before encoding by the encoding scheme 1 is not always optimal. This is because, in the rate distortion optimization process, the RD cost J is evaluated by the distortion D with respect to the decoded image including the quantization error.

そこで、第2の実施形態では、デコード部11による復号処理の過程で得られる第1の量子化パラメータをエントロピー復号部101が抽出して、エントロピー復号部101が第1の量子化パラメータをラグランジュ乗数制御部211に供給し、エンコード部22において復号画像に含まれる量子化誤差を考慮したレート歪最適化を行うように、ラグランジュ乗数制御部211がラグランジュ乗数λを制御する。   Therefore, in the second embodiment, the entropy decoding unit 101 extracts the first quantization parameter obtained in the decoding process by the decoding unit 11, and the entropy decoding unit 101 converts the first quantization parameter into the Lagrange multiplier. The Lagrange multiplier control unit 211 controls the Lagrange multiplier λ so as to perform rate distortion optimization considering the quantization error included in the decoded image in the encoding unit 22.

ここで、ラグランジュ乗数制御部211では、例えば、ラグランジュ乗数λの算出に用いる第2の量子化パラメータが第1の量子化パラメータよりも小さい場合は第1の量子化パラメータを用いてラグランジュ乗数λを算出する。あるいは、第1の量子化パラメータの値から所定のオフセット分だけ小さな値より、第2の量子化パラメータが小さな場合は、ラグランジュ乗数制御部211は、第1の量子化パラメータから所定のオフセット分小さな値をラグランジュ乗数λの算出に用いる。上記の他に、ラグランジュ乗数制御部211は、第1の量子化パラメータの値と第2の量子化パラメータの値とを用いて種々の関数に従ってラグランジュ乗数λを算出するようにしても良い。   Here, in the Lagrange multiplier control unit 211, for example, when the second quantization parameter used for calculating the Lagrange multiplier λ is smaller than the first quantization parameter, the Lagrange multiplier λ is set using the first quantization parameter. calculate. Alternatively, when the second quantization parameter is smaller than a value that is smaller than the first quantization parameter value by a predetermined offset, the Lagrange multiplier control unit 211 is smaller than the first quantization parameter by the predetermined offset. The value is used to calculate the Lagrange multiplier λ. In addition to the above, the Lagrange multiplier control unit 211 may calculate the Lagrange multiplier λ according to various functions using the value of the first quantization parameter and the value of the second quantization parameter.

エンコード部22では、予測画像生成部210が、ラグランジュ乗数制御部211で算出されたラグランジュ乗数λを用いて、動き補償に用いる動きベクトルの探索や、予測モードの選択を行う。   In the encoding unit 22, the predicted image generation unit 210 searches for a motion vector used for motion compensation and selects a prediction mode using the Lagrange multiplier λ calculated by the Lagrange multiplier control unit 211.

また、量子化部206において、レート歪最適化技術を用いる量子化処理を行う場合は、この量子化処理で用いるラグランジュ乗数λとしてラグランジュ乗数制御部211で算出されたラグランジュ乗数λを用いるようにしても良い。   In addition, when the quantization unit 206 performs a quantization process using the rate distortion optimization technique, the Lagrange multiplier λ calculated by the Lagrange multiplier control unit 211 is used as the Lagrange multiplier λ used in the quantization process. Also good.

なお、例えば、予測画像生成部210は、動きベクトル探索では歪Dに絶対値ノルムを用いて、モード選択には2乗ノルムを用いるなど複数の用途のラグランジュ乗数λを用いるようにしても良く、ラグランジュ乗数制御部211は、それぞれの用途のための、複数のラグランジュ乗数λを算出するように構成しても良い。   Note that, for example, the predicted image generation unit 210 may use a Lagrange multiplier λ for a plurality of uses, such as using an absolute value norm for distortion D in motion vector search and using a square norm for mode selection. The Lagrange multiplier control unit 211 may be configured to calculate a plurality of Lagrange multipliers λ for each application.

以上の処理によって、第1の符号化方式によるストリームを第2の符号化方式によるストリームに変換する。   Through the above processing, the stream according to the first encoding method is converted into the stream according to the second encoding method.

(B−3)第2の実施形態の効果
以上のように、第2の実施形態によれば以下のような効果が得られる。
(B-3) Effects of Second Embodiment As described above, according to the second embodiment, the following effects can be obtained.

第1の符号化方式による量子化歪みを考慮したレート歪最適化処理を行うことにより必要以上の歪の最小化作用を抑制でき、符号量の浪費を回避することで符号化効率を向上させることができる。   By performing rate distortion optimization processing in consideration of quantization distortion by the first encoding method, it is possible to suppress unnecessary distortion minimization, and to improve coding efficiency by avoiding waste of code amount. Can do.

(C)他の実施形態
本発明は、上述した第1及び第2の実施形態に限定されず、その他のさまざまな符号化方式変換処理に利用可能である。
(C) Other Embodiments The present invention is not limited to the first and second embodiments described above, and can be used for various other encoding method conversion processes.

例えば、異なる符号化方式間のトランスコード処理に限定されず、同じ符号化方式間のビットレート変換や解像度変換等のトランスコード処理においても適用可能である。   For example, the present invention is not limited to transcoding processing between different encoding methods, and can also be applied to transcoding processing such as bit rate conversion and resolution conversion between the same encoding methods.

上記第1及び第2の実施形態は、第1の符号化方式のストリームから得られる情報として量子化パラメータの利用に関して説明したが、その他にも動きベクトル情報や符号化モード情報を抽出して第2の符号化方式による符号化処理を効率的に行うように構成しても良い。   In the first and second embodiments, the use of the quantization parameter as information obtained from the stream of the first encoding method has been described. However, in addition to this, motion vector information and encoding mode information are extracted to You may comprise so that the encoding process by 2 encoding systems may be performed efficiently.

また、本発明は、上述した第1及び第2の実施形態で説明した構成を有する装置として構成するようにしても良い。例えば、パーソナルコンピュータ、タブレット端末、携帯電話機、スマートフォン、ゲーム機、携帯端末、テレビジョン受像機、セットトップボックス、デジタルカメラ等に、本発明の構成が搭載されるようにしても良い。また、装置に搭載されるCPUが本発明に係るプログラムを実行して実施するようにしても良い。   The present invention may be configured as an apparatus having the configuration described in the first and second embodiments described above. For example, the configuration of the present invention may be mounted on a personal computer, a tablet terminal, a mobile phone, a smartphone, a game machine, a mobile terminal, a television receiver, a set top box, a digital camera, or the like. Further, the CPU mounted on the apparatus may be executed by executing the program according to the present invention.

また、1台の装置上でなく、複数台の装置で連携して本発明を実現できるようにしても良い。さらに、本発明は、インターネットに代表されるネットワークと接続可能であり、ネットワークから入力ストリームを受信して符号化方式を変換するようにしても良い。   In addition, the present invention may be realized in cooperation with a plurality of devices instead of a single device. Furthermore, the present invention can be connected to a network represented by the Internet, and may receive an input stream from the network and convert the encoding method.

また、本発明に係る符号化方式変換装置を搭載する装置は、DVDディスクやBlu−Ray(登録商標)ディスクやフラッシュ記憶装置等の記録媒体(ディスク)やデジタルビデオカメラ等の映像装置から入力ストリームを入力して、ディスプレイに出力映像を出力したり又は別の記録媒体(ディスク)に記録したりするようにしても良い。   In addition, an apparatus equipped with the encoding method conversion apparatus according to the present invention includes an input stream from a recording medium (disk) such as a DVD disk, a Blu-Ray (registered trademark) disk, a flash storage device, or a video device such as a digital video camera. May be input to output an output video on a display or to record on another recording medium (disc).

1及び1A…符号化変換装置、
11…デコード部、101…エントロピー復号部、102…逆量子化部、103…逆変換部、104…予測画像生成部、105…加算部、
12…エンコード部、105…変換部、106及び206…量子化部、108…逆量子化部、109…逆変換部、110及び210…予測画像生成部、113…減算部、114…加算部、
111…量子化パラメータ制御部、211…ラグランジュ乗数制御部。
1 and 1A: encoding conversion device,
DESCRIPTION OF SYMBOLS 11 ... Decoding part 101 ... Entropy decoding part 102 ... Inverse quantization part 103 ... Inverse transformation part 104 ... Predictive image generation part 105 ... Adder part
DESCRIPTION OF SYMBOLS 12 ... Encoding part, 105 ... Conversion part, 106 and 206 ... Quantization part, 108 ... Dequantization part, 109 ... Inverse conversion part, 110 and 210 ... Prediction image generation part, 113 ... Subtraction part, 114 ... Addition part,
111: Quantization parameter control unit, 211: Lagrange multiplier control unit

Claims (12)

第1の符号化方式により符号化された画像の入力ストリームを、第2の符号化方式により符号化した画像のストリームに変換する符号化方式変換装置において、
上記入力ストリームの画像を第1の符号化方式で復号する復号手段と、
上記復号手段により復号された復号画像を第2の符号化方式で符号化する符号化手段と、
上記復号手段による復号により得られる第1の量子化パラメータを参照して、第2の符号化方式による符号化に係る第2の量子化パラメータを調整する量子化パラメータ制御手段と
を備えることを特徴とする符号化方式変換装置。
In an encoding method conversion apparatus for converting an input stream of an image encoded by a first encoding method into an image stream encoded by a second encoding method,
Decoding means for decoding the image of the input stream by a first encoding method;
Encoding means for encoding the decoded image decoded by the decoding means by a second encoding method;
A quantization parameter control unit that adjusts a second quantization parameter related to encoding by the second encoding method with reference to the first quantization parameter obtained by decoding by the decoding unit. A coding method conversion apparatus.
上記量子化パラメータ制御手段が、上記復号手段による復号により、第1の符号化方式による符号化処理で用いられた第1の量子化パラメータ値より小さくならないように、第2の量子化パラメータ値を制御するものであることを特徴とする請求項1に記載の符号化方式変換装置。   The quantization parameter control means sets the second quantization parameter value so that it does not become smaller than the first quantization parameter value used in the encoding process by the first encoding method by decoding by the decoding means. The encoding method conversion apparatus according to claim 1, wherein the encoding method conversion apparatus is controlled. 上記量子化パラメータ制御手段が、上記復号手段による復号により得られた第1の量子化パラメータを参照して、第2の量子化パラメータに基づいてレート歪最適化処理に係るラグランジュ乗数を算出するものであることを特徴とする請求項1に記載の符号化方式変換装置。   The quantization parameter control means refers to the first quantization parameter obtained by decoding by the decoding means, and calculates a Lagrange multiplier related to the rate distortion optimization processing based on the second quantization parameter. The encoding method conversion apparatus according to claim 1, wherein: 第1の符号化方式により符号化された画像の入力ストリームを、第2の符号化方式により符号化した画像のストリームに変換する符号化方式変換装置において、
上記入力ストリームの画像を第1の符号化方式で復号する復号手段と、
上記復号手段により復号された復号画像を第2の符号化方式で符号化する符号化手段と、
上記符号化手段において用いる、第2の符号化方式による符号化に係る第2の量子化パラメータに基づいて決定されるレート歪最適化処理に係るラグランジュ乗数を、上記復号手段による復号により得られる第1の量子化パラメータを参照して調整するラグランジュ乗数制御手段と
を備えることを特徴とする符号化方式変換装置。
In an encoding method conversion apparatus for converting an input stream of an image encoded by a first encoding method into an image stream encoded by a second encoding method,
Decoding means for decoding the image of the input stream by a first encoding method;
Encoding means for encoding the decoded image decoded by the decoding means by a second encoding method;
A Lagrangian multiplier related to a rate distortion optimization process determined based on a second quantization parameter related to encoding by the second encoding method used in the encoding means is obtained by decoding by the decoding means. A coding method conversion apparatus comprising: a Lagrange multiplier control unit that adjusts with reference to one quantization parameter.
上記量子化パラメータ制御手段もしくはラグランジュ乗数制御手段が、上記第1の量子化パラメータのスケール情報を、上記第2の量子化パラメータのスケール情報に変換したうえで制御に用いるものであることを特徴とする請求項1〜4のいずれかに記載の符号化方式変換装置。   The quantization parameter control means or the Lagrange multiplier control means converts the scale information of the first quantization parameter into scale information of the second quantization parameter and uses it for control. The encoding method conversion apparatus according to any one of claims 1 to 4. 上記符号化手段が、上記ラグランジュ乗数制御手段からの上記ラグランジュ乗数を用いて、上記第2の符号化方式に係る符号化処理の動きベクトル探索を行うことを特徴とする請求項3〜5のいずれかに記載の符号化方式変換装置。   6. The encoding unit according to claim 3, wherein the encoding unit performs a motion vector search of the encoding process according to the second encoding method using the Lagrange multiplier from the Lagrange multiplier control unit. A coding method conversion apparatus according to claim 1. 上記符号化手段が、上記ラグランジュ乗数制御手段からの上記ラグランジュ乗数を用いて、上記第2の符号化方式に係る符号化処理の符号化モードの選択を行うことを特徴とする請求項3〜6のいずれかに記載の符号化方式変換装置。   7. The encoding unit selects an encoding mode of an encoding process according to the second encoding method using the Lagrange multiplier from the Lagrange multiplier control unit. The encoding system conversion apparatus in any one of. 上記符号化手段が、上記ラグランジュ乗数制御手段からの上記ラグランジュ乗数を用いて、上記第2の符号化方式に係る変換係数の量子化の最適化処理を行うことを特徴とする請求項3〜7のいずれかに記載の符号化方式変換装置。   The encoding means performs optimization processing of quantization of transform coefficients according to the second encoding method, using the Lagrange multiplier from the Lagrange multiplier control means. The encoding system conversion apparatus in any one of. 上記復号手段が、上記第1の量子化パラメータに加えて、復号画像に係る動きベクトル情報や符号化モード情報を抽出して上記符号化手段に与えて、
上記符号化手段が、上記復号手段からの動きベクトル情報や符号化モード情報を、第2の符号化方式による符号化処理に利用する
ことを特徴とする請求項1〜8のいずれかに記載の符号化方式変換装置。
In addition to the first quantization parameter, the decoding unit extracts motion vector information and encoding mode information related to a decoded image, and supplies the extracted information to the encoding unit.
The encoding means uses motion vector information and encoding mode information from the decoding means for encoding processing by the second encoding method. Encoding method converter.
上記第1の符号化方式又は上記第2の符号化方式が、H.264/MPEG−4 AVC方式であることを特徴とする請求項1〜9のいずれかに記載の符号化方式変換装置。   The first encoding scheme or the second encoding scheme is H.264. The encoding system conversion apparatus according to claim 1, wherein the encoding system conversion apparatus is a H.264 / MPEG-4 AVC system. 上記第1の符号化方式又は上記第2の符号化方式が、H.265/MPEG−H HEVC方式であることを特徴とする請求項1〜9のいずれかに記載の符号化方式変換装置。   The first encoding scheme or the second encoding scheme is H.264. 10. The encoding method conversion apparatus according to claim 1, wherein the encoding method conversion apparatus is a H.265 / MPEG-H HEVC method. 第1の符号化方式により符号化された画像の入力ストリームを、第2の符号化方式により符号化した画像のストリームに変換する符号化方式変換プログラムにおいて、
コンピュータを、
上記入力ストリームの画像を第1の符号化方式で復号する復号手段、
上記復号手段により復号された復号画像を第2の符号化方式で符号化する符号化手段、
上記復号手段による復号により得られる第1の量子化パラメータを参照して、第2の符号化方式による符号化に係る第2の量子化パラメータを調整する量子化パラメータ制御手段
として機能させることを特徴とする符号化方式変換プログラム。
In an encoding method conversion program for converting an input stream of an image encoded by a first encoding method into an image stream encoded by a second encoding method,
Computer
Decoding means for decoding an image of the input stream by a first encoding method;
Encoding means for encoding the decoded image decoded by the decoding means by a second encoding method;
The first quantization parameter obtained by the decoding by the decoding means is referred to function as a quantization parameter control means for adjusting the second quantization parameter related to the encoding by the second encoding method. Encoding method conversion program.
JP2014062258A 2014-03-25 2014-03-25 Encoding method conversion apparatus and program Pending JP2015186120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014062258A JP2015186120A (en) 2014-03-25 2014-03-25 Encoding method conversion apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014062258A JP2015186120A (en) 2014-03-25 2014-03-25 Encoding method conversion apparatus and program

Publications (1)

Publication Number Publication Date
JP2015186120A true JP2015186120A (en) 2015-10-22

Family

ID=54352206

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014062258A Pending JP2015186120A (en) 2014-03-25 2014-03-25 Encoding method conversion apparatus and program

Country Status (1)

Country Link
JP (1) JP2015186120A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200003115A (en) * 2017-10-10 2020-01-08 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Video transcoding methods, computer devices and storage media
CN114760473A (en) * 2021-01-08 2022-07-15 三星显示有限公司 System and method for performing rate distortion optimization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001204028A (en) * 1999-04-13 2001-07-27 Matsushita Electric Ind Co Ltd Coded data conversion method, re-coding method, re- coding system, and data recording medium
JP2005252555A (en) * 2004-03-03 2005-09-15 Kddi Corp Video information recoding device
JP2012157061A (en) * 2012-04-12 2012-08-16 Toshiba Corp Method and device for decoding image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001204028A (en) * 1999-04-13 2001-07-27 Matsushita Electric Ind Co Ltd Coded data conversion method, re-coding method, re- coding system, and data recording medium
JP2005252555A (en) * 2004-03-03 2005-09-15 Kddi Corp Video information recoding device
JP2012157061A (en) * 2012-04-12 2012-08-16 Toshiba Corp Method and device for decoding image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
大久保 榮, H.265/HEVC教科書, vol. 初版, JPN6017032906, 21 October 2013 (2013-10-21), JP, pages 232 - 233, ISSN: 0003905406 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200003115A (en) * 2017-10-10 2020-01-08 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Video transcoding methods, computer devices and storage media
US10951905B2 (en) 2017-10-10 2021-03-16 Tencent Technology (Shenzhen) Company Limited Video transcoding method, computer device, and storage medium
KR102291570B1 (en) * 2017-10-10 2021-08-19 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Video transcoding method, computer device and storage medium
CN114760473A (en) * 2021-01-08 2022-07-15 三星显示有限公司 System and method for performing rate distortion optimization

Similar Documents

Publication Publication Date Title
DK3282705T3 (en) PROCEDURE FOR DECODING AND APPARATUS FOR ENCODING A PICTURE THROUGH INTRAPHIC PREDICTION.
MX2014000718A (en) Coefficient scanning in video coding.
JP2010035137A (en) Image processing device and method, and program
JP2014195145A (en) Moving image encoding device, moving image decoding device, moving image encoding method, moving image decoding method, and program
JP2023168518A (en) Prediction block generation device, image encoder, image decoder, and program
JP2011166592A (en) Image encoding device, and image decoding device
US9491475B2 (en) Apparatuses and methods for providing quantized coefficients for video encoding
AU2011277552A1 (en) Image processing device, image processing method, and program
WO2013048033A1 (en) Method and apparatus for encoding/decoding intra prediction mode
JP2015186120A (en) Encoding method conversion apparatus and program
JP2020137119A (en) Intra prediction device, image coding device, image decoding device, and program
KR20130023444A (en) Apparatus and method for video encoding/decoding using multi-step inter prediction
JP7441638B2 (en) Encoding device, decoding device, and program
WO2012081895A1 (en) Intra prediction method and apparatus
JP7451161B2 (en) Encoding device, decoding device, and program
JP4367354B2 (en) Image encoding device
JP6421426B2 (en) Encoding method conversion apparatus and program
KR20120095814A (en) Methods of encoding/decoding using multiple reference pictures and apparatuses for using the same
KR101145399B1 (en) Apparatus and Method for High-speed Multi-pass Encoding
JP2012134869A (en) Image encoding method, image decoding method, image encoding apparatus and image decoding apparatus
KR102017027B1 (en) Fast video encoding method and apparatus for the same
TWI646823B (en) Video compression method and video compression device
JP6886825B2 (en) Predictors, encoders, decoders, and programs
JP6323185B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program
WO2012115434A2 (en) Method for encoding and decoding images using plurality of reference images and device using method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170905

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180403

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180604

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20181030