JP2008004984A - Image processor and method, program, and recording medium - Google Patents

Image processor and method, program, and recording medium Download PDF

Info

Publication number
JP2008004984A
JP2008004984A JP2006169648A JP2006169648A JP2008004984A JP 2008004984 A JP2008004984 A JP 2008004984A JP 2006169648 A JP2006169648 A JP 2006169648A JP 2006169648 A JP2006169648 A JP 2006169648A JP 2008004984 A JP2008004984 A JP 2008004984A
Authority
JP
Japan
Prior art keywords
encoding
mpeg
image data
macroblock
image
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.)
Withdrawn
Application number
JP2006169648A
Other languages
Japanese (ja)
Inventor
Iiwen Zuu
イーウェン ズー
Kazufumi Sato
数史 佐藤
Junichi Tanaka
潤一 田中
Yoichi Yagasaki
陽一 矢ヶ崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2006169648A priority Critical patent/JP2008004984A/en
Publication of JP2008004984A publication Critical patent/JP2008004984A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique for more efficiently coding image data. <P>SOLUTION: An MPEG 2 decoding section 115 decodes image data coded by the MPEG 2 system, outputs a baseband image to a video memory 117, outputs MPEG 2 decode information to a buffer 118, and outputs a quantization scale of each macroblock and generated bits to an MBComplexity calculation section 116. The MBComplexity calculation section 116 calculates Complexity, outputs the MPEG 2 decode information from the buffer 118 and outputs the Complexity and the generated bits R to an MB adaptive coding discrimination section 119. The MB adaptive coding discrimination section 119 determines whether field coding or frame coding is to be applied to each macroblock of the baseband image data on the basis of the information supplied from the buffer 118, and an AVC coding section 120 codes the image data by the H.264/AVC system. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像処理装置および方法、プログラム、並びに記録媒体に関し、特に、画像データを、より効率的に符号化することができるようにする画像処理装置および方法、プログラム、並びに記録媒体に関する。   The present invention relates to an image processing apparatus and method, a program, and a recording medium, and more particularly, to an image processing apparatus and method, a program, and a recording medium that enable image data to be encoded more efficiently.

近年、画像情報をデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮するMPEG(Moving Picture Coding Experts Group)などの方式に準拠した装置が、放送局などの情報配信、及び一般家庭における情報受信の双方において普及しつつある。   In recent years, MPEG (compressed by orthogonal transform such as discrete cosine transform and motion compensation is used for the purpose of efficiently transmitting and storing information, and using redundancy unique to image information. A device conforming to a scheme such as Moving Picture Coding Experts Group) is becoming popular in both information distribution in broadcasting stations and information reception in general households.

特に、MPEG2(ISO/IEC 13818−2)は、汎用画像符号化方式として規定されており、飛び越し走査画像及び順次走査画像の双方、並びに標準解像度画像及び高精細画像を網羅する標準で、プロフェッショナル用途(業務用)及びコンシューマー用途の広範なアプリケーションに現在広く用いられている。MPEG2の符号化方式を用いることにより、例えば720×480画素を持つ標準解像度の飛び越し走査画像であれば4〜8Mbps、1920×1088画素を持つ高解像度の飛び越し走査画像であれば18〜22Mbpsの符号量(ビットレート)を割り当てることで、高い圧縮率と良好な画質の実現が可能である。   In particular, MPEG2 (ISO / IEC 13818-2) is defined as a general-purpose image coding system, and is a standard that covers both interlaced scanning images and progressive scanning images, standard resolution images, and high-definition images. Widely used in a wide range of applications for (business) and consumer use. By using the MPEG2 encoding method, for example, a standard resolution interlaced scanning image having 720 × 480 pixels is 4 to 8 Mbps, and a high resolution interlaced scanning image having 1920 × 1088 pixels is 18 to 22 Mbps. By assigning an amount (bit rate), it is possible to achieve a high compression rate and good image quality.

MPEG2は主として放送に適した高画質の符号化を対象としていたので、MPEG1より低い符号量(ビットレート)、すなわち、より高い圧縮率の符号化方式には対応していなかった。今後は、携帯端末などの普及により、より低い符号量の符号化方式のニーズが高まると思われ、これに対応してMPEG4符号化方式の標準化が行われた。MPEG4の画像符号化方式に関しては、1998年12月にISO/IEC 14496−2としてその規格が国際標準として規定された。   Since MPEG2 was mainly intended for high-quality encoding suitable for broadcasting, it did not support encoding methods having a lower code amount (bit rate) than MPEG1, that is, a higher compression rate. In the future, with the widespread use of portable terminals and the like, the need for a lower code amount encoding method is expected to increase, and the MPEG4 encoding method has been standardized accordingly. Regarding the MPEG4 image encoding system, the standard was defined as an international standard in December 1998 as ISO / IEC 14496-2.

更に、近年、当初テレビ会議用の画像符号化を目的として策定された、H.26L(ITU−T Q6/16 VCEG)という標準が注目されている。H.26LはMPEG2やMPEG4といった従来の符号化方式に比べ、その符号化または復号に、より多くの演算量が要求されるものの、より高い符号化効率が実現されることが知られている。また、現在、MPEG4の活動の一環として、このH.26Lをベースに、H.26Lではサポートされない機能をも取り入れ、より高い符号化効率を実現する符号化方式の標準化がJoint Model of Enhanced−Compression Video Codingとして行われている。2003年3月にはH.264/AVC(Advanced Video Coding)という国際標準が制定されている。   Furthermore, in recent years, a standard called H.26L (ITU-T Q6 / 16 VCEG), which was originally formulated for the purpose of image coding for video conferencing, has attracted attention. H. 26L is known to achieve higher encoding efficiency than the conventional encoding schemes such as MPEG2 and MPEG4, although a larger amount of computation is required for encoding or decoding. In addition, as part of MPEG4 activities, this H.264 Based on H.26L Standardization of an encoding method that incorporates a function that is not supported by 26L and realizes higher encoding efficiency is performed as Joint Model of Enhanced-Compression Video Coding. In March 2003, an international standard called H.264 / AVC (Advanced Video Coding) was established.

また、これらの符号化方式の普及に伴い、ある符号化方式で符号化されたデータを、他の符号化方式で符号化されたデータに変換するトランスコードと呼ばれる技術も重要となる。   In addition, with the widespread use of these encoding methods, a technique called transcoding that converts data encoded by a certain encoding method into data encoded by another encoding method becomes important.

トランスコードに関する技術については、例えば、特許文献1のような技術が提案されている。
特開2001−145113号公報
As a technique related to transcoding, for example, a technique as disclosed in Patent Document 1 has been proposed.
JP 2001-145113 A

ところで、H.264/AVC符号化方式では、従来のMPEG方式などにはなかった、マクロブロックレベルでのフィールドまたはフレーム適応符号化機能が追加されている。H.264/AVC符号化方式では、上下二つのマクロブロックによって構成されるマクロブロックペアを単位としてそれぞれのマクロブロックを、フレーム符号化またはフィールド符号化を行うことができる。   By the way, in the H.264 / AVC encoding system, a field or frame adaptive encoding function at a macroblock level, which was not found in the conventional MPEG system or the like, is added. In the H.264 / AVC encoding scheme, each macroblock can be frame-encoded or field-encoded in units of macroblock pairs formed by two upper and lower macroblocks.

例えば、符号化されるために入力される画像信号が、インターレース(飛び越し走査)フォーマットである場合、ピクチャ全体としてフレーム符号化を行い、マクロブロックペアに対して、フィールド符号化またはフレーム符号化を行うことも可能である。H.264/AVC方式では通常、個々のマクロブロックを、フィールド符号化するか、またはフレーム符号化するかの判定は、例えば、そのマクロブロックを符号化した際に、割り当てられるビット量がより少なくなるように判定される。   For example, when an image signal input to be encoded is in an interlace (interlace scanning) format, frame encoding is performed for the entire picture, and field encoding or frame encoding is performed on a macroblock pair. It is also possible. In the H.264 / AVC system, normally, whether to perform field coding or frame coding for each macroblock is determined, for example, when the macroblock is coded, the allocated bit amount is smaller. It is determined to be.

しかしながら、このように個々のマクロブロックフィールド符号化するか、またはフレーム符号化するかを判定すると符号化効率が向上する反面、フィールド符号化するか、またはフレーム符号化するかの判定のためには、例えば、個々のマクロブロックペアに対してフレーム符号化と、フィールド符号化とをそれぞれ行うか、またはそれと同等の演算処理を予め行うなどの必要があり、符号化装置(エンコーダ)にかかる処理付加が増加し、符号化処理に時間がかかる。   However, when determining whether to perform individual macroblock field encoding or frame encoding in this manner, the encoding efficiency is improved. On the other hand, in order to determine whether to perform field encoding or frame encoding, For example, it is necessary to perform frame coding and field coding for each macroblock pair, or to perform an equivalent arithmetic process in advance, and processing added to the coding device (encoder) is added. Increases, and the encoding process takes time.

本発明はこのような状況に鑑みてなされたものであり、画像データを、より効率的に符号化することができるようにするものである。   The present invention has been made in view of such a situation, and enables image data to be encoded more efficiently.

本発明の一側面は、MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置であって、MPEG方式で符号化された画像データを復号する復号手段と、前記復号手段により、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報を取得するMPEGデコード情報取得手段と、前記復号手段により、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データを取得するベースバンド画像取得手段と、前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像取得手段により取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式を判定する判定手段と、前記判定手段により判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データを生成する符号化手段とを備える画像処理装置である。   One aspect of the present invention is an image processing apparatus that converts image data encoded by the Moving Picture Coding Experts Group (MPEG) method into image data encoded by the H.264 / AVC (Advanced Video Coding) method. A decoding means for decoding image data encoded by the MPEG method, and information obtained when the image data encoded by the MPEG method is decoded by the decoding means; MPEG decoding information acquisition means for acquiring MPEG decoding information, which is information set for compressing data in MPEG format, and a base obtained by decoding image data encoded in MPEG format by the decoding means Baseband image acquisition means for acquiring image data of a band, and based on the MPEG decode information acquired by the decode information acquisition means, the baseband image acquisition means Encoding for encoding in H.264 / AVC format for each of the macroblock pairs composed of two macroblocks that are adjacent to each other in the image in the baseband image acquired from above A coding unit for generating image data encoded by the H.264 / AVC method by encoding each of the macroblock pairs with a determination unit for determining a method and the encoding method determined by the determination unit And an image processing device.

前記復号手段により、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、前記MPEG方式で符号化された画像データの各マクロブロックの発生ビット、および前記マクロブロックの量子化スケールに関する情報基づいて、前記マクロブロックのそれぞれに対応する、複雑さを表す値を算出する算出手段をさらに備えるようにすることができる。   Information obtained when the image data encoded by the MPEG system is decoded by the decoding means, the generated bits of each macroblock of the image data encoded by the MPEG system, and the macroblock A calculation unit that calculates a value representing complexity corresponding to each of the macroblocks based on information on a quantization scale may be further provided.

前記算出手段の算出結果に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する前記複雑さを表す値が閾値以下であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とするようにすることができる。   A value representing the complexity corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the calculation result of the calculation means. Is determined to be equal to or less than the threshold, the determination means may set the encoding method of the macroblock pair to frame encoding.

前記算出手段の算出結果に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する前記複雑さを表す値が閾値以上であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とするようにすることができる。   A value representing the complexity corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the calculation result of the calculation means. Is determined to be equal to or greater than the threshold, the determination means may set the encoding method of the macroblock pair to field encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する発生ビットの合計値が閾値以下であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とするようにすることができる。   Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the total value of the generated bits is equal to or less than the threshold value, the determination unit may set the encoding method of the macroblock pair to frame encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する発生ビットの合計値が閾値以上であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とするようにすることができる。   Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the total value of the generated bits is greater than or equal to the threshold value, the determination unit may set the encoding method of the macroblock pair to field encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、それぞれのマクロブロックに対応する動きベクトルの差分値の絶対値が閾値以下であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とするようにすることができる。   Based on the MPEG decode information acquired by the decode information acquisition means, in two macroblocks included in the macroblock pair of the baseband image, the absolute value of the difference value of the motion vector corresponding to each macroblock is When it is determined that the value is equal to or less than the threshold, the determination unit may set the encoding method of the macroblock pair to frame encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、それぞれのマクロブロックに対応する動きベクトルの差分値の絶対値が閾値以上であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とするようにすることができる。   Based on the MPEG decode information acquired by the decode information acquisition means, in two macroblocks included in the macroblock pair of the baseband image, the absolute value of the difference value of the motion vector corresponding to each macroblock is If it is determined that the value is equal to or greater than the threshold value, the determination unit may set the encoding method of the macroblock pair to field encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応するDCTTypeがフレームDCTであると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とするようにすることができる。   Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the DCTType to be performed is the frame DCT, the determination unit may set the encoding method of the macroblock pair to frame encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応するDCTTypeがフィールドDCTであると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とするようにすることができる。   Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the DCTType to be performed is field DCT, the determination unit may set the encoding method of the macroblock pair to field encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する動き補償予測モードがフレーム動き補償であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とするようにすることができる。   Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the motion compensation prediction mode to be performed is frame motion compensation, the determination unit may set the encoding method of the macroblock pair to frame encoding.

前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する動き補償予測モードがフィールド動き補償であると判定された場合、前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とするようにすることができる。   Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the motion compensation prediction mode to be performed is field motion compensation, the determination unit may set the encoding method of the macroblock pair to field encoding.

本発明の一側面は、MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置の画像処理方法であって、MPEG方式で符号化された画像データを復号し、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報を取得し、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データを取得し、前記取得された前記MPEGデコード情報に基づいて、前記取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式を判定し、前記判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データを生成するステップを含む画像処理方法である。   One aspect of the present invention is an image processing apparatus for converting image data encoded by the MPEG (Moving Picture Coding Experts Group) method into image data encoded by the H.264 / AVC (Advanced Video Coding) method. An image processing method for decoding image data encoded by the MPEG method, and information obtained when the image data encoded by the MPEG method is decoded, wherein the baseband image data is converted to the MPEG method MPEG decoding information, which is information set for compression in the image, is acquired, baseband image data obtained by decoding the image data encoded by the MPEG method is acquired, and the acquired MPEG decoding Based on the information, for each of the macroblock pairs that are included in the acquired baseband image and are composed of two macroblocks that are adjacent vertically in the image, H.264 / A Image data encoded by the H.264 / AVC method is determined by determining the encoding method in the case of encoding by the VC method, and encoding each macroblock pair by the determined encoding method. Is an image processing method including a step of generating.

本発明の一側面は、MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置に画像処理を実行させるプログラムであって、MPEG方式で符号化された画像データの復号を制御し、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報の取得を制御し、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データの取得を制御し、前記取得された前記MPEGデコード情報に基づいて、前記取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式の判定を制御し、前記判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データの生成を制御するステップを含むコンピュータが読み取り可能なプログラムである。   One aspect of the present invention is an image processing apparatus for converting image data encoded by the MPEG (Moving Picture Coding Experts Group) method into image data encoded by the H.264 / AVC (Advanced Video Coding) method. A program for executing image processing, which controls decoding of MPEG-encoded image data, and is information obtained when the MPEG-encoded image data is decoded. Controls the acquisition of MPEG decode information, which is information set to compress image data in the MPEG format, and controls the acquisition of baseband image data obtained by decoding the image data encoded in the MPEG format Based on the acquired MPEG decoding information, a macro composed of two macroblocks adjacent to each other in the image included in the acquired baseband image For each of the lock pairs, it controls the determination of the encoding method when encoding with the H.264 / AVC method, and by encoding each of the macroblock pairs with the determined encoding method, H A computer-readable program including a step of controlling generation of image data encoded in the .264 / AVC format.

本発明の一側面においては、MPEG方式で符号化された画像データが復号され、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報が取得され、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データが取得され、前記取得された前記MPEGデコード情報に基づいて、前記取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式が判定され、前記判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データが生成される。   In one aspect of the present invention, image data encoded by the MPEG method is decoded and information obtained when the image data encoded by the MPEG method is decoded, and the baseband image data is converted into MPEG. MPEG decoding information, which is information set for compression by a method, is acquired, baseband image data obtained by decoding image data encoded by the MPEG method is acquired, and the acquired MPEG Based on the decoding information, each of the macroblock pairs included in the acquired baseband image and composed of two macroblocks adjacent to each other in the upper and lower sides in the image is encoded in the H.264 / AVC format. The encoding method is determined, and encoding is performed for each of the macroblock pairs with the determined encoding method, thereby encoding with the H.264 / AVC method. Of image data is generated.

本発明によれば、画像データを、より効率的に符号化することができる。   According to the present invention, image data can be encoded more efficiently.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、明細書または図面に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、明細書または図面に記載されていることを確認するためのものである。従って、明細書または図面中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between constituent elements of the present invention and the embodiments described in the specification or the drawings are exemplified as follows. This description is intended to confirm that the embodiments supporting the present invention are described in the specification or the drawings. Therefore, even if there is an embodiment which is described in the specification or the drawings but is not described here as an embodiment corresponding to the constituent elements of the present invention, that is not the case. It does not mean that the form does not correspond to the constituent requirements. Conversely, even if an embodiment is described here as corresponding to a configuration requirement, that means that the embodiment does not correspond to a configuration requirement other than the configuration requirement. It's not something to do.

本発明の一側面の画像処理装置は、MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置であって、MPEG方式で符号化された画像データを復号する復号手段(例えば、図1のMPEG復号部115)と、前記復号手段により、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報を取得するMPEGデコード情報取得手段(例えば、図1のバッファ118)と、前記復号手段により、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データを取得するベースバンド画像取得手段(例えば、図1のビデオメモリ117)と、前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像取得手段により取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式(例えば、フレーム符号化方式またはフィールド符号化方式)を判定する判定手段(例えば、図1のMB適応符号化判定部119)と、前記判定手段により判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データを生成する符号化手段(例えば、図1のAVC符号化部120)とを備える。   An image processing apparatus according to an aspect of the present invention converts image data encoded by an MPEG (Moving Picture Coding Experts Group) method into image data encoded by an H.264 / AVC (Advanced Video Coding) method. An image processing apparatus that decodes image data encoded by the MPEG system (for example, the MPEG decoding unit 115 in FIG. 1) and image data encoded by the MPEG system by the decoding means. MPEG decoding information acquisition means (for example, buffer 118 in FIG. 1) that acquires MPEG decoding information that is information obtained when decoding and is set to compress baseband image data in the MPEG format And baseband image acquisition means (for example, a video memo in FIG. 1) for acquiring baseband image data obtained by decoding the MPEG encoded image data by the decoding means. 117) and 2 adjacent to the top and bottom in the image included in the baseband image acquired by the baseband image acquisition means based on the MPEG decode information acquired by the decode information acquisition means. For each macroblock pair composed of two macroblocks, a determination unit (for example, a frame encoding method or a field encoding method) for determining an encoding method in the case of encoding in the H.264 / AVC format (for example, An image encoded in the H.264 / AVC format by encoding each of the macroblock pairs with the encoding method determined by the MB adaptive encoding determination unit 119) and the determination means in FIG. Coding means for generating data (for example, the AVC coding unit 120 in FIG. 1).

この画像処理装置は、前記復号手段により、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、前記MPEG方式で符号化された画像データの各マクロブロックの発生ビット、および前記マクロブロックの量子化スケールに関する情報基づいて、前記マクロブロックのそれぞれに対応する、複雑さを表す値を算出する算出手段(例えば、図1のMBComplexity算出部116)をさらに備えるようにすることができる。   The image processing apparatus is information obtained when the decoding unit decodes the image data encoded by the MPEG method, and the generated bits of each macroblock of the image data encoded by the MPEG method And a calculation means (for example, MBComplexity calculation unit 116 in FIG. 1) for calculating a value representing complexity corresponding to each of the macroblocks based on information on the quantization scale of the macroblock. be able to.

本発明の一側面の画像処理方法は、MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置の画像処理方法であって、MPEG方式で符号化された画像データを復号し(例えば、図6のステップS101の処理)、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報を取得し(例えば、図6のステップS103の処理)、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データを取得し(例えば、図6のステップS104の処理)、前記取得された前記MPEGデコード情報に基づいて、前記取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式(例えば、フレーム符号化方式またはフィールド符号化方式)を判定し(例えば、図6のステップS106の処理)、前記判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データを生成する(例えば、図6のステップS108の処理)ステップを含む。   An image processing method according to one aspect of the present invention converts image data encoded by the MPEG (Moving Picture Coding Experts Group) method into image data encoded by the H.264 / AVC (Advanced Video Coding) method. An image processing method of an image processing apparatus, wherein image data encoded by the MPEG method is decoded (for example, the process of step S101 in FIG. 6), and the image data encoded by the MPEG method is decoded. Obtained MPEG decoding information, which is information obtained and set for compressing baseband image data in the MPEG format (for example, processing in step S103 in FIG. 6), and encodes in the MPEG format Baseband image data obtained by decoding the obtained image data is acquired (for example, the process of step S104 in FIG. 6), and the acquired base data is obtained based on the acquired MPEG decoding information. An encoding method (for example, a frame) for encoding each of the macroblock pairs formed by two macroblocks adjacent to each other in the image in the band in the band image according to the H.264 / AVC method (For example, the process of step S106 in FIG. 6), and coding each of the macroblock pairs with the determined coding method, thereby determining H.264 / This includes a step of generating image data encoded by the AVC method (for example, the process of step S108 in FIG. 6).

以下、図面を参照して、本発明の実施の形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は本発明を適用した画像処理装置100の一実施の形態に係る構成例を示すブロック図である。画像処理装置100は、例えば、MPEG(Moving Picture Coding Experts Group)2方式で圧縮されて符号化された画像データを、H.264/AVC(Advanced Video Coding)方式により圧縮されて符号化された画像データに変換するトランスコーダとして構成される。   FIG. 1 is a block diagram showing a configuration example according to an embodiment of an image processing apparatus 100 to which the present invention is applied. The image processing apparatus 100, for example, compresses and encodes image data that has been compressed by the MPEG (Moving Picture Coding Experts Group) 2 method using the H.264 / AVC (Advanced Video Coding) method. Configured as a transcoder that converts data.

同図において、MPEG2復号部115は、入力される、MPEG2方式で符号化された画像データのビットストリームを復号し、ベースバンドの画像データ(または画像信号)を、ビデオメモリ117に出力し、MPEG2デコード情報を、バッファ118に出力する。ここで出力されるMPEG2デコード情報は、MPEG2の動き補償(MC(Motion Compensation))に用いられる動き補償予測モード(MCモード)、MPEG2のフレームDCTまたはフィールドDCTを区別する情報であるDCTType、当該ピクチャがフレームピクチャであるかフィールドピクチャであるかを表す情報であるPictureType、MPEG2の画像データにおける各マクロブロックの量子化スケールQuant、および各マクロブロックにおける発生ビットRを含んだ情報とされる。   In the figure, an MPEG2 decoding unit 115 decodes an input bit stream of image data encoded by the MPEG2 system, outputs baseband image data (or an image signal) to a video memory 117, and MPEG2 Decode information is output to the buffer 118. The MPEG2 decoding information output here includes a motion compensated prediction mode (MC mode) used for MPEG2 motion compensation (MC (Motion Compensation)), a DCTType that is information for distinguishing an MPEG2 frame DCT or a field DCT, and the picture Is information including a PictureType which is information indicating whether a frame picture or a field picture, a quantization scale Quant of each macroblock in MPEG2 image data, and a generated bit R in each macroblock.

また、MPEG2復号部115は、上述したMPEG2デコード情報に含まれるMPEG2の画像データにおける各マクロブロックの量子化スケールQuant、および各マクロブロックにおける発生ビットRをMBComplexity算出部116に出力する。   Also, the MPEG2 decoding unit 115 outputs the quantization scale Quant of each macroblock in the MPEG2 image data included in the above-described MPEG2 decoding information and the generated bit R in each macroblock to the MBComplexity calculation unit 116.

MBComplexity算出部116は、MPEG2復号部115から供給される情報に基づいて、各マクロブロックの複雑さを表す値であるComplexityを式(1)により算出する。ここで算出されるComplexityは、後述するように、MB適応符号化判定部119における符号化方式(フィールド符号化するか、またはフレーム符号化するか)の判定に用いられることになる。   Based on the information supplied from the MPEG2 decoding unit 115, the MBComplexity calculation unit 116 calculates Complexity, which is a value representing the complexity of each macroblock, using Equation (1). The Complexity calculated here is used for determination of the encoding method (whether field encoding or frame encoding) in the MB adaptive encoding determination unit 119, as will be described later.

Figure 2008004984
Figure 2008004984

そして、MBComplexity算出部116は、算出した各マクロブロックのComplexityと、各マクロブロックにおける発生ビットRとを、バッファ118に出力する。   Then, the MBComplexity calculation unit 116 outputs the calculated Complexity of each macroblock and the generated bit R in each macroblock to the buffer 118.

バッファ118は、予め設定された単位量のMPEG2デコード情報、並びにComplexityおよび発生ビットRを記憶し、所定のタイミングで記憶していたデータを、AVC符号化部120のMB適応符号化判定部119に出力する。バッファ118は、例えば、画像データ1フレーム分に対応するMPEG2デコード情報、並びにComplexityおよび発生ビットRを記憶し、ビデオメモリ117から1フレーム分のベースバンドの画像データ(または画像信号)がAVC符号化部120に供給されるタイミングで、そのフレームに対応するMPEG2デコード情報、並びにComplexityおよび発生ビットRをMB適応符号化判定部119に出力する。   The buffer 118 stores MPEG2 decode information of a preset unit amount, Complexity, and generated bit R, and stores the data stored at a predetermined timing to the MB adaptive encoding determination unit 119 of the AVC encoding unit 120. Output. The buffer 118 stores, for example, MPEG2 decode information corresponding to one frame of image data, Complexity and generated bit R, and one frame of baseband image data (or image signal) from the video memory 117 is AVC encoded. At the timing supplied to the unit 120, the MPEG2 decoding information corresponding to the frame, Complexity, and generated bit R are output to the MB adaptive coding determination unit 119.

MB適応符号化判定部119は、バッファ118から供給されるMPEG2デコード情報、並びにComplexityおよび発生ビットRに基づいて、ビデオメモリ117から供給される1フレーム分のベースバンドの画像データの各マクロブロックを、フィールド符号化するか、またはフレーム符号化するかの判定を行う。H.264/AVC符号化方式では、従来のMPEG方式などにはなかった、マクロブロックレベルでのフィールドまたはフレーム適応符号化機能が追加されている。H.264/AVC符号化方式では、2つのマクロブロックにより構成されるマクロブロックペアを単位としてそれぞれのマクロブロックを、フレーム符号化またはフィールド符号化を行うことができ、MB適応符号化判定部119では、このマクロブロックペア毎に適用すべき符号化方式(フレーム符号化またはフィールド符号化)の判定が行われる。   Based on the MPEG2 decoding information supplied from the buffer 118, the Complexity and the generated bit R, the MB adaptive coding determination unit 119 determines each macroblock of the baseband image data for one frame supplied from the video memory 117. Whether to perform field encoding or frame encoding is determined. In the H.264 / AVC encoding system, a field or frame adaptive encoding function at the macroblock level, which was not found in the conventional MPEG system, is added. In the H.264 / AVC encoding scheme, each macroblock can be subjected to frame encoding or field encoding in units of a macroblock pair formed of two macroblocks, and an MB adaptive encoding determination unit 119 can be performed. In this case, a coding method (frame coding or field coding) to be applied for each macroblock pair is determined.

AVC符号化部120は、ビデオメモリ117から供給されるベースバンドの画像データを、H.264/AVC方式により符号化する。AVC符号化部120の詳細な構成例を図2に示す。   The AVC encoding unit 120 encodes baseband image data supplied from the video memory 117 according to the H.264 / AVC format. A detailed configuration example of the AVC encoding unit 120 is shown in FIG.

図2において、入力となる画像信号は、まず、A/D変換部201においてデジタルデータに変換される。なお、ビデオメモリ117からデジタルデータとして画像データが供給される場合、A/D変換部201の処理は省略するようにすることも可能である。   In FIG. 2, an input image signal is first converted into digital data by an A / D converter 201. Note that when image data is supplied as digital data from the video memory 117, the processing of the A / D conversion unit 201 may be omitted.

次に、出力となる画像圧縮情報のGOP(Group of Pictures)構造に応じ、画面並べ替えバッファ202においてフレームの並べ替えが行われる。   Next, the screen rearrangement buffer 202 rearranges the frames in accordance with the GOP (Group of Pictures) structure of the image compression information to be output.

画面並べ替えバッファ202を介して供給される画像データは、その画像データの画素値と、イントラ予測部212または動き予測補償部213がフレームメモリ211に蓄積されている画像データ、または画面並べ替えバッファ202から供給される画像データに基づいて生成する画素値との差分情報が加算機203により演算され、直交変換部204に入力される。   The image data supplied via the screen rearrangement buffer 202 includes the pixel value of the image data, the image data stored in the frame memory 211 by the intra prediction unit 212 or the motion prediction compensation unit 213, or the screen rearrangement buffer. Difference information with respect to a pixel value generated based on the image data supplied from 202 is calculated by the adder 203 and input to the orthogonal transform unit 204.

なお、上述したように、H.264/AVC符号化方式では、上下に隣接する2つのマクロブロックによって構成されるマクロブロックペアを単位としてそれぞれのマクロブロックを、フレーム符号化またはフィールド符号化を行うことができる。従って、加算機203から出力される差分情報は、マクロブロック単位で出力され、例えば、それぞれの差分情報に対応するマクロブロックを特定するための情報が付加されて出力される。   As described above, in the H.264 / AVC encoding method, each macroblock is frame-encoded or field-encoded in units of macroblock pairs formed by two macroblocks adjacent to each other in the vertical direction. be able to. Therefore, the difference information output from the adder 203 is output in units of macroblocks. For example, information for specifying a macroblock corresponding to each difference information is added and output.

図3は、マクロブロックの例を説明する図である。H.264/AVC符号化方式では、通常16×16の画素で構成されるマクロブロックが用いられ、図中正方形の枠で示されるそれぞれが個々のマクロブロックとされる。マクロブロックは、例えば、画像の左上から順に設定され、この例では、最も左上側のマクロブロックが番号0のマクロブロックとされ、番号0のマクロブロックの下側に隣接するマクロブロックが番号1のマクロブロックとされている。さらに、番号0のマクロブロックの右側に隣接するマクロブロックが番号2のマクロブロックとされ、番号0のマクロブロックの右側に隣接するマクロブロックが番号3のマクロブロックとされている。   FIG. 3 is a diagram illustrating an example of a macro block. In the H.264 / AVC encoding system, macroblocks usually composed of 16 × 16 pixels are used, and each indicated by a square frame in the figure is an individual macroblock. For example, the macroblocks are set in order from the upper left of the image, and in this example, the macroblock on the upper left is the number 0 macroblock, and the macroblock adjacent to the lower side of the number 0 macroblock is number 1. It is a macro block. Further, the macroblock adjacent to the right side of the macroblock numbered 0 is the macroblock numbered 2, and the macroblock adjacent to the right side of the macroblock numbered 0 is the macroblock numbered 3.

同図に示されるように、H.264/AVC符号化方式では、画像の中で上下に隣接する2つのマクロブロックによって構成されるマクロブロックペアのそれぞれについてフレーム符号化するか、またはフィールド符号化をするかを適応的に選択することができるようになされている。この例では、番号0と番号1の2つのマクロブロックにより1つのマクロブロックペアが構成され、番号2と番号3の2つのマクロブロックにより1つのマクロブロックペアが構成され、・・・のようにマクロブロックペアが構成されることになる。   As shown in the figure, in the H.264 / AVC encoding method, frame encoding or field encoding is performed for each macroblock pair formed by two macroblocks adjacent vertically in an image. It is made to be able to choose adaptively. In this example, one macroblock pair is composed of two macroblocks of number 0 and number 1, one macroblock pair is composed of two macroblocks of number 2 and number 3, and so on. A macroblock pair is constructed.

また、MB適応符号化判定部119により判定された、各マクロブロック(実際にはマクロブロックペア)を、フィールド符号化するか、またはフレーム符号化するかを表す情報が、それぞれのマクロブロックに対応付けられて画面並べ替えバッファ202に入力される画像データに付加されて供給されるようになされている。   In addition, information indicating whether each macroblock (actually, a macroblock pair) determined by the MB adaptive encoding determination unit 119 is field-encoded or frame-encoded corresponds to each macroblock. Attached to the image data input to the screen rearrangement buffer 202 and supplied.

AVC符号化部120に入力される画像データがイントラ(画像内)符号化される画像データである場合、画面並べ替えバッファ202を介して供給される画像データは、その画像データの画素値と、イントラ予測部212がフレームメモリ211に蓄積されている画像データに基づいて生成する画素値との差分情報が加算機203により演算され、直交変換部204に入力され、その差分情報に対して離散コサイン変換(DCT)、カルーネン・レーベ変換等の直交変換処理が施される。   When the image data input to the AVC encoding unit 120 is image data that is intra-encoded (intra-image), the image data supplied via the screen rearrangement buffer 202 includes the pixel value of the image data, The difference information with the pixel value generated by the intra prediction unit 212 based on the image data stored in the frame memory 211 is calculated by the adder 203 and input to the orthogonal transform unit 204, and a discrete cosine is obtained with respect to the difference information. Orthogonal transformation processing such as transformation (DCT) and Karhunen-Loeve transformation is performed.

直交変換部204から出力される変換係数は、量子化部205において量子化処理が施される。   The transform coefficient output from the orthogonal transform unit 204 is subjected to quantization processing in the quantization unit 205.

レート制御部213は、量子化部205による量子化処理に用いられる量子化スケールなどを必要に応じて変更するなどして制御することで、出力されるデータのビットレートを制御する。   The rate control unit 213 controls the bit rate of the output data by controlling the quantization scale used for the quantization process by the quantization unit 205 by changing it as necessary.

量子化部205から出力される量子化された変換係数は、可逆変換部206に入力され、可逆変換部206により可変長符号化、算術符号化等の可逆符号化の処理が施された後、蓄積バッファ207に蓄積され、H.264/AVC方式で符号化された画像データとして出力される。   The quantized transform coefficient output from the quantization unit 205 is input to the lossless transform unit 206, and after lossless encoding processing such as variable length coding and arithmetic coding is performed by the lossless transform unit 206, The image data is accumulated in the accumulation buffer 207 and output as image data encoded by the H.264 / AVC format.

一方、量子化部205から出力される量子化された変換係数は、逆量子化部208にも供給されて逆量子化の処理が施された後、さらに逆直交変換部209において逆直交変換処理が施されて、復号された画像データとなる。   On the other hand, the quantized transform coefficient output from the quantization unit 205 is also supplied to the inverse quantization unit 208 and subjected to the inverse quantization process, and then the inverse orthogonal transform unit 209 further performs the inverse orthogonal transform process. Is applied to obtain decoded image data.

逆直交変換部209から出力される復号された画像データは、デブロックフィルタ210においてブロック歪の除去が施された後、フレームメモリ11に蓄積される。   The decoded image data output from the inverse orthogonal transform unit 209 is stored in the frame memory 11 after the block distortion is removed by the deblocking filter 210.

なお、イントラ予測部212においては、符号化するマクロブロックに応じて、時間軸において前方向(過去側)のフレーム画像データのみを参照画像とする前方向予測モード、時間軸において後ろ方向(未来側)のフレーム画像データのみを参照画像とする後ろ方向予測モード、上記2枚のフレーム画像データの両方を参照画像とする双方向予測モードなどのモードを適用することが可能である。イントラ予測部212において、当該マクロブロックに対して適用されたイントラ予測モードに関する情報は、可逆符号化部206に伝送され、H.264/AVC方式で符号化された画像データにおけるヘッダ情報の一部として符号化される。   In the intra prediction unit 212, in accordance with the macroblock to be encoded, the forward prediction mode in which only the frame image data in the forward direction (past side) on the time axis is the reference image, and the backward direction in the time axis (future side) The backward prediction mode in which only the frame image data is used as a reference image and the bidirectional prediction mode in which both of the two frame image data are used as reference images can be applied. In the intra prediction unit 212, information on the intra prediction mode applied to the macroblock is transmitted to the lossless encoding unit 206 and a part of header information in the image data encoded by the H.264 / AVC format. Is encoded as

一方、AVC符号化部120に入力される画像データがインター(画像間)符号化される画像データである場合、画面並べ替えバッファ202を介して供給される画像データは、まず、動き予測・補償部213に入力される。このとき、動き予測・補償部213は、フレームメモリ211から参照画像の画像データを取り出し、その画像データに対して動き予測・補償処理を施すことで予測画像データを生成する。なお、上述したマクロブロックペアを単位としてそれぞれのマクロブロックを、フレーム符号化するか、またはフィールド符号化するかの判定は、AVC符号化部120に入力される画像データがインター(画像間)符号化される画像データである場合に行われる。   On the other hand, when the image data input to the AVC encoding unit 120 is image data to be inter-coded, the image data supplied via the screen rearrangement buffer 202 is first subjected to motion prediction / compensation. Input to the unit 213. At this time, the motion prediction / compensation unit 213 extracts the image data of the reference image from the frame memory 211, and generates predicted image data by performing motion prediction / compensation processing on the image data. Note that whether or not each macroblock is frame-encoded or field-encoded in units of the above-described macroblock pairs is determined based on whether the image data input to the AVC encoding unit 120 is an inter (inter-image) code. This is performed when the image data is to be converted.

MPEG2では、画像データのフレーム構造がフレームストラクチャの場合、マクロブロックはトップフィールドとボトムフィールドがインターレースされた16画素x16ライン(輝度信号)のフレームブロックで構成され、フレーム動き補償予測、フィールド動き補償予測、およびデュアルプライム予測という3つの動き補償予測が用いられる。   In MPEG2, when the frame structure of image data is a frame structure, a macro block is composed of a frame block of 16 pixels × 16 lines (luminance signal) in which a top field and a bottom field are interlaced, and frame motion compensation prediction and field motion compensation prediction are performed. , And dual prime prediction, three motion compensated predictions are used.

フレーム動き補償予測は、インターレースされた2つのフィールドが合成されたフレームで動き補償予測を行うもので、輝度信号はインターレースされた16画素×16ラインブロックごとに予測される。インターレース信号においては、1フレームを構成する2つのフィールドのうち、空間的に上にあるフィールドがトップフィールドと呼ばれ、空間的に下にあるフィールドがボトムフィールドと呼ばれる。   In the frame motion compensation prediction, motion compensation prediction is performed in a frame in which two interlaced fields are combined, and a luminance signal is predicted for each interlaced 16 pixel × 16 line block. In an interlaced signal, of two fields constituting one frame, a spatially upper field is called a top field, and a spatially lower field is called a bottom field.

図4aは1フレーム離れた参照フレームから前方向の動き補償予測を行う例を示す図である。同図においては、トップフィールドの画素が円で示され、またボトムフィールドの画素が四角形で示されており、「MV」で示される動きベクトルに従って、参照フレームに対応する入力フレーム(画面並べ替えバッファ202を介して供給される画像データ)の画素位置が特定される。   FIG. 4A is a diagram illustrating an example in which forward motion compensation prediction is performed from a reference frame one frame away. In the figure, pixels in the top field are indicated by circles, and pixels in the bottom field are indicated by rectangles, and an input frame (screen rearrangement buffer) corresponding to the reference frame according to the motion vector indicated by “MV”. The pixel position of the image data supplied via 202 is specified.

フレーム動き補償予測は比較的ゆっくりした動きで、フレーム内での相関が高いまま等速度で動いている場合に有効な予測方式である。   Frame motion compensated prediction is a relatively slow motion and is an effective prediction method when moving at a constant speed while maintaining a high correlation within the frame.

一方、フィールド動き補償予測とは、フィールドごとに動き補償を行うもので、図4bに示されるように、トップフィールドに動きベクトル「MV1」、ボトムフィールドには動きベクトル「MV2」がそれぞれ設定され、「MV1」、または「MV2」のそれぞれの動きベクトルに従って、参照フレームに対応する入力フレーム(画面並べ替えバッファ202を介して供給される画像データ)の画素位置が特定される。   On the other hand, the field motion compensation prediction performs motion compensation for each field. As shown in FIG. 4b, the motion vector “MV1” is set in the top field, and the motion vector “MV2” is set in the bottom field. According to each motion vector of “MV1” or “MV2”, the pixel position of the input frame (image data supplied via the screen rearrangement buffer 202) corresponding to the reference frame is specified.

また、入力フレーム中の画素に対応する参照フレーム中のフィールドはトップフィールドでもボトムフィールドでもよく、MPEG2のデータのマクロブロックデータ中のmotion vertical field selectフラグにより参照フレーム中のフィールドが設定される。図4bの例では、入力フレーム中のトップフィールドの画素、ボトムフィールドの画素のいずれに対しても参照フレーム中のトップフィールドが参照されている。なお、同図においてもトップフィールドの画素が円で示され、またボトムフィールドの画素が四角形で示されており、フィールド動き補償予測では、マクロブロック内の各フィールド別に予測されるため、16画素x8ラインのフィールドブロック単位で予測されることになる。   The field in the reference frame corresponding to the pixel in the input frame may be a top field or a bottom field, and the field in the reference frame is set by a motion vertical field select flag in the macroblock data of the MPEG2 data. In the example of FIG. 4b, the top field in the reference frame is referred to for both the top field pixel and the bottom field pixel in the input frame. In the figure, pixels in the top field are indicated by circles, and pixels in the bottom field are indicated by rectangles. In the field motion compensation prediction, prediction is performed for each field in the macroblock. The prediction is performed in units of field blocks of the line.

例えば、PピクチャやBピクチャの前方向や後方向予測では1つのマクロブロックにつき、動きベクトルが2個必要になる。またBピクチャの両方向予測では、1つのマクロブロックにつき、4個の動きベクトルが必要になる。このため、フィールド動き補償予測では、フィールド別に予測して、局所的な動きや加速度的な動きに対して予測効率を高めることが可能である反面、動きベクトル数はフレーム動き補償と比べて2倍必要となる。   For example, in the forward and backward prediction of a P picture and a B picture, two motion vectors are required for one macroblock. In the bi-directional prediction of a B picture, four motion vectors are required for one macroblock. For this reason, in field motion compensated prediction, it is possible to increase the prediction efficiency for local motion and acceleration motion by predicting each field, but the number of motion vectors is twice that of frame motion compensation. Necessary.

また、MPEG2では、2種類のDCT符号化モードが用いられる。図5aと図5bは、それぞれのDCT符号化モードを説明する図である。   In MPEG2, two types of DCT encoding modes are used. 5a and 5b are diagrams for explaining the respective DCT coding modes.

フレームDCT符号化モードの場合、マクロブロックの輝度信号が4個のブロックに分解される際に、各ブロックが図5a示されるように、トップフィールドとボトムフィールドのそれぞれを含んで構成されるように分解される。上述したフレーム動き補償予測が行われるマクロブロックに対しては、通常、フレームDCT符号化モードによる符号化が行われる。   In the frame DCT coding mode, when the luminance signal of a macroblock is decomposed into four blocks, each block is configured to include a top field and a bottom field as shown in FIG. 5a. Disassembled. The macroblock subjected to the above-described frame motion compensation prediction is normally encoded in the frame DCT encoding mode.

一方、フィールドDCT符号化モードの場合、マクロブロックの輝度信号が4個のブロックに分解される際に、図5bに示されるように、各ブロックのそれぞれが、トップフィールドまたはボトムフィールドのみで構成されるように分解される。上述したフィールド動き補償予測が行われるマクロブロックに対しては、通常、フィールドDCT符号化モードによる符号化が行われる。   On the other hand, in the case of the field DCT coding mode, when the luminance signal of the macro block is decomposed into four blocks, each block is configured only by the top field or the bottom field as shown in FIG. 5b. Is disassembled. The macroblock subjected to the above-described field motion compensation prediction is normally encoded in the field DCT encoding mode.

図4を参照して上述した動き補償におけるフレーム動き補償予測と、フィールド動き補償予測とを適応的に選択し、さらに図5に示されるような、2つのDCT符号化モード、すなわちフレーム符号化とフィールド符号化とを適応的に切り替えることにより、インターレース信号に対する符号化効率が向上する。   The frame motion compensated prediction and the field motion compensated prediction in the motion compensation described above with reference to FIG. 4 are selected adaptively, and two DCT coding modes, ie, frame coding, as shown in FIG. By adaptively switching between field encoding, the encoding efficiency for interlaced signals is improved.

上述したように、H.264/AVC符号化方式では、各マクロブロックペア単位に、フレーム符号化するかフィールド符号化するかを適応的に選択できるようになされている。H.264/AVCのビットストリーム中の、シーケンスパラメタセットRBSP(Raw Byte Sequence Payloads)中に、mb_adaptive_frame_field_flag(マクロブロック適応フレーム・フィールド・フラグ)というパラメタが存在し、また、スライスヘッダの中に、field_pic_flag(フィールド・ピクチャ・フラグ)というパラメタが存在する。これらのフラグの設定によって、フレームおよびマクロブロック単位の符号化方式(フレーム符号化またはフィールド符号化)が定まる。   As described above, in the H.264 / AVC encoding method, it is possible to adaptively select frame encoding or field encoding for each macroblock pair unit. In the sequence parameter set RBSP (Raw Byte Sequence Payloads) in the H.264 / AVC bitstream, there is a parameter called mb_adaptive_frame_field_flag (macroblock adaptive frame field flag), and in the slice header, field_pic_flag There is a parameter called (field picture flag). The setting of these flags determines the encoding method (frame encoding or field encoding) in units of frames and macroblocks.

符号化すべき画像データが、インターレース(飛び越し走査)・フォーマットである場合は、ピクチャレベルまたはマクロブロックレベルでの符号化処理(個々のピクチャまたはマクロブロックペアを、フレーム符号化するか、またはフィールド符号化する処理)を適応的に行うようにすることが可能である。例えば、H.264/AVCのビットストリームのシーケンスパラメタセット中の、Mb_adaptive_frame_field_flagを「1」に設定し、スライスヘッダ中のfield_pic_flagを「0」に設定すると、ピクチャ全体としてフレーム符号化を行い、マクロブロックペアに対して、フィールド符号化またはフレーム符号化を行うことが可能である。   When the image data to be encoded is in an interlace (interlace scanning) format, encoding processing at the picture level or macroblock level (individual picture or macroblock pair is subjected to frame encoding or field encoding) Can be adaptively performed. For example, if Mb_adaptive_frame_field_flag in the sequence parameter set of the H.264 / AVC bitstream is set to “1” and field_pic_flag in the slice header is set to “0”, frame coding is performed for the entire picture, and the macroblock Field encoding or frame encoding can be performed on the pair.

本発明の画像処理装置100においては、ビデオメモリ117から供給されるベースバンド画像に含まれる所定のマクロブロックペアについて、MB適応符号化判定部119がそのマクロブロックペアを、フレーム符号化を行うべきマクロブロックペアと判定した場合、動き予測・補償部213により、上述したフレーム動き補償予測が行われ、さらに、直交変換部204乃至可逆符号化部206により、上述したフレームDCT符号化モードによる符号化が行われる。   In the image processing apparatus 100 of the present invention, for a predetermined macroblock pair included in a baseband image supplied from the video memory 117, the MB adaptive coding determination unit 119 should frame-code the macroblock pair. When it is determined as a macroblock pair, the motion prediction / compensation unit 213 performs the above-described frame motion compensation prediction, and further, the orthogonal transform unit 204 to the lossless encoding unit 206 perform encoding in the above-described frame DCT encoding mode. Is done.

また、ビデオメモリ117から供給されるベースバンド画像に含まれる所定のマクロブロックペアについて、MB適応符号化判定部119がそのマクロブロックペアを、フィールド符号化を行うべきマクロブロックペアと判定した場合、動き予測・補償部213により、上述したフィールド動き補償予測が行われ、さらに、直交変換部204乃至可逆符号化部206により、上述したフィールドDCT符号化モードによる符号化が行われる。   Further, when the MB adaptive coding determination unit 119 determines a macroblock pair to be subjected to field coding for a predetermined macroblock pair included in the baseband image supplied from the video memory 117, The motion prediction / compensation unit 213 performs the above-described field motion compensation prediction, and the orthogonal transform unit 204 to the lossless encoding unit 206 perform encoding using the above-described field DCT encoding mode.

図2に戻って、動き予測・補償部213から出力される予測画像データは、加算器203に入力され、加算器203は、画面並べ替えバッファ202を介して供給される画像データの画素値と、予測画像データの画素値との差分情報を演算する。なお、図2においては、イントラ予測部212と加算器203とが接続されるように示されているが、AVC符号化部120に入力される画像データがインター(画像間)符号化される画像データである場合、動き予測・補償部213と加算器203とが接続されるものとする。   Returning to FIG. 2, the predicted image data output from the motion prediction / compensation unit 213 is input to the adder 203, which adds the pixel values of the image data supplied via the screen rearrangement buffer 202. The difference information with the pixel value of the predicted image data is calculated. In FIG. 2, the intra prediction unit 212 and the adder 203 are illustrated as being connected, but the image data input to the AVC encoding unit 120 is an inter (inter-image) encoded image. In the case of data, the motion prediction / compensation unit 213 and the adder 203 are connected.

その後、イントラ符号化の場合と同様に、加算器203から出力されたデータが直交変換部204に入力され、量子化部205、可逆変換部206による処理を経て蓄積バッファ207に蓄積され、H.264/AVC方式で符号化された画像データとして出力される。   After that, as in the case of intra coding, the data output from the adder 203 is input to the orthogonal transform unit 204, stored in the storage buffer 207 through processing by the quantization unit 205 and the lossless transform unit 206, and H. It is output as image data encoded by the H.264 / AVC format.

また、量子化部205から出力される量子化された変換係数は、やはり逆量子化部208にも供給され、逆直交変換部209の処理を経て復号された画像データが、デブロックフィルタ210の処理を経てフレームメモリ11に蓄積される。   The quantized transform coefficient output from the quantizing unit 205 is also supplied to the inverse quantizing unit 208, and the image data decoded through the processing of the inverse orthogonal transform unit 209 is processed by the deblocking filter 210. It is stored in the frame memory 11 through processing.

なお、動き予測・補償部213は、画面並べ替えバッファ202を介して供給される画像データに基づいて生成される動きベクトルに関する情報を可逆符号化部206に供給し、可逆符号化部206により、その情報に対して可変長符号化、算術符号化などの可逆符号化処理が施され、H.264/AVC方式で符号化された画像データにおけるヘッダ情報の一部として符号化される。   Note that the motion prediction / compensation unit 213 supplies information on the motion vector generated based on the image data supplied via the screen rearrangement buffer 202 to the lossless encoding unit 206, and the lossless encoding unit 206 The information is subjected to lossless encoding processing such as variable length encoding and arithmetic encoding, and is encoded as part of header information in image data encoded by the H.264 / AVC format.

次に、MB適応符号化判定部119により行われる各マクロブロック(実際にはマクロブロックペア)を、フィールド符号化するか、またはフレーム符号化するかの判定について説明する。   Next, a description will be given of determination as to whether each macroblock (actually, a macroblock pair) performed by the MB adaptive encoding determination unit 119 is field-encoded or frame-encoded.

MB適応符号化判定部119は、ビデオメモリ117から供給される画像の中で上下に隣接した2つのマクロブロックMB(m)とMB(n)において、次の条件(A)乃至(E)の5つの条件に適合するか否かを判定する。なお、この判定においては、バッファ118から供給される情報であって、ビデオメモリ117から供給される画像に対応するMPEG2デコード情報、並びにComplexityおよび発生ビットRに基づいて行われる。   The MB adaptive encoding determination unit 119 performs the following conditions (A) to (E) in two macroblocks MB (m) and MB (n) that are vertically adjacent in the image supplied from the video memory 117. It is determined whether or not the five conditions are met. This determination is performed based on information supplied from the buffer 118, MPEG2 decoding information corresponding to an image supplied from the video memory 117, Complexity, and generated bit R.

(A)マクロブロックMB(m)のComplexity、またはマクロブロックMB(n)のComplexity、若しくはマクロブロックMB(m)とMB(n)のComplexityの合計値が、予め設定された閾値以下である場合。   (A) When the complexity of the macroblock MB (m), the complexity of the macroblock MB (n), or the total value of the complexity of the macroblocks MB (m) and MB (n) is less than or equal to a preset threshold value .

(B)マクロブロックMB(m)の発生ビット、またはMB(n)の発生ビット、若しくはマクロブロックMB(m)とMB(n)のそれぞれの発生ビットの合計値が予め設定された閾値以下である場合。   (B) The generated bit of the macroblock MB (m), the generated bit of MB (n), or the total value of the generated bits of the macroblocks MB (m) and MB (n) is less than a preset threshold value. If there is.

(C)マクロブロックMB(m)の動きベクトルと、マクロブロックMB(n)の動きベクトルの差分の絶対値が予め設定された閾値以下である場合。   (C) The absolute value of the difference between the motion vector of the macroblock MB (m) and the motion vector of the macroblock MB (n) is less than or equal to a preset threshold value.

(D)マクロブロックMB(m)のDCTType、マクロブロックMB(n)のDCTType、若しくはマクロブロックMB(m)とMB(n)の両方のDCTTypeがフレームDCTである場合。   (D) When DCTType of macroblock MB (m), DCTType of macroblock MB (n), or DCTType of both macroblocks MB (m) and MB (n) is a frame DCT.

(E)マクロブロックMB(m)の動き補償予測モード、またはマクロブロックMB(n)の動き補償予測モード、若しくはマクロブロックMB(m)とMB(n)の両方の動き補償予測モードがフレーム予測モードである場合。   (E) The motion compensation prediction mode of the macroblock MB (m), the motion compensation prediction mode of the macroblock MB (n), or the motion compensation prediction modes of both the macroblocks MB (m) and MB (n) If in mode.

上述した条件(A)乃至(E)のいずれかに適合する場合、MPEG2で符号化された状態でのマクロブロック単位の予測効率が高かったものといえ、そのマクロブロックに対応する画像領域の動きが緩やかであるか、またはその画像領域のフレーム内の相関が高いと考えられる。そこで、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアについては、フレーム符号化を行うべきものと判定する。   When any of the above conditions (A) to (E) is satisfied, it can be said that the prediction efficiency in units of macroblocks in the MPEG2 encoded state is high, and the motion of the image area corresponding to the macroblocks Is moderate or the correlation within the frame of the image region is considered high. Therefore, the MB adaptive coding determination unit 119 determines that frame coding should be performed for a macroblock pair composed of the macroblocks MB (m) and MB (n).

あるいはまた、MB適応符号化判定部119は、ビデオメモリ117から供給される画像の上下隣接した2つのマクロブロックMB(m)とMB(n)において、次の条件(F)乃至(J)の5つの条件に適合するか否かを判定するようにしてもよい。   Alternatively, the MB adaptive coding determination unit 119 performs the following conditions (F) to (J) in two macroblocks MB (m) and MB (n) adjacent to each other in the upper and lower sides of the image supplied from the video memory 117. It may be determined whether or not the five conditions are met.

(F)マクロブロックMB(m)のComplexity、またはマクロブロックMB(n)のComplexity、若しくはMB(m)とMB(n)のComplexityの合計値が、予め設定された閾値以上である場合。   (F) When the Complexity of the macroblock MB (m), the Complexity of the macroblock MB (n), or the total value of the Complexity of MB (m) and MB (n) is greater than or equal to a preset threshold value.

(G)マクロブロックMB(m)の発生ビット、またはマクロブロックMB(n)の発生ビット、若しくはマクロブロックMB(m)とMB(n)のそれぞれの発生ビットの合計値が予め設定された閾値以上である場合。   (G) A threshold value in which the generated bits of the macro block MB (m), the generated bits of the macro block MB (n), or the total value of the generated bits of the macro blocks MB (m) and MB (n) are set in advance. If it is above.

(H)マクロブロックMB(m)の動きベクトルと、マクロブロックMB(n)の動きベクトルの差分の絶対値が予め設定された閾値以上である場合。   (H) The absolute value of the difference between the motion vector of the macroblock MB (m) and the motion vector of the macroblock MB (n) is greater than or equal to a preset threshold value.

(I)マクロブロックMB(m)のDCTType、またはMB(n)のDCTType、若しくはマクロブロックMB(m)とMB(n)の両方のDCTTypeがフィールドDCTである場合。   (I) DCTType of macroblock MB (m), DCTType of MB (n), or DCTType of both macroblocks MB (m) and MB (n) is a field DCT.

(J)マクロブロックMB(m)の動き補償予測モード、またはマクロブロックMB(n)の動き補償予測モード、若しくはマクロブロックMB(m)とMB(n)の両方の動き補償予測モードがフィールド予測モードである場合。   (J) Field prediction is based on the motion compensation prediction mode of the macroblock MB (m), the motion compensation prediction mode of the macroblock MB (n), or the motion compensation prediction mode of both the macroblocks MB (m) and MB (n). If in mode.

上述した条件(F)乃至(J)のいずれかに適合する場合、MPEG2で符号化された状態でのマクロブロックは予測効率が低かったものといえ、そのマクロブロックに対応する画像領域の動きが激しいか、またはその画像領域のフレーム内の相関が低いものと考えられる。そこで、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアについては、フィールド符号化を行うべきものと判定する。   When any of the above conditions (F) to (J) is satisfied, it can be said that the macroblock in the MPEG2 encoded state has a low prediction efficiency, and the motion of the image region corresponding to the macroblock is small. It is considered intense or the correlation within the frame of the image area is low. Therefore, the MB adaptive coding determination unit 119 determines that field coding should be performed for a macroblock pair configured by the macroblocks MB (m) and MB (n).

次に、図6のフローチャートを参照して画像処理装置100によるトランスコード処理の例について説明する。   Next, an example of transcoding processing by the image processing apparatus 100 will be described with reference to the flowchart of FIG.

ステップS101において、MPEG2復号部115は、MPEG2方式で符号化された画像データを1フレーム分復号する。このとき上述したように、ベースバンドの画像データが、ビデオメモリ117に出力され、MPEG2デコード情報が、バッファ118に出力され、MPEG2の画像データにおける各マクロブロックの量子化スケールQuant、および各マクロブロックにおける発生ビットRがMBComplexity算出部116に出力される。   In step S101, the MPEG2 decoding unit 115 decodes image data encoded by the MPEG2 method for one frame. At this time, as described above, the baseband image data is output to the video memory 117, the MPEG2 decoding information is output to the buffer 118, the quantization scale Quant of each macroblock in the MPEG2 image data, and each macroblock The generated bit R is output to the MBComplexity calculation unit 116.

ステップS102において、MBComplexity算出部116は、マクロブロックの複雑さを表す値であるComplexityを上述した式(1)により算出する。   In step S102, the MBComplexity calculation unit 116 calculates Complexity, which is a value representing the complexity of the macroblock, using the above-described equation (1).

ステップS103において、MB適応符号化判定部119は、バッファ118からMPEG2デコード情報を取得する。このとき、ステップS102で算出されたComplexityと、発生ビットRも取得される。   In step S <b> 103, the MB adaptive encoding determination unit 119 acquires MPEG2 decode information from the buffer 118. At this time, the Complexity calculated in step S102 and the generated bit R are also acquired.

ステップS104において、AVC符号化部120は、ビデオメモリ117から、例えば、1フレーム分のベースバンド画像のデータ(または信号)を取得する。   In step S104, the AVC encoding unit 120 obtains, for example, baseband image data (or signal) for one frame from the video memory 117.

ステップS105において、MB適応符号化判定部119は、ステップS104の処理で取得された画像データの中から1組のマクロブロックペアを抽出する。   In step S105, the MB adaptive coding determination unit 119 extracts one set of macroblock pairs from the image data acquired in the process of step S104.

ステップS106において、MB適応符号化判定部119は、ステップS105の処理で抽出されたマクロブロックペアについて符号化方式判定処理を実行する。なお、ステップS106の処理は、H.264/AVC方式で符号化すべき画像データがインターレース信号の画像データである場合にのみ実行され、例えば、H.264/AVC方式で符号化すべき画像データがプログレッシブ信号の画像データである場合、ステップS106の処理はスキップされる。   In step S106, the MB adaptive coding determination unit 119 performs a coding method determination process for the macroblock pair extracted in the process of step S105. Note that the process of step S106 is executed only when the image data to be encoded in the H.264 / AVC format is image data of an interlace signal. For example, the image data to be encoded in the H.264 / AVC format is progressive. If the image data is a signal, the process of step S106 is skipped.

ここで、図7のフローチャートを参照して図6のステップS106の符号化方式判定処理の詳細について説明する。   Here, the details of the encoding method determination processing in step S106 in FIG. 6 will be described with reference to the flowchart in FIG.

ステップS131において、MB適応符号化判定部119は、ステップS105の処理で抽出されたマクロブロックペアに含まれる2つのマクロブロックMB(m)とMB(n)について、上述した条件(A)に適合するか否かを判定する。ステップS131において、条件(A)に適合すると判定された場合、処理は、ステップS136に進み、条件(A)に適合しないと判定された場合、処理は、ステップS132に進む。   In step S131, the MB adaptive coding determination unit 119 conforms to the above-described condition (A) for the two macroblocks MB (m) and MB (n) included in the macroblock pair extracted in the process of step S105. It is determined whether or not to do. If it is determined in step S131 that the condition (A) is met, the process proceeds to step S136. If it is determined that the condition (A) is not met, the process proceeds to step S132.

ステップS132において、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)について、上述した条件(B)に適合するか否かを判定する。ステップS132において、条件(B)に適合すると判定された場合、処理は、ステップS136に進み、条件(B)に適合しないと判定された場合、処理は、ステップS133に進む。   In step S132, the MB adaptive coding determination unit 119 determines whether or not the macro blocks MB (m) and MB (n) meet the above-described condition (B). If it is determined in step S132 that the condition (B) is met, the process proceeds to step S136. If it is determined that the condition (B) is not met, the process proceeds to step S133.

ステップS133において、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)について、上述した条件(C)に適合するか否かを判定する。ステップS133において、条件(C)に適合すると判定された場合、処理は、ステップS136に進み、条件(C)に適合しないと判定された場合、処理は、ステップS134に進む。   In step S133, the MB adaptive coding determination unit 119 determines whether or not the macro blocks MB (m) and MB (n) meet the above-described condition (C). If it is determined in step S133 that the condition (C) is met, the process proceeds to step S136. If it is determined that the condition (C) is not met, the process proceeds to step S134.

ステップS134において、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)について、上述した条件(D)に適合するか否かを判定する。ステップS134において、条件(D)に適合すると判定された場合、処理は、ステップS136に進み、条件(C)に適合しないと判定された場合、処理は、ステップS135に進む。   In step S134, the MB adaptive coding determination unit 119 determines whether or not the macro blocks MB (m) and MB (n) meet the above-described condition (D). If it is determined in step S134 that the condition (D) is met, the process proceeds to step S136. If it is determined that the condition (C) is not met, the process proceeds to step S135.

ステップS135において、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)について、上述した条件(E)に適合するか否かを判定する。ステップS135において、条件(E)に適合すると判定された場合、処理は、ステップS136に進み、条件(E)に適合しないと判定された場合、処理は、ステップS137に進む。すなわち、マクロブロックMB(m)とMB(n)について、条件(A)乃至(E)のいずれにも適合しないと判定された場合、ステップS137の処理が行われることになる。   In step S135, the MB adaptive coding determination unit 119 determines whether or not the macroblocks MB (m) and MB (n) meet the above-described condition (E). If it is determined in step S135 that the condition (E) is met, the process proceeds to step S136. If it is determined that the condition (E) is not met, the process proceeds to step S137. That is, when it is determined that the macro blocks MB (m) and MB (n) do not meet any of the conditions (A) to (E), the process of step S137 is performed.

ステップS136において、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアを、フレーム符号化するものと判定する。   In step S136, the MB adaptive encoding determination unit 119 determines that a macroblock pair constituted by the macroblocks MB (m) and MB (n) is to be frame-encoded.

一方、ステップS137において、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアを、フィールド符号化するものと判定する。   On the other hand, in step S137, the MB adaptive encoding determination unit 119 determines that a macroblock pair configured by the macroblocks MB (m) and MB (n) is to be field encoded.

ステップS136、またはS137の処理の後、処理は、ステップS138に進み、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアと、ステップS136またはS137の処理で判定された符号化方式とを対応づける情報を出力する。   After the process of step S136 or S137, the process proceeds to step S138, and the MB adaptive coding determination unit 119 determines whether the macroblock pair configured by the macroblocks MB (m) and MB (n) and the step S136 or Information that associates the coding method determined in the process of S137 is output.

あるいはまた、図6のステップS106の符号化方式判定処理は、図8のフローチャートに示されるように実行されるようにしてもよい。   Alternatively, the encoding method determination process in step S106 of FIG. 6 may be executed as shown in the flowchart of FIG.

同図においては、ステップS151乃至S155において、MB適応符号化判定部119は、ステップS105の処理で抽出されたマクロブロックペアに含まれる2つのマクロブロックMB(m)とMB(n)について、それぞれ条件(E)乃至(J)に適合するか否かを判定し、それぞれ条件(E)乃至(J)に適合すると判定された場合、処理は、ステップS156に進み、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアを、フィールド符号化するものと判定する。   In the same figure, in steps S151 to S155, the MB adaptive coding determination unit 119 performs each of the two macroblocks MB (m) and MB (n) included in the macroblock pair extracted in the process of step S105. It is determined whether or not the conditions (E) to (J) are met. If it is determined that the conditions (E) to (J) are met, the process proceeds to step S156, and the MB adaptive coding determination unit 119 is performed. Determines that a macroblock pair composed of macroblocks MB (m) and MB (n) is to be field-encoded.

一方、ステップS151乃至S155の処理により、マクロブロックMB(m)とMB(n)について、条件(E)乃至(J)のいずれにも適合しないと判定された場合、処理は、ステップS157に進み、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアを、フレーム符号化するものと判定する。   On the other hand, if it is determined that the macroblocks MB (m) and MB (n) do not meet any of the conditions (E) to (J) by the processes of steps S151 to S155, the process proceeds to step S157. The MB adaptive coding determination unit 119 determines that a macroblock pair constituted by the macroblocks MB (m) and MB (n) is to be frame-encoded.

ステップS156、またはS157の処理の後、処理は、ステップS158に進み、MB適応符号化判定部119は、マクロブロックMB(m)とMB(n)により構成されるマクロブロックペアと、ステップS156またはS157の処理で判定された符号化方式とを対応付ける情報を出力する。   After the process of step S156 or S157, the process proceeds to step S158, and the MB adaptive coding determination unit 119 determines whether the macroblock pair configured by the macroblocks MB (m) and MB (n) and the step S156 or Information that associates the coding method determined in the process of S157 is output.

図6に戻って、ステップS106の処理の後、処理は、ステップS107に進み、適応符号化判定部119は、1フレームの画像に含まれる全てのマクロブロックペアを抽出したか否かを判定し、まだ、全てのマクロブロックペアを抽出していないと判定された場合、処理は、ステップS105に戻り、S105乃至S107の処理が繰り返し実行される。   Returning to FIG. 6, after the process of step S <b> 106, the process proceeds to step S <b> 107, and the adaptive coding determination unit 119 determines whether or not all macroblock pairs included in one frame image have been extracted. If it is determined that not all macroblock pairs have been extracted yet, the process returns to step S105, and the processes of S105 to S107 are repeatedly executed.

ステップS107において、1フレームの画像に含まれる全てのマクロブロックペアを抽出したと判定された場合、処理は、ステップS108に進む。   If it is determined in step S107 that all macroblock pairs included in one frame image have been extracted, the process proceeds to step S108.

ステップS108において、AVC符号化部120は、当該フレームの画像データをAVC符号化方式で符号化する。このとき、ステップS106の処理による判定結果に基づいて、個々のマクロブロックペアがフレーム符号化またはフィールド符号化される。   In step S108, the AVC encoding unit 120 encodes the image data of the frame by the AVC encoding method. At this time, individual macroblock pairs are frame-encoded or field-encoded based on the determination result obtained in step S106.

ステップS109において、MPEG復号部115は、次のフレームがあるか否かを判定し、次のフレームがあると判定された場合、処理は、ステップS101に戻り、それ以降の処理が繰り返し実行される。   In step S109, the MPEG decoding unit 115 determines whether or not there is a next frame. If it is determined that there is a next frame, the process returns to step S101, and the subsequent processes are repeatedly executed. .

ステップS109において、次のフレームがあると判定された場合、処理は終了される。   If it is determined in step S109 that there is a next frame, the process ends.

ここでは、1フレーム毎に復号され再符号化される例について説明したが、復号され再符号化されるデータの単位は、それぞれ1フレームに限られるものではない。   Here, an example in which decoding and re-encoding is performed for each frame has been described, but the unit of data to be decoded and re-encoded is not limited to one frame.

このようにして、トランスコードが行われ、MPEG2で符号化された画像データがH.264/AVCで符号化された画像データに変換される。   In this way, transcoding is performed, and image data encoded with MPEG2 is H.264. It is converted into image data encoded by H.264 / AVC.

例えば、従来のH.264/AVC方式では、個々のマクロブロックペアについてフレーム符号化を行うか、またはフィールド符号化を行うかを決めるために、符号化装置に実装されたソフトウェアによりJM(Joint Model)による符号化方式の判定が行われていた。例えば、JMのLow Complexity Mode(高速モード)における判定では、それぞれの符号化方式に対応するコストを式(2)により演算する。   For example, in the conventional H.264 / AVC system, JM (Joint Model) is used by software installed in an encoding device to determine whether to perform frame encoding or field encoding for each macroblock pair. ) Was used to determine the encoding method. For example, in the determination in JM's Low Complexity Mode (high-speed mode), the cost corresponding to each encoding method is calculated by Equation (2).

Figure 2008004984
Figure 2008004984

なお、式(2)における、SA(T)Dは、原画像と予測画像の差分値の全体値誤差和、またはそれにアダマール行列を施したものである。SA(T)D0は、式(3)により算出される。   Note that SA (T) D in Equation (2) is the sum of the total value error of the difference value between the original image and the predicted image, or the Hadamard matrix. SA (T) D0 is calculated by equation (3).

Figure 2008004984
Figure 2008004984

なお、QP2Quantは、量子化パラメタQPから量子化スケールを得る変換式とされ、式(3)によりヘッダビット分(HeaderBit)がコストに考慮されることになる。   Note that QP2Quant is a conversion equation for obtaining a quantization scale from the quantization parameter QP, and the header bit (HeaderBit) is taken into account by Equation (3).

JMのマクロブロックペアの符号化方式の判定では、個々のマクロブロックペアについてフレーム符号化した場合と、フィールド符号化した場合のそれぞれのコストが上述したように演算され、コストが最小になる符号化方式が選択されることになる。   In the determination of the encoding method of the macroblock pair of JM, the cost when the frame encoding is performed for each macroblock pair and the case where the field encoding is performed is calculated as described above, and the encoding that minimizes the cost is performed. The method will be selected.

しかしながら、JMのマクロブロックペアの符号化方式の判定では、演算量(処理量)が膨大になり、例えば、トランスコードの実行あたって、JMのマクロブロックペアの符号化方式の判定を行うと多大な時間がかかる。   However, in the determination of the encoding method of the JM macroblock pair, the amount of computation (processing amount) becomes enormous. For example, when the encoding method of the JM macroblock pair is determined when transcoding is performed, Takes a long time.

これに対して、本発明の画像処理装置100によるトランスコードでは、MPEG2のデコード情報に含まれる情報に基づいて、各マクロブロックペアの符号化方式が決定される。従って、装置にかかる負荷が軽減され、トランスコードをより高速に行うことが可能となる。   On the other hand, in transcoding by the image processing apparatus 100 of the present invention, the encoding method of each macroblock pair is determined based on information included in MPEG2 decoding information. Therefore, the load on the apparatus is reduced, and transcoding can be performed at higher speed.

以上においては、画像処理装置100に入力される画像データが、MPEG2の符号化方式で符号化されたデータである場合の例について説明したが、画像処理装置100に入力される画像データが、MPEG4の符号化方式で符号化されたデータとされるようにしてもよい。この場合、MPEG符号化部115が、MPEG4のデータをデコードするようにすればよい。   In the above, the example in which the image data input to the image processing apparatus 100 is data encoded by the MPEG2 encoding method has been described. However, the image data input to the image processing apparatus 100 is MPEG4. The data may be encoded by the encoding method. In this case, the MPEG encoding unit 115 may decode the MPEG4 data.

なお、上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。上述した一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば図9に示されるような汎用のパーソナルコンピュータ700などに、ネットワークや記録媒体からインストールされる。   The series of processes described above can be executed by hardware, or can be executed by software. When the above-described series of processing is executed by software, a program constituting the software executes various functions by installing a computer incorporated in dedicated hardware or various programs. For example, a general-purpose personal computer 700 as shown in FIG. 9 is installed from a network or a recording medium.

図9において、CPU(Central Processing Unit)701は、ROM(Read Only Memory)702に記憶されているプログラム、または記憶部708からRAM(Random Access Memory)703にロードされたプログラムに従って各種の処理を実行する。RAM703にはまた、CPU701が各種の処理を実行する上において必要なデータなども適宜記憶される。   In FIG. 9, a CPU (Central Processing Unit) 701 executes various processes according to a program stored in a ROM (Read Only Memory) 702 or a program loaded from a storage unit 708 to a RAM (Random Access Memory) 703. To do. The RAM 703 also appropriately stores data necessary for the CPU 701 to execute various processes.

CPU701、ROM702、およびRAM703は、バス704を介して相互に接続されている。このバス704にはまた、入出力インタフェース705も接続されている。   The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output interface 705 is also connected to the bus 704.

入出力インタフェース705には、キーボード、マウスなどよりなる入力部706、CRT(Cathode Ray Tube)、LCD(Liquid Crystal display)などよりなるディスプレイ、並びにスピーカなどよりなる出力部707、ハードディスクなどより構成される記憶部708、モデム、LANカードなどのネットワークインタフェースカードなどより構成される通信部709が接続されている。通信部709は、インターネットを含むネットワークを介しての通信処理を行う。   The input / output interface 705 includes an input unit 706 including a keyboard and a mouse, a display including a CRT (Cathode Ray Tube) and an LCD (Liquid Crystal display), an output unit 707 including a speaker, and a hard disk. A communication unit 709 including a storage unit 708, a network interface card such as a modem and a LAN card, and the like is connected. The communication unit 709 performs communication processing via a network including the Internet.

入出力インタフェース705にはまた、必要に応じてドライブ710が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア711が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部708にインストールされる。   A drive 710 is also connected to the input / output interface 705 as necessary, and a removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately mounted, and a computer program read from them is loaded. It is installed in the storage unit 708 as necessary.

上述した一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、インターネットなどのネットワークや、リムーバブルメディア711などからなる記録媒体からインストールされる。   When the above-described series of processing is executed by software, a program constituting the software is installed from a network such as the Internet or a recording medium such as a removable medium 711.

なお、この記録媒体は、図9に示される、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フロッピディスク(登録商標)を含む)、光ディスク(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク(MD(Mini-Disk)(登録商標)を含む)、もしくは半導体メモリなどよりなるリムーバブルメディア711により構成されるものだけでなく、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM702や、記憶部708に含まれるハードディスクなどで構成されるものも含む。   The recording medium shown in FIG. 9 is a magnetic disk (including a floppy disk (registered trademark)) on which a program is recorded, which is distributed to distribute the program to the user, separately from the apparatus main body, Removable media consisting of optical disks (including CD-ROM (compact disk-read only memory), DVD (digital versatile disk)), magneto-optical disks (including MD (mini-disk) (registered trademark)), or semiconductor memory It includes not only those configured by 711 but also those configured by a ROM 702 storing a program, a hard disk included in the storage unit 708, and the like that are distributed to the user in a state of being incorporated in the apparatus main body in advance.

本明細書において上述した一連の処理を実行するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   The steps of executing the series of processes described above in this specification are performed in parallel or individually even if they are not necessarily processed in time series, as well as processes performed in time series in the order described. It also includes processing.

本発明を適用した画像処理装置の一実施形態に係る構成例を示すブロック図である。It is a block diagram which shows the structural example which concerns on one Embodiment of the image processing apparatus to which this invention is applied. 図1のAVC符号化部の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of an AVC encoding unit in FIG. 1. マクロブロックペアの例を説明する図である。It is a figure explaining the example of a macroblock pair. フレーム動き補償予測とフィールド動き補償予測を説明する図である。It is a figure explaining frame motion compensation prediction and field motion compensation prediction. フレームDCT符号化モードとフィールドDCT符号化モードを説明する図である。It is a figure explaining frame DCT encoding mode and field DCT encoding mode. トランスコード処理の例を説明するフローチャートである。It is a flowchart explaining the example of a transcode process. 符号化方式判定処理の例を説明するフローチャートである。It is a flowchart explaining the example of an encoding system determination process. 符号化方式判定処理の別の例を説明するフローチャートである。It is a flowchart explaining another example of an encoding system determination process. パーソナルコンピュータの構成例を示すブロック図である。And FIG. 16 is a block diagram illustrating a configuration example of a personal computer.

符号の説明Explanation of symbols

100 画像処理装置, 115 MPEG復号部, 116 MB Complexity算出部, 117 ビデオメモリ, 118 バッファ, 119 MB適応符号化判定部, 120 AVC符号化部, 202 画面並べ替えバッファ, 203 加算器, 204 直交変換部, 206 可逆符号化部, 207 蓄積バッファ, 212 イントラ予測部, 動き予測・補償部, 214 レート制御部   DESCRIPTION OF SYMBOLS 100 Image processing apparatus, 115 MPEG decoding part, 116 MB Complexity calculation part, 117 Video memory, 118 buffer, 119 MB adaptive encoding determination part, 120 AVC encoding part, 202 Screen rearrangement buffer, 203 Adder, 204 Orthogonal transformation , 206 lossless encoding unit, 207 accumulation buffer, 212 intra prediction unit, motion prediction / compensation unit, 214 rate control unit

Claims (15)

MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置であって、
MPEG方式で符号化された画像データを復号する復号手段と、
前記復号手段により、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報を取得するMPEGデコード情報取得手段と、
前記復号手段により、前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データを取得するベースバンド画像取得手段と、
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像取得手段により取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式を判定する判定手段と、
前記判定手段により判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データを生成する符号化手段と
を備える画像処理装置。
An image processing apparatus that converts image data encoded by the MPEG (Moving Picture Coding Experts Group) method into image data encoded by the H.264 / AVC (Advanced Video Coding) method,
Decoding means for decoding image data encoded by the MPEG method;
MPEG decoding information, which is information obtained when the decoding unit decodes the image data encoded by the MPEG method, and is information set for compressing the baseband image data by the MPEG method. MPEG decoding information acquisition means for acquiring,
Baseband image acquisition means for acquiring baseband image data obtained by decoding the MPEG-encoded image data by the decoding means;
Based on the MPEG decode information acquired by the decode information acquisition means, the baseband image acquired by the baseband image acquisition means includes two macroblocks adjacent in the vertical direction in the image Determination means for determining an encoding method when encoding with the H.264 / AVC method for each of the macroblock pairs to be performed;
An image processing apparatus comprising: encoding means for generating image data encoded by the H.264 / AVC method by encoding each of the macroblock pairs with the encoding method determined by the determining means .
前記復号手段により、前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、前記MPEG方式で符号化された画像データの各マクロブロックの発生ビット、および前記マクロブロックの量子化スケールに関する情報基づいて、前記マクロブロックのそれぞれに対応する、複雑さを表す値を算出する算出手段をさらに備える
請求項1に記載の画像処理装置。
Information obtained when the image data encoded by the MPEG system is decoded by the decoding means, the generated bits of each macroblock of the image data encoded by the MPEG system, and the macroblock The image processing apparatus according to claim 1, further comprising: a calculation unit that calculates a value representing complexity corresponding to each of the macroblocks based on information on a quantization scale.
前記算出手段の算出結果に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する前記複雑さを表す値が閾値以下であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とする
請求項2に記載の画像処理装置。
A value representing the complexity corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the calculation result of the calculation means. Is determined to be less than or equal to the threshold,
The image processing apparatus according to claim 2, wherein the determination unit uses frame encoding as an encoding method of the macroblock pair.
前記算出手段の算出結果に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する前記複雑さを表す値が閾値以上であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とする
請求項2に記載の画像処理装置。
A value representing the complexity corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the calculation result of the calculation means. Is determined to be greater than or equal to the threshold,
The image processing apparatus according to claim 2, wherein the determination unit uses field encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する発生ビットの合計値が閾値以下であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とする
請求項1に記載の画像処理装置。
Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the total value of generated bits is less than or equal to the threshold,
The image processing apparatus according to claim 1, wherein the determination unit uses frame encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する発生ビットの合計値が閾値以上であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とする
請求項1に記載の画像処理装置。
Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means If it is determined that the total value of the generated bits is greater than or equal to the threshold,
The image processing apparatus according to claim 1, wherein the determination unit uses field encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、それぞれのマクロブロックに対応する動きベクトルの差分値の絶対値が閾値以下であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とする
請求項1に記載の画像処理装置。
Based on the MPEG decode information acquired by the decode information acquisition means, in two macroblocks included in the macroblock pair of the baseband image, the absolute value of the difference value of the motion vector corresponding to each macroblock is If it is determined that it is below the threshold,
The image processing apparatus according to claim 1, wherein the determination unit uses frame encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、それぞれのマクロブロックに対応する動きベクトルの差分値の絶対値が閾値以上であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とする
請求項1に記載の画像処理装置。
Based on the MPEG decode information acquired by the decode information acquisition means, in two macroblocks included in the macroblock pair of the baseband image, the absolute value of the difference value of the motion vector corresponding to each macroblock is If it is determined that it is greater than or equal to the threshold,
The image processing apparatus according to claim 1, wherein the determination unit uses field encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応するDCTTypeがフレームDCTであると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とする
請求項1に記載の画像処理装置。
Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means If it is determined that the DCTType to be performed is a frame DCT,
The image processing apparatus according to claim 1, wherein the determination unit uses frame encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応するDCTTypeがフィールドDCTであると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とする
請求項1に記載の画像処理装置。
Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the DCTType to be performed is a field DCT,
The image processing apparatus according to claim 1, wherein the determination unit uses field encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する動き補償予測モードがフレーム動き補償であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フレーム符号化とする
請求項1に記載の画像処理装置。
Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the motion compensation prediction mode to be frame motion compensation is
The image processing apparatus according to claim 1, wherein the determination unit uses frame encoding as an encoding method of the macroblock pair.
前記デコード情報取得手段により取得された前記MPEGデコード情報に基づいて、前記ベースバンド画像のマクロブロックペアに含まれる2つのマクロブロックにおいて、前記2つのマクロブロックのうちの、少なくとも1つのマクロブロックに対応する動き補償予測モードがフィールド動き補償であると判定された場合、
前記判定手段は、前記マクロブロックペアの符号化方式を、フィールド符号化とする
請求項1に記載の画像処理装置。
Corresponding to at least one of the two macroblocks in two macroblocks included in the macroblock pair of the baseband image based on the MPEG decode information acquired by the decode information acquisition means When it is determined that the motion compensated prediction mode is field motion compensation,
The image processing apparatus according to claim 1, wherein the determination unit uses field encoding as an encoding method of the macroblock pair.
MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置の画像処理方法であって、
MPEG方式で符号化された画像データを復号し、
前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報を取得し、
前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データを取得し、
前記取得された前記MPEGデコード情報に基づいて、前記取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式を判定し、
前記判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データを生成するステップ
を含む画像処理方法。
An image processing method of an image processing apparatus for converting image data encoded by MPEG (Moving Picture Coding Experts Group) method into image data encoded by H.264 / AVC (Advanced Video Coding) method,
Decodes image data encoded in MPEG format,
MPEG decoding information that is information obtained when the image data encoded by the MPEG method is decoded and set to compress the baseband image data by the MPEG method,
Obtaining baseband image data obtained by decoding image data encoded by the MPEG method,
Based on the acquired MPEG decoding information, for each of the macroblock pairs that are included in the acquired baseband image and are composed of two macroblocks that are adjacent vertically in the image, H. Determine the encoding method when encoding in H.264 / AVC format,
An image processing method comprising: generating image data encoded by the H.264 / AVC format by encoding each of the macroblock pairs with the determined encoding format.
MPEG(Moving Picture Coding Experts Group)方式で符号化された画像データを、H.264/AVC(Advanced Video Coding)方式で符号化された画像データに変換する画像処理装置に画像処理を実行させるプログラムであって、
MPEG方式で符号化された画像データの復号を制御し、
前記MPEG方式で符号化された画像データが復号されるとき得られる情報であって、ベースバンドの画像データをMPEG方式で圧縮するために設定された情報であるMPEGデコード情報の取得を制御し、
前記MPEG方式で符号化された画像データが復号されて得られるベースバンドの画像データの取得を制御し、
前記取得された前記MPEGデコード情報に基づいて、前記取得されたベースバンドの画像に含まれる、前記画像の中で上下に隣接する2つマクロブロックにより構成されるマクロブロックペアのそれぞれについて、H.264/AVC方式で符号化する場合の符号化方式の判定を制御し、
前記判定された符号化方式で、前記マクロブロックペアのそれぞれについて符号化することで、H.264/AVC方式で符号化された画像データの生成を制御するステップ
を含むコンピュータが読み取り可能なプログラム。
A program that causes an image processing device to perform image processing by converting image data encoded by the MPEG (Moving Picture Coding Experts Group) method into image data encoded by the H.264 / AVC (Advanced Video Coding) method. There,
Controls decoding of image data encoded in MPEG format,
Control the acquisition of MPEG decoding information, which is information obtained when the image data encoded by the MPEG method is decoded, and is set to compress the baseband image data by the MPEG method,
Control acquisition of baseband image data obtained by decoding image data encoded by the MPEG method,
Based on the acquired MPEG decoding information, for each of the macroblock pairs that are included in the acquired baseband image and are composed of two macroblocks that are adjacent vertically in the image, H. Controls the determination of the encoding method when encoding with H.264 / AVC format,
A computer-readable program including a step of controlling generation of image data encoded in the H.264 / AVC format by encoding each of the macroblock pairs in the determined encoding format.
請求項14に記載のプログラムが記録されている記録媒体。   A recording medium on which the program according to claim 14 is recorded.
JP2006169648A 2006-06-20 2006-06-20 Image processor and method, program, and recording medium Withdrawn JP2008004984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006169648A JP2008004984A (en) 2006-06-20 2006-06-20 Image processor and method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006169648A JP2008004984A (en) 2006-06-20 2006-06-20 Image processor and method, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2008004984A true JP2008004984A (en) 2008-01-10

Family

ID=39009056

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006169648A Withdrawn JP2008004984A (en) 2006-06-20 2006-06-20 Image processor and method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2008004984A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010026839A1 (en) 2008-09-04 2010-03-11 独立行政法人科学技術振興機構 Video signal converting system
JP2014036281A (en) * 2012-08-08 2014-02-24 Hitachi Kokusai Electric Inc Low delay image coding apparatus and predictive image control method thereof
JP2014036296A (en) * 2012-08-08 2014-02-24 Mega Chips Corp Data storage control device, data reading control device and data storage method
US9053549B2 (en) 2010-06-09 2015-06-09 Sony Corporation Image decoding apparatus, image encoding apparatus, and method and program for image decoding and encoding
JP2015195430A (en) * 2014-03-31 2015-11-05 株式会社メガチップス Data storage control device and data storage control method
US10225569B2 (en) 2014-03-31 2019-03-05 Megachips Corporation Data storage control apparatus and data storage control method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010026839A1 (en) 2008-09-04 2010-03-11 独立行政法人科学技術振興機構 Video signal converting system
US9053549B2 (en) 2010-06-09 2015-06-09 Sony Corporation Image decoding apparatus, image encoding apparatus, and method and program for image decoding and encoding
CN105049859A (en) * 2010-06-09 2015-11-11 索尼公司 Image decoder apparatus and image decoding method
US9596476B2 (en) 2010-06-09 2017-03-14 Sony Corporation Image decoding apparatus, image encoding apparatus, and method and program for image decoding and encoding
US9979982B2 (en) 2010-06-09 2018-05-22 Sony Corporation Image decoding apparatus, image encoding apparatus, and method and program for image decoding and encoding
CN105049859B (en) * 2010-06-09 2019-01-08 索尼公司 Picture decoding apparatus and picture decoding method
US10499083B2 (en) 2010-06-09 2019-12-03 Sony Corporation Image decoding apparatus, image encoding apparatus, and method and program for image decoding and encoding
JP2014036281A (en) * 2012-08-08 2014-02-24 Hitachi Kokusai Electric Inc Low delay image coding apparatus and predictive image control method thereof
JP2014036296A (en) * 2012-08-08 2014-02-24 Mega Chips Corp Data storage control device, data reading control device and data storage method
JP2015195430A (en) * 2014-03-31 2015-11-05 株式会社メガチップス Data storage control device and data storage control method
US10225569B2 (en) 2014-03-31 2019-03-05 Megachips Corporation Data storage control apparatus and data storage control method

Similar Documents

Publication Publication Date Title
KR101246294B1 (en) Method of and apparatus for video intraprediction encoding/decoding
JP4617644B2 (en) Encoding apparatus and method
JP3369573B2 (en) Image prediction decoding method and apparatus
US20150010244A1 (en) Method for encoding/decoding high-resolution image and device for performing same
WO2010137323A1 (en) Video encoder, video decoder, video encoding method, and video decoding method
US20130089265A1 (en) Method for encoding/decoding high-resolution image and device for performing same
JP2015130684A (en) Video decoder
JP2005184042A (en) Image decoding apparatus, image decoding method, and image decoding program
JP2004140473A (en) Image information coding apparatus, decoding apparatus and method for coding image information, method for decoding
JP2009290463A (en) Encoding/decoding device, encoding/decoding method, and program
JP4254147B2 (en) Image information encoding method and apparatus, program, and recording medium
JP2008004984A (en) Image processor and method, program, and recording medium
JP2008219205A (en) Picture information encoder and picture information encoding method
JP5375938B2 (en) Decoding apparatus and method
JP2024024080A (en) Image encoder, image encoding method, image decoder, and image decoding method
JP4775132B2 (en) Image processing apparatus and method, program, and recording medium
KR20040079084A (en) Method for adaptively encoding motion image based on the temperal complexity and apparatus thereof
JP4924708B2 (en) Decoding apparatus and method
JP2006295503A (en) Reencoding apparatus and method, and program for reencoding
JP5375935B2 (en) Encoding apparatus and method
US8340191B2 (en) Transcoder from first MPEG stream to second MPEG stream
JP4983908B2 (en) Decoding apparatus and method
KR20110067648A (en) Method for encoding/decoding image and apparatus for performing the same
JP2006262075A (en) Image encoder, method for encoding image and program for encoding image
JP2003087797A (en) Apparatus and method for picture information conversion, picture information conversion program, and recording medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090901