JP2011171938A - Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera - Google Patents

Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera Download PDF

Info

Publication number
JP2011171938A
JP2011171938A JP2010032889A JP2010032889A JP2011171938A JP 2011171938 A JP2011171938 A JP 2011171938A JP 2010032889 A JP2010032889 A JP 2010032889A JP 2010032889 A JP2010032889 A JP 2010032889A JP 2011171938 A JP2011171938 A JP 2011171938A
Authority
JP
Japan
Prior art keywords
arithmetic
prediction
value
pixel
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.)
Pending
Application number
JP2010032889A
Other languages
Japanese (ja)
Inventor
Masao Ozawa
政夫 小澤
Masayoshi Ogawa
真由 小川
Shinji Kitamura
臣二 北村
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.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2010032889A priority Critical patent/JP2011171938A/en
Publication of JP2011171938A publication Critical patent/JP2011171938A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image encoding method by an adaptive arithmetic encoding where encoding efficiency is further improved. <P>SOLUTION: The image encoding method comprises: a predictive pixel generating step S102 which generates the predicted value of a pixel to be encoded; a change extracting step S103 which generates predicted error information from pixel data and the predicted value of the pixel to be encoded; an arithmetic encoding step S105 which performs arithmetic encoding of the predicted error information bit by bit using predicted probability changing adaptively; and a predicted probability update step 106 (S201 to S203) which updates the predicted probability to decrease the predicted probability to be used for the arithmetic encoding of a first value when the bit subjected to the arithmetic encoding is a first value and so as to increase the predicted probability to be used for the arithmetic encoding of the first value when the bit subjected to the arithmetic encoding is not the first value. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像符号化・復号化方法とその装置に関し、特に、ディジタルスチルカメラやネットワークカメラ等のように画像を扱う装置における、画像圧縮によるデータ転送の高速化やメモリの使用量削減を目的とした画像符号化・復号化方法とその装置に関するものである。   The present invention relates to an image encoding / decoding method and an apparatus therefor, and in particular, to increase the speed of data transfer by image compression and reduce the amount of memory used in an apparatus that handles images such as a digital still camera and a network camera. The present invention relates to an image encoding / decoding method and apparatus therefor.

近年、ディジタルスチルカメラやディジタルビデオカメラなどの撮像装置に用いられる撮像素子の高画素化に伴い、撮像装置に搭載される集積回路が処理する画像データ量が増大している。多くの画像データを扱うには、集積回路内のデータ転送のバス幅を確保するために、動作周波数の高速化、メモリの大容量化等が考えられるが、これらはコストアップに直接繋がってしまう。   2. Description of the Related Art In recent years, the amount of image data processed by an integrated circuit mounted on an imaging apparatus has increased with the increase in the number of pixels of an imaging element used in an imaging apparatus such as a digital still camera or a digital video camera. In order to handle a large amount of image data, it is possible to increase the operating frequency and increase the capacity of the memory in order to secure the bus width of the data transfer in the integrated circuit, but this directly leads to an increase in cost. .

そこで、近年、画像信号に含まれる冗長な信号成分を除去することによって、画像データ量を低減するための様々な処理技術が提案されている。なお、このような画像データ量を低減するための処理を画像の高能率符号化、あるいは単に画像符号化という。また、この技術は、データ圧縮符号化、冗長度抑圧符号化、ビットレート低減符号化などと呼ばれることもある。   Thus, in recent years, various processing techniques for reducing the amount of image data by removing redundant signal components included in an image signal have been proposed. Note that such processing for reducing the amount of image data is called high-efficiency encoding of an image, or simply image encoding. In addition, this technique is sometimes called data compression coding, redundancy suppression coding, bit rate reduction coding, or the like.

最も代表的な符号化方法の1つとして算術符号化がある。これは発生頻度(つまり、出現頻度)の高い出力レベルには短い符号を、発生頻度の低い出力レベルには長い符号を割り当てる。これによって出力符号の平均符号長を短くできる。   One of the most typical coding methods is arithmetic coding. This assigns a short code to an output level with a high occurrence frequency (that is, appearance frequency) and a long code to an output level with a low occurrence frequency. As a result, the average code length of the output code can be shortened.

以下、算術符号化(より具体的には、レンジ・コーダと呼ばれる算術符号化)について説明する。   Hereinafter, arithmetic coding (more specifically, arithmetic coding called a range coder) will be described.

算術符号化では、0〜1の数直線を、符号化するデータ(事象)の発生頻度で分割することによって、符号化するデータを発生頻度(具体的には、発生確率)に置き換える。例えば、図23に示すように入力値“11001…”を符号化する場合には、各ビットを順に、“1”の出る予測確率P(0≦P≦1)と“0”の出る予測確率Q(Q=1−P)とによる発生頻度に置き換えていくことで、これを図24に示す原点Cと幅Aとで特定される数直線上の分割比率(つまり、数直線上の区間)で表す。具体的には、数直線上に2つの変数C(原点)とA(幅)をもたせ、まず、C=0、A=1図24と初期化する。次に、最初のビットを検査し、そのビットが、値“1”であるときは、原点Cを変えずに数直線の分割を行い、新たに図24の分割(1)が示す予測確率Pの大きさに数直線の幅Aを更新する。具体的には、予測確率Pに対応する符号“1”がきた場合には、数直線の幅Aを予測確率P(分割(1)が示す予測確率Pの区間)に変更し、原点Cはそのままとして変更しない。続いて、予測確率Qに対応する符号“0”がきた場合には、図24原点Cの位置を予測確率P(分割(2)が示す予測確率Pの区間)だけ右に動かして幅Aを分割(2)における予測確率Qの区間に変える。   In arithmetic encoding, the data to be encoded is replaced with the occurrence frequency (specifically, the occurrence probability) by dividing the number line 0 to 1 by the occurrence frequency of the data (event) to be encoded. For example, when the input value “11001...” Is encoded as shown in FIG. 23, the prediction probability P (0 ≦ P ≦ 1) where “1” appears and the prediction probability where “0” appears when each bit is sequentially encoded. By replacing the occurrence frequency with Q (Q = 1−P), this is the division ratio on the number line specified by the origin C and the width A shown in FIG. 24 (that is, the section on the number line). Represented by Specifically, two variables C (origin) and A (width) are provided on the number line, and C = 0 and A = 1 are initialized as shown in FIG. Next, the first bit is inspected, and when the bit is a value “1”, the number line is divided without changing the origin C, and the prediction probability P newly indicated by the division (1) in FIG. The width A of the number line is updated to the size of. Specifically, when the code “1” corresponding to the prediction probability P comes, the width A of the number line is changed to the prediction probability P (the section of the prediction probability P indicated by the division (1)), and the origin C is Do not change as is. Subsequently, when the code “0” corresponding to the prediction probability Q comes, the position of the origin C in FIG. 24 is moved to the right by the prediction probability P (the section of the prediction probability P indicated by the division (2)) to increase the width A. Change to the section of the prediction probability Q in the division (2).

上述した方法に従って図23に示す入力値“11001…”を構成するビットに対して連続的に符号化(つまり、原点Cの位置をそのままにして幅Aだけを狭めるか、原点Cを移動させて幅Aを狭めるかの処理を)していくと、原点Cが0〜1の数直線のある点に収束する。これにより、元の入力値は、収束した原点Cの位置(あるいは、原点の位置Cと幅A)で表現することができる。係る符号化を算術符号化という。   According to the above-described method, the bits constituting the input value “11001...” Shown in FIG. 23 are continuously encoded (that is, the position of the origin C is left as it is, or the width A is narrowed or the origin C is moved. When the process of narrowing the width A) is continued, the origin C converges to a point on a number line of 0 to 1. Thereby, the original input value can be expressed by the converged position of the origin C (or the position C and the width A of the origin). Such coding is called arithmetic coding.

従って、予測確率Pに対応する符号“1”がきた場合には、数直線が分割されるが原点Cの位置は変化せず、よって、予測確率Pに対応する符号“1”が続く限り、数直線を分割していく(つまり、幅Aが変化していく)だけで原点Cの位置は変わらない。すなわち、予測確率Pに対応する符号(ビット値)が多い程、数直線の分割が進んでいったとしても、原点Cを表現するために必要な算術符号の桁は増えない(予測確率Qに対応する符号“0”がきたときだけ原点の位置が動く)。   Therefore, when the code “1” corresponding to the prediction probability P comes, the number line is divided, but the position of the origin C does not change. Therefore, as long as the code “1” corresponding to the prediction probability P continues, The position of the origin C does not change only by dividing the number line (that is, the width A changes). That is, as the number of codes (bit values) corresponding to the prediction probability P increases, the number of arithmetic codes necessary for expressing the origin C does not increase even if the number line division proceeds (the prediction probability Q is increased). The position of the origin moves only when the corresponding code “0” comes).

一方、算術符号の復号化処理は、図25に示す通りである。まず、符号化のときと同様に、0から1までの数直線を用意する。いま、復号化の対象となる値(符号化された値「符号化値」)は、図25における一点鎖線で示される位置とする。符号化された値が前記数直線上の予測確率Pの範囲にあれば“1”と復号化する。引き続き、符号化時と同様に、幅A(ここでは、図25の1番目の数直線における予測確率Pの区間)をさらに予測確率Pと予測確率Q(図25の2番目の数直線における予測確率Pの区間と予測確率Qの区間)に分割し、前記符号化された値がどちらの範囲に属するかで復号化すべき符号を“0”か“1”かに判定する。ここでは、符号化された値が図25の2番目の数直線における予測確率Pの区間に属するので、“1”と復号化する。これを繰り返すことにより復号化がなされる。   On the other hand, the arithmetic code decoding process is as shown in FIG. First, as in the case of encoding, a number line from 0 to 1 is prepared. Now, it is assumed that a value to be decoded (encoded value “encoded value”) is a position indicated by a one-dot chain line in FIG. If the encoded value is within the range of the prediction probability P on the number line, it is decoded as “1”. Subsequently, as in the encoding, the width A (here, the section of the prediction probability P in the first number line in FIG. 25) is further changed to the prediction probability P and the prediction probability Q (the prediction in the second number line in FIG. 25). It is determined whether the code to be decoded is “0” or “1” depending on which range the encoded value belongs to. Here, since the encoded value belongs to the interval of the prediction probability P in the second number line in FIG. 25, it is decoded as “1”. By repeating this, decoding is performed.

ここで、上述した算術符号化には、次のような欠点がある。つまり、上記“1”の出る予測確率P、“0”の出る予測確率Qを求めるために発生頻度を事前に知る必要がある。このために、算術符号化をする前に符号化対象のデータ全てを読み込む必要がある。   Here, the arithmetic coding described above has the following drawbacks. That is, it is necessary to know the occurrence frequency in advance in order to obtain the prediction probability P at which “1” appears and the prediction probability Q at which “0” appears. For this reason, it is necessary to read all data to be encoded before performing arithmetic encoding.

このような算術符号化の欠点を解消するものとして適応型算術符号化がある。これは、0から1までの数直線上を符号化するデータの予測確率で分割することでは上述した算術符号化と同様であるが、予測確率PおよびQを、予め全部のデータを読み込み予測確率を算出しておくのではない。具体的には、適応型算術符号化では、最初は発生頻度がどちらか分からないから予測確率P及びQをそれぞれ0.5と仮に設定し、符号が入力されるに従ってこの予測確率を適応的に変化させる。   There is adaptive arithmetic coding as a solution to such a drawback of arithmetic coding. This is the same as the arithmetic coding described above in that it is divided by the prediction probability of the data to be encoded on the number line from 0 to 1, but the prediction probabilities P and Q are read in advance and all the data are read in advance. Is not calculated. Specifically, in adaptive arithmetic coding, since the occurrence frequency is unknown at first, the prediction probabilities P and Q are set to 0.5 temporarily, and this prediction probability is adaptively set as the code is input. Change.

例えば、予測確率P=0.5と仮定した場合、入ってくる符号に“1”が多いときは予測確率Pを0.5よりも大きくなる方向に変化させる。また、逆に“0”が多くなってきたときは予測確率を下げていき、予測確率Pを0.5よりも小さく(P<0.5)する。このように適応的に予測確率を変化させることで、予め全データを読み込むことでの予測確率の事前の決定を必要としなくなる。   For example, assuming that the prediction probability P = 0.5, if there are many “1” s in the incoming code, the prediction probability P is changed in a direction larger than 0.5. Conversely, when “0” increases, the prediction probability is lowered, and the prediction probability P is made smaller than 0.5 (P <0.5). Thus, by changing the prediction probability adaptively, it is not necessary to determine the prediction probability in advance by reading all data in advance.

このような適応型算術符号化を利用して画像データを圧縮する技術として、様々な技術が提案されている(例えば、特許文献1参照)。特許文献1の技術は、上記従来技術を用いて、画像データの圧縮処理を撮像素子から入力される画素信号(RAWデータ)に対しても適用することで、撮像素子の多画素化が進み信号処理の負荷が増大する場合でも、メモリへの書き込みおよび読み出しの際に必要なバス帯域を削減し、高速操作を可能にすることを目的としている。また、圧縮対象画素値と予測値との予測誤差を排他的論理和により抽出して、これを圧縮対象の情報とすることにおいて、圧縮効率を高めるために適応型算術符号化を用いた可変長符号化方式を採用している。その実装方法については、符号化対象画素とその周囲複数画素の値から予測される予測値に基づいて予測誤差を算出し、この予測誤差を所定の変数に変えることで算術符号の分割比率が適応的に変化する算術符号化によって符号化されるが、この際、周囲複数画素が特定パターンであるときには算術符号化における分割比率を制御せず、固定された分割比率を用いて符号化を行っている。   Various techniques have been proposed as techniques for compressing image data using such adaptive arithmetic coding (see, for example, Patent Document 1). The technique of Patent Document 1 uses the above-described conventional technique to apply image data compression processing to pixel signals (RAW data) input from an image sensor, thereby increasing the number of pixels in the image sensor. The purpose is to reduce the bus bandwidth required for writing to and reading from the memory and to enable high-speed operation even when the processing load increases. In addition, by extracting the prediction error between the compression target pixel value and the prediction value by exclusive OR, and using this as the compression target information, the variable length using adaptive arithmetic coding to increase the compression efficiency Encoding method is adopted. For the implementation method, the prediction error is calculated based on the prediction value predicted from the values of the encoding target pixel and the surrounding pixels, and the arithmetic code division ratio is adapted by changing this prediction error to a predetermined variable. In this case, encoding is performed using a fixed division ratio without controlling the division ratio in arithmetic coding when the surrounding pixels have a specific pattern. Yes.

特許第3127513号公報Japanese Patent No. 3127513

しかし、このような従来の適応型算術符号化を用いた符号化方法は、画像データ固有の発生頻度の偏りを考慮しておらず、そのために、効率的な符号化を行えておらず、圧縮効率が悪いという問題がある。   However, such a conventional coding method using adaptive arithmetic coding does not consider the occurrence frequency bias inherent in image data, and therefore does not perform efficient coding and compression. There is a problem of inefficiency.

ここで、画像データにおける固有の発生頻度の偏りとは、符号化対象の画素とその近接画素との相関性が高いことから、それらの差である予測誤差はビットプレーン上でMSB(Most Significant Bit)側程“0”が発生する頻度が高く、LSB(Least Significant Bit)側程“1”が発生する頻度が高くなることである。上記従来の技術はこれを考慮していないがために、MSBからLSBの方向に符号化をする場合に、符号化開始時には“0”が頻繁に入力されるために、符号化が繰り返されるにつれ、“0”の発生頻度がどんどん高くなる。しかし、符号化処理を進めるにつれ、LSB側にいく程“1”の発生頻度が高いために、更新した発生頻度と符号化対象のデータにおける発生頻度の乖離が生じる。その結果、“1”を符号化する際には長い符号量が出力されることとなり、最終的に出力される符号量が多くなってしまうという問題がある。   Here, since the occurrence frequency inherent in the image data is highly correlated with the pixel to be encoded and its neighboring pixels, the prediction error that is the difference between them is the MSB (Most Significant Bit). ) “0” occurs more frequently on the side, and “1” occurs on the LSB (Least Significant Bit) side. Since the above conventional technique does not consider this, when encoding in the direction from MSB to LSB, since “0” is frequently input at the start of encoding, as encoding is repeated. The frequency of occurrence of “0” becomes higher. However, as the encoding process proceeds, the frequency of occurrence of “1” increases as it goes to the LSB side, resulting in a difference between the updated frequency of occurrence and the frequency of occurrence of data to be encoded. As a result, when "1" is encoded, a long code amount is output, and there is a problem that the code amount finally output increases.

本発明は、上記の問題を鑑みたものであり、より符号化効率が向上された適応型算術符号化による画像符号化方法等を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an image coding method or the like by adaptive arithmetic coding with further improved coding efficiency.

上記の問題を解決するため、本発明に係る画像符号化方法の一態様は、画像データを構成する画素データを圧縮する画像符号化方法であって、符号化対象画素の周辺に位置する少なくとも1個の画素の画素データから、当該符号化対象画素の予測値を生成する予測画素生成ステップと、前記符号化対象画素の画素データと前記予測値とのビット変化を抽出することによって当該ビット変化を示す予測誤差情報を生成する変化抽出ステップと、前記変化抽出ステップにより生成された予測誤差情報を、当該予測誤差情報を構成するビットごとに、適応的に変化する予測確率を用いて算術符号化をする算術符号化ステップと、前記算術符号化ステップで符号化されたビットが第1の値である場合に当該第1の値の算術符号化に用いられる予測確率を下げ、前記算術符号化ステップで符号化されたビットが第1の値でない場合に当該第1の値の算術符号化に用いられる予測確率を上げるように、前記予測確率を更新する予測確率更新ステップとを含み、前記算術符号化ステップでは、前記予測誤差情報を構成するビットごとに、前記予測確率更新ステップで更新された予測確率を用いて前記算術符号化を行う。   In order to solve the above problem, one aspect of an image encoding method according to the present invention is an image encoding method for compressing pixel data constituting image data, and is at least one positioned around a pixel to be encoded. A prediction pixel generation step of generating a prediction value of the encoding target pixel from pixel data of the pixels, and extracting the bit change between the pixel data of the encoding target pixel and the prediction value. A change extraction step for generating prediction error information, and a prediction error information generated by the change extraction step is arithmetically encoded using a prediction probability that adaptively changes for each bit constituting the prediction error information. An arithmetic coding step, and a prediction probability used for arithmetic coding of the first value when the bit coded in the arithmetic coding step is the first value A prediction probability update step of updating the prediction probability so as to increase the prediction probability used for arithmetic encoding of the first value when the bit encoded in the arithmetic encoding step is not the first value In the arithmetic encoding step, the arithmetic encoding is performed using the prediction probability updated in the prediction probability update step for each bit constituting the prediction error information.

これにより、予測確率を用いたビットごとの算術符号化において、発生した事象(算術符号化の対象となるビットの値)に対する予測確率を下げる方向に予測確率を更新していく。よって、算術符号化の対象となる予測誤差情報がMSBからLSBにいく従って“0”の発生頻度が高い状態から“1”の発生頻度が高い状態に遷移すること等の状態の反転に対応した予測確率の更新が行われることとなり、これによって、画像データにおけるビットの発生頻度の偏りを考慮した予測確率の適応的な更新が行われ、画像データの符号化効率が向上される。   As a result, in the arithmetic coding for each bit using the prediction probability, the prediction probability is updated in the direction of decreasing the prediction probability for the event that has occurred (the value of the bit that is the target of arithmetic coding). Therefore, the prediction error information subject to arithmetic coding goes from the MSB to the LSB, so that the state inversion such as the transition from the high occurrence frequency of “0” to the high occurrence frequency of “1” is supported. The prediction probability is updated, and accordingly, the prediction probability is adaptively updated in consideration of the deviation of the occurrence frequency of bits in the image data, and the coding efficiency of the image data is improved.

なお、本発明は、このような画像符号化方法として実現できるだけでなく、画像符号化方法に対応する画像復号化方法として実現したり、それらの方法を構成するステップを電子回路として備えるLSI等の装置として実現したり、それらの方法を構成するステップをコンピュータに実行させるプログラムとして実現したり、そのプログラムを記録したコンピュータ読み取り可能なCD−ROM等の記録媒体として実現することもできる。   The present invention can be realized not only as such an image encoding method, but also as an image decoding method corresponding to the image encoding method, or an LSI or the like provided with steps constituting those methods as an electronic circuit. It can also be realized as a device, realized as a program for causing a computer to execute the steps constituting those methods, or realized as a recording medium such as a computer-readable CD-ROM on which the program is recorded.

本発明によれば、画像データにおける発生頻度の偏りが考慮された適応型算術符号化が行われるので、画像データの符号化効率が向上される。   According to the present invention, adaptive arithmetic coding is performed in consideration of occurrence frequency deviation in image data, so that the coding efficiency of image data is improved.

よって、本発明により、ディジタルカメラ等で得られた画像データがより小さなサイズに圧縮されてメモリに格納されるので、特に、ディジタルカメラが普及してきた今日における本発明の実用的意義は極めて高い。   Therefore, according to the present invention, image data obtained by a digital camera or the like is compressed to a smaller size and stored in a memory. Therefore, the practical significance of the present invention in particular where digital cameras have become widespread is extremely high.

本発明の実施の形態1における画像符号化装置および画像復号化装置の構成を示すブロック図FIG. 1 is a block diagram showing a configuration of an image encoding device and an image decoding device according to Embodiment 1 of the present invention. (a)及び(b)は、それぞれ、画像符号化装置および画像復号化装置における画像符号処理および復号化処理を示すフローチャート(A) And (b) is a flowchart which shows the image coding process and decoding process in an image coding apparatus and an image decoding apparatus, respectively. 算術符号化における予測確率の更新方法を示すフローチャートA flowchart showing a method for updating a prediction probability in arithmetic coding 予測画素生成部における予測式を説明する図The figure explaining the prediction formula in a prediction pixel production | generation part 算術符号化部に入力される予測誤差情報の入力順番を説明する図The figure explaining the input order of the prediction error information input into an arithmetic coding part 算術符号化部に入力される予測誤差情報の入力順番を説明する図The figure explaining the input order of the prediction error information input into an arithmetic coding part 算術符号化に用いる予測確率の更新を説明する図The figure explaining the update of the prediction probability used for arithmetic coding 算術符号化対象の入力値(具体例)を示す図Diagram showing input value (specific example) for arithmetic coding (a)及び(b)は、実施の形態1において算術符号化される予測誤差情報の入力順序(具体例)を示す図(A) And (b) is a figure which shows the input order (specific example) of the prediction error information arithmetically encoded in Embodiment 1. 実施の形態1における算術符号化に用いる予測確率の更新(具体例)を示す図The figure which shows the update (specific example) of the prediction probability used for arithmetic coding in Embodiment 1 符号化処理結果(具体例)を示す図The figure which shows an encoding process result (specific example) 算術符号化を説明するための数式を示す図The figure which shows the numerical formula for explaining arithmetic coding 本実施の形態における算術符号化の具体例を説明するための図The figure for demonstrating the specific example of the arithmetic coding in this Embodiment 従来手法における算術符号化の具体例を説明するための図A diagram for explaining a specific example of arithmetic coding in the conventional method 符号化処理結果(具体例)を示す図The figure which shows an encoding process result (specific example) (a)及び(b)は、それぞれ、本発明の実施の形態2における画像符号化装置および画像復号化装置の固定長符号化におけるフローチャート(A) And (b) is the flowchart in the fixed-length encoding of the image coding apparatus and the image decoding apparatus in Embodiment 2 of this invention, respectively. (a)及び(b)は、実施の形態2において算術符号化される予測誤差情報の入力順序を示す図(A) And (b) is a figure which shows the input order of the prediction error information arithmetically encoded in Embodiment 2. (a)〜(d)は、実施の形態2において算術符号化される予測誤差情報の入力順序を示す図(A)-(d) is a figure which shows the input order of the prediction error information arithmetically encoded in Embodiment 2. 本発明の実施の形態3におけるディジタルスチルカメラの構成を示すブロック図Block diagram showing a configuration of a digital still camera according to Embodiment 3 of the present invention 本発明の実施の形態4におけるディジタルスチルカメラの構成を示すブロック図Block diagram showing the configuration of a digital still camera according to Embodiment 4 of the present invention. 実施の形態5における監視カメラの構成を示すブロック図FIG. 6 is a block diagram illustrating a configuration of a surveillance camera according to a fifth embodiment. 実施の形態6における監視カメラの構成を示すブロック図FIG. 7 is a block diagram illustrating a configuration of a surveillance camera according to a sixth embodiment. 従来の算術符号化を説明するための入力値及び予測確率を示す図The figure which shows the input value and prediction probability for demonstrating the conventional arithmetic coding 従来の算術符号化を説明するための図Diagram for explaining conventional arithmetic coding 従来の算術復号化を説明するための図Diagram for explaining conventional arithmetic decoding 従来手法における算術符号化に用いる予測確率の更新を示す図The figure which shows the update of the prediction probability used for arithmetic coding in the conventional method

以下、本発明の実施の形態について図面を参照しながら説明する。なお、以下の各実施の形態や各変形例の説明において、一度説明した構成要素と同様の機能を有する構成要素については、同一の符号を付して説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description of each embodiment and each modification, components having the same functions as those described once will be given the same reference numerals and description thereof will be omitted.

≪実施の形態1≫
図1は、本発明の実施の形態1における画像符号化装置300及び画像復号化装置310の構成を示すブロック図である。図2(a)及び図2(b)は、それぞれ、本発明の実施の形態1における画像符号化方法および画像復号化方法の手順を示すフローチャートである。図3は、図2(a)及び図2(b)に示される算術符号化および算術復号化に用いる予測確率の更新(図2(a)のステップS106及び図2(b)のS115)の詳細を示すフローチャートである。
<< Embodiment 1 >>
FIG. 1 is a block diagram showing the configuration of image encoding device 300 and image decoding device 310 according to Embodiment 1 of the present invention. FIG. 2A and FIG. 2B are flowcharts showing the procedures of the image encoding method and the image decoding method, respectively, according to Embodiment 1 of the present invention. FIG. 3 shows the update of prediction probabilities used in the arithmetic coding and arithmetic decoding shown in FIGS. 2A and 2B (step S106 in FIG. 2A and S115 in FIG. 2B). It is a flowchart which shows a detail.

画像符号化装置300は、図1に示されるように、画像データを構成する画素データをM個の画素(以下、「M画素」ともいう。)単位で圧縮する装置であって、処理対象画素値入力部301、変化抽出部302、予測画素生成部303、算術符号化部304、予測確率更新部305及びパッキング部306を備える。   As shown in FIG. 1, the image encoding device 300 is a device that compresses pixel data constituting image data in units of M pixels (hereinafter also referred to as “M pixels”), and is a processing target pixel. A value input unit 301, a change extraction unit 302, a prediction pixel generation unit 303, an arithmetic coding unit 304, a prediction probability update unit 305, and a packing unit 306 are provided.

処理対象画素値入力部301は、符号化対象画素の画素データを受け取り、受け取った画素データが初期画素値データである場合には、その初期画素値データをパッキング部306に出力し、受け取った画素データが初期画素値データでない場合には、その画素データを変化抽出部302と予測画素生成部303に出力する処理部である。なお、初期画素値データとは、圧縮(つまり、算術符号化)の単位となるM個の画素における先頭画素の画素データである。   The processing target pixel value input unit 301 receives pixel data of the encoding target pixel. If the received pixel data is initial pixel value data, the processing target pixel value input unit 301 outputs the initial pixel value data to the packing unit 306 and receives the received pixel data. When the data is not initial pixel value data, the processing unit outputs the pixel data to the change extraction unit 302 and the predicted pixel generation unit 303. Note that the initial pixel value data is pixel data of the first pixel in M pixels that is a unit of compression (that is, arithmetic coding).

予測画素生成部303は、符号化対象画素の周辺に位置する少なくとも1個の画素の画素データから、予め定められた予測手順に従って、当該符号化対象画素の予測値を生成し、変化抽出部302に出力する処理部である。   The prediction pixel generation unit 303 generates a prediction value of the encoding target pixel from pixel data of at least one pixel located around the encoding target pixel according to a predetermined prediction procedure, and the change extraction unit 302 It is a processing part which outputs to.

変化抽出部302は、処理対象画素値入力部301から送られてくる符号化対象画素の画素データと、予測画素生成部303から送られてくる当該符号化対象画素の予測値とのビット変化を抽出することによって当該ビット変化を示す予測誤差情報を生成し、算術符号化部304に出力する処理部である。   The change extraction unit 302 calculates a bit change between the pixel data of the encoding target pixel sent from the processing target pixel value input unit 301 and the prediction value of the encoding target pixel sent from the prediction pixel generation unit 303. This is a processing unit that generates prediction error information indicating the bit change by extraction and outputs the prediction error information to the arithmetic coding unit 304.

算術符号化部304は、変化抽出部から送られてくる予測誤差情報を、当該予測誤差情報を構成するビットごとに、適応的に変化する予測確率を用いて算術符号化をする処理部であり、その算術符号化においては、予測誤差情報を構成するビットごとに、予測確率更新部305で更新された予測確率を用いて算術符号化を行う。   The arithmetic coding unit 304 is a processing unit that performs arithmetic coding on the prediction error information sent from the change extraction unit using a prediction probability that adaptively changes for each bit constituting the prediction error information. In the arithmetic coding, arithmetic coding is performed using the prediction probability updated by the prediction probability update unit 305 for each bit constituting the prediction error information.

予測確率更新部305は、算術符号化部304で符号化されたビットが第1の値(“1”)である場合に当該第1の値の算術符号化に用いられる予測確率Pを予め定められたα分だけ下げ(つまり、第2の値(“0”)の算術符号化に用いられる予測確率Qを予め定められたα分だけ上げ)、一方、算術符号化部304で符号化されたビットが第1の値でない場合に当該第1の値の算術符号化に用いられる予測確率を上げる(つまり、第2の値(“0”)の算術符号化に用いられる予測確率Qを予め定められたα分だけ下げる)ように、予測確率P及びQを更新する処理部である。   The prediction probability update unit 305 determines in advance a prediction probability P used for arithmetic coding of the first value when the bit encoded by the arithmetic coding unit 304 is the first value (“1”). Is reduced by the specified α (that is, the prediction probability Q used for the arithmetic encoding of the second value (“0”) is increased by a predetermined α), while being encoded by the arithmetic encoding unit 304 If the bit is not the first value, the prediction probability used for arithmetic coding of the first value is increased (that is, the prediction probability Q used for arithmetic coding of the second value (“0”) is set in advance. It is a processing unit that updates the prediction probabilities P and Q so as to reduce the value by a predetermined α).

つまり、この予測確率更新部305は、予測確率を用いたビットごとの算術符号化において、発生した事象(算術符号化の対象となるビットの値)に対する予測確率を下げる方向に予測確率を更新していく。これは、算術符号化の対象となる予測誤差情報がMSBからLSBにいく従って“0”の発生頻度が高い状態から“1”の発生頻度が高い状態に遷移すること等の状態の反転に対応した予測確率の更新を行うためである。   That is, the prediction probability update unit 305 updates the prediction probability in a direction to lower the prediction probability for the event that occurred (the value of the bit that is the target of arithmetic coding) in the arithmetic coding for each bit using the prediction probability. To go. This corresponds to the inversion of the state such as the transition from the high occurrence frequency of “0” to the high occurrence frequency of “1” because the prediction error information to be subjected to arithmetic coding goes from MSB to LSB. This is to update the predicted probability.

パッキング部306は、処理対象画素値入力部301から送られてくる少なくとも1画素以上の初期画素値データと、算術符号化部304から送られてくる少なくとも1ビット以上の算術符号とに対して、それらを結合させるというパッキングを行い、符号化データとして、画像符号化装置300の外部に出力する出力部である。   The packing unit 306 receives at least one pixel or more initial pixel value data sent from the processing target pixel value input unit 301 and at least one bit or more arithmetic code sent from the arithmetic coding unit 304. It is an output unit that performs packing that combines them and outputs the encoded data to the outside of the image encoding device 300.

一方、画像復号化装置310は、図1に示されるように、画像符号化装置300によって得られた算術符号から画素データを復号化する装置であって、アンパッキング部311、算術復号化部312、予測確率更新部313、変化抽出部314、予測画素生成部315及び出力部316を備える。   On the other hand, as shown in FIG. 1, the image decoding device 310 is a device that decodes pixel data from the arithmetic code obtained by the image encoding device 300, and includes an unpacking unit 311 and an arithmetic decoding unit 312. , A prediction probability update unit 313, a change extraction unit 314, a prediction pixel generation unit 315, and an output unit 316.

アンパッキング部311は、外部から、算術復号化の対象となる符号化データを受け取り、受け取った符号化データが初期画素値データである場合には、その初期画素値データを出力部316に出力し、受け取ったデータが初期画素値データでない(算術符号である)場合には、そのデータを算術復号化部312に出力する処理部である。   The unpacking unit 311 receives encoded data to be subjected to arithmetic decoding from the outside, and outputs the initial pixel value data to the output unit 316 when the received encoded data is initial pixel value data. When the received data is not initial pixel value data (it is an arithmetic code), the processing unit outputs the data to the arithmetic decoding unit 312.

算術復号化部312は、アンパッキング部311から送られてくる算術符号に対して、その算術符号を構成するビットごとに、適応的に変化する予測確率を用いて算術復号化をすることによって予測誤差情報を生成し、変化抽出部314、予測確率更新部313及び予測画素生成部315に出力する処理部であり、その算術復号化においては、その算術符号を構成するビットごとに、予測確率更新部313で更新された予測確率を用いて算術復号化を行う。   The arithmetic decoding unit 312 predicts the arithmetic code sent from the unpacking unit 311 by performing arithmetic decoding using the adaptively changing prediction probability for each bit constituting the arithmetic code. A processing unit that generates error information and outputs the error information to the change extraction unit 314, the prediction probability update unit 313, and the prediction pixel generation unit 315. In the arithmetic decoding, for each bit constituting the arithmetic code, the prediction probability is updated. Arithmetic decoding is performed using the prediction probability updated by the unit 313.

予測確率更新部313は、画像符号化装置300が備える予測確率更新部305と同一の機能を有し、算術復号化部312で復号化されたビットが第1の値(“1”)である場合に当該第1の値の算術復号化に用いられる予測確率Pを予め定められたα分だけ下げ(つまり、第2の値(“0”)の算術復号化に用いられる予測確率Qを予め定められたα分だけ上げ)、一方、算術復号化部312で復号化されたビットが第1の値でない場合に当該第1の値の算術復号化に用いられる予測確率を上げる(つまり、第2の値(“0”)の算術復号化に用いられる予測確率Qを予め定められたα分だけ下げる)ように、予測確率P及びQを更新する処理部である。   The prediction probability update unit 313 has the same function as the prediction probability update unit 305 included in the image encoding device 300, and the bit decoded by the arithmetic decoding unit 312 is the first value (“1”). In this case, the prediction probability P used for arithmetic decoding of the first value is lowered by a predetermined α (that is, the prediction probability Q used for arithmetic decoding of the second value (“0”) is set in advance. On the other hand, when the bit decoded by the arithmetic decoding unit 312 is not the first value, the prediction probability used for arithmetic decoding of the first value is increased (that is, the first This is a processing unit that updates the prediction probabilities P and Q so that the prediction probability Q used for arithmetic decoding of the value of 2 (“0”) is reduced by a predetermined α).

予測画素生成部315は、出力部316から送られてくる初期画素値データ、又は、既に復号された画素値データを用いて、画像符号化装置300の予測画素生成部303と同じ処理ロジックで、変化抽出部314での処理対象となっている画素(つまり、復号化対象画素)の予測値を生成する処理部である。   The predicted pixel generation unit 315 uses the initial pixel value data sent from the output unit 316 or the already decoded pixel value data, with the same processing logic as the predicted pixel generation unit 303 of the image encoding device 300. This is a processing unit that generates a predicted value of a pixel that is a processing target in the change extraction unit 314 (that is, a decoding target pixel).

変化抽出部314は、算術復号化部312で生成された予測誤差情報と予測画素生成部315で生成された予測値とに対して予め定められた演算(ここでは、排他的論理和)を行うことで、復号化対象画素の画素データを生成する処理部である。   The change extraction unit 314 performs a predetermined operation (here, exclusive OR) on the prediction error information generated by the arithmetic decoding unit 312 and the prediction value generated by the prediction pixel generation unit 315. Thus, the processing unit generates pixel data of the decoding target pixel.

出力部316は、アンパッキング部311から送られてくる初期画素値データ、及び、変化抽出部314で復元された画素データを、復号後の画素データとして、外部及び予測画素生成部315に出力する処理部である。   The output unit 316 outputs the initial pixel value data sent from the unpacking unit 311 and the pixel data restored by the change extraction unit 314 to the external and predicted pixel generation unit 315 as decoded pixel data. It is a processing unit.

なお、本実施の形態における画像符号化装置300及び画像復号化装置310の全てまたは一部は、LSI(Large Scale Integration)などのハードウェアで実現されてもよいし、CPU(Central Processing Unit)等により実行されるプログラムによって実現されてもよい。このことは以下の実施の形態でも同様である。   Note that all or part of the image encoding device 300 and the image decoding device 310 in the present embodiment may be realized by hardware such as an LSI (Large Scale Integration), a CPU (Central Processing Unit), or the like. It may be realized by a program executed by. The same applies to the following embodiments.

まず、図2から図6を参照し、本発明に係る画像符号化装置300が行う画像を符号化するための処理(以下、画像符号化処理という)について説明する。図2(a)は、画像符号化処理のフローチャートである。符号化対象となるM画素は、処理対象画素値入力部301に入力される。本実施の形態において、各画素データはNビット長のディジタルデータとする。また、パッキング部306は、少なくとも1画素以上の初期画素値データと、複数の画素データに対応した算術符号とを、パッキングすることにより、M画素に対応する符号化データ(パッキングデータ)として、画像符号化装置300から出力する。ここで、自然数M、Nは、予め決められているものとする。処理対象画素値入力部301に入力された画素データは、適切なタイミングで予測画素生成部303へ出力される。ただし、着目している符号化対象画素が、初期画素値データとして入力された場合(図2(a):ステップS101でYES)は、直接、パッキング部306に入力される。   First, a process for encoding an image (hereinafter referred to as an image encoding process) performed by the image encoding apparatus 300 according to the present invention will be described with reference to FIGS. FIG. 2A is a flowchart of the image encoding process. The M pixel to be encoded is input to the processing target pixel value input unit 301. In the present embodiment, each pixel data is digital data having an N-bit length. In addition, the packing unit 306 packs the initial pixel value data of at least one pixel and the arithmetic code corresponding to the plurality of pixel data, so that the encoded data (packing data) corresponding to the M pixel is used as an image. The data is output from the encoding device 300. Here, the natural numbers M and N are determined in advance. The pixel data input to the processing target pixel value input unit 301 is output to the prediction pixel generation unit 303 at an appropriate timing. However, when the encoding target pixel of interest is input as initial pixel value data (FIG. 2A: YES in step S101), it is input directly to the packing unit 306.

着目している符号化対象画素が、初期画素データでない場合(図2(a):ステップS101でNO)は、画素データは、予測画素生成部303へ入力される。予測画素生成部303に入力される画素データは、着目している符号化対象画素よりも先に入力された、初期画素値データ、または、以前の符号化対象画素、または、先に符号化され、復号化された画素データのいずれかである。予測画素生成部303は、入力された画素データを用いて、着目している画素データの予測値を生成する(図2(a):ステップS102)。   When the encoding target pixel of interest is not initial pixel data (FIG. 2A: NO in step S101), the pixel data is input to the predicted pixel generation unit 303. The pixel data input to the prediction pixel generation unit 303 is the initial pixel value data input before the target encoding target pixel, the previous encoding target pixel, or the previous encoding target pixel. , One of the decoded pixel data. The predicted pixel generation unit 303 generates a predicted value of the focused pixel data using the input pixel data (FIG. 2A: step S102).

ここで、この画像符号化装置300は、画素データに対する符号化方法として、予測符号化を採用している。予測符号化とは、符号化対象画素に対する予測値を生成し、符号化対象画素と予測値の差分値を符号化する方式である。予測値については、画素データの場合、近接する画素の値が同一である、又は、近い可能性が高いということに基づき、近傍の画素データから、着目している符号化対象画素の値を予測することで、変化量をできるだけ小さく抑えるというものである。図4は、予測値の算出に用いられる近接する画素の配置を示す説明図である。図中“x”は注目画素の画素値を示す。“a”、“b”および“c”は、注目画素の予測値“y”を求めるための近接画素の画素値である。以下に、予測値の算出のために一般的に用いられる予測式(1)〜(7)を以下に示す。   Here, this image coding apparatus 300 employs predictive coding as a coding method for pixel data. Predictive coding is a method of generating a prediction value for a pixel to be encoded and encoding a difference value between the pixel to be encoded and the prediction value. As for the predicted value, in the case of pixel data, the value of the target pixel to be encoded is predicted from the neighboring pixel data based on the fact that the values of adjacent pixels are the same or are likely to be close. By doing so, the amount of change is kept as small as possible. FIG. 4 is an explanatory diagram showing an arrangement of adjacent pixels used for calculation of a predicted value. In the figure, “x” indicates the pixel value of the target pixel. “A”, “b”, and “c” are pixel values of adjacent pixels for obtaining the predicted value “y” of the target pixel. The prediction formulas (1) to (7) that are generally used for calculating the predicted value are shown below.

y=a…(1)
y=b…(2)
y=c…(3)
y=a+b−c…(4)
y=a+(b−c)/2…(5)
y=b+(a−c)/2…(6)
y=(a+b)/2…(7)
y = a (1)
y = b (2)
y = c (3)
y = a + b-c (4)
y = a + (bc) / 2 (5)
y = b + (ac) / 2 (6)
y = (a + b) / 2 (7)

この画像符号化装置300は、このように注目画素の近接画素の画素値“a”、“b”および“c”を用いて注目画素の予測値“y”を求め、この予測値“y”と符号化対象画素“x”との予測誤差Δ(=y−x)を求め、この予測誤差Δを符号化する。そのために、予測画素生成部303では、前記した予測符号化で用いられる予測式(1)〜(7)のいずれかの予測式を用いて予測値を算出する。なお、前記した予測式(1)〜(7)に限らず、圧縮処理における内部のメモリバッファが確保できる場合は、着目画素に隣接している画素以外の周辺画素もメモリバッファに保持しておき、予測に使用することで予測精度を向上することも可能である。本実施の形態においては、ステップS102において、予測式(1)を使用する。   The image encoding device 300 thus obtains the predicted value “y” of the target pixel using the pixel values “a”, “b”, and “c” of the neighboring pixels of the target pixel, and this predicted value “y”. And a prediction error Δ (= y−x) between the encoding target pixel “x” and the prediction error Δ are encoded. For this purpose, the prediction pixel generation unit 303 calculates a prediction value using any one of the prediction expressions (1) to (7) used in the prediction encoding described above. Note that not only the prediction formulas (1) to (7) described above, but if an internal memory buffer can be secured in the compression process, peripheral pixels other than the pixel adjacent to the pixel of interest are also held in the memory buffer. It is also possible to improve prediction accuracy by using it for prediction. In the present embodiment, the prediction formula (1) is used in step S102.

変化抽出部302は、Nビットで表現された符号化対象画素の画素データと予測値との排他的論理和演算を行い、Nビット長の予測誤差情報Eを算出して、算術符号化部304および予測確率更新部305へ出力する(図2(a):ステップS103)。ここで、この予測誤差情報Eの算出については、M画素について繰り返す(図2(a):ステップS104)。   The change extraction unit 302 performs an exclusive OR operation on the pixel data of the encoding target pixel expressed in N bits and the prediction value, calculates prediction error information E having an N-bit length, and the arithmetic encoding unit 304 And it outputs to the prediction probability update part 305 (Fig.2 (a): step S103). Here, the calculation of the prediction error information E is repeated for M pixels (FIG. 2A: step S104).

算術符号化部304は、入力されたM画素分の予測誤差情報Eについて算術符号化を行う(図2(a):ステップS105)。ここで、算術符号化における処理順序の一例を図5および図6に示す。図5は、M画素分の予測誤差情報Eに対して、全ての予測誤差情報Eの桁を横断的にスキャンするように、それらのMSBからLSBに向けて、順次符号化処理を実施する場合の処理順序を示している。つまり、図5に順序では、まず予測誤差情報E1の最上位ビットを符号化し、次に予測誤差情報E2の最上位ビットを符号化し、さらに予測誤差情報E3の最上位ビットを符号化し、・・のように全ての予測誤差情報の最上位ビットの符号化を終えると、次に、予測誤差情報E1の最上位から2番目のビットを符号化し、さらに予測誤差情報E2の最上位から2番目のビットを符号化するというように、MSBを優先に符号化処理を行う。一方、図6は、予測誤差情報Eの入力に合わせて(予測誤差情報Eごとに)順次符号化処理を実施する場合の処理順序を示している。つまり、図6に示される順序では、注目する画素の予測誤差情報のMSBからLSBの順番に符号化処理を行い、引き続き次に注目する別の画素の予測誤差情報のMSBからLSBの順番に符号化処理を行っていく。 The arithmetic encoding unit 304 performs arithmetic encoding on the input prediction error information E for M pixels (FIG. 2A: step S105). Here, an example of the processing order in the arithmetic coding is shown in FIGS. FIG. 5 shows a case in which encoding processing is sequentially performed from the MSB to the LSB so that all the digits of the prediction error information E are scanned across the prediction error information E for M pixels. The processing order is shown. That is, in the order shown in FIG. 5, first , the most significant bit of the prediction error information E 1 is encoded, then the most significant bit of the prediction error information E 2 is encoded, and further, the most significant bit of the prediction error information E 3 is encoded. When the most significant bits of all the prediction error information are encoded as shown in FIG. 5, the second bit from the most significant bit of the prediction error information E 1 is encoded, and the most significant bit of the prediction error information E 2 is further encoded. The encoding process is performed with priority on the MSB, such as encoding the second bit from the top. On the other hand, FIG. 6 shows a processing order in a case where the encoding process is sequentially performed in accordance with the input of the prediction error information E (for each prediction error information E). That is, in the order shown in FIG. 6, the encoding process is performed in the order of MSB to LSB of the prediction error information of the pixel of interest, and the encoding is subsequently performed in the order of MSB to LSB of the prediction error information of another pixel of interest. We will continue the process.

予測確率更新部305は、変化抽出部302から入力された予測誤差情報Eを判別して、予測確率を更新する(図2(a):ステップS106)。具体的には、この予測確率更新部305は、入力された情報が“1”の場合(図3:ステップS201でYES)は、“0”の予測確率Qをα分上げ、一方、“1”の予測確率Pをα分下げるという予測確率の更新を行う(図3:ステップS202)。また、入力された情報が“0”の場合(図3:ステップS201でNO)は、“0”の予測確率Qをα分下げ、一方、“1”の予測確率Pをα分上げるという予測確率の更新を行う(図3:ステップS203)。   The prediction probability update unit 305 determines the prediction error information E input from the change extraction unit 302 and updates the prediction probability (FIG. 2A: step S106). Specifically, when the input information is “1” (FIG. 3: YES in step S201), the prediction probability update unit 305 increases the prediction probability Q of “0” by α, The prediction probability is updated by lowering the prediction probability P of "" by α (FIG. 3: step S202). When the input information is “0” (FIG. 3: NO in step S201), the prediction probability Q of “0” is decreased by α, while the prediction probability P of “1” is increased by α. The probability is updated (FIG. 3: step S203).

このような予測確率の更新について図7を用いて詳細に説明する。“1”の発生する頻度をP(0≦P≦1の実数)、“0”の発生する頻度をQ(=1−P)として、符号化を開始する前の基準値をP=Pbase(0<Pbase<1の実数)、Q=1−Pとする。“1”が符号化された場合(図3:ステップS201でYES)は、“1”の予測確率Pを下げるように予測確率Pをα(0<α<1の実数)だけ減算する(図3:ステップS202)。一方、“0”が符号化された場合(図3:ステップS201でNO)は、“1”の予測確率Pを上げるように予測確率Pをα(0<α<1の実数)だけ加算する(図3:ステップS203)。また、更新された予測確率PがPの最大値であるPmax(0≦Pmax≦1かつPbase<Pmax)に達した場合は、予測確率Pを最大値であるPmaxに更新する。また、予測確率Pの最小値であるPmin(0≦Pmin≦1かつPbase>Pmin)に達した場合については、予測確率Pを最小値であるPminに更新する。   Such update of the prediction probability will be described in detail with reference to FIG. The frequency of occurrence of “1” is P (real number of 0 ≦ P ≦ 1), the frequency of occurrence of “0” is Q (= 1−P), and the reference value before the start of encoding is P = Pbase ( 0 <Pbase <1 real number), Q = 1−P. When “1” is encoded (FIG. 3: YES in step S201), the prediction probability P is subtracted by α (a real number where 0 <α <1) so as to lower the prediction probability P of “1” (FIG. 3). 3: Step S202). On the other hand, when “0” is encoded (FIG. 3: NO in step S201), the prediction probability P is added by α (a real number where 0 <α <1) so as to increase the prediction probability P of “1”. (FIG. 3: Step S203). When the updated prediction probability P reaches Pmax which is the maximum value of P (0 ≦ Pmax ≦ 1 and Pbase <Pmax), the prediction probability P is updated to Pmax which is the maximum value. Further, when Pmin which is the minimum value of the prediction probability P (0 ≦ Pmin ≦ 1 and Pbase> Pmin) is reached, the prediction probability P is updated to Pmin which is the minimum value.

パッキング部306は、少なくとも1画素以上の初期画素値データと少なくとも1ビット以上の算術符号を結合させるというパッキングをし、パッキング後の符号化データ(つまり、パッキングデータ)をSDRAMなどのメモリまたはシステムLSI等の画像符号化装置300の外部に出力する。   The packing unit 306 performs packing by combining initial pixel value data of at least one pixel and an arithmetic code of at least one bit, and the encoded data after packing (that is, packing data) is stored in a memory such as an SDRAM or a system LSI. Or the like is output to the outside of the image encoding apparatus 300.

次に、図1と図2(b)を参照し、本発明に係る画像復号化装置310が行う画像を復号化するための処理(以下、画像復号化処理という)について説明する。図2(b)は、画像復号化処理のフローチャートである。復号化対象のデータは画像符号化装置300から入力される符号化データ(つまり、パッキングデータ)である。前記パッキングデータは、アンパッキング部311により、少なくとも初期画素値データと少なくとも1ビット以上の算術符号に分離される(図2(b):ステップS111)。   Next, a process for decoding an image (hereinafter referred to as an image decoding process) performed by the image decoding apparatus 310 according to the present invention will be described with reference to FIGS. 1 and 2B. FIG. 2B is a flowchart of the image decoding process. The decoding target data is encoded data (that is, packing data) input from the image encoding device 300. The packing data is separated into at least initial pixel value data and an arithmetic code of at least one bit by the unpacking unit 311 (FIG. 2B: step S111).

アンパッキング部311で分離された情報は、それが初期画素値データである場合(図2(b):ステップS112でYES)は、出力部316へ出力され(図2(b):ステップS113)、一方、アンパッキング部311で分離された情報が算術符号である場合(図2(b):ステップS112でNO)は、算術復号化部312へ出力される。   If the information separated by the unpacking unit 311 is initial pixel value data (FIG. 2B: YES in step S112), the information is output to the output unit 316 (FIG. 2B: step S113). On the other hand, when the information separated by the unpacking unit 311 is an arithmetic code (FIG. 2B: NO in step S112), the information is output to the arithmetic decoding unit 312.

算術復号化部312は、アンパッキング部311から送られてくる、算術符号化された符号(つまり、算術符号)を復号することにより、予測誤差情報を復元する(図2(b):ステップS114)。算術復号化部312で復号された結果は予測確率更新部313および変化抽出部314へ出力される。   The arithmetic decoding unit 312 restores the prediction error information by decoding the arithmetically encoded code (that is, the arithmetic code) sent from the unpacking unit 311 (FIG. 2B: step S114). ). The result decoded by the arithmetic decoding unit 312 is output to the prediction probability update unit 313 and the change extraction unit 314.

予測確率更新部313は、算術復号化部312から入力される復号結果により、ビット単位で、予測確率の更新を行なう(図2(b):ステップS115)。なお、この予測確率更新部313での処理は、画像符号化装置300が備える予測確率更新部305の処理と重複するため、詳細な説明はしない。ここで、予測確率の基準値Pbase、更新ステップα、Pの最大値PmaxおよびPの最小値Pminについては、符号化処理で用いた値と同じものを用いる。   The prediction probability update unit 313 updates the prediction probability in units of bits based on the decoding result input from the arithmetic decoding unit 312 (FIG. 2B: step S115). Note that the processing in the prediction probability update unit 313 overlaps with the processing in the prediction probability update unit 305 included in the image encoding device 300, and thus will not be described in detail. Here, the reference value Pbase of the prediction probability, the update step α, the maximum value Pmax of P, and the minimum value Pmin of P are the same as those used in the encoding process.

予測画素生成部315は、着目している復号化対象画素よりも先に入力された、初期画素値データ、または、以前に復号化された画素データを用いて、画像符号化装置300の予測画素生成部303と同じ処理ロジックで、着目している画素データの予測値を生成する(図2(b):ステップS116)。   The predicted pixel generation unit 315 uses the initial pixel value data or the previously decoded pixel data input before the target decoding target pixel, and the predicted pixel of the image encoding device 300. A predicted value of the pixel data of interest is generated with the same processing logic as that of the generation unit 303 (FIG. 2B: step S116).

変化抽出部314は、算術復号化部312から送られてくるNビットで表現された復号された予測誤差情報Eと予測画素生成部315から入力されるNビットの予測値との排他的論理和演算を行うことで画素データを復元する(図2(b):ステップS117)。復元された画素データは出力部316へ出力される。   The change extraction unit 314 performs an exclusive OR between the decoded prediction error information E expressed by N bits sent from the arithmetic decoding unit 312 and the N-bit prediction value input from the prediction pixel generation unit 315. The pixel data is restored by performing the calculation (FIG. 2B: step S117). The restored pixel data is output to the output unit 316.

出力部316は、復元された画素データをSDRAMなどのメモリやシステムLSI等の画像復号化装置310の外部へ出力する。   The output unit 316 outputs the restored pixel data to the outside of the image decoding device 310 such as a memory such as an SDRAM or a system LSI.

次に、具体的なデータ例を用いて、本実施の形態における画像符号化処理の詳細な説明を行う。   Next, the image encoding process in the present embodiment will be described in detail using a specific data example.

図8から図15および図26は、本実施の形態における画像符号化処理の具体例を説明するための図である。   FIGS. 8 to 15 and FIG. 26 are diagrams for explaining a specific example of the image encoding process in the present embodiment.

ここで、処理対象画素値入力部301は、固定ビット幅(Nビット)のデータの画素データを、順次、受信するとする。また、処理対象画素値入力部301が受信する画素データのデータ量は4画素(M=4)であり、各画素は6ビット(N=6)であるとする。すなわち、画素データのダイナミックレンジは6ビットであるとする。   Here, it is assumed that the processing target pixel value input unit 301 sequentially receives pixel data of fixed bit width (N bits) data. The amount of pixel data received by the processing target pixel value input unit 301 is 4 pixels (M = 4), and each pixel is 6 bits (N = 6). That is, it is assumed that the dynamic range of pixel data is 6 bits.

図8には、一例として、処理対象画素値入力部301に入力される4つの画素データが示される。処理対象画素値入力部301には、画素P801、画素P802、画素P803、画素P804の順で、各画素に対応する6ビットの画素データが入力されるとする。画素データの数値は、対応する画素データが示す信号レベル(例えば、輝度情報)である。なお、画素P801に対応する画素データは、初期画素値データであるとする。   FIG. 8 shows four pixel data input to the processing target pixel value input unit 301 as an example. It is assumed that 6-bit pixel data corresponding to each pixel is input to the processing target pixel value input unit 301 in the order of the pixel P801, the pixel P802, the pixel P803, and the pixel P804. The numerical value of the pixel data is a signal level (for example, luminance information) indicated by the corresponding pixel data. Note that the pixel data corresponding to the pixel P801 is initial pixel value data.

本実施の形態では、符号化対象画素の予測値は、一例として、上述した予測式(1)により算出されるものとする。この場合、算出される符号化対象画素の予測値は、符号化対象画素の左隣の画素の値となる。すなわち、符号化対象画素の画素値は、一つ前に入力された画素と同一の画素値(レベル)になる可能性が高いと予測していることになる。   In the present embodiment, it is assumed that the prediction value of the encoding target pixel is calculated by the above-described prediction expression (1) as an example. In this case, the calculated predicted value of the encoding target pixel is the value of the pixel adjacent to the left of the encoding target pixel. That is, it is predicted that the pixel value of the encoding target pixel is highly likely to be the same pixel value (level) as the pixel input immediately before.

図2(a)に示される画像符号化処理のステップS101では、処理対象画素値入力部301が、入力された画素データが初期画素値データであるか否かを判定する。その判定の結果がYESならば、処理対象画素値入力部301は、受信した画素データを内部のバッファに記憶させ、入力された画素データをパッキング部306へ送信する。そして、処理は後述するステップS108に移行する。一方、ステップS101における判定の結果がNOならば、処理はステップS102に移行する。   In step S101 of the image encoding process shown in FIG. 2A, the processing target pixel value input unit 301 determines whether or not the input pixel data is initial pixel value data. If the determination result is YES, the processing target pixel value input unit 301 stores the received pixel data in an internal buffer, and transmits the input pixel data to the packing unit 306. And a process transfers to step S108 mentioned later. On the other hand, if the result of the determination in step S101 is NO, the process proceeds to step S102.

ここで、処理対象画素値入力部301は、画素P801に対応する、初期画素値データとしての画素データを受信したとする。この場合、処理対象画素値入力部301は、入力された画素データを内部のバッファに記憶させ、処理対象画素値入力部301は、受信した画素データをパッキング部306へ送信する。なお、バッファに画素データが記憶されている場合、処理対象画素値入力部301は、受信した画素データを内部のバッファに上書き記憶させる。   Here, it is assumed that the processing target pixel value input unit 301 has received pixel data as initial pixel value data corresponding to the pixel P801. In this case, the processing target pixel value input unit 301 stores the input pixel data in an internal buffer, and the processing target pixel value input unit 301 transmits the received pixel data to the packing unit 306. When pixel data is stored in the buffer, the processing target pixel value input unit 301 overwrites and stores the received pixel data in the internal buffer.

続いて、画素P802が符号化対象画素であるとする。この場合、処理対象画素値入力部301は、画素P802に対応する画素データ(符号化対象画素データ)を受信したとする。符号化対象画素データが示す画素値は“36”である(図8参照)。この場合、受信した画素データは初期画素値データでないので(ステップS101でNO)、処理対象画素値入力部301は、受信した画素データを変化抽出部302へ送信する。   Subsequently, it is assumed that the pixel P802 is an encoding target pixel. In this case, it is assumed that the processing target pixel value input unit 301 has received pixel data (encoding target pixel data) corresponding to the pixel P802. The pixel value indicated by the encoding target pixel data is “36” (see FIG. 8). In this case, since the received pixel data is not initial pixel value data (NO in step S101), the processing target pixel value input unit 301 transmits the received pixel data to the change extraction unit 302.

また、ステップS101でNOと判定した場合、処理対象画素値入力部301は、内部のバッファに記憶している画素データを予測画素生成部303へ送信する。ここで、送信される画素データは、画素P801の画素値“43”である(図8参照)。   When it is determined NO in step S <b> 101, the processing target pixel value input unit 301 transmits the pixel data stored in the internal buffer to the predicted pixel generation unit 303. Here, the transmitted pixel data is the pixel value “43” of the pixel P801 (see FIG. 8).

処理対象画素値入力部301は、受信した画素データを内部のバッファに上書き記憶させる。処理は、ステップS102に移行する。   The processing target pixel value input unit 301 overwrites and stores the received pixel data in an internal buffer. The process proceeds to step S102.

ステップS102では、予測画素生成部303は、符号化対象画素の予測値を算出する。具体的には、予測画素生成部303は、予測式(1)を使用して、予測値を算出する。この場合、予測画素生成部303が処理対象画素値入力部301から受信した画素データが示す画素値(“43”)が予測値として算出される。   In step S102, the predicted pixel generation unit 303 calculates a predicted value of the encoding target pixel. Specifically, the predicted pixel generation unit 303 calculates a predicted value using the prediction formula (1). In this case, the pixel value (“43”) indicated by the pixel data received by the predicted pixel generation unit 303 from the processing target pixel value input unit 301 is calculated as the predicted value.

ステップS103では、変化抽出部302は、排他的論理和演算処理を行う。具体的には、変化抽出部302は、処理対象画素値入力部301から入力される画素データと予測画素生成部303から入力される予測値との排他的論理和を演算することで、予測誤差情報Eを算出する。ここで、受信した画素データが“100100”であり、予測値が“101011”であるとする。変化抽出部302は、画素データ(“100100”)と予測値(“101011”)との排他的論理和を演算することにより、予測誤差情報E“001111”を算出する。変化抽出部302は、この処理を符号化対象の4画素について行い、3つの予測誤差情報を算術符号化部304および予測確率更新部305へ送信する(ステップS104)。   In step S103, the change extraction unit 302 performs exclusive OR operation processing. Specifically, the change extraction unit 302 calculates a prediction error by calculating an exclusive OR of the pixel data input from the processing target pixel value input unit 301 and the prediction value input from the prediction pixel generation unit 303. Information E is calculated. Here, it is assumed that the received pixel data is “100100” and the predicted value is “101011”. The change extraction unit 302 calculates the prediction error information E “001111” by calculating the exclusive OR of the pixel data (“100100”) and the predicted value (“101011”). The change extraction unit 302 performs this process on the four pixels to be encoded, and transmits three pieces of prediction error information to the arithmetic encoding unit 304 and the prediction probability update unit 305 (step S104).

ステップS105では、算術符号化部304は、算術符号化を行う。具体的には、算術符号化部304は、予測誤差情報Eについて、ビット単位で順次算術符号化を行う。図9(a)及び(b)を用いて、算術符号化される予測誤差情報の順番について説明する。いま、図9(a)に示されるように、算術符号化される対象の予測誤差情報EはE1、E2、E3の3つである。算術符号化部304は、各予測誤差情報のMSBからLSBの方向へ同位ビット優先で算術符号化する。ここで、予測誤差情報が、E1(“001111”)、E2(“001101”)、E3(“000101”)であることから、算術符号化部304は、図9(b)に示されるように、入力順序:“0、0、0、0、0、0、1、1、0・・・”の順番に符号化を行なう。   In step S105, the arithmetic encoding unit 304 performs arithmetic encoding. Specifically, the arithmetic encoding unit 304 sequentially performs arithmetic encoding on the prediction error information E in units of bits. The order of prediction error information that is arithmetically encoded will be described with reference to FIGS. Now, as shown in FIG. 9A, the prediction error information E to be arithmetically encoded is three, E1, E2, and E3. The arithmetic coding unit 304 performs arithmetic coding with priority on the same bit in the direction from MSB to LSB of each prediction error information. Here, since the prediction error information is E1 (“001111”), E2 (“001101”), and E3 (“000101”), the arithmetic encoding unit 304 is as shown in FIG. 9B. , Input order: encoding is performed in the order of “0, 0, 0, 0, 0, 0, 1, 1, 0...”.

ステップS106では、予測確率更新部305は、算術符号化に用いられる予測確率の更新を行う。具体的には、ステップS105において算術符号化された情報を入力として、予測確率更新部305は、算術符号化に用いる予測確率の更新を行う。図10を用いて、予測確率の更新について説明する。“1”に対応する予測確率を0.5(Pbase=0.5)、“0”予測確率を0.5(Q=1−0.5)とする初期値として、“予測確率Pの最大値を0.9(Pmax=0.9)、予測確率Pの最小値を0.1(Pmin=0.1)とする。また、更新ステップを0.1(α=0.1)とする。ここで、“0”が算術符号化された場合は、予測確率更新部305は、予測確率P=0.5と予測確率Q=0.5から“0”の予測確率を下げるように予測確率Qをα分下げて(つまり、予測確率Pをα分上げて)、予測確率P=0.6と予測確率Q=0.4へ更新する。続いて“0”が算術符号化された場合は、予測確率更新部305は、先と同様にして予測確率P=0.7、予測確率Q=0.3へ更新する。例えば、予測確率P=0.9、予測確率Q=0.1の状態において、“1”が算術符号化された場合は、予測確率P=0.8、予測確率Q=0.2へ更新される。この処理を入力されるビット長(M画素×Nビット長)について繰り返す。また、新たに3つの予測誤差情報E1、E2、E3が入力された場合は、予測確率P=0.5、予測確率Q=0.5として同じ処理を行う。なお、“1”が算術符号化された場合に、予測確率Pをβ(0<β<1の実数)倍することで予測確率を下げる、としてもよい。   In step S106, the prediction probability updating unit 305 updates the prediction probability used for arithmetic coding. Specifically, using the information encoded in step S105 as an input, the prediction probability update unit 305 updates the prediction probability used for arithmetic encoding. The update of the prediction probability will be described with reference to FIG. As an initial value with a prediction probability corresponding to “1” of 0.5 (Pbase = 0.5) and a “0” prediction probability of 0.5 (Q = 1−0.5), “maximum of prediction probability P” The value is 0.9 (Pmax = 0.9), the minimum value of the prediction probability P is 0.1 (Pmin = 0.1), and the update step is 0.1 (α = 0.1). Here, when “0” is arithmetically encoded, the prediction probability updating unit 305 predicts the prediction probability of “0” from the prediction probability P = 0.5 and the prediction probability Q = 0.5. Decrease the probability Q by α (that is, increase the prediction probability P by α) to update the prediction probability P = 0.6 and the prediction probability Q = 0.4, followed by arithmetic coding of “0” In this case, the prediction probability update unit 305 updates the prediction probability P = 0.7 and the prediction probability Q = 0.3 in the same manner as before, for example, the prediction probability P = 0.9, the prediction probability Q = 0. When “1” is arithmetically coded in the state of 1, the prediction probability is updated to P = 0.8 and the prediction probability Q = 0.2 The bit length (M pixels × N) to which this process is input When three pieces of prediction error information E1, E2, and E3 are newly input, the same processing is performed with the prediction probability P = 0.5 and the prediction probability Q = 0.5. When “1” is arithmetically encoded, the prediction probability may be lowered by multiplying the prediction probability P by β (0 <β <1 real number).

ここで、図26を用いて、従来手法における予測確率の更新について説明する。予測確率の初期値、最大値、最小値、更新ステップは前記と同様として、Pbase=0.5、Pmax=0.9、Pmin=0.1、α=0.1とする。“0”が算術符号化された場合は、予測確率P=0.5と予測確率Q=0.5から“0”の予測確率を上げるようにQの予測確率をα分上げて(つまり、予測確率Pをα分下げて)、予測確率P=0.4と予測確率Q=0.6へ更新する。続いて“0”が算術符号化された場合は、予測確率P=0.3、予測確率Q=0.7へ更新する。例えば、予測確率P=0.1、予測確率Q=0.9の状態において、“1”が算術符号化された場合は、予測確率P=0.2、予測確率Q=0.8へ更新される。この処理を入力されるビット長(M画素×Nビット長)について繰り返す。このように、従来手法は、本実施の形態における予測確率更新部305と異なり、発生した事象の予測確率を上げる方向に、予測確率を更新する。   Here, the update of the prediction probability in the conventional method will be described with reference to FIG. The initial value, maximum value, minimum value, and update step of the prediction probability are the same as described above, and Pbase = 0.5, Pmax = 0.9, Pmin = 0.1, and α = 0.1. When “0” is arithmetically encoded, the prediction probability of Q is increased by α to increase the prediction probability of “0” from the prediction probability P = 0.5 and the prediction probability Q = 0.5 (that is, The prediction probability P is lowered by α), and the prediction probability P = 0.4 and the prediction probability Q = 0.6 are updated. Subsequently, when “0” is arithmetically encoded, the prediction probability is updated to P = 0.3 and the prediction probability Q = 0.7. For example, when “1” is arithmetically coded in the state of the prediction probability P = 0.1 and the prediction probability Q = 0.9, the prediction probability P = 0.2 and the prediction probability Q = 0.8 are updated. Is done. This process is repeated for the input bit length (M pixels × N bit length). Thus, unlike the prediction probability update unit 305 in the present embodiment, the conventional method updates the prediction probability in a direction to increase the prediction probability of the event that has occurred.

ステップS107では、算術符号化部304は、算術符号化するM画素について処理が終了したか否かを判定する。ステップS107において、NOならば、処理はステップS105に移行し、算術符号化部304による算術符号化が行われる。ステップS107において、YESならば、処理はS108に移行する。   In step S107, the arithmetic encoding unit 304 determines whether or not the processing has been completed for the M pixels to be arithmetic encoded. If NO in step S107, the process proceeds to step S105, and arithmetic coding by the arithmetic coding unit 304 is performed. If YES in step S107, the process proceeds to S108.

ステップS108では、パッキング部306は、複数の算術符号をまとめて1つの出力データを生成するパッキング処理を行なう。パッキング処理では、パッキング部306は、処理対象画素値入力部301から受信した初期画素値データとして画素P801をバッファメモリに格納して、その後は順次、算術符号化部304から受信した符号を前記バッファメモリに格納していくことによってパッキング処理を行う。符号化対象画素のパッキング処理が終了するとステップS109に移行する。   In step S108, the packing unit 306 performs a packing process for generating a single output data by combining a plurality of arithmetic codes. In the packing process, the packing unit 306 stores the pixel P801 in the buffer memory as the initial pixel value data received from the processing target pixel value input unit 301, and thereafter sequentially receives the code received from the arithmetic coding unit 304 in the buffer. Packing processing is performed by storing in the memory. When the encoding target pixel packing process ends, the process proceeds to step S109.

ステップS109では、パッキング部306は、パッキングする単位であるM画素についての画像符号化処理が終了したか否かを判定する。ステップS109において、NOならば、処理はステップS101に移行し、次に処理対象画素値入力部301が受信した画素データに対してステップS101からステップS108までの少なくとも一つの処理が実行される。画素P803および画素P804に対して、ステップS101からステップS108までの処理が繰り返し行われ、順次、バッファメモリに格納されていく。一方、ステップS109において、YESならば、パッキング部306は、バッファメモリ内の符号化データを画像符号化装置300から外部に出力する。これにより、処理はステップS110に移行する。   In step S <b> 109, the packing unit 306 determines whether or not the image encoding process for M pixels that are units to be packed is completed. If NO in step S109, the process proceeds to step S101, and at least one process from step S101 to step S108 is performed on the pixel data received by the processing target pixel value input unit 301 next. The processing from step S101 to step S108 is repeatedly performed on the pixel P803 and the pixel P804, and sequentially stored in the buffer memory. On the other hand, if YES in step S109, the packing unit 306 outputs the encoded data in the buffer memory from the image encoding device 300 to the outside. Thereby, a process transfers to step S110.

ステップS110では、画像符号化装置300は、いま出力した符号化画素データで、1画像についての符号化処理が全て終了したかを判別し、YESであれば、符号化処理を終了し、NOであれば、ステップS101へ移行して、ステップS101からステップS109の少なくとも1つの処理を実行する。   In step S110, the image encoding device 300 determines whether all the encoding processes for one image have been completed based on the encoded pixel data that has just been output. If YES, the encoding process ends and NO. If there is, the process proceeds to step S101, and at least one process from step S101 to step S109 is executed.

以上の処理および演算を実行した結果、算出される符号とその長さを図11における“本手法”として示す。さらに、図26に示される従来の予測確率の更新に基づく従来技術で符号化した場合の結果を図11における“従来手法”として示す。図12に算術符号化の数直線上の更新式を示し、図13および図14に、それぞれ、図12に示す数式に従った際の“本手法”および“従来手法”における算術符号化の様子を示す。図13示すように“本手法”の演算処理結果として符号化値は“0.9998058317728”であり、必要とされる分解能は“0.0000004115059”である。これから“0.9998058317728÷0.0000004115059≒2429626”であり、この10進数の結果を2進数で示すと図11に示す22ビット長の符号“1001010001001010111010”となる。同様にして、図14に示すように“従来手法” の演算処理結果として符号化値は“0.9245547707392”であり、必要とされる分解能は“0.0000000522547”である。“本手法”と同様に演算した結果を2進数で示すと図11に示す25ビット長の符号“1000011011111101000101101”となる。これから、従来手法は符号長が“25(ビット)”であるのに対し、本手法は符号長が“22(ビット)”と符号を短くすることができることから、効率的な符号化が行われたことが分かる。また、上記具体例は0、1の発生頻度にほぼ偏りがない例である。しかしながら、通常はその偏りがあるので、符号長は18ビットより小さくなることが殆どであり、本手法による圧縮効果がある。   As a result of executing the above processing and calculation, the calculated code and its length are shown as “present method” in FIG. Furthermore, the result of encoding according to the conventional technique based on the update of the conventional prediction probability shown in FIG. 26 is shown as “conventional technique” in FIG. FIG. 12 shows an update equation on the number line of arithmetic coding, and FIGS. 13 and 14 show arithmetic coding in “present method” and “conventional method” according to the mathematical formula shown in FIG. 12, respectively. Indicates. As shown in FIG. 13, the encoded value is “0.9999858317728” as the calculation processing result of “this method”, and the required resolution is “0.00000004115059”. From this, “0.99998583177728 ÷ 0.00000004115059≈2429626”, and when the result of this decimal number is expressed in binary, the code of “101010001001010111010” of 22 bits shown in FIG. 11 is obtained. Similarly, as shown in FIG. 14, the encoded value is “0.9245554707392” as the calculation result of the “conventional method”, and the required resolution is “0.0000000522547”. When the calculation result in the same manner as in “this method” is expressed in binary, the code “1000011011111101000101101” of 25-bit length shown in FIG. 11 is obtained. As a result, the code length is “25 (bits)” in the conventional method, whereas the code length can be shortened to “22 (bits)” in this method, so that efficient coding is performed. I understand that. Further, the above specific example is an example in which the occurrence frequency of 0 and 1 has almost no deviation. However, since there is usually this bias, the code length is almost smaller than 18 bits, and there is a compression effect by this method.

つまり、本実施の形態によれば、予測確率を用いたビットごとの算術符号化において、発生した事象(算術符号化の対象となるビットの値)に対する予測確率を下げる方向に予測確率が更新されていく。よって、算術符号化の対象となる予測誤差情報がMSBからLSBにいく従って“0”の発生頻度が高い状態から“1”の発生頻度が高い状態に遷移すること等の状態の反転に対応した予測確率の更新が行われることとなり、これによって、画像データにおけるビットの発生頻度の偏りを考慮した予測確率の適応的な更新が行われ、画像データの符号化効率が向上される。   In other words, according to the present embodiment, in the arithmetic coding for each bit using the prediction probability, the prediction probability is updated in the direction of decreasing the prediction probability for the event that has occurred (the value of the bit subject to arithmetic coding). To go. Therefore, the prediction error information subject to arithmetic coding goes from the MSB to the LSB, so that the state inversion such as the transition from the high occurrence frequency of “0” to the high occurrence frequency of “1” is supported. The prediction probability is updated, and accordingly, the prediction probability is adaptively updated in consideration of the deviation of the occurrence frequency of bits in the image data, and the coding efficiency of the image data is improved.

また、図15は予測確率の初期値をPbase=0.7とした場合の処理および演算を実行した結果、算出される符号とその長さを示す。ここで、Pbaseを予測確率が高いとした理由は、符号化される予測誤差情報は符号化される先頭のデータであるほど、“0”である頻度が高いからである。これにより、従来手法では符号長が“24(ビット)”であるのに対し、“本手法”における符号長は“17(ビット)”とさらに効率的な符号化が行われていることが分かる。   FIG. 15 shows codes and lengths calculated as a result of executing processing and calculation when the initial value of the prediction probability is Pbase = 0.7. Here, the reason why the prediction probability of Pbase is high is that the prediction error information to be encoded is more frequently “0” as the head data to be encoded is. As a result, the code length in the conventional method is “24 (bits)”, whereas the code length in the “present method” is “17 (bits)”, indicating that more efficient encoding is performed. .

≪実施の形態2≫
実施の形態2では、実施の形態1で説明した、画像符号化装置300の改変例を説明する。
<< Embodiment 2 >>
In the second embodiment, a modified example of the image coding apparatus 300 described in the first embodiment will be described.

図16(a)及び(b)は、それぞれ、実施の形態2に係わる画像符号化装置および画像復号化装置における画像符号処理および復号化処理を示すフローチャートである。図16(a)及び(b)に示されるように、実施の形態1から変更されたのはステップS1301、ステップS1302およびステップS1311である。   FIGS. 16A and 16B are flowcharts illustrating image encoding processing and decoding processing in the image encoding device and the image decoding device according to the second embodiment, respectively. As shown in FIGS. 16A and 16B, steps S1301, S1302, and S1311 are changed from the first embodiment.

図2と対応する機能については同じ符号を付して示し、その説明を省略する。   Functions corresponding to those in FIG. 2 are denoted by the same reference numerals, and description thereof is omitted.

ステップS1301では、本実施の形態における算術符号化部304は、符号化対象画素に対して、予め定められたグループ(M画素分のグループ画素)ごとに、算術符号化する予測誤差情報の総ビット数を、予め設定された固定ビットS(Sは自然数)に制限することで、出力するデータをSビットにパッキングする。また、符号化すべきビット情報をすべて算術符号化してもパッキングデータがSビットまで到達しない場合においては、パッキング部306は、ダミーデータを補填(つまり、パディング)することで、Sビットのパッキングデータとして出力する。   In step S1301, the arithmetic encoding unit 304 according to the present embodiment, for each encoding target pixel, total bits of prediction error information to be arithmetically encoded for each predetermined group (group pixels for M pixels). By limiting the number to a preset fixed bit S (S is a natural number), the output data is packed into S bits. If the packing data does not reach S bits even after all the bit information to be encoded is arithmetically encoded, the packing unit 306 fills up the dummy data (that is, padding) to obtain S-bit packing data. Output.

ステップS1302では、本実施の形態における画像符号化装置300による制御の下で、算術符号化部304は、パッキングされたデータがSビットに達した時点でグループ画素内の算術符号化を終了し、パッキング部306はパッキングデータを外部に出力する。具体例として、図17(a)及び(b)に示されるように、算術符号化部304は、符号化すべきグループ画素の予測誤差情報のうち、S(ここでは、13)ビットの算術符号化が終了した時点で、当該グループ画素に対する算術符号化を終了する。つまり、発生した符号量がSビットに達した場合は、算術符号化部304は、算術符号化の入力を“0000001101111”(Sビット)のみとして算術符号化し、それに続く“00111”の算術符号化を実施しない。このようにして、グループ画素に対して算術符号化により発生する符号量が固定長Sビットとなる。   In step S1302, under the control of the image coding apparatus 300 in the present embodiment, the arithmetic coding unit 304 ends the arithmetic coding in the group pixel when the packed data reaches S bits, The packing unit 306 outputs the packing data to the outside. As a specific example, as shown in FIGS. 17A and 17B, the arithmetic coding unit 304 performs arithmetic coding of S (here, 13) bits out of prediction error information of group pixels to be coded. When the process ends, the arithmetic coding for the group pixel ends. In other words, when the generated code amount reaches S bits, the arithmetic encoding unit 304 performs arithmetic encoding with the input of arithmetic encoding as “00000011101111” (S bits) only, and then performs arithmetic encoding of “00111”. Do not implement. In this way, the amount of code generated by arithmetic coding for the group pixels is fixed length S bits.

また、図18(a)〜(d)は、符号化すべき予測誤差情報をLSB側から優先して符号化対象から外すことで符号化対象情報を減らし、発生する符号量をSビット以下になるように算術符号化を行う場合の処理を説明する図である。ここで、算術符号化部304は、予測誤差情報Eの下位1ビットを符号化対象から外して算術符号化を行った場合において、発生する符号量がSビットより多くなるときは、予測誤差情報Eの下位2ビットを符号化対象から外し、再度算術符号化を行う。このように発生する符号化量がSビット以下になるまで、符号化対象の符号を減らし算術符号化を繰り返す。図18(a)及び(c)は下位1ビットを符号化対象から外した例であり、算術符号化の入力を“001110011000010”のみとする場合の予測誤差情報E1〜E3を示している。図18(b)及び(d)は下位2ビットを符号化対象から外した例であり、算術符号化の入力を“001100110001”のみとする場合の予測誤差情報E1〜E3を示している。また、図17および図18で用いられる、予測確率の基準値Pbase、更新ステップα、Pの最大値PmaxおよびPの最小値Pminについては、画像符号化装置300と画像復号化装置310で共通していれば入力順番のパターンにあわせて値を変更してもよい。 18A to 18D, the prediction error information to be encoded is prioritized from the LSB side and excluded from the encoding target, thereby reducing the encoding target information, and the generated code amount becomes S bits or less. It is a figure explaining the process in the case of performing arithmetic coding in this way. Here, in the case where arithmetic coding is performed by removing the lower 1 bit of the prediction error information E from the encoding target, the arithmetic coding unit 304 predicts the prediction error information when the generated code amount exceeds S bits. The lower 2 bits of E are removed from the encoding target, and arithmetic encoding is performed again. The encoding target code is reduced and arithmetic encoding is repeated until the encoding amount generated in this way becomes S bits or less. FIGS. 18A and 18C are examples in which the lower 1 bit is excluded from the encoding target, and shows prediction error information E 1 to E 3 when only the input of arithmetic encoding is “001110011000010”. . FIGS. 18B and 18D are examples in which the lower 2 bits are excluded from the encoding target, and show prediction error information E 1 to E 3 when the input of arithmetic encoding is only “001100110001”. . Also, the prediction probability reference value Pbase, the update step α, the maximum value Pmax of P, and the minimum value Pmin of P used in FIGS. 17 and 18 are common to the image encoding device 300 and the image decoding device 310. If so, the value may be changed according to the pattern of the input order.

復号化処理側におけるステップS1311においては、本実施の形態における画像復号化装置310は、復号すべきSビットの算術符号について、復号処理が終了したか否かの判定を行う。Sビットの復号化処理が完了していない場合(ステップS1311においてNO)は、ステップS114へ移行する。Sビットの復号処理が完了している場合(ステップS1311においてYES)は、ステップS119へ移行する。また、算術復号化部312は、M画素およびNビットが既知であることより、本来符号化されるべきビット長(=M画素×Nビット長)から、Sビット長で復元できたビット長を差し引いた分について、ダミーデータとして“0”を補填することで予測誤差情報の復元を行う。なお、ダミーデータは“1”でもよい。   In step S1311 on the decoding process side, the image decoding apparatus 310 according to the present embodiment determines whether or not the decoding process has been completed for the S-bit arithmetic code to be decoded. If the S-bit decoding process has not been completed (NO in step S1311), the process proceeds to step S114. If the S-bit decoding process has been completed (YES in step S1311), the process proceeds to step S119. In addition, since the arithmetic decoding unit 312 has known M pixels and N bits, the arithmetic decoding unit 312 calculates the bit length that can be restored with the S bit length from the bit length that should be encoded (= M pixels × N bit length). Prediction error information is restored by supplementing “0” as dummy data for the subtracted amount. The dummy data may be “1”.

このような固定長符号化を実現することで、生成された複数の固定長の符号化データを、例えばメモリ等に記憶させた場合、画像内の特定の箇所の画素に対応した符号化データを、容易に特定することができる。その結果、符号化データに対するランダムアクセスすることができる。すなわち、本実施の形態によれば、メモリへのランダムアクセス性を実現できる。さらに、バス幅は固定長を保証できることから、ある圧縮された画素データにデータアクセスすることが要求される場合、バス幅毎にパッキングされたパッキングデータにデータアクセスするだけでよい。   By realizing such fixed-length encoding, when the generated fixed-length encoded data is stored in, for example, a memory or the like, encoded data corresponding to a pixel at a specific location in the image is stored. Can be easily identified. As a result, random access to the encoded data can be performed. That is, according to the present embodiment, random accessibility to the memory can be realized. Furthermore, since the bus width can guarantee a fixed length, when data access to certain compressed pixel data is required, it is only necessary to access the packed data packed for each bus width.

≪実施の形態3≫
実施の形態3では、実施の形態1で説明した、画像符号化装置300及び画像復号化装置310を備えたディジタルスチルカメラの例を説明する。
<< Embodiment 3 >>
In Embodiment 3, an example of a digital still camera including the image encoding device 300 and the image decoding device 310 described in Embodiment 1 will be described.

図19は、実施の形態3に係るディジタルスチルカメラ1600の構成を示すブロック図である。図19に示されるように、ディジタルスチルカメラ1600は、画像符号化装置300と、画像復号化装置310とを備える。画像符号化装置300および画像復号化装置310の構成および機能は、実施の形態1で説明したので詳細な説明は繰り返さない。   FIG. 19 is a block diagram showing a configuration of a digital still camera 1600 according to the third embodiment. As shown in FIG. 19, the digital still camera 1600 includes an image encoding device 300 and an image decoding device 310. Since the configurations and functions of image coding apparatus 300 and image decoding apparatus 310 have been described in the first embodiment, detailed description thereof will not be repeated.

ディジタルスチルカメラ1600は、さらに、撮像部1610と、画像処理部1620と、表示部1630と、圧縮変換部1640と、記録保存部1650と、SDRAM1660とを備える。   The digital still camera 1600 further includes an imaging unit 1610, an image processing unit 1620, a display unit 1630, a compression conversion unit 1640, a recording storage unit 1650, and an SDRAM 1660.

撮像部1610は、被写体を撮像して、その像に対応するディジタルの画像データを出力する。この例では、撮像部1610は、光学系1611と、撮像素子1612と、アナログフロントエンド1613(図中ではAFEと略記)と、タイミングジェネレータ1614(図中ではTGと略記)とを含む。光学系1611は、レンズ等からなり、被写体を撮像素子1612上に結像させるようになっている。撮像素子1612は、光学系1611から入射した光を電気信号に変換する。撮像素子1612としては、CCD(Charge Coupled Device)を用いた撮像素子や、CMOSを用いた撮像素子等、種々の撮像素子を採用できる。アナログフロントエンド1613は、撮像素子1612が出力したアナログ信号に対してノイズ除去、信号増幅、A/D変換などの信号処理を行ない、画像データとして出力するようになっている。タイミングジェネレータ1614は、撮像素子1612やアナログフロントエンド1613の動作タイミングの基準となるクロック信号をこれらに供給する。   The imaging unit 1610 images a subject and outputs digital image data corresponding to the image. In this example, the imaging unit 1610 includes an optical system 1611, an imaging element 1612, an analog front end 1613 (abbreviated as AFE in the drawing), and a timing generator 1614 (abbreviated as TG in the drawing). The optical system 1611 is composed of a lens or the like and forms an image of a subject on the image sensor 1612. The image sensor 1612 converts light incident from the optical system 1611 into an electrical signal. As the imaging device 1612, various imaging devices such as an imaging device using a CCD (Charge Coupled Device) and an imaging device using a CMOS can be adopted. The analog front end 1613 performs signal processing such as noise removal, signal amplification, and A / D conversion on the analog signal output from the image sensor 1612, and outputs the result as image data. The timing generator 1614 supplies a clock signal serving as a reference for the operation timing of the image sensor 1612 and the analog front end 1613 to them.

画像処理部1620は、撮像部1610から入力された画素データ(RAWデータ)に所定の画像処理を施し画像符号化装置300へ出力するLSI等である。一般的には、図19に示すように、ホワイトバランス回路1621(図中ではWBと略記)、輝度信号生成回路1622、色分離回路1623、アパーチャ補正処理回路1624(図中ではAPと略記)、マトリクス処理回路1625、及び画像の拡大・縮小を行うズーム回路1626(図中ではZOMと略記)等を備えている。ホワイトバランス回路1621では、白い被写体がどのような光源下でも白く撮影されるように、撮像素子1612のカラーフィルタによる色成分を正しい割合で補正する回路である。輝度信号生成回路1622は、RAWデータから輝度信号(Y信号)を生成する。色分離回路1623は、RAWデータから色差信号(Cr/Cb信号)を生成する。アパーチャ補正処理回路1624は、輝度信号生成回路1622が生成した輝度信号に高周波数成分を足し合わせて解像度を高く見せる処理を行う。マトリクス処理回路1625は、撮像素子の分光特性や画像処理で崩れた色相バランスの調整を、色分離回路1623の出力に対して行う。   The image processing unit 1620 is an LSI or the like that performs predetermined image processing on pixel data (RAW data) input from the imaging unit 1610 and outputs the processed image data to the image encoding device 300. In general, as shown in FIG. 19, a white balance circuit 1621 (abbreviated as WB in the figure), a luminance signal generation circuit 1622, a color separation circuit 1623, an aperture correction processing circuit 1624 (abbreviated as AP in the figure), A matrix processing circuit 1625 and a zoom circuit 1626 (abbreviated as ZOM in the drawing) for enlarging / reducing an image are provided. The white balance circuit 1621 is a circuit that corrects the color component by the color filter of the image sensor 1612 at a correct ratio so that a white subject is photographed white under any light source. The luminance signal generation circuit 1622 generates a luminance signal (Y signal) from the RAW data. The color separation circuit 1623 generates a color difference signal (Cr / Cb signal) from the RAW data. The aperture correction processing circuit 1624 performs processing for adding a high frequency component to the luminance signal generated by the luminance signal generation circuit 1622 to make the resolution appear high. The matrix processing circuit 1625 adjusts the spectral characteristics of the image sensor and the hue balance that has been corrupted by image processing on the output of the color separation circuit 1623.

一般的に画像処理部1620は、処理対象の画素データをSDRAM等のメモリに一時記憶させ、一時記憶されたデータに対して所定の画像処理や、YC信号生成、ズーム処理等を行い、処理後のデータを再度SDRAMに一時記憶することが多い。そのため、画像処理部1620は、画像符号化装置300への出力と画像復号化装置310からの入力のどちらのためにも使用されることが考えられる。   In general, the image processing unit 1620 temporarily stores pixel data to be processed in a memory such as an SDRAM, performs predetermined image processing, YC signal generation, zoom processing, and the like on the temporarily stored data. Often the data is temporarily stored in the SDRAM again. Therefore, it is conceivable that the image processing unit 1620 is used for both output to the image encoding device 300 and input from the image decoding device 310.

表示部1630は、画像復号化装置310からの出力(画像復号化後の画像データ)を表示するLCD等である。   The display unit 1630 is an LCD or the like that displays an output (image data after image decoding) from the image decoding device 310.

圧縮変換部1640は、画像復号化装置310からの出力をJPEG等の所定の規格で圧縮変換した画像データを記録保存部1650に出力する。また、この圧縮変換部1640は、記録保存部1650によって読み出された画像データを伸張変換して画像符号化装置300へ出力する。即ち、圧縮変換部1640は、JPEG規格に基づくデータを処理可能な処理部である。このような圧縮変換部1640は、一般的にディジタルスチルカメラに搭載される。   The compression conversion unit 1640 outputs image data obtained by compressing and converting the output from the image decoding device 310 according to a predetermined standard such as JPEG to the recording storage unit 1650. The compression conversion unit 1640 decompresses and converts the image data read by the recording / storing unit 1650 and outputs the image data to the image encoding apparatus 300. That is, the compression conversion unit 1640 is a processing unit that can process data based on the JPEG standard. Such a compression conversion unit 1640 is generally mounted on a digital still camera.

記録保存部1650は、圧縮された画像データを受信して、記録媒体(例えば不揮発性メモリ等)に記録する。また、この記録保存部1650は、記録媒体に記録されている圧縮された画像データを読み出して圧縮変換部1640に出力する。   The recording storage unit 1650 receives the compressed image data and records it on a recording medium (for example, a non-volatile memory). The recording storage unit 1650 reads compressed image data recorded on the recording medium and outputs the compressed image data to the compression conversion unit 1640.

なお、本実施の形態における画像符号化装置300及び画像復号化装置310は、入力信号としてRAWデータに限定されない。例えば、画像符号化装置300及び画像復号化装置310が処理対象とするデータは、画像処理部1620によってRAWデータから生成されたYC信号(輝度信号または色差信号)のデータ、一旦JPEG等に圧縮変換されたJPEG画像のデータを伸張することにより得られるデータ(輝度信号または色差信号のデータ)等であってもよい。   In addition, the image coding apparatus 300 and the image decoding apparatus 310 in this Embodiment are not limited to RAW data as an input signal. For example, the data to be processed by the image encoding device 300 and the image decoding device 310 is YC signal (luminance signal or color difference signal) data generated from the RAW data by the image processing unit 1620, temporarily compressed to JPEG, etc. It may be data (luminance signal or color difference signal data) obtained by decompressing the data of the JPEG image that has been processed.

ここで、画像符号化装置300及び画像復号化装置310の入力信号が、RAWデータである場合、予測画素生成部303において、色成分が同色である近接画素から予測値を生成してもよい。たとえば、符号化対象画素の画素配列がベイヤー配列のRAWデータであるとする。この場合、RAWデータを、R(赤)成分と、G(緑)成分と、B(青)成分とに分けることができ、予測式(1)を使用する場合は、符号化対象画素の隣接画素ではなく、同色の左隣の画素を利用してもよい。   Here, when the input signals of the image encoding device 300 and the image decoding device 310 are RAW data, the prediction pixel generation unit 303 may generate a prediction value from adjacent pixels having the same color component. For example, it is assumed that the pixel array of the encoding target pixel is Bayer array RAW data. In this case, the RAW data can be divided into an R (red) component, a G (green) component, and a B (blue) component. When the prediction formula (1) is used, the RAW data is adjacent to the encoding target pixel. Instead of the pixel, the pixel on the left side of the same color may be used.

これにより、例えば、R成分の変化が大きい画像が入力された場合、同一グループ内にRGBが混同していると、G成分とB成分の変化が小さいにもかかわらず、予測誤差情報EにおいてMSB側で“1”が発生する頻度が高くなり、効率的な符号化ができない。そのため、色成分毎にグループを構成することにより、他の色成分の影響を受けることなく、各々の色の変化に応じた効率的な圧縮を行うことが可能になるため、RGB成分間の相関が低い画像に有効である。   Thereby, for example, when an image with a large change in R component is input, if RGB is confused in the same group, the MSB in the prediction error information E is small even though the change in G component and B component is small. The frequency of occurrence of “1” on the side increases, and efficient coding cannot be performed. Therefore, by forming a group for each color component, it is possible to perform efficient compression according to the change of each color without being affected by other color components, so the correlation between RGB components This is effective for images with low image quality.

このように、本実施の形態におけるディジタルスチルカメラ1600は、一般的にディジタルスチルカメラに搭載される圧縮変換部1640以外にも、RAWデータやYC信号を処理対象とする画像符号化装置300及び画像復号化装置310を備える。これにより、本実施の形態におけるディジタルスチルカメラ1600は、同じSDRAM等のメモリ容量で、同じ解像度の連写枚数を増やす高速撮像動作が可能となる。また、ディジタルスチルカメラ1600は、同じ容量のSDRAM等メモリに記憶させる動画像の解像度を高めることが可能になる。   As described above, the digital still camera 1600 according to the present embodiment is not limited to the compression conversion unit 1640 that is generally mounted on a digital still camera, and the image encoding apparatus 300 and the image for processing RAW data and YC signals. A decoding device 310 is provided. As a result, the digital still camera 1600 according to the present embodiment can perform a high-speed imaging operation that increases the number of continuous shots having the same resolution with the same memory capacity of SDRAM or the like. In addition, the digital still camera 1600 can increase the resolution of a moving image stored in a memory such as an SDRAM having the same capacity.

また、この実施の形態3に示したディジタルスチルカメラ1600の構成は、ディジタルスチルカメラ1600と同様の撮像部、画像処理部、表示部、圧縮変換部、記録保存部、及びSDRAMを備えるディジタルビデオカメラの構成に適用することも可能である。   The configuration of the digital still camera 1600 shown in the third embodiment is the same as that of the digital still camera 1600. The digital video camera includes an imaging unit, an image processing unit, a display unit, a compression conversion unit, a recording storage unit, and an SDRAM. It is also possible to apply to this configuration.

≪実施の形態4≫
本実施の形態では、ディジタルスチルカメラに設けられる撮像素子が、画像符号化装置300を含む場合のディジタルスチルカメラの構成の例を説明する。
<< Embodiment 4 >>
In this embodiment, an example of the configuration of a digital still camera when an image sensor provided in the digital still camera includes an image encoding device 300 will be described.

図20は、実施の形態4における、ディジタルスチルカメラ1700の構成を示すブロック図である。図20に示されるように、ディジタルスチルカメラ1700は、図19のディジタルスチルカメラ1600と比較して、撮像部1610の代わりに撮像部1610Aを備える点と、画像処理部1620の代わりに画像処理部1620Aを備える点とが異なる。それ以外の構成は、ディジタルスチルカメラ1600と同様なので詳細な説明は繰り返さない。   FIG. 20 is a block diagram illustrating a configuration of a digital still camera 1700 according to the fourth embodiment. As shown in FIG. 20, the digital still camera 1700 includes an imaging unit 1610A instead of the imaging unit 1610, and an image processing unit instead of the image processing unit 1620, as compared with the digital still camera 1600 of FIG. It differs from the point provided with 1620A. Since the other configuration is the same as that of the digital still camera 1600, detailed description will not be repeated.

撮像部1610Aは、図19の撮像部1610と比較して、撮像素子1612の代わりに撮像素子1612Aを含み、アナログフロントエンド1613を省略した点が異なる。それ以外は、撮像部1610と同様なので詳細な説明は繰り返さない。撮像素子1612Aは、例えばCMOSセンサ等の撮像素子と画像符号化装置300とを含む固体撮像素子の一例であり、画素内に増幅器とA/D変換回路を有し、ディジタル信号を出力するため画像符号化装置300を搭載する1チップのLSIである。   The imaging unit 1610A is different from the imaging unit 1610 of FIG. 19 in that the imaging unit 1610A includes an imaging device 1612A instead of the imaging device 1612, and the analog front end 1613 is omitted. Other than that, it is the same as the imaging unit 1610, and therefore, detailed description will not be repeated. The image sensor 1612A is an example of a solid-state image sensor including an image sensor such as a CMOS sensor and the image encoding device 300. The image sensor 1612A includes an amplifier and an A / D conversion circuit in a pixel, and outputs an image for outputting a digital signal. This is a one-chip LSI on which the encoding device 300 is mounted.

また、画像処理部1620Aは、図19の画像処理部1620と比較して、さらに、画像復号化装置310を含む点が異なる。それ以外の構成は、画像処理部1620と同様なので詳細な説明は繰り返さない。この画像処理部1620Aは、実施の形態1における画像復号化装置310と同様の機能を備える画像復号化装置310aを内蔵するディジタル信号処理素子の一例であり、1チップのLSIとして実現される。   Also, the image processing unit 1620A is different from the image processing unit 1620 of FIG. 19 in that it further includes an image decoding device 310. Since the other configuration is the same as that of image processing unit 1620, detailed description will not be repeated. This image processing unit 1620A is an example of a digital signal processing element incorporating an image decoding device 310a having the same function as the image decoding device 310 in the first embodiment, and is realized as a one-chip LSI.

撮像素子1612Aに含まれる画像符号化装置300は、撮像素子1612Aにより撮像された画素信号を符号化し、符号化により得られたデータを、画像処理部1620A内の画像復号化装置310へ送信する。   The image encoding device 300 included in the image sensor 1612A encodes the pixel signal imaged by the image sensor 1612A, and transmits the data obtained by the encoding to the image decoding device 310 in the image processing unit 1620A.

画像処理部1620A内の画像復号化装置310は、画像符号化装置300から受信したデータを復号化する。この処理により、撮像素子1612Aと集積回路内の画像処理部1620A間のデータ転送効率を向上させることが可能となる。   The image decoding device 310 in the image processing unit 1620A decodes the data received from the image encoding device 300. With this processing, it is possible to improve the data transfer efficiency between the image sensor 1612A and the image processing unit 1620A in the integrated circuit.

したがって、本実施の形態のディジタルスチルカメラ1700は、実施の形態3のディジタルスチルカメラ1600よりも、同じメモリ容量で、同じ解像度の連写枚数を増やしたり、動画像の解像度を高めたりする等といった高速撮像動作を実現することが可能になる。   Therefore, the digital still camera 1700 according to the present embodiment has the same memory capacity as the digital still camera 1600 according to the third embodiment, increases the number of continuous shots with the same resolution, increases the resolution of moving images, and the like. A high-speed imaging operation can be realized.

なお、この実施の形態4に示したディジタルスチルカメラ1700の構成は、ディジタルスチルカメラ1700と同様の撮像部、画像処理部、表示部、圧縮変換部、記録保存部、及びSDRAMを備えるディジタルビデオカメラの構成に適用することも可能である。   The configuration of the digital still camera 1700 shown in the fourth embodiment is the same as that of the digital still camera 1700. The digital video camera includes an imaging unit, an image processing unit, a display unit, a compression conversion unit, a recording storage unit, and an SDRAM. It is also possible to apply to this configuration.

≪実施の形態5≫
本実施の形態では、図21に示すように、監視カメラが受信する画像データが、画像符号化装置300からの出力である場合の監視カメラの構成の例を説明する。
<< Embodiment 5 >>
In the present embodiment, as shown in FIG. 21, an example of the configuration of the monitoring camera when image data received by the monitoring camera is output from the image encoding device 300 will be described.

通常、監視カメラ装置においては、監視カメラから送信される画像データが第3者によって伝送経路上で盗まれないよう、伝送路上のセキュリティ性を確保するため、画像データを暗号化している。一般的には、監視カメラ用信号処理部1810内の画像処理部1801により所定の画像処理が施された画像データを、圧縮変換部1802によりJPEGやMPEG4、H.264等の所定の規格で圧縮変換し、さらに暗号化部1803により暗号化して、通信部1804からインターネット上に送信することで、個人のプライバシー保護を行っている。なお、監視カメラ用信号処理部1810は、画像復号化装置310を含むディジタル信号処理素子の一例であり、1チップのLSIとして実現される。   Usually, in a surveillance camera device, image data is encrypted in order to ensure security on the transmission path so that image data transmitted from the surveillance camera is not stolen on the transmission path by a third party. In general, image data that has been subjected to predetermined image processing by the image processing unit 1801 in the surveillance camera signal processing unit 1810 is converted into JPEG, MPEG4, H.264 by the compression conversion unit 1802. Personal privacy protection is performed by compressing and converting in accordance with a predetermined standard such as H.264, further encrypting by an encryption unit 1803, and transmitting it from the communication unit 1804 to the Internet. The surveillance camera signal processing unit 1810 is an example of a digital signal processing element including the image decoding device 310, and is realized as a one-chip LSI.

そこで、図21に示す監視カメラ1800のように、前述した画像符号化装置300を含む撮像部1610Aからの出力を、監視カメラ用信号処理部1810に入力し、監視カメラ用信号処理部1810内に搭載する画像復号化装置310により符号化データを復号化することにより、撮像部1610Aで撮影された画像データを擬似的に暗号化することができるため、撮像部1610Aと監視カメラ用信号処理部1810間の伝送路上のセキュリティ性が確保され、従来よりもさらにセキュリティ性の向上を図ることが可能になる。   Therefore, like the monitoring camera 1800 shown in FIG. 21, the output from the imaging unit 1610A including the above-described image encoding device 300 is input to the monitoring camera signal processing unit 1810, and is input into the monitoring camera signal processing unit 1810. Since the image data captured by the imaging unit 1610A can be pseudo-encrypted by decoding the encoded data by the installed image decoding device 310, the imaging unit 1610A and the surveillance camera signal processing unit 1810 The security on the transmission line is ensured, and the security can be further improved as compared with the prior art.

≪実施の形態6≫
また、監視カメラ装置の実現方法として、図22に示す監視カメラ1900のように、(1)撮像部1610からの入力画像に対して所定のカメラ画像処理を行う画像処理部1901と、(2)信号入力部1902を搭載して、画像処理部1901が送信した画像データを受信して圧縮変換を行い、暗号化した上で通信部1804からインターネット上に画像データを送信する監視カメラ用信号処理部1910とを、別個のLSIにより実現する形態がある。
<< Embodiment 6 >>
As a method for realizing the monitoring camera device, as in the monitoring camera 1900 shown in FIG. 22, (1) an image processing unit 1901 that performs predetermined camera image processing on an input image from the imaging unit 1610, and (2) A monitoring camera signal processing unit equipped with a signal input unit 1902 that receives image data transmitted by the image processing unit 1901, performs compression conversion, encrypts the image data, and transmits the image data from the communication unit 1804 to the Internet. There is a form in which 1910 is realized by a separate LSI.

この形態においては、画像処理部1901に画像符号化装置300を搭載し、画像復号化装置310を監視カメラ用信号処理部1910に搭載することにより、画像処理部1901が送信する画像データを擬似的に暗号化することができるため、画像処理部1901と監視カメラ用信号処理部1910間の伝送路上のセキュリティ性が確保され、従来よりもさらにセキュリティ性の向上を図ることが可能になる。なお、画像処理部1901は、画像符号化装置300を含むディジタル信号処理素子の一例であり、1チップのLSIとして実現される。   In this embodiment, the image encoding device 300 is mounted on the image processing unit 1901, and the image decoding device 310 is mounted on the surveillance camera signal processing unit 1910, whereby the image data transmitted by the image processing unit 1901 is simulated. Therefore, security on the transmission path between the image processing unit 1901 and the surveillance camera signal processing unit 1910 is ensured, and it is possible to further improve the security as compared with the prior art. The image processing unit 1901 is an example of a digital signal processing element including the image encoding device 300, and is realized as a one-chip LSI.

従って、本実施の形態により監視カメラのデータ転送効率が向上し、動画像の解像度を高める等といった高速撮像動作を実現することが可能になり、さらに、擬似的に画像データを暗号化することにより、画像データの漏洩防止やプライバシー保護を行うなどといったセキュリティ性の向上を図ることが可能となる。   Therefore, according to the present embodiment, the data transfer efficiency of the surveillance camera is improved, and it is possible to realize a high-speed imaging operation such as increasing the resolution of the moving image, and further, by pseudo-encrypting the image data It is possible to improve security such as preventing leakage of image data and protecting privacy.

以上のように、本実施の形態における画像符号化・復号化装置及びその方法によれば、予測確率を用いたビットごとの算術符号化において、従来と異なり、発生した事象(算術符号化の対象となるビットの値)に対する予測確率を下げる方向に予測確率を更新していく。よって、算術符号化の対象となる予測誤差情報がMSBからLSBにいく従って“0”の発生頻度が高い状態から“1”の発生頻度が高い状態に遷移すること等の状態の反転に対応した予測確率の更新が行われることとなり、これによって、画像データにおけるビットの発生頻度の偏りを考慮した予測確率の適応的な更新が行われ、画像データの符号化効率が向上される。   As described above, according to the image encoding / decoding device and the method thereof in the present embodiment, in the arithmetic coding for each bit using the prediction probability, an event that has occurred (the target of arithmetic coding) The prediction probability is updated in the direction of lowering the prediction probability with respect to the bit value). Therefore, the prediction error information subject to arithmetic coding goes from the MSB to the LSB, so that the state inversion such as the transition from the high occurrence frequency of “0” to the high occurrence frequency of “1” is supported. The prediction probability is updated, and accordingly, the prediction probability is adaptively updated in consideration of the deviation of the occurrence frequency of bits in the image data, and the coding efficiency of the image data is improved.

以上、本発明に係る画像符号化方法、画像符号化装置、復号化方法、画像復号化装置、固体撮像素子、ディジタル信号処理素子、ディジタルスチルカメラ及び監視カメラについて、実施の形態1〜6を用いて説明したが、本発明は、これらの実施の形態に限定されるものではない。   As described above, Embodiments 1 to 6 are used for the image encoding method, the image encoding device, the decoding method, the image decoding device, the solid-state imaging device, the digital signal processing device, the digital still camera, and the surveillance camera according to the present invention. However, the present invention is not limited to these embodiments.

たとえば、本発明の趣旨を逸脱しない範囲で、これらの実施の形態に対して当業者が思いつく各種変形を施して得られる形態や、各実施の形態における各構成要素を任意に組み合わせて実現される形態も、本発明に含まれる。   For example, without departing from the spirit of the present invention, the embodiments obtained by subjecting these embodiments to various modifications conceived by those skilled in the art, and any combination of the components in each embodiment are realized. Forms are also included in the present invention.

また、各ブロック図における各機能ブロックは、典型的には集積回路であるLSIとして実現される。これら各機能ブロックは、個別のLSIチップとして実現化されても良いし、一部又は全てを含むように1チップ化されても良い。   Each functional block in each block diagram is typically realized as an LSI which is an integrated circuit. Each of these functional blocks may be realized as an individual LSI chip, or may be integrated into one chip so as to include a part or all of them.

ここで、集積回路として、LSIを挙げたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称される集積回路であってもよい。また、集積回路化の手法として、LSI等に限るものではなく、専用回路又は汎用プロセッサで実現してもよい。LSIの製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用して本発明を実現してもよい。   Here, although LSI was mentioned as an integrated circuit, it may be an integrated circuit called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI or the like, but may be realized by a dedicated circuit or a general-purpose processor. Even if the present invention is realized by using an FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of the circuit cells in the LSI. Good.

また、上記各実施の形態において、各構成要素は専用のハードウェアにより構成されてもよく、あるいは、ソフトウェアにより実現可能な構成要素については、プログラムを実行することによって実現されてもよい。例えば、ハードディスクや半導体メモリ等の記録媒体に記録されたソフトウェア・プログラムをCPU等のプログラム実行部が読み出して実行することによって、各構成要素が実現され得る。   In each of the above embodiments, each component may be configured by dedicated hardware, or a component that can be realized by software may be realized by executing a program. For example, each component can be realized by a program execution unit such as a CPU reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.

本発明は、画像を圧縮するエンコーダ、圧縮画像を伸張するデコーダ、固体撮像素子、ディジタル信号処理素子、ディジタルスチルカメラ及び監視カメラとして、利用できる。特に、本発明に係る画像符号化・復号化装置は、画像データの符号化効率を向上することができるために、従来方式よりもより画像データを短い符号長でデータを符号化することができる。従って、ディジタルスチルカメラやネットワークカメラ等のように、画像を扱う装置において、画質の劣化を防止しつつ、画像データを符号化・復号化が可能になる。そのため、本発明は、近年の画像データ処理量の増大へのキャッチアップに有用である。   The present invention can be used as an encoder that compresses an image, a decoder that decompresses a compressed image, a solid-state imaging device, a digital signal processing device, a digital still camera, and a surveillance camera. In particular, since the image encoding / decoding device according to the present invention can improve the encoding efficiency of image data, it can encode image data with a shorter code length than the conventional method. . Accordingly, an image handling apparatus such as a digital still camera or a network camera can encode / decode image data while preventing deterioration of image quality. Therefore, the present invention is useful for catching up with an increase in the amount of image data processing in recent years.

300 画像符号化装置
301 処理対象画素値入力部
302 変化抽出部
303 予測画素生成部
304 算術符号化部
305 予測確率更新部
306 パッキング部
310、310a 画像復号化装置
311 アンパッキング部
312 算術復号化部
313 予測確率更新部
314 変化抽出部
315 予測画素生成部
316 出力部
1600 ディジタルスチルカメラ
1610、1610A 撮像部
1611 光学系
1612、1612A 撮像素子
1613 アナログフロントエンド
1614 タイミングジェネレータ
1620、1620A 画像処理部
1621 ホワイトバランス回路
1622 輝度信号生成回路
1623 色分離回路
1624 アパーチャ補正処理回路
1625 マトリクス処理回路
1626 ズーム回路
1630 表示部
1640 圧縮変換部
1650 記録保存部
1660 SDRAM
1700 ディジタルスチルカメラ
1800 監視カメラ
1801 画像処理部
1802 圧縮変換部
1803 暗号化部
1804 通信部
1810 監視カメラ用信号処理部
1900 監視カメラ
1901 画像処理部
1902 信号入力部
1910 監視カメラ用信号処理部
300 Image Encoding Device 301 Processing Target Pixel Value Input Unit 302 Change Extraction Unit 303 Predictive Pixel Generation Unit 304 Arithmetic Coding Unit 305 Prediction Probability Update Unit 306 Packing Unit 310, 310a Image Decoding Device 311 Unpacking Unit 312 Arithmetic Decoding Unit 313 Prediction probability update unit 314 Change extraction unit 315 Predictive pixel generation unit 316 Output unit 1600 Digital still camera 1610, 1610A Imaging unit 1611 Optical system 1612, 1612A Imaging element 1613 Analog front end 1614 Timing generator 1620, 1620A Image processing unit 1621 White balance Circuit 1622 Luminance signal generation circuit 1623 Color separation circuit 1624 Aperture correction processing circuit 1625 Matrix processing circuit 1626 Zoom circuit 1630 Display unit 1640 Compression conversion unit 165 Record storage unit 1660 SDRAM
1700 Digital Still Camera 1800 Monitoring Camera 1801 Image Processing Unit 1802 Compression Conversion Unit 1803 Encryption Unit 1804 Communication Unit 1810 Monitoring Camera Signal Processing Unit 1900 Monitoring Camera 1901 Image Processing Unit 1902 Signal Input Unit 1910 Monitoring Camera Signal Processing Unit

Claims (12)

画像データを構成する画素データを圧縮する画像符号化方法であって、
符号化対象画素の周辺に位置する少なくとも1個の画素の画素データから、当該符号化対象画素の予測値を生成する予測画素生成ステップと、
前記符号化対象画素の画素データと前記予測値とのビット変化を抽出することによって当該ビット変化を示す予測誤差情報を生成する変化抽出ステップと、
前記変化抽出ステップにより生成された予測誤差情報を、当該予測誤差情報を構成するビットごとに、適応的に変化する予測確率を用いて算術符号化をする算術符号化ステップと、
前記算術符号化ステップで符号化されたビットが第1の値である場合に当該第1の値の算術符号化に用いられる予測確率を下げ、前記算術符号化ステップで符号化されたビットが第1の値でない場合に当該第1の値の算術符号化に用いられる予測確率を上げるように、前記予測確率を更新する予測確率更新ステップとを含み、
前記算術符号化ステップでは、前記予測誤差情報を構成するビットごとに、前記予測確率更新ステップで更新された予測確率を用いて前記算術符号化を行う
画像符号化方法。
An image encoding method for compressing pixel data constituting image data,
A prediction pixel generation step of generating a prediction value of the encoding target pixel from pixel data of at least one pixel located around the encoding target pixel;
A change extracting step of generating prediction error information indicating the bit change by extracting a bit change between the pixel data of the encoding target pixel and the prediction value;
An arithmetic encoding step for performing arithmetic encoding of the prediction error information generated by the change extraction step using an adaptively changing prediction probability for each bit constituting the prediction error information;
When the bit encoded in the arithmetic encoding step is the first value, the prediction probability used for arithmetic encoding of the first value is lowered, and the bit encoded in the arithmetic encoding step is A prediction probability update step of updating the prediction probability so as to increase the prediction probability used for arithmetic coding of the first value when the value is not 1,
An image encoding method in which the arithmetic encoding step performs the arithmetic encoding using the prediction probability updated in the prediction probability update step for each bit constituting the prediction error information.
請求項1記載の画像符号化方法であって、
前記算術符号化ステップでは、予め定められた複数の画素であるグループ画素ごとに、グループ画素に対応する複数の予測誤差情報のうち、当該複数の予測誤差情報の総ビット数よりも小さい予め定められた固定のビット数Sに対してだけ前記算術符号化を行うとともに、前記グループ画素に対応する予測誤差情報を算術符号化して得られたビット数が前記Sビットに満たない場合に、算術符号化で得られたビットにダミーデータをパディングすることで、Sビットの固定長の算術符号を生成する
画像符号化方法。
The image encoding method according to claim 1, comprising:
In the arithmetic coding step, for each group pixel which is a plurality of predetermined pixels, a predetermined number smaller than the total number of bits of the plurality of prediction error information among the plurality of prediction error information corresponding to the group pixel is determined. When the arithmetic coding is performed only for the fixed number of bits S and the number of bits obtained by arithmetic coding of the prediction error information corresponding to the group pixel is less than the S bits, the arithmetic coding is performed. An image encoding method for generating an S-bit fixed-length arithmetic code by padding dummy data into bits obtained in step 1 above.
請求項2記載の画像符号化方法であって、
前記算術符号化ステップでは、前記算術符号化によって発生した符号量が前記Sビットに達した場合に算術符号化を終了することで、前記固定長の算術符号を生成する
画像符号化方法。
An image encoding method according to claim 2, wherein
In the arithmetic coding step, the fixed-length arithmetic code is generated by ending arithmetic coding when a code amount generated by the arithmetic coding reaches the S bits.
請求項1記載の画像符号化方法によって得られた算術符号から画素データを復号化する画像復号化方法であって、
前記算術符号を構成するビットごとに、適応的に変化する予測確率を用いて算術復号化をすることによって前記予測誤差情報を生成する算術復号化ステップと、
前記算術復号化ステップで復号化されたビットが第1の値である場合に当該第1の値の算術復号化に用いられる予測確率を下げ、前記算術復号化ステップで復号化されたビットが第1の値でない場合に当該第1の値の算術復号化に用いられる予測確率を上げるように、前記予測確率を更新する予測確率更新ステップと、
復号化対象画素の予測値を生成する予測画素生成ステップと、
前記算術復号化ステップで生成された予測誤差情報と前記予測画素生成ステップで生成された予測値とに対して予め定められた演算を行うことで、符号化対象画素の画素データを生成する変化抽出ステップとを含み、
前記算術復号化ステップでは、前記算術符号を構成するビットごとに、前記予測確率更新ステップで更新された予測確率を用いて前記算術復号化を行う
画像復号化方法。
An image decoding method for decoding pixel data from an arithmetic code obtained by the image encoding method according to claim 1,
An arithmetic decoding step for generating the prediction error information by performing arithmetic decoding using an adaptively changing prediction probability for each bit constituting the arithmetic code;
When the bit decoded in the arithmetic decoding step is the first value, the prediction probability used for the arithmetic decoding of the first value is lowered, and the bit decoded in the arithmetic decoding step is changed to the first value. A prediction probability update step of updating the prediction probability so as to increase the prediction probability used for arithmetic decoding of the first value when the value is not 1,
A predicted pixel generation step of generating a predicted value of the decoding target pixel;
Change extraction for generating pixel data of a pixel to be encoded by performing a predetermined calculation on the prediction error information generated in the arithmetic decoding step and the prediction value generated in the prediction pixel generation step Including steps,
The image decoding method, wherein, in the arithmetic decoding step, the arithmetic decoding is performed using the prediction probability updated in the prediction probability updating step for each bit constituting the arithmetic code.
画像データを構成する画素データを圧縮する画像符号化装置であって、
符号化対象画素の周辺に位置する少なくとも1個の画素の画素データから、当該符号化対象画素の予測値を生成する予測画素生成部と、
前記符号化対象画素の画素データと前記予測値とのビット変化を抽出することによって当該ビット変化を示す予測誤差情報を生成する変化抽出部と、
前記変化抽出部により生成された予測誤差情報を、当該予測誤差情報を構成するビットごとに、適応的に変化する予測確率を用いて算術符号化をする算術符号化部と、
前記算術符号化部で符号化されたビットが第1の値である場合に当該第1の値の算術符号化に用いられる予測確率を下げ、前記算術符号化部で符号化されたビットが第1の値でない場合に当該第1の値の算術符号化に用いられる予測確率を上げるように、前記予測確率を更新する予測確率更新部とを備え、
前記算術符号化部は、前記予測誤差情報を構成するビットごとに、前記予測確率更新部で更新された予測確率を用いて前記算術符号化を行う
画像符号化装置。
An image encoding device for compressing pixel data constituting image data,
A prediction pixel generation unit that generates a prediction value of the encoding target pixel from pixel data of at least one pixel located around the encoding target pixel;
A change extracting unit that generates prediction error information indicating the bit change by extracting a bit change between pixel data of the encoding target pixel and the predicted value;
An arithmetic encoding unit that performs arithmetic encoding on the prediction error information generated by the change extraction unit using a prediction probability that adaptively changes for each bit that constitutes the prediction error information;
When the bit encoded by the arithmetic encoding unit is the first value, the prediction probability used for arithmetic encoding of the first value is lowered, and the bit encoded by the arithmetic encoding unit is A prediction probability update unit that updates the prediction probability so as to increase the prediction probability used for arithmetic coding of the first value when the value is not 1,
The image coding apparatus, wherein the arithmetic coding unit performs the arithmetic coding using the prediction probability updated by the prediction probability update unit for each bit constituting the prediction error information.
請求項1記載の画像符号化方法によって得られた算術符号から画素データを復号化する画像復号化装置であって、
前記算術符号を構成するビットごとに、適応的に変化する予測確率を用いて算術復号化をすることによって前記予測誤差情報を生成する算術復号化部と、
前記算術復号化部で復号化されたビットが第1の値である場合に当該第1の値の算術復号化に用いられる予測確率を下げ、前記算術復号化部で復号化されたビットが第1の値でない場合に当該第1の値の算術復号化に用いられる予測確率を上げるように、前記予測確率を更新する予測確率更新部と、
復号化対象画素の予測値を生成する予測画素生成部と、
前記算術復号化部で生成された予測誤差情報と前記予測画素生成部で生成された予測値とに対して予め定められた演算を行うことで、復号化対象画素の画素データを生成する変化抽出部とを備え、
前記算術復号化部は、前記算術符号を構成するビットごとに、前記予測確率更新部で更新された予測確率を用いて前記算術復号化を行う
画像復号化装置。
An image decoding apparatus for decoding pixel data from an arithmetic code obtained by the image encoding method according to claim 1,
An arithmetic decoding unit that generates the prediction error information by performing arithmetic decoding using an adaptively changing prediction probability for each bit constituting the arithmetic code;
When the bit decoded by the arithmetic decoding unit is the first value, the prediction probability used for arithmetic decoding of the first value is lowered, and the bit decoded by the arithmetic decoding unit is changed to the first value. A prediction probability updating unit that updates the prediction probability so as to increase the prediction probability used for arithmetic decoding of the first value when the value is not 1,
A prediction pixel generation unit that generates a prediction value of a decoding target pixel;
Change extraction for generating pixel data of a pixel to be decoded by performing a predetermined calculation on the prediction error information generated by the arithmetic decoding unit and the prediction value generated by the prediction pixel generation unit With
The image decoding device, wherein the arithmetic decoding unit performs the arithmetic decoding using the prediction probability updated by the prediction probability update unit for each bit constituting the arithmetic code.
請求項5記載の画像符号化装置を備えた固体撮像素子。   A solid-state imaging device comprising the image encoding device according to claim 5. 請求項5記載の画像符号化装置を備えたディジタル信号処理素子。   A digital signal processing element comprising the image encoding device according to claim 5. 請求項6記載の画像復号化装置を備えたディジタル信号処理素子。   A digital signal processing element comprising the image decoding device according to claim 6. 請求項7記載の固体撮像素子、請求項8記載のディジタル信号処理素子、および、請求項9記載のディジタル信号処理素子の少なくとも一つを備えたディジタルスチルカメラ。   A digital still camera comprising at least one of the solid-state imaging device according to claim 7, the digital signal processing device according to claim 8, and the digital signal processing device according to claim 9. 請求項7記載の固体撮像素子、請求項8記載のディジタル信号処理素子、および、請求項9記載のディジタル信号処理素子の少なくとも一つを備えたディジタルビデオカメラ。   A digital video camera comprising at least one of the solid-state imaging device according to claim 7, the digital signal processing device according to claim 8, and the digital signal processing device according to claim 9. 請求項7記載の固体撮像素子、請求項8記載のディジタル信号処理素子、および、請求項9記載のディジタル信号処理素子の少なくとも一つを備えた監視カメラ。   A surveillance camera comprising at least one of the solid-state imaging device according to claim 7, the digital signal processing device according to claim 8, and the digital signal processing device according to claim 9.
JP2010032889A 2010-02-17 2010-02-17 Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera Pending JP2011171938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010032889A JP2011171938A (en) 2010-02-17 2010-02-17 Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010032889A JP2011171938A (en) 2010-02-17 2010-02-17 Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera

Publications (1)

Publication Number Publication Date
JP2011171938A true JP2011171938A (en) 2011-09-01

Family

ID=44685607

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010032889A Pending JP2011171938A (en) 2010-02-17 2010-02-17 Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera

Country Status (1)

Country Link
JP (1) JP2011171938A (en)

Similar Documents

Publication Publication Date Title
JP5529685B2 (en) Image encoding method, image decoding method, image encoding device, and image decoding device
JP5530198B2 (en) Image encoding method, decoding method, and apparatus
JP4769039B2 (en) Digital signal encoding and decoding apparatus and method
US20220286142A1 (en) Guaranteed data compression using intermediate compressed data
US20040135903A1 (en) In-stream lossless compression of digital image sensor data
US20110200263A1 (en) Image encoder and image decoder
US9413999B2 (en) CMOS image sensor implementing correlated double sampling with compression
JP2016508700A (en) Video camera
US20210351785A1 (en) Guaranteed Data Compression
CN107105208A (en) A kind of lossless coding and coding/decoding method of Bayer images
US10609393B2 (en) Image encoding apparatus and method of controlling the same
US20220232217A1 (en) Guaranteed Data Compression
WO2009087783A1 (en) Data generator for coding, method of generating data for coding, decoder and decoding method
JP4895567B2 (en) Image encoding method and apparatus, image decoding method and apparatus, and imaging apparatus
JP6512916B2 (en) Image pickup apparatus, control method thereof and program
TWI513303B (en) Apparatus and method for correction of distortion in digital image data
KR20180041441A (en) Apparatus for writing information on defect pixels, apparatus for correcting defect pixels, and method thereof
JP6352625B2 (en) Image data compression circuit, image data compression method, and imaging apparatus
JP2011171938A (en) Method and device for encoding image, method and device for decoding image, solid-state imaging element, digital signal processing element, digital still camera, and monitoring camera
JP5527556B2 (en) Method for entropically code-converting first binary data string into compressed second binary data string, computer program thereof, and image capture device thereof
KR101871946B1 (en) Apparatus, method and program of image processing
JP4092830B2 (en) Image data compression method
WO2019230442A1 (en) Image processing device and method
KR102138331B1 (en) Image processing apparatus, image processing method, and photographing apparatus
US20160323602A1 (en) Image encoding apparatus and control method of the same