[go: up one dir, main page]

JP2014096754A - Encoding system conversion device, encoding system conversion method, and program - Google Patents

Encoding system conversion device, encoding system conversion method, and program Download PDF

Info

Publication number
JP2014096754A
JP2014096754A JP2012248311A JP2012248311A JP2014096754A JP 2014096754 A JP2014096754 A JP 2014096754A JP 2012248311 A JP2012248311 A JP 2012248311A JP 2012248311 A JP2012248311 A JP 2012248311A JP 2014096754 A JP2014096754 A JP 2014096754A
Authority
JP
Japan
Prior art keywords
prediction
encoding
block size
determined
size
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
JP2012248311A
Other languages
Japanese (ja)
Inventor
Makoto Kimura
真琴 木村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012248311A priority Critical patent/JP2014096754A/en
Publication of JP2014096754A publication Critical patent/JP2014096754A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

【課題】 HEVCからH.264へのトランスコードにおいて、HEVCに特有の予測ブロックサイズ、予測モードを、H.264の予測ブロックサイズ、予測モードに適切に変換しないと符号化効率が維持できないという課題があった。
【解決手段】 第1符号化方式で第1パラメータを用いて符号化された第1符号化ストリームを復号して画像を生成する復号手段と、前記第1パラメータに含まれる第1予測ブロックサイズが所定のサイズ以上であるか判定する第1判定手段と、前記第1パラメータに含まれる第1予測モードが所定のモードであるか判定する第2判定手段と、前記第1及び第2判定手段の結果に基づいて、第2予測ブロックサイズを決定する決定手段と、前記復号手段で生成された前記画像を、前記決定手段で決定された第2予測ブロックサイズを含む第2パラメータを用いて第2符号化方式で符号化する符号化手段と、を有する。
【選択図】 図1
PROBLEM TO BE SOLVED: To perform H.V. In the transcoding to H.264, the prediction block size and prediction mode specific to HEVC are set to H.264. There is a problem that the encoding efficiency cannot be maintained unless it is appropriately converted to a prediction block size of 264 and a prediction mode.
Decoding means for generating an image by decoding a first encoded stream encoded using a first parameter in a first encoding method, and a first prediction block size included in the first parameter A first determination unit that determines whether the size is equal to or greater than a predetermined size, a second determination unit that determines whether the first prediction mode included in the first parameter is a predetermined mode, and the first and second determination units. Based on the result, a determination unit that determines a second prediction block size, and a second parameter including the second prediction block size determined by the determination unit is used to determine the image generated by the decoding unit using a second parameter. Encoding means for encoding by an encoding method.
[Selection] Figure 1

Description

本発明は第一の符号化方式で符号化された動画像を復号し、第二の符号化方式で再符号化することで符号化方式を変換する符号化方式変換装置、符号化方式変換方法、及び符号化方式変換プログラムに関する。   The present invention relates to an encoding method conversion apparatus and an encoding method conversion method for decoding a moving image encoded by a first encoding method and converting the encoding method by re-encoding the moving image by a second encoding method. And an encoding system conversion program.

近年、MPEG−2、H.264/MPEG−4 AVC(以下、H.264)等の符号化方式で符号化された動画像を、別の符号化方式で再度符号化するトランスコード機能の需要が高まってきている。   In recent years, MPEG-2, H.264. There is an increasing demand for a transcoding function for re-encoding a moving image encoded by an encoding method such as H.264 / MPEG-4 AVC (hereinafter referred to as H.264) using another encoding method.

特許文献1では、トランスコード機能の一手法として、外部から入力されたH.264形式の動画像をMPEG−2形式の動画像に変換する方法が提案されている。   In Patent Document 1, as a method of transcoding function, H.264 input from the outside is used. A method of converting a H.264 format moving image to a MPEG-2 format moving image has been proposed.

一方、現在、JCT−VC(Joint Collaborative Team on Video Coding)において次世代の符号化方式である、High Efficiency Video Coding(以下、HEVC)の標準化が進められている。   On the other hand, standardization of High Efficiency Video Coding (hereinafter referred to as HEVC), which is a next-generation coding scheme, is currently underway in JCT-VC (Joint Collaborative Team on Video Coding).

HEVCでは、符号化を行うブロックの単位である符号化ブロック(CU:Coding unit)のサイズ(以下、CUサイズと記す)が可変となっている。HEVCにおいてCUサイズは、64×64画素から8×8画素までのブロックサイズ(64×64画素、32×32画素、16×16画素、または8×8画素のいずれか)を取り得る。また、イントラ予測(画面内予測)、及びインター予測(画面間予測)を行うブロックの単位である予測ブロック(PU:Prediction unit)のサイズ(以下、PUサイズと記す)も可変である。PUサイズは、64×64画素から4×4画素までのブロックサイズ(64×64画素、32×32画素、16×16画素、8×8画素、または4×4画素のいずれか)を取り得る。さらに、直交変換等の変換を行うブロックの単位である変換ブロック(TU:Transform unit)のサイズ(以下、TUサイズと記す)も可変である。TUサイズは、32×32画素から4×4画素までのブロックサイズ(32×32画素、16×16画素、8×8画素、または4×4画素のいずれか)を取り得る。   In HEVC, the size (hereinafter referred to as CU size) of a coding block (CU: Coding unit) that is a unit of a block to be coded is variable. In HEVC, the CU size can take a block size from 64 × 64 pixels to 8 × 8 pixels (either 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, or 8 × 8 pixels). In addition, the size of a prediction block (PU: Prediction unit) that is a block unit for performing intra prediction (intra-screen prediction) and inter prediction (inter-screen prediction) is also variable. The PU size can be a block size from 64 × 64 pixels to 4 × 4 pixels (either 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, 8 × 8 pixels, or 4 × 4 pixels). . Furthermore, the size of a transform block (TU: Transform unit) (hereinafter referred to as TU size), which is a unit of a block for performing transform such as orthogonal transform, is also variable. The TU size can take a block size from 32 × 32 pixels to 4 × 4 pixels (either 32 × 32 pixels, 16 × 16 pixels, 8 × 8 pixels, or 4 × 4 pixels).

このため、符号化時にCU、PU、及びTUの各サイズを其々適切に決定することで、符号化効率を向上させることが可能である。尚、16×16画素は水平方向16画素、垂直方向16画素のブロックを示し、本発明の実施形態においては、これを16×16画素と表記する。また、画素数が変化しても同様である。   For this reason, it is possible to improve encoding efficiency by appropriately determining the sizes of the CU, PU, and TU at the time of encoding. Note that 16 × 16 pixels indicate a block of 16 pixels in the horizontal direction and 16 pixels in the vertical direction, and in the embodiment of the present invention, this is expressed as 16 × 16 pixels. The same is true even if the number of pixels changes.

特開2008−148060号公報JP 2008-148060 A

HEVC以外の既存の符号化方式では、符号化ブロックのサイズが固定であるため、従来のトランスコードでは符号化方式変換後の符号化ブロックのサイズを探索する必要がなかった。例えばH.264では、符号化ブロックであるマクロブロックのサイズは16×16画素だけである。   In the existing coding schemes other than HEVC, the size of the coding block is fixed, so that the conventional transcode does not need to search for the size of the coding block after the coding method conversion. For example, H.C. In H.264, the size of a macroblock which is an encoded block is only 16 × 16 pixels.

一方、HEVCでは、CUサイズ(符号化ブロックのサイズ)が可変である。即ち、HEVCの最大のCUサイズであるLCU(Large Coding Unit)サイズは64×64画素であり、このLCU内を大きさの異なる複数のCUに分割して符号化することが可能である。PUについても同様に、当該LCU内に、大きさの異なる複数のPUに分割して符号化することが可能である。   On the other hand, in HEVC, the CU size (encoded block size) is variable. That is, the LCU (Large Coding Unit) size which is the maximum CU size of HEVC is 64 × 64 pixels, and it is possible to divide the LCU into a plurality of CUs having different sizes and perform encoding. Similarly, a PU can be divided and encoded into a plurality of PUs having different sizes in the LCU.

さらに、HEVCの予測モードはH.264の予測モードよりも多様であり、HEVC特有のモードも多数存在する。   Furthermore, the prediction mode of HEVC is H.264. It is more diverse than the H.264 prediction mode, and there are many HEVC specific modes.

このため、HEVCからH.264へのトランスコードにおいて、HEVCに特有の予測ブロックサイズ、及び予測モードを、H.264の予測ブロックサイズ、及び予測モードに其々適切に変換する必要があった。H.264における予測ブロックサイズ、及び予測モードを適切に用いないと、H.264で再符号化する際に予測によって算出される予測誤差が、HEVCで符号化した際の予測によって算出された予測誤差よりも大きくなる。即ち、HEVCからH.264へのトランスコードにおいて、H.264の予測ブロックサイズ、及び予測モードを適切に用いないと、予測誤差が大きくなり、符号化効率が低下してしまうという課題があった。   For this reason, from HEVC to H.264. In transcoding to H.264, the prediction block size specific to HEVC and the prediction mode are set as H.264. It was necessary to appropriately convert to a prediction block size of 264 and a prediction mode. H. If the prediction block size in H.264 and the prediction mode are not appropriately used, The prediction error calculated by prediction when re-encoding with H.264 is larger than the prediction error calculated by prediction when encoding with HEVC. That is, from HEVC to H.264. In transcoding to H.264, H.264 If the H.264 prediction block size and the prediction mode are not appropriately used, there is a problem in that a prediction error increases and coding efficiency decreases.

また、H.264で再符号化する際に、H.264で取り得る全通りの予測ブロックサイズ、及び予測モードに対して探索を行うと、HEVCで符号化する際に用いた予測ブロックサイズ、及び予測モードを適切に変換できる。しかし、H.264で取り得る全通りの予測ブロックサイズ、及び予測モードに対して探索を行うため、探索の処理負荷(演算量)が大きくなり、トランスコードにかかる処理時間が増大するという課題があった。   H. H.264 when re-encoding. When the search is performed for all the prediction block sizes and prediction modes that can be obtained by H.264, the prediction block size and the prediction mode used for encoding by HEVC can be appropriately converted. However, H. Since the search is performed for all prediction block sizes and prediction modes that can be taken by H.264, there is a problem that the processing load (calculation amount) of the search increases and the processing time required for transcoding increases.

尚、第1の符号化方式から第2の符号化方式へのトランスコードであって、前記第1の符号化方式の符号化ブロックのサイズが可変であるトランスコードにおいても同様の課題がある。   Note that there is a similar problem in transcoding from the first encoding method to the second encoding method in which the size of the encoding block of the first encoding method is variable.

以上の課題を踏まえ、本発明は、トランスコードにおける再符号化時の予測ブロックサイズ、及び予測モードを探索する処理負荷を増加させずに、適切な予測ブロックサイズ、及び予測モードを決定することを目的とする。   Based on the above problems, the present invention determines an appropriate prediction block size and prediction mode without increasing the processing load for searching for the prediction block size and prediction mode at the time of re-encoding in transcoding. Objective.

上記の課題を解決するため、本発明の符号化方式変換装置は、下記の構成を有する。即ち、第1の符号化方式で第1の符号化パラメータを用いて符号化された第1の符号化ストリームを復号して、復号画像を生成する復号手段と、前記第1の符号化パラメータに含まれる第1の予測ブロックサイズが所定のサイズ以上であるか否かを判定する第1の判定手段と、前記第1の符号化パラメータに含まれる第1の予測モードが所定のモードであるか否かを判定する第2の判定手段と、前記第1の判定手段によって判定された結果と前記第2の判定手段によって判定された結果とに基づいて、第2の予測ブロックサイズを決定する決定手段と、前記復号手段で生成された前記復号画像を、前記決定手段で決定された第2の予測ブロックサイズを含む第2の符号化パラメータを用いて第2の符号化方式で符号化する符号化手段と、を有することを特徴とする。   In order to solve the above-described problems, the encoding method conversion apparatus of the present invention has the following configuration. That is, decoding means for decoding a first encoded stream encoded using the first encoding parameter in the first encoding scheme to generate a decoded image, and the first encoding parameter First determination means for determining whether or not the first prediction block size included is greater than or equal to a predetermined size, and whether or not the first prediction mode included in the first encoding parameter is a predetermined mode A determination for determining a second prediction block size based on a second determination means for determining whether or not, a result determined by the first determination means and a result determined by the second determination means And a code for encoding the decoded image generated by the decoding unit by a second encoding method using a second encoding parameter including a second prediction block size determined by the determining unit And And wherein the Rukoto.

本発明により、トランスコードにおける再符号化時の予測ブロックサイズ、及び予測モードを探索する処理負荷を増加させずに、適切な予測ブロックサイズ、及び予測モードを決定することが可能となる。   According to the present invention, it is possible to determine an appropriate prediction block size and prediction mode without increasing a processing load for searching for a prediction block size and a prediction mode at the time of re-encoding in transcoding.

実施形態1の符号化方式変換装置のブロック図1 is a block diagram of a coding method conversion apparatus according to a first embodiment. 実施形態1の再符号化パラメータ決定処理を表すフローチャート7 is a flowchart illustrating re-encoding parameter determination processing according to the first embodiment. H.264の4×4画素ブロック予測、及び8×8画素ブロック予測の予測モードを表す図H. The figure showing the prediction mode of H.264 4x4 pixel block prediction and 8x8 pixel block prediction HEVCの予測モードを表す図The figure showing the prediction mode of HEVC 実施形態1で決定される再符号化パラメータを表す図The figure showing the re-encoding parameter determined in Embodiment 1 実施形態1でテーブルを用いた符号化パラメータ決定処理を表す図The figure showing the encoding parameter determination process which used the table in Embodiment 1. 実施形態1における予測ブロックサイズの決定処理を表す図The figure showing the determination process of the prediction block size in Embodiment 1. HEVCのPUサイズとH.264の予測ブロックサイズとの対応を表す図HEVC PU size and H.264 The figure showing the correspondence with the prediction block size of H.264 HEVCの予測モードとH.264の予測モードとの対応を表す図HEVC prediction mode and H.264. The figure showing the correspondence with the prediction mode of H.264 実施形態2の符号化方式変換装置のブロック図Block diagram of encoding system conversion apparatus of embodiment 2 実施形態2の再符号化パラメータ決定処理を表すフローチャート10 is a flowchart illustrating re-encoding parameter determination processing according to the second embodiment. 実施形態3の符号化方式変換装置のブロック図The block diagram of the encoding system converter of Embodiment 3 解像度変換における64×64LCU内部のPUサイズの変更を表す図The figure showing change of PU size inside 64x64 LCU in resolution conversion 実施形態3の代表予測モード決定処理を表すフローチャートThe flowchart showing the representative prediction mode determination process of Embodiment 3. 実施形態3の再符号化パラメータ決定処理を表すフローチャートA flowchart showing the re-encoding parameter determination process of Embodiment 3. 実施形態3の4×4画素ブロック予測または8×8画素ブロックのいずれかの選択を表す図The figure showing selection of either 4x4 pixel block prediction or 8x8 pixel block of Embodiment 3 本発明の符号化方式変換装置に適用可能なコンピュータのハードウェア構成例を示すブロック図FIG. 1 is a block diagram showing an example of a hardware configuration of a computer applicable to the encoding method conversion apparatus of the present invention.

以下、添付の図面を参照し、本発明の好適な実施形態について説明する。尚、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

<実施形態1>
図1は実施形態1の符号化方式変換装置のブロック図である。本実施形態における符号化方式変換装置は、復号部(復号手段)101、再符号化パラメータ決定部102、及び符号化部(符号化手段)103を有する。
<Embodiment 1>
FIG. 1 is a block diagram of a coding method conversion apparatus according to the first embodiment. The encoding method conversion apparatus according to the present embodiment includes a decoding unit (decoding unit) 101, a re-encoding parameter determination unit 102, and an encoding unit (encoding unit) 103.

復号部101は、入力された第一の符号化方式で符号化された符号化ストリーム(以下、第一の符号化ストリーム)を復号する。さらに、復号部101は、第一の符号化ストリームの復号時に用いた復号パラメータを再符号化パラメータ決定部102に送出し、第一の符号化ストリームを復号して得られた復号画像を符号化部103に送出する。再符号化パラメータ決定部102は、復号部101から入力された復号パラメータに基づいて、第二の符号化方式に再符号化する際に用いるパラメータ(以下、再符号化パラメータ)を決定し、決定した再符号化パラメータを符号化部103に送出する。符号化部103は、再符号化パラメータ決定部102から入力された再符号化パラメータに基づいて、復号部101から入力された復号画像を第二の符号化方式で符号化し、第二の符号化ストリームを出力する。   The decoding unit 101 decodes an input encoded stream (hereinafter referred to as a first encoded stream) encoded by the first encoding method. Further, the decoding unit 101 sends the decoding parameters used at the time of decoding the first encoded stream to the re-encoding parameter determination unit 102, and encodes the decoded image obtained by decoding the first encoded stream. The data is sent to the unit 103. Based on the decoding parameter input from the decoding unit 101, the re-encoding parameter determination unit 102 determines a parameter (hereinafter referred to as re-encoding parameter) to be used when re-encoding to the second encoding method. The re-encoded parameters are sent to the encoding unit 103. The encoding unit 103 encodes the decoded image input from the decoding unit 101 based on the re-encoding parameter input from the re-encoding parameter determination unit 102 using the second encoding method, and performs the second encoding. Output a stream.

さらに、各部について以下で説明する。尚、説明を容易にするため、第一の符号化ストリームをHEVC形式で符号化されたストリームとし、第二の符号化ストリームをH.264形式で符号化されたストリームとする。   Further, each part will be described below. For ease of explanation, the first encoded stream is a stream encoded in HEVC format, and the second encoded stream is H.264. The stream is encoded in the H.264 format.

復号部101は、第一の符号化ストリームを入力し、入力された第一の符号化ストリームを復号する。さらに、復号部101は、第一の符号化ストリームの復号時に得られた情報のうち、少なくとも、CUサイズと、予測時のPUサイズと、予測モードとに関する情報を復号パラメータとして再符号化パラメータ決定部102に送出する。尚、本発明の実施形態において、予測とはイントラ予測(画面内予測)のことを示し、以下、イントラ予測を単に予測と表記する。同様に、本発明の実施形態において、イントラ予測モード、及びイントラ予測ブロックサイズについても、予測モード、及び予測ブロックサイズと表記する。   The decoding unit 101 inputs a first encoded stream and decodes the input first encoded stream. Further, the decoding unit 101 determines a re-encoding parameter using, as decoding parameters, information on at least the CU size, the PU size at the time of prediction, and the prediction mode among the information obtained at the time of decoding the first encoded stream. Sent to the unit 102. Note that, in the embodiment of the present invention, prediction indicates intra prediction (intra-screen prediction), and hereinafter, intra prediction is simply referred to as prediction. Similarly, in the embodiment of the present invention, the intra prediction mode and the intra prediction block size are also expressed as the prediction mode and the prediction block size.

次に、再符号化パラメータ決定部102について説明する。図2は、再符号化パラメータ決定部102における、再符号化パラメータを決定するための処理を示すフローチャートである。尚、図2は、再符号化パラメータ決定部102に入力された復号パラメータに基づいて再符号化対象のCUが予測で符号化されていたと判定された場合の処理を表す。尚、インター予測(画面間予測)で符号化されていたCUに対するPUサイズや動きベクトル等のパラメータの決定方法としては、既存の種々の技術が適用可能である。さらに、図2において、ブロックサイズを16x16と表記しているが、これは16×16画素と同義である。また、画素数が変化しても同様である。さらに、図2以降の図についても同様である。   Next, the re-encoding parameter determination unit 102 will be described. FIG. 2 is a flowchart illustrating processing for determining a re-encoding parameter in the re-encoding parameter determination unit 102. Note that FIG. 2 illustrates processing when it is determined that the CU to be recoded has been encoded by prediction based on the decoding parameter input to the recoding parameter determination unit 102. It should be noted that various existing techniques can be applied as a method for determining parameters such as PU size and motion vector for a CU that has been encoded by inter prediction (inter-screen prediction). Further, in FIG. 2, the block size is described as 16 × 16, which is synonymous with 16 × 16 pixels. The same is true even if the number of pixels changes. The same applies to the drawings after FIG.

再符号化パラメータ決定部102は、少なくとも1LCU分の再符号化対象のブロックの復号パラメータを取得した後、再符号化パラメータを決定するための処理を開始する。本実施形態では、LCUサイズを64×64画素とする。以下、再符号化パラメータ決定部102が1LCU(64×64画素)分に対応する再符号化対象のブロックの復号パラメータを取得したとして説明する。   The re-encoding parameter determination unit 102 starts the process for determining the re-encoding parameter after obtaining the decoding parameters of the block to be re-encoded for at least 1 LCU. In this embodiment, the LCU size is 64 × 64 pixels. In the following description, it is assumed that the re-encoding parameter determination unit 102 has acquired the decoding parameters of the re-encoding target block corresponding to 1 LCU (64 × 64 pixels).

まず、ステップS201において、再符号化パラメータ決定部102は、入力された第一の符号化ストリームの復号時に得られた復号パラメータに基づいて、再符号化対象のCUの予測におけるPUサイズを判定する。本実施形態のステップS201では、再符号化対象のCUの予測におけるPUサイズが所定のサイズ(16×16画素)より小さい場合はステップS204、当該PUサイズが当該所定のサイズ以上の場合はステップS202の処理を夫々行う。   First, in step S201, the re-encoding parameter determination unit 102 determines the PU size in the prediction of the CU to be re-encoded based on the decoding parameter obtained when the input first encoded stream is decoded. . In step S201 of this embodiment, when the PU size in the prediction of the CU to be re-encoded is smaller than a predetermined size (16 × 16 pixels), step S204 is performed. When the PU size is greater than the predetermined size, step S202 is performed. Each of these processes is performed.

ステップS201でPUサイズが16×16画素より小さい(8×8画素以下)サイズの場合(S201のNO)、再符号化パラメータ決定部102は、再符号化時の予測ブロックサイズを16×16画素以外(4×4画素または8×8画素)に設定する(S204)。ステップS201でPUサイズが16×16画素以上(16×16画素、32×32画素または64×64画素のいずれか)のサイズの場合(S201のYES)、再符号化パラメータ決定部102は予測モードの判定を行う(S202)。   If the PU size is smaller than 8 × 8 pixels in step S201 (8 × 8 pixels or less) (NO in S201), the recoding parameter determination unit 102 sets the predicted block size at the time of recoding to 16 × 16 pixels. Other than (4 × 4 pixels or 8 × 8 pixels) is set (S204). When the PU size is 16 × 16 pixels or more (any of 16 × 16 pixels, 32 × 32 pixels, or 64 × 64 pixels) in step S201 (YES in S201), the re-encoding parameter determination unit 102 determines the prediction mode. Is determined (S202).

ここで、H.264及びHEVCにおける予測モードについて其々説明する。図3にH.264の予測モード、図4にHEVCの予測モードを示す。   Here, H. The prediction modes in H.264 and HEVC will be described respectively. FIG. H.264 prediction mode, and FIG. 4 shows HEVC prediction mode.

図3(a)に示すように、H.264において、輝度サンプル(以下、輝度と記す)の4×4画素ブロック予測、及び8×8画素ブロック予測では、9つのモードが定義されている。尚、本実施形態において、4×4画素ブロック予測とは、4×4画素の予測ブロックサイズにおける予測のことである。また、画素数が変化しても同様である。図3(b)は輝度の16×16画素ブロック予測の予測モードを示し、図3(c)は色差サンプル(以下、色差と記す)の8×8画素ブロック予測の予測モードを示す。図3(b)、及び図3(c)に示すように、輝度の16×16画素ブロック予測、及び色差の8×8画素ブロック予測では、次の4つのモードが定義されている。即ち、H.264の輝度の16×16画素ブロック予測、及び色差の8×8画素ブロック予測では、水平予測(Horizontal)、垂直予測(Vertical)、平均値予測(DC)、及び平面予測(Plane)の4つのモードが定義されている。   As shown in FIG. In H.264, nine modes are defined in 4 × 4 pixel block prediction and 8 × 8 pixel block prediction of luminance samples (hereinafter referred to as luminance). In this embodiment, 4 × 4 pixel block prediction is prediction in a prediction block size of 4 × 4 pixels. The same is true even if the number of pixels changes. FIG. 3B shows a prediction mode of 16 × 16 pixel block prediction of luminance, and FIG. 3C shows a prediction mode of 8 × 8 pixel block prediction of a color difference sample (hereinafter referred to as “color difference”). As shown in FIGS. 3B and 3C, the following four modes are defined in the 16 × 16 pixel block prediction for luminance and the 8 × 8 pixel block prediction for color difference. That is, H.H. In the H.264 luminance 16 × 16 pixel block prediction and the color difference 8 × 8 pixel block prediction, horizontal prediction (Horizontal), vertical prediction (Vertical), average value prediction (DC), and plane prediction (Plane) A mode is defined.

これに対して、HEVCにおいては、輝度の予測モードは、図4に示すように4×4画素、8×8画素、16×16画素、32×32画素、及び64×64画素の各PUサイズに、35個のモード(図4の0から34)が其々定義されている。HEVCにおける色差の予測モードも、輝度の予測モードで定義されている35個のモードを用いることができる。さらに、色差の予測モードとして、輝度の予測モードと同じモードを用いる、輝度参照モードも定義されている。   On the other hand, in HEVC, as shown in FIG. 4, the prediction modes of luminance are PU sizes of 4 × 4 pixels, 8 × 8 pixels, 16 × 16 pixels, 32 × 32 pixels, and 64 × 64 pixels. In addition, 35 modes (0 to 34 in FIG. 4) are defined respectively. As the color difference prediction mode in HEVC, 35 modes defined in the luminance prediction mode can be used. Further, a luminance reference mode that uses the same mode as the luminance prediction mode is defined as a color difference prediction mode.

H.264の輝度の予測のうち、最も予測ブロックサイズが大きいのは16×16画素ブロック予測である。また、H.264の輝度の16×16画素ブロック予測では、利用可能な予測モード数は図3(b)に示したように4つである。一方、HEVCの輝度の16×16画素ブロック予測では、利用可能な予測モード数は図4に示すように35個である。このため、H.264で再符号化する際に、16×16画素ブロック予測を一律に適用すると適切な予測モードを選択できない。即ち、HEVCの多様な予測モードを用いることで算出した予測誤差よりも、H.264で算出される予測誤差が大きくなり、符号化効率が低下してしまう可能性がある。よって、HEVCからH.264に再符号化する際に、適切な予測モードを選択する必要がある。   H. Of the H.264 luminance predictions, the largest prediction block size is 16 × 16 pixel block prediction. H. In the 16 × 16 pixel block prediction with the H.264 luminance, the number of usable prediction modes is four as shown in FIG. On the other hand, in 16 × 16 pixel block prediction with HEVC luminance, the number of usable prediction modes is 35 as shown in FIG. For this reason, H.C. When the 16 × 16 pixel block prediction is uniformly applied when re-encoding with H.264, an appropriate prediction mode cannot be selected. In other words, the prediction error calculated by using various prediction modes of HEVC is higher than that of the prediction error. There is a possibility that the prediction error calculated by H.264 becomes large and the coding efficiency is lowered. Therefore, from HEVC to H.264. When re-encoding to H.264, it is necessary to select an appropriate prediction mode.

図2に戻り、ステップS202以降の再符号化パラメータ決定部102における処理フローについて説明する。   Returning to FIG. 2, the processing flow in the re-encoding parameter determination unit 102 after step S202 will be described.

ステップS202でHEVCの予測モードが所定のモードに相当する場合(S202のYES)、再符号化パラメータ決定部102はH.264で再符号化する際の予測ブロックサイズを16×16画素とする(S203)。尚、当該所定のモードには、平均値予測モード、垂直予測モード、及び水平予測モードが含まれ、これらのモードはHEVCにおける予測、及びH.264における予測のどちらにおいても用いることができる。従って、ステップS202において、再符号化対象(HEVC)のPUの予測モードが所定のモードであるかを判定することで、再符号化(H.264)においてHEVCにおける予測モードを適用できるかを判定することができる。   When the prediction mode of HEVC corresponds to the predetermined mode in step S202 (YES in S202), the re-encoding parameter determination unit 102 determines whether the H.264 is H.264. The predicted block size when re-encoding with H.264 is set to 16 × 16 pixels (S203). The predetermined mode includes an average value prediction mode, a vertical prediction mode, and a horizontal prediction mode, and these modes include prediction in HEVC and H.264. H.264 can be used for both predictions. Therefore, in step S202, it is determined whether the prediction mode in HEVC can be applied in re-encoding (H.264) by determining whether the prediction mode of the PU to be re-encoded (HEVC) is a predetermined mode. can do.

また、ステップS203では、図7に示すように、HEVCにおいて各サイズのPUが適用されている場合に、H.264の予測ブロックサイズを16×16画素とする。即ち、HEVCにおいて64×64画素のPU(64×64PU)が適用されている場合(図7(a))、64×64画素のブロック内の各16×16画素のブロックに対応するH.264のマクロブロックには、16×16画素ブロック予測を其々適用する。尚、HEVCにおいて32×32PU(図7(b))、及び16×16PU(図7(c))が適用されている場合も同様に、16×16画素である各マクロブロックに対して、16×16画素ブロック予測を其々適用する。尚、本実施形態において、例えば16×16画素から成るPUを16×16PUとも表記する。同様に、CU、及びTUについても16×16CU、及び16×16TUと表記する。また、画素数が変化しても同様である。   Further, in step S203, as shown in FIG. The predicted block size of H.264 is 16 × 16 pixels. That is, when a 64 × 64 pixel PU (64 × 64 PU) is applied in HEVC (FIG. 7A), the H.C. corresponding to each 16 × 16 pixel block in the 64 × 64 pixel block. For the H.264 macroblock, 16 × 16 pixel block prediction is applied. Similarly, in the case where 32 × 32 PU (FIG. 7B) and 16 × 16 PU (FIG. 7C) are applied in HEVC, for each macroblock having 16 × 16 pixels, * 16 pixel block prediction is applied to each. In the present embodiment, for example, a PU composed of 16 × 16 pixels is also expressed as 16 × 16 PU. Similarly, CU and TU are also expressed as 16 × 16 CU and 16 × 16 TU. The same is true even if the number of pixels changes.

一方、ステップS202でHEVCの予測モードが所定のモードでない場合(S202のNO)、再符号化パラメータ決定部102は予測ブロックサイズを16×16画素以外(4×4画素または8×8画素のいずれか)に設定する(S204)。   On the other hand, when the HEVC prediction mode is not a predetermined mode in step S202 (NO in S202), the re-encoding parameter determination unit 102 sets the prediction block size to a value other than 16 × 16 pixels (either 4 × 4 pixels or 8 × 8 pixels). (S204).

この場合(ステップS202のNO)、HEVCの予測モードをH.264の予測に適用させることができない。このため、H.264の16×16画素ブロック予測を適用してしまうと適切な予測モードを選択することができない。また、H.264の4×4画素ブロック予測、及び8×8画素ブロック予測の予測モード数(図3(a))は、16×16画素ブロック予測の予測モード数(図3(b))より多い。よって、ステップS204では、H.264における予測モード数が16×16画素ブロック予測より多い、4×4画素ブロック予測または8×8画素ブロック予測のいずれかを割り当てる。これにより、HEVCの予測モードと同等または予測方向のより近いH.264の予測モードを選択することができるので、予測誤差の増加を抑えることができる。   In this case (NO in step S202), the HEVC prediction mode is set to H.264. It cannot be applied to H.264 prediction. For this reason, H.C. If H.264 16 × 16 pixel block prediction is applied, an appropriate prediction mode cannot be selected. H. The number of prediction modes for H.264 4 × 4 pixel block prediction and 8 × 8 pixel block prediction (FIG. 3A) is larger than the number of prediction modes for 16 × 16 pixel block prediction (FIG. 3B). Therefore, in step S204, the H.264 format. Either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction, which has a larger number of prediction modes in H.264 than 16 × 16 pixel block prediction, is assigned. As a result, H.E. is equivalent to the prediction mode of HEVC or closer to the prediction direction. Since an H.264 prediction mode can be selected, an increase in prediction error can be suppressed.

以下、図2のステップS204の処理における、H.264の4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択する方法について説明する。図8は、HEVCのPUサイズとH.264の予測ブロックサイズとの対応を示す図である。   Hereinafter, in the process of step S204 in FIG. A method of selecting either H.264 4 × 4 pixel block prediction or 8 × 8 pixel block prediction will be described. FIG. 8 shows HEVC PU size and H.264. It is a figure which shows a response | compatibility with the prediction block size of H.264.

図8(a)に示すように、HEVCの16×16画素の領域内がすべて4×4PUである場合は、H.264の4×4画素ブロック予測を選択する。同様に図8(b)に示すように、HEVCの16×16画素の領域内がすべて8×8PUである場合は、H.264の8×8画素ブロック予測を選択する。   As shown in FIG. 8A, when all of the HEVC 16 × 16 pixel area is 4 × 4 PU, H.264 4 × 4 pixel block prediction is selected. Similarly, as shown in FIG. 8B, when all the 16 × 16 pixel regions of HEVC are 8 × 8 PU, H.264 8 × 8 pixel block prediction is selected.

一方、図8(c)に示すように、HEVCの16×16画素の領域内に4×4PUと8×8PUとが混在する場合は、H.264で再符号化する際に4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択する。これは、H.264では1マクロブロック内で8×8画素ブロック予測と4×4画素ブロック予測とを併用できないためである。   On the other hand, as shown in FIG. 8C, when 4 × 4 PU and 8 × 8 PU coexist in the HEVC 16 × 16 pixel region, When re-encoding with H.264, either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction is selected. This is because of H.C. This is because in H.264, 8 × 8 pixel block prediction and 4 × 4 pixel block prediction cannot be used together in one macroblock.

この場合、HEVCの16×16画素の領域内にある、4×4PUの個数と8×8PUの個数とを重み係数を用いて比較した結果に基づいて、H.264の予測ブロックサイズを決定してもよい。4×4PUの個数と8×8PUの個数とを重み係数を用いて比較するために、例えば式1を用いる。式1で、4×4PU、及び8×8PUの個数を其々、num_4x4pu、num_8x8puと表記し、さらに重み係数をαと表記する。   In this case, based on the result of comparing the number of 4 × 4 PUs and the number of 8 × 8 PUs in the 16 × 16 pixel area of HEVC using the weighting factor, H.264 is used. An H.264 prediction block size may be determined. In order to compare the number of 4 × 4 PUs and the number of 8 × 8 PUs using a weighting factor, for example, Equation 1 is used. In Equation 1, the numbers of 4 × 4 PU and 8 × 8 PU are expressed as num_4 × 4pu and num_8 × 8pu, respectively, and the weighting coefficient is expressed as α.

1/4×num_4x4pu≦α×num_8x8pu(式1)
式1が成立する場合はH.264の8×8画素ブロック予測を選択し、式1が成立しない場合はH.264の4×4画素ブロック予測を選択する。尚、本発明はこれに限定されるものではなく、重み係数αを右辺に掛けなくてもよい。即ち、重み係数αを左辺に掛けても、もちろんよい。
1/4 × num — 4 × 4pu ≦ α × num — 8 × 8pu (Formula 1)
If Equation 1 holds, If H.264 8 × 8 pixel block prediction is selected and Equation 1 does not hold, H.264 4 × 4 pixel block prediction is selected. In addition, this invention is not limited to this, The weighting coefficient (alpha) does not need to be multiplied by the right side. That is, of course, the weight coefficient α may be multiplied by the left side.

図8(c)では、4×4PUは8×8CU0及び8×8CU3に各々存在するので、4×4PUの個数を示すnum_4x4puは8となる。一方、8×8PUは8×8CU1及び8×8CU2に各々存在するので、8×8PUの個数を示すnum_8x8puは2となる。ここで、例えば重み付け係数αを1.1に設定した場合は式1が成立するので、H.264で再符号化対象のブロックを再符号化する際には8×8画素ブロック予測が適用される。   In FIG. 8C, since 4 × 4 PU exists in 8 × 8 CU0 and 8 × 8 CU3, num_4 × 4pu indicating the number of 4 × 4 PUs is 8. On the other hand, since 8 × 8 PU exists in 8 × 8 CU1 and 8 × 8 CU2, respectively, num_8 × 8pu indicating the number of 8 × 8 PU is 2. Here, for example, when the weighting coefficient α is set to 1.1, Equation 1 is established. When the block to be re-encoded in H.264 is re-encoded, 8 × 8 pixel block prediction is applied.

尚、重み係数αの値は固定値パラメータとしてもよいし、再符号化パラメータ決定部102の外部から与えられるパラメータとしてもよい。また、重み係数αの値は、H.264で再符号化する際に4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択した結果発生した符号量に基づいて、適応的に設定されるパラメータ等としてもよい。   Note that the value of the weighting factor α may be a fixed value parameter or a parameter given from the outside of the re-encoding parameter determination unit 102. The value of the weighting factor α is H.264. Parameters may be set adaptively based on a code amount generated as a result of selecting either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction when re-encoding with H.264.

そして、予測ブロックサイズを設定(S203またはS204)した後、HEVCの予測モードと同等または予測方向の近いモードのいずれかを、H.264で再符号化する際の予測モードとして決定し(S205)、処理を終了する。   Then, after setting the prediction block size (S203 or S204), one of the modes equivalent to the prediction mode of HEVC or near the prediction direction is set to H.264. H.264 is determined as a prediction mode for re-encoding (S205), and the process ends.

次に、図2のステップS205における、HEVCの予測モードに対応する、H.264の予測モードの選択方法について説明する。図9は、HEVCの予測モードに対応するH.264の予測モードを示す。尚、図9に示すH.264及びHEVCの予測モードは、図3及び図4に示す予測モードに対応する。   Next, in step S205 of FIG. A method for selecting the H.264 prediction mode will be described. FIG. 9 shows the H.264 corresponding to the prediction mode of HEVC. H.264 prediction modes are shown. Note that the H.264 shown in FIG. The prediction modes of H.264 and HEVC correspond to the prediction modes shown in FIGS.

図9(a)は、HEVCの予測モードに対応するH.264の輝度の4×4画素ブロック予測、及び8×8画素ブロック予測の予測モードを表す。HEVCの予測モードが1(DC:平均値予測)の場合、H.264の予測モードの2(DC)を対応付ける。HEVCの予測モードが2から8のいずれかである場合、H.264の予測モードのうち、同等または予測方向の近いモードである8を対応付ける。上述したH.264の2から8以外の予測モードについても同様に、HEVCの予測モードと同等または予測方向の近いモードを対応させておく。   FIG. 9A shows an H.264 corresponding to the prediction mode of HEVC. It represents a prediction mode of 4 × 4 pixel block prediction and 8 × 8 pixel block prediction with a H.264 luminance. When the prediction mode of HEVC is 1 (DC: average value prediction), 2 (DC) of the H.264 prediction mode is associated. When the prediction mode of HEVC is any of 2 to 8, Of the H.264 prediction modes, 8 that are equivalent or have similar prediction directions are associated. H. mentioned above. Similarly, prediction modes other than 2 to 8 of H.264 are associated with modes equivalent to or similar to the prediction modes of HEVC.

図9(b)は、HEVCの予測モードとH.264の輝度の16×16画素ブロック予測の予測モードとの対応を示したものである。   FIG. 9B shows the HEVC prediction mode and H.264. The correspondence with the prediction mode of the 16 × 16 pixel block prediction with the H.264 luminance is shown.

図9(c)は、HEVCの予測モードとH.264の色差の8×8画素ブロック予測の予測モードとの対応を示したものである。図9(c)において、HEVCの色差の輝度参照モードは、輝度の予測モードを色差の予測モードと同じモードを用いるモードであり、H.264には同等または類似するモードは存在しない。そのため、本実施形態では、HEVCの輝度の予測モードから色差の予測モードを推定している。例えば、HEVCの輝度の予測モードが1(DC:平均値予測)の場合、H.264の色差の予測モードは0(DC)を対応付ける。このように、HEVCの輝度の予測モード(0から34)を参照し、当該予測モードと同等または予測方向の近いモードを対応付けることで、H.264で再符号化する際の予測モード探索の処理負荷を軽減することが可能である。   FIG. 9C shows the HEVC prediction mode and H.264. The correspondence with the prediction mode of 8 × 8 pixel block prediction of H.264 color difference is shown. 9C, the HEVC color difference luminance reference mode is a mode in which the luminance prediction mode is the same as the color difference prediction mode. There is no equivalent or similar mode in H.264. Therefore, in this embodiment, the color difference prediction mode is estimated from the HEVC luminance prediction mode. For example, when the HEVC luminance prediction mode is 1 (DC: average value prediction), the H.264 color difference prediction mode is associated with 0 (DC). In this way, by referring to the prediction mode (0 to 34) of the luminance of HEVC and associating a mode equivalent to the prediction mode or a mode close to the prediction direction, the H.C. It is possible to reduce the processing load of the prediction mode search when re-encoding with H.264.

尚、本実施形態ではHEVCの色差の予測画素を輝度の復号画素を参照して生成しているが、本発明はこれに限定されない。即ち、画像の画素が複数のコンポーネントで構成され、当該複数のコンポーネントの任意のM2番目のコンポーネントの予測画素をM1(M1≠M2)番目のコンポーネントの復号画素を参照して生成する場合にも、同様の処理を適用可能である。   In the present embodiment, the prediction pixel of HEVC color difference is generated with reference to the decoded pixel of luminance, but the present invention is not limited to this. That is, when a pixel of an image is composed of a plurality of components and a predicted pixel of an arbitrary M2th component of the plurality of components is generated with reference to a decoded pixel of the M1 (M1 ≠ M2) th component, Similar processing can be applied.

上述したように、本実施形態において図2の処理フローを実行することにより、再符号化パラメータ決定部102に入力された復号パラメータに基づいて再符号化パラメータを決定することができ、下記のような効果が得られる。   As described above, the re-encoding parameter can be determined based on the decoding parameter input to the re-encoding parameter determination unit 102 by executing the processing flow of FIG. Effects can be obtained.

まず、図2のステップS201でYES、かつ、ステップS202でYESの場合、ステップS203の処理を行う。この処理により、符号化効率の低下(予測誤差の増加)を抑えつつ、再符号化時の予測ブロックサイズの探索に要する処理負荷を軽減することが可能である。   First, if YES in step S201 of FIG. 2 and YES in step S202, the process of step S203 is performed. With this process, it is possible to reduce the processing load required to search for the predicted block size at the time of re-encoding while suppressing a decrease in encoding efficiency (an increase in prediction error).

また、図2のステップS201でYES、かつ、ステップS202でNOの場合、ステップS204の処理を行う。また、ステップS201でNOの場合も、ステップS204の処理を行う。これらの処理により、HEVCの予測モードと同等または予測方向のより近いH.264の予測モードを選択することができるので、予測誤差の増加を抑えることができる。   Further, if YES in step S201 of FIG. 2 and NO in step S202, the process of step S204 is performed. Also, if NO in step S201, the process of step S204 is performed. With these processes, H.264 is equivalent to the prediction mode of HEVC or closer to the prediction direction. Since an H.264 prediction mode can be selected, an increase in prediction error can be suppressed.

即ち、本実施形態により、HEVCからH.264へ再符号化する際に、予測ブロックサイズ、及び予測モードを探索する処理負荷を増加させずに、適切な予測ブロックサイズ、及び予測モードを決定することが可能である。   That is, according to the present embodiment, HEVC is changed to H.264. When re-encoding to H.264, it is possible to determine an appropriate prediction block size and prediction mode without increasing the processing load for searching for the prediction block size and prediction mode.

次に、上記の処理によって復号パラメータに基づいて決定される、再符号化時の再符号化パラメータの例を図5に示す。尚、図5で示す例における予測モードとは、輝度の予測モードを表す。   Next, an example of the re-encoding parameter at the time of re-encoding determined based on the decoding parameter by the above processing is shown in FIG. Note that the prediction mode in the example shown in FIG. 5 represents a luminance prediction mode.

尚、図5に示した再符号化パラメータと復号パラメータとの対応関係をテーブル形式で配列に保持しておき、再符号化パラメータ決定部102は復号パラメータに基づき当該テーブルを参照することで再符号化パラメータを決定するようにしてもよい。   Note that the correspondence relationship between the re-encoding parameter and the decoding parameter shown in FIG. 5 is held in an array in a table format, and the re-encoding parameter determination unit 102 re-encodes by referring to the table based on the decoding parameter. The parameter may be determined.

また、本実施形態では、図5に示す当該テーブルを再符号化パラメータ決定部102で保持するが、本発明はこれに限定されない。即ち、当該テーブルを外部の記録装置(記録部)が保持し、再符号化パラメータ決定部102は記録装置から当該テーブルを読み出すようにしても良い。   In this embodiment, the table shown in FIG. 5 is held by the re-encoding parameter determination unit 102, but the present invention is not limited to this. That is, the table may be held by an external recording device (recording unit), and the re-encoding parameter determination unit 102 may read the table from the recording device.

また、図6は、第一の符号化ストリーム(HEVC)における再符号化対象のブロックのCUサイズとPUサイズと予測モードとから決定されるインデックスに基づき、テーブル形式で配列に保存された再符号化パラメータを参照する処理を示す図である。図6において、第一の符号化パラメータを復号して得られた復号パラメータが、32×32PU、かつ所定の予測モードの場合、対応付けられたインデックスは0に決定される。そして、再符号化パラメータ決定部102は決定されたインデックス0に基づいて、予測ブロックサイズを格納した配列Pred_size[0]を参照する。Pred_size[0]には、16×16画素ブロック予測を示す情報が格納されており、再符号化パラメータ決定部102は、再符号化時の予測ブロックサイズを16×16画素ブロック予測に決定する。このように、再符号化パラメータをテーブル形式で保持し、当該テーブルを参照することで、図2に示す処理フローをソフトウェアの分岐処理として実現する場合よりも、高速に再符号化パラメータを決定することが可能となる。   Further, FIG. 6 shows the re-encoding stored in the array in the table format based on the index determined from the CU size, PU size, and prediction mode of the block to be re-encoded in the first encoded stream (HEVC). It is a figure which shows the process which refers to an optimization parameter. In FIG. 6, when the decoding parameter obtained by decoding the first encoding parameter is 32 × 32 PU and the predetermined prediction mode, the associated index is determined to be 0. Then, the re-encoding parameter determination unit 102 refers to the array Pred_size [0] storing the predicted block size based on the determined index 0. Pred_size [0] stores information indicating 16 × 16 pixel block prediction, and the recoding parameter determination unit 102 determines the prediction block size at the time of recoding to 16 × 16 pixel block prediction. In this way, the re-encoding parameters are stored in a table format, and the re-encoding parameters are determined at a higher speed than when the processing flow shown in FIG. 2 is realized as a software branch process by referring to the table. It becomes possible.

再符号化パラメータ決定部102は、以上のように決定した予測ブロックサイズと予測モードとに関する情報を、再符号化パラメータとして符号化部103へ送出する。   The re-encoding parameter determination unit 102 sends information on the prediction block size and the prediction mode determined as described above to the encoding unit 103 as re-encoding parameters.

符号化部103は、再符号化パラメータ決定部102から送出された再符号化パラメータに基づいて、復号部101から出力された復号画像をH.264形式で符号化する。   Based on the re-encoding parameter sent from the re-encoding parameter determination unit 102, the encoding unit 103 converts the decoded image output from the decoding unit 101 to H.264. It is encoded in the H.264 format.

尚、本発明はこれに限定されるものではなく、本実施形態における再符号化パラメータ決定部102の機能を、図1に示す復号部101または符号化部103のいずれかの内部に設けてもよい。   Note that the present invention is not limited to this, and the function of the re-encoding parameter determination unit 102 in this embodiment may be provided inside either the decoding unit 101 or the encoding unit 103 shown in FIG. Good.

また、本実施形態において再符号化パラメータ決定部102は、HEVCで符号化された第一の符号化ストリームの再符号化対象のブロックの64×64PU、32×32PU及び16×16PUに対して、所定の予測モードであるか否かを判定している。しかし、本発明はこれに限定されず、HEVC以外の符号化方式に適用する場合は、予測ブロックサイズ(HEVCにおけるPUサイズ)を任意のN×N画素(N:自然数)の予測ブロックサイズに置き換えることも可能である。   Further, in the present embodiment, the re-encoding parameter determination unit 102 performs the 64 × 64 PU, 32 × 32 PU, and 16 × 16 PU of the block to be re-encoded of the first encoded stream encoded by HEVC. It is determined whether or not it is a predetermined prediction mode. However, the present invention is not limited to this, and when applied to a coding scheme other than HEVC, the predicted block size (PU size in HEVC) is replaced with a predicted block size of an arbitrary N × N pixels (N: natural number). It is also possible.

また、再符号化パラメータ決定部102で決定された再符号化パラメータの一部だけを符号化部103で利用してもよい。例えば、当該再符号化パラメータのうち予測ブロックサイズだけを利用し、予測モードは符号化部103で探索する構成でもよい。   Further, only a part of the re-encoding parameters determined by the re-encoding parameter determination unit 102 may be used by the encoding unit 103. For example, only the prediction block size among the re-encoding parameters may be used, and the prediction mode may be searched by the encoding unit 103.

また、再符号化パラメータ決定部102で決定された再符号化パラメータを、符号化部103でさらに最適な再符号化パラメータを探索する際の初期値として用いる構成であってもよい。即ち、再符号化パラメータ決定部102で決定された再符号化パラメータを、符号化部103で再符号化する際に必ずしも用いなくてもよく、再符号化パラメータ再決定しても構わない。   Further, the re-encoding parameter determined by the re-encoding parameter determination unit 102 may be used as an initial value when the encoding unit 103 searches for a more optimal re-encoding parameter. That is, the re-encoding parameter determined by the re-encoding parameter determination unit 102 does not necessarily have to be used when re-encoding by the encoding unit 103, and the re-encoding parameter may be re-determined.

さらに、4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択する方法や、式1における重み係数αを決定する方法についても、実施形態中で説明した方法に限定されるものではない。   Furthermore, the method for selecting either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction and the method for determining the weighting coefficient α in Equation 1 are not limited to the methods described in the embodiment. Absent.

さらに、図2のS203では、平均値予測モード、水平予測モード、または垂直予測モードのいずれかであるかを判定しているが、本発明はこれに限定されない。即ち、HEVCのPlanar予測(intra_Planar)モードをH.264の平面予測(Plane)モードに対応すると見なしてもよい。即ち、図2のステップS203において、平均値予測モード、水平予測モード、垂直予測モード、またはPlanar予測モードのいずれかであるかを判定するようにしてもよい。   Furthermore, although it is determined in S203 of FIG. 2 whether the average value prediction mode, the horizontal prediction mode, or the vertical prediction mode, the present invention is not limited to this. That is, HEVC's Planar prediction (intra_Planar) mode is set to H.264. It may be considered that it corresponds to the H.264 plane prediction (Plane) mode. That is, in step S203 of FIG. 2, it may be determined whether the mode is the average value prediction mode, the horizontal prediction mode, the vertical prediction mode, or the Planar prediction mode.

さらに、図9に示したHEVCの予測モードとH.264の予測モードとの対応も一例であり、図示した以外の対応付けを行ってもよい。   Further, the prediction mode of HEVC shown in FIG. Correspondence with the H.264 prediction mode is also an example, and associations other than those illustrated may be performed.

<実施形態2>
次に、図10に示す本発明の実施形態2について説明する。図10において、実施形態1の図1と差異がない部分には同一の符号を付している。
<Embodiment 2>
Next, Embodiment 2 of the present invention shown in FIG. 10 will be described. In FIG. 10, parts that are not different from those in FIG. 1 of the first embodiment are denoted by the same reference numerals.

尚、実施形態1と同様に、説明を容易にするため第一の符号化ストリームをHEVC形式で符号化されたストリームとし、第二の符号化ストリームをH.264形式で符号化されたストリームとする。   As in the first embodiment, for ease of explanation, the first encoded stream is a stream encoded in the HEVC format, and the second encoded stream is H.264. The stream is encoded in the H.264 format.

図10において復号部(復号手段)301は、入力された第一の符号化ストリームを復号し、実施形態1の図1における復号部101と同様に、第一の符号化ストリームの復号時に用いた情報を復号パラメータとして再符号化パラメータ決定部302に送出する。さらに、復号部301は、第一の符号化ストリームを復号して得られた種々の統計情報も復号パラメータとして再符号化パラメータ決定部302に送出する。本実施形態において統計情報とは、HEVC復号時の予測残差に関する情報、有意係数(非0係数)の有無に関する情報、及びHEVC符号化ストリームの符号量に関する情報の少なくとも一つを含む情報のことである。また、図10において復号部301は、図1における復号部101と同様に、第一の符号化ストリームを復号して得られた復号画像を符号化部103に送出する。   In FIG. 10, a decoding unit (decoding unit) 301 decodes the input first encoded stream, and is used when decoding the first encoded stream, similarly to the decoding unit 101 in FIG. 1 of the first embodiment. The information is sent to the re-encoding parameter determination unit 302 as a decoding parameter. Furthermore, the decoding unit 301 also sends various statistical information obtained by decoding the first encoded stream to the re-encoding parameter determination unit 302 as decoding parameters. In the present embodiment, the statistical information is information including at least one of information on a prediction residual at the time of HEVC decoding, information on the presence / absence of a significant coefficient (non-zero coefficient), and information on the code amount of the HEVC encoded stream. It is. Also, in FIG. 10, the decoding unit 301 sends a decoded image obtained by decoding the first encoded stream to the encoding unit 103, similarly to the decoding unit 101 in FIG. 1.

再符号化パラメータ決定部302は、復号部301から取得した復号パラメータに基づき、図11に示すフローで再符号化パラメータを決定する。より具体的に、再符号化パラメータ決定部302は、復号部301で第一の符号化ストリームを復号して得られた統計情報に基づき、H.264で再符号化する際に用いる予測ブロックサイズを決定する。   The re-encoding parameter determination unit 302 determines the re-encoding parameter according to the flow shown in FIG. 11 based on the decoding parameter acquired from the decoding unit 301. More specifically, the re-encoding parameter determination unit 302 is based on the statistical information obtained by decoding the first encoded stream by the decoding unit 301, based on the H.264 standard. The prediction block size used when re-encoding with H.264 is determined.

以下、図11を用いて、再符号化パラメータ決定部302における再符号化パラメータの決定処理を説明する。   Hereinafter, the re-encoding parameter determination process in the re-encoding parameter determination unit 302 will be described with reference to FIG.

図11のうち、実施形態1の図2と同等の処理には同一の符号を付している。図11におけるステップS201、及びステップS202の処理は、図2のステップS201、及びステップS202の処理と同様である。   In FIG. 11, processes that are the same as those in FIG. 2 of the first embodiment are denoted by the same reference numerals. The processing in step S201 and step S202 in FIG. 11 is the same as the processing in step S201 and step S202 in FIG.

HEVCの予測モードがH.264の所定の予測モード(平均値予測モード、垂直予測モード、または水平予測モードのいずれか)である場合に(S202のYES)、復号部301で取得した統計情報を予め定めた閾値と比較する(S1101)。ステップS1101で統計情報が当該閾値以下である場合(S1101のYES)、H.264で再符号化する際の予測ブロックサイズを16×16画素とする(S203)。一方、統計情報が当該閾値よりも大きい場合(S1101のNO)、H.264で再符号化する際の予測ブロックサイズを8×8画素とする(S1102)。尚、本実施形態において、統計情報が閾値よりも大きい場合とは、復号部301で取得された変換係数の有意係数の個数が閾値以上の場合のことを意味するが、本発明はこれに限定されない。即ち、予測残差の分布・SAD(差分絶対値:Sum of Absolute Difference)、及び有意係数の個数が閾値以上の場合、及び、再符号化対象のブロックの符号量が閾値以上の場合としてもよい。   The prediction mode of HEVC is H.264. In the case of the H.264 predetermined prediction mode (any one of the average value prediction mode, the vertical prediction mode, and the horizontal prediction mode) (YES in S202), the statistical information acquired by the decoding unit 301 is compared with a predetermined threshold value. (S1101). If the statistical information is equal to or smaller than the threshold value in step S1101 (YES in S1101), the The predicted block size when re-encoding with H.264 is set to 16 × 16 pixels (S203). On the other hand, when the statistical information is larger than the threshold (NO in S1101), The predicted block size when re-encoding with H.264 is set to 8 × 8 pixels (S1102). In the present embodiment, the case where the statistical information is larger than the threshold means that the number of significant coefficients of the transform coefficient acquired by the decoding unit 301 is equal to or larger than the threshold, but the present invention is not limited to this. Not. That is, prediction residual distribution / SAD (Sum of Absolute Difference) and the number of significant coefficients may be greater than or equal to a threshold, and the code amount of a block to be recoded may be greater than or equal to a threshold. .

尚、H.264では、16×16画素ブロック予測または4×4画素ブロック予測のいずれかを適用した場合、マクロブロックを16個の4×4画素ブロックに分割し、この分割された4×4画素ブロック単位で直交変換を行う。一方、H.264において8×8画素ブロック予測を適用した場合は、マクロブロックを4つの8×8画素ブロックに分割し、この分割された8×8画素ブロック単位で直交変換を行う。   H. In H.264, when either 16 × 16 pixel block prediction or 4 × 4 pixel block prediction is applied, a macroblock is divided into 16 4 × 4 pixel blocks, and each divided 4 × 4 pixel block is divided. Perform orthogonal transformation. On the other hand, H. When the 8 × 8 pixel block prediction is applied to H.264, the macroblock is divided into four 8 × 8 pixel blocks, and orthogonal transformation is performed in units of the divided 8 × 8 pixel blocks.

尚、4×4画素ブロックの直交変換よりも8×8画素ブロックの直交変換の方が、周波数成分をより細かく残すことが可能である。即ち、本実施形態において、ステップS1101で統計情報が閾値以下であると判定された場合、16×16画素予測を適用するため、変換ブロックサイズは4×4画素となる。また、ステップS1101で統計情報が閾値より大きいと判定された場合、8×8画素予測を適用するため、変換ブロックサイズは8×8画素となる。これにより、統計情報に基づいて変換ブロックサイズを決定することができ、統計情報が閾値より大きい場合に統計情報が閾値以下である場合よりも大きい変換ブロックサイズを用いることで、再符号化時の符号化効率または画質のいずれかを向上させることができる。   Note that the orthogonal transformation of the 8 × 8 pixel block can leave the frequency component more finely than the orthogonal transformation of the 4 × 4 pixel block. That is, in this embodiment, when it is determined in step S1101 that the statistical information is equal to or smaller than the threshold value, the transform block size is 4 × 4 pixels because 16 × 16 pixel prediction is applied. If it is determined in step S1101 that the statistical information is larger than the threshold, the transform block size is 8 × 8 pixels because 8 × 8 pixel prediction is applied. Thereby, the transform block size can be determined based on the statistical information, and when the statistical information is larger than the threshold, a larger transform block size is used than when the statistical information is less than or equal to the threshold. Either encoding efficiency or image quality can be improved.

各ステップS203、S204、及びS1102で予測ブロックサイズを決定した後、HEVCの予測モードと同等あるいは予測方向の近いモードを、H.264で再符号化する際の予測モードとして決定し(S205)、処理を終了する。その他の処理については、実施形態1と同様である。   After the prediction block size is determined in each of steps S203, S204, and S1102, a mode equivalent to or similar to the prediction mode of HEVC is selected from H.264. H.264 is determined as a prediction mode for re-encoding (S205), and the process ends. Other processes are the same as those in the first embodiment.

再符号化パラメータ決定部302は、以上のように決定した予測ブロックサイズと予測モードとに関する情報を、再符号化パラメータとして図12の符号化部103へ送出する。   The re-encoding parameter determination unit 302 sends information on the prediction block size and the prediction mode determined as described above to the encoding unit 103 in FIG. 12 as re-encoding parameters.

符号化部103は、再符号化パラメータ決定部302から入力された再符号化パラメータに基づいて、復号部301から入力された復号画像をH.264形式で符号化する。   Based on the re-encoding parameter input from the re-encoding parameter determination unit 302, the encoding unit 103 converts the decoded image input from the decoding unit 301 to H.264. It is encoded in the H.264 format.

本実施形態も実施形態1と同様に、HEVCからH.264へ再符号化する際に、予測ブロックサイズと予測モードとの探索に要する処理負荷を増加させずに、適切な予測ブロックサイズと予測モードを決定することが可能である。   In the present embodiment, as in the first embodiment, HEVC to H.264. When re-encoding to H.264, it is possible to determine an appropriate prediction block size and prediction mode without increasing the processing load required for searching for the prediction block size and the prediction mode.

さらに、本実施形態では、HEVCで符号化された第一の符号化ストリームを復号して得られた統計情報に基づいて、H.264へ再符号化する際に用いる16×16画素ブロック予測と8×8画素ブロック予測とを切り替えている。   Furthermore, in this embodiment, based on the statistical information obtained by decoding the first encoded stream encoded by HEVC, the H.264 encoding is performed. 16 × 16 pixel block prediction and 8 × 8 pixel block prediction used when re-encoding to H.264 are switched.

従って、本実施形態では統計情報に基づいて予測ブロックサイズを決定することで、8×8画素ブロックの直交変換を適用した場合に符号化効率または画質のいずれかが向上するかを判定している。これにより、8×8画素ブロックの適用による符号化効率または画質のいずれかが向上すると推定される場合には、8×8画素ブロックの直交変換を選択することが可能となるので、再符号化時の符号化効率または画質のいずれかを向上させることが可能となる。ここで、例えば、HEVCの予測誤差の分布が閾値以上の場合、HEVCにおける予測が効率的でないと推定される。この場合、4×4画素変換よりも周波数成分を細かく残せる、8×8画素変換を選択する。よって、予測誤差の再現性が高まり、H.264で再符号化して得られる画像の画質を向上させることができる。   Therefore, in this embodiment, by determining the prediction block size based on the statistical information, it is determined whether either the coding efficiency or the image quality is improved when the orthogonal transformation of the 8 × 8 pixel block is applied. . As a result, when it is estimated that either the coding efficiency or the image quality by the application of the 8 × 8 pixel block is improved, it becomes possible to select the orthogonal transform of the 8 × 8 pixel block. Either the coding efficiency or the image quality at the time can be improved. Here, for example, when the HEVC prediction error distribution is greater than or equal to the threshold, it is estimated that the prediction in HEVC is not efficient. In this case, the 8 × 8 pixel conversion that can leave the frequency component finer than the 4 × 4 pixel conversion is selected. Therefore, the reproducibility of the prediction error is increased, and H.264 is improved. The image quality of an image obtained by re-encoding with H.264 can be improved.

尚、本発明はこれに限定されるものではなく、本実施形態における再符号化パラメータ決定部302の機能を、図10に示す復号部301または符号化部103のいずれかの内部に設けてもよい。   Note that the present invention is not limited to this, and the function of the re-encoding parameter determination unit 302 in the present embodiment may be provided in either the decoding unit 301 or the encoding unit 103 shown in FIG. Good.

また、再符号化パラメータ決定部302で決定された再符号化パラメータの一部だけを符号化部103で利用してもよい。例えば、当該再符号化パラメータのうち予測ブロックサイズだけを利用し、予測モードは符号化部103で探索する構成でもよい。また、再符号化パラメータ決定部302で決定された再符号化パラメータを、符号化部103でさらに最適な再符号化パラメータを探索する際の初期値として用いる構成であってもよい。即ち、再符号化パラメータ決定部302で再符号化パラメータを決定した後、再び再符号化パラメータを探索してもよい。   Further, only a part of the re-encoding parameters determined by the re-encoding parameter determination unit 302 may be used by the encoding unit 103. For example, only the prediction block size among the re-encoding parameters may be used, and the prediction mode may be searched by the encoding unit 103. Alternatively, the re-encoding parameter determined by the re-encoding parameter determination unit 302 may be used as an initial value when the encoding unit 103 searches for a more optimal re-encoding parameter. That is, after the re-encoding parameter determination unit 302 determines the re-encoding parameter, the re-encoding parameter may be searched again.

尚、本実施形態では、図11に示したフローチャートにおいて閾値比較のステップを一つ(S1101)だけ示しているが、本発明はこれに限定されるものではない。複数の統計情報に対して、閾値比較を其々実施し、それらの結果に基づいて予測ブロックサイズを決定するようにしてもよい。また、一つの統計情報を複数の閾値と比較するようにしてもよい。さらに、閾値は固定としてもよいし、再符号化パラメータ決定部102の外部モジュールから与えられるパラメータとしてもよい。また、H.264の4×4画素ブロックまたは8×8画素ブロックのいずれかの直交変換を選択した結果、再符号化時に発生した各符号量に基づいて適応的に設定されるパラメータを閾値としてもよい。   In the present embodiment, only one threshold comparison step (S1101) is shown in the flowchart shown in FIG. 11, but the present invention is not limited to this. A threshold comparison may be performed for each piece of statistical information, and the predicted block size may be determined based on the results. One piece of statistical information may be compared with a plurality of threshold values. Further, the threshold value may be fixed, or may be a parameter given from an external module of the re-encoding parameter determination unit 102. H. As a threshold value, a parameter adaptively set based on each code amount generated at the time of re-encoding as a result of selecting an orthogonal transform of either H.264 4 × 4 pixel block or 8 × 8 pixel block.

<実施形態3>
次に、図12に示す本発明の実施形態3について説明する。図12において実施形態1の図1と差異がない部分には同一の符号を付している。
<Embodiment 3>
Next, Embodiment 3 of the present invention shown in FIG. 12 will be described. In FIG. 12, parts that are the same as those in FIG.

尚、実施形態1と同様に、説明を容易にするため、第一の符号化ストリームをHEVC形式で符号化されたストリームとし、第二の符号化ストリームをH.264形式で符号化されたストリームとする。   As in the first embodiment, for ease of explanation, the first encoded stream is a stream encoded in the HEVC format, and the second encoded stream is H.264. The stream is encoded in the H.264 format.

図12において復号部101は、入力された第一の符号化ストリームを復号し、実施形態1の図1と同様に、第一の符号化ストリームの復号時に用いた情報を復号パラメータとして再符号化パラメータ決定部502に送出する。さらに、復号部101は第一の符号化ストリームを復号して得られた復号画像を解像度変換部(変換手段)504に送出する。解像度変換部504は、復号部101から入力された復号画像の解像度を変換(解像度変換)し、解像度変換した復号画像を符号化部103に送出する。さらに、解像度変換部504は、復号画像を解像度変換する際に用いられた情報(解像度変換情報)を再符号化パラメータ決定部502に送出する。再符号化パラメータ決定部502は、復号部101から入力された復号パラメータと解像度変換部504から入力された解像度変換情報とに基づき、再符号化パラメータを決定し符号化部103へ送出する。符号化部103は、再符号化パラメータ決定部502から入力された再符号化パラメータに基づいて、解像度変換部504で解像度変換された復号画像を第二の符号化方式で符号化し、第二の符号化ストリームを出力する。   In FIG. 12, the decoding unit 101 decodes the input first encoded stream, and re-encodes the information used when decoding the first encoded stream as a decoding parameter, as in FIG. 1 of the first embodiment. It is sent to the parameter determination unit 502. Further, the decoding unit 101 sends a decoded image obtained by decoding the first encoded stream to the resolution conversion unit (conversion unit) 504. The resolution conversion unit 504 converts the resolution of the decoded image input from the decoding unit 101 (resolution conversion), and sends the decoded image after the resolution conversion to the encoding unit 103. Further, the resolution conversion unit 504 sends information (resolution conversion information) used when converting the resolution of the decoded image to the re-encoding parameter determination unit 502. The re-encoding parameter determination unit 502 determines re-encoding parameters based on the decoding parameters input from the decoding unit 101 and the resolution conversion information input from the resolution conversion unit 504, and sends them to the encoding unit 103. Based on the re-encoding parameter input from the re-encoding parameter determination unit 502, the encoding unit 103 encodes the decoded image that has been resolution-converted by the resolution conversion unit 504 using the second encoding method. Output the encoded stream.

ここで、解像度変換部504で復号画像を解像度変換する前後におけるHEVCのPUサイズの対応を、図13を参照して説明する。図13において、点線で囲った部分は解像度変換の前後で対応する画素位置を示す。尚、ここでは例として64×64画素であるLCUが解像度変換部504に入力された場合を例に挙げて説明する。   Here, the correspondence of the PU size of HEVC before and after resolution conversion of the decoded image by the resolution conversion unit 504 will be described with reference to FIG. In FIG. 13, the portion surrounded by the dotted line indicates the corresponding pixel position before and after the resolution conversion. Here, a case where an LCU having 64 × 64 pixels is input to the resolution conversion unit 504 will be described as an example.

図13(a)は、解像度変換前の64×64画素のブロックがPUに分割されている様子を表したものである。図13(b)は、図13(a)の64×64画素のブロックが水平方向と垂直方向とに其々1/2倍された32×32画素のブロックにおいて、対応するPUを表す。同様に図13(c)は、図13(a)の64×64画素のブロックが水平方向と垂直方向とに其々1/4倍された16×16画素のブロックにおいて対応するPUの分割を表す。   FIG. 13A shows a state in which a block of 64 × 64 pixels before resolution conversion is divided into PUs. FIG. 13B shows a corresponding PU in a 32 × 32 pixel block obtained by multiplying the 64 × 64 pixel block of FIG. 13A by 1/2 in the horizontal direction and the vertical direction, respectively. Similarly, FIG. 13C shows the division of the corresponding PU in the 16 × 16 pixel block obtained by multiplying the 64 × 64 pixel block of FIG. 13A by 1/4 in the horizontal direction and the vertical direction, respectively. Represent.

まず、水平・垂直方向に其々1/2倍した場合について、図13(a)及び図13(b)を用いて説明する。   First, the case of halving in the horizontal and vertical directions will be described with reference to FIGS. 13 (a) and 13 (b).

図13(a)において、32×32PU、16×16PU、8×8PU(図13の灰色部分)が適用されていた画素領域は其々、図13(b)に示すように、16×16PU、8×8PU、4×4PUが適用されているとみなすことができる。また、解像度変換後の各PUの予測モードは、解像度変換前の対応する各PUの予測モードと同一とみなすことができる。   In FIG. 13A, pixel regions to which 32 × 32 PU, 16 × 16 PU, and 8 × 8 PU (gray portion in FIG. 13) are applied are 16 × 16 PU, It can be considered that 8 × 8 PU and 4 × 4 PU are applied. Further, the prediction mode of each PU after resolution conversion can be regarded as the same as the prediction mode of each corresponding PU before resolution conversion.

一方、図13(a)において、四つの4×4PUで符号化されていた8×8画素(図13の斜線部分)は、図13(b)に示すように解像度変換によって4×4画素に変換される。このため、解像度変換後の当該4×4画素に対応する4×4PUの予測モードを決定する必要がある。本実施形態では、解像度変換前の複数のPUの予測モードから解像度変換後の予測で用いるモード(以降、代表予測モードと記す)を決定する。尚、代表予測モードの決定方法には、種々の従来技術を適用可能である。   On the other hand, in FIG. 13 (a), 8 × 8 pixels (shaded portions in FIG. 13) encoded with four 4 × 4 PUs are converted into 4 × 4 pixels by resolution conversion as shown in FIG. 13 (b). Converted. For this reason, it is necessary to determine a 4 × 4 PU prediction mode corresponding to the 4 × 4 pixels after resolution conversion. In the present embodiment, a mode (hereinafter referred to as a representative prediction mode) used for prediction after resolution conversion is determined from prediction modes of a plurality of PUs before resolution conversion. Various conventional techniques can be applied to the representative prediction mode determination method.

次に、水平・垂直方向に其々1/4倍した場合について、図13(a)及び図13(c)を用いて説明する。   Next, the case of ¼ times in the horizontal and vertical directions will be described with reference to FIGS. 13 (a) and 13 (c).

図13(a)において、32×32PUと16×16PUとが適用されていた画素領域は其々、図13(c)に示すように、8×8PUと4×4PUとが適用されているとみなすことができる。また、解像度変換後の各PUの予測モードは、解像度変換前の対応する各PUの予測モードと同一とみなすことが可能である。   In FIG. 13A, pixel regions to which 32 × 32 PU and 16 × 16 PU are applied are respectively applied with 8 × 8 PU and 4 × 4 PU as shown in FIG. 13C. Can be considered. Also, the prediction mode of each PU after resolution conversion can be regarded as the same as the prediction mode of each corresponding PU before resolution conversion.

一方、図13(a)において、四つの4×4PUで符号化された8×8画素(図13の斜線部分)と、8×8PUで符号化された三つの8×8画素(図13の灰色部分)とからなる16×16画素は、図13(c)に示すように解像度変換によって4×4画素となる。このため、解像度変換後の当該4×4画素に対応する4×4PUの予測モードを一つ決定する必要がある。従って、再符号化パラメータ決定部502は、解像度変換後の当該4×4画素に対応する代表予測モードを決定する。   On the other hand, in FIG. 13A, four 8 × 8 pixels encoded with 4 × 4 PU (the hatched portion in FIG. 13) and three 8 × 8 pixels encoded with 8 × 8 PU (in FIG. 13). As shown in FIG. 13C, the 16 × 16 pixels including the gray portion become 4 × 4 pixels by resolution conversion. For this reason, it is necessary to determine one 4 × 4 PU prediction mode corresponding to the 4 × 4 pixels after resolution conversion. Therefore, the re-encoding parameter determination unit 502 determines a representative prediction mode corresponding to the 4 × 4 pixels after resolution conversion.

次に、再符号化パラメータ決定部502について、図14を用いて説明する。図14は、再符号化パラメータ決定部502における、解像度変換部504から入力された解像度変換情報に基づいて代表予測モードを決定するための処理を示すフローチャートである。   Next, the re-encoding parameter determination unit 502 will be described with reference to FIG. FIG. 14 is a flowchart showing processing for determining the representative prediction mode based on the resolution conversion information input from the resolution conversion unit 504 in the re-encoding parameter determination unit 502.

再符号化パラメータ決定部502は、処理が開始されると、制御変数iを初期化する(S1401)。次に、再符号化パラメータ決定部502は、再符号化対象のブロックであるLCU内部に(2^i)×(2^i)PUが含まれるか否かを判定する(S1402)。ここで、2^iは2のi乗を表す。例えば、i=2の場合、(2^i)×(2^i)PUは4×4PUと同義である。   When the process is started, the re-encoding parameter determination unit 502 initializes the control variable i (S1401). Next, the re-encoding parameter determination unit 502 determines whether or not (2 ^ i) × (2 ^ i) PU is included in the LCU that is the block to be re-encoded (S1402). Here, 2 ^ i represents 2 to the power of i. For example, when i = 2, (2 ^ i) * (2 ^ i) PU is synonymous with 4 * 4PU.

ステップS1402で当該LCU内部に(2^i)×(2^i)PUが含まれると判定された場合(S1402のYES)、当該LCU内部に存在する各(2^i)×(2^i)PUを四つずつまとめて、対応する代表予測モードを決定する(S1403)。さらに再符号化パラメータ決定部502は、当該代表予測モードを示すフラグを設定する(S1404)。尚、ステップS1404で、再符号化パラメータ決定部502は代表予測モードを示すフラグを設定するが、n≧2の場合、図14に示す再符号化対象のブロックにおける処理で最後に当該フラグを設定されたモードを代表予測モードとして決定する。   When it is determined in step S1402 that (2 ^ i) × (2 ^ i) PU is included in the LCU (YES in S1402), each (2 ^ i) × (2 ^ i existing in the LCU ) Four PUs are grouped together and the corresponding representative prediction mode is determined (S1403). Further, the re-encoding parameter determination unit 502 sets a flag indicating the representative prediction mode (S1404). In step S1404, the re-encoding parameter determination unit 502 sets a flag indicating the representative prediction mode. If n ≧ 2, the re-encoding parameter determination unit 502 sets the flag last in the process in the re-encoding target block illustrated in FIG. The determined mode is determined as the representative prediction mode.

ステップS1404の処理後、または当該LCU内部に(2^i)×(2^i)PUが含まれない場合(S1402のNO)、再符号化パラメータ決定部502は変数iがn+1と等しいか否かを判定する(S1405)。ここで、nは解像度変換情報であり、解像度変換部504において復号画像が水平方向及び垂直方向に其々1/(2^n)倍されることを意味する。即ち、n=1の時、水平方向及び垂直方向に其々1/2倍されることを示す。   After the processing of step S1404, or when (2 ^ i) × (2 ^ i) PU is not included in the LCU (NO in S1402), the re-encoding parameter determination unit 502 determines whether the variable i is equal to n + 1. Is determined (S1405). Here, n is resolution conversion information, which means that the resolution conversion unit 504 multiplies the decoded image by 1 / (2 ^ n) in the horizontal direction and the vertical direction, respectively. That is, when n = 1, it indicates that the horizontal and vertical directions are each halved.

ステップS1405で変数iがn+1と等しいと判定された場合(S1405のYES)、再符号化処理対象のブロックであるLCUの処理を終了する。また、ステップS1405で変数iがn+1と等しくないと判定された場合(S1405のNO)、変数iをインクリメントし(S1406)、ステップS1402からステップS1405の処理を実施する。   If it is determined in step S1405 that the variable i is equal to n + 1 (YES in S1405), the processing of the LCU that is the block to be re-encoded is terminated. If it is determined in step S1405 that the variable i is not equal to n + 1 (NO in S1405), the variable i is incremented (S1406), and the processing from step S1402 to step S1405 is performed.

例えばn=1の場合、解像度変換部504において復号画像が水平方向及び垂直方向に其々1/2倍されることを意味する(図13(b))。この場合、解像度変換部504で解像度変換する前に、代表予測モードを求める必要がある解像度変換前の画像のPUは4×4PUである。即ちi=2である。従って、ステップS1405において、i=n+1となり、処理を終了する。   For example, when n = 1, it means that the resolution conversion unit 504 halves the decoded image in the horizontal direction and the vertical direction (FIG. 13B). In this case, before the resolution conversion by the resolution conversion unit 504, the PU of the image before resolution conversion for which the representative prediction mode needs to be obtained is 4 × 4 PU. That is, i = 2. Therefore, in step S1405, i = n + 1, and the process ends.

また、n=2の場合、解像度変換部504において復号画像が水平方向及び垂直方向に其々1/4倍されることを意味する(図13(c))。この場合、解像度変換部504で解像度変換する前に、代表予測モードを求める必要がある解像度変換前の画像のPUは、4×4PU及び8×8PUとなる。即ちi=3である。従って、ステップS1405においてi≠(n+1)となるので、変数iをインクリメントし(S1406)、8×8PUに対してステップS1402からステップS1405の処理を実施する。   Further, when n = 2, it means that the resolution conversion unit 504 multiplies the decoded image by 1/4 in the horizontal direction and in the vertical direction (FIG. 13C). In this case, before the resolution conversion by the resolution conversion unit 504, the PU of the image before the resolution conversion for which the representative prediction mode needs to be obtained is 4 × 4 PU and 8 × 8 PU. That is, i = 3. Therefore, since i ≠ (n + 1) in step S1405, the variable i is incremented (S1406), and the processing from step S1402 to step S1405 is performed on the 8 × 8 PU.

次に、解像度変換前に16×16画素の領域に4×4PUと8×8PUとが混在する場合(図13(a))について説明する。まず、i=2の時に、ステップS1403において、解像度変換前の画像の四つの4×4PUからなる8×8画素に対して代表予測モードを決定する。次に、i=3の時に、ステップS1403において、解像度変換前の画像の三つの8×8PUと4×4PUとからなる16×16画素に対する代表予測モードを、さらに決定することになる。尚、nが3以上の場合も同様の処理をする。   Next, a case where 4 × 4 PU and 8 × 8 PU are mixed in a 16 × 16 pixel area before resolution conversion (FIG. 13A) will be described. First, when i = 2, in step S1403, the representative prediction mode is determined for 8 × 8 pixels including four 4 × 4 PUs of the image before resolution conversion. Next, when i = 3, in step S1403, the representative prediction mode for 16 × 16 pixels composed of three 8 × 8 PUs and 4 × 4 PUs of the image before resolution conversion is further determined. The same processing is performed when n is 3 or more.

図15は、本実施形態の再符号化パラメータ決定部502における、再符号化パラメータを決定するための処理を示フローチャートである。図15おいて実施形態1と差異がない部分には同一の符号を付している。   FIG. 15 is a flowchart illustrating a process for determining a re-encoding parameter in the re-encoding parameter determination unit 502 of the present embodiment. In FIG. 15, the same reference numerals are given to portions that are not different from the first embodiment.

本実施形態では、H.264の4×4画素ブロック予測または8×8画素ブロック予測のいずれかをステップS1501の処理において選択する際に、対応するブロックの予測モードが代表予測モードであるか否かを表すフラグの有無の情報を用いる。尚、対応するブロックの予測モードが代表予測モードである場合(当該フラグが設定されている場合)、後述する式2を用いて予測ブロックサイズを決定する。   In this embodiment, H.264 is used. When either H.264 4 × 4 pixel block prediction or 8 × 8 pixel block prediction is selected in the process of step S1501, whether or not there is a flag indicating whether or not the corresponding block prediction mode is the representative prediction mode Use information. Note that when the prediction mode of the corresponding block is the representative prediction mode (when the flag is set), the prediction block size is determined using Equation 2 described later.

図16は、図15のステップS1501の処理において再符号化パラメータ決定部502が、解像度変換部504から入力された解像度変換情報に基づいて、4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択する方法を示す図である。   FIG. 16 shows that the re-encoding parameter determination unit 502 performs 4 × 4 pixel block prediction or 8 × 8 pixel block prediction based on the resolution conversion information input from the resolution conversion unit 504 in the process of step S1501 of FIG. It is a figure which shows the method of selecting either.

図16(a)は解像度変換後の16×16画素を示す。尚、図16(a)に示す16×16画素の画像は、図13(c)に示す16×16画素の画像に相当する。図16(a)の斜線部分は、解像度変換部504から入力された解像度変換情報から特定される代表予測モードを有すPUであり、それ以外の部分は、解像度変換前の予測モードを再利用したPUである。   FIG. 16A shows 16 × 16 pixels after resolution conversion. The 16 × 16 pixel image shown in FIG. 16A corresponds to the 16 × 16 pixel image shown in FIG. The shaded portion in FIG. 16A is a PU having a representative prediction mode identified from the resolution conversion information input from the resolution conversion unit 504, and the other portions reuse the prediction mode before the resolution conversion. PU.

また、図13(b)の点線内で示した部分のように、解像度変換後の画像において4×4PUと8×8PUとが混在していた場合、H.264で再符号化する前に4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択する必要がある。これは、実施形態1で説明したように、H.264では1マクロブロック内で8×8画素ブロック予測と4×4画素ブロック予測とを併用することができないためである。   Further, when 4 × 4 PU and 8 × 8 PU are mixed in the image after resolution conversion as in the portion indicated by the dotted line in FIG. Before re-encoding with H.264, either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction needs to be selected. As described in the first embodiment, this is because the H.264. This is because in H.264, 8 × 8 pixel block prediction and 4 × 4 pixel block prediction cannot be used together in one macroblock.

本実施形態において、再符号化パラメータ決定部502は、HEVCの16×16画素の領域内にある、4×4PUの個数と8×8PUの個数との重み付き予測結果に基づいて、式2を用いてH.264の予測ブロックサイズを決定する。   In the present embodiment, the re-encoding parameter determination unit 502 calculates Equation 2 based on the weighted prediction result of the number of 4 × 4 PUs and the number of 8 × 8 PUs in the 16 × 16 pixel region of HEVC. Using H. H.264 prediction block size is determined.

また、実施形態1と同様に、4×4PU及び8×8PUの個数は其々、num_4x4pu、num_8x8puと表記する。さらに、重み係数をβと表記する。尚、重み係数αは、実施形態1の式1で用いた重み係数αと同一のものとする。   As in the first embodiment, the numbers of 4 × 4 PU and 8 × 8 PU are expressed as num_4 × 4pu and num_8 × 8pu, respectively. Further, the weighting factor is expressed as β. Note that the weighting factor α is the same as the weighting factor α used in Equation 1 of the first embodiment.

β×num_4x4pu≦α×num_8x8pu (式2)
式2による比較結果に基づいて、再符号化パラメータ決定部502は、4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択する。
β × num — 4 × 4pu ≦ α × num — 8 × 8pu (Formula 2)
Based on the comparison result according to Expression 2, the re-encoding parameter determination unit 502 selects either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction.

尚、重み係数βは、代表予測モードを有する4×4PUの個数に基づいて可変となる係数である。本実施形態において再符号化パラメータ決定部502は、式2が成立する場合は8×8画素ブロック予測を選択し(図16(c))、成立しない場合は4×4画素ブロック予測を選択する(図16(b))。   The weight coefficient β is a coefficient that is variable based on the number of 4 × 4 PUs having the representative prediction mode. In the present embodiment, the re-encoding parameter determination unit 502 selects 8 × 8 pixel block prediction when Expression 2 is satisfied (FIG. 16C), and selects 4 × 4 pixel block prediction when not satisfied. (FIG. 16B).

次に、本実施形態における図15のステップS1501で予測ブロックサイズを選択する例を、図16を参照して説明する。図16においては、代表予測モードを有する4×4PUは一個である。例えば、この個数に基づく重み係数βを0.2とする。重み係数αは実施形態1と同様に、α=1.1とする。図16において、4×4PUの個数は8個なのでnum_4x4puは8であり、8×8PUの個数は2個なのでnum_8x8puは2である。従って、β=0.2、α=1.1の場合に式2は成立するため、再符号化パラメータ決定部502は8×8画素ブロック予測を選択する(図16(c))。β=0.3の場合は式2が不成立となるため、再符号化パラメータ決定部502は4×4画素ブロック予測を選択する(図16(b))。   Next, an example of selecting a prediction block size in step S1501 of FIG. 15 in the present embodiment will be described with reference to FIG. In FIG. 16, there is one 4 × 4 PU having the representative prediction mode. For example, the weighting coefficient β based on this number is set to 0.2. The weighting factor α is set to α = 1.1 as in the first embodiment. In FIG. 16, since the number of 4 × 4 PUs is 8, num — 4 × 4pu is 8, and since the number of 8 × 8 PUs is 2, num — 8 × 8pu is 2. Therefore, since Equation 2 is satisfied when β = 0.2 and α = 1.1, the re-encoding parameter determination unit 502 selects 8 × 8 pixel block prediction (FIG. 16C). Since Equation 2 is not satisfied when β = 0.3, the recoding parameter determination unit 502 selects 4 × 4 pixel block prediction (FIG. 16B).

図15に戻り、再符号化パラメータ決定部502による再符号化パラメータの決定処理について説明する。再符号化パラメータ決定部502は再符号化の際に用いる予測ブロックサイズを決定した(S1501)後、同じく再符号化の際に用いる予測モードを決定する(S1502)。ステップS1502で再符号化パラメータ決定部502は、解像度変換後の対応する各PUの予測モード(代表予測モードも含む)と同一、または予測方向の近い予測モードのいずれかを決定し、処理を終了する。   Returning to FIG. 15, the re-encoding parameter determination process by the re-encoding parameter determination unit 502 will be described. The re-encoding parameter determination unit 502 determines the prediction block size used for re-encoding (S1501), and then determines the prediction mode used for re-encoding (S1502). In step S1502, the re-encoding parameter determination unit 502 determines a prediction mode that is the same as the prediction mode (including the representative prediction mode) of each corresponding PU after resolution conversion, or close to the prediction direction, and ends the process. To do.

尚、式2における重み係数βを決定する方法について、本実施形態で説明した方法に限定されない。即ち、本実施形態では、重み係数βの値は代表予測モードを有する4×4PUの個数に依存しているが、その他のパラメータに基づいて可変としてもよい。例えば、代表予測モードを有する4×4PUの個数だけでなく、H.264への再符号化時に4×4画素ブロック予測または8×8画素ブロック予測のいずれかを選択した結果発生した符号量に基づいて適応的に設定されるパラメータ等としてもよい。また、本実施形態は式2において重み係数βを左辺に掛けているが、本発明はこれに限定されない。即ち、重み係数βを式2の右辺に掛けても、もちろんよい。   Note that the method for determining the weighting coefficient β in Equation 2 is not limited to the method described in the present embodiment. That is, in the present embodiment, the value of the weighting factor β depends on the number of 4 × 4 PUs having the representative prediction mode, but may be variable based on other parameters. For example, not only the number of 4 × 4 PUs having the representative prediction mode, Parameters may be adaptively set based on a code amount generated as a result of selecting either 4 × 4 pixel block prediction or 8 × 8 pixel block prediction at the time of re-encoding to H.264. In the present embodiment, the weighting factor β is multiplied by the left side in Equation 2, but the present invention is not limited to this. That is, of course, the weight coefficient β may be multiplied by the right side of Equation 2.

これにより本実施形態は、H.264へ再符号化する際の予測ブロックサイズを探索する処理負荷を増加させずに、HEVCの予測ブロックサイズを、H.264で再符号化するための予測ブロックサイズに適切に変換することができる。また、本実施形態は、H.264へ再符号化する際の予測モードを探索する処理負荷を増加させずに、HEVCの予測モードを、H.264で再符号化するための予測ブロックサイズに適切に変換することができる。   As a result, this embodiment can be The prediction block size of HEVC is changed to H.264 without increasing the processing load for searching for the prediction block size when re-encoding to H.264. H.264 can be appropriately converted into a predicted block size for re-encoding. In addition, this embodiment is H.264. The prediction mode of HEVC is changed to H.264 without increasing the processing load for searching for the prediction mode when re-encoding to H.264. H.264 can be appropriately converted into a predicted block size for re-encoding.

さらに本実施形態では、第一の符号化ストリームを復号して得られた復号画像を解像度変換する際に用いられた解像度変換情報に基づいて、H.264で再符号化する際に用いる予測モードを選択している。これにより、解像度変換前の予測モードの再利用性に基づいて、適応的に再符号化時の予測ブロックサイズを切り替えることが可能となる。再利用性とは、HEVCの平均値予測モード、水平予測モード、または垂直予測モードのいずれかのモードは、H.264の16×16画素予測でも用いることができるため、HEVCの予測モードと同じモードをH.264で利用することを示す。   Furthermore, in this embodiment, based on the resolution conversion information used when the resolution conversion is performed on the decoded image obtained by decoding the first encoded stream, the H.264 format is used. A prediction mode to be used when re-encoding with H.264 is selected. This makes it possible to adaptively switch the prediction block size at the time of re-encoding based on the reusability of the prediction mode before resolution conversion. The reusability refers to the HEVC average value prediction mode, horizontal prediction mode, or vertical prediction mode. H.264 16 × 16 pixel prediction can be used, the same mode as the HEVC prediction mode is used in H.264. H.264 is used.

尚、本発明はこれに限定されるものではなく、再符号化パラメータ決定部502の機能を、図12に示す復号部101、符号化部103、または解像度変換部504のいずれかの内部に設けてもよい。   Note that the present invention is not limited to this, and the function of the re-encoding parameter determination unit 502 is provided inside any one of the decoding unit 101, the encoding unit 103, and the resolution conversion unit 504 shown in FIG. May be.

また、再符号化パラメータ決定部502で決定された再符号化パラメータの一部だけを符号化部103で利用してもよい。例えば、当該再符号化パラメータのうち予測ブロックサイズだけを利用し、予測モードは符号化部103で探索する構成でもよい。また、再符号化パラメータ決定部502で決定された再符号化パラメータを、符号化部103でさらに最適な再符号化パラメータを探索する際の初期値として用いる構成であってもよい。即ち、再符号化パラメータ決定部502で再符号化パラメータを決定した後、再び再符号化パラメータを探索してもよい。   Further, only a part of the re-encoding parameters determined by the re-encoding parameter determination unit 502 may be used by the encoding unit 103. For example, only the prediction block size among the re-encoding parameters may be used, and the prediction mode may be searched by the encoding unit 103. In addition, the re-encoding parameter determined by the re-encoding parameter determination unit 502 may be used as an initial value when the encoding unit 103 searches for a more optimal re-encoding parameter. That is, after the re-encoding parameter determination unit 502 determines the re-encoding parameter, the re-encoding parameter may be searched again.

<実施形態4>
上記実施形態1、実施形態2、及び実施形態3において、其々図1、図10、及び図12に示した各処理部はハードウェアでもって構成しているものとして説明した。しかし、これらの図に示した各処理部で行う処理をコンピュータプログラムで実行しても良い。
<Embodiment 4>
In the first embodiment, the second embodiment, and the third embodiment, each processing unit illustrated in FIGS. 1, 10, and 12 has been described as being configured by hardware. However, the processing performed by each processing unit shown in these figures may be executed by a computer program.

図17は、上記実施形態1、実施形態2、及び実施形態3に係る符号化方式変換装置の各処理部が行う処理を実行するコンピュータのハードウェアの構成例を示すブロック図である。   FIG. 17 is a block diagram illustrating a configuration example of hardware of a computer that executes processing performed by each processing unit of the coding scheme conversion apparatus according to the first embodiment, the second embodiment, and the third embodiment.

CPU1701は、RAM1702やROM1703に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上述した実施形態に係る符号化方式変換装置が行うものとして上述した各処理を実行する。即ち、CPU1701は、図1、図10及び図12に示した各処理部として機能することになる。   The CPU 1701 controls the entire computer using computer programs and data stored in the RAM 1702 and the ROM 1703, and executes each process described above as performed by the encoding method conversion apparatus according to the above-described embodiment. That is, the CPU 1701 functions as each processing unit shown in FIGS.

RAM1702は、外部記憶装置1706からロードされたコンピュータプログラムやデータ、I/F(インターフェース)1707を介して、外部から取得したデータ等を一時的に記憶するためのエリアを有する。さらに、RAM1702は、CPU1701が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM1702は、例えば、フレームメモリとして割り当てたり、その他の各種のエリアを適宜提供したりすることができる。   The RAM 1702 has an area for temporarily storing computer programs and data loaded from the external storage device 1706, data acquired from the outside via an I / F (interface) 1707, and the like. Further, the RAM 1702 has a work area used when the CPU 1701 executes various processes. That is, the RAM 1702 can be allocated as, for example, a frame memory or can provide various other areas as appropriate.

ROM1703は、本コンピュータの設定データや、ブートプログラム等を格納する。   The ROM 1703 stores setting data and a boot program for the computer.

操作部1704は、キーボードやマウス等により構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU1701に対して入力することができる。   The operation unit 1704 is configured by a keyboard, a mouse, and the like, and various instructions can be input to the CPU 1701 by the user of the computer.

表示部1705は、CPU1701による処理結果を表示する。また、表示部1705は、例えば液晶ディスプレイで構成される。   A display unit 1705 displays a processing result by the CPU 1701. Further, the display unit 1705 is constituted by a liquid crystal display, for example.

外部記憶装置1706は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置1706には、オペレーティングシステム(OS)や、図1、図10、及び図12に示した各部の機能をCPU1701に実現させるためのコンピュータプログラムが保存されている。さらには、外部記憶装置1706には、処理対象としての各画像が保存されていても良い。   The external storage device 1706 is a large-capacity information storage device represented by a hard disk drive device. The external storage device 1706 stores an operating system (OS) and computer programs for causing the CPU 1701 to realize the functions of the units illustrated in FIGS. 1, 10, and 12. Furthermore, each image as a processing target may be stored in the external storage device 1706.

外部記憶装置1706に保存されているコンピュータプログラムやデータは、CPU1701による制御に従って適宜、RAM1702にロードされ、CPU1701による処理対象となる。   Computer programs and data stored in the external storage device 1706 are appropriately loaded into the RAM 1702 under the control of the CPU 1701 and are processed by the CPU 1701.

I/F1707には、LANやインターネット等のネットワーク、投影装置や表示装置等の他の機部を接続することができ、本コンピュータはこのI/F1707を介して様々な情報を取得したり、送出したりすることができる。   The I / F 1707 can be connected to a network such as a LAN or the Internet, or another unit such as a projection device or a display device. The computer can acquire various kinds of information via the I / F 1707 and send it out. You can do it.

バス1708は、上述の各部を繋ぐ。   A bus 1708 connects the above-described units.

上述の構成における作動は、前述のフローチャートで説明した作動をCPU1701が中心となってその制御を行う。   The operation in the above-described configuration is controlled by the CPU 1701 centering on the operation described in the above flowchart.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (17)

第1の符号化方式で第1の符号化パラメータを用いて符号化された第1の符号化ストリームを復号して、復号画像を生成する復号手段と、
前記第1の符号化パラメータに含まれる第1の予測ブロックサイズが所定のサイズ以上であるか否かを判定する第1の判定手段と、
前記第1の符号化パラメータに含まれる第1の予測モードが所定のモードであるか否かを判定する第2の判定手段と、
前記第1の判定手段によって判定された結果と前記第2の判定手段によって判定された結果とに基づいて、第2の予測ブロックサイズを決定する決定手段と、
前記復号手段で生成された前記復号画像を、前記決定手段で決定された第2の予測ブロックサイズを含む第2の符号化パラメータを用いて第2の符号化方式で符号化する符号化手段と、
を有することを特徴とする符号化方式変換装置。
Decoding means for decoding a first encoded stream encoded by using a first encoding parameter in the first encoding scheme and generating a decoded image;
First determination means for determining whether or not a first prediction block size included in the first encoding parameter is equal to or larger than a predetermined size;
Second determination means for determining whether or not the first prediction mode included in the first encoding parameter is a predetermined mode;
Determining means for determining a second predicted block size based on the result determined by the first determining means and the result determined by the second determining means;
Encoding means for encoding the decoded image generated by the decoding means by a second encoding method using a second encoding parameter including the second predicted block size determined by the determining means; ,
A coding method conversion apparatus comprising:
前記決定手段は、前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズ以上であると判定され、且つ、前記第2の判定手段によって前記第1の予測モードが前記所定のモードであると判定された場合に、前記第2の予測ブロックサイズを、前記所定のサイズに決定することを特徴とする請求項1に記載の符号化方式変換装置。   The determining means determines that the first prediction block size is greater than or equal to the predetermined size by the first determination means, and the first prediction mode is the predetermined prediction by the second determination means. 2. The encoding method conversion apparatus according to claim 1, wherein, when it is determined as a mode, the second prediction block size is determined to be the predetermined size. 3. 前記決定手段は、前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズより小さいと判定された場合、または、前記第2の判定手段によって前記第1の予測モードが前記所定のモードでないと判定された場合に、前記第2の予測ブロックサイズを、前記所定のサイズより小さいサイズに決定することを特徴とする請求項1乃至請求項2のいずれか一項に記載の符号化方式変換装置。   The determining unit determines that the first prediction block size is smaller than the predetermined size by the first determination unit, or the first prediction mode is set to the predetermined unit by the second determination unit. 3. The code according to claim 1, wherein when it is determined that the mode is not the mode, the second predicted block size is determined to be smaller than the predetermined size. 4. Conversion method converter. 前記決定手段は、前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズより小さいと判定された場合、または、前記第2の判定手段によって前記第1の予測モードが前記所定のモードでないと判定された場合に、前記第2の符号化方式で用いることのできる予測ブロックサイズのうち、当該予測ブロックサイズで用いることのできる予測モード数が、前記第1の符号化方式の前記第1の予測ブロックサイズで用いることのできる予測モード数に対応する予測ブロックサイズを、第2の予測ブロックサイズに決定することを特徴とする請求項1乃至請求項2のいずれか一項に記載の符号化方式変換装置。   The determining unit determines that the first prediction block size is smaller than the predetermined size by the first determination unit, or the first prediction mode is set to the predetermined unit by the second determination unit. Of the prediction block sizes that can be used in the second encoding method, the number of prediction modes that can be used in the prediction block size is the number of prediction modes in the first encoding method. The prediction block size corresponding to the number of prediction modes that can be used in the first prediction block size is determined as the second prediction block size, according to any one of claims 1 to 2. The encoding method conversion apparatus described. さらに、前記第1の符号化ストリームの統計情報を取得する取得手段と、
前記取得手段によって取得された前記統計情報が、所定の値以下であるか否かを判定する第3の判定手段を有し、
前記決定手段は、前記第1の判定手段によって判定された結果と前記第2の判定手段によって判定された結果と前記第3の判定手段によって判定された結果に基づいて、前記第2の符号化パラメータに含まれる、第2の予測ブロックサイズまたは第2の変換ブロックサイズのうち少なくとも一つを決定することを特徴とする請求項1に記載の符号化方式変換装置。
An obtaining unit for obtaining statistical information of the first encoded stream;
A third determination unit that determines whether or not the statistical information acquired by the acquisition unit is equal to or less than a predetermined value;
The determination unit is configured to perform the second encoding based on the result determined by the first determination unit, the result determined by the second determination unit, and the result determined by the third determination unit. The encoding method conversion apparatus according to claim 1, wherein at least one of a second prediction block size and a second conversion block size included in the parameter is determined.
前記決定手段は、前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズ以上であると判定され、且つ、前記第2の判定手段によって前記第1の予測モードが前記所定のモードであると判定され、且つ、前記第3の判定手段によって前記統計情報が前記所定の値以下であると判定された場合に、前記第2の予測ブロックサイズを、前記所定のサイズに決定することを特徴とする請求項5に記載の符号化方式変換装置。   The determining means determines that the first prediction block size is greater than or equal to the predetermined size by the first determination means, and the first prediction mode is the predetermined prediction by the second determination means. When the mode is determined and the statistical information is determined to be equal to or smaller than the predetermined value by the third determination unit, the second predicted block size is determined to be the predetermined size. The encoding method conversion apparatus according to claim 5, wherein: 前記決定手段は、前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズより小さいと判定された場合、または、前記第2の判定手段によって前記第1の予測モードが前記所定のモードでないと判定された場合、または、前記第3の判定手段によって前記統計情報が前記所定の値より大きいと判定された場合に、前記第2の予測ブロックサイズを、前記所定のサイズより小さいサイズに決定することを特徴とする請求項5乃至請求項6のいずれか一項に記載の符号化方式変換装置。   The determining unit determines that the first prediction block size is smaller than the predetermined size by the first determination unit, or the first prediction mode is set to the predetermined unit by the second determination unit. The second predictive block size is smaller than the predetermined size when it is determined that the mode is not the mode of the above or when the statistical information is determined to be larger than the predetermined value by the third determining unit The encoding method conversion apparatus according to any one of claims 5 to 6, wherein the size is determined. 前記決定手段は、前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズ以上であると判定され、且つ、前記第2の判定手段によって前記第1の予測モードが前記所定のモードであると判定され、且つ、前記第3の判定手段によって前記統計情報が前記所定の値以下であると判定された場合に前記第2の変換ブロックサイズを、第1のサイズに決定し、
前記第1の判定手段によって前記第1の予測ブロックサイズが前記所定のサイズより小さいと判定されたか、前記第2の判定手段によって前記第1の予測モードが前記所定のモードでないと判定されたか、または、前記第3の判定手段によって前記統計情報が前記所定の値より大きいと判定された場合に前記第2の変換ブロックサイズを、第2のサイズに決定し、
前記第1のサイズは前記第2のサイズより大きいことを特徴とする請求項5に記載の符号化方式変換装置。
The determining means determines that the first prediction block size is greater than or equal to the predetermined size by the first determination means, and the first prediction mode is the predetermined prediction by the second determination means. The second transform block size is determined to be the first size when the mode is determined and the statistical information is determined to be equal to or smaller than the predetermined value by the third determination unit;
Whether the first determination block size is determined to be smaller than the predetermined size by the first determination unit, or whether the first prediction mode is not the predetermined mode by the second determination unit, Alternatively, when the statistical information is determined to be larger than the predetermined value by the third determination unit, the second transform block size is determined as the second size,
6. The encoding method conversion apparatus according to claim 5, wherein the first size is larger than the second size.
前記統計情報は、前記復号手段によって前記第1の符号化ストリームを復号する際に得られる、前記第1の符号化ストリームの符号量、予測残差、有意係数の有無を示すパラメータの少なくとも一つを含む情報であることを特徴とする請求項5乃至請求項8のいずれか一項に記載の符号化方式変換装置。   The statistical information is at least one of parameters indicating the code amount of the first encoded stream, the prediction residual, and the presence / absence of a significant coefficient, which is obtained when the decoding unit decodes the first encoded stream. The encoding method conversion apparatus according to any one of claims 5 to 8, wherein the encoding system conversion apparatus includes information including: 前記所定のモードは、平均値予測モード、または水平予測モード、または垂直予測モードのいずれかであることを特徴とする、請求項1乃至請求項9のいずれか一項に記載の符号化方式変換装置。   The encoding method conversion according to any one of claims 1 to 9, wherein the predetermined mode is any one of an average value prediction mode, a horizontal prediction mode, and a vertical prediction mode. apparatus. さらに、前記第1の符号化パラメータは、第1の予測ブロックサイズとは異なる第3の予測ブロックサイズを含み、
前記決定手段は、前記第1の予測ブロックサイズの個数と前記第3の予測ブロックサイズの個数とに基づいて、前記第2の符号化パラメータに含まれる前記第2の予測ブロックサイズを決定することを特徴とする請求項1に記載の符号化方式変換装置。
Further, the first coding parameter includes a third prediction block size different from the first prediction block size,
The determining means determines the second predicted block size included in the second encoding parameter based on the number of the first predicted block size and the number of the third predicted block size. The encoding method conversion apparatus according to claim 1.
前記決定手段は、前記第1の符号化パラメータに含まれる前記第1の予測モードに基づいて、前記第2の符号化パラメータに含まれる前記第2の予測モードを決定することを特徴とする請求項1または請求項5のいずれか一項に記載の符号化方式変換装置。   The determination means determines the second prediction mode included in the second encoding parameter based on the first prediction mode included in the first encoding parameter. The encoding system conversion apparatus as described in any one of Claim 1 or Claim 5. 前記第1の予測ブロックサイズ、及び前記第2の予測ブロックサイズは、イントラ予測の際に用いられるブロックサイズであることを特徴とする請求項1または請求項5のいずれか一項に記載の符号化方式変換装置。   6. The code according to claim 1, wherein the first prediction block size and the second prediction block size are block sizes used in intra prediction. Conversion method converter. 第1の符号化方式で第1の符号化パラメータを用いて符号化された第1の符号化ストリームを復号して、復号画像を生成する復号手段と、
前記復号手段で生成された前記復号画像の解像度を、解像度変換情報を用いて変換する変換手段と、
前記変換手段によって解像度を変換された復号画像を、第2の符号化方式で第2の符号化パラメータを用いて符号化する符号化手段と、
前記解像度変換情報に基づいて、前記第2の符号化パラメータに含まれる予測モードを決定する第1の決定手段と、
を有することを特徴とする符号化方式変換装置。
Decoding means for decoding a first encoded stream encoded by using a first encoding parameter in the first encoding scheme and generating a decoded image;
Conversion means for converting the resolution of the decoded image generated by the decoding means using resolution conversion information;
Encoding means for encoding the decoded image, the resolution of which has been converted by the conversion means, using the second encoding parameter in the second encoding method;
First determination means for determining a prediction mode included in the second encoding parameter based on the resolution conversion information;
A coding method conversion apparatus comprising:
さらに、前記解像度変換情報に基づいて、前記第2の符号化パラメータに含まれる予測ブロックサイズを決定する第2の決定手段を有することを特徴とする請求項14に記載の符号化方式変換装置。   15. The encoding method conversion apparatus according to claim 14, further comprising second determination means for determining a predicted block size included in the second encoding parameter based on the resolution conversion information. 第1の符号化方式で第1の符号化パラメータを用いて符号化された第1の符号化ストリームを復号して、復号画像を生成する復号工程と、
前記第1の符号化パラメータに含まれる第1の予測ブロックサイズが所定のサイズ以上であるか否かを判定する第1の判定工程と、
前記第1の符号化パラメータに含まれる第1の予測モードが所定のモードであるか否かを判定する第2の判定工程と、
前記第1の判定工程によって判定された結果と前記第2の判定工程によって判定された結果とに基づいて、第2の予測ブロックサイズを決定する決定工程と、
前記復号工程で生成された前記復号画像を、前記決定工程で決定された第2の予測ブロックサイズを含む第2の符号化パラメータを用いて第2の符号化方式で符号化する符号化工程と、
を有することを特徴とする符号化方式変換方法。
Decoding a first encoded stream encoded using the first encoding parameter in the first encoding scheme to generate a decoded image;
A first determination step of determining whether or not a first prediction block size included in the first encoding parameter is equal to or larger than a predetermined size;
A second determination step of determining whether or not the first prediction mode included in the first encoding parameter is a predetermined mode;
A determination step of determining a second prediction block size based on the result determined by the first determination step and the result determined by the second determination step;
An encoding step of encoding the decoded image generated in the decoding step by a second encoding method using a second encoding parameter including the second predicted block size determined in the determining step; ,
A coding method conversion method characterized by comprising:
コンピュータを、請求項1に記載の符号化方式変換装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the encoding system converter of Claim 1.
JP2012248311A 2012-11-12 2012-11-12 Encoding system conversion device, encoding system conversion method, and program Pending JP2014096754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012248311A JP2014096754A (en) 2012-11-12 2012-11-12 Encoding system conversion device, encoding system conversion method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012248311A JP2014096754A (en) 2012-11-12 2012-11-12 Encoding system conversion device, encoding system conversion method, and program

Publications (1)

Publication Number Publication Date
JP2014096754A true JP2014096754A (en) 2014-05-22

Family

ID=50939488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012248311A Pending JP2014096754A (en) 2012-11-12 2012-11-12 Encoding system conversion device, encoding system conversion method, and program

Country Status (1)

Country Link
JP (1) JP2014096754A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997650A (en) * 2014-05-30 2014-08-20 华为技术有限公司 Video decoding method and video decoder
JP2021013079A (en) * 2019-07-04 2021-02-04 日本放送協会 Program transmission device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997650A (en) * 2014-05-30 2014-08-20 华为技术有限公司 Video decoding method and video decoder
JP2015228651A (en) * 2014-05-30 2015-12-17 ▲ホア▼▲ウェイ▼技術有限公司 Video decoding method and video decoder
CN103997650B (en) * 2014-05-30 2017-07-14 华为技术有限公司 The method and Video Decoder of a kind of video decoding
JP2021013079A (en) * 2019-07-04 2021-02-04 日本放送協会 Program transmission device
JP7352396B2 (en) 2019-07-04 2023-09-28 日本放送協会 Program transmission device

Similar Documents

Publication Publication Date Title
US12225227B2 (en) Image encoding method and image decoding method
US11711539B2 (en) Image encoding apparatus, image encoding method and program, image decoding apparatus, and image decoding method and program
US12075083B2 (en) Image encoding and decoding method with merge flag and motion vectors
RU2695641C1 (en) Video encoding device, video decoding device, video encoding method and video decoding method
JP5158003B2 (en) Image coding apparatus, image coding method, and computer program
DK3282705T3 (en) PROCEDURE FOR DECODING AND APPARATUS FOR ENCODING A PICTURE THROUGH INTRAPHIC PREDICTION.
JP6164840B2 (en) Encoding apparatus, encoding method, and program
US20150016741A1 (en) Apparatus and method for encoding/decoding images for intra-prediction
KR101090586B1 (en) Encoding/decoding device, encoding/decoding method and recording medium
JP2015029348A (en) Moving image decoding apparatus
US20130077885A1 (en) Image coding apparatus and image coding method, and image decoding apparatus and image decoding method
US20230007311A1 (en) Image encoding device, image encoding method and storage medium, image decoding device, and image decoding method and storage medium
KR20250084979A (en) Image encoding/decoding method using intra prediction
JP2011166592A (en) Image encoding device, and image decoding device
JP5625512B2 (en) Encoding device, encoding method, program, and recording medium
JP2014096754A (en) Encoding system conversion device, encoding system conversion method, and program
JP7030246B2 (en) Intra predictor, image decoder, and program
KR101841352B1 (en) Reference frame selection method and apparatus
JP7441638B2 (en) Encoding device, decoding device, and program
JP6016488B2 (en) Video compression format conversion apparatus, video compression format conversion method, and program
JP5937926B2 (en) Image encoding device, image decoding device, image encoding program, and image decoding program
WO2013145174A1 (en) Video encoding method, video decoding method, video encoding device, and video decoding device
JP6331972B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
TW202404354A (en) Prediction refinement with convolution model
JP2012120086A (en) Video encoder