JP2009177357A - Encoder and encoding method - Google Patents

Encoder and encoding method Download PDF

Info

Publication number
JP2009177357A
JP2009177357A JP2008011941A JP2008011941A JP2009177357A JP 2009177357 A JP2009177357 A JP 2009177357A JP 2008011941 A JP2008011941 A JP 2008011941A JP 2008011941 A JP2008011941 A JP 2008011941A JP 2009177357 A JP2009177357 A JP 2009177357A
Authority
JP
Japan
Prior art keywords
prediction mode
prediction
difference value
encoding
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008011941A
Other languages
Japanese (ja)
Inventor
Jun Otsuki
純 大槻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2008011941A priority Critical patent/JP2009177357A/en
Publication of JP2009177357A publication Critical patent/JP2009177357A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce an operation amount for selecting a prediction mode in intra prediction. <P>SOLUTION: First, a SAD is calculated for the prediction mode 0 in which a prediction direction is a vertical direction, and the prediction mode 1 in which the prediction direction is a horizontal direction. Then, a SAD of the prediction mode in the prediction direction to be close to the prediction direction of the smaller SAD is calculated, and the sizes of the SADs are compared. By narrowing the prediction direction by repeating such processing and determining the prediction mode, the operation amount for selecting the prediction mode is reduced. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は符号化装置、符号化方法、プログラム及び記録媒体に関し、特に、H.264方式のイントラ予測に用いて好適な技術に関する。   The present invention relates to an encoding device, an encoding method, a program, and a recording medium. The present invention relates to a technique suitable for use in H.264 intra prediction.

静止画像データと比較して膨大なデータ量である動画像データを符号化するために、MPEG−2(Moving Picture Experts Group phase 2)方式などの符号化方式が確立されている。これらの符号化方式を用いて動画像データを記録可能なデジタルカメラやデジタルビデオカメラなどの撮像装置が、各メーカーより数多く製品化されている。   In order to encode moving image data having a huge amount of data compared to still image data, an encoding method such as MPEG-2 (Moving Picture Experts Group phase 2) method has been established. Many imaging devices such as digital cameras and digital video cameras capable of recording moving image data using these encoding methods have been commercialized by manufacturers.

近年、従来のSD(Standard Definition)画像と比較して、より高画質なHD(High Definition)画像やフルHD画像といったより大きい画像サイズの動画像データを記録できる製品が各メーカーより製品化されている。このように、画像サイズの拡大により、データ量は増加してしまう。   In recent years, manufacturers have commercialized products that can record moving image data of larger image sizes such as higher definition (HD) images and full HD images compared to conventional SD (Standard Definition) images. Yes. Thus, the amount of data increases due to the enlargement of the image size.

そこで、ITU−T(国際電気通信連合 電気通信標準化部門)とISO(国際標準化機構)とによりH.264/MPEG−4 part10(以下、H.264と称す)という符号化方式が標準化された。H.264方式は、従来のMPEG−2方式などの符号化方式よりもさらなる高圧縮を実現することができる。このH.264方式の演算処理の構成については、例えば、特許文献1に開示されている。   Therefore, ITU-T (International Telecommunication Union Telecommunication Standardization Sector) and ISO (International Organization for Standardization) An encoding method called H.264 / MPEG-4 part 10 (hereinafter referred to as H.264) has been standardized. H. The H.264 system can achieve higher compression than the conventional encoding system such as the MPEG-2 system. This H. For example, Patent Document 1 discloses the configuration of the H.264 arithmetic processing.

特開2004−56827号公報JP 2004-56827 A

H.264方式においては、画面(フレーム)内の符号化済みの画素値を用いて、同一画面内の画素値を予測することにより圧縮効率を向上させるイントラ予測という予測方式が規定されている。H.264方式のイントラ予測においては、16×16画素ブロック単位、8×8画素ブロック単位及び4×4画素ブロック単位から、符号化処理を行うための予測画像を生成する画素ブロック単位を選択できる。   H. In the H.264 method, a prediction method called intra prediction that improves compression efficiency by predicting pixel values in the same screen using encoded pixel values in the screen (frame) is defined. H. In the H.264 intra prediction, a pixel block unit for generating a prediction image for performing an encoding process can be selected from a 16 × 16 pixel block unit, an 8 × 8 pixel block unit, and a 4 × 4 pixel block unit.

さらに、H.264方式では、画素ブロック単位ごとに複数の予測モードが規定されている。入力画像に応じて、これらの画素ブロック単位及び予測モードを選択的に用いることにより、符号化効率の高い符号化データを生成することができる。例えば、4×4画素ブロック単位で行うイントラ予測においては、それぞれ予測方向の異なる9つの予測モードが規定されている。   In addition, H.C. In the H.264 system, a plurality of prediction modes are defined for each pixel block unit. By selectively using these pixel block units and prediction modes according to the input image, encoded data with high encoding efficiency can be generated. For example, in intra prediction performed in units of 4 × 4 pixel blocks, nine prediction modes having different prediction directions are defined.

ここで予測モードの選択方法としては、全ての予測モードにおいて予測画像生成などの演算を行い、予測モードごとの結果を基に、最適な符号化効率を実現する予測モードを前記9つの予測モードから選択する方法が一般的である。このように、規定された予測モードの全ての予測モードについて一通り演算を行っていた。   Here, as a prediction mode selection method, calculation such as prediction image generation is performed in all prediction modes, and a prediction mode that realizes optimal coding efficiency is selected from the nine prediction modes based on the result for each prediction mode. The method of selection is common. In this way, the calculation is performed for all the prediction modes of the specified prediction mode.

したがって、H.264方式は、MPEG−2方式などの従来の符号化方式と比較して、高圧縮を実現することができる反面、演算量がより多くなってしまう。このため、演算量の増加に伴い、消費電力が多くなるという問題点があった。   Therefore, H.H. The H.264 system can achieve high compression compared to a conventional encoding system such as the MPEG-2 system, but the amount of calculation is larger. For this reason, there has been a problem that the power consumption increases as the amount of calculation increases.

本発明は前述の問題点に鑑み、イントラ予測において予測モードを選択するための演算量を削減できるようにすることを目的としている。   In view of the above-described problems, an object of the present invention is to reduce the amount of calculation for selecting a prediction mode in intra prediction.

本発明の符号化装置は、入力画像を所定のブロックサイズに分割して符号化処理を行う符号化装置であって、前記所定のブロックサイズの符号化対象ブロックに隣接するブロックの画素値を用いて、所定の予測モードにより前記符号化対象ブロックの予測画像を生成する予測画像生成手段と、前記予測画像生成手段によって生成された予測画像と前記符号化対象ブロックとの差分値を算出する差分値算出手段と、2つ以上の予測モードの中から前記差分値算出手段によって算出された差分値が最小となる予測モードを選択する第1の選択手段と、前記第1の選択手段によって選択された予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードの中から、前記差分値算出手段によって算出された差分値が最小となる予測モードを選択して、前記符号化処理を行うための予測モードを決定する第2の選択手段とを備えたことを特徴とする。   An encoding apparatus according to the present invention is an encoding apparatus that performs an encoding process by dividing an input image into a predetermined block size, and uses a pixel value of a block adjacent to an encoding target block having the predetermined block size. A prediction image generation unit that generates a prediction image of the encoding target block in a predetermined prediction mode; and a difference value that calculates a difference value between the prediction image generated by the prediction image generation unit and the encoding target block The calculation means, a first selection means for selecting a prediction mode that minimizes the difference value calculated by the difference value calculation means from two or more prediction modes, and the first selection means selected by the first selection means The difference value calculated by the difference value calculation means is the highest among the two or more prediction modes including the prediction mode in the prediction direction that is close to the prediction direction of the prediction mode. Select the prediction mode become, characterized in that a second selection means for determining a prediction mode for performing the coding process.

本発明の符号化方法は、入力画像を所定のブロックサイズに分割して符号化処理を行う符号化方法であって、前記所定のブロックサイズの符号化対象ブロックに隣接するブロックの画素値を用いて、所定の予測モードにより前記符号化対象ブロックの予測画像を生成する予測画像生成工程と、前記予測画像生成工程において生成した予測画像と前記符号化対象ブロックとの差分値を算出する差分値算出工程と、2つ以上の予測モードの中から前記差分値算出工程において算出した差分値が最小となる予測モードを選択する第1の選択工程と、前記第1の選択工程において選択した予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードの中から、前記差分値算出工程において算出した差分値が最小となる予測モードを選択して、前記符号化処理を行うための予測モードを決定する第2の選択工程とを備えたことを特徴とする。   An encoding method according to the present invention is an encoding method for performing an encoding process by dividing an input image into a predetermined block size, and uses a pixel value of a block adjacent to an encoding target block having the predetermined block size. A prediction image generation step for generating a prediction image of the encoding target block in a predetermined prediction mode, and a difference value calculation for calculating a difference value between the prediction image generated in the prediction image generation step and the encoding target block A first selection step of selecting a prediction mode that minimizes the difference value calculated in the difference value calculation step from among the two or more prediction modes, and the prediction mode selected in the first selection step The difference value calculated in the difference value calculation step is minimized from two or more prediction modes including a prediction mode in a prediction direction that is close to the prediction direction. Select measurement mode, is characterized in that a second selection step of determining a prediction mode for performing the coding process.

本発明のプログラムは、入力画像を所定のブロックサイズに分割して符号化処理を行う符号化方法の各工程をコンピュータに実行させるプログラムであって、前記所定のブロックサイズの符号化対象ブロックに隣接するブロックの画素値を用いて、所定の予測モードにより前記符号化対象ブロックの予測画像を生成する予測画像生成工程と、前記予測画像生成工程において生成した予測画像と前記符号化対象ブロックとの差分値を算出する差分値算出工程と、2つ以上の予測モードの中から前記差分値算出工程において算出した差分値が最小となる予測モードを選択する第1の選択工程と、前記第1の選択工程において選択した予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードの中から、前記差分値算出工程において算出した差分値が最小となる予測モードを選択して、前記符号化処理を行うための予測モードを決定する第2の選択工程とをコンピュータに実行させることを特徴とする。   The program of the present invention is a program that causes a computer to execute each step of an encoding method for performing an encoding process by dividing an input image into a predetermined block size, and is adjacent to an encoding target block having the predetermined block size. A prediction image generation step of generating a prediction image of the encoding target block in a predetermined prediction mode using a pixel value of the block to be performed, and a difference between the prediction image generated in the prediction image generation step and the encoding target block A difference value calculation step of calculating a value, a first selection step of selecting a prediction mode in which the difference value calculated in the difference value calculation step is the minimum from two or more prediction modes, and the first selection The difference between two or more prediction modes including a prediction mode in a prediction direction that is close to the prediction direction of the prediction mode selected in the process. Select the prediction mode difference value calculated in the calculating step is minimized, characterized in that to execute a second selection step of determining a prediction mode for performing the encoding process on the computer.

本発明の記録媒体は、前記に記載のプログラムを記録したことを特徴とする。   The recording medium of the present invention is characterized by recording the program described above.

本発明によれば、差分値が最小となる予測モードを選択し、前記選択した予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードからさらに差分値が最小となる予測モードを選択するようにした。これにより、予測モードの選択で適切な予測方向に絞り込むことができるため、イントラ予測において予測モードを選択するための演算量を削減することができる。したがって、消費電力を低減することができる。   According to the present invention, a prediction mode with a minimum difference value is selected, and a difference value is further calculated from two or more prediction modes including a prediction mode in a prediction direction that is close to the prediction direction of the selected prediction mode. The prediction mode that minimizes was selected. Thereby, since it can narrow down to an appropriate prediction direction by selection of prediction mode, the amount of calculations for selecting a prediction mode in intra prediction can be reduced. Therefore, power consumption can be reduced.

(第1の実施形態)
以下、本発明の好適な実施形態について図面を参照しながら説明する。
図1は、本実施形態における動画像符号化装置の構成例を示すブロック図である。
図1において、差分計算部101は、動画像符号化装置100へ入力された入力画像と、決定予測画像生成部109で生成された予測画像との差分値を算出する。なお、予測画像を生成する方法については後述する。
(First embodiment)
Preferred embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram illustrating a configuration example of a moving image encoding apparatus according to the present embodiment.
In FIG. 1, the difference calculation unit 101 calculates a difference value between the input image input to the video encoding device 100 and the predicted image generated by the determined predicted image generation unit 109. A method for generating a predicted image will be described later.

次に、直交変換/量子化部102は、差分計算部101より出力された、入力画像と予測画像との差分値データを、8×8または4×4画素ブロック単位に整数精度離散コサイン変換及び離散アダマール変換による直交変換処理を行う。そして、直交変換後のデータに対して量子化処理を行い、エントロピー符号化部103に出力する。   Next, the orthogonal transform / quantization unit 102 converts the difference value data between the input image and the prediction image output from the difference calculation unit 101 into an integer precision discrete cosine transform and an 8 × 8 or 4 × 4 pixel block unit. Perform orthogonal transform processing by discrete Hadamard transform. Then, quantization processing is performed on the data after orthogonal transformation, and the data is output to the entropy coding unit 103.

次に、エントロピー符号化部103は、入力された量子化後のデータに対して、エントロピー符号化処理を行い、符号化データを出力する。符号化はCAVLC(Context−based Adaptive Varibale Length Coding)又はCABAC(Context−based Adaptive Binary Arithmetic Coding)などを用いる。   Next, the entropy encoding unit 103 performs entropy encoding processing on the input quantized data and outputs encoded data. The encoding is performed using CAVLC (Context-based Adaptive Variable Length Coding) or CABAC (Context-based Adaptive Binary Asymmetric Coding).

次に、予測画像を生成する処理について説明する。逆量子化/逆直交変換部104は、直交変換/量子化部102より出力された量子化後のデータに対して逆量子化処理、逆直交変換処理を行う。さらに、決定予測画像生成部109より出力される予測画像を加算したデータをデブロッキングフィルタ処理部105及び第1のメモリ106へ出力する。   Next, a process for generating a predicted image will be described. The inverse quantization / inverse orthogonal transformation unit 104 performs inverse quantization processing and inverse orthogonal transformation processing on the quantized data output from the orthogonal transformation / quantization unit 102. Further, the data obtained by adding the predicted images output from the determined predicted image generation unit 109 is output to the deblocking filter processing unit 105 and the first memory 106.

また、デブロッキングフィルタ処理部105は、入力されたデータに対してデブロッキングフィルタ処理を施し、第2のメモリ107へ格納する。すなわち、第1のメモリ106にはデブロッキングフィルタ処理前のデータが格納され、第2のメモリ107にはデブロッキングフィルタ処理後のデータが格納されることとなる。   In addition, the deblocking filter processing unit 105 performs deblocking filter processing on the input data and stores the data in the second memory 107. That is, the data before the deblocking filter process is stored in the first memory 106, and the data after the deblocking filter process is stored in the second memory 107.

次に、予測方法決定部108は、第1のメモリ106及び第2のメモリ107に格納されているデータと入力画像とを用いて、予測画像の予測方法を決定する。画面内予測(イントラ予測)においては、第1のメモリ106に格納されているデブロッキングフィルタ処理前のデータを用いて符号化効率を求める。具体的には、所定のブロックサイズの単位(16×16画素ブロック単位、8×8画素ブロック単位、4×4画素ブロック単位)、さらに所定の予測モードごとに、符号化効率を求める。   Next, the prediction method determination unit 108 determines the prediction method of the prediction image using the data stored in the first memory 106 and the second memory 107 and the input image. In intra-screen prediction (intra prediction), encoding efficiency is obtained using data before deblocking filter processing stored in the first memory 106. Specifically, the encoding efficiency is obtained for each unit of a predetermined block size (16 × 16 pixel block unit, 8 × 8 pixel block unit, 4 × 4 pixel block unit) and for each predetermined prediction mode.

一方、画面間予測(インター予測)については、第2のメモリ107に格納されているデブロッキングフィルタ処理後のデータと入力画像とを用いて、符号化効率を求める。このように、符号化効率の最適となる予測方法を決定する。入力画像がIスライスの場合には、画面内予測のみを採用し、Pスライス及びBスライスの場合には、画面内予測及び画面間予測から最適な符号化効率となる予測方法を選択する。   On the other hand, for inter-screen prediction (inter prediction), the coding efficiency is obtained using the data after the deblocking filter processing stored in the second memory 107 and the input image. In this way, the prediction method that optimizes the encoding efficiency is determined. When the input image is an I slice, only intra prediction is adopted, and when the input image is a P slice and B slice, a prediction method that provides optimum coding efficiency is selected from intra prediction and inter prediction.

以上の処理により、予測方法決定部108は符号化効率の最適な予測方式及び符号化パラメータを決定予測画像生成部109に出力する。決定予測画像生成部109は、予測方法決定部108により決定された予測方法に従って予測画像を生成する。   Through the above processing, the prediction method determination unit 108 outputs the prediction method and the encoding parameter with the optimum encoding efficiency to the determined predicted image generation unit 109. The determined predicted image generation unit 109 generates a predicted image according to the prediction method determined by the prediction method determination unit 108.

次に、図1に示した予測方法決定部108の詳細な構成について、図2を参照しながら詳細を説明する。図2において、予測方法決定部201、第1のメモリ207及び第2のメモリ208はそれぞれ、図1に示した予測方法決定部108、第1のメモリ106及び第2のメモリ107と同一の構成である。   Next, the detailed configuration of the prediction method determination unit 108 illustrated in FIG. 1 will be described in detail with reference to FIG. In FIG. 2, the prediction method determination unit 201, the first memory 207, and the second memory 208 have the same configurations as the prediction method determination unit 108, the first memory 106, and the second memory 107 shown in FIG. It is.

画面内予測モード決定部202において、予測モード選択部203は、所定の画素ブロック単位において、規定された予測モードの中から複数の予測モードを選択する。この時、輝度信号については16×16画素ブロック単位、8×8画素ブロック単位、または4×4画素ブロック単位で行い、色差信号については8×8画素ブロック単位で行う。   In the in-screen prediction mode determination unit 202, the prediction mode selection unit 203 selects a plurality of prediction modes from the specified prediction modes in a predetermined pixel block unit. At this time, the luminance signal is performed in units of 16 × 16 pixel blocks, 8 × 8 pixel blocks, or 4 × 4 pixel blocks, and the color difference signal is performed in units of 8 × 8 pixel blocks.

ここで、規定された予測モードについて説明する。図3は、輝度信号における16×16画素ブロック単位での予測モードを示す図であり、図4は、輝度信号における8×8画素ブロック単位での予測モードを示す図である。また、図5は、輝度信号における4×4画素ブロック単位での予測モードを示す図である。さらに、図6は、色差信号における8×8画素ブロック単位での予測モードを示す図である。   Here, the prescribed prediction mode will be described. FIG. 3 is a diagram illustrating a prediction mode in units of 16 × 16 pixel blocks in the luminance signal, and FIG. 4 is a diagram illustrating a prediction mode in units of 8 × 8 pixel blocks in the luminance signal. FIG. 5 is a diagram showing a prediction mode in units of 4 × 4 pixel blocks in the luminance signal. Further, FIG. 6 is a diagram illustrating a prediction mode in units of 8 × 8 pixel blocks in the color difference signal.

図3〜図6に示すように、輝度信号の8×8画素ブロック単位及び4×4画素ブロック単位については予測モードが9通り規定され、輝度信号の16×16画素ブロック単位及び色差信号の8×8画素ブロック単位については予測モードが4通り規定されている。   As shown in FIGS. 3 to 6, nine prediction modes are defined for the 8 × 8 pixel block unit and the 4 × 4 pixel block unit of the luminance signal, and the 16 × 16 pixel block unit of the luminance signal and the 8 of the color difference signal. For the × 8 pixel block unit, four prediction modes are defined.

次に、予測画像生成部204は、符号化対象ブロックの左、上、右上、左上に位置する隣接ブロックの画素値を第1のメモリ207から読み出し、予測モード選択部203により選択された予測モードごとに、予測画像を生成する。次に、差分値算出部205は、予測画像生成部204にて生成された予測画像と、外部より入力される入力画像との画素値の差分値を算出する。さらに、画素ブロック単位ごとに前記差分値の絶対値の総和(SAD:Sum of Absolute Difference)を算出する。   Next, the prediction image generation unit 204 reads out the pixel values of adjacent blocks located on the left, upper, upper right, and upper left of the encoding target block from the first memory 207, and the prediction mode selected by the prediction mode selection unit 203 A prediction image is generated for each time. Next, the difference value calculation unit 205 calculates a difference value between pixel values between the predicted image generated by the predicted image generation unit 204 and an input image input from the outside. Further, the sum of absolute values of the difference values (SAD: Sum of Absolute Difference) is calculated for each pixel block.

次に、SAD比較部206は、予測モード選択部203によって選択された予測モードごとのSADを比較し、SADが最小となる予測モードを符号化効率の高い予測モードであると判断して、予測モード結果を予測モード選択部203へ送る。本実施形態では、SAD比較部206は最初に第1の選択手段として機能し、水平方向及び垂直方向の予測モードのうち、SADが小さい予測モードを選択して予測モード結果を予測モード選択部203へ送る。そして、予測モード選択部203は、SAD比較部206より出力された予測モード結果の近傍となる予測方向の予測モードを選択する。以降、SAD比較部206は第2の選択手段として機能して同様に比較を繰り返して最適な予測モードを決定し、予測モード選択部203を経由して画面内予測モード決定部202の外部へ結果を出力する。最適な予測モードを決定する具体的な処理手順については後述する。   Next, the SAD comparison unit 206 compares the SAD for each prediction mode selected by the prediction mode selection unit 203, determines that the prediction mode with the smallest SAD is a prediction mode with high coding efficiency, and performs prediction. The mode result is sent to the prediction mode selection unit 203. In the present embodiment, the SAD comparison unit 206 first functions as a first selection unit, selects a prediction mode with a small SAD from among the prediction modes in the horizontal direction and the vertical direction, and outputs a prediction mode result to the prediction mode selection unit 203. Send to. Then, the prediction mode selection unit 203 selects a prediction mode in the prediction direction that is close to the prediction mode result output from the SAD comparison unit 206. Thereafter, the SAD comparison unit 206 functions as the second selection unit and repeats the comparison in the same manner to determine the optimal prediction mode, and the result is output to the outside of the in-screen prediction mode determination unit 202 via the prediction mode selection unit 203. Is output. A specific processing procedure for determining the optimum prediction mode will be described later.

次に、符号化方法比較部210は、画面内予測モード決定部202より出力された結果と、画面間予測方法決定部209より出力された結果とを比較して、符号化対象ブロックの符号化方法を決定する。この時、比較を行うのは、入力画像がH.264方式におけるPスライスまたはBスライスの場合である。Iスライスのように画面内予測のみ有効な場合については、画面内予測モード決定部202から出力された結果を予測方法決定部201の外部へ出力する。   Next, the encoding method comparison unit 210 compares the result output from the intra prediction mode determination unit 202 with the result output from the inter prediction method determination unit 209 to encode the encoding target block. Decide how. At this time, the comparison is performed when the input image is H.264. This is a case of P slice or B slice in the H.264 system. In the case where only intra prediction is valid as in the case of I slice, the result output from the intra prediction mode determination unit 202 is output to the outside of the prediction method determination unit 201.

次に、輝度信号の4×4画素ブロック単位で画面内予測における予測モードを決定する処理手順について、図7−1及び図7−2のフローチャートを参照しながら説明する。
まず、ステップS701において、差分値算出部205は、図5に示すように予測方向が垂直方向の予測モード0、及び予測方向が水平方向の予測モード1についてSADを算出する。
Next, a processing procedure for determining a prediction mode in intra prediction in units of 4 × 4 pixel blocks of luminance signals will be described with reference to flowcharts of FIGS. 7-1 and 7-2.
First, in step S701, the difference value calculation unit 205 calculates SAD for the prediction mode 0 in which the prediction direction is the vertical direction and the prediction mode 1 in which the prediction direction is the horizontal direction as shown in FIG.

次に、ステップS702において、SAD比較部206は、予測モード0及び予測モード1のSADの算出結果を比較する。この比較の結果、予測モード1の結果の方が良い場合はステップS703へ進み、予測モード0の結果の方が良い場合、もしくは2つの結果が等しい場合はステップS724へ進む。そして、ステップS703において、差分値算出部205は、図5に示すように、予測モード1の予測方向である水平方向に近い予測モード6及び予測モード8についてSADを算出する。   Next, in step S <b> 702, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 0 and the prediction mode 1. As a result of the comparison, if the result of the prediction mode 1 is better, the process proceeds to step S703. If the result of the prediction mode 0 is better, or if the two results are equal, the process proceeds to step S724. In step S703, the difference value calculation unit 205 calculates SAD for prediction modes 6 and 8 that are close to the horizontal direction, which is the prediction direction of prediction mode 1, as shown in FIG.

次に、ステップS704において、SAD比較部206は、予測モード1、予測モード6及び予測モード8についてSADの算出結果を比較する。この比較の結果、予測モード8の結果が他の2つの予測モードよりも良い場合はステップS705へ進み、その他の場合はステップS709へ進む。   Next, in step S <b> 704, the SAD comparison unit 206 compares the SAD calculation results for the prediction mode 1, the prediction mode 6, and the prediction mode 8. As a result of the comparison, if the result of the prediction mode 8 is better than the other two prediction modes, the process proceeds to step S705, and otherwise, the process proceeds to step S709.

次に、ステップS705において、差分値算出部205は、予測方向がなく、周辺ブロック画素の平均値により予測画像を生成する予測モード2についてSADを算出する。そして、ステップS706において、SAD比較部206は、予測モード2及び予測モード8のSADの算出結果を比較する。この比較の結果、予測モード8の結果の方が良い場合は、ステップS707に進み、符号化対象ブロックの予測モードを予測モード8と決定し、処理を終了する。一方、ステップS706の比較の結果、予測モード2の結果の方が良い場合、または2つの結果が等しい場合には、ステップS708に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   Next, in step S705, the difference value calculation unit 205 calculates SAD for the prediction mode 2 in which there is no prediction direction and the predicted image is generated based on the average value of the neighboring block pixels. In step S706, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 2 and the prediction mode 8. As a result of this comparison, if the result of the prediction mode 8 is better, the process proceeds to step S707, the prediction mode of the block to be encoded is determined as the prediction mode 8, and the process is terminated. On the other hand, as a result of the comparison in step S706, if the result of prediction mode 2 is better, or if the two results are equal, the process proceeds to step S708, and the prediction mode of the encoding target block is determined to be prediction mode 2, The process ends.

一方、ステップS704の比較の結果、予測モード8の結果が他の2つの予測モードよりも良いという結果が得られなかった場合は、ステップS709においてさらに条件分岐を行う。すなわち、SAD比較部206は、さらに予測モード1及び予測モード6のSADの算出結果を比較する。この比較の結果、予測モード6の結果が最も良い場合にはステップS710へ進み、それ以外の場合はステップS720へ進む。   On the other hand, if the result of comparison in step S704 shows that the result of prediction mode 8 is better than the other two prediction modes, conditional branching is further performed in step S709. That is, the SAD comparison unit 206 further compares the SAD calculation results of the prediction mode 1 and the prediction mode 6. As a result of this comparison, if the result of the prediction mode 6 is the best, the process proceeds to step S710, and otherwise, the process proceeds to step S720.

そして、ステップS710において、差分値算出部205は、予測モード6の予測方向に近い予測モード4についてSADを算出する。なお、予測モード6の予測方向に近いもう一方の予測モード1については、既に演算/比較済みのため、ステップS710では予測モード4のみSADを算出する。   In step S <b> 710, the difference value calculation unit 205 calculates SAD for the prediction mode 4 close to the prediction direction of the prediction mode 6. Since the other prediction mode 1 near the prediction direction of the prediction mode 6 has already been calculated / compared, the SAD is calculated only for the prediction mode 4 in step S710.

次に、ステップS711において、SAD比較部206は、予測モード4及び予測モード6のSADの算出結果を比較する。この比較の結果、予測モード6の結果の方が良い場合はステップS712へ進み、それ以外はステップS716へ進む。   Next, in step S <b> 711, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 4 and the prediction mode 6. As a result of this comparison, if the result of the prediction mode 6 is better, the process proceeds to step S712, otherwise the process proceeds to step S716.

そして、ステップS712において、差分値算出部205は、前述した予測モード2のSADを算出する。そして、ステップS713において、SAD比較部206は、予測モード2及び予測モード6のSADの算出結果を比較する。この比較の結果、予測モード6の結果の方が良い場合は、ステップS714に進み、符号化対象ブロックの予測モードを予測モード6に決定し、処理を終了する。一方、ステップS713の比較の結果、予測モード2の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS715に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   In step S712, the difference value calculation unit 205 calculates the SAD of the prediction mode 2 described above. In step S713, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 2 and the prediction mode 6. As a result of the comparison, if the result of the prediction mode 6 is better, the process proceeds to step S714, the prediction mode of the block to be encoded is determined to be the prediction mode 6, and the process ends. On the other hand, as a result of the comparison in step S713, if the result of the prediction mode 2 is better, or if the two results are equal, the process proceeds to step S715 to determine the prediction mode of the block to be encoded as the prediction mode 2, and the processing Exit.

一方、ステップS711の比較の結果、予測モード4の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS716に進み、差分値算出部205は、予測モード2のSADを算出する。そして、ステップS717において、SAD比較部206は、予測モード2及び予測モード4のSADの算出結果を比較する。   On the other hand, as a result of the comparison in step S711, if the result of the prediction mode 4 is better, or if the two results are equal, the process proceeds to step S716, and the difference value calculation unit 205 calculates the SAD of the prediction mode 2. In step S717, the SAD comparison unit 206 compares the SAD calculation results in the prediction mode 2 and the prediction mode 4.

この比較の結果、予測モード4の結果の方が良い場合は、ステップS718に進み、符号化対象ブロックの予測モードを予測モード4に決定し、処理を終了する。一方、ステップS717の比較の結果、予測モード2の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS719に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   As a result of the comparison, if the result of the prediction mode 4 is better, the process proceeds to step S718, the prediction mode of the block to be encoded is determined to be the prediction mode 4, and the process ends. On the other hand, as a result of the comparison in step S717, if the result of the prediction mode 2 is better, or if the two results are equal, the process proceeds to step S719, and the prediction mode of the encoding target block is determined to be the prediction mode 2, and the process Exit.

一方、ステップS709の比較の結果、予測モード8の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS720に進み、差分値算出部205は、予測モード2のSADを算出する。そして、ステップS721において、SAD比較部206は、予測モード1及び予測モード2のSADの算出結果を比較する。   On the other hand, as a result of the comparison in step S709, if the result of the prediction mode 8 is better, or if the two results are equal, the process proceeds to step S720, and the difference value calculation unit 205 calculates the SAD of the prediction mode 2. In step S721, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 1 and the prediction mode 2.

この比較の結果、予測モード2の結果の方が良い場合は、ステップS722に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。一方、ステップS721の比較の結果、予測モード1の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS723に進み、符号化対象ブロックの予測モードを予測モード1に決定し、処理を終了する。   As a result of the comparison, if the result of the prediction mode 2 is better, the process proceeds to step S722, the prediction mode of the block to be encoded is determined to be the prediction mode 2, and the process ends. On the other hand, as a result of the comparison in step S721, if the result of the prediction mode 1 is better, or if the two results are equal, the process proceeds to step S723, and the prediction mode of the block to be encoded is determined as the prediction mode 1, and the process Exit.

一方、ステップS702の比較の結果、予測モード0の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS724に進む。そして、ステップS724において、差分値算出部205は、図5に示すように、予測モード0の予測方向である垂直方向に近い予測モード5及び予測モード7についてSADを算出する。   On the other hand, as a result of the comparison in step S702, if the result of the prediction mode 0 is better, or if the two results are equal, the process proceeds to step S724. In step S724, the difference value calculation unit 205 calculates SAD for prediction mode 5 and prediction mode 7 close to the vertical direction, which is the prediction direction of prediction mode 0, as shown in FIG.

次に、ステップS725において、SAD比較部206は、予測モード0、予測モード5及び予測モード7のSADの算出結果を比較する。この比較の結果、予測モード7の結果が他の2つの予測モードよりも良い場合は、ステップS726に進む。そして、ステップS726において、差分値算出部205は、予測モード7の予測方向に近い予測モード3のSADを算出する。   Next, in step S725, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 0, the prediction mode 5, and the prediction mode 7. As a result of the comparison, when the result of the prediction mode 7 is better than the other two prediction modes, the process proceeds to step S726. In step S <b> 726, the difference value calculation unit 205 calculates the SAD of the prediction mode 3 that is close to the prediction direction of the prediction mode 7.

次に、ステップS727において、SAD比較部206は、予測モード3及び予測モード7のSADの算出結果を比較する。この比較の結果、予測モード7の結果の方が良い場合は、ステップS728に進み、差分値算出部205は、予測モード2のSADを算出する。   Next, in step S727, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 3 and the prediction mode 7. As a result of the comparison, when the result of the prediction mode 7 is better, the process proceeds to step S728, and the difference value calculation unit 205 calculates the SAD of the prediction mode 2.

そして、ステップS729において、SAD比較部206は、予測モード2及び予測モード7のSADの算出結果を比較する。この比較の結果、予測モード7の結果の方が良い場合は、ステップS730に進み、符号化対象ブロックの予測モードを予測モード7に決定し、処理を終了する。一方、ステップS729の比較の結果、予測モード2の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS731に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   In step S729, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 2 and the prediction mode 7. As a result of this comparison, if the result of the prediction mode 7 is better, the process proceeds to step S730, the prediction mode of the block to be encoded is determined to be the prediction mode 7, and the process ends. On the other hand, as a result of the comparison in step S729, if the result of the prediction mode 2 is better, or if the two results are equal, the process proceeds to step S731, and the prediction mode of the encoding target block is determined to be the prediction mode 2, and the process Exit.

一方、ステップS727の比較の結果、予測モード3の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS732に進み、差分値算出部205は、予測モード2のSADを算出する。そして、ステップS733において、SAD比較部206は、予測モード2及び予測モード3のSADの算出結果を比較する。   On the other hand, if the result of the comparison in step S727 is better than the result of the prediction mode 3, or if the two results are equal, the process proceeds to step S732, and the difference value calculation unit 205 calculates the SAD of the prediction mode 2. In step S733, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 2 and the prediction mode 3.

この比較の結果、予測モード3の結果の方が良い場合は、ステップS734に進み、符号化対象ブロックの予測モードを予測モード3に決定し、処理を終了する。一方、ステップS733の比較の結果、予測モード2の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS735に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   As a result of the comparison, if the result of the prediction mode 3 is better, the process proceeds to step S734, the prediction mode of the block to be encoded is determined to be the prediction mode 3, and the process ends. On the other hand, if the result of the prediction mode 2 is better or the two results are equal as a result of the comparison in step S733, the process proceeds to step S735, and the prediction mode of the encoding target block is determined to be the prediction mode 2, and the process Exit.

一方、ステップS725の比較の結果、予測モード7の結果が他の2つの予測モードよりも良いという結果が得られなかった場合は、ステップS736においてさらに条件分岐を行う。すなわち、SAD比較部206は、さらに予測モード0及び予測モード5のSADの算出結果を比較する。この比較の結果、予測モード5の結果の方が良い場合は、ステップS737に進み、差分値算出部205は、予測モード4のSADを算出する。   On the other hand, if the result of comparison in step S725 shows that the result of prediction mode 7 is better than the other two prediction modes, conditional branching is further performed in step S736. That is, the SAD comparison unit 206 further compares the SAD calculation results of the prediction mode 0 and the prediction mode 5. As a result of the comparison, if the result of the prediction mode 5 is better, the process proceeds to step S737, and the difference value calculation unit 205 calculates the SAD of the prediction mode 4.

次に、ステップS738において、SAD比較部206は、予測モード4及び予測モード5のSADの算出結果を比較する。この比較の結果、予測モード5の結果の方が良い場合は、ステップS739に進み、差分値算出部205は、予測モード2のSADを算出する。   Next, in step S738, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 4 and the prediction mode 5. As a result of the comparison, if the result of the prediction mode 5 is better, the process proceeds to step S739, and the difference value calculation unit 205 calculates the SAD of the prediction mode 2.

そして、ステップS740において、SAD比較部206は、予測モード2及び予測モード5のSADの算出結果を比較する。この比較の結果、予測モード5の結果の方が良い場合は、ステップS741に進み、符号化対象ブロックの予測モードを予測モード5に決定し、処理を終了する。一方、ステップS740の比較の結果、予測モード2の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS742に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   In step S740, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 2 and the prediction mode 5. As a result of the comparison, if the result of the prediction mode 5 is better, the process proceeds to step S741, the prediction mode of the block to be encoded is determined to be the prediction mode 5, and the process ends. On the other hand, as a result of the comparison in step S740, if the result of prediction mode 2 is better, or if the two results are equal, the process proceeds to step S742, and the prediction mode of the block to be encoded is determined to be prediction mode 2, and the process Exit.

一方、ステップS738の比較の結果、予測モード4の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS743に進み、差分値算出部205は、予測モード2のSADを算出する。そして、ステップS744において、SAD比較部206は、予測モード2及び予測モード4のSADの算出結果を比較する。   On the other hand, when the result of the prediction mode 4 is better or the two results are equal as a result of the comparison in step S738, the process proceeds to step S743, and the difference value calculation unit 205 calculates the SAD of the prediction mode 2. In step S744, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 2 and the prediction mode 4.

この比較の結果、予測モード4の結果の方が良い場合は、ステップS745に進み、符号化対象ブロックの予測モードを予測モード4に決定し、処理を終了する。一方、ステップS744の比較の結果、予測モード2の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS746に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。   As a result of the comparison, if the result of the prediction mode 4 is better, the process proceeds to step S745, the prediction mode of the block to be encoded is determined to be the prediction mode 4, and the process ends. On the other hand, when the result of the prediction mode 2 is better or the two results are equal as a result of the comparison in step S744, the process proceeds to step S746, and the prediction mode of the encoding target block is determined to be the prediction mode 2, and the process Exit.

一方、ステップS736の比較の結果、予測モード0の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS747に進む。そして、ステップS747において、差分値算出部205は、予測モード2のSADを算出する。   On the other hand, as a result of the comparison in step S736, if the result of the prediction mode 0 is better, or if the two results are equal, the process proceeds to step S747. In step S747, the difference value calculation unit 205 calculates the SAD of the prediction mode 2.

次に、ステップS748において、SAD比較部206は、予測モード0及び予測モード2のSADの算出結果を比較する。この比較の結果、予測モード2の結果の方が良い場合は、ステップS749に進み、符号化対象ブロックの予測モードを予測モード2に決定し、処理を終了する。一方、ステップS748の比較の結果、予測モード0の結果の方が良い場合、もしくは2つの結果が等しい場合は、ステップS750に進み、符号化対象ブロックの予測モードを予測モード0に決定し、処理を終了する。   Next, in step S748, the SAD comparison unit 206 compares the SAD calculation results of the prediction mode 0 and the prediction mode 2. As a result of the comparison, if the result of the prediction mode 2 is better, the process proceeds to step S749, the prediction mode of the block to be encoded is determined as the prediction mode 2, and the process ends. On the other hand, as a result of the comparison in step S748, if the result of the prediction mode 0 is better, or if the two results are equal, the process proceeds to step S750, and the prediction mode of the encoding target block is determined to be the prediction mode 0, and the process Exit.

以上のように本実施形態においては、9つある予測モードのうち5つないしは6つの予測モードに対して予測画像を生成し、SADを算出することにより予測モードを決定することができる。これにより、予測モードを決定するまでの演算量を削減することができ、消費電力を低減することができる。   As described above, in the present embodiment, a prediction image can be determined by generating a prediction image for five or six prediction modes out of nine prediction modes and calculating SAD. As a result, the amount of calculation until the prediction mode is determined can be reduced, and the power consumption can be reduced.

なお、本実施形態では、予測モードごとの符号化効率の見極めるためにSADを用いた。一方、画素ごとの差分値に周波数変換処理を加えた係数の絶対値和であるSATD(Sum of Absolute Transform Difference)など、他の条件を用いてもよい。   In the present embodiment, SAD is used to determine the coding efficiency for each prediction mode. On the other hand, other conditions such as SATD (Sum of Absolute Transform Difference) which is the sum of absolute values of coefficients obtained by adding frequency conversion processing to the difference value for each pixel may be used.

また、本実施形態では輝度信号の4×4画素ブロック単位について説明したたが、輝度信号の8×8画素ブロック単位の場合など、他の条件においても本発明を実現することができる。   In the present embodiment, the 4 × 4 pixel block unit of the luminance signal has been described. However, the present invention can be realized under other conditions, such as the 8 × 8 pixel block unit of the luminance signal.

さらに、本実施形態では、画面内予測の予測モード決定処理については、デブロッキングフィルタ処理前のデータから予測画像を生成したが、例えば、現画像のデータを用いてもよい。   Furthermore, in the present embodiment, for the prediction mode determination process for intra prediction, a predicted image is generated from data before the deblocking filter process, but for example, data of the current image may be used.

また、本実施形態においては、最初に予測方向が垂直方向の予測モード0及び水平方向の予測モード1の比較により処理を行っている。一方、例えば、さらに別の予測モードを加えた3つの予測モードから比較を開始する場合や、別の2つの予測モードより比較を開始する場合など、別のパターンで行ってもよい。   In the present embodiment, processing is first performed by comparing the prediction mode 0 in the vertical direction and the prediction mode 1 in the horizontal direction. On the other hand, for example, when the comparison is started from three prediction modes to which another prediction mode is added, or when the comparison is started from another two prediction modes, another pattern may be used.

(本発明に係る他の実施形態)
前述した本発明の実施形態における符号化装置を構成する各手段、並びに符号化方法の各工程は、コンピュータのRAMやROMなどに記憶されたプログラムが動作することによって実現できる。このプログラム及び前記プログラムを記録したコンピュータ読み取り可能な記録媒体は本発明に含まれる。
(Other embodiments according to the present invention)
Each means constituting the encoding apparatus and each step of the encoding method in the embodiment of the present invention described above can be realized by operating a program stored in a RAM or ROM of a computer. This program and a computer-readable recording medium recording the program are included in the present invention.

また、本発明は、例えば、システム、装置、方法、プログラムもしくは記録媒体等としての実施形態も可能であり、具体的には、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。   In addition, the present invention can be implemented as, for example, a system, apparatus, method, program, or recording medium. Specifically, the present invention may be applied to a system including a plurality of devices. The present invention may be applied to an apparatus composed of a single device.

なお、本発明は、前述した実施形態の機能を実現するソフトウェアのプログラム(実施形態では図7−1、図7−2に示すフローチャートに対応したプログラム)を、システムまたは装置に直接、または遠隔から供給する場合も含む。そして、そのシステムまたは装置のコンピュータが前記供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。   In the present invention, a software program that realizes the functions of the above-described embodiments (in the embodiment, a program corresponding to the flowcharts shown in FIGS. 7-1 and 7-2) is directly or remotely transmitted to a system or apparatus. Including the case of supply. This includes the case where the system or the computer of the apparatus is also achieved by reading and executing the supplied program code.

したがって、本発明の機能処理をコンピュータで実現するために、前記コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。   Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。   In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, and the like.

プログラムを供給するための記録媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスクなどがある。さらに、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM、DVD−R)などもある。   Examples of the recording medium for supplying the program include a flexible disk, a hard disk, an optical disk, and a magneto-optical disk. Further, there are MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-R) and the like.

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続する方法がある。そして、前記ホームページから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。   As another program supply method, there is a method of connecting to a homepage on the Internet using a browser of a client computer. The computer program itself of the present invention or a compressed file including an automatic installation function can be downloaded from the homepage by downloading it to a recording medium such as a hard disk.

また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。   It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.

また、その他の方法として、本発明のプログラムを暗号化してCD−ROM等の記録媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせる。そして、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   As another method, the program of the present invention is encrypted, stored in a recording medium such as a CD-ROM, distributed to users, and encrypted from a homepage via the Internet to users who have cleared predetermined conditions. Download the key information to be solved. It is also possible to execute the encrypted program by using the key information and install the program on a computer.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される。さらに、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現され得る。   Further, the functions of the above-described embodiments are realized by the computer executing the read program. Furthermore, based on the instructions of the program, an OS or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.

さらに、その他の方法として、まず記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。そして、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現される。   As another method, the program read from the recording medium is first written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Then, based on the instructions of the program, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are also realized by the processing.

本発明の実施形態に係る動画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the moving image encoder which concerns on embodiment of this invention. 本発明の実施形態における予測方法決定部の内部構成例を示すブロック図である。It is a block diagram which shows the example of an internal structure of the prediction method determination part in embodiment of this invention. 輝度信号の16×16画素ブロック単位における画面内予測モードを示す図である。It is a figure which shows the prediction mode in a screen in a 16x16 pixel block unit of a luminance signal. 輝度信号の8×8画素ブロック単位における画面内予測モードを示す図である。It is a figure which shows the prediction mode in a screen in the unit of 8x8 pixel block of a luminance signal. 輝度信号の4×4画素ブロック単位における画面内予測モードを示す図である。It is a figure which shows the prediction mode in a screen in the 4x4 pixel block unit of a luminance signal. 色差信号の8×8画素ブロック単位における画面内予測モードを示す図である。It is a figure which shows the prediction mode in a screen in the unit of 8x8 pixel block of a color difference signal. 本発明の実施形態において、輝度信号の4×4画素ブロック単位で画面内予測における予測モードを決定する処理手順の一例を示すフローチャートである。5 is a flowchart illustrating an example of a processing procedure for determining a prediction mode in intra prediction in units of 4 × 4 pixel blocks of luminance signals in the embodiment of the present invention. 本発明の実施形態において、輝度信号の4×4画素ブロック単位で画面内予測における予測モードを決定する処理手順の一例を示すフローチャートである。5 is a flowchart illustrating an example of a processing procedure for determining a prediction mode in intra prediction in units of 4 × 4 pixel blocks of luminance signals in the embodiment of the present invention.

符号の説明Explanation of symbols

100 動画像符号化装置
101 差分計算部
102 直交変換/量子化部
103 エントロピー符号化部
104 逆量子化/逆直交変換部
105 デブロッキングフィルタ処理部
106 第1のメモリ
107 第2のメモリ
108 予測方法決定部
109 決定予測画像生成部
201 予測方向決定部
202 画面内予測モード決定部
203 予測モード選択部
204 予測画像生成部
205 差分値算出部
206 SAD比較部
207 第1のメモリ
208 第2のメモリ
209 画面間予測方法決定部
210 符号化方法比較部
DESCRIPTION OF SYMBOLS 100 Moving image encoding apparatus 101 Difference calculation part 102 Orthogonal transformation / quantization part 103 Entropy encoding part 104 Inverse quantization / inverse orthogonal transformation part 105 Deblocking filter process part 106 1st memory 107 2nd memory 108 Prediction method Determination unit 109 Determination prediction image generation unit 201 Prediction direction determination unit 202 In-screen prediction mode determination unit 203 Prediction mode selection unit 204 Prediction image generation unit 205 Difference value calculation unit 206 SAD comparison unit 207 First memory 208 Second memory 209 Inter-screen prediction method determination unit 210 Encoding method comparison unit

Claims (8)

入力画像を所定のブロックサイズに分割して符号化処理を行う符号化装置であって、
前記所定のブロックサイズの符号化対象ブロックに隣接するブロックの画素値を用いて、所定の予測モードにより前記符号化対象ブロックの予測画像を生成する予測画像生成手段と、
前記予測画像生成手段によって生成された予測画像と前記符号化対象ブロックとの差分値を算出する差分値算出手段と、
2つ以上の予測モードの中から前記差分値算出手段によって算出された差分値が最小となる予測モードを選択する第1の選択手段と、
前記第1の選択手段によって選択された予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードの中から、前記差分値算出手段によって算出された差分値が最小となる予測モードを選択して、前記符号化処理を行うための予測モードを決定する第2の選択手段とを備えたことを特徴とする符号化装置。
An encoding device that performs an encoding process by dividing an input image into a predetermined block size,
Prediction image generation means for generating a prediction image of the encoding target block in a predetermined prediction mode using a pixel value of a block adjacent to the encoding target block of the predetermined block size;
Difference value calculating means for calculating a difference value between the predicted image generated by the predicted image generating means and the encoding target block;
First selection means for selecting a prediction mode that minimizes the difference value calculated by the difference value calculation means from among two or more prediction modes;
The difference value calculated by the difference value calculation unit is selected from two or more prediction modes including a prediction mode in a prediction direction that is close to the prediction direction of the prediction mode selected by the first selection unit. An encoding apparatus comprising: a second selection unit that selects a prediction mode that minimizes and determines a prediction mode for performing the encoding process.
前記第1の選択手段によって選択される予測モードは、垂直方向または水平方向の予測モードであることを特徴とする請求項1に記載の符号化装置。   The encoding apparatus according to claim 1, wherein the prediction mode selected by the first selection means is a prediction mode in a vertical direction or a horizontal direction. 前記第2の選択手段は、2つの予測モードから差分値の小さい予測モードを選択する処理を繰り返して前記符号化処理を行うための予測モードを決定することを特徴とする請求項1または2に記載の符号化装置。   The said 2nd selection means determines the prediction mode for performing the said encoding process by repeating the process which selects the prediction mode with a small difference value from two prediction modes, It is characterized by the above-mentioned. The encoding device described. 入力画像を所定のブロックサイズに分割して符号化処理を行う符号化方法であって、
前記所定のブロックサイズの符号化対象ブロックに隣接するブロックの画素値を用いて、所定の予測モードにより前記符号化対象ブロックの予測画像を生成する予測画像生成工程と、
前記予測画像生成工程において生成した予測画像と前記符号化対象ブロックとの差分値を算出する差分値算出工程と、
2つ以上の予測モードの中から前記差分値算出工程において算出した差分値が最小となる予測モードを選択する第1の選択工程と、
前記第1の選択工程において選択した予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードの中から、前記差分値算出工程において算出した差分値が最小となる予測モードを選択して、前記符号化処理を行うための予測モードを決定する第2の選択工程とを備えたことを特徴とする符号化方法。
An encoding method that performs an encoding process by dividing an input image into a predetermined block size,
A prediction image generation step of generating a prediction image of the encoding target block in a predetermined prediction mode using a pixel value of a block adjacent to the encoding target block of the predetermined block size;
A difference value calculation step of calculating a difference value between the prediction image generated in the prediction image generation step and the encoding target block;
A first selection step of selecting a prediction mode that minimizes the difference value calculated in the difference value calculation step from two or more prediction modes;
The difference value calculated in the difference value calculation step is the smallest among two or more prediction modes including the prediction mode in the prediction direction that is close to the prediction direction of the prediction mode selected in the first selection step. And a second selection step of determining a prediction mode for performing the encoding process.
前記第1の選択工程において選択される予測モードは、垂直方向または水平方向の予測モードであることを特徴とする請求項4に記載の符号化方法。   The encoding method according to claim 4, wherein the prediction mode selected in the first selection step is a prediction mode in a vertical direction or a horizontal direction. 前記第2の選択工程においては、2つの予測モードから差分値の小さい予測モードを選択する処理を繰り返して前記符号化処理を行うための予測モードを決定することを特徴とする請求項4または5に記載の符号化方法。   6. The prediction mode for performing the encoding process is determined by repeating a process of selecting a prediction mode having a small difference value from two prediction modes in the second selection step. The encoding method described in 1. 入力画像を所定のブロックサイズに分割して符号化処理を行う符号化方法の各工程をコンピュータに実行させるプログラムであって、
前記所定のブロックサイズの符号化対象ブロックに隣接するブロックの画素値を用いて、所定の予測モードにより前記符号化対象ブロックの予測画像を生成する予測画像生成工程と、
前記予測画像生成工程において生成した予測画像と前記符号化対象ブロックとの差分値を算出する差分値算出工程と、
2つ以上の予測モードの中から前記差分値算出工程において算出した差分値が最小となる予測モードを選択する第1の選択工程と、
前記第1の選択工程において選択した予測モードの予測方向に対して近傍となる予測方向の予測モードを含む2つ以上の予測モードの中から、前記差分値算出工程において算出した差分値が最小となる予測モードを選択して、前記符号化処理を行うための予測モードを決定する第2の選択工程とをコンピュータに実行させることを特徴とするプログラム。
A program for causing a computer to execute each step of an encoding method for performing an encoding process by dividing an input image into a predetermined block size,
A prediction image generation step of generating a prediction image of the encoding target block in a predetermined prediction mode using a pixel value of a block adjacent to the encoding target block of the predetermined block size;
A difference value calculation step of calculating a difference value between the prediction image generated in the prediction image generation step and the encoding target block;
A first selection step of selecting a prediction mode that minimizes the difference value calculated in the difference value calculation step from two or more prediction modes;
The difference value calculated in the difference value calculation step is the smallest among two or more prediction modes including the prediction mode in the prediction direction that is close to the prediction direction of the prediction mode selected in the first selection step. And a second selection step for determining a prediction mode for performing the encoding process.
請求項7に記載のプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium, wherein the program according to claim 7 is recorded.
JP2008011941A 2008-01-22 2008-01-22 Encoder and encoding method Pending JP2009177357A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008011941A JP2009177357A (en) 2008-01-22 2008-01-22 Encoder and encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008011941A JP2009177357A (en) 2008-01-22 2008-01-22 Encoder and encoding method

Publications (1)

Publication Number Publication Date
JP2009177357A true JP2009177357A (en) 2009-08-06

Family

ID=41032021

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008011941A Pending JP2009177357A (en) 2008-01-22 2008-01-22 Encoder and encoding method

Country Status (1)

Country Link
JP (1) JP2009177357A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016511975A (en) * 2013-02-01 2016-04-21 クゥアルコム・インコーポレイテッドQualcomm Incorporated Simplified mode decision for intra prediction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016511975A (en) * 2013-02-01 2016-04-21 クゥアルコム・インコーポレイテッドQualcomm Incorporated Simplified mode decision for intra prediction

Similar Documents

Publication Publication Date Title
JP5089878B2 (en) Image encoding device
JP4495580B2 (en) In-plane prediction apparatus and in-plane prediction method
JP5686499B2 (en) Image predictive encoding apparatus, method and program, image predictive decoding apparatus, method and program, and encoding / decoding system and method
JP5400798B2 (en) Moving picture decoding method and apparatus, moving picture encoding method and apparatus
JP5488612B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
KR20100029343A (en) Video encoding/decoding method and apparatus using arbitrary pixel in subblock
JP4939273B2 (en) Image coding apparatus and image coding method
JP4762938B2 (en) Data embedding device, data extracting device, data embedding method, and data extracting method
TW201328363A (en) Multi-level significance maps for encoding and decoding
JP6077811B2 (en) Image coding apparatus, image coding method, and program
KR20180096194A (en) Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same
JP5087016B2 (en) Encoding apparatus, control method therefor, and computer program
JP7456441B2 (en) Image processing device and image processing method
JP4898415B2 (en) Moving picture coding apparatus and moving picture coding method
KR20130088114A (en) Image processing device, image processing method, and program
JP2009177357A (en) Encoder and encoding method
JP5149978B2 (en) Image coding apparatus and image coding method
JP4971817B2 (en) Image encoding device
JP2010035025A (en) Encoding device and method therefor
JP2010034802A (en) Moving image encoding device and method of controlling the same
JP2009021786A (en) Image encoding device and method
JP2006237765A (en) Image coding apparatus
JP6557483B2 (en) Encoding apparatus, encoding system, and program
JP2006165699A (en) Image encoder and image encoding method
JP2009049513A (en) Moving picture encoding device and moving picture encoding method