JP6130648B2 - Image encoding apparatus and image encoding program - Google Patents

Image encoding apparatus and image encoding program Download PDF

Info

Publication number
JP6130648B2
JP6130648B2 JP2012246645A JP2012246645A JP6130648B2 JP 6130648 B2 JP6130648 B2 JP 6130648B2 JP 2012246645 A JP2012246645 A JP 2012246645A JP 2012246645 A JP2012246645 A JP 2012246645A JP 6130648 B2 JP6130648 B2 JP 6130648B2
Authority
JP
Japan
Prior art keywords
block
mode
image
encoding
unit
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.)
Active
Application number
JP2012246645A
Other languages
Japanese (ja)
Other versions
JP2014096679A (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.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting 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 Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2012246645A priority Critical patent/JP6130648B2/en
Publication of JP2014096679A publication Critical patent/JP2014096679A/en
Application granted granted Critical
Publication of JP6130648B2 publication Critical patent/JP6130648B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像を符号化する画像符号化装置及び画像符号化方法に関する。   The present invention relates to an image encoding device and an image encoding method for encoding an image.

MPEG(Moving Picture Experts Group)−2やH.264/AVC(Advanced Video Coding)(例えば非特許文献1参照)や現在規格化作業中のHEVC(High Efficiency Video Coding)などの映像の圧縮符号化方式では、映像の各フレームをブロックと呼ばれる矩形領域に分割して符号化が行われる。符号化処理では、ブロックを単位として動き推定や、画像信号を周波数領域の信号に変換する処理などが行われる。   MPEG (Moving Picture Experts Group) -2 and H.264 In video compression coding systems such as H.264 / AVC (Advanced Video Coding) (see, for example, Non-Patent Document 1) and HEVC (High Efficiency Video Coding) currently being standardized, each video frame is a rectangular area called a block. The encoding is performed by dividing the data into two. In the encoding process, a process such as motion estimation for each block or a process for converting an image signal into a frequency domain signal is performed.

各ブロックでは、動きベクトル、画面内予測モード、インター予測又はイントラ予測などの符号化で利用される各種モードが決定され、これらのモードも符号化される。従来の符号化方式では、限られた情報量(ビットレート)に対して可能な限り高い画質を得るように、両者のバランスを最適にする処理が施される。例えば、発生する情報量をR、原画と局所的に復号された画像との誤差をDとすると、RとDとの線形和が最小になるようにRD(Rate-Distortion)最適化が行われる。   In each block, various modes used for encoding such as motion vectors, intra prediction modes, inter prediction, and intra prediction are determined, and these modes are also encoded. In the conventional encoding method, processing for optimizing the balance between the two is performed so as to obtain the highest possible image quality for a limited amount of information (bit rate). For example, assuming that the amount of information to be generated is R and the error between the original image and the locally decoded image is D, RD (Rate-Distortion) optimization is performed so that the linear sum of R and D is minimized. .

このRD最適化は、モード情報の選択にも用いられ、単に画質が良くなるだけでなく、モード情報のために発生する情報量も少なくなるように処理される。モード情報の多くは、既に符号化済みの隣接ブロックのモード情報との差分(予測)を符号化する。   This RD optimization is also used to select mode information, and is processed not only to improve image quality but also to reduce the amount of information generated for mode information. Most of the mode information encodes a difference (prediction) from the mode information of an already encoded adjacent block.

大久保榮監修,「改訂三版 H.264/AVC 教科書」,インプレス R&D,2009年1月1日Supervised by Satoshi Okubo, “Revised Third Edition H.264 / AVC Textbook”, Impress R & D, January 1, 2009

従来技術では、符号化対象ブロックのモードが、既に符号化された周辺ブロックのモード情報に依存して選択される。よって、符号化対象ブロックのモードは、発生情報量を減らす観点から、隣接ブロックと類似することが多い。   In the prior art, the mode of the encoding target block is selected depending on the mode information of the peripheral blocks that have already been encoded. Therefore, the mode of the encoding target block is often similar to the neighboring block from the viewpoint of reducing the amount of generated information.

しかしながら、符号化済みブロックのモードだけに依存して符号化対象ブロックのモードを決定する従来の手法では、画像全体を考慮すれば、必ずしも適切なモードが選択されているとは限らなかった。   However, in the conventional method for determining the mode of the encoding target block depending only on the mode of the encoded block, an appropriate mode is not always selected in consideration of the entire image.

そこで、本発明は、未符号化ブロックで仮決めしたモードを用いて符号化対象ブロックのモードを決定することで、適切なモードを決定することができる画像符号化装置及び画像符号化プログラムを提供することを目的とする。   Therefore, the present invention provides an image encoding device and an image encoding program that can determine an appropriate mode by determining a mode of an encoding target block using a mode temporarily determined for an uncoded block. The purpose is to do.

本発明の一態様における画像符号化装置は、画像をブロックに分割し、ブロック単位で符号化を行う画像符号化装置であって、分割したブロックに含まれる第1のブロックについて、前記第1のブロックのみの情報を用いてモードを決定し、前記第1のブロックに隣接する第2のブロックについて、前記第1のブロックのモードと、前記第2のブロックのモードの差分値から計算される第1の発生情報量R、及び、前記第2のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第1の誤差Dに基づいたRD最適化により、前記第2のブロックの符号化で利用されるモードを仮決めし、仮決めした前記第2のブロックのモードと、前記第2のブロックに隣接する第3のブロックのモードとの差分値から計算される第2の発生情報量R、及び、前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第2の誤差Dに基づいたRD最適化により、前記第3のブロックの符号化で利用されるモードを仮決めするモード選択部と、前記第2のブロックのモードを、前記第1の発生情報量R、前記第2の発生情報量R、前記第1の誤差D、及び前記第2の誤差Dに基づいたRD最適化により決定し、該決定した前記第2のブロックのモード、及び前記第3のブロックのモードとの差分値から計算される第3の発生情報量Rと、前記前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第3の誤差Dとに基づいたRD最適化により、前記前記第3のブロックの仮決めされたモードを再度仮決めするモード精査部と、前記モード精査部により決定された各ブロックのモードを用いて、前記各ブロックの符号化を行う符号化部とを有する。 An image coding apparatus according to an aspect of the present invention is an image coding apparatus that divides an image into blocks and performs coding in units of blocks, and the first block included in the divided blocks is the first block. A mode is determined using only block information, and a second block adjacent to the first block is calculated from a difference value between the mode of the first block and the mode of the second block . The generated information amount R of 1 and the RD optimization based on the first error D indicating the difference between the encoded and locally decoded image of the second block and the original image, the second the mode used in the encoding of the block temporarily determined, the calculated from the difference value of the mode temporarily determined said second blocks, a mode of the third block adjacent to the second block 2 of the calling Information amount R, and, by RD optimization based on a second error D showing the difference between the third block of encoded and locally decoded image and the original image, the third block A mode selection unit for temporarily determining a mode used in encoding; and a mode of the second block , the first generated information amount R, the second generated information amount R, the first error D, And a third generated information amount calculated from a difference value between the mode of the second block and the mode of the third block determined by RD optimization based on the second error D. RD optimization based on R and a third error D indicating the difference between the original image and the encoded and locally decoded image of the third block. and the mode scrutiny unit that provisionally determined again provisionally determined by the mode, With the mode of each block determined by the serial mode scrutiny unit, and a coding unit for encoding of each block.

また、前記モードは、イントラ予測方向、動きベクトル、インター予測又はイントラ予測、周波数領域への変換方法、及びループフィルタのフィルタ係数のうち、少なくとも1つを含んでもよい。   In addition, the mode may include at least one of an intra prediction direction, a motion vector, inter prediction or intra prediction, a conversion method to a frequency domain, and a filter coefficient of a loop filter.

また、本発明の他の態様における画像符号化プログラムは、コンピュータに、画像を分割したブロックに含まれる第1のブロックについて、前記第1のブロックのみの情報を用いてモードを決定するステップと、前記第1のブロックに隣接する第2のブロックについて、前記第1のブロックのモードと、前記第2のブロックのモードの差分値から計算される第1の発生情報量R、及び、前記第2のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第1の誤差Dに基づいたRD最適化により、前記第2のブロックの符号化で利用されるモードを仮決めするステップと、仮決めした前記第2のブロックのモードと、前記第2のブロックに隣接する第3のブロックとの差分値から計算される第2の発生情報量R、及び、前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第2の誤差Dに基づいたRD最適化により、前記第3のブロックの符号化で利用されるモードを仮決めするステップと、前記第2のブロックのモードを、前記第1の発生情報量R、前記第2の発生情報量R、前記第1の誤差D、及び前記第2の誤差Dに基づいたRD最適化により決定するステップと、該決定した前記第2のブロックのモード、及び前記第3のブロックのモードとの差分値から計算される第3の発生情報量Rと、前記前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第3の誤差Dとに基づいたRD最適化により、前記前記第3のブロックの仮決めされたモードを再度仮決めするステップと、前記決定するステップにより決定された各ブロックのモードを用いて、前記各ブロックの符号化を行うステップと、を実行させる。 An image encoding program according to another aspect of the present invention includes a step of determining a mode using information of only the first block for a first block included in a block obtained by dividing an image on a computer , For the second block adjacent to the first block, the first generated information amount R calculated from the difference value between the mode of the first block and the mode of the second block , and the second of the coding and RD optimization based on first error D showing the difference between the local decoded image and the original image of the block, provisionally the mode used in the encoding of the second block a step of determining a mode of temporarily determined said second block, the second generation information amount calculated from the difference value between the third block adjacent to the second block R, and the The RD optimization based on a second error D showing the difference between the encoding and local decoding image and the original image of the third block, the mode used in the encoding of the third block The provisional determination step and the mode of the second block are based on the first generated information amount R, the second generated information amount R, the first error D, and the second error D. A step of determining by RD optimization, a third generated information amount R calculated from a difference value between the determined mode of the second block and the mode of the third block, and the third The tentatively determined mode of the third block is again temporarily determined by RD optimization based on the third error D indicating the difference between the image obtained by coding and local decoding of the block and the original image. comprising the steps of: determining, step to the determining With the mode of the block determined by said performing a coding of each block, thereby executing.

本発明によれば、未符号化ブロックで仮決めしたモードを用いて符号化対象ブロックのモードを決定することで、適切なモードを決定することができる。   According to the present invention, an appropriate mode can be determined by determining the mode of a block to be encoded using a mode temporarily determined for an uncoded block.

実施例1における画像符号化装置の概略構成の一例を示すブロック図。1 is a block diagram illustrating an example of a schematic configuration of an image encoding device according to Embodiment 1. FIG. 実施例1におけるモード制御部の構成の一例を示すブロック図。FIG. 3 is a block diagram illustrating an example of a configuration of a mode control unit according to the first embodiment. 実施例1におけるモード決定手順の一例を説明する図。FIG. 6 is a diagram illustrating an example of a mode determination procedure in the first embodiment. イントラ予測方向の一例を示す図。The figure which shows an example of an intra prediction direction. 実施例1における画像符号化処理の一例を示すフローチャート。3 is a flowchart illustrating an example of an image encoding process according to the first embodiment. 実施例2における画像処理装置の構成の一例を示すブロック図。FIG. 6 is a block diagram illustrating an example of a configuration of an image processing apparatus according to a second embodiment.

以下、未符号化ブロックで仮決めしたモードを用いて符号化対象ブロックのモードを決定することで、適切なモードを決定することができる各実施例について、添付図面を参照しながら詳細に説明する。未符号化ブロックとは、正式な符号化処理が行われていないブロックをいう。正式な符号化処理とは、モード決定後の符号化処理であり、発生情報量や画像誤差を調べるための事前の符号化処理を含まない。   Hereinafter, each embodiment in which an appropriate mode can be determined by determining a mode of an encoding target block using a mode temporarily determined for an uncoded block will be described in detail with reference to the accompanying drawings. . An unencoded block refers to a block that has not been officially encoded. The formal encoding process is an encoding process after mode determination, and does not include a prior encoding process for examining the amount of generated information and image errors.

[実施例1]
<構成>
図1は、実施例1における画像符号化装置10の概略構成の一例を示すブロック図である。図1に示す例では、画像符号化装置10は、前処理部100、予測誤差信号生成部101、直交変換部102、量子化部103、エントロピー符号化部104、逆量子化部105、逆直交変換部106、復号画像生成部107、ループフィルタ部109、復号画像記憶部110、イントラ予測部111、インター予測部112、動きベクトル計算部113及び予測画像選択部115を有する。各部についての概略を以下に説明する。
[Example 1]
<Configuration>
FIG. 1 is a block diagram illustrating an example of a schematic configuration of an image encoding device 10 according to the first embodiment. In the example illustrated in FIG. 1, the image encoding device 10 includes a preprocessing unit 100, a prediction error signal generation unit 101, an orthogonal transformation unit 102, a quantization unit 103, an entropy encoding unit 104, an inverse quantization unit 105, and an inverse orthogonal. A conversion unit 106, a decoded image generation unit 107, a loop filter unit 109, a decoded image storage unit 110, an intra prediction unit 111, an inter prediction unit 112, a motion vector calculation unit 113, and a predicted image selection unit 115 are included. An outline of each part will be described below.

前処理部100は、ピクチャタイプに合わせてピクチャを並べ替え、ピクチャタイプ及びフレームごとのフレーム画像等を順次出力する。また、前処理部100は、ブロック分割なども行う。   The preprocessing unit 100 rearranges the pictures in accordance with the picture type, and sequentially outputs the picture type and the frame image for each frame. The preprocessing unit 100 also performs block division and the like.

予測誤差信号生成部101は、入力された動画像データの符号化対象画像が、例えば32×32、16×16、8×8画素などのブロックに分割されたブロックデータを取得する。   The prediction error signal generation unit 101 acquires block data obtained by dividing an encoding target image of input moving image data into blocks such as 32 × 32, 16 × 16, and 8 × 8 pixels.

予測誤差信号生成部101は、そのブロックデータと、予測画像選択部115から出力される予測画像のブロックデータとにより、予測誤差信号を生成する。予測誤差信号生成部101は、生成された予測誤差信号を直交変換部102に出力する。   The prediction error signal generation unit 101 generates a prediction error signal based on the block data and the block data of the prediction image output from the prediction image selection unit 115. The prediction error signal generation unit 101 outputs the generated prediction error signal to the orthogonal transformation unit 102.

直交変換部102は、入力された予測誤差信号を直交変換処理する。直交変換部102は、変換された係数値を示す信号を量子化部103に出力する。なお、直交変換の種類が複数ある場合は、いずれの直交変換にするかの決定は、後述するモード制御により行われてもよい。   The orthogonal transform unit 102 performs orthogonal transform processing on the input prediction error signal. The orthogonal transform unit 102 outputs a signal indicating the transformed coefficient value to the quantization unit 103. When there are a plurality of types of orthogonal transforms, the determination of which orthogonal transform is to be performed may be performed by mode control described later.

量子化部103は、直交変換部102からの出力信号を量子化する。量子化部103は、量子化することによって出力信号の符号量を低減し、この出力信号をエントロピー符号化部104及び逆量子化部105に出力する。   The quantization unit 103 quantizes the output signal from the orthogonal transform unit 102. The quantization unit 103 reduces the code amount of the output signal by quantization, and outputs this output signal to the entropy encoding unit 104 and the inverse quantization unit 105.

エントロピー符号化部104は、量子化部103からの出力信号や動きベクトル計算部113から出力された動きベクトル情報やループフィルタ部109からのフィルタ係数などをエントロピー符号化して出力する。エントロピー符号化とは、シンボルの出現頻度に応じて可変長の符号を割り当てる方式をいう。   The entropy coding unit 104 entropy codes and outputs the output signal from the quantization unit 103, the motion vector information output from the motion vector calculation unit 113, the filter coefficient from the loop filter unit 109, and the like. Entropy coding is a method of assigning variable-length codes according to the appearance frequency of symbols.

逆量子化部105は、量子化部103からの出力信号を逆量子化してから逆直交変換部106に出力する。逆直交変換部106は、逆量子化部105からの出力信号を逆直交変換処理してから復号画像生成部107に出力する。これら逆量子化部105及び逆直交変換部106によって復号処理が行われることにより、符号化前の予測誤差信号と同程度の信号が得られる。   The inverse quantization unit 105 dequantizes the output signal from the quantization unit 103 and then outputs the output signal to the inverse orthogonal transform unit 106. The inverse orthogonal transform unit 106 performs an inverse orthogonal transform process on the output signal from the inverse quantization unit 105 and then outputs the output signal to the decoded image generation unit 107. By performing decoding processing by the inverse quantization unit 105 and the inverse orthogonal transform unit 106, a signal having the same level as the prediction error signal before encoding is obtained.

復号画像生成部107は、イントラ予測部111で画面内予測された画像あるいはインター予測部112で動き補償された画像のブロックデータと、逆量子化部105及び逆直交変換部106により復号処理された予測誤差信号とを加算する。復号画像生成部107は、加算して生成した復号画像のブロックデータを、ループフィルタ部109に出力する。   The decoded image generation unit 107 decodes the block data of the image that has been intra-predicted by the intra prediction unit 111 or the motion compensated image by the inter prediction unit 112, and the inverse quantization unit 105 and the inverse orthogonal transform unit 106. Add the prediction error signal. The decoded image generation unit 107 outputs the decoded image block data generated by addition to the loop filter unit 109.

ループフィルタ部109は、例えばALF(Adaptive Loop Filter)やデブロッキングフィルタであり、いずれか又は両方を備えてもよい。   The loop filter unit 109 is, for example, an ALF (Adaptive Loop Filter) or a deblocking filter, and may include either or both.

例えば、ループフィルタ部109は、入力画像を所定サイズ毎のグループに分け、グループ毎に適切なフィルタ係数を生成する。ループフィルタ部109は、フィルタ処理された復号画像を、所定サイズ毎にグループ分けし、生成したフィルタ係数を用いてグループ毎にフィルタ処理を行う。ループフィルタ部109は、フィルタ処理結果を復号画像記憶部110に出力し、蓄積された1画像分のフィルタ処理結果を参照画像として記憶させる。所定サイズは、例えば、直交変換サイズである。なお、フィルタ係数の決定は、後述するモード制御により行われてもよい。   For example, the loop filter unit 109 divides the input image into groups for each predetermined size, and generates an appropriate filter coefficient for each group. The loop filter unit 109 divides the filtered decoded image into groups for each predetermined size, and performs filter processing for each group using the generated filter coefficients. The loop filter unit 109 outputs the filter processing result to the decoded image storage unit 110 and stores the accumulated filter processing result for one image as a reference image. The predetermined size is, for example, an orthogonal transformation size. Note that the filter coefficient may be determined by mode control described later.

復号画像記憶部110は、入力した復号画像のブロックデータを新たな参照画像のデータとして記憶し、イントラ予測部111、インター予測部112及び動きベクトル計算部113に出力する。   The decoded image storage unit 110 stores the input block data of the decoded image as new reference image data, and outputs the data to the intra prediction unit 111, the inter prediction unit 112, and the motion vector calculation unit 113.

イントラ予測部111は、符号化対象画像の処理対象ブロックに対して、すでに符号化された参照画素から予測画像のブロックデータを生成する。イントラ予測部111は、複数の予測方向を用いて予測を行い、最適な予測方向を決定する。予測方向については、符号化済みブロックの予測方向との差分値をビットストリームに含めるために、差分値がエントロピー符号化部104に出力される。なお、最適な予測方法の決定は、後述するモード制御により行われてもよい。   The intra prediction unit 111 generates block data of the predicted image from the already-encoded reference pixels for the processing target block of the encoding target image. The intra prediction unit 111 performs prediction using a plurality of prediction directions and determines an optimal prediction direction. As for the prediction direction, the difference value from the prediction direction of the encoded block is output to the entropy encoding unit 104 in order to include the difference value in the bitstream. Note that the optimal prediction method may be determined by mode control described later.

インター予測部112は、復号画像記憶部110から取得した参照画像のデータを動きベクトル計算部113から提供される動きベクトルで動き補償する。これにより、動き補償された参照画像としてのブロックデータが生成される。動きベクトルについては、符号化済みブロックの動きベクトルとの差分値をビットストリームに含めるために、差分値がエントロピー符号化部104に出力される。なお、動きベクトルの決定は、後述するモード制御により行われてもよい。   The inter prediction unit 112 performs motion compensation on the reference image data acquired from the decoded image storage unit 110 with the motion vector provided from the motion vector calculation unit 113. Thereby, block data as a motion-compensated reference image is generated. For the motion vector, the difference value with the motion vector of the encoded block is output to the entropy encoding unit 104 in order to include the difference value in the bitstream. Note that the motion vector may be determined by mode control described later.

動きベクトル計算部113は、符号化対象画像におけるブロックデータと、復号画像記憶部110から取得する参照画像とを用いて、動きベクトルを求める。動きベクトルとは、ブロック単位で参照画像内から処理対象ブロックに最も類似している位置を探索するブロックマッチング技術などを用いて求められるブロック単位の空間的なずれを示す値である。   The motion vector calculation unit 113 obtains a motion vector using the block data in the encoding target image and the reference image acquired from the decoded image storage unit 110. The motion vector is a value indicating a spatial deviation in units of blocks obtained using a block matching technique or the like that searches for a position most similar to the processing target block from the reference image in units of blocks.

動きベクトル計算部113は、求めた動きベクトルをインター予測部112に出力し、動きベクトルや参照画像を示す情報を含む動きベクトル情報をエントロピー符号化部104に出力する。   The motion vector calculation unit 113 outputs the obtained motion vector to the inter prediction unit 112, and outputs motion vector information including information indicating the motion vector and the reference image to the entropy coding unit 104.

イントラ予測部111とインター予測部112から出力されたブロックデータは、予測画像選択部115に入力される。   The block data output from the intra prediction unit 111 and the inter prediction unit 112 are input to the predicted image selection unit 115.

予測画像選択部115は、イントラ予測部111とインター予測部112から取得したブロックデータのうち、どちらか一方のブロックデータを予測画像として選択する。選択された予測画像は、予測誤差信号生成部101に出力される。なお、予測画像の選択は、後述するモード制御により行われてもよい。   The predicted image selection unit 115 selects one of the block data acquired from the intra prediction unit 111 and the inter prediction unit 112 as a predicted image. The selected prediction image is output to the prediction error signal generation unit 101. Note that the prediction image may be selected by mode control described later.

なお、図1に示す画像符号化装置10の構成は一例であり、必要に応じて各構成を組み合わせたり、各構成を適宜変更したりしてもよい。   The configuration of the image encoding device 10 illustrated in FIG. 1 is an example, and the configurations may be combined or the configurations may be appropriately changed as necessary.

<モード制御部>
実施例1で用いられるモードは、RD最適化で用いられるパラメータであり、符号化済みブロックのパラメータとの差分を符号化されるパラメータである。例えば、このモードは、イントラ予測方向、動きベクトル、インター予測又はイントラ予測、周波数領域への変換方法(例えばDCT又はDST)、及びループフィルタのフィルタ係数のうち、少なくとも1つを含む。
<Mode control unit>
The mode used in the first embodiment is a parameter used in RD optimization, and is a parameter in which a difference from a parameter of an encoded block is encoded. For example, this mode includes at least one of an intra prediction direction, a motion vector, inter prediction or intra prediction, a conversion method to a frequency domain (for example, DCT or DST), and a filter coefficient of a loop filter.

以下で説明するモード制御部は、例えばイントラ予測部111、インター予測部112、又はループフィルタ部109などに組み込むことが可能である。   The mode control unit described below can be incorporated into, for example, the intra prediction unit 111, the inter prediction unit 112, or the loop filter unit 109.

図2は、実施例1におけるモード制御部20の構成の一例を示すブロック図である。以下では、モード決定に関する処理を主に説明し、モードを符号化するなどのその他の処理は公知の技術を用いればよい。   FIG. 2 is a block diagram illustrating an example of the configuration of the mode control unit 20 according to the first embodiment. In the following, processing relating to mode determination will be mainly described, and other processing such as encoding of modes may be performed using a known technique.

モード選択部201は、前処理部100からブロック分割された符号化対象ブロックを取得する。モード選択部201は、符号化対象ブロックの符号化で利用されるモード及びこのモードに基づき未符号化ブロックの符号化で利用されるモードを仮決めする。   The mode selection unit 201 acquires an encoding target block that is divided into blocks from the preprocessing unit 100. The mode selection unit 201 tentatively determines a mode used for encoding the current block and a mode used for encoding an unencoded block based on this mode.

このとき、モード選択部201は、仮決めされたモードに伴う発生情報量Rを符号量計算部202から取得する。この発生情報量Rは、例えば仮決めされたモードと、符号化済みブロックのモードとの差分値などから計算される。また、モード選択部201は、仮決めされたモードにより符号化及び局所的な復号がされた画像と、原画像との差分を示す誤差Dを画像誤差計算部203から取得する。   At this time, the mode selection unit 201 acquires the generated information amount R associated with the temporarily determined mode from the code amount calculation unit 202. The generated information amount R is calculated from, for example, a difference value between a temporarily determined mode and a coded block mode. Further, the mode selection unit 201 acquires an error D indicating a difference between the image encoded and locally decoded in the temporarily determined mode and the original image from the image error calculation unit 203.

モード選択部201は、符号化対象ブロックのモードについては、公知技術と同様にして、符号化済みの隣接ブロックのモードを用いてRD最適化を行ってモードを仮決めする。モード選択部201は、以下の式のE1を最小化する符号化対象ブロックのモードを決定する。
E1=D+λ×R ・・・式(1)
次に、モード選択部201は、仮決めしたモードを用いて、未符号化ブロックの情報と、符号化対象ブロックの情報とを用いてRD最適化を行って、未符号化ブロックのモードを仮決めする。モード選択部201は、仮決めした符号化対象ブロックのモードと、仮決めした未符号化ブロックのモードとをモード精査部204に出力する。
The mode selection unit 201 tentatively determines the mode of the block to be encoded by performing RD optimization using the mode of the adjacent block that has been encoded in the same manner as in the known technique. The mode selection unit 201 determines a mode of an encoding target block that minimizes E1 in the following equation.
E1 = D + λ × R (1)
Next, the mode selection unit 201 performs RD optimization using the information of the uncoded block and the information of the encoding target block using the temporarily determined mode, and sets the mode of the uncoded block temporarily. Decide. The mode selection unit 201 outputs the temporarily determined encoding target block mode and the temporarily determined unencoded block mode to the mode review unit 204.

モード精査部204は、仮決めされた符号化対象ブロック及び未符号化ブロックのモードをモード選択部201から取得する。また、モード精査部204は、符号化対象ブロックに対する発生符号量R及び未符号化ブロックに対する発生符号量Ri+1を符号量計算部202から取得する。また、モード精査部204は、符号化対象ブロックに対する画像誤差D及び未符号化ブロックに対する画像誤差Di+1を画像誤差計算部203から取得する。 The mode scrutinizing unit 204 acquires the temporarily determined encoding target block and unencoded block modes from the mode selection unit 201. In addition, the mode review unit 204 acquires the generated code amount R i for the encoding target block and the generated code amount R i + 1 for the uncoded block from the code amount calculation unit 202. Further, the mode review unit 204 acquires the image error D i for the encoding target block and the image error D i + 1 for the uncoded block from the image error calculation unit 203.

符号量計算部202は、モード選択部201により仮決めされたモードに伴う発生情報量を計算する。符号量計算部202は、仮決めされたモードでの係数値の情報量やモード自体の情報量(符号化済み隣接ブロックのモードとの差分値)を発生情報量に含める。   The code amount calculation unit 202 calculates the amount of generated information associated with the mode temporarily determined by the mode selection unit 201. The code amount calculation unit 202 includes the information amount of the coefficient value in the temporarily determined mode and the information amount of the mode itself (difference value from the mode of the encoded adjacent block) in the generated information amount.

このとき、符号量計算部202は、ハフマン符号などの簡易的な符号化を行って発生情報量を求めてもよいし、後段で行われるエントロピー符号化後の発生情報量を求めてもよい。   At this time, the code amount calculation unit 202 may determine the amount of generated information by performing simple encoding such as a Huffman code, or may determine the amount of generated information after entropy encoding performed at a later stage.

符号量計算部202は、符号化対象ブロックの発生情報量Rと、未符号化ブロックの発生情報量Ri+1とを計算し、計算結果をモード選択部201やモード精査部204に出力する。発生情報量Ri+1は、Rが変わることで変更される可能性があるため、Ri+1=f(R)の関係が成り立つ。 The code amount calculation unit 202 calculates the generation information amount R i of the encoding target block and the generation information amount R i + 1 of the unencoded block, and outputs the calculation result to the mode selection unit 201 and the mode check unit 204. Amount of generated information R i + 1, since it is likely to change by R i is changed, the relationship of R i + 1 = f (R i) is satisfied.

画像誤差計算部203は、モード選択部201により仮決めされたモードによって符号化及び局所的に復号された画像と、原画像との画像誤差を計算する。   The image error calculation unit 203 calculates an image error between the original image and the image that has been encoded and locally decoded in the mode temporarily determined by the mode selection unit 201.

このとき、画像誤差計算部203は、符号化対象ブロックの画像誤差Dと、未符号化ブロックの画像誤差Di+1とを計算し、計算結果をモード選択部201やモード精査部204に出力する。画像誤差Di+1は、Dが変わることで変更される可能性があるため、Di+1=g(D)の関係が成り立つ。 At this time, the image error calculation unit 203 calculates the image error D i of the encoding target block and the image error D i + 1 of the unencoded block, and outputs the calculation result to the mode selection unit 201 and the mode scrutinizing unit 204. . Image error D i + 1, since it is likely to be changed by D i is changed, holds the relationship D i + 1 = g (D i).

モード精査部204は、符号化対象ブロックの仮決めされたモード及び未符号化ブロックの仮決めされたモードを用いて、符号化対象ブロックのモードを最終的に決定する。また、モード精査部204は、符号化対象ブロックで決定されたモードを用いて、未符号化ブロックの仮決めされたモードを修正する。   The mode review unit 204 finally determines the mode of the encoding target block by using the temporarily determined mode of the encoding target block and the temporarily determined mode of the uncoded block. Further, the mode scrutinizing unit 204 corrects the temporarily determined mode of the unencoded block using the mode determined in the encoding target block.

モード精査部204は、上記の機能を有するためにモード決定部241と、モード修正部242とを含む。   The mode scrutinizing unit 204 includes a mode determining unit 241 and a mode correcting unit 242 in order to have the above function.

具体的には、モード決定部241は、符号化対象ブロックのモードを最終決定する際、符号化対象ブロックの仮決めされたモード及び未符号化ブロックの仮決めされたモードを用いてRD最適化を行う。モード決定部241は、以下の式のE2を最小化する符号化対象ブロックのモードを決定する。
E2=(D+Di+1)+λ(R+Ri+1) ・・・式(2)
また、モード修正部242は、式(2)により決定されたモードを用いてRD最適化を行って、未符号化ブロックの仮決めされたモードを必要であれば修正する。
Specifically, when the mode determination unit 241 finally determines the mode of the encoding target block, the mode determination unit 241 performs RD optimization using the temporarily determined mode of the encoding target block and the temporarily determined mode of the uncoded block. I do. The mode determination unit 241 determines the mode of the encoding target block that minimizes E2 in the following equation.
E2 = (D i + D i + 1 ) + λ (R i + R i + 1 ) (2)
Further, the mode correcting unit 242 performs RD optimization using the mode determined by the equation (2), and corrects the temporarily determined mode of the uncoded block if necessary.

モード精査部204は、決定したモードを、符号化済みブロックのモードと差分を取り、差分値をエントロピー符号化部104に出力する。なお、モード精査部204は、決定したモードをエントロピー符号化部104に出力し、エントロピー符号化部104側で差分を取るようにしてもよい。   The mode scrutinizing unit 204 calculates the difference between the determined mode and the mode of the encoded block, and outputs the difference value to the entropy encoding unit 104. The mode scrutinizing unit 204 may output the determined mode to the entropy encoding unit 104 and take the difference on the entropy encoding unit 104 side.

モード精査部204は、決定した符号化対象ブロックのモードを、後段の符号化部に出力し、後段の符号化部は、決定されたモードを用いて符号化する。後段の符号化部は、例えば、直交変換部102や量子化部103やエントロピー符号化部104である。   The mode scrutinizing unit 204 outputs the determined mode of the encoding target block to the subsequent encoding unit, and the subsequent encoding unit encodes using the determined mode. The downstream encoding unit is, for example, the orthogonal transform unit 102, the quantization unit 103, or the entropy encoding unit 104.

<モード決定手順>
次に、モード決定手順について説明する。図3は、実施例1におけるモード決定手順の一例を説明する図である。図3に示す例では、画像左上のブロック0から右に走査し、最も右のブロックを走査した場合は、一列下の最も左のブロックから右に走査し、この走査を繰り返すとする。また、図3に示す例では、未符号化ブロックとして、例えば次に符号化するブロックを用いる。
<Mode decision procedure>
Next, the mode determination procedure will be described. FIG. 3 is a diagram illustrating an example of a mode determination procedure in the first embodiment. In the example shown in FIG. 3, when scanning is performed from the block 0 at the upper left of the image to the right and the rightmost block is scanned, the scanning is repeated from the leftmost block below one row to the right, and this scanning is repeated. In the example shown in FIG. 3, for example, a block to be encoded next is used as an unencoded block.

(1)ブロック0のモード決定とブロック1、2のモード仮決定
モード選択部201は、最初に走査されるブロック0(例えば画像の一番左上のブロック)は自ブロックのみの情報を用いてモードを決定する。モード選択部201は、ブロック0のモードを用いて式(1)によりRD最適化を行って、ブロック1のモードを仮決定する。また、モード選択部201は、仮決定したブロック1のモードを用いて式(1)によりRD最適化を行って、ブロック2のモードを仮決定する。
(1) Mode determination of block 0 and mode tentative determination mode selection unit 201 of blocks 1 and 2 indicate that the first scanned block 0 (for example, the upper left block of the image) uses only the information of its own block. To decide. The mode selection unit 201 tentatively determines the mode of the block 1 by performing RD optimization using the mode of the block 0 according to the equation (1). Further, the mode selection unit 201 performs RD optimization according to the equation (1) using the temporarily determined block 1 mode, and temporarily determines the block 2 mode.

(2)ブロック1のモード決定とブロック2のモード修正
モード決定部241は、符号化対象ブロックのブロック1に対し、式(2)によりRD最適化を行って、ブロック1のモードを決定する。モード修正部242は、決定されたブロック1のモードを用いて式(1)によりブロック2のモードを修正する。
(2) The mode determination of block 1 and the mode correction mode determination unit 241 of block 2 determine the mode of block 1 by performing RD optimization on the block 1 of the encoding target block according to equation (2). The mode correction unit 242 corrects the mode of the block 2 by the equation (1) using the determined mode of the block 1.

(3)ブロック3のモード仮決定
モード選択部201は、ブロック2の修正されたモードを用いて式(1)によりRD最適化を行って、ブロック3のモードを仮決定する。
(3) The mode tentative determination mode selection unit 201 of the block 3 performs RD optimization according to the equation (1) using the corrected mode of the block 2, and tentatively determines the mode of the block 3.

(4)ブロック2のモード決定とブロック3のモード修正
モード決定部241は、符号化対象ブロックのブロック2に対し、式(2)によりRD最適化を行って、ブロック2のモードを決定する。モード修正部242は、決定されたブロック2のモードを用いて式(1)によりブロック3のモードを修正する。
(4) The mode determination mode of block 2 and the mode correction mode determination unit 241 of block 3 determine the mode of block 2 by performing RD optimization on the block 2 of the encoding target block according to equation (2). The mode correcting unit 242 corrects the mode of the block 3 by the equation (1) using the determined mode of the block 2.

以下、同様の処理を行うことで、未符号化ブロックの情報を考慮しながら、符号化対象ブロックのモードを決定していくことができる。また、未符号化ブロックを符号化対象ブロックの次に符号化されるブロックとすることで、未符号化ブロックに対する処理を最小限に抑えることができる。   Hereinafter, by performing the same processing, it is possible to determine the mode of the encoding target block while taking into account the information of the uncoded block. In addition, by setting the unencoded block to be a block that is encoded next to the encoding target block, it is possible to minimize processing on the unencoded block.

なお、モード精査の他の例として、モード精査部204は、符号化順で符号化対象ブロックと関連が高く、未符号化ブロックである右、左下、下、右下のブロックも考慮して、式(2)のパラメータを増加させることによりRD最適化を行ってもよい。これにより、大域的に符号化対象ブロックのモードを選択することができる。   As another example of mode examination, the mode examination unit 204 is highly related to the encoding target block in the coding order, and also considers the right, lower left, lower, lower right blocks that are uncoded blocks, RD optimization may be performed by increasing the parameter of equation (2). Thereby, the mode of the encoding target block can be selected globally.

ただし、考慮する未符号化ブロックを増加させると、その分だけ符号化対象ブロックのモードの最終決定が遅れてしまうので、どの未符号化ブロックを加えるかは、システムが許容する遅延量を考慮して決定してもよい。   However, if the number of unencoded blocks to be considered is increased, the final determination of the mode of the block to be encoded is delayed by that amount, so which unencoded block to add depends on the delay amount allowed by the system. May be determined.

また、精査の回数は1回ではなく2回以上行ってもよい。また、ブロックのモード情報符号化に関係するブロックが左隣のブロックだけではない場合、上述した処理を、関係するブロック全てに拡張すればよい。   The number of scrutiny may be two or more times instead of once. In addition, when the block related to the mode information coding of the block is not only the left adjacent block, the above-described processing may be extended to all the related blocks.

<具体例>
次に、モードの具体例として、HEVCで検討されているイントラ予測の予測方向を例にして説明する。
<Specific example>
Next, as a specific example of the mode, a description will be given by taking the prediction direction of intra prediction studied by HEVC as an example.

図4は、イントラ予測方向の一例を示す図である。図4に示す例では、33通りの予測モード(予測方向)に加え、平均値予測と、平面予測とが加えられる。   FIG. 4 is a diagram illustrating an example of an intra prediction direction. In the example shown in FIG. 4, in addition to 33 prediction modes (prediction directions), average value prediction and plane prediction are added.

この場合、画面内左上のブロック(予測用のブロック)から予測モード決定が開始される。   In this case, prediction mode determination is started from the upper left block (prediction block) in the screen.

左上のブロックに関しては、予測に利用する画素が無いので、階調の中間値(8ビットの場合128)が予測値となる。そのため、モード情報は存在しない。モード情報の符号化は不要である。   For the upper left block, since there are no pixels used for prediction, the intermediate value of gradation (128 in the case of 8 bits) is the predicted value. Therefore, there is no mode information. It is not necessary to encode mode information.

続いて、2つ目のブロックの予測は、左ブロックのみからの予測となる(図3に示す(1)ブロック1)。例えば、2番目のブロックの予測モードが、2番目のブロックの情報を利用して左からの水平90度方向の予測モードになったとする(図3に示す(1)のブロック1の「仮」)。   Subsequently, the prediction of the second block is a prediction from only the left block ((1) block 1 shown in FIG. 3). For example, it is assumed that the prediction mode of the second block is changed to the prediction mode in the horizontal 90 degree direction from the left using the information of the second block (“tentative” of block 1 in (1) shown in FIG. 3). ).

続いて、3番目のブロックに関しても、2番目のブロックの情報を利用して予測が行われる。例えば、左斜め上22.5度からの予測モードに仮決めされたとする(図3に示す(1)のブロック2の「仮」)。   Subsequently, the third block is also predicted using the information of the second block. For example, it is assumed that the prediction mode is temporarily determined from the upper left 22.5 degrees (“temporary” in block 2 in (1) shown in FIG. 3).

ここで、モード精査部204は、2番目のブロックのモード情報を精査するために、3番目の仮予測モードを利用する。2番目のブロックの発生符号量をR2、歪(画像誤差)をD2、3番目のブロックの発生符号量をR3(仮決定した2番目のブロックのモード情報を利用する)、歪をD3とする。   Here, the mode review unit 204 uses the third provisional prediction mode to examine the mode information of the second block. The generated code amount of the second block is R2, the distortion (image error) is D2, the generated code amount of the third block is R3 (using the mode information of the tentatively determined second block), and the distortion is D3. .

モード精査部204は、式(2)によりRD最適化E2=(D2+D3)+λ(R2+R3)を最小化することで、モード精査を行う。モード決定部241は、このRD最適化により、2番目のブロックの予測モードを最終決定する(図3に示す(2)のブロック1の「決」)。   The mode scrutinizing unit 204 performs mode scrutiny by minimizing RD optimization E2 = (D2 + D3) + λ (R2 + R3) according to the equation (2). The mode determination unit 241 finally determines the prediction mode of the second block by this RD optimization (“decision” of block 1 in (2) shown in FIG. 3).

ここで、モード修正部242は、決定された2番目のブロックの予測モードを用いて、式(1)によりRD最適化を行い、3番目のブロックの予測モードを必要であれば修正する。例えば、モード修正部242は、決定された2番目のブロックの予測モードを用いてRD最適化を行っても、仮決めされたモードと同じモードが選択されれば、モード修正の必要はない。   Here, the mode correction unit 242 performs RD optimization using Equation (1) using the determined prediction mode of the second block, and corrects the prediction mode of the third block if necessary. For example, even if the mode correction unit 242 performs RD optimization using the determined prediction mode of the second block, if the same mode as the temporarily determined mode is selected, there is no need for mode correction.

また、モード修正部242は、決定された2番目のブロックの予測モードを用いてRD最適化を行い、仮決めされた予測モードと異なる予測モードが選択されれば、新たに選択された予測モードを仮決めされた予測モードとして修正する(図3に示す(2)のブロック2の「修」)。   The mode correction unit 242 performs RD optimization using the determined prediction mode of the second block, and if a prediction mode different from the temporarily determined prediction mode is selected, the newly selected prediction mode is selected. Is corrected as the temporarily determined prediction mode ("Fix" in block 2 in (2) shown in FIG. 3).

また、モード修正部242は、仮決めされた予測モードと、新たに選択された予測モードとが大きく異なる場合にのみ、予測モードを修正するようにしてもよい。モード修正部242は、予測モードが大きく異なるか否かについての閾値として、例えば予測方向で±5モード以内であれば異ならないとし、それ以外を異なると判定してもよい。   The mode correction unit 242 may correct the prediction mode only when the temporarily determined prediction mode and the newly selected prediction mode are significantly different. For example, the mode correction unit 242 may determine that the prediction mode is not significantly different as long as it is within ± 5 modes in the prediction direction, and that other than that is different.

次に、エントロピー符号化部104は、2番目のブロックのモード情報が決定したら、左隣(1番目)のブロックのモード情報との差分を、2番目のブロックのモード情報として符号化する。   Next, when the mode information of the second block is determined, the entropy encoding unit 104 encodes the difference from the mode information of the left adjacent (first) block as the mode information of the second block.

4番目以降のブロックについては、上述した処理と同様の処理を行うことで、予測モードの決定、並びにモード情報の符号化を行うことができる。なお、上記実施例では、未符号化ブロックは、モード決定時に用いられるだけであり、モード符号化時には公知の符号化技術を用いればよい。そのため、復号側では、例えば左隣のブロックとの差分信号からモード情報を復号することができる。   With respect to the fourth and subsequent blocks, the prediction mode can be determined and the mode information can be encoded by performing the same process as described above. In the above embodiment, the uncoded block is only used at the time of mode determination, and a known coding technique may be used at the time of mode coding. Therefore, on the decoding side, the mode information can be decoded from, for example, a difference signal from the left adjacent block.

なお、上記実施例では、モードとしてイントラ予測モードを例にして説明するが、動きベクトルや、インター予測又はイントラ予測や、スキップブロックにするか否かや、ループフィルタのフィルタ係数などもモードとして適用可能である。   In the above embodiment, the intra prediction mode is described as an example as a mode. However, motion vectors, inter prediction or intra prediction, whether to use a skip block, a filter coefficient of a loop filter, and the like are also applied as modes. Is possible.

例えば、モードとしては、RD最適化に関連するパラメータであり、符号化済みブロックのパラメータとの差分を符号化されるパラメータが適用可能である。また、上記で説明したモードのいずれかであれば、図3を用いて上述したように処理を行えば、未符号化ブロックを用いてモードを決定することができるようになる。   For example, the mode is a parameter related to RD optimization, and a parameter encoded with a difference from the parameter of the encoded block can be applied. In any of the modes described above, if the process is performed as described above with reference to FIG. 3, the mode can be determined using an uncoded block.

例えば、動きベクトルの場合、動き補償されたブロックと原画像のブロックとの差分がDであり、符号化済みブロックを用いて予測された動きベクトルと符号化対象ブロックの動きベクトルとの差分、及びDから発生する発生情報量がRである。   For example, in the case of a motion vector, the difference between the motion compensated block and the original image block is D, the difference between the motion vector predicted using the encoded block and the motion vector of the encoding target block, and The amount of information generated from D is R.

以上の構成を有することにより、実施例1における画像符号化装置10は、未符号化ブロックで仮決めしたモードを用いて符号化対象ブロックのモードを決定することで、適切なモードを決定することができる。   By having the above configuration, the image encoding device 10 according to the first embodiment determines an appropriate mode by determining a mode of a block to be encoded using a mode provisionally determined for an uncoded block. Can do.

<動作>
次に、実施例1における画像符号化装置10の動作について説明する。図5は、実施例1における画像符号化処理の一例を示すフローチャートである。図5に示す処理は、符号化のモード符号化に関する処理を説明する。その他の処理は、一般的な画像符号化処理と同様である。
<Operation>
Next, the operation of the image encoding device 10 in the first embodiment will be described. FIG. 5 is a flowchart illustrating an example of an image encoding process according to the first embodiment. The process shown in FIG. 5 explains the process regarding the encoding mode encoding. Other processes are the same as the general image encoding process.

ステップS101で、モード選択部201は、符号化対象ブロックが符号化順で最初のブロックか否かを判定する。符号化対象ブロックは、単に対象ブロックとも称される。対象ブロックが最初のブロックであれば(ステップS101−YES)ステップS102に進み、対象ブロックが最初のブロックでなければ(ステップS101−NO)ステップS103に進む。   In step S101, the mode selection unit 201 determines whether the encoding target block is the first block in the encoding order. The encoding target block is also simply referred to as a target block. If the target block is the first block (step S101—YES), the process proceeds to step S102, and if the target block is not the first block (step S101—NO), the process proceeds to step S103.

ステップS102で、モード選択部201は、対象ブロックの情報のみを用いてRD最適化によりモードを決定する。   In step S102, the mode selection unit 201 determines a mode by RD optimization using only information on the target block.

ステップS103で、モード選択部201は、符号化済みブロックの情報と、対象ブロックの情報とを利用してRD最適化により対象ブロックのモードを仮決定する。   In step S103, the mode selection unit 201 tentatively determines the mode of the target block by RD optimization using the encoded block information and the target block information.

ステップS104で、対象ブロックの情報と、次ブロックの情報を利用してRD最適化により次ブロックのモードを仮決定する。なお、対象ブロックが最後のブロックで次ブロックが存在しない場合、ステップS104の処理はスキップされる。   In step S104, the mode of the next block is provisionally determined by RD optimization using the information on the target block and the information on the next block. If the target block is the last block and there is no next block, the process of step S104 is skipped.

ステップS105で、モード精査部204は、対象ブロックと、次ブロックの両方のRDを用いてRD最適化(式(2))により対象ブロックのモードを精査する。この精査処理により、対象ブロックのモードが最終決定されたり、次ブロックのモードが修正されたりする。   In step S105, the mode review unit 204 examines the mode of the target block by RD optimization (formula (2)) using the RDs of both the target block and the next block. By this scrutiny process, the mode of the target block is finally determined or the mode of the next block is corrected.

ステップS106で、エントロピー符号化部104は、精査されたモードを用いて符号化を行う。   In step S106, the entropy encoding unit 104 performs encoding using the scrutinized mode.

ステップS107で、モード選択部201は、対象ブロックが最後のブロックであるか否かを判定する。対象ブロックが最後のブロックであれば(ステップS107−YES)この処理を終了し、対象ブロックが最後のブロックでなければ(ステップS107−NO)ステップS108に進む。   In step S107, the mode selection unit 201 determines whether the target block is the last block. If the target block is the last block (step S107—YES), this process is terminated, and if the target block is not the last block (step S107—NO), the process proceeds to step S108.

ステップS108で、モード選択部201は、対象ブロックを次ブロックに移動し、ステップS103の処理を開始する。   In step S108, the mode selection unit 201 moves the target block to the next block and starts the process of step S103.

以上、実施例1によれば、ブロックのモードを決定する際、符号化対象ブロックだけでなく、未符号化ブロックも用いてRD最適化が行われる。これにより、従来では、符号化済みのブロックに依存していたモードが、未符号化ブロックを含めて考慮されることで、より適切なモードが決定されるようになる。   As described above, according to the first embodiment, when determining a block mode, RD optimization is performed using not only an encoding target block but also an uncoded block. As a result, the mode that has been dependent on the encoded block in the past is considered including the uncoded block, so that a more appropriate mode is determined.

また、モードの最適化を行う例として、遅延時間を考慮して、符号化対象ブロックに隣接した未符号化ブロックを用いる処理を説明したが、この処理に限られない。   In addition, as an example of mode optimization, processing using an unencoded block adjacent to an encoding target block has been described in consideration of a delay time, but is not limited to this processing.

例えば、画像内の全ブロックに対して1通りモードの仮決めを行った後、再度モードの精査を行うことが考えられる。この場合は、1画像分の遅延時間が生じるものの、1度決定されたモード情報を基に、再度符号化処理を行うことで符号量の配分をよりよくすることができる。なお、画像符号化装置10により符号化されたビットストリームは、既存の符号化規格に従うビットストリームとなるので、画像符号化装置10により符号化されたビットストリームは、既存の画像復号装置により復号可能である。   For example, it is conceivable to perform mode scrutiny again after making a mode tentative decision for all blocks in the image. In this case, although a delay time for one image occurs, it is possible to improve the code amount distribution by performing the encoding process again based on the mode information determined once. In addition, since the bit stream encoded by the image encoding device 10 becomes a bit stream according to the existing encoding standard, the bit stream encoded by the image encoding device 10 can be decoded by the existing image decoding device. It is.

[実施例2]
図6は、実施例2における画像処理装置30の構成の一例を示すブロック図である。図6に示す画像処理装置30は、上述した実施例1で説明した画像符号化処理をソフトウェアで実装した装置の一例である。
[Example 2]
FIG. 6 is a block diagram illustrating an example of the configuration of the image processing apparatus 30 according to the second embodiment. An image processing apparatus 30 illustrated in FIG. 6 is an example of an apparatus in which the image encoding process described in the first embodiment is implemented by software.

図6に示すように、画像処理装置30は、制御部301、主記憶部302、補助記憶部303、ドライブ装置304、ネットワークI/F部306、入力部307、表示部308を有する。これら各構成は、バスを介して相互にデータ送受信可能に接続されている。   As illustrated in FIG. 6, the image processing apparatus 30 includes a control unit 301, a main storage unit 302, an auxiliary storage unit 303, a drive device 304, a network I / F unit 306, an input unit 307, and a display unit 308. These components are connected to each other via a bus so as to be able to transmit and receive data.

制御部301は、コンピュータの中で、各装置の制御やデータの演算、加工を行うCPU(Central Processing Unit)である。また、制御部301は、主記憶部302又は補助記憶部303に記憶された画像符号化処理のプログラムを実行する演算装置である。制御部301は、入力部307や記憶装置からデータを受け取り、演算、加工した上で、表示部308や記憶装置などに出力する。   The control unit 301 is a CPU (Central Processing Unit) that performs control of each device, calculation of data, and processing in a computer. The control unit 301 is an arithmetic device that executes an image encoding processing program stored in the main storage unit 302 or the auxiliary storage unit 303. The control unit 301 receives data from the input unit 307 and the storage device, calculates and processes the data, and outputs the data to the display unit 308 and the storage device.

また、制御部301は、画像符号化処理のプログラムを実行することで、実施例1で説明した処理を実現することができる。   Further, the control unit 301 can realize the processing described in the first embodiment by executing a program for image encoding processing.

主記憶部302は、ROM(Read Only Memory)やRAM(Random Access Memory)などである。主記憶部302は、制御部301が実行する基本ソフトウェアであるOS(Operating System)やアプリケーションソフトウェアなどのプログラムやデータを記憶又は一時保存する記憶装置である。   The main storage unit 302 is a ROM (Read Only Memory), a RAM (Random Access Memory), or the like. The main storage unit 302 is a storage device that stores or temporarily stores programs and data such as OS (Operating System) and application software that are basic software executed by the control unit 301.

補助記憶部303は、HDD(Hard Disk Drive)などであり、アプリケーションソフトウェアなどに関連するデータを記憶する記憶装置である。   The auxiliary storage unit 303 is an HDD (Hard Disk Drive) or the like, and is a storage device that stores data related to application software and the like.

ドライブ装置304は、記録媒体305、例えばフレキシブルディスクからプログラムを読み出し、記憶部にインストールする。   The drive device 304 reads the program from the recording medium 305, for example, a flexible disk, and installs it in the storage unit.

また、記録媒体305に、所定のプログラムを格納し、この記録媒体305に格納されたプログラムはドライブ装置304を介して画像処理装置30にインストールされる。インストールされた所定のプログラムは、画像処理装置30により実行可能となる。   A predetermined program is stored in the recording medium 305, and the program stored in the recording medium 305 is installed in the image processing apparatus 30 via the drive device 304. The installed predetermined program can be executed by the image processing apparatus 30.

ネットワークI/F部306は、有線及び/又は無線回線などのデータ伝送路により構築されたLAN(Local Area Network)、WAN(Wide Area Network)などのネットワークを介して接続された通信機能を有する周辺機器と画像処理装置30とのインターフェースである。   The network I / F unit 306 is a peripheral having a communication function connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network) constructed by a data transmission path such as a wired and / or wireless line. This is an interface between the device and the image processing apparatus 30.

入力部307は、カーソルキー、数字入力及び各種機能キー等を備えたキーボード、表示部308の表示画面上でキーの選択等を行うためのマウスやスライドパット等を有する。表示部308は、LCD(Liquid Crystal Display)等により構成され、制御部301から入力される表示データに応じた表示が行われる。   The input unit 307 includes a keyboard having cursor keys, numeric input, various function keys, and the like, a mouse and a slide pad for performing key selection on the display screen of the display unit 308, and the like. The display unit 308 is configured by an LCD (Liquid Crystal Display) or the like, and performs display according to display data input from the control unit 301.

なお、図1に示す復号画像記憶部110は、例えば主記憶部302又は補助記憶部303により実現され、図1に示す復号画像記憶部110以外の構成は、例えば制御部301及びワークメモリとしての主記憶部302により実現されうる。   The decoded image storage unit 110 illustrated in FIG. 1 is realized by, for example, the main storage unit 302 or the auxiliary storage unit 303. The configuration other than the decoded image storage unit 110 illustrated in FIG. This can be realized by the main storage unit 302.

画像処理装置30で実行されるプログラムは、実施例1で説明した各部を含むモジュール構成となっている。実際のハードウェアとしては、制御部301が補助記憶部303からプログラムを読み出して実行することにより上記各部のうち1又は複数の各部が主記憶部302上にロードされ、1又は複数の各部が主記憶部302上に生成されるようになっている。   The program executed by the image processing apparatus 30 has a module configuration including each unit described in the first embodiment. As actual hardware, when the control unit 301 reads a program from the auxiliary storage unit 303 and executes it, one or more of the above-described units are loaded onto the main storage unit 302, and one or more of the units are main. It is generated on the storage unit 302.

このように、上述した実施例1で説明した画像符号化処理は、コンピュータに実行させるためのプログラムとして実現されてもよい。このプログラムをサーバ等からインストールしてコンピュータに実行させることで、実施例1で説明した処理を実現することができる。   As described above, the image encoding processing described in the first embodiment may be realized as a program for causing a computer to execute. The processing described in the first embodiment can be realized by installing this program from a server or the like and causing the computer to execute the program.

また、このプログラムを記録媒体305に記録し、このプログラムが記録された記録媒体305をコンピュータや携帯端末に読み取らせて、前述した処理を実現させることも可能である。なお、記録媒体305は、CD−ROM、フレキシブルディスク、光磁気ディスク等の様に情報を光学的,電気的或いは磁気的に記録する記録媒体、ROM、フラッシュメモリ等の様に情報を電気的に記録する半導体メモリ等、様々なタイプの記録媒体を用いることができる。また、上述した各実施例で説明した処理は、1つ又は複数の集積回路に実装してもよい。   It is also possible to record the program on the recording medium 305 and cause the computer or portable terminal to read the recording medium 305 on which the program is recorded to realize the above-described processing. The recording medium 305 is a recording medium that records information optically, electrically, or magnetically, such as a CD-ROM, a flexible disk, or a magneto-optical disk, and information is electrically stored such as a ROM or flash memory. Various types of recording media such as a semiconductor memory for recording can be used. Further, the processes described in the above embodiments may be implemented in one or a plurality of integrated circuits.

なお、実施例2における画像処理装置30は、上記の通り、画像符号化装置10としての機能を有する。   Note that the image processing apparatus 30 according to the second embodiment has a function as the image encoding apparatus 10 as described above.

以上、各実施例について詳述したが、特定の実施例に限定されるものではなく、特許請求の範囲に記載された範囲内において、上記変形例以外にも種々の変形及び変更が可能である。   Each embodiment has been described in detail above. However, the present invention is not limited to the specific embodiment, and various modifications and changes other than the above-described modification are possible within the scope described in the claims. .

10 画像符号化装置
30 画像処理装置
104 エントロピー符号化部
111 イントラ予測部
112 インター予測部
109 ループフィルタ部
201 モード選択部
202 符号量計算部
203 画像誤差計算部
204 モード精査部
241 モード決定部
242 モード修正部
DESCRIPTION OF SYMBOLS 10 Image encoding apparatus 30 Image processing apparatus 104 Entropy encoding part 111 Intra prediction part 112 Inter prediction part 109 Loop filter part 201 Mode selection part 202 Code amount calculation part 203 Image error calculation part 204 Mode inspection part 241 Mode determination part 242 Mode Correction part

Claims (3)

画像をブロックに分割し、ブロック単位で符号化を行う画像符号化装置であって、
分割したブロックに含まれる第1のブロックについて、前記第1のブロックのみの情報を用いてモードを決定し、
前記第1のブロックに隣接する第2のブロックについて、前記第1のブロックのモードと、前記第2のブロックのモードの差分値から計算される第1の発生情報量R、及び、前記第2のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第1の誤差Dに基づいたRD最適化により、前記第2のブロックの符号化で利用されるモードを仮決めし、
仮決めした前記第2のブロックのモードと、前記第2のブロックに隣接する第3のブロックのモードとの差分値から計算される第2の発生情報量R、及び、前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第2の誤差Dに基づいたRD最適化により、前記第3のブロックの符号化で利用されるモードを仮決めするモード選択部と、
前記第2のブロックのモードを、前記第1の発生情報量R、前記第2の発生情報量R、前記第1の誤差D、及び前記第2の誤差Dに基づいたRD最適化により決定し、
該決定した前記第2のブロックのモード、及び前記第3のブロックのモードとの差分値から計算される第3の発生情報量Rと、前記前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第3の誤差Dとに基づいたRD最適化により、前記前記第3のブロックの仮決めされたモードを再度仮決めするモード精査部と、
前記モード精査部により決定された各ブロックのモードを用いて、前記各ブロックの符号化を行う符号化部と
を有する画像符号化装置。
An image encoding device that divides an image into blocks and performs encoding in block units,
For the first block included in the divided blocks, the mode is determined using information of only the first block,
For the second block adjacent to the first block, the first generated information amount R calculated from the difference value between the mode of the first block and the mode of the second block , and the second of the coding and RD optimization based on first error D showing the difference between the local decoded image and the original image of the block, provisionally the mode used in the encoding of the second block Decide
The second generated information amount R calculated from the difference value between the temporarily determined mode of the second block and the mode of the third block adjacent to the second block , and the third block A mode in which a mode used in the encoding of the third block is provisionally determined by RD optimization based on the second error D indicating the difference between the encoded and locally decoded image and the original image A selection section;
The mode of the second block is determined by RD optimization based on the first generated information amount R, the second generated information amount R, the first error D, and the second error D. ,
A third generated information amount R calculated from a difference value between the determined mode of the second block and the mode of the third block, and encoding and local decoding of the third block A mode scrutinizing unit that tentatively determines the tentatively determined mode of the third block again by RD optimization based on the third error D indicating the difference between the image and the original image ;
An image encoding apparatus comprising: an encoding unit that encodes each block using the mode of each block determined by the mode review unit.
前記モードは、イントラ予測方向、動きベクトル、インター予測又はイントラ予測、周波数領域への変換方法、及びループフィルタのフィルタ係数のうち、少なくとも1つを含む請求項1に記載の画像符号化装置。 The image coding apparatus according to claim 1, wherein the mode includes at least one of an intra prediction direction, a motion vector, inter prediction or intra prediction, a conversion method to a frequency domain, and a filter coefficient of a loop filter. コンピュータに、
画像を分割したブロックに含まれる第1のブロックについて、前記第1のブロックのみの情報を用いてモードを決定するステップと、
前記第1のブロックに隣接する第2のブロックについて、前記第1のブロックのモードと、前記第2のブロックのモードの差分値から計算される第1の発生情報量R、及び、前記第2のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第1の誤差Dに基づいたRD最適化により、前記第2のブロックの符号化で利用されるモードを仮決めするステップと、
仮決めした前記第2のブロックのモードと、前記第2のブロックに隣接する第3のブロックとの差分値から計算される第2の発生情報量R、及び、前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第2の誤差Dに基づいたRD最適化により、前記第3のブロックの符号化で利用されるモードを仮決めするステップと、
前記第2のブロックのモードを、前記第1の発生情報量R、前記第2の発生情報量R、前記第1の誤差D、及び前記第2の誤差Dに基づいたRD最適化により決定するステップと、
該決定した前記第2のブロックのモード、及び前記第3のブロックのモードとの差分値から計算される第3の発生情報量Rと、前記前記第3のブロックの符号化及び局所的な復号がされた画像と原画像との差分を示す第3の誤差Dとに基づいたRD最適化により、前記前記第3のブロックの仮決めされたモードを再度仮決めするステップと、
前記決定するステップにより決定された各ブロックのモードを用いて、前記各ブロックの符号化を行うステップと、
を実行させる画像符号化プログラム。
On the computer,
For a first block included in a block obtained by dividing an image, determining a mode using information of only the first block;
For the second block adjacent to the first block, the first generated information amount R calculated from the difference value between the mode of the first block and the mode of the second block , and the second of the coding and RD optimization based on first error D showing the difference between the local decoded image and the original image of the block, provisionally the mode used in the encoding of the second block Steps to decide,
And mode temporarily determined with the second block, the encoding of the second generated information amount R calculated from the difference value between the third block adjacent to the second block, and the third block And tentatively determining a mode used in the encoding of the third block by RD optimization based on the second error D indicating a difference between the locally decoded image and the original image;
The mode of the second block is determined by RD optimization based on the first generated information amount R, the second generated information amount R, the first error D, and the second error D. Steps,
A third generated information amount R calculated from a difference value between the determined mode of the second block and the mode of the third block, and encoding and local decoding of the third block Tentatively determining the tentatively determined mode of the third block again by RD optimization based on the third error D indicating the difference between the image and the original image ;
With the mode of the block determined by said determining step, a step of coding each block,
An image encoding program for executing
JP2012246645A 2012-11-08 2012-11-08 Image encoding apparatus and image encoding program Active JP6130648B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012246645A JP6130648B2 (en) 2012-11-08 2012-11-08 Image encoding apparatus and image encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012246645A JP6130648B2 (en) 2012-11-08 2012-11-08 Image encoding apparatus and image encoding program

Publications (2)

Publication Number Publication Date
JP2014096679A JP2014096679A (en) 2014-05-22
JP6130648B2 true JP6130648B2 (en) 2017-05-17

Family

ID=50939439

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012246645A Active JP6130648B2 (en) 2012-11-08 2012-11-08 Image encoding apparatus and image encoding program

Country Status (1)

Country Link
JP (1) JP6130648B2 (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4127818B2 (en) * 2003-12-24 2008-07-30 株式会社東芝 Video coding method and apparatus
JP4697802B2 (en) * 2006-08-28 2011-06-08 Kddi株式会社 Video predictive coding method and apparatus
JP4813328B2 (en) * 2006-11-10 2011-11-09 シャープ株式会社 Encoding apparatus, encoding method, and program
JP2009055542A (en) * 2007-08-29 2009-03-12 Toshiba Corp Moving image encoder and moving image encoding method
JP5126096B2 (en) * 2009-02-05 2013-01-23 日本電気株式会社 Image coding processing method, image coding processing apparatus, and image coding program
JP2011091498A (en) * 2009-10-20 2011-05-06 Victor Co Of Japan Ltd Moving image coder, moving image decoder, moving image coding method, and moving image decoding method
JP2012019490A (en) * 2010-07-09 2012-01-26 Sony Corp Image processing device and image processing method
JP2012147332A (en) * 2011-01-13 2012-08-02 Sony Corp Encoding device, encoding method, decoding device, and decoding method
WO2012124121A1 (en) * 2011-03-17 2012-09-20 富士通株式会社 Moving image decoding method, moving image coding method, moving image decoding device and moving image decoding program
WO2012147947A1 (en) * 2011-04-28 2012-11-01 シャープ株式会社 Image decoding apparatus and image encoding apparatus

Also Published As

Publication number Publication date
JP2014096679A (en) 2014-05-22

Similar Documents

Publication Publication Date Title
RU2696318C1 (en) Improved intra-frame prediction encoding with planar prediction
US8442333B2 (en) Parallel processing image encoding device with variable length coding
JP5711098B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, and programs thereof
KR20060105352A (en) Method and apparatus for intra prediction
JP2009094828A (en) Device and method for encoding image, and device and method for decoding image
JP5594841B2 (en) Image encoding apparatus and image decoding apparatus
JP6961115B2 (en) Image decoding device, image decoding method and program
JP2013090120A (en) Image coding method, image decoding method, image coder, image decoder, and program thereof
JP2014096638A (en) Image encoder, image encoding method, image encoding program, image decoder, image decoding method and image decoding program
WO2011086672A1 (en) Moving image coding device and decoding device
JP6130648B2 (en) Image encoding apparatus and image encoding program
AU2020354500B2 (en) Efficient implementation of matrix-based intra-prediction
JP2010035025A (en) Encoding device and method therefor
JP7061737B1 (en) Image decoder, image decoding method and program
JP7083971B1 (en) Image decoder, image decoding method and program
JP7034363B2 (en) Image decoder, image decoding method and program
JP7444599B2 (en) Intra prediction device, image encoding device, image decoding device, and program
JP2013098735A (en) Image encoder, image encoding method and program, image decoder, and image decoding method and program
JP2018110313A (en) Moving image encoding device, moving image encoding method, computer program for moving image encoding, moving image decoding device, moving image decoding method, and computer program for moving image decoding
WO2020184262A1 (en) Image decoding device, image decoding method, and program
JP6917718B2 (en) Predictors, encoders, decoders, and programs
JP6700877B2 (en) Image decoding device, image decoding program and chip
JP2021118525A (en) Coding device, decoding device, and program
KR101802304B1 (en) Methods of encoding using hadamard transform and apparatuses using the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160621

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161220

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170216

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: 20170321

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170414

R150 Certificate of patent or registration of utility model

Ref document number: 6130648

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250