JP2006217569A - Image code string conversion apparatus, image code string conversion method, and image code string conversion program - Google Patents
Image code string conversion apparatus, image code string conversion method, and image code string conversion program Download PDFInfo
- Publication number
- JP2006217569A JP2006217569A JP2005360417A JP2005360417A JP2006217569A JP 2006217569 A JP2006217569 A JP 2006217569A JP 2005360417 A JP2005360417 A JP 2005360417A JP 2005360417 A JP2005360417 A JP 2005360417A JP 2006217569 A JP2006217569 A JP 2006217569A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- coding
- code string
- parameter
- macroblock
- 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.)
- Abandoned
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
【課題】 飛び越し走査方式の信号を符号化した動画像符号列の再符号化の際の符号化効率低下を抑え、変換に要する計算量を軽減する。
【解決手段】 復号化部において、第1動画像符号列から復号画像と符号化パラメータを生成する。符号化パラメータ変換部では、まず上下マクロブロックの組に対する符号化構造を、対応するマクロブロックの符号化構造に基づいて設定し、その符号化構造に基づいて動きベクトルなど残りのパラメータを変換する。符号化パラメータ生成部で、フレーム内符号化用のパラメータなどの符号化パラメータを生成し、符号化パラメータ選択部で最適なパラメータを選び、符号化部で再符号化処理を行う。
【選択図】 図1PROBLEM TO BE SOLVED: To suppress a reduction in encoding efficiency at the time of re-encoding a moving image code string obtained by encoding a signal of an interlaced scanning method and reduce a calculation amount required for conversion.
A decoding unit generates a decoded image and an encoding parameter from a first moving image code string. In the encoding parameter conversion unit, first, an encoding structure for a set of upper and lower macroblocks is set based on the encoding structure of the corresponding macroblock, and the remaining parameters such as motion vectors are converted based on the encoding structure. The encoding parameter generation unit generates an encoding parameter such as an intra-frame encoding parameter, the encoding parameter selection unit selects an optimum parameter, and the encoding unit performs re-encoding processing.
[Selection] Figure 1
Description
本発明は、画像符号列変換装置、画像符号列変換方法および画像符号列変換プログラムに関する。 The present invention relates to an image code string conversion apparatus, an image code string conversion method, and an image code string conversion program.
(従来技術)
従来の動画像符号列変換装置では、特許文献1に開示されているように、入力された第1動画像符号列を、ビットレートや符号化方式などの異なる第2動画像符号列へと変換する際に、第1動画像符号列に含まれる符号化パラメータを抽出し、第2動画像符号列への再符号化に適した符号化パラメータを適応的に選択して利用することで、再符号化に要する計算量の削減を行うものがあった。
(Conventional technology)
In the conventional moving image code string conversion device, as disclosed in
(問題点)
動画像の圧縮符号化に用いられる符号化方式としては、MPEG-2(Moving Picture Experts Group Phase 2)ビデオ方式や、MPEG-4ビジュアル方式、ITU-T(International Telecommunication Union-Telecommunication Standardization Sector)にて国際標準になっているH.264方式などが存在する。これらの符号化方式では、一つのピクチャについて、サイズの定義されたマクロブロックと呼ばれる処理単位に分割され、その各々のマクロブロックについて、動きベクトルや符号化モードといった符号化パラメータが設定されている。
(problem)
MPEG-2 (Moving Picture Experts Group Phase 2) video system, MPEG-4 visual system, ITU-T (International Telecommunication Union-Telecommunication Standardization Sector) There are H.264 systems that are international standards. In these encoding methods, one picture is divided into processing units called macroblocks having a defined size, and encoding parameters such as motion vectors and encoding modes are set for each macroblock.
上記の符号化方式で飛び越し走査方式の入力信号を符号化する際、符号化方式毎にその取り扱い方が異なることがある。例えば、MPEG-2ビデオ方式では、ピクチャ毎、もしくはマクロブロック一つ一つ毎に、フィールド構造とフレーム構造を切り替えて符号化することができる。 When an interlaced scanning input signal is encoded by the above encoding method, the handling method may differ depending on the encoding method. For example, in the MPEG-2 video system, encoding can be performed by switching the field structure and the frame structure for each picture or for each macroblock.
一方、H.264方式では、ピクチャ単位で符号化構造を切り替える場合にはMPEG-2と同様であるが、マクロブロック単位で符号化構造を切り替える場合、MB-AFF ( Macroblock-Adaptive Frame-Field Coding) と呼ばれる符号化方法を用いる。 On the other hand, in the H.264 scheme, when switching the coding structure in units of pictures, it is the same as MPEG-2, but in the case of switching the coding structure in units of macroblocks, MB-AFF (Macroblock-Adaptive Frame-Field Coding ) Is used.
このMB-AFFという符号化方法では、垂直方向上下に並んだ二つのマクロブロックをまとめてマクロブロックペアと呼ばれる処理単位で管理を行い、このマクロブロックペア単位でフィールド構造とフレーム構造の切替が行われる。このため、マクロブロックペアに含まれる上下のマクロブロックには、符号化構造が一致しなければならない、トップフィールドとボトムフィールドの符号化パラメータを上下のマクロブロックで分けて管理しなければいけないといった、いくつかの制約条件が発生する。 In this MB-AFF encoding method, two macroblocks arranged vertically in the vertical direction are managed together in a processing unit called a macroblock pair, and the field structure and frame structure are switched in units of the macroblock pair. Is called. For this reason, the upper and lower macroblocks included in the macroblock pair must have the same coding structure, and the top field and bottom field coding parameters must be managed separately in the upper and lower macroblocks. Several constraints occur.
このため、飛び越し走査方式である入力信号をMPEG-2で圧縮符号化された動画像符号列から、H.264の符号化形式の動画像符号列へと変換するような場合、従来の技術ではマクロブロックの符号化パラメータを個別に設定するために、マクロブロックペアにおける上記制約条件を満たしながら、効率よくマクロブロックペアの符号化パラメータを設定することができなかった。
上述したように、従来技術には、第2の動画像符号列におけるマクロブロックペアに対する符号化パラメータを、第1の動画像符号列におけるマクロブロックの符号化パラメータから効率よく変換できないという問題があった。 As described above, the conventional technique has a problem in that the encoding parameter for the macroblock pair in the second video code string cannot be efficiently converted from the macroblock encoding parameter in the first video code string. It was.
本発明は、上記従来技術の問題点を解決するためになされたものであって、第2動画像符号列における各マクロブロックペアの符号化パラメータを決定する際に、上記マクロブロックペアに対応する、第1動画像符号列における複数のマクロブロックを検出し、対応マクロブロックの符号化パラメータを用いて、一度にマクロブロックペアの符号化パラメータを設定することにより、第1動画像符号列の情報をより効率よく第2動画像符号列の符号化に応用して高い符号化効率の実現を可能とする動画像符号列変換装置、動画像符号列変換方法および動画像符号列変換プログラムを提供することを目的とする。 The present invention has been made to solve the above-described problems of the prior art, and corresponds to the macroblock pair when determining the encoding parameter of each macroblock pair in the second moving image code sequence. , By detecting a plurality of macroblocks in the first video code sequence and setting the encoding parameters of the macroblock pair at a time using the encoding parameters of the corresponding macroblock, information on the first video code sequence Is applied to the encoding of the second moving image code string more efficiently, and a moving image code string conversion device, a moving image code string conversion method, and a moving image code string conversion program capable of realizing high encoding efficiency are provided. For the purpose.
上記目的を達成するために本発明の一側面の画像符号列変換装置は、
飛び越し順序走査方式の映像信号をマクロブロック単位で圧縮符号化して得られる第1符号列を、マクロブロック単位で圧縮符号化される符号化方式に基づく第2符号列に変換する装置であって、
入力された第1符号列を復号化して復号画像および第1符号化パラメータを得る復号化部と、
前記復号画像上で垂直方向に隣接する前記第2符号列に関するマクロブロックの組の各々について、前記画像上で前記各組に対応する前記第1符号列に関する複数の対応マクロブロックの各々の前記第1符号化パラメータを変換して変換符号化パラメータを求める符号化パラメータ変換部と、
前記組の各マクロブロックの第2符号化パラメータとして、前記組に関して求められた前記変換符号化パラメータを選択する符号化パラメータ選択部と、
前記符号化パラメータ選択部で選択された前記第2符号化パラメータを用いて前記復号画像を圧縮符号化して、前記第2符号列を生成する符号化部と、
を備える。
In order to achieve the above object, an image code string conversion device according to one aspect of the present invention provides:
An apparatus for converting a first code string obtained by compressing and encoding a video signal of an interlaced order scanning method in units of macroblocks into a second code string based on an encoding method in which compression encoding is performed in units of macroblocks,
A decoding unit that decodes the input first code string to obtain a decoded image and a first encoding parameter;
For each set of macroblocks related to the second code sequence adjacent in the vertical direction on the decoded image, the first of each of the plurality of corresponding macroblocks related to the first code sequence corresponding to the set on the image. An encoding parameter conversion unit that converts one encoding parameter to obtain a conversion encoding parameter;
An encoding parameter selection unit that selects the transform encoding parameter obtained for the set as a second encoding parameter of each macroblock of the set;
An encoding unit that compresses and encodes the decoded image using the second encoding parameter selected by the encoding parameter selection unit and generates the second code string;
Is provided.
本発明によれば、第2動画像符号列におけるマクロブロックペアに対する符号化パラメータを、第1動画像符号列における対応マクロブロックの符号化パラメータに基づいてまとめて設定することにより、マクロブロックペアにおける符号化パラメータの制約条件を満たしながら、効率よく符号化パラメータを再利用することができ、符号化効率の向上および画質劣化の抑制が可能となる。 According to the present invention, the encoding parameters for the macroblock pair in the second video code sequence are collectively set based on the encoding parameters of the corresponding macroblock in the first video code sequence, so that the macro block pair While satisfying the constraint condition of the encoding parameter, the encoding parameter can be efficiently reused, and the encoding efficiency can be improved and the deterioration of the image quality can be suppressed.
以下、本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described.
(第1の実施形態)
図1は、本発明の第1の実施形態に関わる動画像符号列変換装置を示すブロック図である。
(First embodiment)
FIG. 1 is a block diagram showing a moving image code string conversion apparatus according to the first embodiment of the present invention.
この第1の実施形態に関わる動画像符号列変換装置は、
入力である第1動画像符号列100を復号化し、復号画像101の生成と符号化パラメータ102の抽出を行う復号化部110と、
符号化パラメータ102を分析し、第2の動画像符号列の符号化形式にあわせて符号化パラメータを変換する符号化パラメータ変換部111と、
復号画像101と既に符号化済みの第2動画像符号列103を用いて符号化パラメータ候補104を生成する符号化パラメータ生成部113と、
符号化パラメータ変換部111で変換された符号化パラメータ105と符号化パラメータ生成部で生成された符号化パラメータ104とから最終的に符号化に用いるパラメータ106を選択する符号化パラメータ選択部112と、
符号化パラメータ選択部112で選択された符号化パラメータ106を用いて第2動画像符号列の生成を行う符号化部114
とを備えている。
The moving image code string conversion device according to the first embodiment is
A
An encoding
An encoding
An encoding
An
And.
本実施例では、特に第1の動画像符号列について、飛び越し走査の動画像信号を符号化方式MPEG-2を用いて符号化したものを用いる。また、第2の動画像符号化信号として、MPEG-4 AVCを用いる場合について説明する。 In this embodiment, in particular, the first moving image code string is obtained by encoding a moving image signal of interlace scanning using the encoding method MPEG-2. A case will be described in which MPEG-4 AVC is used as the second moving image encoded signal.
次に図1および図2を用いて、本発明の第1の実施形態に係わる動画像符号列変換装置の動作について説明する。図2は、本発明の第1の実施形態に係わる動画像符号列変換装置の動作を示すフローチャートである。 Next, the operation of the moving picture code string conversion apparatus according to the first embodiment of the present invention will be described with reference to FIGS. FIG. 2 is a flowchart showing the operation of the video code string converter according to the first embodiment of the present invention.
第1動画像符号列100を復号化部110に入力する(ステップS100)。
First
復号化部110において、第1の動画像符号化列100を復号化し、符号化パラメータ102と復号画像101を生成する(ステップS101)。
In the
符号化パラメータ変換部111において、第1動画像符号列100の符号化パラメータ102を第2の符号化パラメータ105に変換する(ステップS102)。
The encoding
符号化パラメータ生成部113で第1動画像符号列の復号画像101と既に符号化済みの第2動画像符号列103を用いて符号化パラメータ104を生成しておく(ステップS103)。
The encoding
符号パラメータ選択部112で、符号化パラメータ変換部で変換されたパラメータ105と、符号化パラメータ生成部で生成されたパラメータ104とを評価し、最終的に符号化に用いるパラメータ106を選択する(ステップS104)。
The code
符号化パラメータ選択部で選択されたパラメータ106を用いて、符号化部114で第1動画像符号列の復号画像を第2動画像符号列103に符号化し(ステップS105)、第2動画像符号列103を出力する(ステップS106)。
Using the
なお、符号化パラメータ生成部113に、第1の動画像符号化列100から抽出した符号化パラメータを符号化パラメータ変換部111で変換する際に得られる符号化情報107を入力し、符号化パラメータ生成のための参照データとして用いる構成としてもよい。
Note that the
以下、図1における各処理部の詳細を説明する。 The details of each processing unit in FIG. 1 will be described below.
(復号化部)
復号化部110では、入力動画像符号列100を復号化し、復号画像101と第1動画像符号列に含まれる符号パラメータ102を抽出する。
(Decryption unit)
The
ここで抽出する符号化パラメータ102は、第1動画像符号列100がMPEG-2の場合には、下記の情報を含む。
The
符号列に含まれる復号画像の縦横の大きさを表す解像度情報、
符号列全体が順次走査方式であるか否かを示すプログレッシブ情報、
ピクチャのピクチャタイプ(フレーム内符号化(Iピクチャ)、フレーム間符号化(Pピクチャ、Bピクチャ))、
ピクチャの符号化構造(フレーム、フィールド)、
マクロブロックの符号化モード(フレーム内符号化、フレーム間符号化)、
マクロブロックの動き予測における参照先を示す動きベクトル、
マクロブロックの動き補償時のブロック形状、
マクロブロックがフレーム内符号化の場合に存在するDCTタイプ、
マクロブロックがフレーム間符号化の場合に存在する予測タイプ、
マクロブロックの動きベクトルがいずれのフィールドを参照しているかを表すフィールドセレクト、
本実施形態の復号化部110はこれらの情報を符号化パラメータ102として抽出する。
Resolution information indicating the size of the decoded image included in the code string,
Progressive information indicating whether the entire code string is a sequential scanning method,
Picture type of picture (intra-frame coding (I picture), inter-frame coding (P picture, B picture)),
Picture coding structure (frame, field),
Macroblock coding mode (intraframe coding, interframe coding),
A motion vector indicating a reference destination in macroblock motion prediction,
Block shape during macroblock motion compensation,
DCT type present when the macroblock is intra-frame coded,
The prediction type that exists when the macroblock is interframe coded,
A field select that indicates which field the macroblock motion vector references,
The
(符号化パラメータ変換部)
符号化パラメータ変換部111の処理の流れを、図3に示す。
(Encoding parameter converter)
A processing flow of the encoding
マクロブロックペアに対応するマクロブロックを求める(ステップS110)。 A macro block corresponding to the macro block pair is obtained (step S110).
対応マクロブロックに基づき、マクロブロック及びマクロブロックペアの符号化構造、すなわち、フレーム構造での符号化かフィールド構造での符号化かを決定する(ステップS111およびS112)。 Based on the corresponding macroblock, the coding structure of the macroblock and the macroblock pair, that is, coding with a frame structure or coding with a field structure is determined (steps S111 and S112).
決定されたマクロブロックペアと、対応マクロブロックの各々の符号化構造とを比較し(ステップS113)、矛盾するパラメータや足りないパラメータが存在する場合は変換もしくは生成する(ステップS114)。 The determined macroblock pair and each coding structure of the corresponding macroblock are compared (step S113), and if there are contradictory parameters or insufficient parameters, they are converted or generated (step S114).
対応マクロブロックの符号化パラメータを、第2動画像符号列の符号化方式にあわせて変換を行い(ステップS115)、第2動画像符号列生成の際の符号化パラメータ候補として出力する。 The encoding parameter of the corresponding macroblock is converted in accordance with the encoding scheme of the second moving image code string (step S115), and is output as an encoding parameter candidate when generating the second moving image code string.
以下、図3の各処理を具体的に説明する。 Hereinafter, each process of FIG. 3 is demonstrated concretely.
(S110:対応マクロブロックの検出)
マクロブロックペアに対応するマクロブロックを求める。本実施形態では解像度変換処理を含まず、第1の動画像符号列と第2の動画像符号列と解像度が一緒であり、マクロブロックの大きさも両方の符号化方式で一致することから、図4のように、第2の動画像符号列における変換先のマクロブロックペア200に対して第1の動画像符号列の変換元の2個のマクロブロック201および202が対応することとなる。
(S110: Detection of corresponding macroblock)
The macro block corresponding to the macro block pair is obtained. In the present embodiment, the resolution conversion process is not included, the first moving image code sequence, the second moving image code sequence, and the resolution are the same, and the size of the macroblock also matches in both encoding methods. As shown in FIG. 4, the two macroblocks 201 and 202 that are the conversion source of the first video code sequence correspond to the
(S111:対応マクロブロックの符号化構造の設定)
対応マクロブロックの各々について、符号化構造を求める。本発明において、符号化構造とは、フィールド構造、もしくはフレーム構造のいずれかとして定義される。
(S111: Setting of coding structure of corresponding macroblock)
A coding structure is obtained for each corresponding macroblock. In the present invention, the coding structure is defined as either a field structure or a frame structure.
符号化構造の具体的な判定方法を図5に示す。まず、マクロブロックの符号化モードを分析し(ステップS120)、フレーム内符号化(Intra)であるか、フレーム間符号化(NonIntra)であるかを判定する(ステップS121)。 A specific method for determining the coding structure is shown in FIG. First, the coding mode of the macroblock is analyzed (step S120), and it is determined whether the coding is intraframe coding (Intra) or interframe coding (NonIntra) (step S121).
フレーム間符号化の場合には、同じくマクロブロックに含まれる予測タイプの情報を分析(ステップS123およびS125)、予測タイプがフィールド予測であればフィールド構造(ステップS127)、フレーム予測であればフレーム構造とする(ステップS126)。 In the case of inter-frame coding, the information on the prediction type included in the macroblock is also analyzed (steps S123 and S125). If the prediction type is field prediction, the field structure (step S127), and if it is frame prediction, the frame structure (Step S126).
マクロブロックの符号化モードがフレーム内符号化だった場合には、マクロブロックのDCTタイプの情報を分析し(ステップS122およびS124)、DCTタイプがフィールドDCTであればフィールド構造(ステップS127)、フレームDCTであればフレーム構造(ステップS126)とする。 If the coding mode of the macroblock is intraframe coding, the DCT type information of the macroblock is analyzed (steps S122 and S124), and if the DCT type is field DCT, the field structure (step S127) If it is DCT, the frame structure is set (step S126).
(S112:マクロブロックペアの符号化構造決定)
各マクロブロックの符号化構造の判定が完了した後、対応マクロブロックの符号化構造に基づいて、マクロブロックペアの符号化構造を決定する。
(S112: Determination of coding structure of macroblock pair)
After the determination of the coding structure of each macroblock is completed, the coding structure of the macroblock pair is determined based on the coding structure of the corresponding macroblock.
具体的な処理の流れを図6に示す。 A specific processing flow is shown in FIG.
対応する2つのマクロブロックの符号化構造を比較する(ステップS130およびS131)。 The coding structures of the corresponding two macroblocks are compared (steps S130 and S131).
2つのマクロブロックの符号化構造が等しい場合(ステップS131がYesの場合)には、その符号化構造をそのままマクロブロックペアの符号化構造とする。すなわち、両方のマクロブロックの符号化構造がフィールド構造であればフィールド構造(ステップS133)に、フレーム構造であればフレーム構造とする(ステップS134)。 When the coding structures of the two macroblocks are equal (when step S131 is Yes), the coding structure is directly used as the coding structure of the macroblock pair. That is, if the coding structure of both macroblocks is a field structure, the field structure (step S133) is used, and if the coding structure is a frame structure, the frame structure is used (step S134).
一方がフレーム構造、もう一方がフィールド構造の場合には(ステップS131がNoの場合)、マクロブロックペアの符号化構造はフィールド構造とする(ステップS133)。 If one is a frame structure and the other is a field structure (No in step S131), the coding structure of the macroblock pair is a field structure (step S133).
変換元のピクチャのピクチャタイプがフレーム内符号化であった場合には、マクロブロックペアの符号化モードをフレーム内符号化として、符号化パラメータの変換処理を終了する。変換元のピクチャの符号化モードがフレーム間符号化の場合は、予測符号化に用いられる符号化パラメータを下記のように変換する。 When the picture type of the conversion source picture is intra-frame coding, the coding mode conversion process is completed with the coding mode of the macroblock pair as intra-frame coding. When the encoding mode of the conversion source picture is inter-frame encoding, encoding parameters used for predictive encoding are converted as follows.
(S114:マクロブロックペアの符号化構造にあわせた、対応マクロブロックのパラメータの変換)
マクロブロックペアと対応する各々のマクロブロックの符号化パラメータを、マクロブロックペアの符号化構造と合致するよう、第1動画像符号列の符号化方式に則って変換を行う。
(S114: Conversion of corresponding macroblock parameters in accordance with the coding structure of the macroblock pair)
The encoding parameter of each macroblock corresponding to the macroblock pair is converted in accordance with the encoding scheme of the first moving image code string so as to match the encoding structure of the macroblock pair.
(フレーム内符号化からフレーム間符号化への変換)
具体的な処理の流れを図7に示す。まず、対応マクロブロックの各々ついて、マクロブロックの符号化モードがフレーム内符号化である場合には(ステップS141がYesの場合)、フレーム間符号化モードへと変換し、本来存在しない動きベクトルや予測タイプも、マクロブロックの符号化構造に基づいて生成する(ステップS142)。
(Conversion from intra-frame coding to inter-frame coding)
A specific processing flow is shown in FIG. First, for each of the corresponding macroblocks, when the encoding mode of the macroblock is intraframe encoding (when step S141 is Yes), the corresponding macroblock is converted into an interframe encoding mode, A prediction type is also generated based on the coding structure of the macroblock (step S142).
具体的には、フレーム内符号化のDCTタイプがフィールド構造のときは予測タイプをフィールド予測に、DCTタイプがフレーム構造のときはフレーム予測に設定する。動きベクトルは、符号化部側で動きベクトル予測による動きベクトル生成を行うよう、フラグを設定しておく。これらの対応は、本実施形態における符号化パラメータ変換では、変換対象のピクチャのピクチャタイプがフレーム間符号化の場合、変換結果として出力する符号化パラメータは全てフレーム間符号化用とするためである。 Specifically, when the DCT type of intra-frame coding has a field structure, the prediction type is set to field prediction, and when the DCT type has a frame structure, it is set to frame prediction. For the motion vector, a flag is set so that motion vector generation by motion vector prediction is performed on the encoding unit side. This is because, in the encoding parameter conversion in the present embodiment, when the picture type of the picture to be converted is inter-frame encoding, all the encoding parameters output as the conversion result are for inter-frame encoding. .
(符号化構造の変更に伴う動きベクトルの変換)
次に、対応マクロブロックの各々の符号化構造と、変換先のマクロブロックペアの符号化構造を比較する(ステップS143)。符号化構造が異なる場合には(ステップS143がYesの場合)、マクロブロックペアの構造にあわせて、対応マクロブロックの符号化構造、動きベクトル、および予測タイプの変換を行う(ステップS144)。
(Conversion of motion vector due to coding structure change)
Next, each coding structure of the corresponding macroblock is compared with the coding structure of the conversion target macroblock pair (step S143). When the coding structures are different (when Step S143 is Yes), the coding structure of the corresponding macroblock, the motion vector, and the prediction type are converted in accordance with the structure of the macroblock pair (Step S144).
具体的には、対応マクロブロック800の符号化構造がフレーム構造、マクロブロックペア801の符号化構造がフィールド構造であった場合には、図8に示すように対応マクロブロック800の予測タイプをフィールドとし、フレーム予測動きベクトルをフィールド予測動きベクトルに変換する。このとき、フレーム予測動きベクトルMV2の垂直成分を半分として、同じ値を持つ二つのフィールド予測MV2'(topMV2'およびbottomMV2')を生成する。
Specifically, when the coding structure of the
また、対応マクロブロックの符号化構造がフィールド構造、マクロブロックペアの符号化構造がフレーム構造だった場合には、対応マクロブロックに含まれるフィールド予測動きベクトルからフレーム予測動きブロックを生成する。以上の変換処理を、対応マクロブロックの符号化構造が全てマクロブロックペアの符号化構造と一致するまで繰り返す(ステップS145)。 When the coding structure of the corresponding macroblock is a field structure and the coding structure of the macroblock pair is a frame structure, a frame prediction motion block is generated from the field prediction motion vector included in the corresponding macroblock. The above conversion process is repeated until the coding structure of the corresponding macroblock matches the coding structure of the macroblock pair (step S145).
(符号化形式変換)
対応マクロブロックとマクロブロックの符号化構造の対応がとれたら、最後に動きベクトルおよび動き補償ブロック形状の変換を行う。
(Encoding format conversion)
When the correspondence between the corresponding macroblock and the coding structure of the macroblock is obtained, the motion vector and the motion compensation block shape are finally converted.
具体的な変換方法を図9および図10に示す。 A specific conversion method is shown in FIGS.
図9はマクロブロックペアの符号化構造がフレーム構造の場合の動き補償ブロック900および901の形状を示す。マクロブロックペアの符号化構造がフレーム構造の場合、図9に示すように動き補償ブロック形状は上下共に16x16とし、動きベクトルは、フレーム予測動きベクトルとして、画素精度を考慮した上で同じ参照位置を指す動きベクトルへと変換する。 FIG. 9 shows the shapes of the motion compensation blocks 900 and 901 when the coding structure of the macroblock pair is a frame structure. When the coding structure of the macroblock pair is a frame structure, as shown in FIG. 9, the motion compensation block shape is 16x16 in both upper and lower directions, and the motion vector is the same as the frame prediction motion vector in consideration of pixel accuracy. Convert to the motion vector you point to.
図10はマクロブロックペアの符号化構造がフィールド構造の場合の動き補償ブロック1000、1001、1002および1003の形状と動きベクトルの割り当てとを示す。
FIG. 10 shows the shapes of
一方、マクロブロックペアの符号化構造がフィールド構造の場合、図10に示すように動き補償ブロック形状は16x8とする。また、動きベクトルについては、トップフィールドに関する2つの動きベクトルtopMV1およびtopMV2をマクロブロックペアの上のマクロブロックに割り当て、ボトムフィールドに関する2つの動きベクトルbottomMV1およびbottomMV2をマクロブロックペアの下のマクロブロックに割り当てる。 On the other hand, when the coding structure of the macroblock pair is a field structure, the motion compensation block shape is 16 × 8 as shown in FIG. Also, for motion vectors, two motion vectors topMV1 and topMV2 for the top field are assigned to the macroblock above the macroblock pair, and two motion vectors bottomMV1 and bottomMV2 for the bottom field are assigned to the macroblock below the macroblock pair. .
なお、動きブロック形状については、上記のように設定されたブロック形状の他のブロック形状に関するパラメータを設定しても良い。 In addition, about a motion block shape, you may set the parameter regarding the block shape other than the block shape set as mentioned above.
例えば、フィールド構造の場合、16x8のブロック形状2つから、16x16のブロック形状を設定しても良い。この場合、動きベクトルは2つの16x8ブロック形状用のもののうち、残差信号の大きさなどの評価値を用いていずれか一方の動きベクトルを選択する。 For example, in the case of a field structure, a 16x16 block shape may be set from two 16x8 block shapes. In this case, a motion vector is selected from among two 16 × 8 block shapes using an evaluation value such as the magnitude of a residual signal.
そのほか、16x16のブロック形状1つから、16x8ブロック形状を2つ生成しても良い。この場合、動きベクトルは2つのブロック形状に対して共に16x16ブロック形状用の動きベクトルを割り当てても良いし、動きベクトル予測を用いると設定しておき、後段の符号化パラメータ生成部で動きベクトルを算出させても良い。 In addition, two 16x8 block shapes may be generated from one 16x16 block shape. In this case, the motion vector may be assigned to the two block shapes for the 16x16 block shape, or set to use motion vector prediction, and the motion vector is set in the subsequent encoding parameter generation unit. It may be calculated.
(符号化パラメータ生成部)
符号化パラメータ変換部111が、第1動画像符号列100の符号化パラメータ102から、第2動画像符号列用の符号化パラメータ105を生成するのに対して、符号化パラメータ生成部113では、第1動画像符号列の復号画像101と既に符号化済みの第2動画像符号列103を用いて第2動画像符号列用の符号化パラメータを生成する。
(Encoding parameter generator)
The encoding
例えば第1動画像符号列のピクチャタイプがフレーム間符号化である場合、符号化パラメータ部は主にフレーム間符号化用の符号化パラメータを生成することから、符号化パラメータ生成部では、符号化パラメータ変換部により生成されないフレーム内符号化用パラメータ、スキップ、ダイレクト予測用のデータを生成する。 For example, when the picture type of the first moving image code sequence is inter-frame coding, the coding parameter unit mainly generates coding parameters for inter-frame coding. Intraframe encoding parameters, skip, and direct prediction data that are not generated by the parameter conversion unit are generated.
また、フレーム間符号化パラメータについても、符号化パラメータ変換部で予測動きベクトルを用いるとしてフラグを設定された箇所については、符号化パラメータ生成部で動きベクトル予測を行い、動きベクトルを生成する。 As for the interframe coding parameters, the coding parameter generation unit performs motion vector prediction and generates a motion vector for a portion where a flag is set so that the prediction parameter is used by the coding parameter conversion unit.
(符号化パラメータ選択部)
符号化パラメータ選択部の処理の流れを、図11に示す。
(Encoding parameter selector)
FIG. 11 shows a processing flow of the encoding parameter selection unit.
符号化パラメータ変換部111と符号化パラメータ生成部113とから、変換に用いる変換パラメータ候補105および104を取得する。具体的には、符号化パラメータ変換部111で生成されたフレーム間予測用符号化パラメータ105と、符号化パラメータ生成部113部で生成された、フレーム内予測用符号化パラメータおよびその他の符号化パラメータ104を取得する。
各符号化パラメータの候補について、符号化効率の評価を行う。具体的には、動きベクトルの評価であれば差分絶対和(SAD : Sum of Absolute Difference)やレート歪み特性(R-D : Rate-Distortion)などを用いることができる。 The encoding efficiency is evaluated for each encoding parameter candidate. Specifically, for motion vector evaluation, an absolute sum of differences (SAD), rate distortion characteristics (R-D: Rate-Distortion), or the like can be used.
最後に、もっとも符号化効率の良い符号化パラメータを、実際の符号化に用いるパラメータとして選択する。 Finally, an encoding parameter with the highest encoding efficiency is selected as a parameter used for actual encoding.
(符号化部)
符号化部では、符号化パラメータ選択部で選択したパラメータを用いて、復号画像を符号化処理し、第2動画像符号列を生成して出力する。
(Encoding part)
The encoding unit encodes the decoded image using the parameter selected by the encoding parameter selection unit, and generates and outputs a second moving image code string.
このように、第1の実施形態に係わる動画像符号列変換装置によれば、マクロブロックペアに対する符号化パラメータを、対応するマクロブロックの符号化パラメータに基づいてまとめて設定することにより、マクロブロックペアにおける符号化パラメータの制約条件を満たしながら、効率よく符号化パラメータを再利用することができ、符号化効率の向上および画質劣化の抑制が可能となる。 As described above, according to the moving picture code string conversion apparatus according to the first embodiment, by setting the encoding parameters for the macroblock pair collectively based on the encoding parameters of the corresponding macroblock, The encoding parameters can be reused efficiently while satisfying the encoding parameter constraint conditions in the pair, and the encoding efficiency can be improved and the deterioration of the image quality can be suppressed.
(第2の実施形態)
図12は、本発明の第2の実施形態に関わる動画像符号列変換装置を示すブロック図である。
(Second Embodiment)
FIG. 12 is a block diagram showing a video code string conversion apparatus according to the second embodiment of the present invention.
第1の実施形態における図1と比較して、解像度変換部120が復号化部110に後置され、復号化画像101を解像度変換した上で再符号化している点が異なる。
Compared with FIG. 1 in the first embodiment, a difference is that a
本実施形態において、解像度変換部は、入力信号の解像度よりも低い解像度へ変換するものとする。 In the present embodiment, the resolution conversion unit converts to a resolution lower than the resolution of the input signal.
第2の実施形態における符号化パラメータ変換部111では、一つのマクロブロックペアに対応する対応マクロブロックの数は2より多い数になる。具体的に対応マクロブロックとの関係を示した例を図13に示す。図13の例では、マクロブロックペア300に、復号化画像101の24個分のマクロブロックを占める対応マクロブロック301および302が対応している。
In the encoding
なお、マクロブロックペアの符号化構造としてより積極的にフィールド構造を用いるため、対応マクロブロックにフィールド構造のものが一つでも含まれる(MNUM1>0)場合に、マクロブロックペアの符号化構造をフィールド構造としてもよい。 Since the field structure is more actively used as the coding structure of the macroblock pair, if the corresponding macroblock includes at least one field structure (MNUM1> 0), the coding structure of the macroblock pair is changed. A field structure may be used.
(マクロブロックペアの符号化構造決定)
は、第1の実施形態における図6の処理とは異なり、対応する複数マクロブロックの符号化構造の数に基づいて決定される。具体的な処理の流れを図14に示す。
(Determine coding structure of macroblock pair)
Unlike the processing of FIG. 6 in the first embodiment, is determined based on the number of coding structures of corresponding macroblocks. A specific processing flow is shown in FIG.
まず、図13に示すような、第2動画像符号列の各マクロブロックペア300に対応する、第1動画像符号列の複数のマクロブロック(301および302で示した領域に含まれる複数の対応マクロブロック)を抽出し、その中の各マクロブロックの符号化構造を把握する(ステップS170)。
First, as shown in FIG. 13, a plurality of macroblocks (a plurality of correspondences included in the areas indicated by 301 and 302) corresponding to each
次に、複数の対応マクロブロックの符号化構造について、フィールド構造のマクロブロック数MNUM1とフレーム構造のマクロブロック数MNUM2を算出する(ステップS171)。 Next, the field structure macroblock number MNUM1 and the frame structure macroblock number MNUM2 are calculated for a plurality of corresponding macroblock coding structures (step S171).
次に、フィールド構造のマクロブロック数MNUM1とフレーム構造のマクロブロック数MNUM2とを比較する(ステップS172)。この比較の結果、フレーム構造のマクロブロック数MNUM2がフィールド構造 のマクロブロック数MNUM1より多い場合は、フレーム構造を用いたい再符号化により第2動画像符号列を生成し(ステップS173)、フレーム構造のマクロブロック数MNUM2がフィールド構造のマクロブロック数MNUM1より少ない場合は、フィールド構造を用いた再符号化により第2動画像符号列を生成する(ステップS174)。 Next, the number of macroblocks MNUM1 in the field structure is compared with the number of macroblocks MNUM2 in the frame structure (step S172). As a result of this comparison, if the number of macroblocks MNUM2 in the frame structure is greater than the number of macroblocks MNUM1 in the field structure, a second video code string is generated by re-encoding that uses the frame structure (step S173), and the frame structure When the number of macroblocks MNUM2 is smaller than the number of macroblocks MNUM1 of the field structure, a second video code string is generated by re-encoding using the field structure (step S174).
MNUM1とMNUM2を比較し、同数の場合にはフィールド構造を用いた再符号化により第2動画像符号列を生成する(ステップS174)。 MNUM1 and MNUM2 are compared, and if the number is the same, a second video code string is generated by re-encoding using the field structure (step S174).
また、MNUM1とMNUM2の数が同数の場合に、各マクロブロックについて符号化パラメータに基づいた評価値を設定し、各符号化構造の評価値の和を用いて符号化構造を決定しても良い。評価値としては、マクロブロックの符号量や符号量と量子化値との積などがある。 Also, when the number of MNUM1 and MNUM2 is the same, an evaluation value based on the encoding parameter may be set for each macroblock, and the encoding structure may be determined using the sum of the evaluation values of each encoding structure . The evaluation value includes the code amount of the macroblock and the product of the code amount and the quantization value.
以上では、フィールド構造のマクロブロック数NUM1とフレーム構造のマクロブロック数NUM2のみを単純に比較することで第2動画像符号列を生成する際の符号化構造を決定する手法について説明した。 In the above, the method of determining the coding structure when generating the second video code sequence by simply comparing the number of macroblocks NUM1 of the field structure and the number of macroblocks NUM2 of the frame structure has been described.
しかしながら、例えば、第2動画像符号列のマクロブロックペアに対応する各々の符号化構造を持つマクロブロックの対応面積を求め、対応面積の比率に応じて評価値を設定し、マクロブロックペアの符号化構造を判定することにより符号化構造を決定するとしてもよい。以下では、このような決定手法を適用するに場合について説明する。 However, for example, the corresponding area of the macroblock having each coding structure corresponding to the macroblock pair of the second moving image code string is obtained, and an evaluation value is set according to the ratio of the corresponding area, and the code of the macroblock pair The coding structure may be determined by determining the coding structure. Hereinafter, a case where such a determination method is applied will be described.
ここでは、特に水平方向の解像度を変換する場合について説明する。 Here, the case of converting the resolution in the horizontal direction will be described.
まず、1つのマクロブロックペアに対して、図18に示すようにa:bの比率で4つのマクロブロックが対応しているものとする。 First, it is assumed that four macroblocks correspond to one macroblock pair at a ratio of a: b as shown in FIG.
このとき、フィールド構造に関する評価値Vfieldとフレーム構造に関する評価値Vframeとを以下の式1及び式2を用いて求める。ここで、VfieldとVframeとの値の比が、マクロブロックペアがフレーム構造のマクロブロックに対応する面積と、フィールド構造のマクロブロックに対応する面積との比を表している。
ただし、式1及び式2中のMB0、MB1、MB2、MB3は、それぞれ図18に示す4つのマクロブロックの面積を表す。また、式1及び式2中のTfield及びTframeは、それぞれ対象マクロブロックの符号化構造がフィールド構造であるかフレーム構造であるかを定義する関数であり、以下に示す式3及び式4で定義される。
本手法に基づく具体的な処理の流れを図19に示す。 FIG. 19 shows a specific processing flow based on this method.
まず、第2動画像符号列の各マクロブロックペアに対応する、第1動画像符号列の複数のマクロブロックを抽出し、その中の各マクロブロックの符号化構造を把握する(ステップS180)。 First, a plurality of macroblocks of the first video code sequence corresponding to each macroblock pair of the second video code sequence are extracted, and the coding structure of each macroblock is grasped (step S180).
次に、式1及び式2を用いて、フィールド構造に関する評価値Vfieldとフレーム構造に関する評価値Vframeとを算出する(ステップS181)。
Next, an evaluation value V field related to the field structure and an evaluation value Vframe related to the frame structure are calculated using
次に、式1及び式2によって算出されたVfieldとVframeの値を比較する(ステップS182)。この比較の結果、Vfield < Vframeである場合には、フレーム構造を用いた再符号化により第2動画像符号列を生成する(ステップS183)。また、Vfield ≧Vframeである場合には、フィールド構造を用いた再符号化により第2動画像符号列を生成する(ステップS184)。
Next, the values of V field and V frame calculated by
このとき、Vfieldの値に重み付けを施し、フィールド構造を優先的に選択するようにしてもよい。本手法に基づく具体的な処理の流れを図20に示す。 At this time, the value of the V field may be weighted so that the field structure is preferentially selected. A specific processing flow based on this method is shown in FIG.
まず、第2動画像符号列の各マクロブロックペアに対応する、第1動画像符号列の複数のマクロブロックを抽出し、その中の各マクロブロックの符号化構造を把握する(ステップS190)。 First, a plurality of macroblocks of the first video code sequence corresponding to each macroblock pair of the second video code sequence are extracted, and the coding structure of each macroblock is grasped (step S190).
次に、式1及び式2を用いて、フィールド構造に関する評価値Vfieldとフレーム構造に関する評価値Vframeとを算出する(ステップS191)。
Next, an evaluation value V field related to the field structure and an evaluation value Vframe related to the frame structure are calculated using
次に、重み係数wの値を設定し(ステップS192)、Vfieldの値に重み付けを施した値とVframeの値とを比較する(ステップS193)。この比較の結果、Vframe > w × Vfieldである場合にはフレーム構造を選択し(ステップS194)、Vframe ≦ w × Vfieldである場合にはフィールド構造を選択する(ステップS195)。 Next, the value of the weighting coefficient w is set (step S192), and the value obtained by weighting the value of the V field is compared with the value of the V frame (step S193). As a result of this comparison, if V frame > w × V field , the frame structure is selected (step S194), and if V frame ≦ w × V field , the field structure is selected (step S195).
(重み係数の適応的調整)
上記の重み係数wは、変換する動画像符号列ごとに設定する。重み係数wの値は、動画像符号列毎に一意に決定してもよいし、動画像符号列内で適応的に決定してもよい。
(Adaptive adjustment of weighting factor)
The weight coefficient w is set for each moving image code string to be converted. The value of the weighting factor w may be uniquely determined for each moving image code string, or may be determined adaptively within the moving image code string.
重み係数wの適応的な設定方法としては、例えば、解像度の変換比率に基づいて決定する方法、第1動画像符号列のビットレートと第2動画像符号列のビットレートの比に基づいて決定する方法などを適用することができる。また、重み係数wの値は、解像度変換時の倍率に応じて動画像符号列毎に一意に決定してもよいし、対応マクロブロックの情報(動きベクトルの大きさ、分散、符号量など)、ピクチャの情報(ピクチャタイプ、符号量など)などに応じて、適応的に変化させてもよい。 As an adaptive setting method of the weighting coefficient w, for example, a method of determining based on a conversion ratio of resolution, a method of determining based on a ratio between the bit rate of the first video code sequence and the bit rate of the second video code sequence The method to do can be applied. Further, the value of the weighting factor w may be uniquely determined for each moving image code string in accordance with the magnification at the time of resolution conversion, or information on the corresponding macroblock (the size of the motion vector, the variance, the code amount, etc.) Depending on the information of the picture (picture type, code amount, etc.), it may be changed adaptively.
(重み係数の設定方法:常に一定の値を利用)
以下に、重み係数wの設定方法についての具体例について説明する。
(Weight factor setting method: always use a constant value)
Hereinafter, a specific example of the method for setting the weighting coefficient w will be described.
マクロブロックペアに対応するフィールド構造のマクロブロックの面積比率がある一定の割合α(0≦α≦1)を超えたときに、常にフィールド構造になるよう重み係数wを設定する場合には、重み係数wは以下の式5により算出することができる。
上記の式5で定めた重み係数wを用いることで、つねに一定の割合α以上フィールド構造のマクロブロックが含まれるときに、マクロブロックペアの符号化構造をフィールド構造と判定することができる。 By using the weighting coefficient w defined in the above equation 5, when a macroblock having a field structure is always included in a certain ratio α or more, the coding structure of the macroblock pair can be determined as the field structure.
(重み係数の設定方法:動きベクトルの距離を利用)
つぎに、重み係数wの別の設定方法として、フィールド予測の動きベクトルにおけるトップフィールドに対応するベクトルと、ボトムフィールドに対応するベクトルとの差分に基づく設定方法を以下に示す。
(Weight coefficient setting method: Use distance of motion vector)
Next, as another setting method of the weight coefficient w, a setting method based on the difference between the vector corresponding to the top field and the vector corresponding to the bottom field in the motion vector of the field prediction will be described below.
マクロブロックペアに対応するマクロブロックの中にフィールド構造のマクロブロックが存在する場合について考える。 Consider a case where a macroblock having a field structure exists in a macroblock corresponding to a macroblock pair.
フィールド予測であるマクロブロックの場合、トップフィールドに対応するベクトルと、ボトムフィールドに対応するベクトルとが存在する。このとき、マクロブロックに含まれる2つの動きベクトル同士の距離が大きい場合には、対応マクロブロック内に、位相の異なる2つのフィールドが存在する可能性が大きいと考えられる。この時のベクトル間の距離としては、ユークリッド距離などを用いる。 In the case of a macroblock that is field prediction, there are a vector corresponding to the top field and a vector corresponding to the bottom field. At this time, if the distance between the two motion vectors included in the macroblock is large, it is considered that there is a high possibility that two fields having different phases exist in the corresponding macroblock. The Euclidean distance or the like is used as the distance between vectors at this time.
そこで、この1つの対応マクロブロックに含まれる2つのフィールド予測動きベクトルの距離に応じて、重み係数wを適応的に変化させることで、変換元のMPEG-2の状態に合わせた符号化構造の決定が可能となる。 Therefore, by changing the weighting factor w adaptively according to the distance between the two field prediction motion vectors included in this one corresponding macroblock, the coding structure in accordance with the state of the source MPEG-2 is converted. Decisions can be made.
このとき、ピクチャ全体の各フィールド構造であるマクロブロックについて同様にフィールド予測動きベクトル間の距離を算出し、その統計量に基づいてピクチャ単位で重み係数wの値を変化させてもよい。 At this time, the distance between the field prediction motion vectors may be calculated in the same manner for the macroblock having each field structure of the entire picture, and the value of the weight coefficient w may be changed in units of pictures based on the statistics.
(重み係数の設定方法:ビットレートの利用)
MPEG-2のフレーム予測と、フィールド予測とを比較した場合、16x16ブロック形状によるフレーム予測は、16x8フィールド予測2つでほぼ同様の動き補償を実現できる。動きベクトルが増加する分符号量は増加するが、変換後のビットレートが動きベクトル符号量の増分を無視できる程度の大きさであれば、フィールド構造を優先した方が、変換元のMPEG-2の動きベクトルを有効に活用できる場合が多い。
(How to set weighting factor: use bit rate)
When MPEG-2 frame prediction and field prediction are compared, frame prediction with a 16x16 block shape can achieve substantially the same motion compensation with two 16x8 field predictions. The amount of code increases as the motion vector increases, but if the bit rate after conversion is large enough to ignore the increase in the amount of motion vector code, the field structure should be prioritized and the conversion source MPEG-2 In many cases, the motion vector can be used effectively.
一方で、変換後のビットレートが小さく、符号にしめるマクロブロックヘッダ部分の符号量の比率が大きい場合には、動きベクトルの符号量が全体の画質に大きく影響することがある。このため、変換元の第1動画像符号列のビットレートに対する変換後の第2動画像符号列のビットレートの比率に応じて、フィールド構造に対する重み係数wの値を変化させることで、画質向上が可能となる。 On the other hand, when the bit rate after conversion is small and the ratio of the code amount of the macroblock header portion to be encoded is large, the code amount of the motion vector may greatly affect the overall image quality. For this reason, the image quality is improved by changing the value of the weighting factor w for the field structure in accordance with the ratio of the bit rate of the converted second video code sequence to the bit rate of the first video code sequence of the conversion source. Is possible.
このビットレートの比率に応じた重み係数wの値は、ストリームに対して一意に決定してもよい。また、可変ビットレートのストリームに対しては、GOP(Group of Picture)毎、ピクチャ毎の符号量などに基づき、より細かな精度で動的に変化させてもよい。 The value of the weighting factor w corresponding to the bit rate ratio may be uniquely determined for the stream. In addition, a variable bit rate stream may be dynamically changed with finer accuracy based on a code amount for each GOP (Group of Picture) or each picture.
(重み係数の設定方法:アクティビティの利用)
次に、動画像符号列のアクティビティに基づいて重み係数wの値を調整する場合について説明する。
(Weight factor setting method: Use of activity)
Next, a case where the value of the weighting coefficient w is adjusted based on the activity of the moving image code string will be described.
ここで、アクティビティとは、符号化する動画像のもつ情報量を表す数値である。動画像変換処理では、次のようにしてアクティビティ算出する。 Here, the activity is a numerical value representing the information amount of the moving image to be encoded. In the moving image conversion process, the activity is calculated as follows.
マクロブロック単位でのアクティビティは、各マクロブロック毎の符号量と量子化ステップ幅の値の乗算で求まる。ピクチャ単位の場合、ピクチャの平均量子化ステップ幅とピクチャ符号量の乗算で求まる。 The activity in units of macroblocks is obtained by multiplying the code amount for each macroblock by the value of the quantization step width. In the case of a picture unit, it is obtained by multiplying the average quantization step width of a picture and the picture code amount.
上記のように算出したアクティビティを用いて、実際に重み係数wの値の動的変更を行う。たとえば、フィールド構造およびフレーム構造のマクロブロックの各々のアクティビティの値を、評価値Vfield、Vframeと同様にして面積比に併せて足しあわせ、その比を用いて重み係数wの値を調整することが可能である。また、VfieldとVframeの値が近い場合に、各々の符号化構造のアクティビティの大小に基づいて最終的なマクロブロックペアの符号化構造を決定してもよい。そのほか、ピクチャ単位でのアクティビティに基づき、ピクチャ単位で適応的に重み係数wの値を調節してもよい。 Using the activity calculated as described above, the value of the weighting factor w is actually dynamically changed. For example, the activity values of the field structure and frame structure macroblocks are added to the area ratio in the same manner as the evaluation values V field and V frame, and the weight coefficient w is adjusted using the ratio. It is possible. Further, when the values of V field and V frame are close, the final coding structure of the macroblock pair may be determined based on the magnitude of the activity of each coding structure. In addition, the value of the weighting factor w may be adjusted adaptively for each picture based on the activity for each picture.
(重み係数の設定方法:複数手法組み合わせの許可)
上述した重み係数の調整方法について、各々単独で用いてもよいし、複数の調整法を組み合わせて使用してもよい。
(Weight coefficient setting method: Allow multiple method combinations)
About the adjustment method of the weighting factor mentioned above, you may use individually, respectively, and you may use combining several adjustment methods.
(重み係数をオフセット値として利用)
また、重み係数wとVfieldを線形結合するのではなく、オフセット値として足し合わせてもよい。具体的にはVframe > w + Vfieldであればフレーム構造、Vframe ≦ w + Vfieldであればフィールド構造とする。この場合も、上記と同様の方法を用いて、重み係数wの値を変動させることができる。図21に処理の流れを示す。
(Weighting factor is used as an offset value)
Further, the weight coefficient w and V field may be added together as an offset value instead of linearly combining. Specifically, if V frame > w + V field , the frame structure is used, and if V frame ≦ w + V field , the field structure is used. Also in this case, the value of the weighting factor w can be changed using the same method as described above. FIG. 21 shows the flow of processing.
まず、第2動画像符号列の各マクロブロックペアに対応する、第1動画像符号列の複数のマクロブロックを抽出し、その中の各マクロブロックの符号化構造を把握する(ステップS200)。 First, a plurality of macroblocks of the first video code sequence corresponding to each macroblock pair of the second video code sequence are extracted, and the coding structure of each macroblock is grasped (step S200).
次に、式1及び式2を用いて、フィールド構造に関する評価値Vfieldとフレーム構造に関する評価値Vframeとを算出する(ステップS201)。
Next, the evaluation value V field related to the field structure and the evaluation value Vframe related to the frame structure are calculated using
次に、重み係数wの値を設定し(ステップS202)、Vfieldの値に重み付けを施した値とVframeの値とを比較する(ステップS203)。この比較の結果、Vframe > w + Vfieldである場合にはフレーム構造を選択し(ステップS204)、Vframe ≦ w + Vfieldである場合にはフィールド構造を選択する(ステップS205)。なお、重み係数wは上述と同様の方法を用いて一意に、または適応的に調整することが可能である。 Next, the value of the weighting factor w is set (step S202), and the value obtained by weighting the value of the V field is compared with the value of the V frame (step S203). As a result of this comparison, if V frame > w + V field , the frame structure is selected (step S204), and if V frame ≦ w + V field , the field structure is selected (step S205). The weighting factor w can be adjusted uniquely or adaptively using the same method as described above.
(垂直方向、4つ以上のマクロブロックへの対応)
以上の説明では、特に水平方向について解像度変換を行う場合に限定し、1つのマクロブロックペアに4つのマクロブロックが対応する場合について説明したが、垂直方向の解像度変換を行う場合、水平・垂直の両方向の解像度変換を行う場合、或いは1つのマクロブロックペアに4つより多くのマクロブロックが対応する場合には、上述の説明と同様にしてマクロブロックごとに対応比率を求め、その対応比率に従って式1及び式2を拡張することで、上述の説明と同様にして第2動画像符号列を生成する際の符号化構造を決定することが可能である。
(Vertical direction, support for 4 or more macroblocks)
In the above description, the case where four macroblocks correspond to one macroblock pair is described only when the resolution conversion is performed in the horizontal direction. However, when the resolution conversion in the vertical direction is performed, horizontal and vertical When performing resolution conversion in both directions, or when more than four macroblocks correspond to one macroblock pair, the corresponding ratio is obtained for each macroblock in the same manner as described above, and an equation is determined according to the corresponding ratio. By extending 1 and
(動きベクトルの変換)
動きベクトルの変換の際、解像度変換を伴う変換では、動きベクトルの候補として複数存在することから、いずれの動きベクトルが適しているかを評価値を用いて比較し、最適な動きベクトルを選択する。
(Motion vector conversion)
At the time of motion vector conversion, there are a plurality of motion vector candidates in the conversion accompanied by resolution conversion. Therefore, which motion vector is suitable is compared using an evaluation value, and an optimal motion vector is selected.
評価値としては、例えば、マクロブロックの予測残差符号量、量子化値、動きベクトルの大きさ、予測残差と符号量の乗算値などを用いることができる。 As the evaluation value, for example, a prediction residual code amount of a macroblock, a quantized value, a motion vector size, a multiplication value of the prediction residual and the code amount, and the like can be used.
また、解像度変換の比率にあわせて動きベクトルのスケーリングを行う。なお、動きベクトルのスケーリング時には、第2動画像符号列の符号化方式でサポートされている精度で端数処理を行う。具体的には、MPEG-2であれば動きベクトルの精度は1/2画素精度であるが、H.264では1/4画素精度であるため、スケーリング時は1/4画素精度で値を求める。 Also, the motion vector is scaled according to the resolution conversion ratio. Note that, at the time of scaling the motion vector, the fraction processing is performed with the accuracy supported by the encoding scheme of the second moving image code string. Specifically, motion vector accuracy is 1/2 pixel accuracy with MPEG-2, but 1/4 pixel accuracy with H.264, so values are obtained with 1/4 pixel accuracy during scaling. .
(動き補償ブロック形状の変換)
動き補償ブロック形状についても、実施形態1と異なり、1対1で対応づけて変換できない場合が存在する。また、解像度変換に伴い、マクロブロックペアに対応する第1動画像符号列のマクロブロックの大きさが相対的に小さくなることから、対応マクロブロックのいずれか一つのブロック形状を用いても、ブロック形状が小さくなりすぎて符号化効率が低下する事態が起こりうる。
(Conversion of motion compensation block shape)
Unlike the first embodiment, the motion compensation block shape may not be converted in one-to-one correspondence. In addition, since the size of the macro block of the first video code sequence corresponding to the macro block pair becomes relatively small with the resolution conversion, even if any one block shape of the corresponding macro block is used, the block There may occur a situation where the shape becomes too small and the coding efficiency decreases.
そこで、こうした場合には、あらかじめマクロブロックペアの符号化構造に基づいて動き補償ブロック形状を決めておく。具体的にはフレーム構造であれば16x16、フィールド構造であれば16x8のブロック形状を用いることにする。 In such a case, the motion compensation block shape is determined in advance based on the coding structure of the macroblock pair. Specifically, a 16 × 16 block shape is used for the frame structure, and a 16 × 8 block shape is used for the field structure.
なお、第1の実施形態の場合と同様にして、生成するブロック形状については一つに限る必要はない。例えば、フレーム構造で16x8のブロック形状を生成しても構わないし、フィールド構造で16x16のブロック形状を生成しても構わない。 Note that the block shape to be generated need not be limited to one as in the case of the first embodiment. For example, a 16 × 8 block shape may be generated with a frame structure, or a 16 × 16 block shape may be generated with a field structure.
最終的な変換では、第1の実施形態と同様に、対応マクロブロックの各々について、マクロブロックペア構造にあわせて図2に示したようにパラメータを生成し、第2動画像符号列用の符号化パラメータへと変換する。 In the final conversion, as in the first embodiment, for each corresponding macroblock, parameters are generated as shown in FIG. 2 according to the macroblock pair structure, and the code for the second video code string is generated. Convert to conversion parameter.
復号化部、符号化パラメータ選択部、符号化部の処理は第1の実施形態と同様に行う。 The processes of the decoding unit, the encoding parameter selection unit, and the encoding unit are performed in the same manner as in the first embodiment.
このように、第2の実施形態に係る動画像符号列変換装置によれば、解像度変換を伴う変換においても、マクロブロックペアに対する符号化パラメータを、対応する複数のマクロブロックの符号化パラメータに基づいてまとめて設定することにより、マクロブロックペアにおける符号化パラメータの制約条件を満たしながら、効率よく符号化パラメータを再利用することができ、さらなる符号量減少が期待できる。 As described above, according to the moving image code string conversion device according to the second embodiment, the encoding parameter for the macroblock pair is based on the encoding parameters of the corresponding macroblocks even in the conversion with resolution conversion. By setting all together, it is possible to efficiently reuse the coding parameters while satisfying the restriction condition of the coding parameters in the macroblock pair, and further reduction of the code amount can be expected.
(第3の実施形態)
図15乃至図17を用いて、本発明の第3の実施形態の構成と動作について説明する。図15は、本発明の第3の実施形態に係る動画像符号列変換装置のブロック図である。
(Third embodiment)
The configuration and operation of the third embodiment of the present invention will be described with reference to FIGS. FIG. 15 is a block diagram of a video code string converter according to the third embodiment of the present invention.
本発明の第3の実施形態は、MPEG2方式で符号化された第1動画像符号列500を入力し、H.264方式で再符号化された第2の動画像符号列503を出力するものである。
In the third embodiment of the present invention, a first
第1動画像符号列500は、MPEG2デコーダ510により復号化処理が行われ、デコード画像501を出力するとともに、ピクチャタイプ(Iピクチャ、Pピクチャ、Bピクチャの何れか)、符号化シーケンスがプログレッシブ画像のみを符号化したものか(以下、プログレッシブシーケンス)或いはインターレース画像を含む符号化データかを示すフラグ、ピクチャ構造(プログレッシブフレームピクチャ、インターレースフレームピクチャ、フィールドピクチャ)などの、符号化ピクチャ単位の符号化パラメータ(502の上段)を出力し、ピクチャタイプ設定部522により、H.264再符号化時のピクチャレベルの符号化構造が決定される。
The first moving
図16は、本発明の第3の実施形態に係るピクチャタイプ設定部522での動作例を示す。MPEG2符号化データがプログレッシブシーケンスとして符号化されている場合は、H.264において、対応する各フレームをプログレッシブフレームピクチャとして再符号化する。
FIG. 16 shows an operation example in the picture
また、MPEG2符号化データが、非プログレッシブシーケンスである場合は、MPEG2のフレームピクチャは、H.264のMB-AFFフレームピクチャとして、また、MPEG2のフィールドピクチャは、H.264のフィールドピクチャとしてそれぞれ再符号化する。また、MPEG2における符号化ピクチャのタイプがIピクチャであるピクチャは、H.264でIスライスのみで構成される参照ピクチャとして再符号化し、MPEG2のBピクチャは、H.264のBスライスのみで構成される非参照ピクチャとして再符号化する。 When the MPEG2 encoded data is a non-progressive sequence, the MPEG2 frame picture is replayed as an H.264 MB-AFF frame picture, and the MPEG2 field picture is replayed as an H.264 field picture. Encode. In addition, a picture whose type of coded picture in MPEG2 is an I picture is re-encoded as a reference picture composed of only I slices in H.264, and an MPEG2 B picture is composed only of B slices in H.264 Re-encoding as a non-reference picture.
さらに、MPEG2のPピクチャについては、MPEG2で規定されるdual-prime予測(前方の2フィールドの参照ピクチャからそれぞれ予測画像ブロックを切り出し、それらの平均値を予測画像としてピクチャ間予測符号化を行うモード)を含むものは、H.264のBスライスのみで構成される参照ピクチャとして再符号化する。 Furthermore, for MPEG2 P-pictures, dual-prime prediction defined in MPEG2 (a mode in which predictive image blocks are cut out from the reference pictures of the two preceding fields and inter-picture predictive coding is performed using the average value as a predictive image) ) Are re-encoded as a reference picture made up of only H.264 B slices.
また、dual-prime予測を含まないMPEG2のPピクチャについては、H.264のPスライスのみで構成される参照ピクチャとして再符号化する。上記のようなピクチャレベルの対応を持たせることで、マクロブロック単位のフレーム間予測構造のMPEG2とH.264との対応付けが容易になり、マクロブロック単位の動きベクトルや予測モードなどの再利用性が向上し、H.264再符号化時の演算コスト(演算量またはハードウエアコスト)を大幅に削減することが可能となる。 In addition, an MPEG2 P picture that does not include dual-prime prediction is re-encoded as a reference picture composed of only H.264 P slices. By providing the picture level correspondence as described above, it becomes easy to associate MPEG2 and H.264 of the inter-frame prediction structure in macroblock units, and reuse of motion vectors and prediction modes in macroblock units. Thus, it is possible to significantly reduce the calculation cost (calculation amount or hardware cost) at the time of H.264 re-encoding.
図17は、ピクチャタイプ設定部522の別の実施形態である。図16の構成との違いは、dual-prime予測の有無によらずMPEG2のPピクチャは、H.264のPスライスのみで構成される参照ピクチャとして再符号化することである。MPEG2のPピクチャでは、該Pピクチャとその参照ピクチャとの間に再生順序でBピクチャが含まれていない場合にのみdual-prime予測が利用可能であり、かつピクチャ内のすべてのマクロブロックの予測モードを調べなければ、dual-prime予測の有無は判断できない。
FIG. 17 shows another embodiment of the picture
したがって、MPEG2からH.264への再符号化において、少なくとも1フレームの遅延が必要となり、遅延に必要なバッファメモリの増加や、再符号化に伴う時間的な遅れが発生することになる。 Accordingly, in the re-encoding from MPEG2 to H.264, a delay of at least one frame is required, and an increase in buffer memory necessary for the delay and a time delay associated with the re-encoding occur.
一方、dual-prime予測は、過去2フィールドの平均予測を行うため、H.264のPスライスでは、同様のピクチャ間予測を行うことが不可能となる。また、MPEG2のすべてのPピクチャをH.264のBスライスとして再符号化すると、H.264のBスライスの予測ブロック単位の予測モードを示す符号化データ等のオーバーヘッドが増加し、符号化効率の低下を招いてしまう。 On the other hand, since dual-prime prediction performs average prediction of the past two fields, it is impossible to perform similar inter-picture prediction in the H.264 P slice. Also, if all MPEG2 P pictures are re-encoded as H.264 B slices, the overhead of encoded data indicating the prediction mode in units of prediction blocks of H.264 B slices will increase, and the coding efficiency will be increased. It will cause a decline.
これらの問題を解決するため、MPEG2のdual-prime予測を用いるマクロブロックでは、過去2フィールドの参照ピクチャのうち、符号化対象ピクチャに時間的に近い方の参照フィールドのみを用いた単一予測として、H.264で再符号化することで、MPEG2のPピクチャのすべてのマクロブロックを、その動きベクトルの情報を再利用してH.264のPスライスで再符号化を行うことが可能となる。これにより、上記再符号化時の遅延の問題と予測構造の再利用性の問題を合わせて解決し、かつH.264再符号化時の演算コストの増加を抑え、さらに再符号化における符号化効率の低下も防ぐことが可能となる。 In order to solve these problems, in macroblocks using MPEG-2 dual-prime prediction, as a single prediction using only the reference field temporally closest to the current picture to be encoded among the reference pictures of the past two fields By re-encoding with H.264, it becomes possible to re-encode all macroblocks of MPEG2 P-pictures with H.264 P-slices by reusing the motion vector information. . This solves the problem of delay at the time of re-encoding and the problem of reusability of the prediction structure together, suppresses the increase in calculation cost at the time of H.264 re-encoding, and further encodes at the time of re-encoding. It is possible to prevent a decrease in efficiency.
次に、図15におけるマクロブロック単位の個々の動作について説明する。 Next, individual operations in units of macroblocks in FIG. 15 will be described.
第1動画像符号列500におけるマクロブロック単位の符号化パラメータのうち、量子化スケール値とマクロブロック単位の符号量(502の中段)が抽出され、レート制御部523に入力され、H.264再符号化のマクロブロック単位の発生符号量もまた、レート制御部523にフィードバックされて、H.264再符号化時の符号量制御に用いられる。
Of the encoding parameters for each macroblock in the first moving
再符号化時の符号量制御に、上記第1動画像符号列500における符号化情報を入力することは必須ではないが、これらのMPEG2符号化データの情報を用いることで、マクロブロック単位の符号化特性を事前に把握し、画質劣化の少ない効率的なレート制御を実現することが可能となる。
Although it is not indispensable to input the encoding information in the first moving
また、第1動画像符号列500におけるマクロブロック単位の符号化パラメータのうち、動きベクトルやMPEG2規格で定められる動き補償モード(フレーム予測、フィールド予測、dual-prime予測など)、DCTタイプ(frame DCTかfield DCTか)などの情報を抽出し、符号化パラメータ変換部520へ入力し、該符号化パラメータが、H.264に直接対応可能な場合は、そのまま再符号化時に再利用する。
In addition, among the coding parameters in units of macroblocks in the first moving
例えば、MPEG2がプログレッシブシーケンスとして符号化されている場合、H.264の動き補償ブロックサイズを16x16画素とすることで、MPEG2の動きベクトルをそのまま利用することが出来る。 For example, when MPEG2 is encoded as a progressive sequence, the motion vector of MPEG2 can be used as it is by setting the motion compensation block size of H.264 to 16 × 16 pixels.
また、MPEG2でフィールドピクチャとして符号化されている場合、MPEG2の16x16フィールド予測モードは、H.264の16x16予測として、また、MPEG2の16x8フィールド予測モードは、H.264においても16x8サイズのピクチャ間予測として、動きベクトルをそのまま利用可能である。 Also, when encoded as a field picture in MPEG2, the 16x16 field prediction mode of MPEG2 is 16x16 prediction of H.264, and the 16x8 field prediction mode of MPEG2 is also between 16x8 size pictures in H.264. As a prediction, the motion vector can be used as it is.
MPEG2のdual-prime予測の場合は、上述したようにH.264のBスライスとして再符号化する場合は、その動きベクトルはそのまま再利用可能であり、H.264のPスライスとして再符号化する場合は、符号化対象ピクチャに近い参照フィールドのみからの単一予測とすることで、動きベクトルを再利用することが可能となる。 In the case of MPEG-2 dual-prime prediction, when re-encoding as an H.264 B slice as described above, the motion vector can be reused as it is and re-encoded as an H.264 P slice. In this case, the motion vector can be reused by performing the single prediction only from the reference field close to the encoding target picture.
また、MB-AFFのペアタイプなどで、MPEG2の符号化パラメータがH.264に直接対応不可能な場合は、本発明の第1あるいは第2の実施形態で説明したように、MPEG2の符号化パラメータに対して符号化パラメータ変換部520で適切な変換を施し、さらにH.264再符号化時のマクロブロックペア単位の符号化構造がframe構造かfield構造かをframe/field設定部521で設定し、H.264再符号化で再利用する。
Also, if the MPEG-2 encoding parameter is not directly compatible with H.264, such as the MB-AFF pair type, the MPEG2 encoding is performed as described in the first or second embodiment of the present invention. Appropriate conversion is performed on the parameter by the encoding
より具体的には、MPEG2におけるIピクチャについては、H.264のIスライスのみで構成されるピクチャとして再符号化し、MPEG2のIピクチャにおいて、frame DCTとfield DCTが混在する場合は、MB-AFFフレームとして再符号化する。 More specifically, an MPEG-2 I picture is re-encoded as a picture composed of only H.264 I slices, and when a frame DCT and a field DCT are mixed in an MPEG2 I picture, MB-AFF Re-encode as a frame.
H.264のマクロブロックペアに相当するMPEG2のマクロブックの組が、それぞれ同一のDCTタイプで符号化されている場合、該タイプにしたがって、マクロブロックペアのタイプ(frameペアまたはfieldペア)を決定し、frame DCTとfield DCTが混在するペアについては、fieldペアとする。 When MPEG2 macrobook pairs corresponding to H.264 macroblock pairs are encoded with the same DCT type, the macroblock pair type (frame pair or field pair) is determined according to the type. A pair in which frame DCT and field DCT are mixed is a field pair.
上記決定されたマクロブロックペアのタイプで、イントラ予測符号化部525により複数のイントラ予測モード(Intra4x4予測(最大9モード), Intra8x8予測(最大9モード), Intra16x16予測(最大4モード))の中から、最適な予測モードの組をマクロブロック毎に決定して再符号化を行う。
The type of macroblock pair determined above, and the
最適な予測モードは、予測誤差信号の差分絶対値和などの評価値を用いた判定や、各モードでの発生符号量またはその推定値と、符号化歪またはその推定値を用いた、レート−歪最適化手法によるモード判定により、決定することが可能である。 The optimum prediction mode is determined using an evaluation value such as a sum of absolute differences of prediction error signals, a generated code amount in each mode or an estimated value thereof, and a rate − using an encoding distortion or an estimated value thereof. It can be determined by mode determination using a distortion optimization method.
上記のようにMB-AFFのペアタイプをMPEG2の符号化情報のみから事前に決定することで、H.264再符号化において最適なペアタイプを改めて決定する処理が不要となり、再符号化時の演算コスト(演算量またはハードウエアコスト)を大幅に削減することが可能となる。 By determining the MB-AFF pair type in advance from only MPEG2 encoding information as described above, the process of re-determining the optimal pair type in H.264 re-encoding becomes unnecessary, and re-encoding is not necessary. Calculation costs (calculation amount or hardware cost) can be greatly reduced.
また、MPEG2におけるPピクチャあるいはBピクチャについては、ピクチャ間予測符号化が用いられているマクロブロックについては、MPEG2の符号化データから抽出され、必要に応じて適切に変換された動きベクトルを中心として、動きベクトル再探索部524により微小領域での動きベクトルの再探索を必要に応じて行う。
In addition, for P-pictures or B-pictures in MPEG2, macroblocks for which inter-picture predictive encoding is used are extracted from MPEG2 encoded data and centered on motion vectors that are appropriately converted as necessary. Then, the motion vector
MPEG2は通常1/2画素精度の動きベクトルが用いられ、H.264は通常1/4画素精度の動きベクトルが用いられる。よって、本実施形態では、上記動きベクトルの再探索は、少なくとも探索中心の近傍±0.25を探索する構成とする。 MPEG2 normally uses a motion vector with 1/2 pixel accuracy, and H.264 normally uses a motion vector with 1/4 pixel accuracy. Therefore, in this embodiment, the re-search of the motion vector is configured to search for at least the vicinity ± 0.25 of the search center.
また、再符号化時の符号化効率を高めるためには、1/2画素精度の探索中心を整数画素位置に丸めて、その近傍±1.75の範囲を探索することで、より適切な動きベクトルを決定することが可能となる。 In addition, in order to improve the encoding efficiency at the time of re-encoding, a more appropriate motion vector can be obtained by rounding the search center of 1/2 pixel accuracy to an integer pixel position and searching for a range of ± 1.75 in the vicinity thereof. It becomes possible to decide.
これは、MPEG2の小数画素位置予測のための補間フィルタとH.264の小数画素補間フィルタの特性が異なるため、MPEG2の1/2画素精度の動きベクトルから得られる探索中心が必ずしも最適ではないためである。整数画素位置に丸めた動きベクトル探索中心は、整数精度動きベクトルの最適値に対して±1画素の誤差を持ち、さらに補間フィルタの効果が±0.75画素の範囲で変動するため、整数画素位置に丸めた探索中心から±1.75画素の範囲を探索することで、適正な動きベクトルを求めることが可能となる。これにより、±1.75画素という微小な領域の再探索で、高い符号化効率を与えるH.264再符号化のための動きベクトル検出を行うことが可能となり、再符号化のコストの低減と符号化効率の向上を両立することが可能となる。 This is because the search center obtained from the motion vector with 1/2 pixel accuracy of MPEG2 is not necessarily optimal because the characteristics of the interpolation filter for MPEG2 decimal pixel position prediction and the H.264 decimal pixel interpolation filter are different. It is. The motion vector search center rounded to the integer pixel position has an error of ± 1 pixel with respect to the optimum value of the integer precision motion vector, and the effect of the interpolation filter varies in the range of ± 0.75 pixel. By searching a range of ± 1.75 pixels from the rounded search center, an appropriate motion vector can be obtained. This makes it possible to perform motion vector detection for H.264 re-encoding that gives high encoding efficiency by re-searching a minute region of ± 1.75 pixels, reducing re-encoding costs and encoding It is possible to improve both efficiency.
さらに、上記動きベクトルの再探索結果と、イントラ予測符号化部525で複数のイントラ予測モード(Intra4x4予測(最大9モード), Intra8x8予測(最大9モード), Intra16x16予測(最大4モード))の中から、最適な予測モードの組をマクロブロック毎に決定し、また動きベクトルの符号化を必要とせず符号化効率の高いH.264のピクチャ間予測モードである、PスライスではH.264におけるP_Skipモード、BスライスではH.264におけるダイレクトモードでの予測符号化をSkip/Direct符号化部526で行い、これらの中から最も符号化効率の高い符号化モードをマクロブロック毎にマクロブロック符号化モード判定部512で選択する。
In addition, the motion vector re-search result and the intra
ここで、MPEG2におけるPピクチャあるいはBピクチャにおけるイントラ符号化マクロブロックについては、H.264で規定される動きベクトル予測符号化における予測ベクトル、若しくは予測ベクトルを探索中心として再探索した動きベクトルを用いて、ピクチャ間予測部527により予測符号化行い、その出力をピクチャ間符号化モードの候補とする。
Here, for intra-coded macroblocks in P-pictures or B-pictures in MPEG2, using motion vectors that have been re-searched using the prediction vector in motion vector predictive coding specified in H.264 or the prediction vector as a search center Then, predictive encoding is performed by the
上記の構成とすることで、MPEG2におけるPピクチャあるいはBピクチャにおいて、マクロブロックの符号化モードがイントラ符号化かピクチャ間予測符号化かによらず、多数の予測モードをもつ符号化効率の高いH.264のイントラ符号化と、符号化効率の高いピクチャ間予測であるP_Skipあるいはダイレクト予測と、MPEG2の動きベクトルを流用した適正な範囲の動きベクトル最探索結果の中から、最適なモードを選択することで、演算コストを抑えつつ、再符号化時の符号化効率を大幅に向上させることが可能となる。 With the above configuration, in a P picture or B picture in MPEG2, regardless of whether the encoding mode of the macroblock is intra encoding or inter picture predictive encoding, H having a high encoding efficiency having a large number of prediction modes. Select the optimal mode from .264 intra coding, P_Skip or direct prediction, which is an inter-picture prediction with high coding efficiency, and a motion vector search result in an appropriate range using MPEG2 motion vectors. As a result, it is possible to greatly improve the encoding efficiency at the time of re-encoding while suppressing the calculation cost.
ここで、符号化モード判定の処理コストを低減するため、複数のH.264イントラ予測モードからの最適なモードの選択や動きベクトル再探索時は、予測残差信号の絶対値和等の演算量の少ない評価値によりモード判定を行い、最終段階でのマクロブロックレベルのモード判定時は、発生符号量および符号化歪に基づくレート−歪最適化コスト、若しくは推定発生符号量あるいは推定符号化歪に基づく符号化コストを評価値とする高精度なモード判定を行うことで、演算量の増加を抑えつつ、好適な符号化モードを選択し、符号化効率を向上させることが可能となる。 Here, in order to reduce the processing cost of the coding mode determination, when selecting an optimal mode from a plurality of H.264 intra prediction modes or re-searching motion vectors, the amount of computation such as the sum of absolute values of prediction residual signals Mode evaluation is performed with a small evaluation value, and at the macroblock level mode determination at the final stage, the rate-distortion optimization cost based on the generated code amount and coding distortion, or the estimated generated code amount or estimated coding distortion By performing high-accuracy mode determination using the coding cost based on the evaluation value, it is possible to select a suitable coding mode and improve the coding efficiency while suppressing an increase in the amount of calculation.
最後に、選択された符号化モードでH.264のCABAC(Context Adaptive Binary Arithmetic Coding)符号化部528により、H.264の符号例が生成される。
Finally, an H.264 code example is generated by an H.264 CABAC (Context Adaptive Binary Arithmetic Coding)
なお、この動画像符号列変換装置は、例えば、汎用のコンピュータ装置を基本ハードウェアとして用いることでも実現することが可能である。 Note that this moving image code string conversion device can also be realized, for example, by using a general-purpose computer device as basic hardware.
すなわち、復号化部、符号化パラメータ変換部、符号化パラメータ選択部、および符号化部は、上記のコンピュータ装置に搭載されたプロセッサにプログラムを実行させることにより実現することができる。このとき、動画像符号列変換装置は、上記のプログラムをコンピュータ装置にあらかじめインストールすることで実現してもよいし、CD−ROMなどの記憶媒体に記憶して、あるいはネットワークを介して上記のプログラムを配布して、このプログラムをコンピュータ装置に適宜インストールすることで実現してもよい。また、BおよびCは、上記のコンピュータ装置に内蔵あるいは外付けされたメモリ、ハードディスクもしくはCD−R、CD−RW、DVD−RAM、DVD−Rなどの記憶媒体などを適宜利用して実現することができる。 That is, the decoding unit, the encoding parameter conversion unit, the encoding parameter selection unit, and the encoding unit can be realized by causing a processor mounted on the computer device to execute a program. At this time, the moving image code string conversion device may be realized by installing the above program in a computer device in advance, or may be stored in a storage medium such as a CD-ROM or via the network. And may be realized by installing this program on a computer device as appropriate. B and C are realized by appropriately using a memory, a hard disk, or a storage medium such as a CD-R, a CD-RW, a DVD-RAM, a DVD-R, etc., which is built in or externally attached to the computer device. Can do.
なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。 Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the components without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
また、本発明の一側面の動画像符号列変換方法およびプログラムは、以下に例示する構成または特徴のいずれかを有するものとして説明されることができる。 In addition, the moving image code string conversion method and program according to one aspect of the present invention can be described as having any of the configurations or features exemplified below.
(1)飛び越し順序方式の入力信号を圧縮符号化した第1の動画像符号列を、第2の動画像符号列に変換する方法であって、
入力である第1動画像符号列を復号化し、復号画像の生成と符号化パラメータの抽出を行う復号化ステップと、
第2動画像符号列における垂直方向に上下に並んだマクロブロックの組に対する符号化パラメータを、第1動画像符号列おいて対応する複数マクロブロックの各々の符号化パラメータから決定し、決定された符号化パラメータに基づいて、第1の動画像符号列に含まれる符号化パラメータを第2の動画像符号化列用の符号化パラメータへ変換する符号化パラメータ変換ステップと、
符号化パラメータ変換ステップで選択された符号化パラメータを用いて第2動画像符号列の生成を行う符号化ステップ
とを備えることを特徴とする動画像符号列変換方法。
(1) A method of converting a first moving image code string obtained by compressing and coding an input signal of a jump order method into a second moving image code string,
A decoding step of decoding the first video code sequence as an input, generating a decoded image and extracting a coding parameter;
A coding parameter for a set of macroblocks arranged vertically in the second moving image code string is determined from the respective coding parameters of a plurality of corresponding macroblocks in the first moving image code string. Based on the encoding parameter, an encoding parameter conversion step for converting the encoding parameter included in the first moving image code string into an encoding parameter for the second moving image code string;
And a coding step for generating a second moving image code sequence using the coding parameter selected in the coding parameter conversion step.
(2)飛び越し順序方式の入力信号を圧縮符号化した第1の動画像符号列を、第2の動画像符号列に変換する方法であって、
入力である第1動画像符号列を復号化し、復号画像の生成と符号化パラメータの抽出を行う復号化ステップと、
第2動画像符号列における垂直方向に上下に並んだマクロブロックの組に対する符号化パラメータの一部を、第1動画像符号列おいて対応する複数マクロブロックの各々の符号化パラメータから決定し、決定された符号化パラメータに基づいて、第1の動画像符号列に含まれる符号化パラメータを第2の動画像符号化列用の符号化パラメータへ変換する符号化パラメータ変換ステップと、
復号画像若しくは変換済みの第2の動画像符号化列から符号化パラメータ候補を生成する符号化パラメータ生成ステップと、
符号化パラメータ変換ステップで変換された符号化パラメータと符号化パラメータ生成ステップで生成された符号化パラメータとから最終的に符号化に用いるパラメータを選択する符号化パラメータ選択ステップと、
符号化パラメータ選択ステップで選択された符号化パラメータを用いて第2動画像符号列の生成を行う符号化ステップ
とを備えることを特徴とする動画像符号列変換方法。
(2) A method of converting a first moving image code string obtained by compressing and encoding an input signal of a jump order method into a second moving image code string,
A decoding step of decoding the first video code sequence as an input, generating a decoded image and extracting a coding parameter;
A part of encoding parameters for a set of macroblocks arranged vertically in the second moving image code string is determined from the respective encoding parameters of a plurality of corresponding macroblocks in the first moving image code string, Based on the determined encoding parameter, an encoding parameter conversion step for converting an encoding parameter included in the first moving image code sequence into an encoding parameter for the second moving image encoded sequence;
An encoding parameter generation step for generating an encoding parameter candidate from the decoded image or the converted second moving image encoded sequence;
An encoding parameter selection step for finally selecting a parameter to be used for encoding from the encoding parameter converted in the encoding parameter conversion step and the encoding parameter generated in the encoding parameter generation step;
And a coding step of generating a second moving image code sequence using the coding parameter selected in the coding parameter selection step.
(3)前記符号化パラメータ変換ステップにおいて、
第1動画像符号列におけるマクロブロックの符号化構造を、マクロブロックの予測タイプもしくはDCTタイプの値に基づいてフィールド構造もしくはフレーム構造に設定することを特徴とする(1)または(2)に記載の動画像符号列変換方法。
(3) In the encoding parameter conversion step,
(1) or (2), wherein the coding structure of the macroblock in the first moving image code string is set to a field structure or a frame structure based on a prediction type or DCT type value of the macroblock Video code string conversion method.
(4)前記符号化パラメータ変換ステップにおいて、
第2動画像符号列における上下のマクロブロックの組に対する符号化構造を、対応する第1動画像符号列におけるマクロブロックの符号化構造に基づき、フレーム構造とフィールド構造のマクロブロック数が同数の場合はフィールド構造とし、フレーム構造の数とフィールド構造のマクロブロック数が異なる場合には、数の多い方の符号化構造を上下のマクロブロックの組の符号化構造に設定すること
を特徴とする(1)または(2)に記載の動画像符号列変換方法。
(4) In the encoding parameter conversion step,
When the coding structure for the set of upper and lower macroblocks in the second video code sequence is the same as the number of macroblocks in the frame structure and the field structure based on the coding structure of the macroblock in the corresponding first video code sequence Has a field structure, and when the number of frame structures and the number of macroblocks in the field structure are different, the coding structure having the larger number is set as the coding structure of a set of upper and lower macroblocks ( The moving image code string conversion method according to 1) or (2).
(5)前記符号化パラメータ変換ステップにおいて、
第2動画像符号列における上下のマクロブロックの組に対する符号化構造を、対応する第1動画像符号列におけるマクロブロックの符号化構造に基づき、フレーム構造とフィールド構造のマクロブロック数が同数の場合はフィールド構造とし、フレーム構造の数とフィールド構造のマクロブロック数が異なる場合には、マクロブロック内の符号化パラメータに基づいて設定された評価値を用いて、評価値の高い方の符号化構造を上下のマクロブロックの組の符号化構造に設定すること
を特徴とする(1)または(2)に記載の動画像符号列変換方法。
(5) In the encoding parameter conversion step,
When the coding structure for the set of upper and lower macroblocks in the second video code sequence is the same as the number of macroblocks in the frame structure and the field structure based on the coding structure of the macroblock in the corresponding first video code sequence Has a field structure, and if the number of frame structures differs from the number of macroblocks in the field structure, the encoding structure with the higher evaluation value is used by using the evaluation value set based on the encoding parameter in the macroblock. Is set to an encoding structure of a set of upper and lower macroblocks. (1) or (2).
(6)前記符号化パラメータ変換ステップにおいて、
第2動画像符号列における上下のマクロブロックの組の符号化構造と、第1動画像符号列における対応マクロブロックの符号化構造とを比較し、符号化構造が異なる場合には、第1動画像符号列における対応マクロブロックに含まれる符号化パラメータを第2動画像符号列における上下のマクロブロックの組の符号化構造にあわせて変換および生成を行うこと
を特徴とする(1)または(2)に記載の動画像符号列変換方法。
(6) In the encoding parameter conversion step,
When the coding structure of the set of upper and lower macroblocks in the second video code sequence and the coding structure of the corresponding macroblock in the first video code sequence are compared, and the coding structure is different, the first moving image (1) or (2) characterized in that a coding parameter included in a corresponding macroblock in an image code string is converted and generated in accordance with a coding structure of a set of upper and lower macroblocks in a second moving image code string. ) Moving image code string conversion method.
(7)前記符号化パラメータ生成ステップにおいて、
フレーム内符号化に関する符号化パラメータ、
マクロブロックスキップに関する符号化パラメータ、
時間ダイレクト予測符号化に関する符号化パラメータ
を生成することを特徴とする(2)に記載の動画像符号列変換方法。
(7) In the encoding parameter generation step,
Coding parameters for intra-frame coding,
Encoding parameters for macroblock skip,
The moving image code string conversion method according to (2), wherein an encoding parameter relating to temporal direct prediction encoding is generated.
(8)前記符号化パラメータ生成ステップにおいて、
前記符号化パラメータ変換ステップから取得したフレーム間符号化に関する符号化パラメータについて、動きベクトルが設定されていない場合には周辺動きベクトルからの予測により動きベクトルを算出し、フレーム間符号化に関する符号化パラメータとする
ことを特徴とする(2)に記載の動画像符号列変換方法。
(8) In the encoding parameter generation step,
With respect to the encoding parameters related to interframe encoding acquired from the encoding parameter conversion step, if no motion vector is set, a motion vector is calculated by prediction from surrounding motion vectors, and the encoding parameters related to interframe encoding are used. The moving picture code string conversion method according to (2), characterized in that:
(9)前記符号化パラメータ選択ステップにおいて、
最適なパラメータ選択の際に、予測誤差信号を算出し、前記予測誤差信号の差分絶対値和を用いて評価を行う
ことを特徴とする(2)に記載の動画像符号列変換方法。
(9) In the encoding parameter selection step,
(2) The moving picture code string conversion method according to (2), wherein a prediction error signal is calculated and evaluation is performed using a sum of absolute differences of the prediction error signal when selecting an optimum parameter.
(10)前記符号化パラメータ選択ステップにおいて、
最適なパラメータ選択の際に、レート歪み特性を用いて評価する
ことを特徴とする(2)に記載の動画像符号列変換方法。
(10) In the encoding parameter selection step,
(2) The moving picture code string conversion method according to (2), wherein evaluation is performed using rate distortion characteristics when selecting an optimal parameter.
(11)前記符号化パラメータ選択ステップにおいて、
最適なパラメータ選択の際に、発生符号量を用いて評価する
ことを特徴とする(2)に記載の動画像符号列変換方法。
(11) In the encoding parameter selection step,
(2) The moving picture code string conversion method according to (2), wherein evaluation is performed using a generated code amount when selecting an optimum parameter.
(12)解像度変換部をさらに備えることを特徴とする、(1)から(11)までのいずれか1項に記載の動画像符号列変換方法。 (12) The moving picture code string conversion method according to any one of (1) to (11), further including a resolution conversion unit.
(13)コンピュータまたは信号処理プロセッサを用いて、飛び越し順序方式の入力信号を圧縮符号化した第1の動画像符号列を、第2の動画像符号列に変換するためのプログラムであって、
入力である第1動画像符号列を復号化し、復号画像の生成と符号化パラメータの抽出を行う復号化機能と、
第2動画像符号列における垂直方向に上下に並んだマクロブロックの組に対する符号化パラメータを、第1動画像符号列おいて対応する複数マクロブロックの各々の符号化パラメータから決定し、決定された符号化パラメータに基づいて、第1の動画像符号列に含まれる符号化パラメータを第2の動画像符号化列用の符号化パラメータへ変換する符号化パラメータ変換機能と、
符号化パラメータ変換機能で選択された符号化パラメータを用いて第2動画像符号列の生成を行う符号化機能
とを備えることを特徴とする動画像符号列変換プログラム。
(13) A program for converting, using a computer or a signal processor, a first moving image code string obtained by compression-coding an interlaced order input signal into a second moving image code string,
A decoding function that decodes the first moving image code string as an input, generates a decoded image, and extracts encoding parameters;
A coding parameter for a set of macroblocks arranged vertically in the second moving image code string is determined from the respective coding parameters of a plurality of corresponding macroblocks in the first moving image code string. Based on the encoding parameter, an encoding parameter conversion function that converts the encoding parameter included in the first moving image code sequence into an encoding parameter for the second moving image encoded sequence,
A moving image code string conversion program comprising: an encoding function that generates a second moving image code string using an encoding parameter selected by an encoding parameter conversion function.
(14)コンピュータまたは信号処理プロセッサを用いて、飛び越し順序方式の入力信号を圧縮符号化した第1の動画像符号列を、第2の動画像符号列に変換するためのプログラムであって、
入力である第1動画像符号列を復号化し、復号画像の生成と符号化パラメータの抽出を行う復号化機能と、
第2動画像符号列における垂直方向に上下に並んだマクロブロックの組に対する符号化パラメータの一部を、第1動画像符号列おいて対応する複数マクロブロックの各々の符号化パラメータから決定し、決定された符号化パラメータに基づいて、第1の動画像符号列に含まれる符号化パラメータを第2の動画像符号化列用の符号化パラメータへ変換する符号化パラメータ変換機能と、
復号画像若しくは変換済みの第2の動画像符号化列から符号化パラメータ候補を生成する符号化パラメータ生成機能と、
符号化パラメータ変換機能で変換された符号化パラメータと符号化パラメータ生成機能で生成された符号化パラメータとから最終的に符号化に用いるパラメータを選択する符号化パラメータ選択機能と、
符号化パラメータ選択機能で選択された符号化パラメータを用いて第2動画像符号列の生成を行う符号化機能
とを備えることを特徴とする動画像符号列変換プログラム。
(14) A program for converting, using a computer or a signal processor, a first moving image code string obtained by compression-coding an interlaced order input signal into a second moving image code string,
A decoding function that decodes the first moving image code string as an input, generates a decoded image, and extracts encoding parameters;
A part of encoding parameters for a set of macroblocks arranged vertically in the second moving image code string is determined from the respective encoding parameters of a plurality of corresponding macroblocks in the first moving image code string, Based on the determined encoding parameter, an encoding parameter conversion function for converting an encoding parameter included in the first moving image code sequence into an encoding parameter for the second moving image encoded sequence;
An encoding parameter generation function for generating an encoding parameter candidate from the decoded image or the converted second moving image encoded sequence;
An encoding parameter selection function for finally selecting a parameter to be used for encoding from the encoding parameter converted by the encoding parameter conversion function and the encoding parameter generated by the encoding parameter generation function;
A moving image code string conversion program comprising: an encoding function that generates a second moving image code string using an encoding parameter selected by an encoding parameter selection function.
100・・・第1動画符号列
101・・・復号画像信号
102・・・第1動画符号列における符号化パラメータ
103・・・第2動画符号列
104・・・符号化パラメータ候補
105・・・変換された符号化パラメータ
106・・・決定された好適な符号化パラメータ
107・・・第1動画符号列の符号化情報
110・・・第1動画符号列の復号化部
111・・・符号化パラメータ変換部
112・・・符号化パラメータ選択部
113・・・符号化パラメータ生成部
114・・・第2動画符号列の符号化部
120・・・解像度変換部
100 ... 1st video code string
101 ... Decoded image signal
102 ... Coding parameters in the first video code string
103 ... 2nd video code string
104 ... Encoding parameter candidates
105 ... converted encoding parameters
106 ... determined suitable encoding parameters
107 ... Encoding information of the first moving image code string
110: Decoding unit for the first moving image code string
111 ... Coding parameter converter
112 ... Coding parameter selection section
113 ... Coding parameter generator
114 ... Encoding part of the second moving image code string
120 ・ ・ ・ Resolution converter
Claims (23)
入力された第1符号列を復号化して復号画像および第1符号化パラメータを得る復号化部と、
前記復号画像上で垂直方向に隣接する前記第2符号列に関するマクロブロックの組の各々について、前記画像上で前記各組に対応する前記第1符号列に関する複数の対応マクロブロックの各々の前記第1符号化パラメータを変換して変換符号化パラメータを求める符号化パラメータ変換部と、
前記組の各マクロブロックの第2符号化パラメータとして、前記組に関して求められた前記変換符号化パラメータを選択する符号化パラメータ選択部と、
前記符号化パラメータ選択部で選択された前記第2符号化パラメータを用いて前記復号画像を圧縮符号化して、前記第2符号列を生成する符号化部と、
を備える画像符号列変換装置。 An apparatus for converting a first code string obtained by compressing and encoding a video signal of an interlaced order scanning method in units of macroblocks into a second code string based on an encoding method in which compression encoding is performed in units of macroblocks,
A decoding unit that decodes the input first code string to obtain a decoded image and a first encoding parameter;
For each set of macroblocks related to the second code sequence adjacent in the vertical direction on the decoded image, the first of each of the plurality of corresponding macroblocks related to the first code sequence corresponding to the set on the image. An encoding parameter conversion unit that converts one encoding parameter to obtain a conversion encoding parameter;
An encoding parameter selection unit that selects the transform encoding parameter obtained for the set as a second encoding parameter of each macroblock of the set;
An encoding unit that compresses and encodes the decoded image using the second encoding parameter selected by the encoding parameter selection unit and generates the second code string;
An image code string conversion device.
復号画像若しくは既に生成された前記第2符号列を用いて符号化パラメータ候補を生成する符号化パラメータ生成部を有し、
前記符号化パラメータ選択部は、前記符号化パラメータ候補および前記変換符号化パラメータの中から、前記組の各マクロブロックの第2符号化パラメータを選択する、
請求項1に記載の画像符号列変換装置。 The image code string conversion device according to claim 1, further comprising:
An encoding parameter generation unit that generates encoding parameter candidates using the decoded image or the already generated second code string;
The encoding parameter selection unit selects a second encoding parameter of each macroblock of the set from the encoding parameter candidates and the transform encoding parameter.
The image code string converter according to claim 1.
マクロブロックの符号化構造がフィールド構造とフレーム構造とのいずれであるかを示す符号化構造情報、
マクロブロックの予測タイプを示す予測タイプ情報、および、
マクロブロックのDCTタイプを示すDCTタイプ情報、
うちの少なくとも一つを含み、
前記第2符号化パラメータおよび前記変換符号化パラメータは、
マクロブロックのDCTタイプを示すDCTタイプ情報、
を含み、
前記符号化パラメータ変換部は、
前記対応マクロブロックの符号化構造情報、
前記対応マクロブロックの予測タイプ情報、および、
前記対応マクロブロックのDCTタイプ情報、
のうちの少なくとも一つに基づいて、前記変換符号化パラメータの符号化構造情報を設定する、
請求項1または2のいずれか一項に記載の画像符号列変換装置。 The first coding parameter is coding structure information indicating whether a coding structure of a macroblock is a field structure or a frame structure;
Prediction type information indicating the prediction type of the macroblock, and
DCT type information indicating the DCT type of the macroblock,
Including at least one of them,
The second encoding parameter and the transform encoding parameter are:
DCT type information indicating the DCT type of the macroblock,
Including
The encoding parameter converter is
Coding structure information of the corresponding macroblock;
Prediction type information of the corresponding macroblock; and
DCT type information of the corresponding macroblock,
Setting coding structure information of the transform coding parameter based on at least one of:
The image code string conversion device according to claim 1.
前記各組に対応する前記対応マクロブロックの各々の第1符号化パラメータの符号化構造情報を抽出する抽出部と、
前記抽出部によって抽出された前記各組の符号化構造情報について、フィールド構造を示す値を有する対応マクロブロックの数とフレーム構造を示す値を有する対応マクロブロックの数とを比較する比較部と、
前記比較部による比較の結果が同数である前記組の各マクロブロックの符号化構造情報にはフィールド構造を示す値を設定し、フィールド構造の対応マクロブロックの数が多い前記組の各マクロブロックの符号化構造情報にはフィールド構造を示す値を設定し、フレーム構造の対応マクロブロックの数が多い前記組の各マクロブロックの符号化構造情報にはフレーム構造を示す値を設定する設定部と、
を備える、請求項3に記載の画像符号列変換装置。 The encoding parameter converter is
An extraction unit that extracts coding structure information of the first coding parameter of each of the corresponding macroblocks corresponding to each set;
For each set of coding structure information extracted by the extraction unit, a comparison unit that compares the number of corresponding macroblocks having a value indicating a field structure with the number of corresponding macroblocks having a value indicating a frame structure;
A value indicating a field structure is set in the coding structure information of each macroblock of the set having the same number of comparison results by the comparison unit, and each macroblock of the set having a large number of corresponding macroblocks in the field structure is set. A value indicating a field structure is set in the coding structure information, and a setting unit that sets a value indicating the frame structure in the coding structure information of each macroblock of the set having a large number of corresponding macroblocks in the frame structure;
The image code string converter according to claim 3, comprising:
前記各組に対応する前記対応マクロブロックの各々の第1符号化パラメータの符号化構造情報を抽出する抽出部と、
前記抽出部によって抽出された前記各組の符号化構造情報について、フィールド構造を示す値を有する対応マクロブロックが存在するか否かを判定する判定部と、
前記判定部による判定の結果、一つでもフィールド構造を示す値を有する対応マクロブロックが存在すればフィールド構造を示す値を設定し、すべての対応マクロブロックがフレーム構造を示す値を有する場合はフレーム構造を示す値を設定する設定部と、
を備える、請求項3に記載の画像符号列変換装置。 The encoding parameter converter is
An extraction unit that extracts coding structure information of the first coding parameter of each of the corresponding macroblocks corresponding to each set;
A determination unit that determines whether or not there is a corresponding macroblock having a value indicating a field structure for each set of coding structure information extracted by the extraction unit;
As a result of determination by the determination unit, if there is at least one corresponding macroblock having a value indicating the field structure, a value indicating the field structure is set, and if all the corresponding macroblocks have a value indicating the frame structure, a frame is set. A setting unit for setting a value indicating the structure;
The image code string converter according to claim 3, comprising:
前記各組に対応する前記対応マクロブロックの各々の第1符号化パラメータの符号化構造情報を抽出する抽出部と、
前記各組に対応する前記対応マクロブロックを第1符号化パラメータの符号化構造情報の値で分類し、前記分類ごとの評価値を前記分類に属する前記対応マクロブロックの第1符号化パラメータを用いて求める評価値算出部と、
前記評価値の大きさに応じて、前記組の各マクロブロックの符号化構造情報を設定する設定部と、
を備える、請求項3に記載の画像符号列変換装置。 The encoding parameter converter is
An extraction unit that extracts coding structure information of the first coding parameter of each of the corresponding macroblocks corresponding to each set;
The corresponding macroblock corresponding to each set is classified by the value of the coding structure information of the first coding parameter, and the evaluation value for each classification is used using the first coding parameter of the corresponding macroblock belonging to the classification. An evaluation value calculation unit obtained by
A setting unit that sets coding structure information of each macroblock of the set according to the size of the evaluation value;
The image code string converter according to claim 3, comprising:
前記抽出部によって抽出された前記各組の符号化構造情報について、フィールド構造を示す値を有する対応マクロブロックの数とフレーム構造を示す値を有する対応マクロブロックの数とを比較する比較部、
を備え、
前記符号化パラメータ変換部の前記設定部は、
前記比較部による比較の結果が同数である前記組の各マクロブロックの符号化構造情報にはフィールド構造を示す値を設定し、数が異なる前記組の各マクロブロックの符号化構造情報には前記評価値が高い方の符号化構造を示す値を設定する、
請求項6に記載の画像符号列変換装置。 The encoding parameter conversion unit further includes:
A comparison unit that compares the number of corresponding macroblocks having a value indicating a field structure with the number of corresponding macroblocks having a value indicating a frame structure for each set of coding structure information extracted by the extraction unit;
With
The setting unit of the encoding parameter conversion unit includes:
A value indicating a field structure is set in the coding structure information of each macroblock of the set having the same number of comparison results by the comparison unit, and the coding structure information of each macroblock in the set having a different number Set a value indicating the coding structure with the higher evaluation value,
The image code string converter according to claim 6.
フィールド構造を示す値を有する対応マクロブロック群と、フレーム構造を示す値を有する対応マクロブロック群の各々について第2符号列に関するマクロブロックの組が対応する面積を算出し、
その対応面積の値に基づいて、フィールド構造およびフレーム構造の各々に対する評価値を算出することを特徴とする、
請求項6に記載の画像符号列変換装置。 The evaluation value calculator in the encoding parameter converter is
For each of the corresponding macroblock group having a value indicating the field structure and the corresponding macroblock group having a value indicating the frame structure, the area corresponding to the set of macroblocks related to the second code string is calculated,
An evaluation value for each of the field structure and the frame structure is calculated based on the value of the corresponding area,
The image code string converter according to claim 6.
フィールド構造の評価値がフレーム構造の評価値以上であれば組のマクロブロックの符号化構造をフィールド構造とし、それ以外の場合はフレーム構造とすることを特徴とする
請求項6に記載の画像符号列変換装置。 In the coding parameter conversion unit, a coding structure setting unit for a set of macroblocks is:
7. The image code according to claim 6, wherein if the evaluation value of the field structure is equal to or higher than the evaluation value of the frame structure, the coding structure of the set of macroblocks is a field structure, and otherwise the frame structure is used. Column conversion device.
フィールド構造の評価値を重み係数により調整を施した値が、フレーム構造の評価値以上であれば組のマクロブロックの符号化構造をフィールド構造とし、それ以外の場合はフレーム構造とすることを特徴とする、
請求項6に記載の画像符号列変換装置。 In the coding parameter conversion unit, a coding structure setting unit for a set of macroblocks is:
If the value obtained by adjusting the evaluation value of the field structure with the weighting factor is equal to or higher than the evaluation value of the frame structure, the coding structure of the macroblock of the set is the field structure, and otherwise, the frame structure is used. And
The image code string converter according to claim 6.
請求項10に記載の画像符号列変換装置。 The setting unit of the encoding parameter conversion unit uniquely determines the weighting factor based on the relationship between the encoding information included in the first code string of the conversion source and the encoding information about the code string after conversion. Characterized by adaptive adjustment,
The image code string converter according to claim 10.
前記符号化パラメータ変換部は、
前記組の各マクロブロックの符号化構造情報と前記対応マクロブロックの各々の符号化構造情報とを比較する符号化構造情報比較部と、
符号化構造情報が異なる前記組に関する前記対応マクロブロックに含まれる第1符号化パラメータを前記組の各々の符号化構造に合わせて変換する符号化構造情報変換部と、
を備える、請求項1または2のいずれか一項に記載の画像符号列変換装置。 The first coding parameter, the second coding parameter, and the transform coding parameter include coding structure information indicating whether a macroblock coding structure is a field structure or a frame structure,
The encoding parameter converter is
A coding structure information comparison unit that compares the coding structure information of each macroblock of the set and the coding structure information of each of the corresponding macroblocks;
A coding structure information conversion unit that converts the first coding parameters included in the corresponding macroblocks related to the sets having different coding structure information in accordance with the coding structures of the sets;
The image code string conversion device according to claim 1, comprising:
請求項12に記載の画像符号列変換装置。 The coding structure information conversion unit performs a conversion for scaling a motion vector included in the corresponding macroblock related to the set having different coding structure information according to a time axis.
The image code string converter according to claim 12.
フレーム内符号化に関する情報、
マクロブロックスキップに関する情報、および、
ダイレクト予測符号化に関する情報、
を含む符号化パラメータ候補を生成する、
請求項2に記載の画像符号列変換装置。 The encoding parameter generation unit includes:
Information about intra-frame coding,
Information about macroblock skip, and
Information about direct predictive coding,
Generate encoding parameter candidates including
The image code string converter according to claim 2.
前記符号化パラメータ生成部は、
前記対応マクロブロックのうちフレーム内符号化されたものについて、前記第2符号列の当該マクロブロックの周囲にある、すでに圧縮符号化済みの前記第2符号列のマクロブロックの動きベクトル情報から、当該マクロブロックに対する動きベクトル予測値を計算する手段と、
前記対応マクロブロックのうちフレーム内符号化されたものについて、前記計算された動きベクトル予測値を、当該マクロブロックの符号化パラメータ候補として設定する手段と、
を備える、請求項2に記載の画像符号列変換装置。 The first coding parameter includes prediction type information indicating whether each of the corresponding macroblocks is inter-frame coded or intra-frame coded in the first code string,
The encoding parameter generation unit includes:
Among the corresponding macroblocks, the intraframe-coded ones from the motion vector information of the macroblocks of the second code sequence that have already been compression-encoded around the macroblocks of the second code sequence, Means for calculating a motion vector prediction value for a macroblock;
Means for setting the calculated motion vector prediction value as an encoding parameter candidate of the macroblock for the corresponding macroblock that has been intraframe encoded;
The image code string conversion device according to claim 2, comprising:
符号化パラメータ候補と変換符号化パラメータとの各々を用いて生成された予測誤差信号の差分絶対値和に基づいて選択する、
請求項2に記載の画像符号列変換装置。 The encoding parameter selection unit
Selecting based on the sum of absolute differences of prediction error signals generated using each of the encoding parameter candidates and transform encoding parameters;
The image code string converter according to claim 2.
符号化パラメータ候補と変換符号化パラメータとの各々を用いて圧縮符号化した場合のレート歪み特性に基づいて選択する、
請求項2に記載の画像符号列変換装置。 The encoding parameter selection unit
Select based on rate distortion characteristics when compression encoding using each of the encoding parameter candidates and transform encoding parameters,
The image code string converter according to claim 2.
符号化パラメータ候補と変換符号化パラメータとの各々を用いて圧縮符号化した場合の発生符号量に基づいて選択する、
請求項2に記載の画像符号列変換装置。 The encoding parameter selection unit
Select based on the amount of generated code when compression encoding is performed using each of the encoding parameter candidate and the transform encoding parameter,
The image code string converter according to claim 2.
請求項1から請求項18のいずれか1項に記載の画像符号列変換装置。 It further comprises a resolution converter,
The image code string converter according to any one of claims 1 to 18.
入力された第1符号列を復号化して復号画像および第1符号化パラメータを得る復号化ステップと、
前記復号画像上で垂直方向に隣接する前記第2符号列のマクロブロックの組に関して、前記画像上で前記組に対応する前記第1符号列の複数の対応マクロブロックの各々の前記第1符号化パラメータを変換して変換符号化パラメータを求める符号化パラメータ変換ステップと、
前記組の各マクロブロックの第2符号化パラメータとして、前記組に関して求められた前記変換符号化パラメータを選択する符号化パラメータ選択ステップと、
前記符号化パラメータ選択部で選択された前記第2符号化パラメータを用いて前記復号画像を圧縮符号化して、前記第2符号列を生成する符号化ステップと、
を備える画像符号列変換方法。 A method of converting a first code string obtained by compressing and encoding an interlaced sequential scanning video signal in units of macroblocks into a second code string based on an encoding method in which compression encoding is performed in units of macroblocks,
A decoding step of decoding the input first code string to obtain a decoded image and a first encoding parameter;
With respect to a set of macroblocks of the second code string adjacent in the vertical direction on the decoded image, the first encoding of each of the plurality of corresponding macroblocks of the first code string corresponding to the set on the image An encoding parameter conversion step for converting the parameter to obtain a conversion encoding parameter;
A coding parameter selection step of selecting the transform coding parameter obtained for the set as a second coding parameter of each macroblock of the set;
An encoding step of compressing and encoding the decoded image using the second encoding parameter selected by the encoding parameter selection unit to generate the second code string;
An image code string conversion method comprising:
前記符号化パラメータ選択ステップでは、前記符号化パラメータ候補および前記変換符号化パラメータの中から、前記組の各マクロブロックの第2符号化パラメータを選択する、
請求項20に記載の画像符号列変換方法。 A coding parameter generation step of generating a coding parameter candidate using the decoded image or the already generated second code string;
In the encoding parameter selection step, a second encoding parameter of each macroblock of the set is selected from the encoding parameter candidates and the transform encoding parameter.
The image code string conversion method according to claim 20.
入力された第1符号列を復号化して復号画像および第1符号化パラメータを得る復号化ステップと、
前記復号画像上で垂直方向に隣接する前記第2符号列のマクロブロックの組に関して、前記画像上で前記組に対応する前記第1符号列の複数の対応マクロブロックの各々の前記第1符号化パラメータを変換して変換符号化パラメータを求める符号化パラメータ変換ステップと、
前記組の各マクロブロックの第2符号化パラメータとして、前記組に関して求められた前記変換符号化パラメータを選択する符号化パラメータ選択ステップと、
前記符号化パラメータ選択部で選択された前記第2符号化パラメータを用いて前記復号画像を圧縮符号化して、前記第2符号列を生成する符号化ステップと、
を実行させる画像符号列変換プログラム。 A computer executes processing for converting a first code string obtained by compressing and encoding a video signal of an interlaced order scanning method in units of macro blocks into a second code string based on an encoding method in which compression encoding is performed in units of macro blocks. A program to
A decoding step of decoding the input first code string to obtain a decoded image and a first encoding parameter;
With respect to a set of macroblocks of the second code string adjacent in the vertical direction on the decoded image, the first encoding of each of the plurality of corresponding macroblocks of the first code string corresponding to the set on the image An encoding parameter conversion step for converting the parameter to obtain a conversion encoding parameter;
A coding parameter selection step of selecting the transform coding parameter obtained for the set as a second coding parameter of each macroblock of the set;
An encoding step of compressing and encoding the decoded image using the second encoding parameter selected by the encoding parameter selection unit to generate the second code string;
An image code string conversion program for executing
前記符号化パラメータ選択ステップでは、前記符号化パラメータ候補および前記変換符号化パラメータの中から、前記組の各マクロブロックの第2符号化パラメータを選択する、
請求項22に記載の画像符号列変換プログラム。 A coding parameter generation step of generating a coding parameter candidate using the decoded image or the already generated second code string;
In the encoding parameter selection step, a second encoding parameter of each macroblock of the set is selected from the encoding parameter candidates and the transform encoding parameter.
The image code string conversion program according to claim 22.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005360417A JP2006217569A (en) | 2005-01-07 | 2005-12-14 | Image code string conversion apparatus, image code string conversion method, and image code string conversion program |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005002857 | 2005-01-07 | ||
| JP2005360417A JP2006217569A (en) | 2005-01-07 | 2005-12-14 | Image code string conversion apparatus, image code string conversion method, and image code string conversion program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2006217569A true JP2006217569A (en) | 2006-08-17 |
Family
ID=36980356
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005360417A Abandoned JP2006217569A (en) | 2005-01-07 | 2005-12-14 | Image code string conversion apparatus, image code string conversion method, and image code string conversion program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2006217569A (en) |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008066941A (en) * | 2006-09-06 | 2008-03-21 | Nippon Telegr & Teleph Corp <Ntt> | Moving image re-encoding method, moving image re-encoding device, moving image re-encoding program and recording medium thereof |
| JP2008136187A (en) * | 2006-10-26 | 2008-06-12 | Matsushita Electric Ind Co Ltd | Transcoding device and transcoding method |
| JP2008160398A (en) * | 2006-12-22 | 2008-07-10 | Matsushita Electric Ind Co Ltd | Moving picture coding apparatus and moving picture coding method |
| JP2008193444A (en) * | 2007-02-06 | 2008-08-21 | Hitachi Ltd | Information processing device |
| WO2008126225A1 (en) * | 2007-03-29 | 2008-10-23 | Pioneer Corporation | Moving image re-encoding apparatus and method |
| JP2009212608A (en) * | 2008-02-29 | 2009-09-17 | Fujitsu Ltd | Transcoding apparatus, method, and program |
| JP2011507404A (en) * | 2007-12-10 | 2011-03-03 | クゥアルコム・インコーポレイテッド | Reference selection for video interpolation or extrapolation |
| JP2011147189A (en) * | 2006-10-26 | 2011-07-28 | Panasonic Corp | Transcoding apparatus and transcoding method |
| JP2012019289A (en) * | 2010-07-06 | 2012-01-26 | Mega Chips Corp | Image converter |
| JP2013098638A (en) * | 2011-10-28 | 2013-05-20 | Fujitsu Ltd | Dynamic image re-coding apparatus, dynamic image re-coding method and dynamic image re-coding computer program |
| CN115174929A (en) * | 2022-05-13 | 2022-10-11 | 同济大学 | Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values |
-
2005
- 2005-12-14 JP JP2005360417A patent/JP2006217569A/en not_active Abandoned
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008066941A (en) * | 2006-09-06 | 2008-03-21 | Nippon Telegr & Teleph Corp <Ntt> | Moving image re-encoding method, moving image re-encoding device, moving image re-encoding program and recording medium thereof |
| JP2008136187A (en) * | 2006-10-26 | 2008-06-12 | Matsushita Electric Ind Co Ltd | Transcoding device and transcoding method |
| JP2011147189A (en) * | 2006-10-26 | 2011-07-28 | Panasonic Corp | Transcoding apparatus and transcoding method |
| JP2008160398A (en) * | 2006-12-22 | 2008-07-10 | Matsushita Electric Ind Co Ltd | Moving picture coding apparatus and moving picture coding method |
| JP2008193444A (en) * | 2007-02-06 | 2008-08-21 | Hitachi Ltd | Information processing device |
| WO2008126225A1 (en) * | 2007-03-29 | 2008-10-23 | Pioneer Corporation | Moving image re-encoding apparatus and method |
| JP2011507404A (en) * | 2007-12-10 | 2011-03-03 | クゥアルコム・インコーポレイテッド | Reference selection for video interpolation or extrapolation |
| US8953685B2 (en) | 2007-12-10 | 2015-02-10 | Qualcomm Incorporated | Resource-adaptive video interpolation or extrapolation with motion level analysis |
| US9426414B2 (en) | 2007-12-10 | 2016-08-23 | Qualcomm Incorporated | Reference selection for video interpolation or extrapolation |
| JP2009212608A (en) * | 2008-02-29 | 2009-09-17 | Fujitsu Ltd | Transcoding apparatus, method, and program |
| JP2012019289A (en) * | 2010-07-06 | 2012-01-26 | Mega Chips Corp | Image converter |
| JP2013098638A (en) * | 2011-10-28 | 2013-05-20 | Fujitsu Ltd | Dynamic image re-coding apparatus, dynamic image re-coding method and dynamic image re-coding computer program |
| CN115174929A (en) * | 2022-05-13 | 2022-10-11 | 同济大学 | Method and device for decoding serial prediction by sharing one buffer area by serial vectors and pixel values |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100755107B1 (en) | Coded video sequence conversion apparatus, method and medium for recording program for coded video sequence conversion | |
| US10469839B2 (en) | Moving image encoding device and moving image decoding device based on adaptive switching among transformation block sizes | |
| RU2715017C1 (en) | Video prediction encoding device, video prediction encoding method, video prediction decoding device and video prediction decoding method | |
| JP4916581B2 (en) | Advanced bi-directional predictive coding of interlaced video | |
| CN105659602B (en) | Coder side option for the intra block duplication prediction mode that video and image encode | |
| US9924190B2 (en) | Optimized image decoding device and method for a predictive encoded bit stream | |
| JP5289440B2 (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
| EP2866449B1 (en) | Video decoding device, video decoding method and video decoding program | |
| CN103327328A (en) | Image encoding device and image decoding device | |
| CN120321393A (en) | Image encoding/decoding method and device based on sub-block division | |
| JP2006217569A (en) | Image code string conversion apparatus, image code string conversion method, and image code string conversion program | |
| JP2008004984A (en) | Image processor and method, program, and recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070126 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081010 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081031 |
|
| A762 | Written abandonment of application |
Free format text: JAPANESE INTERMEDIATE CODE: A762 Effective date: 20090105 |