JP2008193308A - Coding system conversion method and device, and coding system conversion program and its storage medium - Google Patents
Coding system conversion method and device, and coding system conversion program and its storage medium Download PDFInfo
- Publication number
- JP2008193308A JP2008193308A JP2007024172A JP2007024172A JP2008193308A JP 2008193308 A JP2008193308 A JP 2008193308A JP 2007024172 A JP2007024172 A JP 2007024172A JP 2007024172 A JP2007024172 A JP 2007024172A JP 2008193308 A JP2008193308 A JP 2008193308A
- Authority
- JP
- Japan
- Prior art keywords
- mode
- inter
- encoding
- block
- intra
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、符号化方式変換方法および装置ならびに符号化方式変換プログラムおよびその記憶媒体に係り、特に、MPEG-2ストリームからH.264ストリームへの変換に好適な符号化方式変換方法および装置ならびに符号化方式変換プログラムおよびその記憶媒体に関する。 The present invention relates to an encoding method conversion method and apparatus, an encoding method conversion program, and a storage medium thereof, and more particularly, to an encoding method conversion method and apparatus suitable for conversion from an MPEG-2 stream to an H.264 stream, and an encoding method. The present invention relates to a conversion method conversion program and its storage medium.
様々な画像圧縮方式が国際標準規格として策定される中、MPEG は放送用途からコンシューマ向けまで広く普及している。特に、MPEG-2 は衛星・地上波デジタル放送のみならず、DVD の符号化方式としても利用されている。しかしながら、そのMPEG-2 コンテンツをインターネット向けのストリーミング配信に利用する場合は、伝送帯域が大きく制限されるため、ビットレートを大幅に削減する必要がある。 While various image compression schemes have been established as international standards, MPEG is widely used from broadcasting to consumers. In particular, MPEG-2 is used not only for satellite / terrestrial digital broadcasting but also for DVD encoding. However, when the MPEG-2 content is used for streaming distribution for the Internet, the transmission band is greatly limited, and the bit rate must be significantly reduced.
一方、新しい画像符号化方式としてH.264/MPEG-4 AVC(以下,H.264) が普及しつつある。H.264 では様々な予測モード(予測方向)が規定されており、圧縮効率の観点では、MPEG-2 と比べて同じ画質でビットレートを半分にできる性能を持つが、符号化にかかるコストは大幅に増加している。 On the other hand, H.264 / MPEG-4 AVC (hereinafter, H.264) is becoming popular as a new image encoding method. H.264 defines various prediction modes (prediction directions). From the viewpoint of compression efficiency, it has the performance of halving the bit rate with the same image quality as MPEG-2, but the coding cost is It has increased significantly.
無線端末、ADSL、あるいは光ファイバーなど様々な帯域のネットワークに同一コンテンツを配信するワンソースマルチユースを実現する場合、マスターコンテンツとしてのMPEG-2 をH.264 に変換する需要が大きい。しかしながら、MPEG-2 を完全に復号してからH.264 へ再符号化する処理ではコストがかかりすぎるため、実用的な時間内での実現は難しい。 In order to realize one-source multi-use that distributes the same content to networks of various bands such as wireless terminals, ADSL, or optical fiber, there is a great demand for converting MPEG-2 as master content to H.264. However, the process of completely decoding MPEG-2 and then re-encoding it to H.264 is too costly, so it is difficult to realize it within a practical time.
特許文献1には、H.264 の符号化の高速化手法が開示されている。特許文献1の技術では、H.264 のような予測モードの多い符号化にあって、符号化に先立って発生符号量を高精度に見積もることができ、画質,圧縮率およびレートに対して最適な符号化制御が可能になる。
特許文献2は、MPEG-2 からMPEG-4 へのフォーマット変換を高速化する手法について報告している。特許文献2の技術では、MPEG-2ストリームから特定の種類のピクチャ(I,Pピクチャ)を抽出し部分画像信号を生成することで、符号化画像信号を異なる符号化方式に変換する際に、変換に要する時間を短縮できる。
特許文献1に開示された技術はH.264 の符号化だけを扱うため、符号化方式変換に適用するにはMPEG-2 の復号と組み合わさなければならない。また、特許文献1にはMPEG-2 の符号情報を再利用する手段がないため、符号化方式変換に費やす時間の大幅な短縮が見込めない。
Since the technique disclosed in
特許文献2は、H.264 より予測モードが少ないMPEG-4 への変換だけを扱うため、H.264 への適用では予測モードが限定されることになり、大幅な画質劣化を伴う。特に、H.264 では圧縮効率を向上させるためにイントラ予測モードが規定されている。しかしながら、イントラ予測モードはMPEG-2には存在しない予測モードであり、MPEG-2とH.264とでは符号化特性が大きく異なるため、MPEG-2の符号化モードを単純にH.264へ継承させるとH.264 の性能を十分に発揮できない。 Since Patent Document 2 deals only with conversion to MPEG-4, which has fewer prediction modes than H.264, the prediction mode is limited in application to H.264, resulting in significant image quality degradation. In particular, H.264 defines an intra prediction mode in order to improve compression efficiency. However, the intra prediction mode is a prediction mode that does not exist in MPEG-2, and the encoding characteristics of MPEG-2 and H.264 are greatly different, so the MPEG-2 encoding mode is simply inherited to H.264. If you do so, you will not be able to fully demonstrate the performance of H.264.
本発明の目的は、上記した従来技術の課題を解決し、MPEG-2 の符号情報を直接利用することでH.264 の符号化モードを高速に推定し、画質の劣化を最小限に抑えながら符号化方式を高速に変換する符号化方式変換方法および装置ならびに符号化方式変換プログラムおよびその記憶媒体を提供することにある。 The object of the present invention is to solve the above-mentioned problems of the prior art and estimate the H.264 encoding mode at high speed by directly using the MPEG-2 code information, while minimizing the degradation of image quality. It is an object to provide an encoding method conversion method and apparatus, an encoding method conversion program, and a storage medium thereof for converting an encoding method at high speed.
上記した目的を達成するために、本発明は、第1および第2の符号化方式が符号化モードとしてインターモードおよびイントラモードを備え、第1の符号化方式で符号化された第1動画像を第2の符号化方式で符号化された第2動画像に変換する動画像の符号化方式変換装置において、第1動画像を復号する手段と、復号された第1動画像の制御ブロックごとに第2の符号化方式での符号化モードを推定する推定手段と、推定結果に基づいて、第1動画像の各制御ブロックを第2の符号化方式で符号化する手段とを含み、前記推定手段が、第1動画像の各制御ブロックがインターブロックおよびイントラブロックのいずれであるかを判定する手段と、インターブロックに対して第2の符号化方式でも同一の符号化モードが有効であるか否かを推定する手段と、イントラブロックに対して第2の符号化方式でも同一の符号化モードが有効であるか否かを推定する手段と、インターモードが有効と推定された制御ブロックを第2の符号化方式のインターモードで符号化する際の符号化条件を決定する手段と、イントラモードが有効と推定された制御ブロックを第2の符号化方式のイントラモードで符号化する際の符号化条件を決定する手段と、同一の符号化モードが有効ではない推定された制御ブロックを対象に全探索を実行して、その符号化モードおよび符号化条件を探索する手段とを含むことを特徴とする。 In order to achieve the above-described object, the present invention provides a first moving image encoded by the first encoding method, wherein the first and second encoding methods include an inter mode and an intra mode as encoding modes. In the moving picture coding method conversion apparatus for converting the video into the second moving picture encoded by the second coding method, the first moving picture decoding means, and the control blocks of the decoded first moving picture The estimation means for estimating the encoding mode in the second encoding scheme, and the means for encoding each control block of the first moving image in the second encoding scheme based on the estimation result, The same encoding mode is effective for the second encoding scheme for the inter block as the estimation unit determines whether each control block of the first moving image is an inter block or an intra block. Whether or not Means for estimating whether or not the same coding mode is valid even in the second coding scheme for the intra block, and the control block in which the inter mode is estimated to be valid is designated as the second code. Means for determining an encoding condition for encoding in the inter mode of the encoding method, and an encoding condition for encoding the control block estimated to be effective in the intra mode in the intra mode of the second encoding method. And a means for performing a full search for an estimated control block for which the same coding mode is not valid and searching for the coding mode and coding conditions.
本発明によれば、第1の符号化方式で符号化された第1動画像を第2の符号化方式で符号化された第2動画像に変換する動画像の符号化方式変換において、以下のような効果が達成される。
(1)第1の符号化方式で採用された符号化モードが第2の符号化方式でも有効であるか否かを判定し、有効である場合には、第2の符号化方式での符号化条件の探索範囲が、第1の符号化方式で採用された符号化モードに限定されるので、高速な変換が可能になる。
(2)第1の符号化方式で採用された符号化モードが第2の符号化方式でも有効であるか否かを判定し、第2の符号化方式では第1の符号化方式とは異なる符号化モードが有効である可能性が有ると判定されると、第2の符号化方式の符号化モードおよび符号化条件が全探索されるので、品質劣化の少ない変換が可能になる。
According to the present invention, in the moving image coding method conversion for converting the first moving image encoded by the first encoding method into the second moving image encoded by the second encoding method, Such an effect is achieved.
(1) It is determined whether or not the encoding mode employed in the first encoding method is also effective in the second encoding method. If it is effective, the code in the second encoding method is determined. Since the search range of the encoding condition is limited to the encoding mode employed in the first encoding method, high-speed conversion is possible.
(2) It is determined whether or not the coding mode employed in the first coding method is also effective in the second coding method, and the second coding method is different from the first coding method. If it is determined that there is a possibility that the encoding mode is effective, the encoding mode and the encoding condition of the second encoding method are searched, so that conversion with less quality degradation is possible.
以下、図面を参照して本発明の最良の実施の形態について詳細に説明する。図1は、本発明に係る符号化方式変換システムの主要部の構成を示した図であり、ここではMPEG-2ストリームをH.264ストリームへ変換する場合を例にして説明する。 DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the best embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a configuration of a main part of a coding system conversion system according to the present invention. Here, a case where an MPEG-2 stream is converted into an H.264 stream will be described as an example.
抽出部10は、入力されたMPEG-2 ストリームV1から符号情報を抽出する。抽出された符号情報は復号部11および推定部12へ提供される。復号部11は、符号情報を画素情報に復号して推定部12へ提供する。推定部12は、符号情報および画素情報からH.264 における最適な予測モードを制御ブロックごとに推定し、この推定結果を符号化部13へ提供する。本実施形態では、最適な予測モードがMPEG-2のマクロブロック(MB)ごとに推定される。符号化部13は、提供された予測モードの推定結果に基づいて画素情報をH.264 の符号化方式で符号化し、H.264 ストリームV2を出力する。
The
前記推定部12は、符号情報をMB単位で読み出し、今回の注目MBがイントラモードで符号化されたイントラブロックおよびインターモードで符号化されたインターブロックのいずれであるかを判定する符号化モード判定部121と、MPEG-2ではイントラモードで符号化されたイントラMBに対してH.264でも同様にイントラモードでの符号化が有効であるか否かを推定するイントラ推定手段としての相関判定部122と、MPEG-2ではインターモードで符号化されたインターMBに対してH.264でも同様にインターモードでの符号化が有効であるか否かを推定するインター推定手段としてのMV信頼性判定部123、エッジ判定部124および残差成分判定部125を含む。
The
前記推定部12はさらに、H.264でもMPEG-2と同様にインターモードが有効と推定されたインターMBのH.264における符号化条件を決定するインター符号化条件決定部126と、H.264でもMPEG-2と同様にイントラモードが有効と推定されたイントラMBのH.264における符号化条件を決定するイントラ符号化条件決定部127と、同一の符号化モードが有効ではないと推定されたMBを対象に全探索を実行して、H.264での符号化モードおよび符号化条件を決定する全探索部128とを含む。
The
前記相関判定部122は、イントラMBの空間的相関を判定する。前記MV信頼性判定部123は、インターMBの動き情報(MV)の信頼性を判定する。エッジ判定部124は、インターMBに所定方向のエッジのみが含まれているか否かを判定する。残差成分判定部125は、インターMBの直交変換係数の残差成分が所定の閾値を下回っているか否かを判定する。
The correlation determination unit 122 determines the spatial correlation of the intra MB. The MV
前記インター符号化条件決定部126は、インターMBに関して、符号化モードをインターモードに限定して、ブロックサイズおよび予測モードを含む符号化条件を決定する。前記イントラ符号化条件決定部127は、イントラMBに関して、符号化モードをイントラモードに限定して、ブロックサイズおよび動き情報を含む符号化条件を決定する。
The inter coding
図2は、前記推定部12における符号化モード推定処理の手順を示したフローチャートである。本実施形態では、MPEG-2の16x16画素単位のMBごとに、その8x8画素単位の4つの輝度ブロックおよび8x8画素単位の2つの色差ブロックの各DCT係数、ならびにインターMBであれば更に動き情報に基づいて、このMBをH.264の符号化方式で予測符号化する際に最適な符号化モードが推定され、その符号化条件が設定される。
FIG. 2 is a flowchart showing a procedure of encoding mode estimation processing in the
ステップS1では、前記符号化モード判定部121において、今回の注目MBがイントラモードで符号化されたイントラMBおよびインターモードで符号化されたインターMBのいずれであるかが判定される。インターMBであればステップS2へ進み、前記MV信頼性判定部123において動き情報(動きベクトルMV)の信頼性が判定される。
In step S1, the encoding
前記MV信頼性判定部123は、入力された動き情報の信頼性を、次式(1) に基づいて判定する。本実施形態では、近傍のMB同士は、その動きベクトルが類似した特徴を示すことに着目し、注目MBから所定の範囲内に位置している複数のMBの動きベクトルに関して、その水平方向に関する分散σ2MVXおよび垂直方向に関する分散σ2MVYが所定のMV閾値THMVと比較される。
The MV
次式(1)が成立すれば、すなわち、σ2MVXおよびσ2MVYのいずれかがMV閾値THMVを上回っていれば、動き情報の信頼性が低いと判定されてステップS3のエッジ判定処理へ進む。これに対して、次式(1)が不成立であれば、すなわちσ2MVXおよびσ2MVYのいずれもがMV閾値THMVを下回っていれば、動き情報の信頼性が高いと判定され、H.264でもインターモードを承継すべくステップS5へ進む。 If the following equation (1) holds, that is, if either σ 2 MV X or σ 2 MV Y exceeds the MV threshold TH MV , it is determined that the reliability of the motion information is low, and the edge of step S3 Proceed to the determination process. On the other hand, if the following equation (1) is not satisfied, that is, if both σ 2 MV X and σ 2 MV Y are below the MV threshold TH MV , it is determined that the reliability of the motion information is high. , The process proceeds to step S5 in order to succeed the inter mode in H.264.
ステップS3では、前記エッジ判定部124において、今回の注目MBにイントラモードが有効なエッジが含まれているか否かが判定される。図3は、前記ステップS3のエッジ判定処理の詳細を示したフローチャートであり、本実施形態では、図4に示したように、注目MBの4つの輝度ブロックのそれぞれにエッジが含まれているか否か、含まれている場合にはさらに、各輝度ブロックのエッジの方向に基づいて、注目MBにイントラ予測が有効であるか否かが判定される。
In step S3, the
図3において、ステップS31では、4つの輝度ブロックの位置を特定する変数iに初期値「0」がセットされて左上の輝度ブロックが指定される。ステップS32では、位置iの輝度ブロックにエッジが含まれているか否かが次式(2)に基づいて判定される。 In FIG. 3, in step S31, an initial value “0” is set in a variable i for specifying the positions of the four luminance blocks, and the upper left luminance block is designated. In step S32, whether or not an edge is included in the luminance block at position i is determined based on the following equation (2).
上式(2)において、SumACは輝度ブロックのDCT係数(AC成分のみ)の絶対値の総和であり、輝度ブロックのDCT係数の総和(中辺第1項)からDC成分(同第2項)を減じることで求められる。本実施形態では、前記SumACがエッジ無し判定閾値THNo_Edgeと比較される。このエッジ無し判定閾値THNo_Edgeは、量子化パラメータQPの関数である。 In the above formula (2), Sum AC is the sum of absolute values of DCT coefficients (only AC component) of the luminance block, and the DC component (second term) of the sum of the DCT coefficients of the luminance block (middle side first term). ) Is required. In the present embodiment, the Sum AC is compared with the no edge determination threshold TH No_Edge . This edgeless determination threshold TH No_Edge is a function of the quantization parameter QP.
上式(2)が成立すれば、位置iの輝度ブロックにエッジが存在しないと判定されてステップS34へ進む。上式(2)が不成立であれば、位置iの輝度ブロックにエッジが存在すると判定されて更にステップS33へ進み、次式(3),(4)に基づいてエッジの方向が判定される。 If the above equation (2) holds, it is determined that no edge exists in the luminance block at position i, and the process proceeds to step S34. If the above equation (2) is not established, it is determined that an edge exists in the luminance block at the position i, and the process further proceeds to step S33, where the edge direction is determined based on the following equations (3) and (4).
上式(3)では、前記SumACに対する輝度ブロックのDCT係数のゼロ行各列のAC成分FYi(0,v)の絶対値の総和の割合が縦エッジ判定閾値THV_Edgeと比較され、前記割合が縦エッジ判定閾値THV_Edgeを上回れば、エッジが縦エッジと判定される。上式(4)では、前記SumACに対する輝度ブロックのDCT係数の各行ゼロ列のAC成分FYi(u,0)の絶対値の総和の割合が横エッジ判定閾値THH_Edgeと比較され、前記割合が横エッジ判定閾値THH_Edgeを上回れば、エッジが横エッジと判定される。前記縦エッジ判定閾値THV_Edgeおよび横エッジ判定閾値THH_Edgeも量子化パラメータQPの関数である。 In the above equation (3), the ratio of the sum of absolute values of the AC component F Yi (0, v) of the zero-row each column of the DCT coefficient of the luminance block with respect to the Sum AC is compared with the vertical edge determination threshold TH V_Edge, and If the ratio exceeds the vertical edge determination threshold TH V_Edge , the edge is determined to be a vertical edge. In the above equation (4), the ratio of the sum of absolute values of the AC components F Yi (u, 0) of each row zero column of the DCT coefficient of the luminance block with respect to the Sum AC is compared with the horizontal edge determination threshold TH H_Edge, and the ratio If the value exceeds the horizontal edge determination threshold TH H_Edge , the edge is determined to be a horizontal edge. The vertical edge determination threshold TH V_Edge and the horizontal edge determination threshold TH H_Edge are also functions of the quantization parameter QP.
ステップS34では、全ての位置の輝度ブロックに関して上記したエッジ判定が完了したか否かが判定される。完了していなければステップS35で変数iを更新し、注目する輝度ブロックを変更しながら上記した各処理が繰り返される。 In step S34, it is determined whether or not the edge determination described above has been completed for the luminance blocks at all positions. If not completed, the variable i is updated in step S35, and each process described above is repeated while changing the target luminance block.
4つの輝度ブロックの全てに関して上記した判定処理が完了するとステップS36へ進み、4つの輝度ブロックのエッジパターンが、図5に示した第1ないし第4パターンのいずれかに該当するか否かが判定される。 When the above-described determination processing is completed for all four luminance blocks, the process proceeds to step S36 to determine whether the edge patterns of the four luminance blocks correspond to any of the first to fourth patterns shown in FIG. Is done.
第1パターンは、i=0,1の各位置の輝度ブロックが水平エッジを含み、かつi=2,3の各位置の輝度ブロックが垂直エッジを含まないことを示唆している。第2パターンは、i=2,3の各位置の輝度ブロックが水平エッジを含み、かつi=0,1の各位置の輝度ブロックが垂直エッジを含まないことを示唆している。第3パターンは、i=0,2の各位置の輝度ブロックが垂直エッジを含み、かつi=1,3の各位置の輝度ブロックが水平エッジを含まないことを示唆している。第4パターンは、i=1,3の各位置の輝度ブロックが垂直エッジを含み、かつi=0,2の各位置の輝度ブロックが水平エッジを含まないことを示唆している。 The first pattern suggests that the luminance block at each position of i = 0,1 includes a horizontal edge, and the luminance block at each position of i = 2,3 does not include a vertical edge. The second pattern suggests that the luminance block at each position of i = 2, 3 includes a horizontal edge, and the luminance block at each position of i = 0, 1 does not include a vertical edge. The third pattern suggests that the luminance block at each position of i = 0, 2 includes a vertical edge, and the luminance block at each position of i = 1, 3 does not include a horizontal edge. The fourth pattern suggests that the luminance block at each position of i = 1, 3 includes a vertical edge, and the luminance block at each position of i = 0, 2 does not include a horizontal edge.
したがって、例えばi=0,1の各位置の輝度ブロックがいずれも水平エッジを含んでおり、かつi=2,3の各位置の輝度ブロックがエッジを含まないか、あるいは水平エッジのみを含めば第1パターンに該当すると判定される。しかしながら、i=0,1の各位置の輝度ブロックがいずれも水平エッジを含んでいても、i=2,3の各位置の輝度ブロックの少なくとも一方が垂直エッジを含めば、第1パターンを含めていずれのパターンにも該当しないと判定される。 Therefore, for example, if the luminance block at each position of i = 0, 1 includes a horizontal edge and the luminance block at each position of i = 2, 3 does not include an edge, or includes only a horizontal edge. It is determined that it corresponds to the first pattern. However, even if each luminance block at each position of i = 0, 1 includes a horizontal edge, if at least one of the luminance blocks at each position of i = 2, 3 includes a vertical edge, the first pattern is included. Therefore, it is determined that none of the patterns is applicable.
以上のようにして、今回の注目MBに含まれるエッジがいずれかのエッジパターンに該当すると判定されれば、MPEG-2ではインターMBであってもH.264ではイントラモードでの符号化に適した形状であるかもしれないので、ステップS6の全探索へ進む。これに対して、いずれのエッジパターンにも該当しなければ、更にステップS4のDC判定処理へ進む。 As described above, if it is determined that the edge included in the current MB of interest corresponds to one of the edge patterns, even if it is inter MB in MPEG-2, it is suitable for encoding in intra mode in H.264 Therefore, the process proceeds to a full search in step S6. On the other hand, if it does not correspond to any edge pattern, the process further proceeds to DC determination processing in step S4.
ステップS4では、前記残差成分判定部125において、今回の16x16画素単位の注目MBに関して、8x8画素単位の4つの輝度ブロックのDCT係数、および8x8画素単位の2つの色差ブロックのDCT係数の残差成分に基づいて、インターモードでの符号化が有効か否かが判定される。
In step S4, the residual
本実施形態では、次式(5)に示したように、4つの輝度ブロックのDCT係数のDC成分FYi(0,0)の絶対値の総和が所定の輝度DC成分閾値THDC1と比較され、さらに次式(6)に示したように、2つの色差ブロックのDCT係数のDC成分FCb(0,0)、FCr(0,0)が色差DC成分閾値THDC2と比較される。 In this embodiment, as shown in the following equation (5), the sum of absolute values of the DC components F Yi (0,0) of the DCT coefficients of the four luminance blocks is compared with a predetermined luminance DC component threshold TH DC1. Further, as shown in the following equation (6), the DC components F Cb (0,0) and F Cr (0,0) of the DCT coefficients of the two color difference blocks are compared with the color difference DC component threshold TH DC2 .
ここで、上式(5),(6)がいずれも成立すればDCT係数の残差成分が大きいと判定され、符号化モードを全探索すべくステップS6へ進む。これに対して、上式(5),(6)の少なくとも一方が不成立であれば、残差成分が充分に小さく、いずれの符号化モードでも符号化効率に大きな差異がないので、高速化の観点からインターモードを継承すべくステップS5へ進む。 Here, if the above equations (5) and (6) are both established, it is determined that the residual component of the DCT coefficient is large, and the process proceeds to step S6 in order to search all the coding modes. On the other hand, if at least one of the above equations (5) and (6) is not established, the residual component is sufficiently small, and there is no significant difference in coding efficiency in any coding mode. Proceed to step S5 to inherit the inter mode from the viewpoint.
一方、前記ステップS1において、今回の注目MBがイントラMBと判定されるとステップS7へ進む。ステップS7では、前記相関判定部122において、注目MBの輝度ブロックのDCT係数に基づいて、その空間的相関が評価される。 On the other hand, if it is determined in step S1 that the current MB of interest is an intra MB, the process proceeds to step S7. In step S7, the correlation determination unit 122 evaluates the spatial correlation based on the DCT coefficient of the luminance block of the MB of interest.
本実施形態では、次式(7)に示したように、今回の16x16画素単位の注目MBに関して、8x8画素単位の4つの輝度ブロックのDCT係数のDC成分の分散σ2 DCが輝度DC成分閾値THDC3と比較される。σ2 DC≦THDC3であれば、DCT係数の空間的相関が大きく、イントラ予測が有効に機能するので、ステップS8へ進んでイントラモードが承継される。 In the present embodiment, as shown in the following equation (7), the DC component variance σ 2 DC of the DCT coefficients of the four luminance blocks in the unit of 8 × 8 pixels is the luminance DC component threshold for the current MB of interest in the unit of 16 × 16 pixels. Compared with TH DC3 . If σ 2 DC ≦ TH DC3 , the spatial correlation of DCT coefficients is large, and intra prediction functions effectively, so the process proceeds to step S8 and the intra mode is inherited.
これに対して、σ2 DC>THDC3であれば、空間的相関が小さく、インター予測が有効に機能する場合もあるので、イントラ予測およびインター予測の各符号化モードを、それぞれの符号化コストに基づいて評価すべく、ステップS6の全探索へ進む。 On the other hand, if σ 2 DC > TH DC3 , the spatial correlation is small, and inter prediction may function effectively, so that each encoding mode of intra prediction and inter prediction can be set with each encoding cost. In order to evaluate based on the above, the process proceeds to a full search in step S6.
ステップS5では、前記インター符号化条件決定部126において、符号化モードをインターモードに限定して最適なブロックサイズおよび動き情報等の符号化条件が決定される。予測モードは任意の手法で決定することができ、例えば、画質の劣化度合い(D) と発生符号量(R) とを線形結合したコスト関数を使って最適な予測モードを決定(RD-Optimization : RDO)しても良いし、あるいは、MPEG-2 における動き情報を利用してH.264 の動き情報を高速に推定するようにしても良い。
In step S5, the inter-encoding
ステップS8では、前記イントラ符号化条件決定部127において、符号化モードをイントラモードに限定して、最適なブロックサイズおよびイントラ予測モード等の符号化条件が決定される。予測モードは任意の手法で決定することができ、例えば、画質の劣化度合い(D) と発生符号量(R) とを線形結合したコスト関数を使って最適な予測モードを決定(RD-Optimization : RDO) しても良いし、あるいは、MPEG-2 における変換係数の部分絶対値和の比率および正負符号の組み合わせからイントラモードで高速に推定するようにしても良い。
In step S8, the intra coding
ステップS6では、前記全探索部128において、符号化モードを限定せずに最適な符号化モードが全探索により決定される。符号化モードは任意の手法で決定することができ、例えば、画質の劣化度合い(D) と発生符号量(R)とを線形結合したコスト関数を使って最適な予測モードを決定(RD-Optimization:RDO)したり、あるいは、MPEG-2 における変換係数の部分絶対値和の比率および正負符号の組み合わせから推定されたイントラモードと、MPEG-2 における動き情報を利用して推定されたH.264 の動き情報を利用したインターモードとを比較し、その一方を符号化コスト等の観点から選択するようにしても良い。
In step S6, the
図6は、本発明の第2実施形態に係る符号化方式変換システムの主要部の構成を示した図であり、前記と同一の符号は同一または同等部分を表している。 FIG. 6 is a diagram showing a configuration of a main part of an encoding system conversion system according to the second embodiment of the present invention, and the same reference numerals as those described above represent the same or equivalent parts.
本実施形態では、MPEG-2でのイントラMBに対してH.264でも同様にイントラモードでの符号化が有効であるか否かを推定するイントラ推定手段として、前記相関判定部122に代えて近傍判定部120が設けられている。さらに、MPEG-2でのインターMBに対してH.264でも同様にインターモードでの符号化が有効であるか否かを推定するインター推定手段として、前記残差成分判定部125に代えて近傍判定部129が設けられている。
In the present embodiment, instead of the correlation determination unit 122 as intra estimation means for estimating whether or not the encoding in the intra mode is effective in the H.264 as well as the intra MB in MPEG-2. A proximity determination unit 120 is provided. Furthermore, as an inter estimation means for estimating whether or not encoding in the inter mode is effective in the H.264 as well as in the inter MB in MPEG-2, instead of the residual
図7は、本発明の第2実施形態の動作を示しフローチャートであり、図2と同一のステップ番号が付された処理では前記と同一または同等の処理が実行される。 FIG. 7 is a flowchart showing the operation of the second embodiment of the present invention. In the processing given the same step number as in FIG. 2, the same or equivalent processing is executed.
前記近傍判定部129は、ステップS3においてイントラ予測が有効ではないと判定された注目MB(インターMB)を対象に、ステップS10において、その近傍の他のMBであって、H.264における符号化モードが既に推定されている近傍MB、例えば注目MBの左、上、右上に隣接する各MBの符号化モードの推定結果を参照する。そして、各近傍MBの符号化モードの多くが(例えば、3つの近傍MBうち2つ以上の近傍MBが)、注目MBのMPEG-2における符号化モードと同じインターモードであれば、このインターモードを継承すべくステップS5へ進む。これに対して、各近傍MBの符号化モードの多くが注目MBのMPEG-2における符号化モードと異なれば、ステップS6の全探索へ進む。
The
ステップS9でも同様に、前記近傍判定部120において、注目MB(イントラMB)の近傍の他のMBであって、H.264における符号化モードが既に推定されている近傍MBの符号化モードの推定結果を参照し、各近傍MBの符号化モードの多くが(例えば、3つの近傍MBうち2つ以上の近傍MBが)、注目MBのMPEG-2における符号化モードと同じイントラモードであれば、このイントラモードを継承すべくステップS7へ進む。これに対して、各近傍MBの符号化モードの多くが注目MBのMPEG-2における符号化モードと異なれば、ステップS6の全探索へ進む。 Similarly, in step S9, the neighborhood determination unit 120 estimates other MBs in the vicinity of the target MB (intra MB) and the coding modes of neighboring MBs whose coding modes in H.264 have already been estimated. With reference to the result, many of the encoding modes of each neighboring MB (for example, two or more neighboring MBs out of three neighboring MBs) are the same intra mode as the encoding mode in MPEG-2 of the target MB. The process proceeds to step S7 to inherit this intra mode. On the other hand, if many of the encoding modes of the neighboring MBs are different from the encoding mode of MPEG-2 of the target MB, the process proceeds to full search in step S6.
10…抽出部,11…復号部,12…推定部,13…符号化部,120…近傍判定部,121…符号化モード判定部,122…相関判定部,123…MV信頼性判定部,124…エッジ判定部,125…残差成分判定部,126…インター符号化条件決定部,127…イントラ符号化条件決定部,128…全探索部,129…近傍判定部
DESCRIPTION OF
Claims (21)
第1動画像を復号する復号手段と、
前記復号された第1動画像の制御ブロックごとに第2の符号化方式での符号化モードを推定する推定手段と、
前記推定結果に基づいて、第1動画像の各制御ブロックを第2の符号化方式で符号化する符号化手段とを含み、
前記推定手段が、
第1動画像の各制御ブロックが、インターモードで符号化されたインターブロックおよびイントラモードで符号化されたイントラブロックのいずれであるかを判定する符号化モード判定手段と、
前記インターブロックに対して第2の符号化方式でも同一の符号化モードが有効であるか否かを推定するインター推定手段と、
前記イントラブロックに対して第2の符号化方式でも同一の符号化モードが有効であるか否かを推定するイントラ推定手段と、
前記インターモードが有効と推定された制御ブロックを第2の符号化方式のインターモードで符号化する際の符号化条件を決定するインター符号化条件決定手段と、
前記イントラモードが有効と推定された制御ブロックを第2の符号化方式のイントラモードで符号化する際の符号化条件を決定するイントラ符号化条件決定手段と、
同一の符号化モードが有効ではない推定された制御ブロックを対象に全探索を実行して、その符号化モードおよび符号化条件を探索する全探索手段とを含むことを特徴とする符号化方式変換装置。 The first and second encoding methods include an inter mode and an intra mode as encoding modes, and the first moving image encoded by the first encoding method is encoded by the second encoding method. In a moving image coding system conversion device for converting into two moving images,
Decoding means for decoding the first moving image;
Estimating means for estimating a coding mode in a second coding scheme for each control block of the decoded first moving image;
Encoding means for encoding each control block of the first moving image by the second encoding method based on the estimation result;
The estimating means is
Encoding mode determination means for determining whether each control block of the first moving image is an inter block encoded in the inter mode or an intra block encoded in the intra mode;
Inter estimation means for estimating whether or not the same encoding mode is effective in the second encoding scheme for the inter block;
Intra estimation means for estimating whether or not the same coding mode is valid in the second coding scheme for the intra block;
Inter coding condition determining means for determining a coding condition when the control block estimated to be effective in the inter mode is encoded in the inter mode of the second coding scheme;
Intra coding condition determining means for determining a coding condition for coding the control block in which the intra mode is estimated to be valid in the intra mode of the second coding method;
Coding method conversion characterized by including a full search means for performing a full search for an estimated control block in which the same coding mode is not valid and searching for the coding mode and coding conditions apparatus.
前記相関判定手段は、前記空間的相関の高いイントラブロックの符号化モードをイントラモードと推定することを特徴とする請求項1に記載の符号化方式変換装置。 The intra estimation means comprises correlation determination means for determining a spatial correlation of intra blocks,
The encoding method conversion apparatus according to claim 1, wherein the correlation determination unit estimates an encoding mode of the intra block having a high spatial correlation as an intra mode.
前記近傍判定手段は、前記近傍の制御ブロックの推定結果がイントラモードである割合が所定の閾値よりも高いイントラブロックの符号化モードをイントラモードと推定することを特徴とする請求項1に記載の符号化方式変換装置。 The intra estimation means comprises proximity determination means for determining an estimation result relating to coding modes of a plurality of other control blocks near the intra block;
The said neighborhood determination means estimates the encoding mode of the intra block whose ratio that the estimation result of the said control block of the neighborhood is an intra mode is higher than a predetermined threshold value as an intra mode. Encoding method converter.
前記信頼性判定手段は、信頼性の高いインターブロックの符号化モードをインターモードと推定することを特徴とする請求項1に記載の符号化方式変換装置 The inter designation means comprises a reliability judgment means for judging the reliability of the motion information of the inter block,
The encoding method conversion apparatus according to claim 1, wherein the reliability determination unit estimates an encoding mode of a highly reliable inter block as an inter mode.
前記エッジ判定手段が、前記所定方向のエッジが含まれていないインターブロックの符号化モードをインターモードと推定することを特徴とする請求項1に記載の符号化方式変換装置。 The inter estimation means comprises an edge determination means for determining whether or not an edge in a predetermined direction is included in the inter block,
The encoding method conversion apparatus according to claim 1, wherein the edge determination unit estimates an encoding mode of an inter block that does not include an edge in the predetermined direction as an inter mode.
前記残差成分判定手段は、残差成分が所定の閾値を下回っているインターブロックの符号化モードをインターモードと推定することを特徴とする請求項1に記載の符号化方式変換装置。 The inter estimation means comprises residual component determination means for determining whether or not the residual component of the orthogonal transform coefficient of the inter block is below a predetermined threshold;
The encoding method conversion apparatus according to claim 1, wherein the residual component determination unit estimates an encoding mode of an inter block whose residual component is lower than a predetermined threshold as an inter mode.
前記近傍判定手段は、前記近傍の制御ブロックの推定結果がインターモードである割合が所定の閾値よりも高いインターブロックの符号化モードをインターモードと推定することを特徴とする請求項1に記載の符号化方式変換装置。 The inter estimation unit further includes a proximity determination unit that determines an estimation result related to encoding modes of a plurality of other control blocks in the vicinity of the inter block,
The neighborhood determination unit estimates an inter-block coding mode in which a ratio that the estimation result of the neighboring control block is an inter mode is higher than a predetermined threshold as an inter-mode. Encoding method converter.
インターブロックの動き情報の信頼性を判定する信頼性判定手段と、
前記信頼性が低いと判定されたインターブロックに所定方向のエッジが含まれているか否かを判定するエッジ判定手段と、
前記所定方向のエッジが含まれていないと判定されたインターブロックの直交変換係数の残差成分が所定の閾値を下回っているか否かを判定する残差成分判定手段とを具備し、
前記残差成分が所定の閾値を下回っているインターブロックの符号化モードをインターモードと推定することを特徴とする請求項1に記載の符号化方式変換装置。 The inter estimation means is
A reliability determination means for determining the reliability of the motion information of the inter block;
Edge determining means for determining whether or not an edge in a predetermined direction is included in the inter block determined to have low reliability;
A residual component determining unit that determines whether or not a residual component of an orthogonal transformation coefficient of an inter block determined to include no edge in the predetermined direction is below a predetermined threshold;
The encoding system conversion apparatus according to claim 1, wherein an encoding mode of an inter block in which the residual component is below a predetermined threshold is estimated as an inter mode.
前記残差成分判定手段に代えて、前記所定方向のエッジが含まれていないと判定されたインターブロック近傍の他の複数の制御ブロックの推定結果を判定する近傍判定手段を具備し、
前記他の複数の制御ブロックの推定結果がインターモードである割合が所定の閾値よりも高いインターブロックの符号化モードをインターモードと推定することを特徴とする請求項10に記載の符号化方式変換装置。 The inter determination means further includes
In place of the residual component determination means, comprising: proximity determination means for determining an estimation result of a plurality of other control blocks in the vicinity of the inter block determined to include no edge in the predetermined direction;
11. The encoding scheme conversion according to claim 10, wherein an encoding mode of an inter block whose ratio of the estimation results of the other plurality of control blocks being an inter mode is higher than a predetermined threshold is estimated as an inter mode. apparatus.
第1動画像を復号する手順と、
前記復号された第1動画像の制御ブロックごとに第2の符号化方式での符号化モードを推定する手順と、
前記推定結果に基づいて、第1動画像の各制御ブロックを第2の符号化方式で符号化する符号化手順とを含み、
前記推定手順が、
第1動画像の各制御ブロックが、インターモードで符号化されたインターブロックおよびイントラモードで符号化されたイントラブロックのいずれであるかを判定する手順と、
前記インターブロックに対して第2の符号化方式でも同一の符号化モードが有効であるか否かを推定するインター推定手順と、
前記イントラブロックに対して第2の符号化方式でも同一の符号化モードが有効であるか否かを推定するイントラ推定手順と、
前記インターモードが有効と推定された制御ブロックを第2の符号化方式のインターモードで符号化する際の符号化条件を決定する手順と、
前記イントラモードが有効と推定された制御ブロックを第2の符号化方式のイントラモードで符号化する際の符号化条件を決定する手順と、
同一の符号化モードが有効ではない推定された制御ブロックを対象に全探索を実行して、その符号化モードおよび符号化条件を探索する手順手段とを含むことを特徴とする符号化方式変換方法。 The first and second encoding methods include an inter mode and an intra mode as encoding modes, and the first moving image encoded by the first encoding method is encoded by the second encoding method. In a moving image coding method conversion method for converting into two moving images,
A procedure for decoding the first moving image;
A procedure for estimating a coding mode in a second coding scheme for each control block of the decoded first moving image;
An encoding procedure for encoding each control block of the first moving image with the second encoding method based on the estimation result;
The estimation procedure comprises:
A procedure for determining whether each control block of the first moving image is an inter block encoded in the inter mode or an intra block encoded in the intra mode;
An inter estimation procedure for estimating whether or not the same encoding mode is valid in the second encoding scheme for the inter block;
An intra estimation procedure for estimating whether the same coding mode is valid in the second coding scheme for the intra block;
A procedure for determining a coding condition when coding the control block estimated to be effective in the inter mode in the inter mode of the second coding scheme;
A procedure for determining an encoding condition when encoding the control block in which the intra mode is estimated to be effective in the intra mode of the second encoding method;
A coding method conversion method comprising: a procedure unit that performs a full search for an estimated control block in which the same coding mode is not valid, and searches for the coding mode and coding conditions. .
前記空間的相関の高いイントラブロックの符号化モードがイントラモードと推定されることを特徴とする請求項15に記載の符号化方式変換方法。 The intra estimation procedure comprises determining a spatial correlation of intra blocks;
The encoding method conversion method according to claim 15, wherein an encoding mode of the intra block having a high spatial correlation is estimated as an intra mode.
前記近傍の制御ブロックの推定結果がイントラモードである割合が所定の閾値よりも高いイントラブロックの符号化モードがイントラモードと推定されることを特徴とする請求項15に記載の符号化方式変換方法。 The intra estimation procedure further comprises a step of determining an estimation result regarding coding modes of other control blocks in the vicinity of the intra block;
16. The coding method conversion method according to claim 15, wherein the coding mode of an intra block in which a ratio that the estimation result of the neighboring control block is an intra mode is higher than a predetermined threshold is estimated as an intra mode. .
インターブロックの動き情報の信頼性を判定する手順と、
前記信頼性が低いと判定されたインターブロックに所定方向のエッジが含まれているか否かを判定する手順と、
前記所定方向のエッジが含まれていないと判定されたインターブロックの直交変換係数の残差成分が所定の閾値を下回っているか否かを判定する手順とを具備し、
前記残差成分が所定の閾値を下回っているインターブロックの符号化モードをインターモードと推定することを特徴とする請求項15ないし17のいずれかに記載の符号化方式変換方法。 The inter estimation procedure comprises:
A procedure for determining the reliability of the inter-block motion information;
A procedure for determining whether or not an edge in a predetermined direction is included in the inter block determined to have low reliability;
Determining whether or not the residual component of the orthogonal transform coefficient of the inter block determined not to include an edge in the predetermined direction is below a predetermined threshold,
The encoding method conversion method according to any one of claims 15 to 17, wherein an encoding mode of an inter block in which the residual component is below a predetermined threshold is estimated as an inter mode.
前記残差成分が所定の閾値を下回っているインターブロック近傍の他の複数の制御ブロックの推定結果を判定する手順をさらに具備し、
前記他の複数の制御ブロックの推定結果がインターモードである割合が所定の閾値よりも高いインターブロックの符号化モードがインターモードと推定されることを特徴とする請求項18に記載の符号化方式変換方法。 The inter determination procedure further includes:
A step of determining an estimation result of other control blocks in the vicinity of the inter block in which the residual component is below a predetermined threshold;
19. The encoding method according to claim 18, wherein an encoding mode of an inter block whose ratio of the estimation results of the other plurality of control blocks being an inter mode is higher than a predetermined threshold is estimated as an inter mode. Conversion method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007024172A JP2008193308A (en) | 2007-02-02 | 2007-02-02 | Coding system conversion method and device, and coding system conversion program and its storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007024172A JP2008193308A (en) | 2007-02-02 | 2007-02-02 | Coding system conversion method and device, and coding system conversion program and its storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008193308A true JP2008193308A (en) | 2008-08-21 |
Family
ID=39752982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007024172A Pending JP2008193308A (en) | 2007-02-02 | 2007-02-02 | Coding system conversion method and device, and coding system conversion program and its storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008193308A (en) |
-
2007
- 2007-02-02 JP JP2007024172A patent/JP2008193308A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5128443B2 (en) | Video encoding and decoding method and apparatus | |
TWI737971B (en) | Method of decoding an image | |
KR101200865B1 (en) | An video encoding/decoding method and apparatus | |
US20150010079A1 (en) | Apparatus and method for encoding/decoding images for intra-prediction | |
JP6120707B2 (en) | Video encoding apparatus and operation method thereof | |
US20150063452A1 (en) | High efficiency video coding (hevc) intra prediction encoding apparatus and method | |
US8204136B2 (en) | Image encoding apparatus | |
WO2010001917A1 (en) | Image processing device and method | |
US9055302B2 (en) | Video encoder and video decoder | |
JP2007166617A (en) | Method and device for intra prediction coding and decoding of image | |
US20140003518A1 (en) | Image encoding method using a skip mode, and a device using the method | |
US9094687B2 (en) | Video encoder and video decoder | |
KR20170093833A (en) | Coding of intra modes | |
JP6607040B2 (en) | Motion vector search apparatus, motion vector search method, and recording medium for storing motion vector search program | |
JP2007096679A (en) | Method of encoding and decoding moving picture | |
JP4600997B2 (en) | Encoding method converter | |
KR20170125154A (en) | Method and apparatus of video decoder using curve intra prediction | |
JP2008004984A (en) | Image processor and method, program, and recording medium | |
JP2007531444A (en) | Motion prediction and segmentation for video data | |
JP2015027097A (en) | Moving picture decoding method | |
JP2007251815A (en) | Re-encoding apparatus, and program for re-encoding | |
JP2008193308A (en) | Coding system conversion method and device, and coding system conversion program and its storage medium | |
JP2008193501A (en) | Image encoding device and image encoding method | |
RU2782400C2 (en) | Method of encoding and decoding images, device for encoding and decoding and corresponding software | |
CN112153385B (en) | Encoding processing method, device, equipment and storage medium |