JP5341786B2 - Image coding apparatus and image conversion apparatus - Google Patents

Image coding apparatus and image conversion apparatus Download PDF

Info

Publication number
JP5341786B2
JP5341786B2 JP2010010133A JP2010010133A JP5341786B2 JP 5341786 B2 JP5341786 B2 JP 5341786B2 JP 2010010133 A JP2010010133 A JP 2010010133A JP 2010010133 A JP2010010133 A JP 2010010133A JP 5341786 B2 JP5341786 B2 JP 5341786B2
Authority
JP
Japan
Prior art keywords
block
encoding
encoded
mode
macroblock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010010133A
Other languages
Japanese (ja)
Other versions
JP2011151546A (en
Inventor
誠 斉藤
雄基 原口
和宏 齋藤
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.)
MegaChips Corp
Original Assignee
MegaChips 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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP2010010133A priority Critical patent/JP5341786B2/en
Publication of JP2011151546A publication Critical patent/JP2011151546A/en
Application granted granted Critical
Publication of JP5341786B2 publication Critical patent/JP5341786B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology capable of preventing image quality from deteriorating when encoding non-compressed image data. <P>SOLUTION: This image encoding device 1 divides input non-compressed image data into a plurality of macro blocks (MB). A peripheral block specifying part 111 specifies an encoding object MB and specifies peripheral MBs from among the encoded macro blocks. When the encoding object MBs constitute a macro block pair, a macro block which does not constitute the macro block pair with the encoding object MB belonging thereto is specified as the peripheral MB. When a peripheral MB constitutes the macro block pair, an encoding object MB and the peripheral MB are coincident in a field classification. If the number of intra-encoded peripheral MBs is smaller than a threshold, an abbreviation mode permitting part 112 permits the application of a skip mode or a direct mode for the encoding object MBs. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、MPEGあるいはH.264などの規格に基づいて画像データを符号化する技術に関する。   The present invention relates to MPEG or H.264. The present invention relates to a technique for encoding image data based on a standard such as H.264.

デジタル放送で配信される画像や、DVD(Digital Versatile Disk)、ハードディスク装置などに格納される画像などは、各種の符号化方式に従って圧縮される。画像の圧縮は、伝送帯域の圧迫の抑制、あるいは、伝送速度の向上、記憶サイズの縮小などを目的として行われる。   An image distributed by digital broadcasting, an image stored in a DVD (Digital Versatile Disk), a hard disk device, or the like is compressed according to various encoding methods. Image compression is performed for the purpose of suppressing transmission band compression, improving transmission speed, and reducing storage size.

従来から採用されてきた符号化方式にMPEG2がある。MPEG2は、記録媒体への記録だけでなく、通信メディア、放送メディアでも利用できる符号化方式である。具体的には、デジタル放送やテレビ会議、テレビ電話システムなどに、MPEG2が広く利用されている。   MPEG2 is an encoding method that has been conventionally employed. MPEG2 is an encoding method that can be used not only for recording on a recording medium but also for communication media and broadcast media. Specifically, MPEG2 is widely used for digital broadcasting, video conferencing, videophone systems, and the like.

符号化方式には、MPEG2と別の規格として、H.264がある。H.264は、MPEG2と比較して約2倍から4倍の圧縮率の向上が図られている。符号化方式には異なる複数の方式が存在するため、符号化された画像データの符号量の削減などを目的として、符号化方式の変換が行われる場合がある。   As an encoding method, a standard different from MPEG2 is H.264. H.264. H. H.264 is improved in compression rate by about 2 to 4 times compared with MPEG2. Since there are a plurality of different encoding methods, the encoding method may be converted for the purpose of reducing the amount of encoded image data.

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

H.264あるいはMPEG2では、非圧縮画像データの複数のマクロブロックごとに、マクロブロック種別が決定される。各マクロブロックは、決定されたマクロブロック種別に基づいて符号化される。マクロブロック種別には、ダイレクトモード(H.264のみ)及びスキップモードと呼ばれる特殊なモードがある。   H. In H.264 or MPEG2, a macroblock type is determined for each of a plurality of macroblocks of uncompressed image data. Each macroblock is encoded based on the determined macroblock type. Macro block types include special modes called direct mode (H.264 only) and skip mode.

スキップモードでは、マクロブロックの動き情報や画素情報などが符号化されない。ダイレクトモードでは、マクロブロックの動き情報が符号化されない。スキップモードまたはダイレクトモードを用いることにより、画像データの圧縮率を向上することができる。   In the skip mode, motion information and pixel information of the macroblock are not encoded. In the direct mode, macroblock motion information is not encoded. By using the skip mode or the direct mode, the compression rate of the image data can be improved.

上記特許文献1に開示されている符号化方法では、マクロブロックにスキップモードを適用するか否かを判断するための基準が開示されている。上記特許文献1に係る符号化方法では、量子化されたマクロブロックの係数ブロックが所定のしきい値よりも小さい場合に、量子化されたマクロブロックに対してスキップモードが適用される。   The encoding method disclosed in Patent Document 1 discloses a criterion for determining whether to apply a skip mode to a macroblock. In the encoding method according to Patent Document 1, when the coefficient block of the quantized macroblock is smaller than a predetermined threshold, the skip mode is applied to the quantized macroblock.

H.264画像データの再生時において、スキップモードが適用されたマクロブロック(スキップマクロブロック)の動きベクトルの予測が行われる。スキップマクロブロックの周囲の全てのマクロブロックがイントラ符号化されている場合、スキップマクロブロックの動きベクトルの大きさは0となる。スキップマクロブロックの表示には、スキップマクロブロックの位置に対応する参照画像の画素情報が用いられる。   H. When reproducing H.264 image data, a motion vector of a macro block to which a skip mode is applied (a skip macro block) is predicted. When all the macroblocks around the skip macroblock are intra-coded, the size of the motion vector of the skip macroblock is zero. For displaying the skip macroblock, pixel information of the reference image corresponding to the position of the skip macroblock is used.

スキップマクロブロックの動きベクトルが0になることにより、主観画質の劣化が生じることがある。動きが大きいシーンでは、参照画像と符号化対象画像との差分が大きくなるため、マクロブロックはイントラ符号化されやすい。動きの大きいシーンにおいて、イントラ符号化された複数のマクロブロックの中に、スキップマクロブロックが存在するケースを考える。このケースでは、スキップマクロブロックには動きがなく、スキップマクロブロックの周囲では動きが生じるために、視聴者は、再生された画像データの動きに違和感を覚える。このように、非圧縮画像データの符号化にスキップモードを用いることにより、再生画像の主観画質が劣化するという問題がある。   When the motion vector of the skip macroblock becomes 0, the subjective image quality may be deteriorated. In a scene with a large motion, the difference between the reference image and the encoding target image is large, so that the macroblock is easily intra-coded. Consider a case where a skip macroblock exists among a plurality of intracoded macroblocks in a scene with large motion. In this case, there is no motion in the skip macroblock and motion occurs around the skip macroblock, so that the viewer feels uncomfortable with the motion of the reproduced image data. Thus, there is a problem that the subjective image quality of the reproduced image is deteriorated by using the skip mode for encoding the non-compressed image data.

そこで、本発明は前記問題点に鑑み、非圧縮画像データを符号化するときに画質の低下を防ぐことができる技術を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a technique capable of preventing deterioration in image quality when encoding uncompressed image data.

上記課題を解決するため、請求項1記載の発明は、画像符号化装置であって、非圧縮画像データを複数のブロックに分割し、各ブロックに対して適用するブロック種別を決定するブロック種別決定部と、決定されたブロック種別に基づいて各ブロックを符号化する符号化部と、を備え、前記ブロック種別決定部は、符号化対象ブロックと、前記符号化部により既に符号化され前記符号化対象ブロックの周辺に位置する周辺ブロックとを前記複数のブロックから特定するブロック特定部と、前記符号化対象ブロックの一部の情報の符号化が省略された省略モードを前記符号化対象ブロックのブロック種別として適用するか否かを、前記周辺ブロックの符号化に関するブロック情報に基づいて判定する省略モード許可部と、を備え、前記省略モード許可部は、イントラ符号化された前記周辺ブロックの数が所定数より小さければ、前記符号化対象ブロックのブロック種別として前記省略モードの適用を許可することを特徴とする。 In order to solve the above-mentioned problem, the invention according to claim 1 is an image encoding device, wherein uncompressed image data is divided into a plurality of blocks, and a block type determination for determining a block type to be applied to each block is determined. And an encoding unit that encodes each block based on the determined block type, wherein the block type determination unit is already encoded by the encoding target block and the encoding unit, and the encoding is performed. A block specifying unit that specifies peripheral blocks located around the target block from the plurality of blocks, and an abbreviated mode in which encoding of a part of the information of the encoding target block is omitted. whether it applied as a type, and a skip mode permission unit determines on the basis of the block information related to the coding of the neighboring blocks, the omission mode Authorization unit, the number of intra-coded the neighboring blocks is less than a predetermined number, and permits the application of the optional mode as the block type of the coding target block.

請求項記載の発明は、請求項1に記載の画像符号化装置において、前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレース走査に対応させて符号化し、前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフレーム符号化されるブロックペアを構成するブロックを前記周辺ブロックとして特定することを特徴とする。 According to a second aspect of the invention, in the image encoding apparatus according to claim 1, wherein the encoding unit is a block pair units constituted by two blocks adjacent to each other in the vertical direction, interlaced uncompressed image data When the reference pair, which is a block pair including the encoding target block, is field-encoded, the block specifying unit determines a block pair that is different from the reference pair and is frame-encoded. A block to be configured is specified as the peripheral block.

請求項記載の発明は、請求項1に記載の画像符号化装置において、前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレースに対応させて符号化し、前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフィールド符号化される第1ブロックペアを選択し、前記第1ブロックペアを構成する二つのブロックのうち前記符号化対象ブロックとフィールド種別が一致するブロックを前記周辺ブロックとして特定することを特徴とする。 According to a third aspect of the invention, in the image encoding apparatus according to claim 1, wherein the encoding unit is a block pair units constituted by two blocks adjacent to each other in the vertical direction, interlaced uncompressed image data When the reference pair that is the block pair including the coding target block is field-encoded, the block specifying unit is different from the reference pair and is first-field-encoded field-encoded. And the block having the same field type as the encoding target block is specified as the peripheral block among the two blocks constituting the first block pair.

請求項記載の発明は、請求項1ないし請求項のいずれか記載の画像符号化装置において、前記省略モードは、前記符号化対象ブロックの動き情報及び画素情報の符号化が省略されたスキップモード、を含むことを特徴とする。 According to a fourth aspect of the present invention, in the image encoding device according to any one of the first to third aspects, the skip mode is a skip in which encoding of motion information and pixel information of the encoding target block is omitted. Mode.

請求項記載の発明は、請求項1ないし請求項のいずれかに記載の画像符号化装置において、前記省略モードは、前記符号化対象ブロックの動き情報の符号化が省略されたダイレクトモード、を含むことを特徴とする。 According to a fifth aspect of the present invention, in the image encoding device according to any one of the first to third aspects, the omission mode is a direct mode in which encoding of motion information of the encoding target block is omitted. It is characterized by including.

請求項記載の発明は、請求項1ないし請求項のいずれかに記載の画像符号化装置において、前記符号化対象ブロックは、複数のサブブロックにより構成され、前記省略モードは、各サブブロックの動き情報の符号化が省略されたモード、を含むことを特徴とする。 According to a sixth aspect of the present invention, in the image coding device according to any one of the first to fifth aspects, the encoding target block is composed of a plurality of sub-blocks, and the abbreviated mode includes each sub-block. A mode in which encoding of motion information is omitted.

請求項記載の発明は、画像変換装置であって、第1符号化画像データを復号化して非圧縮画像データを生成する画像復号化装置と、非圧縮画像データを符号化して第2符号化画像データを生成する画像符号化装置と、前記第1符号化画像データを構成する複数の第1符号化ブロックの符号化に関するブロック情報を取得するブロック情報取得装置と、を備え、前記画像符号化装置は、前記非圧縮画像データを複数のブロックに分割し、各ブロックに対して適用するブロック種別を決定する種別決定部と、決定されたブロック種別に基づいて各ブロックを符号化する符号化部と、を備え、前記符号化部は、符号化対象ブロックと、前記符号化対象ブロックの周辺に位置する周辺ブロックとを前記複数のブロックから特定し、前記周辺ブロックに対応する位置対応ブロックを前記複数の第1符号化ブロックから特定するブロック特定部と、前記符号化対象ブロックの一部の情報の符号化が省略された省略モードを、前記符号化対象ブロックのブロック種別として許可するか否かを、前記位置対応ブロックのブロック情報に基づいて判定する省略モード許可部と、を含み、前記省略モード許可部は、前記位置対応ブロックに含まれ、かつイントラ符号化された第1符号化ブロックの数が所定数より小さければ、前記符号化対象ブロックのブロック種別として前記省略モードを許可することを特徴とする。 The invention according to claim 7 is an image conversion apparatus, an image decoding apparatus for decoding the first encoded image data to generate uncompressed image data, and a second encoding by encoding the uncompressed image data. An image encoding device that generates image data; and a block information acquisition device that acquires block information related to encoding of a plurality of first encoded blocks constituting the first encoded image data, the image encoding An apparatus divides the uncompressed image data into a plurality of blocks, determines a block type to be applied to each block, and encodes each block based on the determined block type And the encoding unit identifies, from the plurality of blocks, an encoding target block and a peripheral block located around the encoding target block, and the peripheral block A block specifying unit that specifies a corresponding position-corresponding block from the plurality of first encoding blocks, and an abbreviated mode in which encoding of a part of the information of the encoding target block is omitted, the block of the encoding target block whether to permit the type, look including a Truncating mode permission unit determines on the basis of the block information of the position corresponding block, the optional mode permission unit is included in the position corresponding block and intra-coded If the number of the first encoded blocks is smaller than a predetermined number, the omission mode is permitted as a block type of the encoding target block .

請求項記載の発明は、請求項に記載の画像変換装置において、前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレースに対応させて符号化し、前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフレーム符号化されるブロックペアを構成するブロックを前記周辺ブロックとして特定することを特徴とする。 An eighth aspect of the present invention is the image conversion apparatus according to the seventh aspect , wherein the encoding unit interlaces the uncompressed image data in units of block pairs formed by two blocks adjacent to each other in the vertical direction. When the reference pair that is the block pair including the encoding target block is field-encoded, the block specifying unit configures a block pair that is different from the reference pair and is frame-encoded. A block is specified as the peripheral block.

請求項記載の発明は、請求項に記載の画像変換装置において、前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレースに対応させて符号化し、前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフィールド符号化される第1ブロックペアを選択し、前記第1ブロックペアを構成する二つのブロックのうち前記符号化対象ブロックとフィールド種別が一致するブロックを前記周辺ブロックとして特定することを特徴とする。 According to a ninth aspect of the present invention, in the image conversion device according to the seventh aspect , the encoding unit interlaces the uncompressed image data in units of block pairs composed of two blocks adjacent to each other in the vertical direction. When the reference pair, which is a block pair including the encoding target block, is field-encoded, the block specifying unit determines a first block pair that is different from the reference pair and is field-encoded. And selecting a block whose field type matches that of the encoding target block from the two blocks constituting the first block pair as the peripheral block.

請求項10記載の発明は、請求項に記載の画像変換装置において、前記ブロック特定部は、前記位置対応ブロックがフィールド符号化され、かつ第1フィールド及び第2フィールドを含む場合、前記第1ブロックペアを構成する二つのブロックに対応し、かつ前記位置対応ブロックを含む二つの第1符号化ブロックを特定し、前記省略モード許可部は、前記二つの第1符号化ブロックのうち少なくとも一つがイントラ符号化されていれば、前記位置対応ブロックがイントラ符号化されていると判定することを特徴とする。 According to a tenth aspect of the present invention, in the image conversion device according to the ninth aspect , the block specifying unit, when the position corresponding block is field-encoded and includes a first field and a second field, The first encoding block corresponding to two blocks constituting the block pair and including the position corresponding block is specified, and the abbreviated mode permission unit includes at least one of the two first encoding blocks. If it is intra-coded, it is determined that the position corresponding block is intra-coded.

請求項11記載の発明は、請求項ないし請求項10のいずれかに記載の画像変換装置において、前記省略モードは、前記符号化対象ブロックの動き情報及び画素情報の符号化が省略されたスキップモード、を含むことを特徴とする。 According to an eleventh aspect of the present invention, in the image conversion device according to any one of the seventh to tenth aspects, the skip mode is a skip in which encoding of motion information and pixel information of the encoding target block is omitted. Mode.

請求項12記載の発明は、請求項ないし請求項10のいずれかに記載の画像変換装置において、前記省略モードは、前記符号化対象ブロックの動き情報の符号化が省略されたダイレクトモード、を含むことを特徴とする。 According to a twelfth aspect of the present invention, in the image conversion device according to any one of the seventh to tenth aspects, the omission mode is a direct mode in which encoding of motion information of the encoding target block is omitted. It is characterized by including.

請求項13記載の発明は、請求項ないし請求項10のいずれかに記載の画像変換装置において、前記符号化対象ブロックは、複数のサブブロックにより構成され、前記省略モードは、各サブブロックの動き情報の符号化が省略されたモード、を含むことを特徴とする。
According to a thirteenth aspect of the present invention, in the image conversion device according to any one of the seventh to tenth aspects, the encoding target block is composed of a plurality of sub-blocks, and the abbreviated mode is set for each sub-block. A mode in which encoding of motion information is omitted.

本発明に係る画像符号化装置は、既に符号化されている周辺ブロックのブロック情報に基づいて、符号化対象ブロックに対する省略モードの適用の可否を判定する。たとえば、イントラ符号化された周辺ブロックの数が所定数よりも小さければ、符号化対象ブロックに対する省略モードの適用が許可される。周辺ブロックの符号化の状況に応じて符号化対象ブロックに対する省略モードの適用が抑制されるため、符号化画像データの画質を向上させることができる。   The image encoding apparatus according to the present invention determines whether or not the omission mode can be applied to the encoding target block based on the block information of the peripheral blocks that have already been encoded. For example, when the number of intra-coded peripheral blocks is smaller than a predetermined number, application of the abbreviated mode to the encoding target block is permitted. Since the application of the omission mode to the encoding target block is suppressed according to the encoding status of the peripheral blocks, the image quality of the encoded image data can be improved.

本発明に係る画像変換装置は、符号化対象ブロックと周辺ブロックとを特定し、周辺ブロックに対応する第1符号化画像データのブロックを位置対応ブロックとして特定する。本発明に係る画像変換装置は、位置対応ブロックのブロック情報に基づいて、符号化対象ブロックに対する省略モードの適用の可否を判定する。たとえば、イントラ符号化された位置対応ブロックの数が所定数よりも小さければ、符号化対象ブロックに対する省略モードの適用が許可される。あるいは、位置対応ブロックの動きベクトルの平均に基づいて、符号化対象ブロックに対する省略モードの適用の可否が判定される。このように、位置対応ブロックの符号化の状況に応じて符号化対象ブロックに対する省略モードの適用が抑制されるため、第2符号化画像データの画質を向上させることができる。   The image conversion apparatus according to the present invention specifies an encoding target block and a peripheral block, and specifies a block of first encoded image data corresponding to the peripheral block as a position corresponding block. The image conversion apparatus according to the present invention determines whether or not the omission mode can be applied to the encoding target block based on the block information of the position corresponding block. For example, if the number of intra-corresponding position-corresponding blocks is smaller than a predetermined number, application of the omission mode to the encoding target block is permitted. Alternatively, it is determined whether or not the omission mode can be applied to the encoding target block based on the average of the motion vectors of the position corresponding block. Thus, since the application of the omission mode to the encoding target block is suppressed according to the encoding state of the position corresponding block, the image quality of the second encoded image data can be improved.

本発明の第1の実施の形態に係る画像符号化装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the image coding apparatus which concerns on the 1st Embodiment of this invention. マクロブロック種別決定部の動作の流れを示すフローチャートである。It is a flowchart which shows the flow of operation | movement of a macroblock classification determination part. 符号化対象マクロブロックと周辺マクロブロックとの位置関係を示す図である。It is a figure which shows the positional relationship of an encoding object macroblock and a periphery macroblock. 符号化対象マクロブロックと周辺マクロブロックとの位置関係を示す図である。It is a figure which shows the positional relationship of an encoding object macroblock and a periphery macroblock. 本発明の第2の実施の形態に係る画像変換装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the image conversion apparatus which concerns on the 2nd Embodiment of this invention. マクロブロック種別決定部の動作の流れを示すフローチャートである。It is a flowchart which shows the flow of operation | movement of a macroblock classification determination part. 符号化対象マクロブロックと周辺マクロブロックとの位置関係を示す図である。It is a figure which shows the positional relationship of an encoding object macroblock and a periphery macroblock. 符号化対象マクロブロックと周辺マクロブロックとの位置関係を示す図である。It is a figure which shows the positional relationship of an encoding object macroblock and a periphery macroblock. H.264及びMPEG2におけるフィールド区分の違いを示す図である。H. 2 is a diagram illustrating a difference in field division between H.264 and MPEG2. 本発明の第3の実施の形態に係る画像変換装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the image conversion apparatus which concerns on the 3rd Embodiment of this invention. 符号化対象マクロブロックと周辺マクロブロックとの位置関係を示す図である。It is a figure which shows the positional relationship of an encoding object macroblock and a periphery macroblock.

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

[第1の実施の形態]
{1.全体構成}
図1は、本実施の形態に係る画像符号化装置1の機能的構成を示すブロック図である。図1に示すように、画像符号化装置1は、入力された非圧縮画像データをH.264方式で符号化して、H.264画像データを出力する装置である。画像符号化装置1は、マクロブロック種別決定部11と、符号化部12とを備える。
[First Embodiment]
{1. overall structure}
FIG. 1 is a block diagram showing a functional configuration of an image encoding device 1 according to the present embodiment. As shown in FIG. 1, the image encoding device 1 converts input uncompressed image data into H.264 format. H.264 encoding and H.264. It is a device that outputs H.264 image data. The image encoding device 1 includes a macroblock type determination unit 11 and an encoding unit 12.

マクロブロック種別決定部11は、非圧縮画像データを構成する複数のマクロブロックの各々に対して適用するマクロブロック種別を決定する。決定されたマクロブロック種別に関する種別情報が、符号化部12に入力される。符号化部12は、決定されたマクロブロック種別に基づいて各マクロブロックを符号化する。   The macroblock type determination unit 11 determines a macroblock type to be applied to each of a plurality of macroblocks constituting uncompressed image data. Type information related to the determined macroblock type is input to the encoding unit 12. The encoding unit 12 encodes each macroblock based on the determined macroblock type.

マクロブロック種別決定部11は、周辺ブロック特定部111と、省略モード許可部112とを備える。周辺ブロック特定部111は、符号化対象マクロブロックと、周辺マクロブロックとを特定する。周辺マクロブロックは、符号化対象マクロブロックの周辺に位置するマクロブロックである。周辺マクロブロックは、符号化対象マクロブロックのマクロブロック種別を決定するために用いられる。以下、符号化対象マクロブロックを「符号化対象MB(MacroBlock)」と呼ぶ。周辺マクロブロックを「周辺MB」と呼ぶ。   The macroblock type determination unit 11 includes a peripheral block identification unit 111 and an abbreviated mode permission unit 112. The peripheral block specifying unit 111 specifies the encoding target macroblock and the peripheral macroblock. The peripheral macroblock is a macroblock located around the encoding target macroblock. The peripheral macroblock is used to determine the macroblock type of the encoding target macroblock. Hereinafter, the encoding target macroblock is referred to as “encoding target MB (MacroBlock)”. A peripheral macroblock is referred to as a “peripheral MB”.

省略モード許可部112は、符号化対象MBに対して省略モードの適用を許可するか否かを、周辺MBの符号化に関する情報に基づいて判定する。省略モードは、マクロブロックに関する一部の情報の符号化を省略するマクロブロック種別を指し、スキップモード及びダイレクトモードが該当する。スキップモードでは、マクロブロックの画素情報及び動き情報が符号化されない。ダイレクトモードは、マクロブロックの動き情報が符号化されない。   The abbreviated mode permission unit 112 determines whether to permit the application of the abbreviated mode to the encoding target MB based on information related to encoding of neighboring MBs. The abbreviated mode refers to a macroblock type that omits encoding of some information related to the macroblock, and corresponds to a skip mode and a direct mode. In the skip mode, pixel information and motion information of the macroblock are not encoded. In the direct mode, macroblock motion information is not encoded.

{2.マクロブロック種別決定部11の動作の流れ}
図2は、マクロブロック種別決定部11の動作を示すフローチャートである。初期状態では、符号化対象MBのマクロブロック種別として省略モードの適用が禁止されている。
{2. Flow of operation of macroblock type determination unit 11}
FIG. 2 is a flowchart showing the operation of the macroblock type determination unit 11. In the initial state, application of the omission mode is prohibited as the macroblock type of the encoding target MB.

非圧縮画像データは、画像符号化装置1に入力され、複数のマクロブロックに分割される。マクロブロック種別決定部11は、分割された複数のマクロブロックの中から符号化対象MBを決定する(ステップS11)。   Uncompressed image data is input to the image encoding device 1 and divided into a plurality of macroblocks. The macroblock type determination unit 11 determines an encoding target MB from among the plurality of divided macroblocks (step S11).

マクロブロック種別決定部11は、符号化済みのマクロブロックがあるか否かを確認する(ステップS12)。符号化済みのマクロブロックが存在しない場合(ステップS12でNo)、マクロブロック種別決定部11は、図2に示す処理を終了する。つまり、符号化対象MBに対する省略モードの適用が禁止される。これは、符号化対象MBに対する省略モードの適用の可否を判定するときに、周辺MBを特定する必要があるためである。   The macroblock type determination unit 11 confirms whether there is an encoded macroblock (step S12). When there is no encoded macroblock (No in step S12), the macroblock type determination unit 11 ends the process illustrated in FIG. That is, the application of the omission mode to the encoding target MB is prohibited. This is because it is necessary to specify neighboring MBs when determining whether or not the omission mode can be applied to the encoding target MB.

一方、符号化済みのマクロブロックが存在する場合(ステップS12でYes)、周辺ブロック特定部111は、符号化済みのマクロブロックの中から周辺MBを特定する(ステップS13)。周辺MBの決定(ステップS13)の詳細は後述する。省略モード許可部112は、周辺MBのマクロブロック情報を符号化部12から取得する。省略モード許可部112は、周辺MBのマクロブロック情報を参照して、イントラ符号化された周辺MBをカウントする(ステップS14)。マクロブロック情報は、各マクロブロックの符号化モードを特定することができる情報である。イントラ符号化されている周辺MBの数がしきい値よりも小さければ(ステップS15でYes)、省略モード許可部112は、符号化対象MBに対して省略モードを適用することを許可する(ステップS16)。   On the other hand, when an encoded macroblock exists (Yes in step S12), the peripheral block specifying unit 111 specifies a peripheral MB from the encoded macroblock (step S13). Details of the determination of the peripheral MB (step S13) will be described later. The omitted mode permission unit 112 acquires macroblock information of neighboring MBs from the encoding unit 12. The omitted mode permission unit 112 refers to the macroblock information of the neighboring MB and counts the intra-coded neighboring MB (step S14). The macro block information is information that can specify the encoding mode of each macro block. If the number of intra-encoded neighboring MBs is smaller than the threshold value (Yes in step S15), the omission mode permission unit 112 permits the omission mode to be applied to the encoding target MB (step). S16).

省略モードの適用が許可されることにより、マクロブロック種別決定部11は、符号化対象MBのマクロブロック種別として、スキップモードあるいはダイレクトモードを適用することが可能となる。ただし、スキップモードあるいはダイレクトモードが符号化対象MBに必ず適用されるとは限らない。これは、マクロブロック種別決定部11が、符号化対象MBの符号化コストなどに基づいて、符号化対象MBに適用するマクロブロック種別を決定するためである。   When the application of the omitted mode is permitted, the macroblock type determination unit 11 can apply the skip mode or the direct mode as the macroblock type of the encoding target MB. However, the skip mode or the direct mode is not always applied to the encoding target MB. This is because the macroblock type determination unit 11 determines the macroblock type to be applied to the encoding target MB based on the encoding cost of the encoding target MB.

イントラ符号化されている周辺MBの数がしきい値以上であれば(ステップS15でNo)、省略モード許可部112は、図2に示す処理を終了する。つまり、符号化対象MBに対する省略モードの適用が禁止される。しきい値は、画像符号化装置1に予め設定されている数値である。しきい値として1が設定された場合、イントラ符号化された周辺MBが一つでも存在すれば、符号化対象MBに対する省略モードの適用が禁止される。   If the number of neighboring MBs that are intra-coded is equal to or greater than the threshold value (No in step S15), the abbreviated mode permission unit 112 ends the process illustrated in FIG. That is, the application of the omission mode to the encoding target MB is prohibited. The threshold value is a numerical value preset in the image encoding device 1. When 1 is set as the threshold value, if there is at least one intra-coded peripheral MB, application of the abbreviated mode to the encoding target MB is prohibited.

{3.周辺MBの決定}
非圧縮画像データがインターレース走査に対応している場合、非圧縮画像データは、Topフィールド及びBottomフィールドの二つのフィールドに分割される。H.264では、二つのフィールドは、フレーム符号化及びフィールド符号化のいずれかの方式で符号化される。フレーム符号化では、二つのフィールドが区別されることなく符号化される。フィールド符号化では、二つのフィールドが個別に符号化される。
{3. Determination of peripheral MB}
When the uncompressed image data is compatible with interlace scanning, the uncompressed image data is divided into two fields, a Top field and a Bottom field. H. In H.264, the two fields are encoded by either frame encoding or field encoding. In frame coding, two fields are coded without distinction. In field coding, the two fields are coded separately.

H.264には、インターレース走査に対応した符号化方式として、PAFF(Picture Adaptive Frame−Field Coding)と、MBAFF(Macroblock Adaptive Frame−Field Coding)とが存在する。PAFFでは、フレーム符号化とフィールド符号化とをピクチャ単位で切り替えることができる。MBAFFでは、フレーム符号化とフィールド符号化とをマクロブロックペア単位で切り替えることができる。マクロブロックペアは、MBAFFに基づく符号化のときに用いられ、上下方向に互いに隣接する二つのマクロブロックにより構成される。   H. H.264 includes PAFF (Picture Adaptive Frame-Field Coding) and MBAFF (Macroblock Adaptive Frame-Field Coding) as encoding systems compatible with interlace scanning. In PAFF, frame coding and field coding can be switched in units of pictures. In MBAFF, frame coding and field coding can be switched in units of macroblock pairs. The macroblock pair is used for encoding based on MBAFF, and is composed of two macroblocks adjacent to each other in the vertical direction.

非圧縮画像データがMBAFFで符号化されるか否かによって、周辺MBの特定基準が異なる。周辺MBの特定基準の詳細を、非圧縮画像データがMBAFFで符号化される場合と、MBAFFで符号化されない場合とに分けて説明する。   Depending on whether or not the uncompressed image data is encoded by MBAFF, the specific criteria for neighboring MBs differ. The details of the specific criteria for the peripheral MB will be described separately for a case where uncompressed image data is encoded with MBAFF and a case where it is not encoded with MBAFF.

{3.1.非圧縮画像データがMBAFFで符号化されない場合}
まず、非圧縮画像データがMBAFFで符号化されない場合における、周辺MBの特定基準を説明する。非圧縮画像データがMBAFFで符号化されないケースとしては、PAFFに基づく符号化、またはプログレッシブ走査に対応した符号化が挙げられる。
{3.1. When uncompressed image data is not encoded by MBAFF}
First, a description will be given of a specific criterion for neighboring MBs when uncompressed image data is not encoded by MBAFF. Examples of cases where uncompressed image data is not encoded by MBAFF include encoding based on PAFF or encoding corresponding to progressive scanning.

図3は、非圧縮画像データがMBAFFで符号化されない場合における、符号化対象MBと周辺MBとの位置関係を示す図である。非圧縮画像データは、5×6のマクロブロックm0〜m29で構成される。符号化部12は、マクロブロックm0,m1,m2,・・・,m28,m29の順に符号化する。   FIG. 3 is a diagram showing a positional relationship between the encoding target MB and the neighboring MB when the uncompressed image data is not encoded by MBAFF. The uncompressed image data is composed of 5 × 6 macro blocks m0 to m29. The encoding unit 12 encodes macroblocks m0, m1, m2,..., M28, m29 in this order.

図3に示す例では、マクロブロックm0〜m11が符号化済みであり、マクロブロックm12が符号化対象MBである。符号化済みのマクロブロックm0〜m11をハッチングあるいは砂地で示す。砂地で示すマクロブロックは、マクロブロックm12が符号化対象MBであるときに周辺MBとして特定されたマクロブロックである。   In the example illustrated in FIG. 3, the macroblocks m0 to m11 are already encoded, and the macroblock m12 is an encoding target MB. Encoded macroblocks m0 to m11 are indicated by hatching or sand. The macroblock indicated by the sand is a macroblock specified as a peripheral MB when the macroblock m12 is the encoding target MB.

上述したステップS13(図2参照)において、周辺ブロック特定部111は、符号化済みのマクロブロックを周辺MBとして特定する。本実施の形態では、周辺ブロック特定部111は、マクロブロックm12に隣接する4つのマクロブロックm6〜m8,m11を周辺MBとして特定する。   In step S13 (see FIG. 2) described above, the peripheral block specifying unit 111 specifies an encoded macroblock as a peripheral MB. In the present embodiment, peripheral block specifying section 111 specifies four macroblocks m6 to m8, m11 adjacent to macroblock m12 as peripheral MBs.

省略モード許可部112は、マクロブロックm6〜m8,m11のうちイントラ符号化されたマクロブロックをカウントする(ステップS14)。イントラ符号化されたマクロブロックのカウント値がしきい値よりも小さければ(ステップS15でYes)、マクロブロックm12に対する省略モードの適用が許可される(ステップS16)。これにより、マクロブロックm12のサブマクロブロックに対するダイレクトモードの適用も可能となる。   The omitted mode permission unit 112 counts the intra-coded macro blocks among the macro blocks m6 to m8 and m11 (step S14). If the count value of the intra-coded macroblock is smaller than the threshold value (Yes in step S15), application of the abbreviated mode to the macroblock m12 is permitted (step S16). Thereby, the direct mode can be applied to the sub-macroblock of the macroblock m12.

周辺ブロック特定部111は、符号化対象MBに隣接しないマクロブロック(マクロブロックm4,m6など)を周辺MBとして特定してもよい。あるいは、周辺ブロック特定部111は、全ての符号化済みのマクロブロックを周辺MBとして特定してもよい。   The peripheral block specifying unit 111 may specify macroblocks (macroblocks m4, m6, etc.) that are not adjacent to the encoding target MB as peripheral MBs. Alternatively, the peripheral block specifying unit 111 may specify all encoded macroblocks as peripheral MBs.

{3.2.非圧縮画像データがMBAFFで符号化される場合}
非圧縮画像データがMBAFFで符号化される場合における、周辺MBの特定基準を説明する。以下、符号化対象MBを含むマクロブロック(基準ペア)が、フィールド符号化される場合と、フレーム符号化される場合とに分けて説明する。
{3.2. When uncompressed image data is encoded by MBAFF}
A specific criterion for neighboring MBs when uncompressed image data is encoded by MBAFF will be described. Hereinafter, a case where a macroblock (reference pair) including an encoding target MB is field-encoded and a case where it is frame-encoded will be described.

まず、基準ペアがフィールド符号化される場合における、周辺MBの特定基準を説明する。図4は、基準ペアがフィールド符号化される場合における符号化対象MBと周辺MBとの位置関係を示す図である。図4では、符号化済みマクロブロックをハッチングあるいは砂地で示している。砂地で示すマクロブロックは、マクロブロックm14が符号化対象MBであるときに周辺MBとして特定されたマクロブロックである。マクロブロックは、マクロブロックm0,m1・・・m29の順に符号化される。   First, specific criteria for neighboring MBs when the reference pair is field-encoded will be described. FIG. 4 is a diagram showing the positional relationship between the encoding target MB and the neighboring MB when the reference pair is field-encoded. In FIG. 4, the encoded macroblock is indicated by hatching or sand. The macroblock indicated by the sand is a macroblock specified as a peripheral MB when the macroblock m14 is the encoding target MB. Macroblocks are encoded in the order of macroblocks m0, m1,.

図4において、マクロブロックm0〜m29は、それぞれマクロブロックペアを構成する。一点鎖線で示すマクロブロックペアは、フレーム符号化される。実線で示すマクロブロックペアP11,P12,P13は、フィールド符号化される。マクロブロックm4,m5がマクロブロックペアP11を構成する。マクロブロックm12,m13がマクロブロックペアP12を構成する。マクロブロックm14,m15が、マクロブロックペアP13を構成する。マクロブロックm4,m12,m14がTopフィールドである。マクロブロックm5,m13,m15がBottomフィールドである。   In FIG. 4, macroblocks m0 to m29 each constitute a macroblock pair. A macroblock pair indicated by a one-dot chain line is frame-encoded. Macroblock pairs P11, P12, and P13 indicated by solid lines are field-encoded. Macroblocks m4 and m5 constitute a macroblock pair P11. Macroblocks m12 and m13 constitute a macroblock pair P12. Macroblocks m14 and m15 constitute a macroblock pair P13. Macroblocks m4, m12, and m14 are Top fields. Macro blocks m5, m13, and m15 are the Bottom field.

マクロブロックm14を符号化対象MBとし、マクロブロックペアP13を基準ペアとする。基準ペアがフィールド符号化される場合、以下に示す二つの基準のいずれかを満たすマクロブロックが周辺MBとして特定される。
(1)基準ペアと異なり、かつフレーム符号化されるマクロブロックペアを構成するマクロブロック。
(2)基準ペアと異なり、かつフィールド符号化されるマクロブロックペアを構成する二つのマクロブロックのうち、符号化対象MBとフィールド種別が一致するマクロブロック。
The macro block m14 is an encoding target MB, and the macro block pair P13 is a reference pair. When the reference pair is field-encoded, a macroblock that satisfies one of the following two criteria is specified as a neighboring MB.
(1) A macroblock that is different from the reference pair and constitutes a macroblock pair to be frame-encoded.
(2) A macroblock whose field type matches the encoding target MB, out of two macroblocks that are different from the reference pair and constitute a field-encoded macroblock pair.

図4に示す例では、周辺ブロック特定部111は、基準(1)に該当する周辺MBとして、マクロブロックm14に隣接するマクロブロックm3,m7を特定する。周辺ブロック特定部111は、基準(1)を満たすのであれば、マクロブロックm3,m7の他にマクロブロックm1、m10などを周辺ブロックとして特定してもよい。あるいは、周辺ブロック特定部111は、基準(1)を満たし、かつ符号化済みの全てのマクロブロックを周辺MBとして特定してもよい。   In the example illustrated in FIG. 4, the peripheral block specifying unit 111 specifies macroblocks m3 and m7 adjacent to the macroblock m14 as the peripheral MB corresponding to the criterion (1). The peripheral block specifying unit 111 may specify macroblocks m1 and m10 as peripheral blocks in addition to the macroblocks m3 and m7 as long as the criterion (1) is satisfied. Alternatively, the peripheral block specifying unit 111 may specify all the encoded macro blocks that satisfy the criterion (1) as the peripheral MB.

周辺ブロック特定部111は、基準(2)に該当する周辺MBとして、基準ペア(マクロブロックペアP13)に隣接したマクロブロックペアP11,P12を特定する。マクロブロックペアP11,P12に含まれるマクロブロックのうち、マクロブロックm4,m12が周辺MBとして特定される。これは、マクロブロックm4,m12のフィールド種別と、マクロブロックm14のフィールド種別とが一致するためである。周辺ブロック特定部111は、基準(2)を満たすのであれば、基準ペアに直接隣接しないマクロブロックペアを構成するマクロブロックから周辺MBを特定してもよい。   The peripheral block specifying unit 111 specifies macroblock pairs P11 and P12 adjacent to the reference pair (macroblock pair P13) as the peripheral MB corresponding to the reference (2). Of the macroblocks included in the macroblock pairs P11 and P12, the macroblocks m4 and m12 are specified as the peripheral MB. This is because the field type of the macroblocks m4 and m12 matches the field type of the macroblock m14. If the peripheral block specifying unit 111 satisfies the criterion (2), the peripheral block specifying unit 111 may specify a peripheral MB from macroblocks that constitute a macroblock pair that is not directly adjacent to the reference pair.

図3において、非圧縮画像データがMBAFFで符号化されない場合には、符号化対象MB(マクロブロックm12)の真上に隣接するマクロブロック(マクロブロックm7)が周辺MBとして特定されている。しかし、図4に示す例では、符号化対象MB(マクロブロックm14)の真上に隣接するマクロブロックm5は、マクロブロックm14とフィールド種別が異なるため、マクロブロックm14の周辺MBとして特定されない。このように、非圧縮画像データがどのように符号化されるかによって、周辺MBとして特定されるマクロブロックが変化する。   In FIG. 3, when uncompressed image data is not encoded by MBAFF, a macroblock (macroblock m7) immediately adjacent to the encoding target MB (macroblock m12) is specified as a peripheral MB. However, in the example shown in FIG. 4, the macroblock m5 immediately adjacent to the encoding target MB (macroblock m14) is not specified as a peripheral MB of the macroblock m14 because the field type is different from that of the macroblock m14. Thus, the macroblock specified as the peripheral MB varies depending on how the uncompressed image data is encoded.

次に、基準ペアがフレーム符号化される場合における、周辺MBの特定基準を説明する。この場合、周辺ブロック特定部111は、非圧縮画像データがMBAFFで符号化されない場合と同じ基準(図3参照)で周辺MBを特定する。つまり、基準ペアがフレーム符号化される場合、周辺ブロック特定部111は、他のマクロブロックペアがフィールド符号化されているか、フレーム符号化されているかに関係なく、符号化済みのマクロブロックを周辺MBとして特定することができる。これは、符号化対象MBがTopフィールド及びBottomフィールドを含んでいるため、符号化済みマクロブロックの種別を確認する必要がないためである。   Next, specific criteria for neighboring MBs when the reference pair is frame-encoded will be described. In this case, the peripheral block specifying unit 111 specifies the peripheral MB based on the same standard (see FIG. 3) as when uncompressed image data is not encoded by MBAFF. That is, when the reference pair is frame-encoded, the peripheral block specifying unit 111 surrounds the encoded macroblock regardless of whether other macroblock pairs are field-encoded or frame-encoded. It can be specified as MB. This is because since the encoding target MB includes a Top field and a Bottom field, it is not necessary to confirm the type of the encoded macroblock.

ステップS13において周辺MBが特定された後に、省略モード許可部112は、周辺MBのマクロブロック情報に基づいて、符号化対象MBに対する省略モードの適用の可否を判定する(ステップS14〜ステップS16)。   After the neighboring MB is specified in step S13, the omitted mode permission unit 112 determines whether or not the omitted mode can be applied to the encoding target MB based on the macroblock information of the neighboring MB (step S14 to step S16).

以上説明したように、マクロブロック種別決定部11は、イントラ符号化された周辺MBの数がしきい値よりも小さければ、符号化対象MBに対する省略モードの適用を許可する。これにより、マクロブロックがイントラ符号化されることの多いシーン(動きの大きいシーンなど)を符号化する際に、マクロブロックに対する省略モードの適用が抑制される。再生時に視聴者が違和感を覚えることのないH.264画像データを生成することができる。   As described above, the macroblock type determination unit 11 permits application of the abbreviated mode to the encoding target MB if the number of intra-coded peripheral MBs is smaller than the threshold value. This suppresses the application of the abbreviated mode to the macroblock when encoding a scene where the macroblock is often intra-encoded (such as a scene with a large amount of motion). H. The viewer does not feel uncomfortable during playback. H.264 image data can be generated.

[第2の実施の形態]
{1.全体構成}
図5は、本実施の形態に係る画像変換装置100の機能的構成を示すブロック図である。画像変換装置100は、MPEG2画像データをH.264画像データに変換する。画像変換装置100は、画像復号化装置2と、画像符号化装置3とを備える。
[Second Embodiment]
{1. overall structure}
FIG. 5 is a block diagram illustrating a functional configuration of the image conversion apparatus 100 according to the present embodiment. The image conversion apparatus 100 converts MPEG2 image data to H.264 format. To H.264 image data. The image conversion apparatus 100 includes an image decoding apparatus 2 and an image encoding apparatus 3.

以下、上記第1の実施の形態と異なる点を中心に説明する。   The following description will focus on differences from the first embodiment.

画像復号化装置2は、MPEG2画像データを復号化して、非圧縮画像データを生成する。非圧縮画像データは、画像符号化装置3に入力される。画像符号化装置3は、上記第1の実施の形態の画像符号化装置1と同様に、非圧縮画像データをH.264方式で符号化する。画像符号化装置3は、マクロブロック種別決定部11と、符号化部12と、マクロブロック情報取得部31とを備える。   The image decoding device 2 decodes MPEG2 image data to generate uncompressed image data. Uncompressed image data is input to the image encoding device 3. Similar to the image encoding device 1 according to the first embodiment, the image encoding device 3 converts the uncompressed image data to H.264 format. It encodes by H.264 system. The image encoding device 3 includes a macroblock type determination unit 11, an encoding unit 12, and a macroblock information acquisition unit 31.

マクロブロック情報取得部31は、MPEG2画像データの各マクロブロックのマクロブロック情報を画像復号化装置2から取得する。マクロブロック種別決定部11は、周辺MBに対応するMPEG2画像データのマクロブロックのマクロブロック情報を、マクロブロック情報取得部31から取得する。マクロブロック種別決定部11は、取得したマクロブロック情報に基づいて、符号化対象MBに対する省略モードの適用の可否を判定する。   The macroblock information acquisition unit 31 acquires macroblock information of each macroblock of MPEG2 image data from the image decoding device 2. The macroblock type determination unit 11 acquires macroblock information of a macroblock of MPEG2 image data corresponding to the neighboring MB from the macroblock information acquisition unit 31. The macroblock type determination unit 11 determines whether or not the omission mode can be applied to the encoding target MB based on the acquired macroblock information.

{2.マクロブロック種別決定部11の動作の流れ}
図6は、本実施の形態におけるマクロブロック種別決定部11の動作の流れを示すフローチャートである。初期状態では、マクロブロック種別として、省略モードの適用が禁止されている。
{2. Flow of operation of macroblock type determination unit 11}
FIG. 6 is a flowchart showing an operation flow of the macroblock type determination unit 11 in the present embodiment. In the initial state, application of the omission mode is prohibited as the macroblock type.

非圧縮画像データは、画像符号化装置3に入力され、複数のマクロブロックに分割される。マクロブロック種別決定部11は、分割された複数のマクロブロックの中から符号化対象MBを決定する(ステップS21)。   The uncompressed image data is input to the image encoding device 3 and divided into a plurality of macroblocks. The macroblock type determination unit 11 determines an encoding target MB from among the plurality of divided macroblocks (step S21).

周辺ブロック決定部11は、周辺MBと、位置対応MBとを特定する(ステップS22)。位置対応MBとは、周辺MBの位置に対応するMPEG2画像データのマクロブロックのことである。省略モード許可部112は、位置対応MBのマクロブロック情報をマクロブロック情報取得部31から取得する(ステップS23)。   The peripheral block determination unit 11 specifies the peripheral MB and the position corresponding MB (step S22). The position corresponding MB is a macro block of MPEG2 image data corresponding to the position of the peripheral MB. The omitted mode permission unit 112 acquires the macro block information of the position-corresponding MB from the macro block information acquisition unit 31 (step S23).

省略モード許可部112は、取得したマクロブロック情報に基づいて、イントラ符号化されている位置対応MBをカウントする(ステップS24)。イントラ符号化されている位置対応MBの数がしきい値よりも小さければ(ステップS25でYes)、省略モード許可部112は、符号化対象MBに対して省略モードを適用することを許可する(ステップS26)。   The omitted mode permission unit 112 counts position-corresponding MBs that are intra-coded based on the acquired macroblock information (step S24). If the number of intra-encoded position-corresponding MBs is smaller than the threshold value (Yes in step S25), the omission mode permission unit 112 permits the omission mode to be applied to the encoding target MB ( Step S26).

イントラ符号化されている位置対応MBの数がしきい値以上であれば(ステップS25でNo)、省略モード許可部112は、符号化対象MBに対する省略モードの適用を許可することなく、図6に示す処理を終了する。   If the number of intra-encoded position-corresponding MBs is equal to or greater than the threshold value (No in step S25), the omission mode permission unit 112 does not permit the application of the omission mode to the encoding target MB. The process shown in FIG.

{3.周辺MB及び位置対応MBの特定}
次に、周辺MB及び位置対応MBの特定(ステップS22)と、イントラ符号化された位置対応MBのカウント(ステップS24)について詳しく説明する。ステップS22及びステップS24における処理は、下記に示す画像変換の条件(パターンA〜パターンC)に応じて変化する。
{3. Identifying neighboring MBs and location-compatible MBs}
Next, the identification of neighboring MBs and position-corresponding MBs (step S22) and the counting of intra-coded position-corresponding MBs (step S24) will be described in detail. The processing in step S22 and step S24 changes according to the following image conversion conditions (pattern A to pattern C).

(パターンA)非圧縮画像データがMBAFFで符号化されない場合。
(パターンB)MPEG2画像データがインターレース走査に対応せず、非圧縮画像データがMBAFFで符号化される場合。
(パターンC)MPEG2画像データがインターレース走査に対応し、非圧縮画像データがMBAFFで符号化される場合。
(Pattern A) Uncompressed image data is not encoded by MBAFF.
(Pattern B) When MPEG2 image data does not support interlace scanning and uncompressed image data is encoded by MBAFF.
(Pattern C) When MPEG2 image data corresponds to interlace scanning and uncompressed image data is encoded by MBAFF.

{3.1.パターンAにおける周辺MB及び位置対応MBの特定}
パターンAは、具体的には、非圧縮画像データがPAFFで符号化される場合、または非圧縮画像データがプログレッシブ走査に対応して符号化される場合に適用される。パターンAでは、MPEG2画像データの走査方式は、インターレース走査であっても、プログレッシブ走査であってもよい。
{3.1. Specification of neighboring MB and position corresponding MB in pattern A}
Specifically, the pattern A is applied when uncompressed image data is encoded by PAFF, or when uncompressed image data is encoded corresponding to progressive scanning. In pattern A, the MPEG2 image data scanning method may be interlace scanning or progressive scanning.

図7は、パターンAが適用される場合における符号化対象MBと周辺MBとの位置関係を示す図である。MPEG2及び非圧縮画像データは、5×6のマクロブロックで構成される。マクロブロックは、マクロブロックm0,m1・・・m29の順に符号化される。   FIG. 7 is a diagram illustrating a positional relationship between the encoding target MB and the peripheral MB when the pattern A is applied. MPEG2 and uncompressed image data are composed of 5 × 6 macroblocks. Macroblocks are encoded in the order of macroblocks m0, m1,.

図7では、符号化対象MBがマクロブロックm12であるときの周辺MBを砂地で示している。パターンAにおいて、周辺ブロック特定部111は、符号化対象MB(マクロブロックm12)を囲むようにして直接隣接する8個のマクロブロック(マクロブロックm6〜m8,m11,m13,m16〜m18)を周辺MBとして特定する。上記第1の実施の形態と異なり、パターンAでは、周辺MBの特定の際にマクロブロックが符号化済みであるか否かは考慮されない。   In FIG. 7, the surrounding MB when the encoding target MB is the macroblock m12 is indicated by sand. In pattern A, the neighboring block specifying unit 111 sets eight neighboring macroblocks (macroblocks m6 to m8, m11, m13, m16 to m18) as surrounding MBs so as to surround the encoding target MB (macroblock m12). Identify. Unlike the first embodiment, the pattern A does not consider whether or not the macroblock has been encoded when the neighboring MB is specified.

周辺ブロック特定部111は、マクロブロックm6〜m8,m11,m13,m16〜m18に対応するMPEG2画像データのマクロブロックを、位置対応MBとして特定する。周辺ブロック特定部111は、マクロブロックm12に直接隣接しないマクロブロックm2,m10,m28などを周辺MBとして特定してもよい。あるいは、全てのマクロブロックが周辺MBとして特定されてもよい。周辺ブロック特定部111は、マクロブロックm12の位置に対応するMPEG2画像データのマクロブロックを位置対応MBとして特定してもよい。   The peripheral block specifying unit 111 specifies macroblocks of MPEG2 image data corresponding to the macroblocks m6 to m8, m11, m13, and m16 to m18 as position corresponding MBs. The peripheral block specifying unit 111 may specify macroblocks m2, m10, m28 and the like that are not directly adjacent to the macroblock m12 as the peripheral MB. Alternatively, all macroblocks may be specified as neighboring MBs. The peripheral block specifying unit 111 may specify the macro block of the MPEG2 image data corresponding to the position of the macro block m12 as the position corresponding MB.

省略モード許可部112は、特定された位置対応MBに対応するマクロブロック情報を参照して、イントラ符号化された位置対応MBをカウントする(ステップS24)。カウント値に基づいて、マクロブロックm12に対して省略モードの適用を許可するか否かが判定される(ステップS25,S26)。   The omitted mode permission unit 112 refers to the macroblock information corresponding to the identified position-corresponding MB, and counts intra-coded position-corresponding MBs (step S24). Based on the count value, it is determined whether or not to apply the omission mode to the macroblock m12 (steps S25 and S26).

{3.2.パターンBにおける周辺MB及び参照MBの特定}
パターンBは、MPEG2画像データがインターレース走査に対応せず、かつ非圧縮画像データがMBAFFで符号化される場合に適用される。
{3.2. Identification of neighboring MB and reference MB in pattern B}
Pattern B is applied when MPEG2 image data does not support interlace scanning and uncompressed image data is encoded by MBAFF.

図8は、パターンBが適用される場合における符号化対象MBと周辺MBとの位置関係を示す図である。MPEG2及び非圧縮画像データは、5×6のマクロブロックで構成される。マクロブロックは、マクロブロックm0,m1・・・m29の順に符号化される。   FIG. 8 is a diagram illustrating a positional relationship between the encoding target MB and the neighboring MB when the pattern B is applied. MPEG2 and uncompressed image data are composed of 5 × 6 macroblocks. Macroblocks are encoded in the order of macroblocks m0, m1,.

図8では、符号化対象MBがマクロブロックm14であるときに、周辺MBとして特定されるマクロブロックを砂地で示している。図8において、マクロブロックm0〜m29は、それぞれマクロブロックペアを構成する。一点鎖線で示すマクロブロックペアは、フレーム符号化される。実線で示すマクロブロックペアP21,P22,P23,P24は、フィールド符号化される。マクロブロックm4,m5がマクロブロックペアP21を構成する。マクロブロックm10,m11がマクロブロックペアP22を構成する。マクロブロックm14,m15がマクロブロックペアP23(基準ペア)を構成する。マクロブロックm16,m17がマクロブロックペアP24を構成する。マクロブロックm4,m10,m14,m16がTopフィールドである。マクロブロックm5,m11,m15,m17がBottomフィールドである。   In FIG. 8, when the encoding target MB is the macroblock m14, the macroblock specified as the peripheral MB is indicated by sand. In FIG. 8, macroblocks m0 to m29 each constitute a macroblock pair. A macroblock pair indicated by a one-dot chain line is frame-encoded. Macroblock pairs P21, P22, P23, and P24 indicated by solid lines are field-encoded. Macroblocks m4 and m5 constitute a macroblock pair P21. Macroblocks m10 and m11 constitute a macroblock pair P22. Macroblocks m14 and m15 constitute a macroblock pair P23 (reference pair). Macroblocks m16 and m17 constitute a macroblock pair P24. Macro blocks m4, m10, m14, and m16 are Top fields. Macro blocks m5, m11, m15, and m17 are Bottom fields.

パターンBでは、基準ペアがフィールド符号化されるか、フレーム符号化されるかによって、周辺MBの特定基準が異なる。まず、基準ペアがフィールド符号化される場合における周辺MBの特定基準を説明する。   In the pattern B, the specific reference for the neighboring MBs differs depending on whether the reference pair is field-encoded or frame-encoded. First, specific criteria for neighboring MBs when the reference pair is field-encoded will be described.

パターンBにおいて基準ペアがフィールド符号化される場合、周辺ブロック特定部111は、以下に示す(B1)、(B2)のどちらかの基準に該当するマクロブロックを周辺MBとして特定する。
(B1)基準ペアと異なり、フレーム符号化されるマクロブロックペアを構成するマクロブロック。
(B2)基準ペアと異なり、フィールド符号化されるマクロブロックペアを構成する二つのマクロブロックのうち、符号化対象MBとフィールド種別が一致するマクロブロック。
When the reference pair is field-encoded in the pattern B, the peripheral block specifying unit 111 specifies a macroblock corresponding to one of the following criteria (B1) and (B2) as a peripheral MB.
(B1) Unlike the reference pair, a macroblock constituting a macroblock pair to be frame-encoded.
(B2) Unlike the reference pair, a macroblock whose field type matches the encoding target MB, out of two macroblocks constituting a macroblock pair to be field-encoded.

図8に示す例では、周辺ブロック特定部111は、基準(B1)に該当し、かつマクロブロックm14に直接隣接するマクロブロックm3,m7,m12,m13を周辺MBとして特定する。周辺ブロック特定部111は、基準(B2)の条件に該当し、かつ基準ペアに直接隣接したマクロブロックペアP21,P24を構成するマクロブロックm4,m16を、周辺MBとして特定する。この結果、マクロブロックm3,m4,m7,m12,m13,m16に対応するMPEG2画像データのマクロブロックが、位置対応MBとして特定される。   In the example illustrated in FIG. 8, the peripheral block specifying unit 111 specifies macroblocks m3, m7, m12, and m13 that correspond to the reference (B1) and are directly adjacent to the macroblock m14 as peripheral MBs. The peripheral block specifying unit 111 specifies macroblocks m4 and m16 constituting the macroblock pairs P21 and P24 that meet the condition of the reference (B2) and are directly adjacent to the reference pair as the peripheral MB. As a result, the macro block of the MPEG2 image data corresponding to the macro blocks m3, m4, m7, m12, m13, m16 is specified as the position corresponding MB.

周辺ブロック特定部111は、基準(B1)に該当し、かつ、基準ペア(マクロブロックペアP23)に直接隣接しないマクロブロックm1,m22,m24などを周辺MBとして特定してもよい。周辺ブロック特定部111は、基準(B2)に該当し、かつ基準ペアに直接隣接しないマクロブロックペアP22から周辺MBを特定してもよい。図8に示す例では、マクロブロックm10を周辺MBとして特定することができる。パターンAと同様に、マクロブロックm14に対応するMPEG2画像データのマクロブロックが、位置対応MBとして特定されてもよい。   The peripheral block specifying unit 111 may specify macroblocks m1, m22, m24, etc. that correspond to the reference (B1) and are not directly adjacent to the reference pair (macroblock pair P23) as peripheral MBs. The peripheral block specifying unit 111 may specify the peripheral MB from the macroblock pair P22 that corresponds to the reference (B2) and is not directly adjacent to the reference pair. In the example shown in FIG. 8, the macroblock m10 can be specified as the peripheral MB. Similarly to the pattern A, the macro block of the MPEG2 image data corresponding to the macro block m14 may be specified as the position corresponding MB.

次に、パターンBにおいて基準ペアがフレーム符号化される場合における周辺MBの特定基準を説明する。この場合、周辺ブロック特定部111は、パターンAと同様の基準で周辺MBを特定する。つまり、パターンBにおいて基準ペアがフレーム符号化される場合、周辺ブロック特定部111は、他のマクロブロックのフィールド種別を考慮することなく、周辺MBを特定する。   Next, a specific criterion for neighboring MBs when the reference pair is frame-encoded in the pattern B will be described. In this case, the peripheral block specifying unit 111 specifies the peripheral MB on the same basis as the pattern A. That is, when the reference pair is frame-encoded in the pattern B, the peripheral block specifying unit 111 specifies the peripheral MB without considering the field types of other macroblocks.

省略モード許可部112は、特定された位置対応MBに対応するマクロブロック情報を参照して、イントラ符号化された位置対応MBをカウントする(ステップS24)。カウント値に基づいて、マクロブロックm14に対して省略モードの適用を許可するか否かが判定される(ステップS25,S26)。   The omitted mode permission unit 112 refers to the macroblock information corresponding to the identified position-corresponding MB, and counts intra-coded position-corresponding MBs (step S24). Based on the count value, it is determined whether or not to apply the omission mode to the macroblock m14 (steps S25 and S26).

{3.3.パターンCにおける周辺MB及び参照MBの特定}
パターンCは、MPEG2画像データがインターレース走査に対応し、かつ基準ペアがMBAFFで符号化される場合に適用される。
{3.3. Identification of neighboring MB and reference MB in pattern C}
Pattern C is applied when MPEG2 image data corresponds to interlaced scanning and the reference pair is encoded by MBAFF.

パターンCにおける周辺MB及び位置対応MBの特定は、パターンBと同様である。パターンCでは、イントラ符号化された位置対応MBのカウント方法が、パターンA,Bと異なる。これは、MPEG2におけるフィールド符号化と、H.264におけるマクロブロックペア単位でのフィールド符号化とではマクロブロックに対するフィールド種別の割り当てが異なるためである。以下、詳しく説明する。   The specification of the peripheral MB and the position correspondence MB in the pattern C is the same as that in the pattern B. In pattern C, the method of counting intra-coded position-corresponding MBs is different from patterns A and B. This is because of field coding in MPEG2 and H.264. This is because the assignment of field types to macroblocks is different from field coding in units of macroblock pairs in H.264. This will be described in detail below.

図9は、マクロブロックm4,m5のフィールド区分と、MPEG2画像データのマクロブロックm4i,m5iのフィールド区分を示す図である。マクロブロックm4は、周辺MBとして特定されている。マクロブロックm4,m5は、マクロブロックペアP21を構成する。マクロブロックm4i,m5iは、マクロブロックm4,m5の位置に対応する。マクロブロックm4iは、周辺MBとして特定されたマクロブロックm4の位置対応MBである。マクロブロックm4i,m5iは、MPEG2で符号化されているためマクロブロックペアを構成しない。   FIG. 9 is a diagram showing field divisions of macro blocks m4 and m5 and field divisions of macro blocks m4i and m5i of MPEG2 image data. The macro block m4 is specified as a peripheral MB. The macro blocks m4 and m5 constitute a macro block pair P21. Macroblocks m4i and m5i correspond to the positions of macroblocks m4 and m5. The macro block m4i is an MB corresponding to the position of the macro block m4 identified as the peripheral MB. Since the macro blocks m4i and m5i are encoded in MPEG2, they do not constitute a macro block pair.

マクロブロックm4は、マクロブロックペアP21の上側に位置するため、Topフィールドとして符号化される。マクロブロックm5は、マクロブロックペアP21の下側に位置するため、Bottomフィールドとして符号化される。一方、MPEG2では、マクロブロックm4i,m5iの上側の8ラインがTopフィールドとして符号化される。下側の8ラインがBottomフィールドとして符号化される。   Since the macro block m4 is located above the macro block pair P21, it is encoded as a Top field. Since the macro block m5 is located below the macro block pair P21, it is encoded as a Bottom field. On the other hand, in MPEG2, the upper eight lines of the macro blocks m4i and m5i are encoded as a Top field. The lower 8 lines are encoded as a Bottom field.

つまり、パターンCでは、同じ位置にあるマクロブロックm4とマクロブロックm4iとは、同じ位置にあるにも関わらず、フィールド種別が一致しない。マクロブロックm4と、マクロブロックm4i,m5iの上側の8ラインとが対応関係にある。このため、省略モード許可部112は、マクロブロックm4i,m5iのうちいずれか一つがイントラ符号化されていれば、位置対応MB(マクロブロックm4i)がイントラ符号化されていると判定する。一方、マクロブロックm4i,m5iの両者がインター符号化されていれば、位置対応MBは、インター符号化されていると判定される。省略モード許可部112は、マクロブロックm4i,m5iの両者がイントラ符号化されていれば、位置対応MB(マクロブロックm4i)がイントラ符号化されていると判定してもよい。   That is, in the pattern C, the macroblock m4 and the macroblock m4i at the same position do not match the field types even though they are at the same position. The macro block m4 and the upper eight lines of the macro blocks m4i and m5i are in a correspondence relationship. For this reason, if any one of the macro blocks m4i and m5i is intra-coded, the omitted mode permission unit 112 determines that the position-corresponding MB (macro block m4i) is intra-coded. On the other hand, if both macroblocks m4i and m5i are inter-coded, it is determined that the position-corresponding MB is inter-coded. The omitted mode permission unit 112 may determine that the position-corresponding MB (macroblock m4i) is intra-coded if both the macroblocks m4i and m5i are intra-coded.

省略モード許可部112は、イントラ符号化された位置対応MBのカウント値に基づいて、符号化対象MBに対する省略モードの可否を判定する(ステップS25,S26)。   The omission mode permission unit 112 determines whether or not the omission mode is permitted for the encoding target MB based on the count value of the intra-corresponding position-corresponding MB (steps S25 and S26).

このように、本実施の形態に係る画像変換装置100は、符号化対象MBに対する省略モードの適用の可否を、イントラ符号化されている位置対応MBの数に基づいて判断する。符号化対象MBの周囲の動きの大きさをMPEG2画像データから判断することにより、第1の実施の形態と比べて、多くのマクロブロックを周辺MBとして特定することができる。したがって、適用モードを許可するか否かの判断の精度を向上することができる。   As described above, the image conversion apparatus 100 according to the present embodiment determines whether or not the omission mode can be applied to the encoding target MB based on the number of position-corresponding MBs that are intra-coded. By determining the magnitude of motion around the encoding target MB from the MPEG2 image data, more macroblocks can be identified as peripheral MBs than in the first embodiment. Therefore, it is possible to improve the accuracy of determining whether to permit the application mode.

[第3の実施の形態]
図10は、第3の実施の形態に係る画像変換装置200の機能的構成を示すブロック図である。画像変換装置200において、マクロブロック種別決定部11は、平均値算出部113を新たに備える。平均値算出部113は、位置対応MBの動きベクトルのベクトル平均を算出する。省略モード許可部112は、算出されたベクトル平均に基づいて、符号化対象MBに対する省略モードの適用の可否を判定する。以下、上記第1の実施の形態及び上記第2の実施の形態と異なる点を中心に説明する。
[Third Embodiment]
FIG. 10 is a block diagram illustrating a functional configuration of an image conversion apparatus 200 according to the third embodiment. In the image conversion apparatus 200, the macroblock type determination unit 11 newly includes an average value calculation unit 113. The average value calculation unit 113 calculates the vector average of the motion vectors of the position corresponding MB. The omitted mode permission unit 112 determines whether or not the omitted mode is applicable to the encoding target MB based on the calculated vector average. The following description will focus on differences from the first embodiment and the second embodiment.

図6を参照して、符号化対象MBに対する省略モードの適用の可否を判定する流れを説明する。符号化対象MBの特定(ステップS21、図6参照)は、上記第2の実施の形態と同様である。周辺MB及び位置対応MBの決定(ステップS22)は、基本的には、上記第2の実施で説明したパターンA〜パターンCのいずれかに基づいて決定される。   With reference to FIG. 6, the flow of determining whether or not the omission mode can be applied to the encoding target MB will be described. Specifying the encoding target MB (see step S21, FIG. 6) is the same as in the second embodiment. The determination of the peripheral MB and the position-corresponding MB (step S22) is basically determined based on one of the patterns A to C described in the second embodiment.

しかし、画像変換の条件がパターンCに該当する場合において、周辺MBの特定基準が、上記第2の実施の形態と異なることがある。具体的には、MPEG2画像データがインターレース走査に対応し、非圧縮画像データがMBAFFで符号化され、かつ基準ペアがフィールド符号化される場合である。以下、詳しく説明する。   However, when the image conversion condition corresponds to the pattern C, the specific criterion for the surrounding MB may be different from that in the second embodiment. Specifically, MPEG2 image data corresponds to interlace scanning, uncompressed image data is encoded by MBAFF, and a reference pair is field-encoded. This will be described in detail below.

図11は、本実施の形態において、パターンCが適用され、基準ペアがフィールド符号化される場合における符号化対象MBと周辺MBとの位置関係を示す図である。図8と同様に、マクロブロックペアP21〜P24が構成されている。マクロブロックm4,m10,m14,m16がTopフィールドである。マクロブロックm5,m11,m15,m17がBottomフィールドである。   FIG. 11 is a diagram showing the positional relationship between the encoding target MB and the peripheral MB when the pattern C is applied and the reference pair is field-encoded in the present embodiment. As in FIG. 8, macroblock pairs P21 to P24 are configured. Macro blocks m4, m10, m14, and m16 are Top fields. Macro blocks m5, m11, m15, and m17 are Bottom fields.

周辺ブロック特定部111は、以下に示す(C1)、(C2)のいずれかの基準に該当するマクロブロックを周辺MBとして特定する。
(C1)基準ペアと異なり、フレーム符号化されるマクロブロックペアを構成するマクロブロック。
(C2)基準ペアと異なり、フィールド符号化されるマクロブロックペアを構成する二つのマクロブロック。
The peripheral block specifying unit 111 specifies a macroblock corresponding to one of the following criteria (C1) and (C2) as a peripheral MB.
(C1) Unlike the reference pair, a macroblock constituting a macroblock pair to be frame-encoded.
(C2) Two macroblocks constituting a macroblock pair to be field-encoded unlike the reference pair.

基準(C1)は、上記第2の実施の形態に係る基準(B1)と同じである。図11に示すように、周辺ブロック特定部111は、基準(C1)を満たし、かつ符号化対象MB(マクロブロックm14)に直接隣接するマクロブロックm3,m7,m12,m13を周辺MBとして特定する。基準(C1)では、フレーム符号化されるマクロブロックペアを構成する二つのマクロブロック(たとえば、マクロブロックm3,m4)を同時に周辺MBとして特定しなくてもよい。   The reference (C1) is the same as the reference (B1) according to the second embodiment. As illustrated in FIG. 11, the neighboring block specifying unit 111 specifies macroblocks m3, m7, m12, and m13 that satisfy the criterion (C1) and are directly adjacent to the encoding target MB (macroblock m14) as neighboring MBs. . In the reference (C1), two macroblocks (for example, macroblocks m3 and m4) constituting a macroblock pair to be frame-encoded may not be simultaneously specified as neighboring MBs.

基準(C2)は、上記第2の実施の形態の基準(B2)の条件と異なり、符号化対象MBのフィールド種別が考慮されない。つまり、符号化対象MBのフィールド種別に関係なく、マクロブロックペアを構成する二つのマクロブロックが、周辺MBとして特定される。図11に示すように、周辺ブロック特定部111は、基準(C2)を満たすマクロブロックとして、基準ペア(マクロブロックペアP23)に直接隣接するマクロブロックペアP21,P22からマクロブロックm4,m5,m16,m17を抽出する。この結果、マクロブロックm3〜m5,m7,m12,m13,m16〜17が、マクロブロックm14の周辺MBとして特定される。これらのマクロブロックに対応するMPEG2画像データのマクロブロックが、位置対応MBとして特定される。   The criterion (C2) is different from the condition of the criterion (B2) of the second embodiment, and the field type of the encoding target MB is not considered. That is, two macroblocks constituting a macroblock pair are specified as neighboring MBs regardless of the field type of the encoding target MB. As illustrated in FIG. 11, the neighboring block specifying unit 111 performs macroblocks m4, m5, and m16 from macroblock pairs P21 and P22 that are directly adjacent to the reference pair (macroblock pair P23) as macroblocks that satisfy the reference (C2). , M17 are extracted. As a result, the macroblocks m3 to m5, m7, m12, m13, and m16 to 17 are specified as peripheral MBs of the macroblock m14. Macroblocks of MPEG2 image data corresponding to these macroblocks are specified as position corresponding MBs.

周辺ブロック特定部111は、基準(C1)を満たし、符号化対象MB(マクロブロックm14)に直接隣接しないマクロブロックm2,m24などを周辺MBとして特定してもよい。周辺ブロック特定部111は、基準(C2)を満たし、基準ペア(マクロブロックペアP23)に直接隣接しないマクロブロックm10を周辺MBとして特定してもよい。パターンAと同様に、マクロブロックm14に対応するMPEG2画像データのマクロブロックが、位置対応MBとして特定されてもよい。   The peripheral block specifying unit 111 may specify macroblocks m2 and m24 that satisfy the criterion (C1) and are not directly adjacent to the encoding target MB (macroblock m14) as the peripheral MB. The peripheral block specifying unit 111 may specify a macroblock m10 that satisfies the criterion (C2) and is not directly adjacent to the reference pair (macroblock pair P23) as a peripheral MB. Similarly to the pattern A, the macro block of the MPEG2 image data corresponding to the macro block m14 may be specified as the position corresponding MB.

再び、図6を参照する。ステップS22において周辺MB及び位置対応MBを特定した後、マクロブロック種別決定部11は、位置対応MBのマクロブロック情報をマクロブロック情報取得部31から取得する(ステップS23)。マクロブロック情報は、位置対応MBの動きベクトル情報を含む。   Reference is again made to FIG. After identifying the peripheral MB and the position-corresponding MB in step S22, the macroblock type determining unit 11 acquires macroblock information of the position-corresponding MB from the macroblock information acquiring unit 31 (step S23). The macroblock information includes the motion vector information of the position corresponding MB.

ステップS24における処理に代えて、平均値算出部113が、位置対応MBの動きベクトル情報を用いて、位置対応MBの動きベクトルのベクトル平均を算出する。ベクトル平均は、位置対応MBの動きベクトルの総和を周辺MBの数で割ることにより算出される。   Instead of the processing in step S24, the average value calculation unit 113 calculates the vector average of the motion vectors of the position corresponding MB using the motion vector information of the position corresponding MB. The vector average is calculated by dividing the sum of motion vectors of position-corresponding MBs by the number of neighboring MBs.

省略モード許可部112は、ステップS25における処理に代えて、ベクトル平均の大きさが所定値以上であるか否かを確認する。ベクトル平均の大きさが所定値よりも小さければ、省略モード許可部112は、符号化対象MBに対する省略モードの適用を許可する(ステップS26)。ベクトル平均の大きさが所定値以上であれば、省略モード許可部112は、符号化対象MBに対する省略モードの適用を許可しない。   The omitted mode permission unit 112 checks whether or not the magnitude of the vector average is equal to or greater than a predetermined value instead of the process in step S25. If the size of the vector average is smaller than the predetermined value, the omission mode permission unit 112 permits application of the omission mode to the encoding target MB (step S26). If the magnitude of the vector average is greater than or equal to a predetermined value, the omission mode permission unit 112 does not permit application of the omission mode to the encoding target MB.

このように、本実施の形態では、位置対応MBの動きベクトルのベクトル平均に基づいて、符号化対象MBに対する省略モードの適用の可否が判定される。位置対応MBの動きベクトルに基づいて符号化対象MBの周辺領域の画像の動きを推測することにより、動きの大きい場面での省略モードの適用を確実に禁止することができる。このため、主観画質の低下を防ぐことが可能となる。   Thus, in this embodiment, whether or not the omission mode is applicable to the encoding target MB is determined based on the vector average of the motion vectors of the position-corresponding MB. By estimating the motion of the image in the peripheral area of the encoding target MB based on the motion vector of the position-corresponding MB, it is possible to reliably prohibit the application of the abbreviated mode in scenes with large motion. For this reason, it is possible to prevent deterioration in subjective image quality.

第3の実施の形態では、平均値算出部113が、動きベクトルの平均としてベクトル平均を算出する例について説明した。しかし、平均値算出部113は、動きベクトルの平均として、動きベクトルのスカラー平均を算出してもよい。この場合、スカラー平均が所定値以下であれば、省略モード許可部11は、符号化対象MBに対して省略モードの適用を許可すればよい。   In the third embodiment, the example in which the average value calculation unit 113 calculates the vector average as the average of the motion vectors has been described. However, the average value calculation unit 113 may calculate a scalar average of motion vectors as the average of motion vectors. In this case, if the scalar average is equal to or smaller than the predetermined value, the abbreviated mode permission unit 11 may permit the application of the abbreviated mode to the encoding target MB.

平均値算出部113は、動きベクトルの平均として、動きベクトルの角度のばらつきを算出してもよい。角度のばらつきとは、複数の動きベクトルからベクトルを一つ選択し、選択されたベクトルと他の動きベクトルとの角度の差を平均した値である。省略モード許可部112は、角度のばらつきが所定値以下であれば、符号化対象MBに対して省略モードの適用を許可すればよい。   The average value calculation unit 113 may calculate the variation in the angle of the motion vector as the average of the motion vectors. The variation in angle is a value obtained by selecting one vector from a plurality of motion vectors and averaging the difference in angle between the selected vector and another motion vector. The omission mode permission unit 112 may permit application of the omission mode to the encoding target MB if the variation in angle is equal to or less than a predetermined value.

第3の実施の形態では、動きベクトルのベクトル平均に基づいて符号化対象MBに対する省略モードの適用の可否を判定した。しかし、省略モード許可部112は、位置対応MBの動きベクトルの中に零ベクトルが存在しない場合に、符号化対象MBに対する省略モードの適用を許可してもよい。あるいは、動きベクトルの中に存在する零ベクトルの数が所定数以下である場合に、符号化対象MBに対する省略モードの適用を許可してもよい。   In the third embodiment, the applicability of the omission mode to the encoding target MB is determined based on the vector average of motion vectors. However, the omission mode permission unit 112 may permit the application of the omission mode to the encoding target MB when there is no zero vector among the motion vectors of the position corresponding MB. Alternatively, when the number of zero vectors present in the motion vector is equal to or smaller than a predetermined number, application of the abbreviated mode to the encoding target MB may be permitted.

1、3 画像符号化装置
2 画像復号化装置
11 マクロブロック種別決定部
12 符号化部
31 マクロブロック情報取得部
100,200 画像変換装置
111 周辺ブロック特定部
112 省略モード許可部
113 平均値算出部
1, 3 Image encoding device 2 Image decoding device 11 Macroblock type determination unit 12 Encoding unit 31 Macroblock information acquisition unit 100, 200 Image conversion device 111 Peripheral block specifying unit 112 Omission mode permission unit 113 Average value calculation unit

Claims (13)

非圧縮画像データを複数のブロックに分割し、各ブロックに対して適用するブロック種別を決定するブロック種別決定部と、
決定されたブロック種別に基づいて各ブロックを符号化する符号化部と、
を備え、
前記ブロック種別決定部は、
符号化対象ブロックと、前記符号化部により既に符号化され前記符号化対象ブロックの周辺に位置する周辺ブロックとを前記複数のブロックから特定するブロック特定部と、
前記符号化対象ブロックの一部の情報の符号化が省略された省略モードを前記符号化対象ブロックのブロック種別として適用するか否かを、前記周辺ブロックの符号化に関するブロック情報に基づいて判定する省略モード許可部と、
を備え
前記省略モード許可部は、
イントラ符号化された前記周辺ブロックの数が所定数より小さければ、前記符号化対象ブロックのブロック種別として前記省略モードの適用を許可することを特徴とする画像符号化装置。
A block type determining unit that divides uncompressed image data into a plurality of blocks and determines a block type to be applied to each block;
An encoding unit that encodes each block based on the determined block type;
With
The block type determination unit
A block identification unit that identifies, from the plurality of blocks, an encoding target block and a peripheral block that is already encoded by the encoding unit and is positioned around the encoding target block;
It is determined based on block information related to encoding of the neighboring blocks whether or not to apply an abbreviated mode in which encoding of a part of information of the encoding target block is omitted as a block type of the encoding target block. An abbreviated mode permission section;
Equipped with a,
The abbreviation mode permission unit
The image coding apparatus according to claim 1, wherein if the number of intra-encoded peripheral blocks is smaller than a predetermined number, application of the abbreviated mode is permitted as a block type of the block to be encoded.
請求項1に記載の画像符号化装置において、
前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレース走査に対応させて符号化し、
前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフレーム符号化されるブロックペアを構成するブロックを前記周辺ブロックとして特定することを特徴とする画像符号化装置。
The image encoding device according to claim 1 ,
The encoding unit encodes uncompressed image data in correspondence with interlaced scanning in units of block pairs composed of two blocks adjacent to each other in the vertical direction,
When the reference pair which is a block pair including the encoding target block is field-encoded, the block specifying unit is different from the reference pair and a block constituting a frame-encoded block pair is used as the peripheral block. An image encoding device characterized by specifying.
請求項1に記載の画像符号化装置において、
前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレースに対応させて符号化し、
前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフィールド符号化される第1ブロックペアを選択し、前記第1ブロックペアを構成する二つのブロックのうち前記符号化対象ブロックとフィールド種別が一致するブロックを前記周辺ブロックとして特定することを特徴とする画像符号化装置。
The image encoding device according to claim 1 ,
The encoding unit encodes uncompressed image data corresponding to an interlace in units of a block pair constituted by two blocks adjacent to each other in the vertical direction,
The block specifying unit selects a first block pair that is different from the reference pair and is field-encoded when a reference pair that is a block pair including the encoding target block is field-encoded, and An image coding apparatus characterized by specifying, as the peripheral block, a block whose field type matches the coding target block among two blocks constituting a block pair.
請求項1ないし請求項のいずれか記載の画像符号化装置において、
前記省略モードは、
前記符号化対象ブロックの動き情報及び画素情報の符号化が省略されたスキップモード、
を含むことを特徴とする画像符号化装置。
The image encoding device according to any one of claims 1 to 3 ,
The abbreviated mode is
Skip mode in which encoding of motion information and pixel information of the encoding target block is omitted,
An image encoding device comprising:
請求項1ないし請求項のいずれかに記載の画像符号化装置において、
前記省略モードは、
前記符号化対象ブロックの動き情報の符号化が省略されたダイレクトモード、
を含むことを特徴とする画像符号化装置。
The image encoding device according to any one of claims 1 to 3 ,
The abbreviated mode is
Direct mode in which encoding of motion information of the encoding target block is omitted,
An image encoding device comprising:
請求項1ないし請求項のいずれかに記載の画像符号化装置において、
前記符号化対象ブロックは、複数のサブブロックにより構成され、
前記省略モードは、
各サブブロックの動き情報の符号化が省略されたモード、
を含むことを特徴とする画像符号化装置。
The image encoding device according to any one of claims 1 to 5 ,
The encoding target block is composed of a plurality of sub-blocks,
The abbreviated mode is
A mode in which encoding of motion information of each sub-block is omitted,
An image encoding device comprising:
第1符号化画像データを復号化して非圧縮画像データを生成する画像復号化装置と、
非圧縮画像データを符号化して第2符号化画像データを生成する画像符号化装置と、
前記第1符号化画像データを構成する複数の第1符号化ブロックの符号化に関するブロック情報を取得するブロック情報取得装置と、
を備え、
前記画像符号化装置は、
前記非圧縮画像データを複数のブロックに分割し、各ブロックに対して適用するブロック種別を決定する種別決定部と、
決定されたブロック種別に基づいて各ブロックを符号化する符号化部と、
を備え、
前記符号化部は、
符号化対象ブロックと、前記符号化対象ブロックの周辺に位置する周辺ブロックとを前記複数のブロックから特定し、前記周辺ブロックに対応する位置対応ブロックを前記複数の第1符号化ブロックから特定するブロック特定部と、
前記符号化対象ブロックの一部の情報の符号化が省略された省略モードを、前記符号化対象ブロックのブロック種別として許可するか否かを、前記位置対応ブロックのブロック情報に基づいて判定する省略モード許可部と、
を含み、
前記省略モード許可部は、
前記位置対応ブロックに含まれ、かつイントラ符号化された第1符号化ブロックの数が所定数より小さければ、前記符号化対象ブロックのブロック種別として前記省略モードを許可することを特徴とする画像変換装置。
An image decoding device that decodes the first encoded image data to generate uncompressed image data;
An image encoding device that encodes uncompressed image data to generate second encoded image data;
A block information acquisition device for acquiring block information relating to encoding of a plurality of first encoded blocks constituting the first encoded image data;
With
The image encoding device includes:
A type determining unit that divides the uncompressed image data into a plurality of blocks and determines a block type to be applied to each block;
An encoding unit that encodes each block based on the determined block type;
With
The encoding unit includes:
A block that specifies an encoding target block and peripheral blocks located around the encoding target block from the plurality of blocks, and specifies a position corresponding block corresponding to the peripheral block from the plurality of first encoding blocks. A specific part,
Omission to determine based on block information of the position-corresponding block whether or not to permit an abbreviated mode in which encoding of a part of information of the encoding target block is omitted as a block type of the encoding target block A mode permission section;
Only including,
The abbreviation mode permission unit
The image conversion characterized by permitting the abbreviated mode as a block type of the block to be encoded if the number of first encoded blocks included in the position corresponding block and intra-encoded is smaller than a predetermined number. apparatus.
請求項に記載の画像変換装置において、
前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレースに対応させて符号化し、
前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフレーム符号化されるブロックペアを構成するブロックを前記周辺ブロックとして特定することを特徴とする画像変換装置。
The image conversion device according to claim 7 ,
The encoding unit encodes uncompressed image data corresponding to an interlace in units of a block pair constituted by two blocks adjacent to each other in the vertical direction,
When the reference pair which is a block pair including the encoding target block is field-encoded, the block specifying unit is different from the reference pair and a block constituting a frame-encoded block pair is used as the peripheral block. An image conversion device characterized by specifying.
請求項に記載の画像変換装置において、
前記符号化部は、上下方向に互いに隣接する二つのブロックにより構成されるブロックペア単位で、非圧縮画像データをインターレースに対応させて符号化し、
前記ブロック特定部は、前記符号化対象ブロックを含むブロックペアである基準ペアがフィールド符号化される場合、前記基準ペアと異なり、かつフィールド符号化される第1ブロックペアを選択し、前記第1ブロックペアを構成する二つのブロックのうち前記符号化対象ブロックとフィールド種別が一致するブロックを前記周辺ブロックとして特定することを特徴とする画像変換装置。
The image conversion device according to claim 7 ,
The encoding unit encodes uncompressed image data corresponding to an interlace in units of a block pair constituted by two blocks adjacent to each other in the vertical direction,
The block specifying unit selects a first block pair that is different from the reference pair and is field-encoded when a reference pair that is a block pair including the encoding target block is field-encoded, and An image conversion apparatus that identifies a block whose field type matches the encoding target block among the two blocks constituting a block pair as the peripheral block.
請求項に記載の画像変換装置において、
前記ブロック特定部は、
前記位置対応ブロックがフィールド符号化され、かつ第1フィールド及び第2フィールドを含む場合、前記第1ブロックペアを構成する二つのブロックに対応し、かつ前記位置対応ブロックを含む二つの第1符号化ブロックを特定し、
前記省略モード許可部は、
前記二つの第1符号化ブロックのうち少なくとも一つがイントラ符号化されていれば、前記位置対応ブロックがイントラ符号化されていると判定することを特徴とする画像変換装置。
The image conversion apparatus according to claim 9 , wherein
The block specifying unit is
If the position-corresponding block is field-encoded and includes a first field and a second field, two first encodings corresponding to two blocks constituting the first block pair and including the position-corresponding block Identify the block,
The abbreviation mode permission unit
The image conversion apparatus according to claim 1, wherein if at least one of the two first encoded blocks is intra-encoded, the position corresponding block is determined to be intra-encoded.
請求項ないし請求項10のいずれかに記載の画像変換装置において、
前記省略モードは、
前記符号化対象ブロックの動き情報及び画素情報の符号化が省略されたスキップモード、を含むことを特徴とする画像変換装置。
In the image conversion apparatus according to any one of claims 7 to 10,
The abbreviated mode is
An image conversion apparatus comprising: a skip mode in which encoding of motion information and pixel information of the encoding target block is omitted.
請求項ないし請求項10のいずれかに記載の画像変換装置において、
前記省略モードは、
前記符号化対象ブロックの動き情報の符号化が省略されたダイレクトモード、
を含むことを特徴とする画像変換装置。
In the image conversion apparatus according to any one of claims 7 to 10,
The abbreviated mode is
Direct mode in which encoding of motion information of the encoding target block is omitted,
An image conversion apparatus comprising:
請求項ないし請求項10のいずれかに記載の画像変換装置において、
前記符号化対象ブロックは、複数のサブブロックにより構成され、
前記省略モードは、
各サブブロックの動き情報の符号化が省略されたモード、
を含むことを特徴とする画像変換装置。
In the image conversion apparatus according to any one of claims 7 to 10,
The encoding target block is composed of a plurality of sub-blocks,
The abbreviated mode is
A mode in which encoding of motion information of each sub-block is omitted,
An image conversion apparatus comprising:
JP2010010133A 2010-01-20 2010-01-20 Image coding apparatus and image conversion apparatus Expired - Fee Related JP5341786B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010010133A JP5341786B2 (en) 2010-01-20 2010-01-20 Image coding apparatus and image conversion apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010010133A JP5341786B2 (en) 2010-01-20 2010-01-20 Image coding apparatus and image conversion apparatus

Publications (2)

Publication Number Publication Date
JP2011151546A JP2011151546A (en) 2011-08-04
JP5341786B2 true JP5341786B2 (en) 2013-11-13

Family

ID=44538154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010010133A Expired - Fee Related JP5341786B2 (en) 2010-01-20 2010-01-20 Image coding apparatus and image conversion apparatus

Country Status (1)

Country Link
JP (1) JP5341786B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10652570B2 (en) 2016-01-15 2020-05-12 Nec Corporation Moving image encoding device, moving image encoding method, and recording medium for recording moving image encoding program
CN110971903A (en) * 2019-10-17 2020-04-07 西安万像电子科技有限公司 Coding method, device and system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
PT1449385E (en) * 2001-11-21 2015-10-15 Google Technology Holdings LLC Macroblock level adaptive frame/field coding for digital video content
JP3884472B2 (en) * 2002-11-01 2007-02-21 松下電器産業株式会社 Video encoding method and video decoding method
JP2005341545A (en) * 2004-04-28 2005-12-08 Matsushita Electric Ind Co Ltd Moving image coding method,device, and program, and moving image decoding method,device, and program
JP2005348093A (en) * 2004-06-03 2005-12-15 Sony Corp Image processor, program and method thereof
JP2007201558A (en) * 2006-01-23 2007-08-09 Matsushita Electric Ind Co Ltd Moving picture coding apparatus and moving picture coding method
JP2007251815A (en) * 2006-03-17 2007-09-27 Pioneer Electronic Corp Re-encoding apparatus, and program for re-encoding
JP4520442B2 (en) * 2006-09-06 2010-08-04 日本電信電話株式会社 Moving image re-encoding method, moving image re-encoding device, and moving image re-encoding program
JP4688170B2 (en) * 2007-01-26 2011-05-25 株式会社Kddi研究所 Video encoding device
JP4709187B2 (en) * 2007-07-10 2011-06-22 日本電信電話株式会社 ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM

Also Published As

Publication number Publication date
JP2011151546A (en) 2011-08-04

Similar Documents

Publication Publication Date Title
US20240031610A1 (en) Image processing device and image processing method
JP5021507B2 (en) Method and apparatus for improved coding mode selection
US8630347B2 (en) Video decoding apparatus and video decoding method
JP4324844B2 (en) Image decoding apparatus and image decoding method
TWI528789B (en) Image processing apparatus and method
EP1879388B1 (en) Video information recording device, video information recording method, video information recording program, and recording medium containing the video information recording program
MXPA06002525A (en) Coding and decoding for interlaced video.
US20070098071A1 (en) Picture coding device, method, and program thereof
JP2004328634A (en) Image decoding apparatus and method
EP2077670A1 (en) Transcoder, transcoding method, decoder, and decoding method
JP2005510984A5 (en)
JP5155159B2 (en) Video decoding device
JP5341786B2 (en) Image coding apparatus and image conversion apparatus
JP3818819B2 (en) Image coding method conversion apparatus, image coding method conversion method, and recording medium
WO2013125171A1 (en) Intra-prediction mode determination device, method, and program recording medium
JP2008109642A (en) Video decoding apparatus and method
JP2009081781A (en) Motion compensating apparatus and motion compensating method
JP2006295734A (en) Re-encoding apparatus, re-encoding method, and re-encoding program
JP5147546B2 (en) Video encoding device and video decoding device
JP5520718B2 (en) Image converter
JP4429516B2 (en) Image encoding device
JP5272940B2 (en) Image encoding device
JP5195250B2 (en) Image display system and image display apparatus
JP2010011185A (en) Moving image decoding apparatus and moving image decoding method
JP2009232370A (en) Moving image decoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121225

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130507

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130704

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130730

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130808

R150 Certificate of patent or registration of utility model

Ref document number: 5341786

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees