JP2009071472A - Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit - Google Patents

Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit Download PDF

Info

Publication number
JP2009071472A
JP2009071472A JP2007236300A JP2007236300A JP2009071472A JP 2009071472 A JP2009071472 A JP 2009071472A JP 2007236300 A JP2007236300 A JP 2007236300A JP 2007236300 A JP2007236300 A JP 2007236300A JP 2009071472 A JP2009071472 A JP 2009071472A
Authority
JP
Japan
Prior art keywords
pixel
difference
absolute value
value
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007236300A
Other languages
Japanese (ja)
Inventor
Masaki Ishikawa
真己 石川
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007236300A priority Critical patent/JP2009071472A/en
Publication of JP2009071472A publication Critical patent/JP2009071472A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image encoder or the like capable of accurately encoding images even when a strong edge part is present. <P>SOLUTION: The image encoder 10 includes: a first difference absolute value calculation part 21 for calculating the absolute value dH of a difference between a pixel C' positioned at the upper left of an encoding object pixel D and a pixel B' positioned above the pixel D; a second difference absolute value calculation part 22 for calculating the absolute value dV of a difference between the pixel C' and a pixel A' positioned at the left of the pixel D; a difference calculation part 23 for calculating a difference dF between the dH and the dV; a predicted value calculation part 24 for calculating the predicted value P of the pixel D on the basis of the dF; a pixel predicted value difference calculation part 25 for calculating a difference d between the pixel D and the predicted value P; and a quantization part 26 for quantizing the difference d. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像データを符号化する画像符号化方法及びそのような画像符号化方法によって符号化された画像データを復号化する画像復号化方法に関する。また、本発明は、画像データを符号化する画像符号化装置及びそのような画像符号化装置によって符号化された画像データを復号化する画像復号化装置に関する。さらに、本発明は、そのような画像符号化装置及び画像復号化装置を含む半導体集積回路に関する。   The present invention relates to an image encoding method for encoding image data and an image decoding method for decoding image data encoded by such an image encoding method. The present invention also relates to an image encoding apparatus that encodes image data and an image decoding apparatus that decodes image data encoded by such an image encoding apparatus. Furthermore, the present invention relates to a semiconductor integrated circuit including such an image encoding device and an image decoding device.

従来より、符号化対象画素を、符号化対象画素の周辺の画素に基づいて符号化することが行われている。このような画像の符号化について、図9を参照しながら説明する。   Conventionally, an encoding target pixel has been encoded based on pixels around the encoding target pixel. Such image encoding will be described with reference to FIG.

図9に示すように、符号化対象画素Xの左に位置する画素をA、符号化対象画素Xの上に位置する画素をB、符号化対象画素Xの左上に位置する画素をCとすると、符号化対象画素Xの予測値X'を、
X'=A/2+(C+B)/4 ・・・(1)
により算出することが行われている。
As shown in FIG. 9, when the pixel located on the left of the encoding target pixel X is A, the pixel located on the encoding target pixel X is B, and the pixel located on the upper left of the encoding target pixel X is C. , The predicted value X ′ of the encoding target pixel X is
X ′ = A / 2 + (C + B) / 4 (1)
It is calculated by.

しかしながら、テキストの端部のような強エッジ部が画素A、B、C、X間に存在するような場合には、上記の(1)式で算出される予測値X'は符号化対象画素Xから大きくずれた値になってしまうことがある。   However, when a strong edge portion such as an end portion of text exists between the pixels A, B, C, and X, the predicted value X ′ calculated by the above equation (1) is the encoding target pixel. The value may be greatly deviated from X.

また、下記の特許文献1には、圧縮・伸張の過程を経てもとの情報が保存される無損失画像圧縮を行う画像圧縮装置において、デジタル画像信号を入力し、予測対象画素の周辺にある参照可能な画素の個々の相関関係を評価する画素相関評価手段と、画素間の相関評価を最大ならしめるような最適適応処理係数を算出する最適値算出手段と、最適適応処理係数と予測対象画素とからDPCM符号化画像信号を生成するDPCM符号化手段と、DPCM符号化画像信号をエントロピー符号化するエントロピー符号化手段と、を備えたことを特徴とする画像圧縮装置が掲載されている。   Further, in Patent Document 1 below, in an image compression apparatus that performs lossless image compression in which original information is stored through a compression / expansion process, a digital image signal is input and is located around a prediction target pixel. Pixel correlation evaluation means for evaluating individual correlations of referenceable pixels, optimum value calculation means for calculating an optimum adaptive processing coefficient that maximizes correlation evaluation between pixels, optimum adaptive processing coefficient, and prediction target pixel And an entropy encoding means for entropy encoding the DPCM encoded image signal. The image compression apparatus includes a DPCM encoding means for generating a DPCM encoded image signal from the above and an entropy encoding means for entropy encoding the DPCM encoded image signal.

しかしながら、予測対象画素の周辺にある参照可能な画素の個々の相関関係を評価し、さらに画素間の相関評価を最大ならしめるような最適適応処理係数を算出するには、処理が複雑になるとともに処理量が多くなり、また、参照画素を格納するために必要なメモリ容量が多くなる。さらに、場合によっては、識別のための符号が必要になり符号量が増大してしまう。   However, in order to evaluate the individual correlation of the referenceable pixels around the prediction target pixel and to calculate the optimum adaptive processing coefficient that maximizes the correlation evaluation between the pixels, the process becomes complicated. The amount of processing increases, and the memory capacity required to store the reference pixels increases. Furthermore, in some cases, a code for identification is required, and the amount of codes increases.

特開2001−77700号公報JP 2001-77700 A

本発明は、以上のような技術的課題に鑑みてなされたものであり、その目的とするところは、強エッジ部が存在するような場合であっても、画像を簡単な処理及び構成で的確に符号化することが可能な画像符号化方法及び画像符号化装置を提供することにある。また、本発明は、そのような画像符号化方法及び画像符号化装置によって符号化された画像を復号化する画像復号化方法及び画像復号化装置を提供する。また、本発明は、そのような画像符号化装置及び画像復号化装置を含む半導体集積回路を提供することにある。   The present invention has been made in view of the technical problems as described above, and an object of the present invention is to ensure that an image is accurately processed with simple processing and configuration even when a strong edge portion is present. It is an object of the present invention to provide an image encoding method and an image encoding apparatus that can be encoded. The present invention also provides an image decoding method and an image decoding apparatus for decoding an image encoded by such an image encoding method and an image encoding apparatus. Another object of the present invention is to provide a semiconductor integrated circuit including such an image encoding device and an image decoding device.

本発明は、複数の画素を含む画像データ内の符号化対象画素を、第1の方向において符号化対象画素に隣接する第1の画素と、第1の方向と交差する第2の方向において符号化対象画素に隣接する第2の画素と、第2の方向において第1の画素に隣接し且つ第1の方向において第2の画素に隣接する第3の画素とに基づいて符号化する画像符号化装置であって、第3の画素と第2の画素との差分の絶対値が第3の画素と第1の画素との差分の絶対値より大きい場合には、第2の画素を第1の画素より大きい重みで、第3の画素と第2の画素との差分の絶対値が第3の画素と第1の画素との差分の絶対値より小さい場合には、第2の画素を第1の画素より小さい重みで、第1の画素及び第2の画素に重み付け演算を行うことにより符号化対象画素の予測値を算出し、符号化対象画素と予測値との差分を量子化することにより符号化対象画素を符号化する、画像符号化装置に関係する。   The present invention encodes an encoding target pixel in image data including a plurality of pixels in a first direction adjacent to the encoding target pixel in the first direction and in a second direction intersecting the first direction. An image code to be encoded based on a second pixel adjacent to the pixel to be converted and a third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction When the absolute value of the difference between the third pixel and the second pixel is larger than the absolute value of the difference between the third pixel and the first pixel, the second pixel is changed to the first pixel. If the absolute value of the difference between the third pixel and the second pixel is smaller than the absolute value of the difference between the third pixel and the first pixel with a weight greater than the second pixel, The encoding target image is obtained by performing a weighting operation on the first pixel and the second pixel with a weight smaller than one pixel. And of calculating the predicted value, to encode the encoding target pixel by quantizing the difference between the coded pixel and the predicted value, related to the image coding apparatus.

本発明によれば、強エッジ部が存在するような場合であっても、画像を的確に符号化することができるようになる。   According to the present invention, it is possible to accurately encode an image even when a strong edge portion exists.

また、本発明は、複数の画素を含む画像データ内の符号化対象画素を、第1の方向において符号化対象画素に隣接する第1の画素と、第1の方向と交差する第2の方向において符号化対象画素に隣接する第2の画素と、第2の方向において第1の画素に隣接し且つ第1の方向において第2の画素に隣接する第3の画素とに基づいて符号化する画像符号化方法であって、第3の画素と第2の画素との差分の絶対値を算出するステップ(a)と、第3の画素と第1の画素との差分の絶対値を算出するステップ(b)と、符号化対象画素に対する第1の画素及び第2の画素の重み付けを表す重み付け係数を算出するステップであって、第3の画素と第2の画素との差分の絶対値が第3の画素と第1の画素との差分の絶対値より大きい場合には、第2の画素を第1の画素より大きい重みとする重み付け係数を算出し、第3の画素と第2の画素との差分の絶対値が第3の画素と第1の画素との差分の絶対値より小さい場合には、第2の画素を第1の画素より小さい重みとする重み付け係数を算出するステップ(c)と、重み付け係数を用いて、第1の画素及び第2の画素に重み付け演算を行うことにより、符号化対象画素の予測値を算出するステップ(d)と、符号化対象画素と予測値との差分を算出するステップ(e)と、ステップ(e)にて算出された値を量子化するステップ(f)と、を含む、画像符号化方法に関係する。   According to the present invention, an encoding target pixel in image data including a plurality of pixels is divided into a first pixel adjacent to the encoding target pixel in the first direction and a second direction intersecting the first direction. Are encoded based on the second pixel adjacent to the encoding target pixel and the third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction. In the image encoding method, the step (a) of calculating the absolute value of the difference between the third pixel and the second pixel, and the absolute value of the difference between the third pixel and the first pixel are calculated. Step (b) and a step of calculating a weighting coefficient representing weighting of the first pixel and the second pixel with respect to the encoding target pixel, wherein an absolute value of a difference between the third pixel and the second pixel is If the absolute value of the difference between the third pixel and the first pixel is greater than the second pixel, A weighting coefficient that calculates a weight greater than the first pixel is calculated, and the absolute value of the difference between the third pixel and the second pixel is smaller than the absolute value of the difference between the third pixel and the first pixel. In this case, the step (c) of calculating a weighting coefficient that sets the second pixel to be smaller in weight than the first pixel, and performing the weighting operation on the first pixel and the second pixel using the weighting coefficient. To calculate the prediction value of the encoding target pixel (d), to calculate the difference between the encoding target pixel and the prediction value (e), and to quantize the value calculated in step (e) Step (f).

本発明によれば、強エッジ部が存在するような場合であっても、画像を的確に符号化することができるようになる。   According to the present invention, it is possible to accurately encode an image even when a strong edge portion exists.

また、本発明では、ステップ(c)が、第3の画素と第2の画素との差分の絶対値と第3の画素と第1の画素との差分の絶対値との差分が所与の第1の閾値より大きい場合には、所与の第1の値を重み付け係数とし、第3の画素と第2の画素との差分の絶対値と第3の画素と第1の画素との差分の絶対値との差分が所与の第2の閾値より小さい場合には、所与の第2の値を重み付け係数とし、第3の画素と第2の画素との差分の絶対値と第3の画素と第1の画素との差分の絶対値との差分が第1の閾値より小さく且つ第2の閾値より大きい場合には、第1の値と第2の値とを補間して得られた値を重み付け係数とするようにしても良い。   Further, in the present invention, the step (c) includes the step of calculating the difference between the absolute value of the difference between the third pixel and the second pixel and the absolute value of the difference between the third pixel and the first pixel. If greater than the first threshold, the given first value is a weighting factor, and the absolute value of the difference between the third pixel and the second pixel and the difference between the third pixel and the first pixel If the difference from the absolute value of the second pixel is smaller than the given second threshold value, the given second value is used as a weighting factor, and the absolute value of the difference between the third pixel and the second pixel is equal to the third value. When the difference between the absolute value of the difference between the first pixel and the first pixel is smaller than the first threshold and larger than the second threshold, the first value and the second value are interpolated. The obtained value may be used as a weighting coefficient.

このようにすれば、簡単な演算により、重み付け係数を算出することができるようになる。   In this way, the weighting coefficient can be calculated by a simple calculation.

また、本発明では、複数の画素の各々が複数の成分を含み、符号化対象画素の成分の各々について、ステップ(a)〜ステップ(f)を行うようにしても良い。   In the present invention, each of the plurality of pixels may include a plurality of components, and steps (a) to (f) may be performed for each of the components of the encoding target pixel.

このようにすれば、画素が複数の成分を含む場合であっても、画像を的確に符号化することができるようになる。   In this way, even if a pixel includes a plurality of components, an image can be encoded accurately.

また、本発明では、複数の画素の各々がR成分、G成分、及び、B成分を含み、符号化対象画素のR成分、G成分、及び、B成分の各々について、ステップ(a)〜ステップ(f)を行うようにしても良い。   In the present invention, each of the plurality of pixels includes an R component, a G component, and a B component. For each of the R component, the G component, and the B component of the encoding target pixel, steps (a) to (step) are performed. (F) may be performed.

また、本発明では、ステップ(f)にて算出された値を逆量子化するステップ(g)と、ステップ(d)にて算出された予測値とステップ(g)にて算出された値とを加算した値をバッファに格納するステップ(h)と、を更に含み、ステップ(h)にてバッファに格納された値を、第1の方向と逆方向において符号化対象画素に隣接する第4の画素、第2の方向と逆方向において符号化対象画素と隣接する第5の画素、及び/又は、第2の方向と逆方向において第4の画素に隣接し且つ第1の方向と逆方向において第5の画素に隣接する第6の画素を符号化する際に用いるようにしても良い。   In the present invention, the step (g) for dequantizing the value calculated in step (f), the predicted value calculated in step (d), and the value calculated in step (g) And a step (h) of storing the value added to the buffer in the buffer, and the value stored in the buffer in the step (h) is set to the fourth direction adjacent to the encoding target pixel in the direction opposite to the first direction. The fifth pixel adjacent to the pixel to be encoded in the direction opposite to the second direction and / or the fourth pixel in the direction opposite to the second direction and the direction opposite to the first direction. May be used when encoding a sixth pixel adjacent to the fifth pixel.

また、本発明は、本発明に係る画像符号化方法によって符号化された画像データ内の復号化対象画素を、第1の方向において復号化対象画素に隣接する第1の画素と、第1の方向と交差する第2の方向において復号化対象画素に隣接する第2の画素と、第2の方向において第1の画素に隣接し且つ第1の方向において第2の画素に隣接する第3の画素とに基づいて復号化する画像復号化方法であって、第3の画素と前記第2の画素との差分の絶対値を算出するステップ(a)と、第3の画素と第1の画素との差分の絶対値を算出するステップ(b)と、符号化対象画素に対する第1の画素及び第2の画素の重み付けを表す重み付け係数を算出するステップであって、第3の画素と第2の画素との差分の絶対値が第3の画素と第1の画素との差分の絶対値より大きい場合には、第2の画素を第1の画素より大きい重みとする重み付け係数を算出し、第3の画素と第2の画素との差分の絶対値が第3の画素と第1の画素との差分の絶対値より小さい場合には、第2の画素を第1の画素より小さい重みとする重み付け係数を算出するステップ(c)と、重み付け係数を用いて、第1の画素及び第2の画素に重み付け演算を行うことにより、復号化対象画素の予測値を算出するステップ(d)と、復号化対象画素を逆量子化するステップ(e)と、ステップ(d)にて算出された予測値とステップ(e)にて算出された値とを加算するステップ(f)と、を含む、画像復号化方法に関係する。   In addition, the present invention provides a decoding target pixel in image data encoded by the image encoding method according to the present invention, a first pixel adjacent to the decoding target pixel in the first direction, A second pixel adjacent to the pixel to be decoded in a second direction intersecting the direction, and a third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction. An image decoding method for decoding based on a pixel, the step (a) of calculating an absolute value of a difference between a third pixel and the second pixel, and the third pixel and the first pixel Calculating an absolute value of a difference between the first pixel and the second pixel, and calculating a weighting coefficient representing a weighting of the first pixel and the second pixel with respect to the encoding target pixel, the third pixel and the second pixel The absolute value of the difference from the pixel is the difference between the third pixel and the first pixel Is greater than the absolute value of the first pixel, a weighting coefficient is calculated that sets the second pixel as a weight greater than the first pixel, and the absolute value of the difference between the third pixel and the second pixel is When the absolute value of the difference from the first pixel is smaller than the first pixel, the step (c) of calculating a weighting coefficient that sets the second pixel as a weight smaller than the first pixel, Performing a weighting operation on the pixel and the second pixel to calculate a prediction value of the decoding target pixel, a step (e) of dequantizing the decoding target pixel, and a step (d) And the step (f) of adding the predicted value calculated in step (e) to the value calculated in step (e).

本発明によれば、本発明に係る画像符号化方法によって符号化された画像データを的確に復号化することができるようになる。   According to the present invention, image data encoded by the image encoding method according to the present invention can be accurately decoded.

また、本発明は、複数の画素を含む画像データ内の符号化対象画素を、第1の方向において符号化対象画素に隣接する第1の画素と、第1の方向と交差する第2の方向において符号化対象画素に隣接する第2の画素と、第2の方向において第1の画素に隣接し且つ第1の方向において第2の画素に隣接する第3の画素とに基づいて符号化する画像符号化装置であって、第3の画素と第2の画素との差分の絶対値を算出する第1差分絶対値算出部と、第3の画素と第1の画素との差分の絶対値を算出する第2差分絶対値算出部と、第1差分絶対値算出部にて算出された差分の絶対値と第2差分絶対値算出部にて算出された差分の絶対値との差分を算出する差分算出部と、差分算出部にて算出された差分に基づいて、符号化対象画素の予測値を算出する予測値算出部と、符号化対象画素と予測値算出部にて算出された予測値との差分を算出する画素予測値差分算出部と、画素予測値差分算出部にて算出された差分を量子化する量子化部と、を含む、画像符号化装置に関係する。   According to the present invention, an encoding target pixel in image data including a plurality of pixels is divided into a first pixel adjacent to the encoding target pixel in the first direction and a second direction intersecting the first direction. Are encoded based on the second pixel adjacent to the encoding target pixel and the third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction. An image encoding device, a first difference absolute value calculation unit that calculates an absolute value of a difference between a third pixel and a second pixel, and an absolute value of a difference between the third pixel and the first pixel The difference between the absolute value of the difference calculated by the second difference absolute value calculation unit, the difference absolute value calculated by the first difference absolute value calculation unit, and the absolute value of the difference calculated by the second difference absolute value calculation unit is calculated. And a prediction value of the pixel to be encoded is calculated based on the difference calculated by the difference calculation unit and the difference calculated by the difference calculation unit. A prediction value calculation unit that calculates a difference between a prediction target pixel and a prediction value calculated by the prediction value calculation unit, and a difference calculated by the pixel prediction value difference calculation unit. The present invention relates to an image encoding device including a quantization unit that performs quantization.

本発明によれば、強エッジ部が存在するような場合であっても、画像を的確に符号化することができるようになる。   According to the present invention, it is possible to accurately encode an image even when a strong edge portion exists.

また、本発明では、複数の画素の各々が複数の成分を含み、第1差分絶対値算出部、第2差分絶対値算出部、差分算出部、予測値算出部、画素予測値差分算出部、及び、量子化部の組を複数有し、各組が符号化対象画素の各成分を並列して符号化するようにしても良い。   In the present invention, each of the plurality of pixels includes a plurality of components, and the first difference absolute value calculation unit, the second difference absolute value calculation unit, the difference calculation unit, the prediction value calculation unit, the pixel prediction value difference calculation unit, In addition, a plurality of sets of quantization units may be provided, and each set may encode each component of the encoding target pixel in parallel.

このようにすれば、画素が複数の成分を含む場合であっても、画像を高速に符号化することができるようになる。   In this way, even when a pixel includes a plurality of components, an image can be encoded at high speed.

また、本発明は、本発明に係る画像符号化装置によって符号化された画像データ内の復号化対象画素を、第1の方向において復号化対象画素に隣接する第1の画素と、第1の方向と交差する第2の方向において復号化対象画素に隣接する第2の画素と、第2の方向において第1の画素に隣接し且つ第1の方向において第2の画素に隣接する第3の画素とに基づいて復号化する画像復号化装置であって、第3の画素と第2の画素との差分の絶対値を算出する第1差分絶対値算出部と、第3の画素と第1の画素との差分の絶対値を算出する第2差分絶対値算出部と、第1差分絶対値算出部にて算出された差分の絶対値と第2差分絶対値算出部にて算出された差分の絶対値との差分を算出する差分算出部と、差分算出部にて算出された差分に基づいて、復号化対象画素の予測値を算出する予測値算出部と、復号化対象画素を逆量子化する逆量子化部と、予測値算出部にて算出された予測値と逆量子化部にて算出された値とを加算することにより、復号化対象画素を復号化する復号化部と、を含む、画像復号化装置に関係する。   The present invention also provides a decoding target pixel in image data encoded by the image encoding apparatus according to the present invention, a first pixel adjacent to the decoding target pixel in the first direction, A second pixel adjacent to the pixel to be decoded in a second direction intersecting the direction, and a third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction. An image decoding apparatus that performs decoding based on a pixel, a first difference absolute value calculation unit that calculates an absolute value of a difference between a third pixel and a second pixel, a third pixel, and a first pixel A second difference absolute value calculation unit that calculates an absolute value of a difference from the pixel, a difference absolute value calculated by the first difference absolute value calculation unit, and a difference calculated by the second difference absolute value calculation unit Based on the difference calculated by the difference calculator and the difference calculated by the difference calculator A prediction value calculation unit that calculates a prediction value of a decoding target pixel, an inverse quantization unit that inversely quantizes the decoding target pixel, and a prediction value and an inverse quantization unit calculated by the prediction value calculation unit. The present invention relates to an image decoding device including a decoding unit that decodes a decoding target pixel by adding the calculated value.

本発明によれば、本発明に係る画像符号化装置によって符号化された画像データを的確に復号化することができるようになる。   According to the present invention, the image data encoded by the image encoding device according to the present invention can be accurately decoded.

また、本発明は、本発明に係る画像符号化装置と、画像符号化装置によって符号化された画像データを格納するメモリと、メモリに格納されている画像データを復号化する本発明に係る画像復号化装置と、を含む、半導体集積回路に関係する。   The present invention also provides an image encoding device according to the present invention, a memory for storing image data encoded by the image encoding device, and an image according to the present invention for decoding image data stored in the memory. The present invention relates to a semiconductor integrated circuit including a decoding device.

本発明によれば、画像データを格納するために必要なメモリ容量を小さく抑えることができるようになる。   According to the present invention, the memory capacity required for storing image data can be reduced.

以下、本発明の実施形態について詳細に説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが本発明の解決手段として必須であるとは限らない。また同一の構成要素には同一の参照番号を付して説明を省略する。   Hereinafter, embodiments of the present invention will be described in detail. In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. Further, not all of the configurations described in the present embodiment are essential as a solution means of the present invention. The same constituent elements are denoted by the same reference numerals and description thereof is omitted.

図1に、本発明の一実施形態に係る画像符号化装置の構成例を示す。この画像符号化装置10は、画像信号(フレームデータ)が入力される画像符号化部11と、ラインバッファ(FIFOバッファ)12とを含む。なお、画像符号化装置10を半導体集積回路として実現しても良い。   FIG. 1 shows a configuration example of an image encoding apparatus according to an embodiment of the present invention. The image encoding device 10 includes an image encoding unit 11 to which an image signal (frame data) is input, and a line buffer (FIFO buffer) 12. Note that the image encoding device 10 may be realized as a semiconductor integrated circuit.

ここで、画像符号化装置10に入力されるフレームデータについて説明する。本実施形態においては、図2に示すように、1つのフレームデータは主走査線方向(ここではX方向)に320列、副走査線方向(ここではY方向)に240行の計320×240個の画素を含んでいる。フレームデータの各画素は座標(0,0)、(1,0)、・・・、(319,0)、(0,1)、・・・、(319,239)の順に画像符号化装置10に順次入力され、画像符号化装置10は順次入力される画素毎に順次符号化して順次出力する。   Here, the frame data input to the image encoding device 10 will be described. In this embodiment, as shown in FIG. 2, one frame data has 320 columns in the main scanning line direction (here X direction) and 240 rows in the sub scanning line direction (here Y direction). Contains pixels. Each pixel of the frame data is an image encoding device in the order of coordinates (0, 0), (1, 0), ..., (319, 0), (0, 1), ..., (319, 239). 10 is sequentially input, and the image encoding device 10 sequentially encodes and sequentially outputs each pixel that is sequentially input.

図2において、画素Dが符号化対象画素であるとする場合には、符号化対象画素Dの左上に位置する画素C'から符号化対象画素Dの左隣に位置する画素A'までの計321個の画素が、ラインバッファ12(図1参照)に格納される。なお、ラインバッファ12に格納される画素は、外部から画像符号化装置10に入力された原画素(画素A、画素B、画素C、・・・)ではなく、画像符号化装置10において符号化され更に復号化された画素(画素A'、画素B'、画素C'、・・・)である。このように、本実施形態においては、符号化され更に復号化された画素には「'」を付加して表すものとする。   In FIG. 2, when the pixel D is an encoding target pixel, the total from the pixel C ′ positioned at the upper left of the encoding target pixel D to the pixel A ′ positioned adjacent to the left of the encoding target pixel D. 321 pixels are stored in the line buffer 12 (see FIG. 1). Note that the pixels stored in the line buffer 12 are not the original pixels (pixel A, pixel B, pixel C,...) Input to the image encoding device 10 from the outside, but are encoded by the image encoding device 10. Further decoded pixels (pixel A ′, pixel B ′, pixel C ′,...). Thus, in the present embodiment, “′” is added to the encoded and further decoded pixels.

なお、本実施形態においては、各画素は、8ビット幅であり、0〜255までの値をとり得るものとして説明する。各画素が複数の成分(例えば、RGB、YUV、YCbCr等)を含む場合には、画像符号化装置10が、符号化対象画素の成分毎に順次符号化するようにしても良い。例えば、各画素がRGB成分を含む場合には、画像符号化装置10が、各画素のR成分、G成分、B成分を成分毎に順次符号化するようにしても良い。或いは、画像符号化装置10が画像符号化部11とラインバッファ12との組を画素の成分の数と同数組含むようにし、各組が符号化対象画素の各成分の符号化を並列に行うようにしても良い。例えば、各画素がRGB成分を含む場合には、画像符号化装置10が画像符号化部11とラインバッファ12との組を3組含むようにし、各組が符号化対象画素のR成分、G成分、B成分の符号化を並列に行うようにしても良い。このようにすれば、画素が複数の成分を含む場合であっても、高速に符号化を行うことができる。   In the present embodiment, each pixel is described as having an 8-bit width and can take a value from 0 to 255. When each pixel includes a plurality of components (for example, RGB, YUV, YCbCr, etc.), the image encoding device 10 may sequentially encode each component of the encoding target pixel. For example, when each pixel includes an RGB component, the image encoding device 10 may sequentially encode the R component, the G component, and the B component of each pixel for each component. Alternatively, the image encoding device 10 includes the same number of sets of the image encoding unit 11 and the line buffer 12 as the number of pixel components, and each set encodes each component of the encoding target pixel in parallel. You may do it. For example, when each pixel includes an RGB component, the image encoding device 10 includes three sets of the image encoding unit 11 and the line buffer 12, and each set includes an R component of the encoding target pixel, G The encoding of the component and the B component may be performed in parallel. In this way, even when a pixel includes a plurality of components, encoding can be performed at high speed.

各画素がRGB成分を含む場合に、一例として、各画素を、R(赤)成分を8ビット幅、G(緑)成分を8ビット幅、B(青)成分を8ビット幅の計24ビット幅としても良い。   When each pixel includes an RGB component, as an example, each pixel has an R (red) component of 8 bits wide, a G (green) component of 8 bits wide, and a B (blue) component of 8 bits wide for a total of 24 bits. It is good also as width.

再び図1を参照すると、画像符号化部11は、第1差分絶対値算出部21と、第2差分絶対値算出部22と、差分算出部23と、予測値算出部24と、画素予測値差分算出部25と、量子化部26と、逆量子化部27と、復号化部28とを含む。   Referring to FIG. 1 again, the image encoding unit 11 includes a first difference absolute value calculation unit 21, a second difference absolute value calculation unit 22, a difference calculation unit 23, a predicted value calculation unit 24, and a pixel predicted value. The difference calculation unit 25, the quantization unit 26, the inverse quantization unit 27, and the decoding unit 28 are included.

第1差分絶対値算出部21は、符号化対象画素の左上に位置する画素と符号化対象画素の上隣に位置する画素との差分の絶対値を算出する。   The first difference absolute value calculation unit 21 calculates the absolute value of the difference between the pixel located at the upper left of the encoding target pixel and the pixel located above the encoding target pixel.

第2差分絶対値算出部22は、符号化対象画素の左上に位置する画素と符号化対象画素の左隣に位置する画素との差分の絶対値を算出する。   The second difference absolute value calculation unit 22 calculates the absolute value of the difference between the pixel located on the upper left of the encoding target pixel and the pixel located on the left adjacent to the encoding target pixel.

差分算出部23は、第1差分絶対値算出部21によって算出された値と第2差分絶対値算出部22によって算出された値との差分を算出する。
予測値算出部24は、差分算出部23によって算出された値に基づいて、符号化対象画素の予測値を算出する。
The difference calculation unit 23 calculates a difference between the value calculated by the first difference absolute value calculation unit 21 and the value calculated by the second difference absolute value calculation unit 22.
The predicted value calculation unit 24 calculates the predicted value of the encoding target pixel based on the value calculated by the difference calculation unit 23.

画素予測値差分算出部25は、符号化対象画素と予測値算出部24によって算出された予測値との差分を算出する。
量子化部26は、画素予測値差分算出部25によって算出された値を量子化する。量子化部26によって量子化された値は、後段の外部回路に出力される。
逆量子化部27は、量子化部26によって算出された値を逆量子化する。
The pixel prediction value difference calculation unit 25 calculates a difference between the encoding target pixel and the prediction value calculated by the prediction value calculation unit 24.
The quantization unit 26 quantizes the value calculated by the pixel prediction value difference calculation unit 25. The value quantized by the quantization unit 26 is output to the external circuit at the subsequent stage.
The inverse quantization unit 27 performs inverse quantization on the value calculated by the quantization unit 26.

復号化部28は、逆量子化部27によって逆量子化された値と予測値算出部24によって算出された予測値とを加算することにより、符号化対象画素を復号化する。復号化部28によって復号化された画素は、ラインバッファ12に格納され、後の画素(今回の符号化対象画素の右隣に位置する画素、今回の符号化対象画素の下隣に位置する画素、今回の符号化対象画素の右下に位置する画素)の符号化に用いられる。   The decoding unit 28 decodes the encoding target pixel by adding the value inversely quantized by the inverse quantization unit 27 and the prediction value calculated by the prediction value calculation unit 24. The pixels decoded by the decoding unit 28 are stored in the line buffer 12, and the subsequent pixels (the pixel located on the right side of the current encoding target pixel, the pixel positioned on the lower side of the current encoding target pixel) , The pixel located at the lower right of the current pixel to be encoded).

次に、画像符号化装置10の動作について説明する。   Next, the operation of the image encoding device 10 will be described.

図3は、画像符号化装置10が実行する処理を示すフローチャートである。画像符号化装置10は、外部から画素(符号化対象画素)が入力される都度、図3に示す処理を実行する。なお、各画素が複数の成分を含む場合には、図3に示す処理を復号化対象画素の成分毎に実行するようにしても良い。   FIG. 3 is a flowchart showing processing executed by the image encoding device 10. The image encoding device 10 executes the process shown in FIG. 3 every time a pixel (encoding target pixel) is input from the outside. If each pixel includes a plurality of components, the processing shown in FIG. 3 may be executed for each component of the decoding target pixel.

まず、第1差分絶対値算出部21が、符号化対象画素(ここでは画素Dとする(図2参照)。)の左上に位置する画素(ここでは画素C'とする(図2参照)。)と符号化対象画素Dの上隣に位置する画素(ここでは画素B'とする(図2参照)。)との差分の絶対値dHを
dH=|C'−B'| ・・・(2)
により算出する(ステップS11)。
First, the first difference absolute value calculation unit 21 sets a pixel (here, pixel C ′ (see FIG. 2)) positioned at the upper left of the pixel to be encoded (here, pixel D (see FIG. 2)). ) And a pixel (here, referred to as a pixel B ′ (see FIG. 2)) positioned above the encoding target pixel D, an absolute value dH of the difference is expressed as dH = | C′−B ′ | 2)
(Step S11).

次に、第2差分絶対値算出部22が、符号化対象画素Dの左上に位置する画素C'と符号化対象画素Dの左隣に位置する画素(ここでは画素A'とする(図2参照)。)との差分の絶対値dVを
dV=|C'−A'| ・・・(3)
により算出する(ステップS12)。
Next, the second difference absolute value calculation unit 22 sets a pixel C ′ positioned at the upper left of the encoding target pixel D and a pixel positioned adjacent to the left of the encoding target pixel D (here, pixel A ′ (FIG. 2)). Refer to the absolute value dV of the difference with d) = V = | C′−A ′ | (3)
(Step S12).

次に、差分算出部23が、第1差分絶対値算出部21によって算出された値dHと第2差分絶対値算出部22によって算出された値dVとの差分dFを
dF=dH−dV ・・・(4)
により算出する(ステップS13)。
Next, the difference calculation unit 23 sets the difference dF between the value dH calculated by the first difference absolute value calculation unit 21 and the value dV calculated by the second difference absolute value calculation unit 22 as follows: dF = dH−dV (4)
(Step S13).

次に、予測値算出部24が、差分算出部23によって算出された値dFに基づいて、符号化対象画素Dの予測値Pを算出する(ステップS14〜S19)。   Next, the predicted value calculation unit 24 calculates the predicted value P of the encoding target pixel D based on the value dF calculated by the difference calculation unit 23 (steps S14 to S19).

詳細には、予測値算出部24は、dFが所与の閾値Th(ここでは64とする。)より大きい場合には(ステップS14)、予測値Pを
P=(A'+7B')/8 ・・・(5)
により算出する(ステップS15)。
Specifically, the predicted value calculation unit 24 sets the predicted value P to P = (A ′ + 7B ′) / 8 when dF is larger than a given threshold Th (here, 64) (step S14). ... (5)
(Step S15).

また、予測値算出部24は、dFが所与の閾値−Th(ここでは−64とする。)より小さい場合には(ステップS16)、予測値Pを
P=(7A'+B')/8 ・・・(6)
により算出する(ステップS17)。
Further, when dF is smaller than a given threshold −Th (here, −64) (step S16), the predicted value calculation unit 24 sets the predicted value P to P = (7A ′ + B ′) / 8. ... (6)
(Step S17).

また、予測値算出部24は、dFが閾値−Thより大きく且つ閾値Thより小さい場合には、符号化対象画素Dに対する画素A'と画素B'の重み付けを表す重み付け係数mを算出する(ステップS18)。例えば、図4に示すように、dF=Thのときにm=3/8とし、dF=−Thのときにm=−3/8とし、これらの2点間をdFの値に応じて直線補間するようにしても良い。そして、予測値算出部24は、ステップS18にて算出した重み付け係数mを用いて、予測値Pを
P=4/8(A'+B')+m(B'−A') ・・・(7)
により算出する(ステップS19)。
In addition, when dF is larger than the threshold value −Th and smaller than the threshold value Th, the predicted value calculation unit 24 calculates a weighting coefficient m that represents the weighting of the pixel A ′ and the pixel B ′ with respect to the encoding target pixel D (step). S18). For example, as shown in FIG. 4, when dF = Th, m = 3/8, and when dF = −Th, m = −3 / 8, and a straight line between these two points according to the value of dF. You may make it interpolate. Then, the predicted value calculation unit 24 uses the weighting coefficient m calculated in step S18 to change the predicted value P to P = 4/8 (A ′ + B ′) + m (B′−A ′) (7) )
(Step S19).

なお、図4において、dF>0の場合には、m>0、すなわち、画素B'の重みが画素A'の重みより大きくなる。一方、dF<0の場合には、m<0、すなわち、画素B'の重みが画素A'の重みより小さくなる。   In FIG. 4, when dF> 0, m> 0, that is, the weight of the pixel B ′ is larger than the weight of the pixel A ′. On the other hand, when dF <0, m <0, that is, the weight of the pixel B ′ is smaller than the weight of the pixel A ′.

また、ステップS14〜S15において、dFが閾値Thより大きい場合に、予測値Pを式(5)により算出することは、重み付け係数mを3/8と算出していることと考えることができる。また、ステップS16〜S17において、dFが閾値−Thより小さい場合に、予測値Pを式(6)により算出することは、重み付け係数mを−3/8と算出していることと考えることができる。   In steps S14 to S15, when dF is larger than the threshold Th, calculating the predicted value P by the equation (5) can be considered as calculating the weighting coefficient m as 3/8. Further, in steps S16 to S17, when dF is smaller than the threshold value -Th, calculating the predicted value P by equation (6) may be considered as calculating the weighting coefficient m to -3/8. it can.

次に、画素予測値差分算出部25が、符号化対象画素Dと予測値Pとの差分dを
d=D−P ・・・(8)
により算出する(ステップS20)。
Next, the pixel prediction value difference calculation unit 25 calculates the difference d between the encoding target pixel D and the prediction value P as follows: d = D−P (8)
(Step S20).

そして、量子化部26が、画素予測値差分算出部25によって算出された差分dを
iCode=Quant(d) ・・・(9)
により量子化する(ステップS21)。ここで、Quant()は、量子化演算を表す。量子化演算としては、公知の様々な演算を用いることができ、例えば、量子化テーブルを利用したテーブル変換等を用いることもできる。また、固定長量子化演算を用いることもできる。量子化によって得られた値iCodeは、後段の外部回路に出力画像信号として出力される。
Then, the quantization unit 26 converts the difference d calculated by the pixel prediction value difference calculation unit 25 to iCode = Quant (d) (9)
(Step S21). Here, Quant () represents a quantization operation. As the quantization operation, various known operations can be used. For example, table conversion using a quantization table can also be used. A fixed-length quantization operation can also be used. The value iCode obtained by the quantization is output as an output image signal to the external circuit at the subsequent stage.

次に、逆量子化部27が、量子化部26によって算出された値iCodeを
d'=deQuant(iCode) ・・・(10)
により逆量子化する(ステップS22)。ここで、deQuant()は、逆量子化演算を表す。逆量子化演算としては、公知の様々な演算を用いることができ、例えば、逆量子化テーブルを利用したテーブル変換等を用いることもできる。
Next, the inverse quantization unit 27 converts the value iCode calculated by the quantization unit 26 to d ′ = deQuant (iCode) (10)
Then, inverse quantization is performed (step S22). Here, deQuant () represents an inverse quantization operation. As the inverse quantization operation, various known operations can be used. For example, table conversion using an inverse quantization table can also be used.

そして、復号化部28が、予測値算出部24によって算出された予測値Pと逆量子化部27によって算出された値d'とに基づいて、符号化対象画素Dを符号化し更に復号化した画素D'を
D'=P+d' ・・・(11)
により算出する(ステップS23)。この画素D'は、ラインバッファ12に格納され、後の画素(今回の符号化対象画素の右隣に位置する画素、今回の符号化対象画素の下隣に位置する画素、今回の符号化対象画素の右下に位置する画素)の符号化に用いられる。
Then, the decoding unit 28 encodes and further decodes the encoding target pixel D based on the predicted value P calculated by the predicted value calculation unit 24 and the value d ′ calculated by the inverse quantization unit 27. The pixel D ′ is D ′ = P + d ′ (11)
(Step S23). This pixel D ′ is stored in the line buffer 12, and the subsequent pixel (the pixel located right next to the current encoding target pixel, the pixel positioned next to the current encoding target pixel, the current encoding target, Used to encode a pixel located at the lower right of the pixel).

次に、本発明の実施例について、図5(a)〜(c)を参照しながら説明する。
図5(a)〜(c)は、画像符号化装置10に入力される画像の例を示す図である。
Next, an embodiment of the present invention will be described with reference to FIGS.
FIGS. 5A to 5C are diagrams illustrating examples of images input to the image encoding device 10.

図5(a)において、画素A'の値は「0」であり、画素B'の値は「255」であり、画素C'の値は「0」であるものとする。すなわち、垂直方向(Y方向)の強エッジ部が画素A'、B'、C'間に存在する。このような強エッジ部はテキストの端部等において出現することがある。この場合、符号化対象画素Dの値は「255」に近い場合が多いと考えられる。すなわち、符号化対象画素Dは、画素A'よりも画素B'との相関が高くなる場合が多いと考えられる。従って、符号化対象画素Dを符号化するに際し、画素A'よりも画素B'の重みを大きくすることが好ましいと考えられる。   In FIG. 5A, it is assumed that the value of the pixel A ′ is “0”, the value of the pixel B ′ is “255”, and the value of the pixel C ′ is “0”. That is, a strong edge portion in the vertical direction (Y direction) exists between the pixels A ′, B ′, and C ′. Such a strong edge portion may appear at the end of the text. In this case, it is considered that the value of the encoding target pixel D is often close to “255”. That is, it is considered that the encoding target pixel D often has a higher correlation with the pixel B ′ than the pixel A ′. Therefore, when encoding the encoding target pixel D, it is considered preferable to make the weight of the pixel B ′ larger than the pixel A ′.

このような画像が画像符号化装置10に入力された場合、画素C'と画素B'との差分の絶対値dHは、(2)式により、
dH=|C'−B'|
=|0−255|
=|−255|
=255 ・・・(12)
となる(ステップS11参照)。
When such an image is input to the image encoding device 10, the absolute value dH of the difference between the pixel C ′ and the pixel B ′ is expressed by the following equation (2):
dH = | C′−B ′ |
= | 0-255 |
= | -255 |
= 255 (12)
(See step S11).

また、画素C'と画素A'との差分の絶対値dVは、(3)式により、
dV=|C'−A'|
=|0−0|
=0 ・・・(13)
となる(ステップS12参照)。
Further, the absolute value dV of the difference between the pixel C ′ and the pixel A ′ is expressed by the following equation (3):
dV = | C′−A ′ |
= | 0-0 |
= 0 (13)
(See step S12).

そして、値dHと値dVとの差分dFは、(4)式により、
dF=dH−dV
=255−0
=255 ・・・(14)
となる(ステップS13参照)。
And the difference dF between the value dH and the value dV is given by the equation (4):
dF = dH−dV
= 255-0
= 255 (14)
(See step S13).

差分dFが閾値Th(ここでは64)より大きいため(ステップS14参照)、符号化対象画素Dの予測値Pは、(5)式により、
P=(A'+7B')/8
=(0+7・255)/8
=1785/8
=223.125 ・・・(15)
となる(ステップS15参照)。
Since the difference dF is larger than the threshold Th (here, 64) (see step S14), the predicted value P of the encoding target pixel D is expressed by the following equation (5):
P = (A ′ + 7B ′) / 8
= (0 + 7 · 255) / 8
= 1785/8
= 223.125 (15)
(See step S15).

先に説明したように、画素A'の値が「0」であり、画素B'の値が「255」であり、画素C'の値が「0」である場合には、符号化対象画素Dの値は「255」に近い場合が多いと考えられる。従って、(15)式に示すように、画素A'より画素B'の重みを大きくし、予測値Pを「225」に近い値とすることで、符号化対象画素Dと予測値Pとの差分を小さくすることができると考えられる。これにより、高画質を保ちながら圧縮率を高くすることが可能となる。   As described above, when the value of the pixel A ′ is “0”, the value of the pixel B ′ is “255”, and the value of the pixel C ′ is “0”, the encoding target pixel It is considered that the value of D is often close to “255”. Therefore, as shown in the equation (15), the weight of the pixel B ′ is made larger than the pixel A ′, and the predicted value P is set to a value close to “225”, so that the encoding target pixel D and the predicted value P are It is considered that the difference can be reduced. This makes it possible to increase the compression rate while maintaining high image quality.

なお、(5)式、(15)式において、画素B'の重みを100%にはしていない理由は、次の通りである。画素A'の値が「0」であり、画素B'の値が「255」であり、画素C'の値が「0」である場合には、符号化対象画素Dの値は「255」に近い場合が多いと考えられる。しかしながら、このような場合であっても、符号化対象画素Dの値が「255」に近くないこともあり得ないことではない。そこで、そのようなことを考慮して、画素B'の重みを100%にはしていない。   The reason why the weight of the pixel B ′ is not set to 100% in the expressions (5) and (15) is as follows. When the value of the pixel A ′ is “0”, the value of the pixel B ′ is “255”, and the value of the pixel C ′ is “0”, the value of the encoding target pixel D is “255”. It is thought that there are many cases close to. However, even in such a case, the value of the encoding target pixel D may not be close to “255”. In view of this, the weight of the pixel B ′ is not set to 100%.

次に、図5(b)について説明する。図5(b)において、画素A'の値は「0」であり、画素B'の値は「255」であり、画素C'の値は「255」であるものとする。すなわち、水平方向(X方向)の強エッジ部が画素A'、B'、C'間に存在する。このような強エッジ部はテキストの端部等において出現することがある。この場合、符号化対象画素Dの値は「0」に近い場合が多いと考えられる。すなわち、符号化対象画素Dは、画素B'よりも画素A'との相関が高くなる場合が多いと考えられる。従って、符号化対象画素Dを符号化するに際し、画素B'よりも画素A'の重みを大きくすることが好ましいと考えられる。   Next, FIG. 5B will be described. In FIG. 5B, the value of the pixel A ′ is “0”, the value of the pixel B ′ is “255”, and the value of the pixel C ′ is “255”. That is, a strong edge portion in the horizontal direction (X direction) exists between the pixels A ′, B ′, and C ′. Such a strong edge portion may appear at the end of the text. In this case, it is considered that the value of the encoding target pixel D is often close to “0”. That is, it is considered that the encoding target pixel D often has a higher correlation with the pixel A ′ than the pixel B ′. Therefore, when encoding the encoding target pixel D, it is considered preferable to make the weight of the pixel A ′ larger than the pixel B ′.

このような画像が画像符号化装置10に入力された場合、画素C'と画素B'との差分の絶対値dHは、(2)式により、
dH=|C'−B'|
=|255−255|
=0 ・・・(16)
となる(ステップS11参照)。
When such an image is input to the image encoding device 10, the absolute value dH of the difference between the pixel C ′ and the pixel B ′ is expressed by the following equation (2):
dH = | C′−B ′ |
= | 255-255 |
= 0 (16)
(See step S11).

また、画素C'と画素A'との差分の絶対値dVは、(3)式により、
dV=|C'−A'|
=|255−0|
=|255|
=255 ・・・(17)
となる(ステップS12参照)。
Further, the absolute value dV of the difference between the pixel C ′ and the pixel A ′ is expressed by the following equation (3):
dV = | C′−A ′ |
= | 255-0 |
= | 255 |
= 255 (17)
(See step S12).

そして、値dHと値dVとの差分dFは、(4)式により、
dF=dH−dV
=0−255
=−255 ・・・(18)
となる(ステップS13参照)。
And the difference dF between the value dH and the value dV is given by the equation (4):
dF = dH−dV
= 0-255
= -255 (18)
(See step S13).

差分dFが閾値−Th(ここでは−64)より小さいため(ステップS16参照)、符号化対象画素Dの予測値Pは、(6)式により、
P=(7A'+B')/8
=(7・0+255)/8
=255/8
=31.875 ・・・(19)
となる(ステップS15参照)。
Since the difference dF is smaller than the threshold value -Th (here, -64) (see step S16), the prediction value P of the encoding target pixel D is expressed by the following equation (6):
P = (7A ′ + B ′) / 8
= (7.0 ・ 255) / 8
= 255/8
= 31.875 (19)
(See step S15).

先に説明したように、画素A'の値が「0」であり、画素B'の値が「255」であり、画素C'の値が「255」である場合には、符号化対象画素Dの値は「0」に近い場合が多いと考えられる。従って、(19)式に示すように、画素B'より画素A'の重みを大きくし、予測値Pを「0」に近い値とすることで、符号化対象画素Dと予測値Pとの差分を小さくすることができると考えられる。これにより、高画質を保ちながら圧縮率を高くすることが可能となる。   As described above, when the value of the pixel A ′ is “0”, the value of the pixel B ′ is “255”, and the value of the pixel C ′ is “255”, the encoding target pixel It is considered that the value of D is often close to “0”. Therefore, as shown in the equation (19), the weight of the pixel A ′ is made larger than the pixel B ′, and the prediction value P is set to a value close to “0”. It is considered that the difference can be reduced. This makes it possible to increase the compression rate while maintaining high image quality.

なお、(6)式、(19)式において、画素A'の重みを100%にはしていない理由は、次の通りである。画素A'の値が「0」であり、画素B'の値が「255」であり、画素C'の値が「255」である場合には、符号化対象画素Dの値は「0」に近い場合が多いと考えられる。しかしながら、このような場合であっても、符号化対象画素Dの値が「0」に近くないこともあり得ないことではない。そこで、そのようなことを考慮して、画素A'の重みを100%にはしていない。   In the equations (6) and (19), the reason why the weight of the pixel A ′ is not 100% is as follows. When the value of the pixel A ′ is “0”, the value of the pixel B ′ is “255”, and the value of the pixel C ′ is “255”, the value of the encoding target pixel D is “0”. It is thought that there are many cases close to. However, even in such a case, it is not impossible that the value of the encoding target pixel D is not close to “0”. In view of this, the weight of the pixel A ′ is not set to 100%.

次に、図5(c)について説明する。図5(c)において、画素A'の値は「141」であり、画素B'の値は「78」であり、画素C'の値は「0」であるものとする。すなわち、強エッジ部が画素A'、B'、C'間に存在しない。   Next, FIG. 5C will be described. In FIG. 5C, the value of the pixel A ′ is “141”, the value of the pixel B ′ is “78”, and the value of the pixel C ′ is “0”. That is, the strong edge portion does not exist between the pixels A ′, B ′, and C ′.

このような画像が画像符号化装置10に入力された場合、画素C'と画素B'との差分の絶対値dHは、(2)式により、
dH=|C'−B'|
=|0−78|
=|−78|
=78 ・・・(20)
となる(ステップS11参照)。
When such an image is input to the image encoding device 10, the absolute value dH of the difference between the pixel C ′ and the pixel B ′ is expressed by the following equation (2):
dH = | C′−B ′ |
= | 0-78 |
= | -78 |
= 78 (20)
(See step S11).

また、画素C'と画素A'との差分の絶対値dVは、(3)式により、
dV=|C'−A'|
=|0−141|
=|−141|
=141 ・・・(21)
となる(ステップS12参照)。
Further, the absolute value dV of the difference between the pixel C ′ and the pixel A ′ is expressed by the following equation (3):
dV = | C′−A ′ |
= | 0-141 |
= | -141 |
= 141 (21)
(See step S12).

そして、値dHと値dVとの差分dFは、(4)式により、
dF=dH−dV
=78−141
=−63 ・・・(22)
となる(ステップS13参照)。
And the difference dF between the value dH and the value dV is given by the equation (4):
dF = dH−dV
= 78-141
= −63 (22)
(See step S13).

差分dFが閾値Th(ここでは64)より小さく且つ閾値−Th(ここでは−64)より大きいため(ステップS16参照)、符号化対象画素Dに対する画素A'と画素B'の重み付けを表す重み付け係数mを、直線補間により、約−0.369140625と算出する(ステップS18)。   Since the difference dF is smaller than the threshold Th (here, 64) and larger than the threshold -Th (here, -64) (see step S16), the weighting coefficient representing the weighting of the pixel A ′ and the pixel B ′ with respect to the encoding target pixel D m is calculated to be approximately −0.369140625 by linear interpolation (step S18).

従って、符号化対象画素Dの予測値Pは、(7)式により、
P=4/8(A'+B')+m(B'−A')
=4/8(141+78)−0.369140625(78−141)
=109.5+23.255859375
=132.755859375 ・・・(23)
となる(ステップS19参照)。
Therefore, the predicted value P of the encoding target pixel D is expressed by the following equation (7):
P = 4/8 (A ′ + B ′) + m (B′−A ′)
= 4/8 (141 + 78) -0.369140625 (78-141)
= 109.5 + 23.255859375
= 132.755859375 (23)
(See step S19).

なお、ここでは、dF<0であるので、m<0、すなわち、画素B'の重みが画素A'の重みより小さくなっている。   Here, since dF <0, m <0, that is, the weight of the pixel B ′ is smaller than the weight of the pixel A ′.

以上説明したように、本実施形態によれば、符号化対象画素の左上、上、及び、左に位置する僅か3つの画素を参照するという非常に簡単な構成及び処理で、強エッジ部が存在するような場合であっても、的確な予測値を算出することができる。また、予測値の識別に符号を割り当てるようなことも行わないので、固定長符号化することが可能である。   As described above, according to the present embodiment, there is a strong edge portion with a very simple configuration and processing in which only three pixels located at the upper left, upper, and left of the encoding target pixel are referred to. Even in such a case, an accurate predicted value can be calculated. Also, since no code is assigned to the identification of the predicted value, it is possible to perform fixed-length encoding.

次に、本発明の一実施形態に係る画像復号化装置について説明する。
図6に、本発明の一実施形態に係る画像復号化装置の構成例を示す。この画像復号化装置40は、先に説明した画像符号化装置10によって符号化された復号化対象画素が順次入力される画像復号化部41と、ラインバッファ(FIFOバッファ)42とを含む。なお、画像復号化装置40を半導体集積回路として実現しても良い。
Next, an image decoding apparatus according to an embodiment of the present invention will be described.
FIG. 6 shows a configuration example of an image decoding apparatus according to an embodiment of the present invention. The image decoding device 40 includes an image decoding unit 41 to which decoding target pixels encoded by the image encoding device 10 described above are sequentially input, and a line buffer (FIFO buffer) 42. The image decoding device 40 may be realized as a semiconductor integrated circuit.

画像復号化部41は、第1差分絶対値算出部51と、第2差分絶対値算出部52と、差分算出部53と、予測値算出部54と、逆量子化部55と、復号化部56とを含む。   The image decoding unit 41 includes a first difference absolute value calculation unit 51, a second difference absolute value calculation unit 52, a difference calculation unit 53, a predicted value calculation unit 54, an inverse quantization unit 55, and a decoding unit. 56.

第1差分絶対値算出部51は、復号化対象画素の左上に位置する画素と復号化対象画素の上隣に位置する画素との差分の絶対値を算出する。   The first difference absolute value calculation unit 51 calculates the absolute value of the difference between the pixel located at the upper left of the decoding target pixel and the pixel located above the decoding target pixel.

第2差分絶対値算出部52は、復号化対象画素の左上に位置する画素と復号化対象画素の左隣に位置する画素との差分の絶対値を算出する。   The second difference absolute value calculation unit 52 calculates the absolute value of the difference between the pixel located on the upper left side of the decoding target pixel and the pixel located on the left side of the decoding target pixel.

差分算出部53は、第1差分絶対値算出部51によって算出された値と第2差分絶対値算出部52によって算出された値との差分を算出する。
予測値算出部54は、差分算出部53によって算出された値に基づいて、復号化対象画素の予測値を算出する。
The difference calculation unit 53 calculates the difference between the value calculated by the first difference absolute value calculation unit 51 and the value calculated by the second difference absolute value calculation unit 52.
The predicted value calculation unit 54 calculates the predicted value of the decoding target pixel based on the value calculated by the difference calculation unit 53.

逆量子化部55は、復号化対象画素を逆量子化する。
復号化部56は、逆量子化部55によって逆量子化された値と予測値算出部54によって算出された予測値とを加算することにより、復号化対象画素を復号化する。復号化部56によって復号化された画素は、後段の外部回路に出力されるとともに、ラインバッファ42に格納され、後の画素(今回の復号化対象画素の右隣に位置する画素、今回の復号化対象画素の下隣に位置する画素、今回の復号化対象画素の右下に位置する画素)の復号化に用いられる。
The inverse quantization unit 55 inversely quantizes the decoding target pixel.
The decoding unit 56 decodes the decoding target pixel by adding the value inversely quantized by the inverse quantization unit 55 and the prediction value calculated by the prediction value calculation unit 54. The pixel decoded by the decoding unit 56 is output to the external circuit at the subsequent stage and stored in the line buffer 42, and the subsequent pixel (the pixel located right next to the current decoding target pixel, the current decoding) Used to decode a pixel located below the pixel to be converted, and a pixel located to the lower right of the current pixel to be decoded).

次に、画像復号化装置40の動作について説明する。   Next, the operation of the image decoding device 40 will be described.

図7は、画像復号化装置40が実行する処理を示すフローチャートである。画像復号化装置40は、外部から画素(復号化対象画素)が入力される都度、図7に示す処理を実行する。なお、各画素が複数の成分を含む場合には、図7に示す処理を復号化対象画素の成分毎に実行するようにしても良い。   FIG. 7 is a flowchart illustrating processing executed by the image decoding device 40. The image decoding device 40 executes the process shown in FIG. 7 every time a pixel (decoding target pixel) is input from the outside. When each pixel includes a plurality of components, the process shown in FIG. 7 may be executed for each component of the decoding target pixel.

まず、第1差分絶対値算出部51が、復号化対象画素(ここでは画素D'とする。)の左上に位置する画素(ここでは画素C'とする(図2参照)。)と復号化対象画素D'の上隣に位置する画素(ここでは画素B'とする(図2参照)。)との差分の絶対値dHを
dH=|C'−B'| ・・・(24)
により算出する(ステップS31)。
First, the first difference absolute value calculation unit 51 decodes a pixel (here, referred to as pixel C ′ (see FIG. 2)) located at the upper left of the decoding target pixel (here, referred to as pixel D ′). The absolute value dH of the difference from a pixel (here, referred to as pixel B ′ (see FIG. 2)) located above the target pixel D ′ is dH = | C′−B ′ | (24)
(Step S31).

次に、第2差分絶対値算出部52が、復号化対象画素D'の左上に位置する画素C'と復号化対象画素D'の左隣に位置する画素(ここでは画素A'とする(図2参照)。)との差分の絶対値dVを
dV=|C'−A'| ・・・(25)
により算出する(ステップS32)。
Next, the second absolute difference calculator 52 calculates a pixel C ′ located at the upper left of the decoding target pixel D ′ and a pixel located at the left of the decoding target pixel D ′ (here, the pixel A ′ ( The absolute value dV of the difference from (see FIG. 2))) is expressed as dV = | C′−A ′ | (25)
(Step S32).

次に、差分算出部53が、第1差分絶対値算出部51によって算出された値dHと第2差分絶対値算出部52によって算出された値dVとの差分dFを
dF=dH−dV ・・・(26)
により算出する(ステップS33)。
Next, the difference calculation unit 53 sets the difference dF between the value dH calculated by the first difference absolute value calculation unit 51 and the value dV calculated by the second difference absolute value calculation unit 52 as dF = dH−dV.・ (26)
(Step S33).

次に、予測値算出部54が、差分算出部53によって算出された値dFに基づいて、復号化対象画素D'の予測値Pを算出する(ステップS34〜S39)。   Next, the predicted value calculation unit 54 calculates the predicted value P of the decoding target pixel D ′ based on the value dF calculated by the difference calculation unit 53 (steps S34 to S39).

詳細には、予測値算出部54は、dFが所与の閾値Th(ここでは64とする。)より大きい場合には(ステップS34)、予測値Pを
P=(A'+7B')/8 ・・・(27)
により算出する(ステップS35)。
Specifically, when dF is larger than a given threshold Th (here, 64) (step S34), the predicted value calculation unit 54 sets the predicted value P to P = (A ′ + 7B ′) / 8. ... (27)
(Step S35).

また、予測値算出部54は、dFが所与の閾値−Th(ここでは−64とする。)より小さい場合には(ステップS36)、予測値Pを
P=(7A'+B')/8 ・・・(28)
により算出する(ステップS37)。
Moreover, the predicted value calculation unit 54 sets the predicted value P to P = (7A ′ + B ′) / 8 when dF is smaller than a given threshold value −Th (here, −64) (step S36). ... (28)
(Step S37).

また、予測値算出部54は、dFが閾値−Thより大きく且つ閾値Thより小さい場合には、復号化対象画素D'に対する画素A'と画素B'の重み付けを表す重み付け係数mを算出する(ステップS38)。例えば、先に説明した図4に示すように、dF=Thのときにm=3/8とし、dF=−Thのときにm=−3/8とし、これらの2点間をdFの値に応じて直線補間するようにしても良い。そして、予測値算出部54は、ステップS38にて算出した重み付け係数mを用いて、予測値Pを
P=4/8(A'+B')+m(B'−A') ・・・(29)
により算出する(ステップS39)。
Further, when dF is larger than the threshold value -Th and smaller than the threshold value Th, the predicted value calculation unit 54 calculates a weighting coefficient m representing the weighting of the pixel A 'and the pixel B' with respect to the decoding target pixel D '( Step S38). For example, as shown in FIG. 4 described above, m = 3/8 when dF = Th, m = −3 / 8 when dF = −Th, and the value of dF between these two points. Depending on, linear interpolation may be performed. Then, the predicted value calculation unit 54 uses the weighting coefficient m calculated in step S38 to change the predicted value P to P = 4/8 (A ′ + B ′) + m (B′−A ′) (29) )
(Step S39).

なお、ステップS34〜S35において、dFが閾値Thより大きい場合に、予測値Pを式(27)により算出することは、重み付け係数mを3/8と算出していることと考えることができる。また、ステップS36〜S37において、dFが閾値−Thより小さい場合に、予測値Pを式(28)により算出することは、重み付け係数mを−3/8と算出していることと考えることができる。   In Steps S34 to S35, when dF is larger than the threshold Th, calculating the predicted value P by Expression (27) can be considered as calculating the weighting coefficient m as 3/8. In steps S36 to S37, when dF is smaller than the threshold value -Th, calculating the predicted value P by equation (28) may be considered as calculating the weighting coefficient m to -3/8. it can.

次に、逆量子化部55が、復号化対象画素D'の値iCodeを
d'=deQuant(iCode) ・・・(30)
により逆量子化する(ステップS40)。ここで、deQuant()は、逆量子化演算を表す。逆量子化演算としては、公知の様々な演算を用いることができ、例えば、逆量子化テーブルを利用したテーブル変換等を用いることもできる。
Next, the inverse quantization unit 55 converts the value iCode of the decoding target pixel D ′ to d ′ = deQuant (iCode) (30)
Then, inverse quantization is performed (step S40). Here, deQuant () represents an inverse quantization operation. As the inverse quantization operation, various known operations can be used. For example, table conversion using an inverse quantization table can also be used.

そして、復号化部56が、予測値算出部54によって算出された予測値Pと逆量子化部55によって算出された値d'とに基づいて、復号化対象画素D'を
D'=P+d' ・・・(31)
により復号化する(ステップS41)。この画素D'は、後段の外部回路に出力されるとともに、ラインバッファ42に格納され、後の画素(今回の復号化対象画素の右隣に位置する画素、今回の復号化対象画素の下隣に位置する画素、今回の復号化対象画素の右下に位置する画素)の復号化に用いられる。
Then, based on the predicted value P calculated by the predicted value calculation unit 54 and the value d ′ calculated by the inverse quantization unit 55, the decoding unit 56 sets the decoding target pixel D ′ to D ′ = P + d ′. ... (31)
(Step S41). This pixel D ′ is output to the external circuit at the subsequent stage and stored in the line buffer 42, and the subsequent pixel (the pixel located on the right side of the current decoding target pixel, the lower side of the current decoding target pixel) And the pixel located at the lower right of the current decoding target pixel).

次に、本実施形態に係る画像符号化装置及び画像復号化装置を用いたシステムについて説明する。
図8は、本発明の一実施形態に係る画像符号化装置及び画像復号化装置を用いたシステムの構成例を示す。このシステム60は、半導体集積回路70と、LCDコントローラ80と、LCDドライバ90と、LCDパネル100とを含む。半導体集積回路70は、本発明の一実施形態に係る画像符号化装置10と、VRAM71と、本発明の一実施形態に係る画像復号化装置40とを含む。
Next, a system using the image encoding device and the image decoding device according to the present embodiment will be described.
FIG. 8 shows a configuration example of a system using an image encoding device and an image decoding device according to an embodiment of the present invention. The system 60 includes a semiconductor integrated circuit 70, an LCD controller 80, an LCD driver 90, and an LCD panel 100. The semiconductor integrated circuit 70 includes an image encoding device 10 according to an embodiment of the present invention, a VRAM 71, and an image decoding device 40 according to an embodiment of the present invention.

画像符号化装置10は、入力画像信号を符号化してVRAM71に出力する。VRAM71は、画像符号化装置10によって符号化された画像信号を格納する。画像復号化装置40は、VRAM71に格納された画像信号を復号化してLCDコントローラ80に出力する。LCDコントローラ80は、画像復号化装置40によって復号化された画像信号に基づいてLCDドライバ90を制御し、LCDドライバ90は、LCDコントローラ80の制御下でLCDパネル100を駆動し、LCDパネル100は、画像を表示する。   The image encoding device 10 encodes the input image signal and outputs it to the VRAM 71. The VRAM 71 stores the image signal encoded by the image encoding device 10. The image decoding device 40 decodes the image signal stored in the VRAM 71 and outputs it to the LCD controller 80. The LCD controller 80 controls the LCD driver 90 based on the image signal decoded by the image decoding device 40. The LCD driver 90 drives the LCD panel 100 under the control of the LCD controller 80, and the LCD panel 100 is , Display an image.

このシステム60によれば、入力画像信号を符号化してVRAM71に格納するので、VRAM71の容量を小さく抑えることが可能となる。   According to this system 60, since the input image signal is encoded and stored in the VRAM 71, the capacity of the VRAM 71 can be kept small.

なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。また画像符号化装置、画像復号化装置やシステムの構成、動作も本実施形態で説明したものに限定に限定されず、種々の変形実施が可能である。   Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, a term described at least once together with a different term having a broader meaning or the same meaning in the specification or the drawings can be replaced with the different term in any part of the specification or the drawings. Further, the configuration and operation of the image encoding device, the image decoding device, and the system are not limited to those described in this embodiment, and various modifications can be made.

本発明の一実施形態に係る画像符号化装置の構成例。1 is a configuration example of an image encoding device according to an embodiment of the present invention. 図1の画像符号化装置10に入力される画像データの例。An example of image data input to the image encoding device 10 of FIG. 本発明の一実施形態に係る画像符号化方法のフローチャート。The flowchart of the image coding method which concerns on one Embodiment of this invention. 差分値dFと重み付け係数mとの関係の例を示す図。The figure which shows the example of the relationship between the difference value dF and the weighting coefficient m. 図1の画像符号化装置10に入力される画像データの例。An example of image data input to the image encoding device 10 of FIG. 本発明の一実施形態に係る画像復号化装置の構成例。The structural example of the image decoding apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る画像復号化方法のフローチャート。The flowchart of the image decoding method which concerns on one Embodiment of this invention. 本発明の一実施形態に係るシステムの構成例。The structural example of the system which concerns on one Embodiment of this invention. 従来の画像符号化装置に入力される画像データの例。The example of the image data input into the conventional image coding apparatus.

符号の説明Explanation of symbols

10 画像符号化装置、11 画像符号化部、12、42 ラインバッファ、
21、51 第1差分絶対値算出部、22、52 第2差分絶対値算出部、
23、53 差分算出部、24、54 予測値算出部、25 画素予測値差分算出部、
26 量子化部、27、55 逆量子化部、28、56 復号化部、
40 画像復号化装置、41 画像復号化部、60 システム、
70 半導体集積回路、71 VRAM、80 LCDコントローラ、
90 LCDドライバ、100 LCDパネル
10 image encoding device, 11 image encoding unit, 12, 42 line buffer,
21, 51 first difference absolute value calculation unit, 22, 52 second difference absolute value calculation unit,
23, 53 Difference calculation unit, 24, 54 Prediction value calculation unit, 25 Pixel prediction value difference calculation unit,
26 quantization unit, 27, 55 inverse quantization unit, 28, 56 decoding unit,
40 image decoding device, 41 image decoding unit, 60 system,
70 semiconductor integrated circuit, 71 VRAM, 80 LCD controller,
90 LCD driver, 100 LCD panel

Claims (11)

複数の画素を含む画像データ内の符号化対象画素を、第1の方向において前記符号化対象画素に隣接する第1の画素と、前記第1の方向と交差する第2の方向において前記符号化対象画素に隣接する第2の画素と、前記第2の方向において前記第1の画素に隣接し且つ前記第1の方向において前記第2の画素に隣接する第3の画素とに基づいて符号化する画像符号化装置であって、
前記第3の画素と前記第2の画素との差分の絶対値が前記第3の画素と前記第1の画素との差分の絶対値より大きい場合には、前記第2の画素を前記第1の画素より大きい重みで、前記第3の画素と前記第2の画素との差分の絶対値が前記第3の画素と前記第1の画素との差分の絶対値より小さい場合には、前記第2の画素を前記第1の画素より小さい重みで、前記第1の画素及び前記第2の画素に重み付け演算を行うことにより前記符号化対象画素の予測値を算出し、前記符号化対象画素と前記予測値との差分を量子化することにより前記符号化対象画素を符号化する、画像符号化装置。
The encoding target pixel in the image data including a plurality of pixels is encoded in the first direction adjacent to the encoding target pixel in the first direction and in the second direction intersecting the first direction. Encoding based on a second pixel adjacent to the target pixel and a third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction An image encoding device for
When the absolute value of the difference between the third pixel and the second pixel is larger than the absolute value of the difference between the third pixel and the first pixel, the second pixel is changed to the first pixel. If the absolute value of the difference between the third pixel and the second pixel is smaller than the absolute value of the difference between the third pixel and the first pixel with a weight greater than A prediction value of the encoding target pixel is calculated by performing a weighting operation on the first pixel and the second pixel with a weight smaller than that of the first pixel, and the encoding target pixel An image encoding device that encodes the encoding target pixel by quantizing a difference from the predicted value.
複数の画素を含む画像データ内の符号化対象画素を、第1の方向において前記符号化対象画素に隣接する第1の画素と、前記第1の方向と交差する第2の方向において前記符号化対象画素に隣接する第2の画素と、前記第2の方向において前記第1の画素に隣接し且つ前記第1の方向において前記第2の画素に隣接する第3の画素とに基づいて符号化する画像符号化方法であって、
前記第3の画素と前記第2の画素との差分の絶対値を算出するステップ(a)と、
前記第3の画素と前記第1の画素との差分の絶対値を算出するステップ(b)と、
前記符号化対象画素に対する前記第1の画素及び前記第2の画素の重み付けを表す重み付け係数を算出するステップであって、前記第3の画素と前記第2の画素との差分の絶対値が前記第3の画素と前記第1の画素との差分の絶対値より大きい場合には、前記第2の画素を前記第1の画素より大きい重みとする前記重み付け係数を算出し、前記第3の画素と前記第2の画素との差分の絶対値が前記第3の画素と前記第1の画素との差分の絶対値より小さい場合には、前記第2の画素を前記第1の画素より小さい重みとする前記重み付け係数を算出するステップ(c)と、
前記重み付け係数を用いて、前記第1の画素及び前記第2の画素に重み付け演算を行うことにより、前記符号化対象画素の予測値を算出するステップ(d)と、
前記符号化対象画素と前記予測値との差分を算出するステップ(e)と、
ステップ(e)にて算出された値を量子化するステップ(f)と、
を含む、画像符号化方法。
The encoding target pixel in the image data including a plurality of pixels is encoded in the first direction adjacent to the encoding target pixel in the first direction and in the second direction intersecting the first direction. Encoding based on a second pixel adjacent to the target pixel and a third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction An image encoding method for
Calculating an absolute value of a difference between the third pixel and the second pixel (a);
Calculating an absolute value of a difference between the third pixel and the first pixel (b);
Calculating a weighting coefficient representing weighting of the first pixel and the second pixel with respect to the encoding target pixel, wherein an absolute value of a difference between the third pixel and the second pixel is When the absolute value of the difference between the third pixel and the first pixel is larger than the absolute value of the difference, the weighting coefficient for calculating the second pixel as a weight greater than the first pixel is calculated, and the third pixel is calculated. When the absolute value of the difference between the second pixel and the second pixel is smaller than the absolute value of the difference between the third pixel and the first pixel, the second pixel is weighted smaller than the first pixel. (C) calculating the weighting coefficient
Calculating a predicted value of the encoding target pixel by performing a weighting operation on the first pixel and the second pixel using the weighting coefficient;
Calculating a difference between the encoding target pixel and the predicted value (e);
A step (f) of quantizing the value calculated in step (e);
An image encoding method including:
請求項2において、
ステップ(c)が、
前記第3の画素と前記第2の画素との差分の絶対値と前記第3の画素と前記第1の画素との差分の絶対値との差分が所与の第1の閾値より大きい場合には、所与の第1の値を前記重み付け係数とし、前記第3の画素と前記第2の画素との差分の絶対値と前記第3の画素と前記第1の画素との差分の絶対値との差分が所与の第2の閾値より小さい場合には、所与の第2の値を前記重み付け係数とし、前記第3の画素と前記第2の画素との差分の絶対値と前記第3の画素と前記第1の画素との差分の絶対値との差分が前記第1の閾値より小さく且つ前記第2の閾値より大きい場合には、前記第1の値と前記第2の値とを補間して得られた値を前記重み付け係数とすることを特徴とする、画像符号化方法。
In claim 2,
Step (c)
When the difference between the absolute value of the difference between the third pixel and the second pixel and the absolute value of the difference between the third pixel and the first pixel is greater than a given first threshold value Uses the given first value as the weighting coefficient, the absolute value of the difference between the third pixel and the second pixel, and the absolute value of the difference between the third pixel and the first pixel Is smaller than a given second threshold, the given second value is the weighting factor, and the absolute value of the difference between the third pixel and the second pixel is When the difference between the absolute value of the difference between the third pixel and the first pixel is smaller than the first threshold and larger than the second threshold, the first value and the second value An image encoding method characterized in that a value obtained by interpolation is used as the weighting coefficient.
請求項2又は3において、
前記複数の画素の各々が複数の成分を含み、
前記符号化対象画素の成分の各々について、ステップ(a)〜ステップ(f)を行うことを特徴とする、画像符号化方法。
In claim 2 or 3,
Each of the plurality of pixels includes a plurality of components;
Step (a)-step (f) are performed about each of the component of the said encoding object pixel, The image coding method characterized by the above-mentioned.
請求項4において、
前記複数の画素の各々がR成分、G成分、及び、B成分を含み、
前記符号化対象画素のR成分、G成分、及び、B成分の各々について、ステップ(a)〜ステップ(f)を行うことを特徴とする、画像符号化方法。
In claim 4,
Each of the plurality of pixels includes an R component, a G component, and a B component;
Step (a)-step (f) are performed about each of R component of the said encoding object pixel, G component, and B component, The image coding method characterized by the above-mentioned.
請求項2乃至5のいずれかにおいて、
ステップ(f)にて算出された値を逆量子化するステップ(g)と、
ステップ(d)にて算出された予測値とステップ(g)にて算出された値とを加算した値をバッファに格納するステップ(h)と、
を更に含み、
ステップ(h)にてバッファに格納された値を、前記第1の方向と逆方向において前記符号化対象画素に隣接する第4の画素、前記第2の方向と逆方向において前記符号化対象画素と隣接する第5の画素、及び/又は、前記第2の方向と逆方向において前記第4の画素に隣接し且つ前記第1の方向と逆方向において前記第5の画素に隣接する第6の画素を符号化する際に用いることを特徴とする、画像符号化方法。
In any of claims 2 to 5,
(G) dequantizing the value calculated in step (f);
Storing the value obtained by adding the predicted value calculated in step (d) and the value calculated in step (g) in a buffer (h);
Further including
The value stored in the buffer in step (h) is the fourth pixel adjacent to the encoding target pixel in the direction opposite to the first direction, and the encoding target pixel in the direction opposite to the second direction. And / or a fifth pixel adjacent to the fourth pixel in the direction opposite to the second direction and adjacent to the fifth pixel in the direction opposite to the first direction. An image encoding method, which is used when encoding a pixel.
請求項2乃至6のいずれか1項に記載の画像符号化方法によって符号化された画像データ内の復号化対象画素を、前記第1の方向において前記復号化対象画素に隣接する第1の画素と、前記第1の方向と交差する第2の方向において前記復号化対象画素に隣接する第2の画素と、前記第2の方向において前記第1の画素に隣接し且つ前記第1の方向において前記第2の画素に隣接する第3の画素とに基づいて復号化する画像復号化方法であって、
前記第3の画素と前記第2の画素との差分の絶対値を算出するステップ(a)と、
前記第3の画素と前記第1の画素との差分の絶対値を算出するステップ(b)と、
前記符号化対象画素に対する前記第1の画素及び前記第2の画素の重み付けを表す重み付け係数を算出するステップであって、前記第3の画素と前記第2の画素との差分の絶対値が前記第3の画素と前記第1の画素との差分の絶対値より大きい場合には、前記第2の画素を前記第1の画素より大きい重みとする前記重み付け係数を算出し、前記第3の画素と前記第2の画素との差分の絶対値が前記第3の画素と前記第1の画素との差分の絶対値より小さい場合には、前記第2の画素を前記第1の画素より小さい重みとする前記重み付け係数を算出するステップ(c)と、
前記重み付け係数を用いて、前記第1の画素及び前記第2の画素に重み付け演算を行うことにより、前記復号化対象画素の予測値を算出するステップ(d)と、
前記復号化対象画素を逆量子化するステップ(e)と、
ステップ(d)にて算出された予測値とステップ(e)にて算出された値とを加算するステップ(f)と、
を含む、画像復号化方法。
The first pixel adjacent to the decoding target pixel in the first direction is a decoding target pixel in the image data encoded by the image encoding method according to claim 2. A second pixel adjacent to the pixel to be decoded in a second direction intersecting the first direction, and adjacent to the first pixel in the second direction and in the first direction. An image decoding method for decoding based on a third pixel adjacent to the second pixel,
Calculating an absolute value of a difference between the third pixel and the second pixel (a);
Calculating an absolute value of a difference between the third pixel and the first pixel (b);
Calculating a weighting coefficient representing weighting of the first pixel and the second pixel with respect to the encoding target pixel, wherein an absolute value of a difference between the third pixel and the second pixel is When the absolute value of the difference between the third pixel and the first pixel is greater than the absolute value of the difference, the weighting coefficient for calculating the second pixel as a weight greater than that of the first pixel is calculated. When the absolute value of the difference between the second pixel and the second pixel is smaller than the absolute value of the difference between the third pixel and the first pixel, the second pixel is weighted smaller than the first pixel. (C) calculating the weighting coefficient
Calculating a predicted value of the decoding target pixel by performing a weighting operation on the first pixel and the second pixel using the weighting coefficient;
Dequantizing the decoding target pixel (e);
A step (f) of adding the predicted value calculated in step (d) and the value calculated in step (e);
An image decoding method including:
複数の画素を含む画像データ内の符号化対象画素を、第1の方向において前記符号化対象画素に隣接する第1の画素と、前記第1の方向と交差する第2の方向において前記符号化対象画素に隣接する第2の画素と、前記第2の方向において前記第1の画素に隣接し且つ前記第1の方向において前記第2の画素に隣接する第3の画素とに基づいて符号化する画像符号化装置であって、
前記第3の画素と前記第2の画素との差分の絶対値を算出する第1差分絶対値算出部と、
前記第3の画素と前記第1の画素との差分の絶対値を算出する第2差分絶対値算出部と、
前記第1差分絶対値算出部にて算出された差分の絶対値と前記第2差分絶対値算出部にて算出された差分の絶対値との差分を算出する差分算出部と、
前記差分算出部にて算出された差分に基づいて、前記符号化対象画素の予測値を算出する予測値算出部と、
前記符号化対象画素と前記予測値算出部にて算出された予測値との差分を算出する画素予測値差分算出部と、
前記画素予測値差分算出部にて算出された差分を量子化する量子化部と、
を含む、画像符号化装置。
The encoding target pixel in the image data including a plurality of pixels is encoded in the first direction adjacent to the encoding target pixel in the first direction and in the second direction intersecting the first direction. Encoding based on a second pixel adjacent to the target pixel and a third pixel adjacent to the first pixel in the second direction and adjacent to the second pixel in the first direction An image encoding device for
A first difference absolute value calculation unit for calculating an absolute value of a difference between the third pixel and the second pixel;
A second difference absolute value calculation unit for calculating an absolute value of a difference between the third pixel and the first pixel;
A difference calculation unit that calculates a difference between the absolute value of the difference calculated by the first difference absolute value calculation unit and the absolute value of the difference calculated by the second difference absolute value calculation unit;
A prediction value calculation unit that calculates a prediction value of the encoding target pixel based on the difference calculated by the difference calculation unit;
A pixel prediction value difference calculation unit that calculates a difference between the encoding target pixel and the prediction value calculated by the prediction value calculation unit;
A quantization unit that quantizes the difference calculated by the pixel prediction value difference calculation unit;
An image encoding device.
請求項8において、
前記複数の画素の各々が複数の成分を含み、
前記第1差分絶対値算出部、前記第2差分絶対値算出部、前記差分算出部、前記予測値算出部、前記画素予測値差分算出部、及び、前記量子化部の組を複数有し、各組が前記符号化対象画素の各成分を並列して符号化することを特徴とする、画像符号化装置。
In claim 8,
Each of the plurality of pixels includes a plurality of components;
A plurality of sets of the first difference absolute value calculation unit, the second difference absolute value calculation unit, the difference calculation unit, the prediction value calculation unit, the pixel prediction value difference calculation unit, and the quantization unit; An image encoding device, wherein each set encodes each component of the encoding target pixel in parallel.
請求項8又は9に記載の画像符号化装置によって符号化された画像データ内の復号化対象画素を、前記第1の方向において前記復号化対象画素に隣接する第1の画素と、前記第1の方向と交差する第2の方向において前記復号化対象画素に隣接する第2の画素と、前記第2の方向において前記第1の画素に隣接し且つ前記第1の方向において前記第2の画素に隣接する第3の画素とに基づいて復号化する画像復号化装置であって、
前記第3の画素と前記第2の画素との差分の絶対値を算出する第1差分絶対値算出部と、
前記第3の画素と前記第1の画素との差分の絶対値を算出する第2差分絶対値算出部と、
前記第1差分絶対値算出部にて算出された差分の絶対値と前記第2差分絶対値算出部にて算出された差分の絶対値との差分を算出する差分算出部と、
前記差分算出部にて算出された差分に基づいて、前記復号化対象画素の予測値を算出する予測値算出部と、
前記復号化対象画素を逆量子化する逆量子化部と、
前記予測値算出部にて算出された予測値と前記逆量子化部にて算出された値とを加算することにより、前記復号化対象画素を復号化する復号化部と、
を含む、画像復号化装置。
The decoding target pixel in the image data encoded by the image encoding device according to claim 8 or 9, the first pixel adjacent to the decoding target pixel in the first direction, and the first A second pixel that is adjacent to the pixel to be decoded in a second direction that intersects the direction of the second pixel, and that is adjacent to the first pixel in the second direction and the second pixel in the first direction. An image decoding device that performs decoding based on a third pixel adjacent to
A first difference absolute value calculation unit for calculating an absolute value of a difference between the third pixel and the second pixel;
A second difference absolute value calculation unit for calculating an absolute value of a difference between the third pixel and the first pixel;
A difference calculation unit that calculates a difference between the absolute value of the difference calculated by the first difference absolute value calculation unit and the absolute value of the difference calculated by the second difference absolute value calculation unit;
A prediction value calculation unit that calculates a prediction value of the decoding target pixel based on the difference calculated by the difference calculation unit;
An inverse quantization unit that inversely quantizes the decoding target pixel;
A decoding unit that decodes the decoding target pixel by adding the prediction value calculated by the prediction value calculation unit and the value calculated by the inverse quantization unit;
An image decoding apparatus.
請求項8又は9に記載の画像符号化装置と、
前記画像符号化装置によって符号化された画像データを格納するメモリと、
前記メモリに格納されている画像データを復号化する請求項10に記載の画像復号化装置と、
を含む、半導体集積回路。
An image encoding device according to claim 8 or 9,
A memory for storing image data encoded by the image encoding device;
The image decoding device according to claim 10, which decodes image data stored in the memory;
A semiconductor integrated circuit.
JP2007236300A 2007-09-12 2007-09-12 Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit Withdrawn JP2009071472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007236300A JP2009071472A (en) 2007-09-12 2007-09-12 Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007236300A JP2009071472A (en) 2007-09-12 2007-09-12 Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit

Publications (1)

Publication Number Publication Date
JP2009071472A true JP2009071472A (en) 2009-04-02

Family

ID=40607300

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007236300A Withdrawn JP2009071472A (en) 2007-09-12 2007-09-12 Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit

Country Status (1)

Country Link
JP (1) JP2009071472A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011223056A (en) * 2010-04-02 2011-11-04 Taito Corp Video playback method
JP2015012483A (en) * 2013-06-28 2015-01-19 株式会社Jvcケンウッド Image encoding apparatus, image encoding method, image encoding program, image decoding apparatus, image decoding method, and image decoding program
US11405623B2 (en) 2019-10-31 2022-08-02 Samsung Electronics Co., Ltd. Image encoder, image decoder, and image processing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011223056A (en) * 2010-04-02 2011-11-04 Taito Corp Video playback method
JP2015012483A (en) * 2013-06-28 2015-01-19 株式会社Jvcケンウッド Image encoding apparatus, image encoding method, image encoding program, image decoding apparatus, image decoding method, and image decoding program
US11405623B2 (en) 2019-10-31 2022-08-02 Samsung Electronics Co., Ltd. Image encoder, image decoder, and image processing method
US20220368927A1 (en) * 2019-10-31 2022-11-17 Samsung Electronics Co., Ltd. Image encoder, image decoder, and image processing method
US11770541B2 (en) 2019-10-31 2023-09-26 Samsung Electronics Co., Ltd. Image encoder, image decoder, and image processing method

Similar Documents

Publication Publication Date Title
US10368092B2 (en) Encoder-side decisions for block flipping and skip mode in intra block copy prediction
US9185424B2 (en) Image data compression
JP5051087B2 (en) Lossless compression coding apparatus and lossless decoding apparatus
JP5314287B2 (en) Method and apparatus for effectively compressing and restoring edge regions
US20100177820A1 (en) Video encoding device, video decoding device, video encoding method, video decoding method, video encoding or decoding program
US9641850B2 (en) Video compression device
JP5073004B2 (en) Image coding apparatus, image coding method, image decoding apparatus, and image decoding method
US11695955B2 (en) Image encoding device, image decoding device and program
US20130251257A1 (en) Image encoding device and image encoding method
JP6409516B2 (en) Picture coding program, picture coding method, and picture coding apparatus
KR20140046985A (en) Compressor, driving device, display device, and compression method
WO2009087783A1 (en) Data generator for coding, method of generating data for coding, decoder and decoding method
JP5157796B2 (en) Lossless compression encoding apparatus and decoding apparatus for image data
JP5375372B2 (en) Compression encoding apparatus and decoding apparatus
TWI506965B (en) A coding apparatus, a decoding apparatus, a coding / decoding system, a coding method, and a decoding method
JP2009071472A (en) Image encoding method, image decoding method, image encoder, image decoder and semiconductor integrated circuit
JP2006080793A (en) Image coder, method, compputer program, and computer readable storage medium
JP7030246B2 (en) Intra predictor, image decoder, and program
JP2009105700A (en) Image encoding method, image decoding method, image encoding device, image decoding device, and semiconductor integrated circuit
JP4415651B2 (en) Image encoding apparatus and image decoding apparatus
JP6069929B2 (en) Image selection method, image selection apparatus, encoding apparatus, image selection system, image selection program, encoding program, and image encoding selection program
US11202074B2 (en) Encoding apparatus and encoding method
JP2008042681A (en) Image processing method and processor, computer program and computer readable storage medium
US8818121B2 (en) Motion detector, image processing device, and image processing system
JP5404857B2 (en) Image coding apparatus, image coding method, image decoding apparatus, and image decoding method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20101207