JP5217972B2 - Image expansion device - Google Patents

Image expansion device Download PDF

Info

Publication number
JP5217972B2
JP5217972B2 JP2008306446A JP2008306446A JP5217972B2 JP 5217972 B2 JP5217972 B2 JP 5217972B2 JP 2008306446 A JP2008306446 A JP 2008306446A JP 2008306446 A JP2008306446 A JP 2008306446A JP 5217972 B2 JP5217972 B2 JP 5217972B2
Authority
JP
Japan
Prior art keywords
pixel
target
value
target pixel
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008306446A
Other languages
Japanese (ja)
Other versions
JP2010130635A (en
Inventor
友紀 谷口
太郎 横瀬
嘉彦 根本
征史郎 加藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2008306446A priority Critical patent/JP5217972B2/en
Publication of JP2010130635A publication Critical patent/JP2010130635A/en
Application granted granted Critical
Publication of JP5217972B2 publication Critical patent/JP5217972B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、画像伸張装置に関する。   The present invention relates to an image expansion apparatus.

従来より、画像を複数に分割して、並列に圧縮、伸張する方法が知られている。また、画像データを構成する水平方向に連続する画素を、配置順序に応じて奇数位置の画素群、及び、偶数位置の画素群に分割し、分割された各画素群を、略同等の圧縮率を有する異なる経路で並列的に符号化する符号化装置が知られている(特許文献1)。
特開2000−13609号公報
Conventionally, a method of dividing an image into a plurality of images and compressing and decompressing them in parallel is known. In addition, the pixels that constitute the image data in the horizontal direction are divided into an odd-numbered pixel group and an even-numbered pixel group according to the arrangement order, and each divided pixel group has a substantially equivalent compression rate. There is known an encoding device that encodes in parallel through different paths having the above (Patent Document 1).
JP 2000-13609 A

画像の圧縮率を低下させずに、並列に画像を伸張することができる画像伸張装置を提供することを目的とする。   An object of the present invention is to provide an image decompression apparatus capable of decompressing images in parallel without reducing the image compression rate.

上記の目的を達成するために、請求項1記載の発明に係る画像伸張装置は、入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)先頭画素X1の画素値に対して予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(1)式に示す誤差値Err1を表わす符号、及び前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の画素値に基づく以下の(2)式に示す誤差値Errnを表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の各対象画素について並列に前記誤差値(Err1,・・・, Errn)を復号する並列復号手段と、前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、前記対象画素群の各対象画素について並列に画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値に並列に伸張する伸張手段と、を含み、前記伸張手段は、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって復号された前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(3)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張し、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって復号された該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(4)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する。
Err1=X1−F1(R1、・・・、Rm) ・・・(1)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(2)
X1=Err1+F1’(R1、・・・、Rm) ・・・(3)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(4)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
In order to achieve the above object, the image decompressing apparatus according to the first aspect of the present invention is the first pixel X1 of the input target pixel group (X1,..., Xn) consisting of a predetermined number of consecutive pixels. Of the reference pixel groups (R1,..., Rm) existing around the target pixel group (X1,..., Xn) obtained by performing predictive coding on the pixel values of A code representing an error value Err1 shown in the following equation (1) based on pixel values of the reference pixels around the head pixel X1 including the reference pixels adjacent to the head pixel X1 , and the target pixel group (X1,. .., Xn) of the reference pixel group (R1,..., Rm) obtained by performing predictive coding on the pixel value of each target pixel Xn other than the first pixel X1. The pixel value of the reference pixel around the target pixel Xn and the target pixel group (X1,..., X A code representing the error value Errn shown in the target pixel Xn-1 to include said target pixel Xn neighborhood of said target pixel below based on the pixel value (2) adjacent to the target pixel Xn of -1) In parallel, the error values (Err1,..., Errn) are decoded in parallel for each target pixel of the target pixel group (X1,..., Xn) based on the code strings of the predetermined number of columns included. An error value of each target pixel of the target pixel group decoded in parallel by the decoding means, and the parallel decoding means, and each reference of the reference pixel group that exists around the target pixel group and has been previously expanded by using the pixel values of the pixels, as well as inverse predictive pixel values in parallel for each pixel of the target pixel group, anda decompressing means for decompressing in parallel to the pixel value of each pixel of the target pixel group , The expansion means includes the target pixel group For the first pixel X1 of (X1,..., Xn), the error value Err1 of the first pixel X1 decoded by the parallel decoding means and the reference pixel group (R1,. ) And the pixel value of the reference pixel around the head pixel X1 including the reference pixel adjacent to the head pixel X1 is used to reverse the pixel value of the head pixel X1 by the following equation (3): And predicting, expanding to the pixel value of the first pixel X1, and for each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn) The error value Errn of the target pixel Xn and the periphery of the target pixel Xn including the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1). The error value of the target pixel and Using the pixel values of the reference pixels around the target pixel Xn in the reference pixel group (R1,..., Rm), the pixel value is inverted for the target pixel Xn by the following equation (4). The prediction is performed and the pixel value of the target pixel Xn is expanded.
Err1 = X1-F1 (R1,..., Rm) (1)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (2)
X1 = Err1 + F1 ′ (R1,..., Rm) (3)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn−1) (4)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.

請求項記載の発明では、上記請求項1に係る画像伸張装置において、前記入力された前記所定個の列の符号列の各々は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して並列に予測符号化を行って得られた誤差値を表わす符号を各々含む。 According to a second aspect of the present invention, in the image expansion device according to the first aspect, each of the input code strings of the predetermined number of columns is a target pixel of a target pixel group including a predetermined number of consecutive pixels. Each code includes a code representing an error value obtained by performing predictive coding in parallel on each pixel value.

請求項記載の発明に係る画像伸張装置は、入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)先頭画素X1の画素値に対して、予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(5)式に示す誤差値Err1を表わす符号、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素nの周辺の前記対象画素の画素値に基づく以下の(6)式に示す誤差値Errnを表わす符号、又は連長圧縮符号化を行って得られた連続数及び画素値を表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の各対象画素について並列に前記誤差値(Err1,・・・, Errn)又は前記連続数及び画素値を復号する並列復号手段と、前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値又は前記連続数及び画素値に基づいて、前記対象画素群の各対象画素について、該対象画素の誤差値が復号された場合、該対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、該対象画素の画素値を逆予測すると共に、該対象画素の画素値に伸張する逆予測処理、及び、該対象画素の連続数及び画素値が復号された場合、該画素値を連続数分展開して、該対象画素の画素値に伸張する展開処理の何れか一方の処理を並列に行う展開手段と、を含み、前記展開手段は、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって前記先頭画素X1に対して誤差値Err1が復号された場合に、前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記参照画素の画素値とを用いて、以下の(7)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する逆予測処理、及び、前記先頭画素X1に対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、前記先頭画素X1以降の画素の画素値に伸張する展開処理の何れか一方を行い、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって該対象画素Xnに対して誤差値Errnが復号された場合に、該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値又は前記対象画素Xnに隣接する前記対象画素Xn−1に対して復号された画素値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(8)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する逆予測処理、及び、該対象画素Xnに対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、該対象画素Xn以降の画素の画素値に伸張する展開処理の何れか一方を行う
Err1=X1−F1(R1、・・・、Rm) ・・・(5)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(6)
X1=Err1+F1’(R1、・・・、Rm) ・・・(7)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(8)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
The image expansion device according to the third aspect of the present invention provides a prediction code for the input pixel value of the first pixel X1 of the target pixel group (X1,..., Xn) consisting of a predetermined number of consecutive pixels. The reference adjacent to the first pixel X1 in the reference pixel group (R1,..., Rm) existing around the target pixel group (X1,. A sign representing an error value Err1 shown in the following equation (5) based on the pixel value of the reference pixel around the head pixel X1 including the pixel, the head pixel of the target pixel group (X1,..., Xn) The reference pixels around the target pixel Xn in the reference pixel group (R1,..., Rm) obtained by performing predictive encoding on the pixel values of the target pixels Xn other than X1. And the target pixel group Xn of the target pixel group (X1,..., Xn-1). Obtained by performing code representing the error value Errn shown to the subject pixel of the pixel values based on the following equation (6) near the target pixel n including the target pixel Xn-1 adjacent, or run-length compression coding The error value (Err1 ) in parallel with respect to each target pixel of the target pixel group (X1,..., Xn) based on the predetermined number of code strings each including the number of consecutive numbers and the code representing the pixel value. ,..., Errn) or parallel decoding means for decoding the continuous number and pixel value, and the error value or the continuous number and pixel value of each target pixel of the target pixel group decoded in parallel by the parallel decoding means For each target pixel of the target pixel group, when the error value of the target pixel is decoded, the error value of the target pixel exists around the target pixel group and is expanded first. Image of each reference pixel in the selected reference pixel group When the pixel value of the target pixel is inversely predicted using the prime value, and the reverse prediction process for expanding the pixel value of the target pixel, and the continuous number and the pixel value of the target pixel are decoded, Expansion means for expanding in parallel the number of pixel values and expanding one of the expansion processes for expanding the pixel value to the pixel value of the target pixel , wherein the expansion means includes the target pixel group (X1, .., Xn), when the error value Err1 is decoded for the first pixel X1 by the parallel decoding means, the error value Err1 of the first pixel X1 and the previously expanded error value Err1 Using the pixel value of the reference pixel including the reference pixel adjacent to the head pixel X1 in the reference pixel group (R1,..., Rm), the head pixel X1 is expressed by the following equation (7). The pixel value is inversely predicted and the first pixel X When the reverse prediction process for expanding the pixel value to 1 and the continuous number and pixel value for the first pixel X1 are decoded, the pixel value is expanded by the continuous number, and the subsequent pixels after the first pixel X1 One of the expansion processes for expanding the pixel value of the pixel is performed, and for each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn), the target pixel is processed by the parallel decoding unit. When the error value Errn is decoded for Xn, the error value Errn of the target pixel Xn and the target pixel Xn in the target pixel group (X1,..., Xn−1) are adjacent to the target pixel Xn. An error value of the target pixel around the target pixel Xn including the target pixel Xn-1, or a pixel value decoded for the target pixel Xn-1 adjacent to the target pixel Xn, and the reference pixel group (R1 ,..., Rm) Using the pixel values of the reference pixels around Xn and inversely predicting the pixel value of the target pixel Xn according to the following equation (8), and expanding the pixel value of the target pixel Xn; and Any one of the expansion processes in which when the continuous number and the pixel value are decoded for the target pixel Xn, the pixel value is expanded by the continuous number and expanded to the pixel values of the pixels after the target pixel Xn. Do one .
Err1 = X1-F1 (R1,..., Rm) (5)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (6)
X1 = Err1 + F1 ′ (R1,..., Rm) (7)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Err-1) (8)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.

請求項記載の発明では、上記請求項に係る画像伸張装置において、前記入力された前記所定個の列の符号列は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して、予測符号化又は連長圧縮符号化を並列に行って得られた誤差値又は連続数及び画素値を表わす符号を各々含む。 According to a fourth aspect of the present invention, in the image expansion device according to the third aspect , the input code string of the predetermined number of columns is a pixel of each target pixel of a target pixel group including a predetermined number of consecutive pixels. Each value includes a code representing an error value or a continuous number and a pixel value obtained by performing predictive coding or run length compression coding in parallel.

請求項記載の発明に係る画像伸張装置は、入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)先頭画素X1の画素値に対して、先頭画素X1の周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(9)式に示す誤差値Err1を表わす符号、及び前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、前記対象画素Xnの周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素nの周辺の前記対象画素の画素値に基づく以下の(10)式に示す誤差値Errnを表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記先頭画素X1の周辺に存在し、かつ、先に伸張された画素群の画素値に対応する符号表を用いて前記先頭画素X1の誤差値Err1に復号する処理、及び前記対象画素群(X1,・・・,Xn)の先頭画素X1以外の各対象画素について、全ての符号表の各々を用いて該対象画素の誤差値の候補を各々復号する処理を並列に行う並列復号手段と、前記並列復号手段によって復号された前記対象画素群(X1,・・・,Xn)の先頭画素X1の誤差値Err1と、前記先頭画素X1の周辺に存在し、かつ、先に伸張された参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(11)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する処理、及び、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって各符号表を用いて復号された前記対象画素Xnの誤差値の候補と、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、各符号表を用いた場合に対して、以下の(12)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素Xnの周辺の画素値に対応する符号表を用いた場合に対して伸張された画素値を選択する処理を、並列に行う伸長手段とを含む。
Err1=X1−F1(R1、・・・、Rm) ・・・(9)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(10)
X1=Err1+F1’(R1、・・・、Rm) ・・・(11)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(12)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
According to the fifth aspect of the present invention, there is provided an image decompression device that performs a leading pixel relative to a pixel value of a leading pixel X1 of a target pixel group (X1,. Reference pixel group (R1) existing around the target pixel group (X1,..., Xn) obtained by performing predictive coding using a code table corresponding to the pixel values of the pixel groups around X1 ,..., Rm) represents an error value Err1 represented by the following expression (9) based on the pixel values of the reference pixels around the head pixel X1 including the reference pixel adjacent to the head pixel X1. A code and a code corresponding to a pixel value of a pixel group around the target pixel Xn with respect to a pixel value of each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn). The reference pixel group (R1,...) Obtained by performing predictive coding using a table. , Rm), the pixel value of the reference pixel around the target pixel Xn and the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1). The target pixel group based on the code string of the predetermined number of columns each including a code representing an error value Errn shown in the following equation (10) based on the pixel value of the target pixel around the target pixel n including (X1, · · ·, Xn) for the head pixel X1 of the first present around the pixel X1, and, by using a code table corresponding to the pixel value of the pixel group that is stretched above the head pixel X1 Processing for decoding into error value Err1 , and for each target pixel other than the first pixel X1 of the target pixel group (X1,..., Xn) , error value candidates for the target pixel using each of all code tables Parallel decoding means for performing parallel decoding processing See the decoded said pixel group by a parallel decoding means (X1, · · ·, Xn) and the error value Err1 the first pixel X1 of, be present in the periphery of the head pixel X1, and which is stretched above Using the pixel values of the reference pixels around the head pixel X1 including the reference pixels adjacent to the head pixel X1 in the pixel group (R1,..., Rm) , the following expression (11) for the first pixel X1 while inverse predictive pixel value, the process of decompressing the pixel value of the first pixel X1, and, the target pixel group (X1, · · ·, Xn) each object other than the head pixel X1 of For the pixel Xn, the error value candidates of the target pixel Xn decoded by the parallel decoding means using each code table, and the target pixel in the target pixel group (X1,..., Xn−1) The target pixel Xn− adjacent to Xn Error value of the target pixel around the target pixel Xn including 1 and the pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm). Then, for each code table, the pixel value for the target pixel Xn is inversely predicted by the following equation (12) , and is expanded to the candidate pixel value of the target pixel Xn . among the candidate pixel values, and a decompression means for the process of selecting the decompressed pixel values for the case of using the code table corresponding to the pixel values of the periphery of the target pixel Xn, performed in parallel.
Err1 = X1-F1 (R1,..., Rm) (9)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (10)
X1 = Err1 + F1 ′ (R1,..., Rm) (11)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn-1) (12)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.

請求項記載の発明では、上記請求項に係る画像伸張装置において、前記伸張手段は、各符号表を用いた場合に対して、前記対象画素群の各対象画素について画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素の周辺の画素値と該対象画素に隣接する前記対象画素の誤差値とに対応する符号表を用いた場合に対して伸張された画素値を選択する処理を行う。 According to a sixth aspect of the present invention, in the image decompression apparatus according to the fifth aspect , the decompression unit performs reverse prediction on a pixel value for each target pixel in the target pixel group, when each code table is used. In addition, the pixel value of each target pixel of the target pixel group is expanded to a candidate pixel value, and among the expanded pixel value candidates, an error between a pixel value around the target pixel and the target pixel adjacent to the target pixel A process of selecting a decompressed pixel value is performed in the case where a code table corresponding to the value is used.

請求項記載の発明では、上記請求項又はに係る画像伸張装置において、前記入力された前記所定個の列の符号列の各々は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して並列に、前記対象画素の周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた誤差値を表わす符号を各々含む。 According to a seventh aspect of the present invention, in the image decompressing apparatus according to the fifth or sixth aspect , each of the input code strings of the predetermined number of columns is each of a target pixel group including a predetermined number of consecutive pixels. In parallel with the pixel value of the target pixel, a code representing an error value obtained by performing predictive coding using a code table corresponding to the pixel value of the pixel group around the target pixel is included.

以上説明したように、請求項1記載の画像伸張装置によれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、並列に画像を伸張することができる、という効果が得られる。   As described above, according to the image decompressing apparatus of the first aspect, it is possible to decompress the image in parallel without reducing the compression rate, compared to the case where the image is not decompressed in parallel. Is obtained.

請求項記載の画像伸張装置によれば、並列に画像を符号化することができる、という効果が得られる。 According to the image expansion device of the second aspect, it is possible to obtain an effect that images can be encoded in parallel.

請求項記載の画像伸張装置によれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、並列に画像を伸張することができる、という効果が得られる。 According to the image expansion device of the third aspect, it is possible to expand the images in parallel without lowering the compression rate as compared with the case where the images are not expanded in parallel.

請求項記載の画像伸張装置によれば、並列に画像を符号化することができる、という効果が得られる。 According to the image decompressing apparatus of the fourth aspect, it is possible to obtain an effect that images can be encoded in parallel.

請求項記載の画像伸張装置によれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、並列に画像を伸張することができる、という効果が得られる。 According to the image expansion device of the fifth aspect, it is possible to expand the images in parallel without reducing the compression rate as compared with the case where the images are not expanded in parallel.

請求項記載の画像伸張装置によれば、隣接する画素の画素値が伸張されなくても、対象画像の画素値を伸張することができる、という効果が得られる。 According to the image expansion device of the sixth aspect , there is an effect that the pixel value of the target image can be expanded even if the pixel value of the adjacent pixel is not expanded.

請求項記載の画像伸張装置によれば、並列に画像を符号化することができる、という効果が得られる。 According to the image expansion device of the seventh aspect, it is possible to obtain an effect that images can be encoded in parallel.

以下、本発明の実施の形態について図面を参照して説明する。なお、本発明の実施の形態では、画像圧縮伸張システムに本発明を適用した場合を例に説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the embodiment of the present invention, a case where the present invention is applied to an image compression / decompression system will be described as an example.

図1に示すように、第1の実施の形態に係る画像圧縮伸張システム10は、画像データを圧縮する画像圧縮装置12と、圧縮された画像データを伸張する画像伸張装置14とを備えている。   As shown in FIG. 1, an image compression / decompression system 10 according to the first embodiment includes an image compression device 12 that compresses image data and an image decompression device 14 that decompresses the compressed image data. .

画像圧縮装置12は、圧縮対象となる画像データが入力される画像入力部16と、画像入力部16から入力された画像データを圧縮して、偶数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部18Aと、画像入力部16から入力された画像データを圧縮して、奇数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部18Bとを備えている。   The image compression device 12 compresses the image data input from the image input unit 16 to which image data to be compressed and the image input unit 16 are input, and generates a code stream including codes that appear at even-numbered pixels. A compression unit 18A for outputting, and a compression unit 18B for compressing the image data input from the image input unit 16 and outputting a code stream composed of codes appearing at odd-numbered pixels are provided.

以下では、圧縮部18Aによって、2つの隣接する画素X,Yからなる対象画素群のうち、偶数箇所となる方の先頭画素Xの画素値を符号化し、圧縮部18Bによって、奇数箇所となる方の画素Y(先頭画素Xの次の画素)の画素値を符号化する場合を例に説明する。   In the following description, the compression unit 18A encodes the pixel value of the first pixel X that is the even-numbered portion of the target pixel group that is composed of two adjacent pixels X and Y, and the compression unit 18B is the odd-numbered portion. A case where the pixel value of the pixel Y (the pixel next to the first pixel X) is encoded will be described as an example.

圧縮部18Aは、偶数箇所の画素Xを対象画素として、対象画素Xの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Aを算出する予測部20Aと、予測部20Aで算出された誤差Aに対して、可変長符号化(例えば、ハフマン符号化)を行って、誤差シンボル毎に、異なるビット数の符号に変換する符号化部22Aとを備えている。   The compression unit 18A predicts the pixel value of the target pixel X using the even number of pixels X as the target pixel, and calculates the error A between the predicted pixel value and the actual pixel value, and the prediction unit An encoder 22A that performs variable-length coding (for example, Huffman coding) on the error A calculated in 20A and converts the error symbol into a code having a different number of bits for each error symbol is provided.

また、圧縮部18Bは、奇数箇所の画素Yを対象画素として、対象画素Yの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Bを算出する予測部20Bと、予測部20Bで算出された誤差Bに対して、ハフマン符号化を行って、誤差シンボル毎に、異なるビット数の符号に変換する符号化部22Bとを備えている。   In addition, the compression unit 18B predicts the pixel value of the target pixel Y using the odd-numbered pixels Y as the target pixel, and calculates an error B between the predicted pixel value and the actual pixel value; An encoding unit 22B that performs Huffman coding on the error B calculated by the prediction unit 20B and converts the error B into a code having a different number of bits for each error symbol is provided.

予測部20Aは、図2に示すように、偶数箇所の対象画素Xに対して、周辺の画素群(画素A、B、C)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err1を算出する。
Err1=X−(A+B−C)
また、予測部20Bは、図2に示すように、奇数箇所の対象画素Yに対して、周辺の画素群(画素X、B、D)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err2を算出する。
Err2=Y−(X+D−B)
画像圧縮装置12では、圧縮部18A、18Bによって、対象画素群X、Yに対して、並列に画像データの符号化が行われ、各々によって生成される符号によって、図3に示すように、画素の偶数箇所及び奇数箇所に対応して分割された符号ストリームが各々生成される。
As illustrated in FIG. 2, the prediction unit 20A predicts pixel values according to the following formula using the pixel values of the surrounding pixel groups (pixels A, B, and C) for the target pixels X at even locations. At the same time, an error Err1 from the predicted pixel value is calculated.
Err1 = X− (A + B−C)
Further, as illustrated in FIG. 2, the prediction unit 20 </ b> B uses the pixel values of the surrounding pixel groups (pixels X, B, and D) for the target pixel Y at an odd number of locations, according to the following formula, And an error Err2 from the predicted pixel value is calculated.
Err2 = Y− (X + D−B)
In the image compression apparatus 12, the image data is encoded in parallel with respect to the target pixel groups X and Y by the compression units 18A and 18B, and the pixels generated by the respective codes are shown in FIG. The code streams divided corresponding to the even and odd places are respectively generated.

画像伸張装置14は、画像圧縮装置12から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素の画素値に伸張する伸張部24Aと、画像圧縮装置12から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素の画素値に伸張する伸張部24Bと、伸張された偶数箇所の画素の画素値と奇数箇所の画素の画素値とを並べるように結合して、画像データを生成するマージ部26と、マージ部26によって生成された画像データを出力する画像出力部28とを備えている。   The image decompression device 14 includes a decompression unit 24A that decompresses the code stream for the even-numbered pixels output from the image compression device 12 to the pixel value of the even-numbered target pixel, and the odd-numbered location output from the image compression device 12. The expansion unit 24B that expands the pixel value of the target pixel at the odd-numbered location from the code stream for the pixel and the expanded pixel value of the even-numbered location pixel and the pixel value of the odd-numbered location pixel A merge unit 26 that generates data and an image output unit 28 that outputs image data generated by the merge unit 26 are provided.

以下では、伸張部24Aによって、2つの隣接する画素X,Yからなる対象画素群のうち、偶数箇所となる方の先頭画素Xの画素値を伸張し、伸張部24Bによって、奇数箇所となる方の画素Y(先頭画素Xの次の画素)の画素値を伸張する場合を例に説明する。   In the following description, the expansion unit 24A expands the pixel value of the first pixel X that is an even portion of the target pixel group that is composed of two adjacent pixels X and Y, and the expansion unit 24B generates the odd number. A case where the pixel value of the pixel Y (the pixel next to the first pixel X) is expanded will be described as an example.

伸張部24Aは、画像圧縮装置12から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素Xの誤差Aを復号する復号部30Aと、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Xの画素値を逆予測すると共に、復号された対象画素Xの誤差Aと逆予測された対象画素Xの画素値とから、対象画素Xの画素値に伸張する逆予測部32Aとを備えている。   The expansion unit 24A decodes the error A of the even-numbered target pixel X from the code stream for the even-numbered pixel output from the image compression apparatus 12, and the reference around the already expanded target pixel group. The pixel value of the target pixel X is reversely predicted from the pixel values of the pixel group, and the pixel value of the target pixel X is expanded from the decoded error A of the target pixel X and the reversely predicted pixel value of the target pixel X. And an inverse prediction unit 32A.

伸張部24Bは、画像圧縮装置12から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素Yの誤差Bを復号する復号部30Bと、対象画素群のうちの対象画素に隣接する画素の復号された誤差A、及び既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、復号された対象画素Yの誤差Bと逆予測された対象画素Yの画素値とから、対象画素Yの画素値に伸張する逆予測部32Bとを備えている。   The decompression unit 24B is adjacent to the target pixel in the target pixel group, and a decoding unit 30B that decodes the error B of the target pixel Y in the odd number from the code stream for the odd number of pixels output from the image compression device 12. The pixel value of the target pixel Y is inversely predicted from the decoded error A of the pixel and the pixel values of the reference pixel group around the already expanded target pixel group, and the error B of the decoded target pixel Y is inversely predicted. A reverse prediction unit 32B that expands the pixel value of the target pixel Y to the pixel value of the target pixel Y.

なお、復号部30A、30Bが、本発明の並列復号手段に対応し、逆予測部32A、32Bが、本発明の伸張手段に対応している。 The decoding units 30A and 30B correspond to the parallel decoding unit of the present invention, and the inverse prediction units 32A and 32B correspond to the decompressing unit of the present invention.

逆予測部32Aは、図2に示すように、偶数箇所の対象画素(先頭画素)Xに対して、対象画素群X,Yの周辺の、先頭画素Xの隣接する参照画素を含む参照画素群(画素A、B、C)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err1とに基づいて、対象画素Xの画素値を算出する。
X=Err1+(A+B−C)
また、逆予測部32Bは、図2に示すように、奇数箇所の対象画素Yに対して、対象画素群のうちの隣接する画素Xについて復号された誤差Err1と、対象画素群の周辺の参照画素群であって、対象画素Yの周辺の画素(画素A、C、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と対象画素Yの誤差Err2とに基づいて、対象画素Yの画素値を算出する。
Y=Err2+(D−C+A+Err1)
なお、上記の式は、一般的な逆予測の式(Y=Err2+X+D−B)と上記の誤差A(Err1)を算出するための式とから、Xを消去するように導出された式である。
As illustrated in FIG. 2, the inverse prediction unit 32 </ b> A includes a reference pixel group including reference pixels adjacent to the top pixel X around the target pixel groups X and Y with respect to the even number of target pixels (head pixels) X. Using the pixel values of (pixels A, B, and C), the pixel value is inversely predicted according to the following formula, and the pixel value of the target pixel X is determined based on the inversely predicted pixel value and the decoded error Err1. Pixel value is calculated.
X = Err1 + (A + B-C)
In addition, as illustrated in FIG. 2, the inverse prediction unit 32 </ b> B performs error Err <b> 1 decoded for the adjacent pixel X in the target pixel group with respect to the odd-numbered target pixel Y, and references around the target pixel group. In the pixel group, pixel values of pixels around the target pixel Y (pixels A, C, and D) are used to reverse predict the pixel value according to the following formula, and the reverse predicted pixel value and the target pixel Based on the Y error Err2, the pixel value of the target pixel Y is calculated.
Y = Err2 + (D-C + A + Err1)
Note that the above expression is an expression derived so as to eliminate X from a general inverse prediction expression (Y = Err2 + X + D−B) and an expression for calculating the above error A (Err1). .

画像伸張装置14では、伸張部24A、24Bによって、対象画素群X、Yに対して、並列に誤差値の復号が行われると共に、並列に画素値の逆予測及び伸張が行われて、対象画素群X、Yの画素値が出力される。   In the image decompression device 14, the decompression units 24A and 24B perform error value decoding in parallel on the target pixel groups X and Y, and inverse prediction and decompression of pixel values are performed in parallel, so that the target pixel The pixel values of groups X and Y are output.

ここで、予測及び逆予測について、一般的な式を説明する。   Here, general formulas for prediction and inverse prediction will be described.

まず、画素値の予測では、図4に示すように、対象画素群の先頭画素X1に対して、周辺の画素群(画素R1、R2、・・・、Rm)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err1を算出する。
Err1=X1−F1(R1、・・・、Rm)
First, in the prediction of pixel values, as shown in FIG. 4, the pixel values of the surrounding pixel groups (pixels R1, R2,..., Rm) are used for the first pixel X1 of the target pixel group, and In addition to predicting the pixel value, an error Err1 from the predicted pixel value is calculated.
Err1 = X1-F1 (R1,..., Rm)

なお、F1( )は、先頭画素X1の画素値を予測するための関数である。   F1 () is a function for predicting the pixel value of the first pixel X1.

また、対象画素群の先頭画素X1に隣接する次の対象画素X2に対して、周辺の画素群(画素R1、・・・、Rm、X1)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err2を算出する。
Err2=X2−F2(R1、・・・、Rm、X1)
In addition, for the next target pixel X2 adjacent to the first pixel X1 of the target pixel group, the pixel values of the peripheral pixel group (pixels R1,..., Rm, X1) are used according to the following formula. A value is predicted, and an error Err2 from the predicted pixel value is calculated.
Err2 = X2-F2 (R1,..., Rm, X1)

なお、F2( )は、対象画素X2の画素値を予測するための関数である。   F2 () is a function for predicting the pixel value of the target pixel X2.

また、対象画素群のn番目の対象画素Xnに対して、周辺の画素群(画素R1、・・・、Rm、X1、・・・、Xn−1)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Errnを算出する。
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1)
Further, for the nth target pixel Xn of the target pixel group, using the pixel values of the surrounding pixel groups (pixels R1,..., Rm, X1,..., Xn−1), And predicting the pixel value and calculating an error Errn with the predicted pixel value.
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1)

なお、Fn( )は、対象画素Xnの画素値を予測するための関数である。   Fn () is a function for predicting the pixel value of the target pixel Xn.

画素値の逆予測では、図4に示すように、対象画素群の先頭画素X1に対して、対象画素群X1、・・・、Xnの周辺の参照画素群(画素R1、・・・、Rm)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err1とに基づいて、対象画素X1の画素値を算出する。
X1=Err1+F1’(R1、・・・、Rm)
なお、F1’( )は、先頭画素X1の画素値を逆予測するための関数である。
In the inverse prediction of the pixel value, as shown in FIG. 4, with respect to the first pixel X1 of the target pixel group, reference pixel groups (pixels R1,..., Rm) around the target pixel group X1,. ) Is used to inversely predict the pixel value according to the following formula, and the pixel value of the target pixel X1 is calculated based on the inversely predicted pixel value and the decoded error Err1.
X1 = Err1 + F1 ′ (R1,..., Rm)
Note that F1 ′ () is a function for inversely predicting the pixel value of the first pixel X1.

また、対象画素群の先頭画素X1に隣接する次の対象画素X2に対して、対象画素群X1、・・・、Xnの周辺の参照画素群(画素R1、・・・、Rm)の画素値と、復号された先頭画素X1の誤差Err1とを用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err2とに基づいて、対象画素X2の画素値を算出する。
X2=Err2+F2’(R1、・・・、Rm、Err1)
Further, for the next target pixel X2 adjacent to the first pixel X1 of the target pixel group, the pixel values of the reference pixel group (pixels R1,..., Rm) around the target pixel group X1,. And the error Err1 of the decoded first pixel X1 are subjected to reverse prediction of the pixel value according to the following expression, and the target pixel X2 is based on the reversely predicted pixel value and the decoded error Err2. The pixel value of is calculated.
X2 = Err2 + F2 ′ (R1,..., Rm, Err1)

なお、F2’( )は、対象画素X2の画素値を逆予測するための関数である。   Note that F2 ′ () is a function for inversely predicting the pixel value of the target pixel X2.

また、対象画素群のn番目の対象画素Xnに対して、対象画素群X1、・・・、Xnの周辺の参照画素群(画素R1、・・・、Rm)の画素値と、復号された対象画素群X1、・・・、Xn−1の誤差Err1、・・・、Errn−1を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Errnとに基づいて、対象画素Xnの画素値を算出する。
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1)
In addition, with respect to the nth target pixel Xn of the target pixel group, the pixel values of the reference pixel group (pixels R1,..., Rm) around the target pixel group X1,. Using the errors Err1,..., Err-1 of the target pixel group X1,..., Xn-1, the pixel value is inversely predicted according to the following formula, and the inversely predicted pixel value is decoded. Based on the error Errn, the pixel value of the target pixel Xn is calculated.
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Err-1)

なお、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。   Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.

上記図4で、R1、・・・、Rmは参照画素群を表しており、対象画素群の先頭画素X1より前に出現したすべての画素の集合である。対象画素について、直前までの画素の誤差集合と参照画素集合とを用いて画素値が伸張される。すなわち、上記の逆予測のための式では、前に出現した画素Xの画素値を用いずに、計算が行なわれる。なお、予測のための式及び逆予測のための式は和減算であることが一般的なので、関数F、F’も簡単な計算式となる。   In FIG. 4, R1,..., Rm represent a reference pixel group, which is a set of all pixels that appear before the first pixel X1 of the target pixel group. For the target pixel, the pixel value is expanded using the error set and reference pixel set of the previous pixels. That is, in the above formula for inverse prediction, the calculation is performed without using the pixel value of the pixel X that appears before. Since the formula for prediction and the formula for inverse prediction are generally sum subtraction, the functions F and F ′ are also simple calculation formulas.

画像入力部16、圧縮部18A、圧縮部18B、伸張部24A、伸張部24B、マージ部26、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。   The image input unit 16, the compression unit 18A, the compression unit 18B, the decompression unit 24A, the decompression unit 24B, the merge unit 26, and the image output unit 28 are one or more computers that realize the functions of the respective units, or one or more. The electronic circuit can be configured.

次に、第1の実施の形態に係る画像圧縮伸張システム10の作用を説明する。   Next, the operation of the image compression / decompression system 10 according to the first embodiment will be described.

まず、画像圧縮装置12において、画像入力部16から画像データが入力されると、圧縮部18A、18Bによって、画像データの対象画素群の偶数箇所の対象画素及び奇数箇所の対象画素の各々について、並列に予測符号化を行い、別々の符号ストリームとして符号を各々出力する。   First, in the image compression device 12, when image data is input from the image input unit 16, the compression units 18A and 18B respectively apply the even-numbered target pixels and the odd-numbered target pixels of the target pixel group of the image data. Predictive coding is performed in parallel, and each code is output as a separate code stream.

このとき、圧縮部18Aでは、対象画素群の偶数箇所の画素Xを対象画素として、予測部20Bによって、画像データにおける対象画素Xの周辺の画素の画素値を用いて、対象画素Xの画素値を予測すると共に、対象画素Xの実際の画素値との誤差Aを算出して、出力する。また、符号化部22Aによって、予測部20Aから出力された誤差Aをハフマン符号化によって符号化して、符号を出力する。   At this time, in the compression unit 18A, the pixel value of the target pixel X is determined by using the pixel values of the pixels around the target pixel X in the image data by the prediction unit 20B with the pixels X in even-numbered portions of the target pixel group as target pixels. And an error A with respect to the actual pixel value of the target pixel X is calculated and output. Further, the encoding unit 22A encodes the error A output from the prediction unit 20A by Huffman coding, and outputs a code.

また、同様に、圧縮部18Bでは、対象画素群の奇数箇所の画素Yを対象画素として、予測部20Bによって、対象画素Yの誤差Bを算出して出力し、符号化部22Aによって、符号化して符号を出力する。   Similarly, the compression unit 18B calculates and outputs an error B of the target pixel Y by the prediction unit 20B using the odd-numbered pixels Y of the target pixel group as the target pixel, and the encoding unit 22A performs encoding. To output the sign.

次に、画像伸張装置14において、画像圧縮装置12から出力された、偶数箇所の画素に対応する符号ストリームと奇数箇所の画素に対応する符号ストリームとが入力されると、伸張部24A、24Bによって、画像データの対象画素群X,Yの偶数箇所の対象画素X及び奇数箇所の対象画素Yの各々について、並列に誤差を復号すると共に、並列に逆予測及び伸張を行って、画素値を各々出力する。   Next, when the code stream corresponding to the even-numbered pixels and the code stream corresponding to the odd-numbered pixels output from the image compression apparatus 12 are input to the image expansion device 14, the expansion units 24A and 24B For each of the even-numbered target pixels X and the odd-numbered target pixels Y in the target pixel groups X and Y of the image data, the error is decoded in parallel, and the inverse prediction and expansion are performed in parallel, and the pixel values are respectively set. Output.

このとき、伸張部24Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、復号部30Aによって、符号ストリームから対象画素Xの符号を取り出し、取り出した符号を対象画素Xの誤差Aに復号する。また、逆予測部32Aによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Xの画素値を予測すると共に、復号された誤差Aを用いて、対象画素Xの画素値に伸張して出力する。   At this time, in the decompression unit 24A, the decoding unit 30A extracts the code of the target pixel X from the code stream using the even-numbered pixel (first pixel) X of the target pixel group as the target pixel, and the extracted code is used as the target pixel X Decode into error A. The inverse prediction unit 32A predicts the pixel value of the target pixel X using the pixel values of the reference pixel group around the target pixel group in the image data that has already been decompressed and output from the merge unit 26. Using the decoded error A, the pixel value of the target pixel X is expanded and output.

また、伸張部24Bでは、対象画素群の奇数箇所の画素(先頭画素の次の画素)Yを対象画素として、復号部30Bによって、符号ストリームから対象画素Yの符号を取り出し、取り出した符号を対象画素Yの誤差Bに復号する。また、逆予測部32Bによって、復号部30Aから、対象画素群の先頭画素Xの誤差Aを取得すると、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、対象画素群の先頭画素Xの誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。   Further, in the decompression unit 24B, the code of the target pixel Y is extracted from the code stream by the decoding unit 30B using the odd-numbered pixel (the pixel next to the first pixel) Y of the target pixel group as the target pixel, and the extracted code is processed Decode into error B of pixel Y. In addition, when the error A of the first pixel X of the target pixel group is acquired from the decoding unit 30A by the inverse prediction unit 32B, the reference around the target pixel group in the image data that has already been expanded and output from the merge unit 26 The pixel value of the target pixel Y is predicted using the pixel value of the pixel group and the error A of the first pixel X of the target pixel group, and is expanded to the pixel value of the target pixel Y using the decoded error B And output.

そして、マージ部26によって、伸張部24A、24Bの各々から、伸張された画素値を取得すると、取得した対象画素群の各画素X,Yの画素値を結合して、画像データとして画像出力部28及び伸張部24A、24Bに出力する。   When the expanded pixel value is acquired from each of the expansion units 24A and 24B by the merging unit 26, the pixel values of the respective pixels X and Y of the acquired target pixel group are combined to generate an image output unit as image data. 28 and the extension units 24A and 24B.

次に、画像伸張装置14の伸張部24A、24Bにおいて同期を取る場合のタイミングについて説明する。   Next, the timing when synchronization is performed in the expansion units 24A and 24B of the image expansion device 14 will be described.

図5に示すように、画素マージ待ちを除けば伸張部24Aに待ち時間は発生しない。ここでの”待ち”とは、他の伸張部の出力結果を待たなければ処理を先に進められない状態を指す。伸張部24Bでは、誤差Aの復号待ちと画素マージ待ちとが発生する。   As shown in FIG. 5, no waiting time occurs in the decompression unit 24A except for the pixel merge wait. “Waiting” here refers to a state in which processing cannot proceed unless the output result of another decompression unit is waited. In the decompression unit 24B, waiting for decoding error A and waiting for pixel merging occur.

従って、伸張部24A、24Bにおける誤差の復号時間を揃え、逆予測処理の時間を揃えることが好ましい。上記図5の例では、伸張部24Aの画素マージ待ちと伸張部24Bの誤差Aの復号待ちとが発生する場合を表している。   Therefore, it is preferable to align the decoding time of errors in the decompressing units 24A and 24B and to align the time of inverse prediction processing. In the example of FIG. 5 described above, the case where the pixel merge wait of the decompression unit 24A and the decoding wait of the error A of the decompression unit 24B occur.

以上説明したように、第1の実施の形態に係る画像圧縮伸張システムによれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。   As described above, according to the image compression / decompression system according to the first embodiment, an image is decompressed in parallel by the image decompression apparatus without reducing the compression rate as compared with the case where the image is not decompressed in parallel. Can be stretched.

また、隣接する画素の画素値を用いて誤差演算して逆予測処理を行う場合に比べて、隣接する画素の画素値が確定するのを待たなくても、隣接する画素の誤差値が復号されれば逆予測処理を行うことができるため、並列に画像を伸張することができる。   Compared to the case where the inverse prediction process is performed by calculating the error using the pixel value of the adjacent pixel, the error value of the adjacent pixel is decoded without waiting for the pixel value of the adjacent pixel to be determined. Therefore, since the inverse prediction process can be performed, the images can be expanded in parallel.

また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行っているので、圧縮率を低下させずに、画像データの圧縮及び伸張を行うことができる。   Further, since error calculation is performed using pixel values or error values of adjacent pixels, image data can be compressed and expanded without reducing the compression rate.

なお、上記の実施の形態では、2つの連続する画素を対象画素群とし、対象画素群の2つの対象画素に対して、並列に復号処理及び逆予測処理を行う場合を例に説明したが、これに限定されるものではなく、3つ以上のN個の連続する画素を対象画素群とし、対象画素群のN個の対象画素に対して、並列に復号処理及び逆予測処理を行うようにしてもよい。この場合には、符号ストリームとして、N個の列の符号ストリームを生成して、画像伸張装置に入力するようにすればよい。   In the above embodiment, a case has been described in which two consecutive pixels are set as a target pixel group, and decoding processing and inverse prediction processing are performed in parallel on two target pixels in the target pixel group. The present invention is not limited to this, and three or more N consecutive pixels are set as a target pixel group, and decoding processing and inverse prediction processing are performed in parallel on N target pixels in the target pixel group. May be. In this case, a code stream of N columns may be generated as a code stream and input to the image expansion apparatus.

次に、第2の実施の形態について説明する。なお、第1の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。   Next, a second embodiment will be described. In addition, about the part which becomes the structure similar to 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.

第2の実施の形態では、予測符号化とランレングス符号化とを組み合わせて、画像データの圧縮、伸張を行っている点が、第1の実施の形態と主に異なっている。   The second embodiment is mainly different from the first embodiment in that image data is compressed and expanded by combining predictive coding and run-length coding.

図6に示すように、第2の実施の形態に係る画像圧縮伸張システム210は、画像データを圧縮する画像圧縮装置212と、圧縮された画像データを伸張する画像伸張装置214とを備えている。   As shown in FIG. 6, an image compression / decompression system 210 according to the second embodiment includes an image compression device 212 that compresses image data and an image expansion device 214 that decompresses compressed image data. .

画像圧縮装置212は、画像入力部16と、画像入力部16から入力された画像データを圧縮して、偶数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部218Aと、画像入力部16から入力された画像データを圧縮して、奇数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部218Bとを備えている。   The image compression apparatus 212 includes an image input unit 16, a compression unit 218 </ b> A that compresses the image data input from the image input unit 16 and outputs a code stream including codes that appear at even-numbered pixels, and an image input unit A compression unit 218B that compresses the image data input from 16 and outputs a code stream including codes that appear at odd-numbered pixels.

圧縮部218Aは、偶数箇所の画素を対象画素Xとして、直前の奇数箇所の画素Aの画素値と一致すれば、ランレングス符号化(連長圧縮符号化)を行って、直前の画素と順々に比較して偶数箇所の画素分だけ連続数を計数すると共に、連続する画素値を出力し、一致しない場合には、連続数0を出力するラン計数部219Aと、直前の奇数箇所の画素Aの画素値と一致しない場合に、上記第1の実施の形態と同様に、対象画素Xの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Aを算出する予測部220Aと、連続数0が出力された場合、誤差IDを表わす符号を出力し、連続数が1以上である場合には、ランIDを表わす符号を出力するID符号化部221Aと、ラン計数部219Aから出力されたランA(連続数及び画素値)、又は予測部220Aで算出された誤差Aに対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部222Aと、ID符号化部221Aからの符号と符号化部222Aからの符号とを結合して1シンボルとして出力する符号出力部223Aとを備えている。   The compression unit 218A sets the even-numbered pixel as the target pixel X and performs run-length coding (continuous length compression coding) if the pixel value matches the pixel value of the immediately preceding odd-numbered pixel A, in order with the previous pixel. Compared to each other, the continuous number is counted for even-numbered pixels, and continuous pixel values are output. If they do not match, the run-counting unit 219A that outputs the continuous number 0 and the immediately preceding odd-numbered pixel Prediction for predicting the pixel value of the target pixel X and calculating the error A between the predicted pixel value and the actual pixel value, as in the first embodiment, when the pixel value does not match the pixel value of A Unit 220A outputs a code representing an error ID when the continuation number 0 is output, and outputs a code representing the run ID when the continuation number is 1 or more, and a run count Run A (continuous number) output from the unit 219A Pixel value) or error A calculated by the prediction unit 220A is subjected to variable length coding (for example, Huffman coding), and converted into a code having a different number of bits for each symbol. A code output unit 223A that combines the code from the ID encoding unit 221A and the code from the encoding unit 222A and outputs the result as one symbol.

圧縮部218Bは、奇数箇所の画素Yを対象画素として、直前の偶数箇所の画素Xの画素値と一致すれば、ランレングス符号化を行って、直前の画素と順々に比較して奇数箇所の画素分だけ連続数を計数すると共に、連続する画素値を出力し、一致しない場合には、連続数0を出力するラン計数部219Bと、直前の偶数箇所の画素Xの画素値と一致しない場合に、上記第1の実施の形態と同様に、対象画素Yの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Bを算出する予測部220Bと、連続数0が出力された場合、誤差IDを表わす符号を出力し、連続数が1以上である場合には、ランIDを表わす符号を出力するID符号化部221Bと、ラン計数部219Bから出力されたランB(連続数及び画素値)、又は予測部220Bで算出された誤差Bに対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部222Bと、ID符号化部221Bからの符号と符号化部222Bからの符号とを結合して1シンボルとして出力する符号出力部223Bとを備えている。   The compression unit 218B sets the odd-numbered pixel Y as the target pixel and performs run-length encoding if the pixel value of the previous even-numbered pixel X matches the odd-numbered pixel. The continuous number is counted for the number of pixels, and continuous pixel values are output. If they do not match, the run counting unit 219B that outputs the continuous number 0 does not match the pixel values of the immediately preceding even-numbered pixels X. In this case, as in the first embodiment, the prediction unit 220B that predicts the pixel value of the target pixel Y and calculates the error B between the predicted pixel value and the actual pixel value; Is output, a code representing the error ID is output, and when the number of continuations is 1 or more, the ID encoding unit 221B that outputs a code indicating the run ID and the run output from the run counting unit 219B. B (continuous number and pixel value), or An encoding unit 222B that performs variable-length encoding (for example, Huffman encoding) on the error B calculated by the measurement unit 220B and converts the symbol into a code having a different number of bits for each symbol, and an ID encoding unit A code output unit 223B that combines the code from 221B and the code from the encoding unit 222B and outputs the combined code as one symbol is provided.

画像圧縮装置212では、圧縮部218A、218Bによって、偶数箇所の画素及び奇数箇所の画素に対して、並列に画像データの予測符号化又はランレングス符号化が行われ、各々によって生成される符号によって、偶数箇所及び奇数箇所の各々に対応する符号ストリームが生成されて出力される。なお、本実施の形態では、偶数箇所の画素に対して符号化された符号に対する少なくとも1つの画素と、奇数箇所の画素に対して符号化された符号に対する少なくとも1つの画素とを、対象画素群とする。   In the image compression apparatus 212, predictive encoding or run-length encoding of image data is performed in parallel on the even-numbered pixels and the odd-numbered pixels by the compression units 218A and 218B. A code stream corresponding to each of the even and odd locations is generated and output. In the present embodiment, at least one pixel with respect to a code encoded with respect to even-numbered pixels and at least one pixel with respect to a code encoded with respect to odd-numbered pixels are included in the target pixel group. And

画像伸張装置214は、画像圧縮装置212から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素の画素値に伸張する伸張部224Aと、画像圧縮装置212から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素の画素値に伸張する伸張部224Bと、マージ部26と、画像出力部28とを備えている。   The image decompression device 214 includes a decompression unit 224A that decompresses the code stream for even-numbered pixels output from the image compression device 212 to the pixel value of the even-numbered target pixel, and the odd-numbered location output from the image compression device 212. A decompression unit 224B, a merge unit 26, and an image output unit 28 are provided for decompressing the pixel value of the target pixel at odd-numbered locations from the code stream for the pixels.

伸張部224Aは、画像圧縮装置212から出力された偶数箇所の画素に対する符号ストリームが入力される符号入力部229Aと、符号入力部229Aから入力された符号ストリームから、偶数箇所の対象画素XのID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部230Aと、ID復号部230AによるIDの解釈結果に応じて、符号ストリームから、偶数箇所の対象画素Xの誤差A、又はランA(連続数及び画素値)を復号する復号部231Aと、復号部231Aから誤差Aが復号された場合、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Xの画素値を逆予測すると共に、復号された対象画素Xの誤差Aと逆予測された対象画素Xの画素値とから、対象画素Xの画素値に伸張する逆予測部232Aと、復号部231AからランA(連続数及び画素値)が復号された場合、画素値と連続数とを保持するラン保持部233Aと、ラン保持部233Aに保持されている画素値を、連続数に応じて展開するラン展開部234Aとを備えている。   The decompression unit 224A receives the ID of the even-numbered target pixel X from the code input unit 229A to which the code stream for the even-numbered pixels output from the image compression device 212 is input and the code stream input from the code input unit 229A. The ID decoding unit 230A that interprets the code and interprets whether it is a run ID or an error ID, and the error of the target pixel X at an even number of locations from the code stream according to the ID interpretation result by the ID decoding unit 230A A or a decoding unit 231A that decodes run A (continuous number and pixel value), and when the error A is decoded from the decoding unit 231A, the target pixel value of the reference pixel group around the already expanded target pixel group The pixel value of the pixel X is inversely predicted, and the pixel value of the target pixel X is expanded from the decoded error A of the target pixel X and the reversely predicted pixel value of the target pixel X. When a run A (continuous number and pixel value) is decoded from the predicting unit 232A and the decoding unit 231A, a run holding unit 233A that holds the pixel value and the continuous number, and a pixel value that is held in the run holding unit 233A Is provided with a run unfolding section 234A for unfolding according to the number of consecutive lines.

伸張部224Bは、画像圧縮装置212から出力された奇数箇所の画素に対する符号ストリームが入力される符号入力部229Bと、符号入力部229Bから入力された符号ストリームから、奇数箇所の対象画素YのID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部230Bと、ID復号部230BによるIDの解釈結果に応じて、符号ストリームから、奇数箇所の対象画素Yの誤差B、又はランB(連続数及び画素値)を復号する復号部231Bと、ID復号部230AによるIDの解釈結果、及びID復号部230BによるIDの解釈結果に基づいて、ラン展開又は逆予測処理を切り替える制御部232Bを備えている。   The decompression unit 224B receives the ID of the odd-numbered target pixel Y from the code input unit 229B to which the code stream for the odd-numbered pixels output from the image compression device 212 is input and the code stream input from the code input unit 229B. An ID decoding unit 230B that interprets the code and interprets whether it is a run ID or an error ID, and an error of the target pixel Y at an odd place from the code stream according to the ID interpretation result by the ID decoding unit 230B B or run B (the number of consecutive and pixel values) decoding unit 231B, ID expansion result by ID decoding unit 230A, and ID expansion result by ID decoding unit 230B, run expansion or reverse prediction processing The control part 232B which switches is provided.

また、伸張部224Bは、ID復号部230BでランIDであると解釈された場合に、復号部231Bにより復号された連続数及び画素値を保持するラン保持部233Bと、ラン保持部233Bに保持されている画素値を、連続数に応じて展開するラン展開部234Bと、ID復号部230AでランIDであると解釈され、ID復号部230Bで誤差IDであると解釈された場合に、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、復号された対象画素Yの誤差Bと逆予測された対象画素Yの画素値とから、対象画素Yの画素値に伸張する逆予測部236Bと、ID復号部230A及びID復号部230Bの双方で誤差IDであると解釈された場合に、既に伸張された対象画素群の周辺の参照画素群の画素値と、復号された対象画素Xの誤差Aとから対象画素Yの画素値を逆予測すると共に、復号された対象画素Yの誤差Bと逆予測された対象画素Yの画素値とから、対象画素Yの画素値に伸張する逆予測部237Bとを備えている。   In addition, when the ID decoding unit 230B interprets the decompression unit 224B as a run ID, the decompression unit 224B stores the continuous number and pixel values decoded by the decoding unit 231B and the run holding unit 233B. If the pixel value that has been interpreted as a run ID by the run development unit 234B that develops the pixel value according to the continuous number and the ID decoding unit 230A and is interpreted as an error ID by the ID decoding unit 230B, The pixel value of the target pixel Y is inversely predicted from the pixel values of the reference pixel group around the expanded target pixel group, and the error B of the decoded target pixel Y and the inversely predicted pixel value of the target pixel Y are calculated. When the reverse prediction unit 236B that expands to the pixel value of the target pixel Y and both the ID decoding unit 230A and the ID decoding unit 230B interpret the error ID as an error ID, The pixel value of the target pixel Y is inversely predicted from the pixel value of the reference pixel group and the error A of the decoded target pixel X, and the pixel of the target pixel Y that is reversely predicted to be the error B of the decoded target pixel Y And an inverse prediction unit 237B that expands from the value to the pixel value of the target pixel Y.

なお、復号部231A、231Bが、本発明の並列復号手段に対応し、ラン保持部233A、233B、ラン展開部234A、234B、逆予測部232A、236B、237Bが、本発明の展開手段に対応している。 The decoding units 231A and 231B correspond to the parallel decoding unit of the present invention, and the run holding units 233A and 233B, the run expansion units 234A and 234B, and the inverse prediction units 232A, 236B, and 237B correspond to the expansion unit of the present invention. doing.

ラン保持部233Aは、図7に示すように、ID復号部230AでランIDであると解釈された場合、連続数及び画素値を保持し、ラン展開部234Aに1画素ずつ画素値を出力すると共に、保持している連続数を1ずつデクリメントする。   As shown in FIG. 7, the run holding unit 233A holds the continuous number and the pixel value when the ID decoding unit 230A interprets the run ID, and outputs the pixel value to the run developing unit 234A pixel by pixel. At the same time, the continuous number held is decremented by one.

また、ラン保持部233Aは、ID復号部230Aに制御データを出力する。この制御データとして、保持している連続数が0のときには復号可を表わす信号が出力され、0以外の場合には復号不可を表す信号が出力される。   The run holding unit 233A outputs control data to the ID decoding unit 230A. As the control data, a signal indicating that decoding is possible is output when the number of consecutive data held is 0, and a signal indicating that decoding is impossible is output when the number is not 0.

ID復号部230Aは、制御データとして復号可を表わす信号が入力された場合に、符号ストリームからID符号を取り出して解釈し、制御データとして復号不可を表わす信号が入力された場合に、ID符号の取り出しを停止する。   The ID decoding unit 230A extracts and interprets the ID code from the code stream when a signal indicating that decoding is possible is input as control data, and when the signal indicating that decoding is impossible is input as control data, Stop ejecting.

逆予測部232Aは、図7に示すように、ID復号部230Aで誤差IDであると解釈された場合、偶数箇所の対象画素Xに対して、対象画素群X,Yの周辺の、先頭画素Xの隣接する参照画素を含む参照画素群(画素A、B、C)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err1とに基づいて、対象画素Xの画素値を算出する。
X=Err1+(A+B−C)
As illustrated in FIG. 7, when the ID decoding unit 230 </ b> A interprets the inverse prediction unit 232 </ b> A as the error ID, the reverse prediction unit 232 </ b> A is the first pixel around the target pixel groups X and Y with respect to the target pixel X at even locations. Using the pixel values of the reference pixel group (pixels A, B, and C) including reference pixels adjacent to X, the pixel value is inversely predicted according to the following formula, and the inversely predicted pixel value is decoded. Based on the error Err1, the pixel value of the target pixel X is calculated.
X = Err1 + (A + B-C)

また、同様に、ラン保持部233Bは、連続数及び画素値を保持し、ラン展開部234Bに1画素分ずつ画素値を出力すると共に、保持している連続数を1ずつデクリメントする。また、ラン保持部233Bは、ID復号部230Bに制御データを出力する。ID復号部230Bは、制御データとして復号可を表わす信号が入力された場合に、符号ストリームからID符号を取り出して解釈し、制御データとして復号不可を表わす信号が入力された場合に、符号ストリームからのID符号の取り出しを停止する。   Similarly, the run holding unit 233B holds the continuous number and the pixel value, outputs the pixel value for each pixel to the run developing unit 234B, and decrements the held continuous number by one. Moreover, the run holding unit 233B outputs control data to the ID decoding unit 230B. The ID decoding unit 230B extracts and interprets the ID code from the code stream when a signal indicating that decoding is possible is input as control data, and from the code stream when a signal indicating that decoding is not possible is input as control data. The extraction of the ID code is stopped.

制御部232Bは、図8に示すような、ID復号部230AによるIDの解釈結果、及びID復号部230BによるIDの解釈結果のパターンに応じて、復号された誤差A、誤差B、並びに、ランA(連続数及び画素値)の少なくとも1つを、ラン保持部233B、逆予測部236B、及び逆予測部237Bの何れか1つに受け渡す。   The control unit 232B, as shown in FIG. 8, according to the pattern of the ID interpretation result by the ID decoding unit 230A and the ID interpretation result by the ID decoding unit 230B, the decoded error A, error B, and run At least one of A (continuous number and pixel value) is transferred to any one of the run holding unit 233B, the inverse prediction unit 236B, and the inverse prediction unit 237B.

逆予測部236Bは、奇数箇所の対象画素Yに対して、対象画素群X,Yの周辺の参照画素群であって、先頭画素Xに隣接する参照画素Aを含む対象画素Yの周辺の画素(画素A、B、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err2とに基づいて、対象画素Yの画素値を算出する。
Y=Err2+(A+D−B)
The inverse prediction unit 236B is a reference pixel group around the target pixel group X, Y with respect to the target pixel Y at odd places, and is a pixel around the target pixel Y including the reference pixel A adjacent to the top pixel X. Using the pixel values of (pixels A, B, and D), the pixel value is inversely predicted according to the following equation, and the pixel value of the target pixel Y is determined based on the inversely predicted pixel value and the decoded error Err2. Pixel value is calculated.
Y = Err2 + (A + D−B)

なお、上記の式は、一般的な逆予測の式(Y=Err2+X+D−B)におけるXを、Xと等しいAに置き換えた式である。   The above formula is a formula in which X in the general inverse prediction formula (Y = Err2 + X + D−B) is replaced with A equal to X.

また、逆予測部237Bは、奇数箇所の対象画素Yに対して、対象画素群のうちの隣接する画素Xについて復号された誤差Err1と、対象画素群の周辺の参照画素群(画素A、C、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と対象画素Yの誤差Err2とに基づいて、対象画素Yの画素値を算出する。
Y=Err2+(D−C+A+Err1)
In addition, the inverse prediction unit 237B performs the error Err1 decoded on the adjacent pixel X in the target pixel group and the reference pixel group (pixels A and C) around the target pixel group with respect to the target pixel Y in the odd-numbered places. , D) is used to reverse predict the pixel value according to the following formula, and calculate the pixel value of the target pixel Y based on the reverse predicted pixel value and the error Err2 of the target pixel Y. .
Y = Err2 + (D-C + A + Err1)

画像伸張装置214では、伸張部224A、224Bによって、偶数箇所の画素X、及び奇数箇所の画素Yに対して、誤差値、又は連続数及び画素値の復号が並列に行われると共に、画素値の逆予測及び伸張、又は展開が並列に行われて、偶数箇所の画素X、及び奇数箇所の画素Yの画素値が出力される。   In the image decompression device 214, the decompression units 224A and 224B decode the error value or the consecutive number and the pixel value in parallel with respect to the even-numbered pixels X and the odd-numbered pixels Y, and Inverse prediction and expansion or expansion are performed in parallel, and the pixel values of even-numbered pixels X and odd-numbered pixels Y are output.

画像入力部16、圧縮部218A、圧縮部218B、伸張部224A、伸張部224B、マージ部26、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。   The image input unit 16, the compression unit 218 </ b> A, the compression unit 218 </ b> B, the decompression unit 224 </ b> A, the decompression unit 224 </ b> B, the merge unit 26, and the image output unit 28 are one or more computers that realize the functions of each unit, or one or more The electronic circuit can be configured.

次に、第2の実施の形態に係る画像圧縮伸張システム210の作用を説明する。   Next, the operation of the image compression / decompression system 210 according to the second embodiment will be described.

まず、画像圧縮装置212において、画像入力部16から画像データが入力されると、圧縮部218A、218Bによって、画像データの対象画素群の偶数箇所の対象画素及び奇数箇所の対象画素の各々について、並列に予測符号化又はランレングス符号化を行い、別々の符号ストリームとして符号を各々出力する。   First, in the image compression apparatus 212, when image data is input from the image input unit 16, the compression units 218A and 218B respectively apply the even-numbered target pixels and the odd-numbered target pixels of the target pixel group of the image data. Predictive coding or run-length coding is performed in parallel, and each code is output as a separate code stream.

このとき、圧縮部218Aでは、対象画素群の偶数箇所の画素Xを対象画素として、対象画素Xの直前の奇数箇所の画素Aの画素値と比較して、画素値が一致する場合には、ラン計数部219Aによって、直前の画素の画素値と順々に比較して、偶数箇所の画素分の連続数を計数し、連続数及び連続する画素値をランAとして出力する。   At this time, in the compression unit 218A, when the pixel values match when compared with the pixel values of the odd-numbered pixels A immediately before the target pixel X using the even-numbered pixels X of the target pixel group as the target pixel, The run counting unit 219A sequentially compares the pixel value of the immediately preceding pixel, counts the continuous number of pixels at even locations, and outputs the continuous number and the continuous pixel value as run A.

一方、対象画素Xの直前の奇数箇所の画素Aの画素値と比較して、画素値が一致しない場合には、ラン計数部219Aによって、連続数0を出力すると共に、予測部220Bによって、画像データにおける対象画素Xの周辺の画素の画素値を用いて、対象画素Xの画素値を予測すると共に、対象画素Xの実際の画素値との誤差Aを算出して、出力する。   On the other hand, when the pixel values do not match with the pixel values of the odd-numbered pixels A immediately before the target pixel X, the run number unit 219A outputs the continuous number 0, and the prediction unit 220B outputs the image The pixel value of the pixel around the target pixel X in the data is used to predict the pixel value of the target pixel X, and an error A from the actual pixel value of the target pixel X is calculated and output.

ラン計数部219Aより連続数0が出力された場合、ID符号化部221Aによって、誤差IDを表わすID符号を出力し、また、符号化部222Aによって、予測部220Aから出力された誤差Aをハフマン符号化によって符号化して、誤差符号を出力する。   When the run count unit 219A outputs the continuation number 0, the ID encoding unit 221A outputs an ID code representing the error ID, and the encoding unit 222A outputs the error A output from the prediction unit 220A to the Huffman Encoding is performed by encoding and an error code is output.

また、ラン計数部219Aより1以上の連続数が出力された場合、ID符号化部221Aによって、ランIDを表わすID符号を出力し、また、符号化部222Aによって、ラン計数部219Aから出力された連続数及び画素値をハフマン符号化によって符号化して、ラン符号を出力する。   When a run number of 1 or more is output from the run counter 219A, an ID code representing the run ID is output from the ID encoder 221A, and output from the run counter 219A by the encoder 222A. The continuous number and the pixel value are encoded by Huffman encoding, and a run code is output.

そして、符号出力部223Aによって、ID符号化部221Aより出力されたID符号と符号化部222Aより出力された符号とを結合して、偶数箇所に対応する符号ストリームとして出力する。   Then, the code output unit 223A combines the ID code output from the ID encoding unit 221A and the code output from the encoding unit 222A, and outputs the result as a code stream corresponding to an even number of places.

また、圧縮部218Bでは、対象画素群の奇数箇所の画素Yを対象画素として、圧縮部218Aの各部と同様に動作する。   Further, the compression unit 218B operates in the same manner as each unit of the compression unit 218A with the pixel Y at an odd number in the target pixel group as the target pixel.

次に、画像伸張装置214において、画像圧縮装置212から出力された、偶数箇所の画素に対応する符号ストリームと奇数箇所の画素に対応する符号ストリームとが入力されると、伸張部224A、224Bによって、画像データの偶数箇所の画素及び奇数箇所の画素の各々について、誤差、又は連続数及び画素値を並列に復号すると共に、逆予測及び伸張、又はラン展開を並列に行って、画素値を各々出力する。   Next, when the code stream corresponding to the even-numbered pixels and the code stream corresponding to the odd-numbered pixels output from the image compression apparatus 212 are input to the image expansion device 214, the expansion units 224A and 224B In addition, for each of even-numbered pixels and odd-numbered pixels of the image data, the error or the continuous number and the pixel value are decoded in parallel, and inverse prediction and expansion, or run expansion are performed in parallel, and the pixel values are respectively determined. Output.

このとき、伸張部224Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、ID復号部230Aによって、復号の可否を表わす制御データに応じて、符号ストリームから対象画素XのID符号を取り出し、ID符号を解釈する。そして、復号部231Aによって、符号ストリームから対象画素Xの符号を取り出し、ID符号の解釈結果に応じて、取り出した符号を、対象画素Xの誤差、又は連続数及び画素値に復号する。このとき、ID復号部230AによるID符号の解釈結果は、制御部232Bに出力される。   At this time, in the decompression unit 224A, the even-numbered pixel (first pixel) X of the target pixel group is set as the target pixel, and the ID decoding unit 230A determines the target pixel X from the code stream according to control data indicating whether decoding is possible. Take out the ID code and interpret the ID code. Then, the decoding unit 231A extracts the code of the target pixel X from the code stream, and decodes the extracted code into the error of the target pixel X or the number of consecutive pixels and the pixel value according to the interpretation result of the ID code. At this time, the interpretation result of the ID code by the ID decoding unit 230A is output to the control unit 232B.

連続数及び画素値が復号された場合には、ラン保持部233Aによって連続数及び画素値が保持され、ラン展開部234Aによって、ラン保持部233Aに保持されている画素値が対象画素の画素値として展開されると共に、ラン保持部233Aの連続数が1ずつデクリメントされる。ラン保持部233Aの連続数が0になるまで、ラン展開部234Aによって、保持されている画素値が対象画素の画素値として展開されると共に、復号不可を表わす制御データをID復号部230Aへ出力し、ID復号部230AによるID符号の取り出しを停止させる。   When the continuous number and the pixel value are decoded, the continuous number and the pixel value are held by the run holding unit 233A, and the pixel value held by the run holding unit 233A is the pixel value of the target pixel. And the continuous number of the run holding portions 233A is decremented by one. Until the number of consecutive runs in the run holding unit 233A becomes zero, the run developing unit 234A develops the held pixel value as the pixel value of the target pixel and outputs control data indicating that decoding is impossible to the ID decoding unit 230A. Then, ID code extraction by the ID decoding unit 230A is stopped.

ラン保持部233Aの連続数が0になると、ラン展開部234Aによる画素値の展開が停止し、ラン保持部233Aによって、復号可を表わす制御データをID復号部230Aへ出力し、ID復号部230AによるID符号の取り出し及びIDの復号を再開させる。   When the number of consecutive run holding units 233A becomes 0, the development of pixel values by the run developing unit 234A stops, and the run holding unit 233A outputs control data indicating that decoding is possible to the ID decoding unit 230A, and the ID decoding unit 230A. The extraction of the ID code and the decoding of the ID are resumed.

また、誤差が復号された場合には、逆予測部232Aによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Xの画素値を予測すると共に、復号された誤差Aを用いて、対象画素Xの画素値に伸張して出力する。   If the error is decoded, the inverse prediction unit 232A uses the pixel values of the reference pixel group around the target pixel group in the image data that has already been decompressed and output from the merge unit 26. The pixel value of the pixel X is predicted, and the decoded error A is used to expand and output the pixel value of the target pixel X.

また、伸張部224Bでは、対象画素群の奇数箇所の画素(先頭画素Xの次の画素)Yを対象画素として、ID復号部230Bによって、復号の可否を表わす制御データに応じて、符号ストリームから対象画素YのID符号を取り出し、ID符号を解釈する。そして、復号部231Bによって、符号ストリームから対象画素Yの符号を取り出し、ID符号の解釈結果に応じて、取り出した符号を、対象画素Yの誤差、又は連続数及び画素値に復号する。このとき、ID復号部230BによるID符号の解釈結果は、制御部232Bに出力される。   Further, in the decompression unit 224B, the odd-numbered pixel (the pixel next to the first pixel X) Y in the target pixel group is set as the target pixel, and the ID decoding unit 230B determines from the code stream according to control data indicating whether decoding is possible. The ID code of the target pixel Y is taken out and the ID code is interpreted. Then, the decoding unit 231B extracts the code of the target pixel Y from the code stream, and decodes the extracted code into the error of the target pixel Y, or the number of consecutive pixels and the pixel value according to the interpretation result of the ID code. At this time, the interpretation result of the ID code by the ID decoding unit 230B is output to the control unit 232B.

ID復号部230BでランIDであると解釈された場合には、制御部232Bによって、復号された連続数及び画素値をラン保持部233Bに受け渡す。   When the ID decoding unit 230B interprets the run ID, the control unit 232B passes the decoded continuous number and pixel value to the run holding unit 233B.

そして、ラン保持部233Bによって連続数及び画素値が保持され、ラン展開部234Bによって、ラン保持部233Bに保持されている画素値が、偶数箇所の画素の画素値として展開されると共に、ラン保持部233Bの連続数が1ずつデクリメントされる。ラン保持部233Bの連続数が0になるまで、ラン展開部234Bによって、保持されている画素値が、偶数箇所の画素の画素値として展開されると共に、復号不可を表わす制御データがID復号部230Bへ出力され、ID復号部230BによるID符号の取り出しが停止される。   The run holding unit 233B holds the continuous number and the pixel value, and the run developing unit 234B develops the pixel value held in the run holding unit 233B as the pixel value of the even-numbered pixel and holds the run. The number of consecutive parts 233B is decremented by one. Until the run holding unit 233B reaches zero, the run developing unit 234B develops the held pixel values as pixel values of even-numbered pixels, and the control data indicating that decoding cannot be performed is the ID decoding unit. 230B, and the ID decoding unit 230B stops taking out the ID code.

ラン保持部233Bの連続数が0になると、ラン展開部234Bによる画素値の展開が停止し、ラン保持部233Bによって、復号可を表わす制御データをID復号部230Bへ出力し、ID復号部230BによるID符号の取り出し及びIDの復号を再開させる。   When the number of consecutive run holding units 233B becomes 0, the development of pixel values by the run developing unit 234B stops, and the run holding unit 233B outputs control data indicating that decoding is possible to the ID decoding unit 230B, and the ID decoding unit 230B. The extraction of the ID code and the decoding of the ID are resumed.

また、ID復号部230AによってランIDであると解釈され、かつ、ID復号部230Bによって誤差IDであると解釈された場合には、制御部232Bによって、復号された誤差Bを逆予測部236Bに受け渡す。   When the ID decoding unit 230A interprets the run ID and the ID decoding unit 230B interprets the error ID, the control unit 232B sends the decoded error B to the inverse prediction unit 236B. Deliver.

そして、逆予測部236Bによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。   The inverse prediction unit 236B predicts the pixel value of the target pixel Y using the pixel values of the reference pixel group around the target pixel group from the image data that has already been decompressed and output from the merge unit 26. Using the decoded error B, the pixel value of the target pixel Y is expanded and output.

また、ID復号部230A及びID復号部230Bの双方によって誤差IDであると解釈された場合には、制御部232Bによって、復号部231Aより復号された誤差A、及び復号された誤差Bを逆予測部237Bに受け渡す。   In addition, when the error ID is interpreted by both the ID decoding unit 230A and the ID decoding unit 230B, the control unit 232B reversely predicts the error A decoded by the decoding unit 231A and the decoded error B. Delivered to part 237B.

そして、逆予測部237Bによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号部231Aにより復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。   Then, the pixel value of the reference pixel group around the target pixel group and the error A decoded by the decoding unit 231A among the image data already decompressed by the inverse prediction unit 237B and output from the merge unit 26 are used. Thus, the pixel value of the target pixel Y is predicted, and the decoded error B is used to expand the pixel value of the target pixel Y and output it.

そして、マージ部26によって、伸張部224A、224Bの各々から、伸張された対象画素群の偶数箇所の画素及び奇数箇所の画素の画素値を取得すると、取得した対象画素群の偶数箇所の画素及び奇数箇所の画素の画素値を結合して、画像データとして画像出力部28及び伸張部224A、224Bに出力する。   When the merge unit 26 acquires the pixel values of the even-numbered pixels and the odd-numbered pixels of the expanded target pixel group from each of the expansion units 224A and 224B, the even-numbered pixels of the acquired target pixel group and The pixel values of the odd-numbered pixels are combined and output as image data to the image output unit 28 and the decompression units 224A and 224B.

次に、画像伸張装置214の伸張部224A、224Bにおいて同期を取る場合のタイミングについて説明する。   Next, timing when synchronization is performed in the decompression units 224A and 224B of the image decompression device 214 will be described.

図9に示すように、伸張部224A、224Bの双方で誤差IDであると解釈され、伸張部224Bにおいて、逆予測部237Bによる逆予測を行う場合には、誤差Aの復号待ちが発生する可能性がある。   As shown in FIG. 9, when both the decompression units 224A and 224B interpret the error ID, and the decompression unit 224B performs reverse prediction by the inverse prediction unit 237B, waiting for decoding of the error A may occur. There is sex.

逆に、図10に示すように、伸張部224AでランIDであると解釈されると共に、伸張部224Bで誤差IDであると解釈され、逆予測部236Bによる逆予測を行う場合には、誤差A(Err1)を参照しないため、誤差Aの復号待ちは発生しない。   On the contrary, as shown in FIG. 10, when the decompression unit 224A interprets the run ID as well as the decompression unit 224B interprets the error ID and performs reverse prediction by the inverse prediction unit 236B, Since A (Err1) is not referred to, there is no waiting for error A to be decoded.

また、上記のいずれの場合にも、画素マージ待ちとID復号部230Aによる復号待ちは発生する。本実施の形態では、マージ部26は、伸張部224A、224Bから伸張された画素値が出力されるのを待つ。具体的には、対象画素群の画素X、Yの2画素の伸張が終了するまで待ち状態になる。   In any of the above cases, waiting for pixel merging and waiting for decoding by the ID decoding unit 230A occur. In the present embodiment, the merge unit 26 waits for the pixel values expanded from the expansion units 224A and 224B to be output. Specifically, the process waits until the expansion of the two pixels X and Y in the target pixel group is completed.

一般的に、ID復号や、誤差又はランの復号で、伸張部間の性能差はないため、待ち時間は小さいが、伸張部224A、224Bの復号部231A、231Bによる復号時間を揃え、ID復号部230A、230Bによる復号時間を揃えることが好ましい。また、伸張部224A、224Bのラン展開部234A、234B、逆予測部232A、236B、237Bの処理時間を揃えることが好ましい。   In general, there is no performance difference between decompression units in ID decoding or error or run decoding, so the waiting time is small, but the decoding times by the decoding units 231A and 231B of the decompression units 224A and 224B are aligned, and ID decoding is performed. It is preferable that the decoding times by the units 230A and 230B are made uniform. In addition, it is preferable to align the processing times of the run expansion units 234A and 234B and the inverse prediction units 232A, 236B, and 237B of the expansion units 224A and 224B.

以上説明したように、第2の実施の形態に係る画像圧縮伸張システムによれば、予測符号化とランレングス符号化とを組み合わせた符号化を行う場合であっても、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。   As described above, according to the image compression / decompression system according to the second embodiment, images are not decompressed in parallel even when encoding that combines predictive encoding and run-length encoding is performed. Compared to the case, images can be decompressed in parallel by the image decompression device without reducing the compression rate.

また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行うと共に、隣接する画素の画素値を参照して、画素値の連続数の計数を行っているので、圧縮率を低下させずに、画像データの圧縮、伸張を行うことができる。   Also, error calculation is performed using the pixel value or error value of the adjacent pixel, and the number of consecutive pixel values is counted by referring to the pixel value of the adjacent pixel. In addition, image data can be compressed and expanded.

次に、第3の実施の形態について説明する。なお、第1の実施の形態及び第2の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。   Next, a third embodiment will be described. In addition, about the part which becomes the same structure as 1st Embodiment and 2nd Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.

第3の実施の形態では、画素値の連続数の計数を、画素の偶数箇所及び奇数箇所で分けずに、スキャンライン順に行っている点が、第2の実施の形態と主に異なっている。   The third embodiment is mainly different from the second embodiment in that the counting of the continuous number of pixel values is performed in the order of scan lines without dividing the even number and odd number of pixels. .

図11に示すように、第3の実施の形態に係る画像圧縮伸張システム310は、画像データを圧縮する画像圧縮装置312と、圧縮された画像データを伸張する画像伸張装置314とを備えている。   As shown in FIG. 11, an image compression / decompression system 310 according to the third embodiment includes an image compression device 312 that compresses image data and an image decompression device 314 that decompresses compressed image data. .

画像圧縮装置312は、画像入力部16と、画像入力部16から入力された画像データを圧縮して、符号の1シンボル毎に分けて出力する圧縮部318と、偶数番目に出力された符号からなる符号ストリームを出力する符号出力部318Aと、奇数番目に出力された符号からなる符号ストリームを出力する符号出力部318Bとを備えている。   The image compression device 312 compresses the image data input from the image input unit 16, the image data input from the image input unit 16, and outputs the compressed data for each symbol of the code, and the code output from the even-numbered code. A code output unit 318A that outputs a code stream, and a code output unit 318B that outputs a code stream consisting of odd-numbered codes.

圧縮部318は、スキャンライン順に、対象画素を設定し、直前の画素の画素値と一致すれば、ランレングス符号化(連長圧縮符号化)を行って、直前の画素と順々に比較して連続数を計数すると共に、連続する画素値を出力し、一致しない場合には、連続数0を出力するラン計数部319と、直前の画素の画素値と一致しない場合に、上記第1の実施の形態と同様に、対象画素の画素値を予測すると共に、予測された画素値と実際の画素値との誤差を算出する予測部320と、連続数0が出力された場合、誤差IDを表わすID符号を出力し、連続数が1以上である場合には、ランIDを表わすID符号を出力するID符号化部321と、ラン計数部319から出力されたラン(連続数及び画素値)、又は予測部320で算出された誤差に対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部322と、ID符号化部321からのID符号と符号化部322からの符号とを結合すると共に、結合された符号シンボル毎に分割して出力する分割部323とを備えている。   The compression unit 318 sets the target pixel in the scan line order, and if it matches the pixel value of the previous pixel, performs the run length encoding (continuous length compression encoding) and sequentially compares with the previous pixel. And the continuous pixel value is output, and if the pixel values do not coincide with each other, the run counter 319 for outputting the consecutive number 0 and the pixel value of the immediately preceding pixel do not coincide with each other. Similar to the embodiment, the prediction unit 320 predicts the pixel value of the target pixel and calculates the error between the predicted pixel value and the actual pixel value. When an ID code representing a run ID is 1 or more, an ID encoding unit 321 that outputs an ID code representing a run ID and a run (continuous number and pixel value) output from the run counting unit 319 are output. Or the error calculated by the prediction unit 320 Then, an encoding unit 322 that performs variable-length encoding (for example, Huffman encoding) and converts each symbol into a code having a different number of bits, and an ID code and an encoding unit 322 from the ID encoding unit 321 And a dividing unit 323 that divides and outputs each combined code symbol.

分割部323は、0から開始するカウンタ(図示省略)を保持している。カウンタは、符号の1シンボルが入力されるタイミングでインクリメントされる。つまり、”ID符号+ラン符号”、もしくは”ID符号+誤差符号”が入力されるタイミングでインクリメントされる。分割部323は、カウンタが偶数の場合には、1シンボルの符号を符号出力部318Aへ出力し、カウンタが奇数の時には、1シンボルの符号を符号出力部318Bへ出力する。   The dividing unit 323 holds a counter (not shown) starting from 0. The counter is incremented at the timing when one symbol of the code is input. That is, “ID code + run code” or “ID code + error code” is incremented at the input timing. The division unit 323 outputs the code of one symbol to the code output unit 318A when the counter is an even number, and outputs the code of one symbol to the code output unit 318B when the counter is an odd number.

画像圧縮装置312では、圧縮部318によって、各対象画素Xに対して、画像データの予測符号化又はランレングス符号化が行われて、生成される符号が1シンボル毎に分割され、偶数番目及び奇数番目の各々に対応する符号ストリームが生成されて出力される。   In the image compression apparatus 312, the compression unit 318 performs predictive coding or run-length coding of the image data on each target pixel X, and the generated code is divided for each symbol. A code stream corresponding to each odd number is generated and output.

画像伸張装置314は、画像圧縮装置312から出力された偶数番目の符号に対する符号ストリームから、対象画素の画素値に伸張する伸張部324Aと、画像圧縮装置312から出力された奇数番目の符号に対する符号ストリームから、対象画素の画素値に伸張する伸張部324Bと、偶数番目の符号から伸張された画素の画素値と奇数番目の符号から伸張された画素の画素値とを並べるように結合して、画像データを生成するマージ部326と、画像出力部28とを備えている。なお、本実施の形態では、偶数番目の符号に対応する少なくとも1つの画素と、奇数番目の符号に対する少なくとも1つの画素とを、対象画素群とする。   The image expansion device 314 expands the code stream for the even-numbered code output from the image compression device 312 to the pixel value of the target pixel, and the code for the odd-numbered code output from the image compression device 312. From the stream, the expansion unit 324B that expands to the pixel value of the target pixel is combined with the pixel value of the pixel expanded from the even-numbered code and the pixel value of the pixel expanded from the odd-numbered code so as to be aligned, A merge unit 326 that generates image data and an image output unit 28 are provided. In the present embodiment, at least one pixel corresponding to the even-numbered code and at least one pixel corresponding to the odd-numbered code are set as a target pixel group.

伸張部324Aは、画像圧縮装置312から出力された偶数番目の符号に対する符号ストリームが入力される符号入力部329Aと、符号入力部329Aから入力された符号ストリームから、偶数番目の符号のID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部330Aと、ID復号部330AによるIDの解釈結果に応じて、符号ストリームから、偶数番目の符号の誤差A、又はランA(連続数及び画素値)を復号する復号部331Aと、逆予測部232Aと、復号部331Aから連続数及び画素値が復号された場合、画素値を、連続数に応じて展開するラン展開部334Aとを備えている。   The decompression unit 324A receives the ID code of the even-numbered code from the code input unit 329A to which the code stream for the even-numbered code output from the image compression device 312 is input and the code stream input from the code input unit 329A. The ID decoding unit 330A that interprets whether the ID is a run ID or an error ID, and the error A or the run of the even-numbered code from the code stream according to the ID interpretation result by the ID decoding unit 330A A decoding unit 331A that decodes A (continuous number and pixel value), an inverse prediction unit 232A, and a run expansion that expands a pixel value according to the continuous number when the continuous number and pixel value are decoded from the decoding unit 331A Part 334A.

伸張部324Bは、画像圧縮装置312から出力された奇数番目の符号に対する符号ストリームが入力される符号入力部329Bと、符号入力部329Bから入力された符号ストリームから、奇数番目の符号のID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部330Bと、ID復号部230BによるIDの解釈結果に応じて、符号ストリームから、奇数番目の符号の誤差B、又はランB(連続数及び画素値)を復号する復号部331Bと、ID復号部330AによるIDの解釈結果、及びID復号部330BによるIDの解釈結果に基づいて、ラン展開又は逆予測処理を切り替える制御部332Bを備えている。   The decompression unit 324B receives the ID code of the odd number code from the code input unit 329B to which the code stream for the odd number code output from the image compression device 312 is input and the code stream input from the code input unit 329B. An ID decoding unit 330B that interprets whether the ID is a run ID or an error ID, and an error B or a run of an odd-numbered code from the code stream according to an ID interpretation result by the ID decoding unit 230B. A decoding unit 331B that decodes B (continuous number and pixel value), and a control unit that switches between run expansion or reverse prediction processing based on an ID interpretation result by the ID decoding unit 330A and an ID interpretation result by the ID decoding unit 330B 332B is provided.

また、伸張部324Bは、ID復号部330AでランIDであると解釈され、かつ、ID復号部330BでランIDであると解釈された場合に、復号部331Bにより復号された連続数及び画素値に基づいて、奇数番目の符号に対応する対象画素(直前の偶数番目の符号に対応する先頭画素からランAの連続数分離れた画素以降の複数の画素)Yrの画素値として、復号された画素値を連続数に応じて展開するラン展開部334Bと、ID復号部330Aで誤差IDであると解釈され、かつ、ID復号部330BでランIDであると解釈された場合に、復号部331Bにより復号された連続数及び画素値に基づいて、奇数番目の符号に対応する対象画素(直前の偶数番目の符号に対応する画素に続く複数の画素)Yの画素値として、復号された画素値を連続数に応じて展開するラン展開部335Bと、ID復号部330AでランIDであると解釈され、かつ、ID復号部330Bで誤差IDであると解釈された場合に、既に伸張された対象画素群の周辺の参照画素群の画素値から奇数番目の符号に対応する対象画素(直前の偶数番目の符号に対応する先頭画素からランAの連続数分離れた画素)Yrの画素値を逆予測すると共に、復号された対象画素Yrの誤差Bと逆予測された対象画素Yrの画素値とから、対象画素Yrの画素値に伸張する逆予測部336Bと、逆予測部237Bとを備えている。   The decompression unit 324B interprets the run ID as the run ID in the ID decoding unit 330A and interprets the run ID as the run ID in the ID decoding unit 330B, and the continuous number and the pixel value decoded by the decoding unit 331B. Based on the target pixel corresponding to the odd-numbered code (a plurality of pixels subsequent to the first pixel corresponding to the even-numbered code immediately before the pixel separated by the continuous number of run A) is decoded as the pixel value of Yr When a run expansion unit 334B that expands a pixel value according to the number of consecutive values is interpreted as an error ID by the ID decoding unit 330A and is interpreted as a run ID by the ID decoding unit 330B, the decoding unit 331B Is decoded as the pixel value of the target pixel corresponding to the odd-numbered code (a plurality of pixels following the pixel corresponding to the immediately preceding even-numbered code) Y based on the number of consecutive pixels and the pixel value decoded by The run expansion unit 335B that expands the pixel value according to the continuous number and the ID decoding unit 330A interprets it as a run ID and the ID decoding unit 330B interprets it as an error ID. The pixel value of the target pixel corresponding to the odd-numbered code from the pixel values of the reference pixel group around the target pixel group (the pixel separated from the first pixel corresponding to the immediately preceding even-numbered code by the number of consecutive runs A) Yr Are inversely predicted, and the inverse prediction unit 336B and the inverse prediction unit 237B are expanded from the decoded error B of the target pixel Yr and the inversely predicted pixel value of the target pixel Yr to the pixel value of the target pixel Yr. I have.

なお、復号部331A、331Bが、本発明の並列復号手段に対応し、ラン展開部334A、334B、335B、逆予測部232A、336B、237Bが、本発明の展開手段に対応している。 Note that the decoding units 331A and 331B correspond to the parallel decoding unit of the present invention, and the run expansion units 334A, 334B and 335B, and the inverse prediction units 232A, 336B and 237B correspond to the expansion unit of the present invention.

制御部332Bは、伸張部324Aより復号されたランA(連続数及び画素値)又は誤差Aが入力され、図12に示すような、ID復号部230AによるIDの解釈結果、及びID復号部330BによるIDの解釈結果のパターンに応じて、復号されたランA、誤差A、誤差B、並びに、ランB(連続数及び画素値)の少なくとも1つを、ラン展開部334B、ラン展開部335B、逆予測部336B、及び逆予測部237Bの何れか1つに受け渡す。   The control unit 332B receives the run A (continuous number and pixel value) or error A decoded from the decompression unit 324A, the ID interpretation result by the ID decoding unit 230A as shown in FIG. 12, and the ID decoding unit 330B. In accordance with the pattern of the interpretation result of the ID by the at least one of the decoded run A, error A, error B, and run B (continuous number and pixel value), a run development unit 334B, a run development unit 335B, The data is transferred to any one of the inverse prediction unit 336B and the inverse prediction unit 237B.

ラン展開部334Bは、偶数番目の符号に対応する先頭画素XからランAの連続数だけ離れた画素Yrから、ランBの連続数だけ画素値を展開する。   The run development unit 334B develops pixel values for the number of consecutive runs B from the pixel Yr that is separated from the first pixel X corresponding to the even-numbered code by the number of continuous runs A.

ラン展開部335Bは、偶数番目の符号に対応する画素Xの次の対象画素Yから、ランBの連続数だけ画素値を展開する。   The run development unit 335B develops the pixel values by the number of consecutive runs B from the target pixel Y next to the pixel X corresponding to the even-numbered code.

逆予測部336Bは、偶数番目の符号に対応する先頭画素XからランAの連続数だけ離れた画素Yrを対象画素として、先頭画素Xに対して復号されたランAの画素値(画素Aの画素値)と、対象画素群X〜Yrの周辺の参照画素群(画素B、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err2とに基づいて、対象画素Yrの画素値を算出する。
Yr=Err2+(A+D−B)
The inverse predicting unit 336B sets the pixel value of the run A decoded from the head pixel X (the pixel A of the pixel A) with the pixel Yr separated from the head pixel X corresponding to the even-numbered code by the continuous number of the run A as the target pixel. Pixel value) and the pixel values of the reference pixel groups (pixels B and D) around the target pixel group X to Yr, the pixel value is inversely predicted according to the following formula, and the inversely predicted pixel value is The pixel value of the target pixel Yr is calculated based on the decoded error Err2.
Yr = Err2 + (A + D−B)

マージ部326は、伸張部324A、324Bから出力される画素値で同期する。つまり、本実施の形態では、伸張部324A、324Bの各々が、符号シンボル”誤差ID+誤差符号”又は”ランID+ラン符号”の伸張タイミングで同期している。   The merge unit 326 synchronizes with the pixel values output from the decompression units 324A and 324B. That is, in the present embodiment, each of the expansion units 324A and 324B is synchronized with the expansion timing of the code symbol “error ID + error code” or “run ID + run code”.

画像伸張装置314では、伸張部324A、324Bによって、偶数番目の符号に対する画素及び奇数番目の符号に対する画素に対して、誤差値、又は連続数及び画素値の復号が並列に行われると共に、画素値の逆予測及び伸張、又は展開が並列に行われて、偶数番目の符号に対する画素及び奇数番目の符号に対する画素の画素値が出力される。   In the image decompression device 314, the decompression units 324A and 324B decode the error value or the continuous number and the pixel value in parallel with respect to the pixels corresponding to the even-numbered code and the pixels corresponding to the odd-numbered code. Are performed in parallel, and pixel values of pixels for even-numbered codes and pixels for odd-numbered codes are output.

画像入力部16、圧縮部318、符号出力部318A、318B、伸張部324A、伸張部324B、マージ部326、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。   The image input unit 16, the compression unit 318, the code output units 318A and 318B, the expansion unit 324A, the expansion unit 324B, the merge unit 326, and the image output unit 28 are one or a plurality of computers that implement the functions of the respective units, or 1 It can consist of one or more electronic circuits.

次に、第3の実施の形態に係る画像圧縮伸張システム310の作用を説明する。   Next, the operation of the image compression / decompression system 310 according to the third embodiment will be described.

まず、画像圧縮装置312において、画像入力部16から画像データが入力されると、圧縮部318によって、画像データの対象画素の各々について、予測符号化又はランレングス符号化を行い、偶数番目の符号と奇数番目の符号として分けて符号が出力される。また、符号出力部318Aによって、偶数番目の符号からなる符号ストリームが出力され、符号出力部318Bによって、奇数番目の符号からなる符号ストリームが出力される。   First, in the image compression apparatus 312, when image data is input from the image input unit 16, the compression unit 318 performs predictive encoding or run-length encoding on each target pixel of the image data, and the even-numbered code. The codes are output separately as odd-numbered codes. The code output unit 318A outputs a code stream composed of even-numbered codes, and the code output unit 318B outputs a code stream composed of odd-numbered codes.

このとき、圧縮部318では、対象画素の直前の画素の画素値と比較して、画素値が一致する場合には、ラン計数部319によって、直前の画素の画素値と順々に比較して、連続数を計数し、ラン(連続数及び連続する画素値)を出力する。   At this time, the compression unit 318 compares the pixel value of the pixel immediately before the target pixel with each other and sequentially compares the pixel value of the previous pixel with the run counting unit 319 when the pixel values match. , Count the number of consecutive, and output a run (number of consecutive and continuous pixel value).

一方、対象画素の直前の画素の画素値と比較して、画素値が一致しない場合には、ラン計数部319によって、連続数0を出力すると共に、予測部320によって、画像データにおける対象画素の周辺の画素の画素値を用いて、対象画素の画素値を予測すると共に、対象画素の実際の画素値との誤差を算出して、出力する。   On the other hand, when the pixel values do not match with the pixel value of the pixel immediately before the target pixel, the run counting unit 319 outputs the continuation number 0, and the prediction unit 320 outputs the target pixel of the image data. The pixel value of the target pixel is predicted using the pixel values of the surrounding pixels, and an error from the actual pixel value of the target pixel is calculated and output.

ラン計数部319より連続数0が出力された場合、ID符号化部321によって、誤差IDを表わすID符号を出力し、また、符号化部322によって、予測部320から出力された誤差をハフマン符号化によって符号化して、誤差符号を出力する。   When run number 0 is output from run counting unit 319, ID encoding unit 321 outputs an ID code representing an error ID, and encoding unit 322 outputs the error output from prediction unit 320 to a Huffman code. And an error code is output.

また、ラン計数部319より1以上の連続数が出力された場合、ID符号化部321によって、ランIDを表わすID符号を出力し、また、符号化部322によって、ラン計数部319から出力されたラン(連続数及び画素値)をハフマン符号化によって符号化して、ラン符号を出力する。   When the run counting unit 319 outputs a continuous number of 1 or more, the ID encoding unit 321 outputs an ID code representing a run ID, and the encoding unit 322 outputs the run code from the run counting unit 319. The run (number of consecutive and pixel value) is encoded by Huffman coding and a run code is output.

そして、分割部323は、ID符号化部321より出力されたID符号と符号化部322より出力されたラン符号又は誤差符号とを結合して1シンボルとすると共に、シンボル数をカウントし、偶数番目の符号と奇数番目の符号とに分けて符号を出力する。   The dividing unit 323 combines the ID code output from the ID encoding unit 321 and the run code or error code output from the encoding unit 322 into one symbol and counts the number of symbols. The code is output separately for the first code and the odd code.

符号出力部318Aでは、偶数番目の符号に対応する符号ストリームを出力し、符号出力部318Bでは、奇数番目の符号に対応する符号ストリームを出力する。   The code output unit 318A outputs a code stream corresponding to the even-numbered code, and the code output unit 318B outputs a code stream corresponding to the odd-numbered code.

次に、画像伸張装置314において、画像圧縮装置312から出力された、偶数番目の符号に対応する符号ストリームと奇数番目の符号に対応する符号ストリームとが入力されると、伸張部324A、324Bによって、画像データの偶数番目の符号に対応する対象画素及び奇数番目の符号に対応する対象画素の各々について、誤差、又は連続数及び画素値を並列に復号すると共に、逆予測及び伸張、又はラン展開を並列に行って、画素値を各々出力する。   Next, when the code stream corresponding to the even-numbered code and the code stream corresponding to the odd-numbered code output from the image compression apparatus 312 are input to the image expansion device 314, the expansion units 324A and 324B In addition, for each of the target pixel corresponding to the even-numbered code and the target pixel corresponding to the odd-numbered code of the image data, the error or the continuous number and the pixel value are decoded in parallel, and inverse prediction and expansion or run expansion is performed. Are performed in parallel, and each pixel value is output.

このとき、伸張部324Aでは、ID復号部330Aによって、符号ストリームから偶数番目の符号のID符号を取り出し、ID符号を解釈する。そして、復号部331Aによって、ID符号の解釈結果に応じて、符号ストリームから誤差符号又はラン符号を取り出し、誤差A、又はランA(連続数及び画素値)に復号する。このとき、ID復号部330AによるID符号の解釈結果及び復号部331Aにより復号された誤差A又はランAは、制御部332Bに出力される。   At this time, in the decompression unit 324A, the ID decoding unit 330A extracts the ID code of the even-numbered code from the code stream and interprets the ID code. Then, the decoding unit 331A extracts an error code or a run code from the code stream according to the interpretation result of the ID code, and decodes it into an error A or a run A (continuous number and pixel value). At this time, the interpretation result of the ID code by the ID decoding unit 330A and the error A or the run A decoded by the decoding unit 331A are output to the control unit 332B.

連続数及び画素値が復号された場合には、ラン展開部334Aによって、復号された画素値が、連続数分だけ展開される。これによって、偶数番目の符号に対応する画素の各々の画素値が伸張される。   When the continuous number and the pixel value are decoded, the run expansion unit 334A expands the decoded pixel value by the continuous number. As a result, the pixel values of the pixels corresponding to the even-numbered codes are expanded.

また、誤差が復号された場合には、逆予測部232Aによって、既に伸張されてマージ部326から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素の画素値を予測すると共に、復号された誤差Aを用いて、対象画素の画素値に伸張して出力する。   Further, when the error is decoded, the image data already decompressed by the inverse prediction unit 232A and output from the merge unit 326 is used as the target pixel values of the reference pixel group around the target pixel group. While predicting the pixel value of the pixel, using the decoded error A, the pixel value of the target pixel is expanded and output.

また、伸張部324Bでは、ID復号部330Bによって、符号ストリームから奇数番目の符号のID符号を取り出し、ID符号を解釈する。そして、復号部331Bによって、ID符号の解釈結果に応じて、符号ストリームから奇数番目の符号の誤差符号又はラン符号を取り出し、誤差B又はランB(連続数及び画素値)に復号する。このとき、ID復号部330BによるID符号の解釈結果、及び復号部331Bより復号された誤差B又はランBは、制御部332Bに出力される。   In the decompression unit 324B, the ID decoding unit 330B extracts an odd-numbered ID code from the code stream and interprets the ID code. Then, the decoding unit 331B extracts an error code or run code of an odd-numbered code from the code stream in accordance with the interpretation result of the ID code, and decodes it into an error B or run B (continuous number and pixel value). At this time, the interpretation result of the ID code by the ID decoding unit 330B and the error B or run B decoded by the decoding unit 331B are output to the control unit 332B.

ID復号部330A及びID復号部330Bの双方でランIDであると解釈された場合には、制御部332Bによって、復号されたランAと復号されたランBとを、ラン展開部334Bに受け渡す。そして、ラン展開部334Bによって、対象画素群の先頭画素XからランAの連続数分だけ離れた画素Yr以降の画素の画素値として、ランBの画素値が連続数分だけ展開される。   When both the ID decryption unit 330A and the ID decryption unit 330B interpret it as a run ID, the control unit 332B delivers the decrypted run A and the decrypted run B to the run expansion unit 334B. . Then, the run development unit 334B develops the pixel values of the run B by the continuous number as the pixel values of the pixels after the pixel Yr that is separated from the first pixel X of the target pixel group by the continuous number of the run A.

また、ID復号部330Aによって誤差IDであると解釈され、かつ、ID復号部330BによってランIDであると解釈された場合には、制御部332Bによって、復号されたランBをラン展開部335Bに受け渡す。そして、ラン展開部335Bによって、対象画素群の先頭画素Xの次の対象画素Y以降の画素の画素値として、ランBの画素値が連続数分だけ展開される。   If the ID decoding unit 330A interprets the error ID and the ID decoding unit 330B interprets it as a run ID, the control unit 332B sends the decoded run B to the run expansion unit 335B. Deliver. Then, the run expansion unit 335B expands the pixel values of the run B by the continuous number as the pixel values of the pixels after the target pixel Y next to the first pixel X of the target pixel group.

また、ID復号部330AによってランIDであると解釈され、かつ、ID復号部330Bによって誤差IDであると解釈された場合には、制御部332Bによって、復号されたランA及び復号された誤差Bを逆予測部336Bに受け渡す。   When the ID decoding unit 330A interprets the run ID and the ID decoding unit 330B interprets the error ID, the control unit 332B decodes the decoded run A and the decoded error B. Is transferred to the inverse prediction unit 336B.

そして、逆予測部336Bによって、既に伸張されてマージ部326から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、ランAの画素値とを用いて、対象画素群の先頭画素XからランAの連続数分だけ離れた対象画素Yrの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yrの画素値に伸張して出力する。   Then, among the image data already decompressed by the inverse prediction unit 336B and output from the merge unit 326, the pixel value of the reference pixel group around the target pixel group and the pixel value of the run A are used. The pixel value of the target pixel Yr that is separated from the first pixel X of the group by a continuous number of runs A is predicted, and the decoded error B is used to expand and output the pixel value of the target pixel Yr.

また、ID復号部330A及びID復号部330Bの双方によって誤差IDであると解釈された場合には、制御部332Bによって、復号部331Aより復号された誤差A、及び復号された誤差Bを逆予測部237Bに受け渡す。   In addition, when both of the ID decoding unit 330A and the ID decoding unit 330B interpret the error ID, the control unit 332B performs reverse prediction on the error A decoded by the decoding unit 331A and the decoded error B. Delivered to part 237B.

そして、逆予測部237Bによって、既に伸張されてマージ部326から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。   Then, using the pixel values of the reference pixel group around the target pixel group and the decoded error A in the image data that has already been decompressed by the inverse prediction unit 237B and output from the merge unit 326, the target pixel While predicting the pixel value of Y, the decoded error B is used to expand the pixel value of the target pixel Y and output it.

そして、マージ部326によって、伸張部324A、324Bの各々から、伸張された、偶数番目の符号及び奇数番目の符号に対応する各画素の画素値を取得すると、取得した各画素の画素値を結合して、画像データとして画像出力部28及び伸張部324A、324Bに出力する。   Then, when the merge unit 326 obtains the pixel values of the pixels corresponding to the even-numbered code and the odd-numbered code from each of the decompression units 324A and 324B, the pixel values of the obtained pixels are combined. Then, the image data is output to the image output unit 28 and the decompression units 324A and 324B.

次に、画像伸張装置314の伸張部324A、324Bにおいて同期を取る場合のタイミングについて説明する。   Next, timing when synchronization is performed in the decompression units 324A and 324B of the image decompression apparatus 314 will be described.

図13に示すように、伸張部324Aにおいて復号されるID符号が、ランIDである場合には、伸張部324Bにおいて、ランAの復号待ちが発生する。   As shown in FIG. 13, when the ID code decoded in the decompression unit 324A is a run ID, the decompression unit 324B waits for decoding of run A.

また、図14に示すように、伸張部324A、324Bの双方において復号されるID符号が、誤差IDであり、伸張部324Bにおいて逆予測処理を行う場合には、伸張部324Bにおいて、誤差Aの復号待ちが発生する。   As shown in FIG. 14, when the ID code decoded in both of the decompression units 324A and 324B is an error ID, and the inverse prediction process is performed in the decompression unit 324B, the decompression unit 324B Decoding wait occurs.

また、上記のいずれの場合にも、画素マージ待ちとID復号部330AによるID復号待ちは発生する。マージ部326は、伸張部324A、324Bの各々から伸張された画素値が出力されるのを待つ。   In any of the above cases, waiting for pixel merge and waiting for ID decoding by the ID decoding unit 330A occur. The merge unit 326 waits for output of the expanded pixel value from each of the expansion units 324A and 324B.

以上説明したように、第3の実施の形態に係る画像圧縮伸張システムによれば、予測符号化及びランレングス符号化を組み合わせた符号化を行う場合であっても、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。   As described above, according to the image compression / decompression system according to the third embodiment, even when encoding is performed in combination with predictive encoding and run-length encoding, images are not expanded in parallel. Compared to the above, images can be decompressed in parallel by the image decompression device without lowering the compression rate.

また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行うと共に、隣接する画素の画素値を参照して、画素値の連続数の計数を行っているので、圧縮率を低下させずに、画像データの圧縮、伸張を行うことができる。   Also, error calculation is performed using the pixel value or error value of the adjacent pixel, and the number of consecutive pixel values is counted by referring to the pixel value of the adjacent pixel. In addition, image data can be compressed and expanded.

次に、第4の実施の形態について説明する。なお、第1の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。   Next, a fourth embodiment will be described. In addition, about the part which becomes the structure similar to 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.

第4の実施の形態では、符号の長さが等長になるように誤差を符号化している点が第1の実施の形態と主に異なっている。   The fourth embodiment is mainly different from the first embodiment in that errors are encoded so that the lengths of the codes are equal.

第4の実施の形態に係る画像圧縮装置では、1つの圧縮部で、スキャンライン順に、対象画素を設定して、画素値の誤差を算出し、符号化部によって、誤差に対して等長符号化を行い、1つの符号ストリームとして出力する。   In the image compression apparatus according to the fourth embodiment, a single compression unit sets target pixels in the order of scan lines, calculates an error in pixel value, and an encoding unit encodes an equal length code for the error. And output as one code stream.

符号化部では、ブロック中での最悪ビット数で各符号をパッキングする。例えば、図15に示すように、4画素分の4つの誤差を表わす符号の中で最も悪いビット長を求めて、各符号をパッキングする。圧縮時のビット数はヘッダに記載しておく。以後、4誤差を表わす4つの符号とヘッダ符号とを含めてブロックと呼ぶことにする.
画像伸張装置の伸張部24Aでは、復号部30Aによって、入力された1つの符号ストリームから、ブロックのヘッダを参照して、対象画素群の先頭画素の符号を切り出す。また、伸張部24Bにおいても同様に、復号部30Bによって、入力された1つの符号ストリームから、ブロックのヘッダを参照して、対象画素群の先頭画素の次の対象画素の符号を切り出す。これによって、対象画素群の各画素の誤差が、並列に復号される。
The encoding unit packs each code with the worst number of bits in the block. For example, as shown in FIG. 15, the worst bit length among codes representing four errors for four pixels is obtained, and each code is packed. The number of bits at the time of compression is described in the header. Hereinafter, a block including four codes representing four errors and a header code is called a block.
In the decompression unit 24A of the image decompression apparatus, the decoding unit 30A extracts the code of the first pixel of the target pixel group from the input one code stream with reference to the block header. Similarly, in the decompression unit 24B, the decoding unit 30B extracts the code of the target pixel next to the first pixel of the target pixel group from the input one code stream with reference to the block header. Thereby, the error of each pixel of the target pixel group is decoded in parallel.

また、伸張部24A、24Bでは、ヘッダに基づいて、次ブロックまでの距離が特定されるため、複数のブロックが並列的に伸張される。   In addition, since the extension units 24A and 24B specify the distance to the next block based on the header, a plurality of blocks are extended in parallel.

なお、本実施の形態は、上記の第2の実施の形態及び第3の実施の形態のように、予測符号化とランレングス符号化とを組み合わせた符号化を行う場合に適用してもよい。   Note that this embodiment may be applied to a case where encoding is performed by combining predictive encoding and run-length encoding, as in the second and third embodiments. .

次に、第5の実施の形態について説明する。なお、第1の実施の形態及び第2の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。   Next, a fifth embodiment will be described. In addition, about the part which becomes the same structure as 1st Embodiment and 2nd Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.

第5の実施の形態では、コンテクストベースの予測符号化を用いて、画像データの圧縮、伸張を行っている点が、第1の実施の形態と主に異なっている。   The fifth embodiment is mainly different from the first embodiment in that image data is compressed and decompressed using context-based predictive coding.

図16に示すように、第5の実施の形態に係る画像圧縮伸張システム510は、画像データを圧縮する画像圧縮装置512と、圧縮された画像データを伸張する画像伸張装置514とを備えている。   As shown in FIG. 16, an image compression / decompression system 510 according to the fifth embodiment includes an image compression device 512 that compresses image data and an image decompression device 514 that decompresses the compressed image data. .

画像圧縮装置512は、画像入力部16と、画像入力部16から入力された画像データを圧縮して、偶数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部518Aと、画像入力部16から入力された画像データを圧縮して、奇数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部518Bとを備えている。   The image compression apparatus 512 includes an image input unit 16, a compression unit 518A that compresses the image data input from the image input unit 16 and outputs a code stream including codes that appear at even-numbered pixels, and an image input unit A compression unit 518B that compresses the image data input from 16 and outputs a code stream including codes that appear at odd-numbered pixels.

圧縮部518Aは、予測部20Aと、偶数箇所の画素を対象画素として、対象画素の周辺の画素群の画素値に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部520Aと、選択された符号表を用いて、予測部20Aで算出された誤差Aに対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部522Aと、符号化部522Aからの符号を、偶数箇所の画素に対する符号ストリームとして出力する符号出力部523Aとを備えている。   The compression unit 518A determines the context based on the prediction unit 20A and the pixel value of the pixel group around the target pixel, with the even-numbered pixels as target pixels, and selects a code table corresponding to the context. Using the unit 520A and the selected code table, variable length coding (for example, Huffman coding) is performed on the error A calculated by the prediction unit 20A, and codes with different numbers of bits are generated for each symbol. And a code output unit 523A that outputs the code from the coding unit 522A as a code stream for even-numbered pixels.

圧縮部518Bは、予測部20Bと、奇数箇所の画素を対象画素として、対象画素の周辺の画素群の画素値に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部520Bと、選択された符号表を用いて、予測部20Bで算出された誤差Bに対して、ハフマン符号化を行って、シンボル毎に、異なるビット数の符号に変換する符号化部522Bと、符号化部522Bからの符号を、奇数箇所の画素に対する符号ストリームとして出力する符号出力部523Bとを備えている。   The compression unit 518B uses the prediction unit 20B and the odd-numbered pixels as the target pixels to determine the context based on the pixel values of the surrounding pixel group of the target pixel and to select a code table according to the context 520B and an encoding unit 522B that performs Huffman coding on the error B calculated by the prediction unit 20B using the selected code table, and converts the code into a code having a different number of bits for each symbol. A code output unit 523B that outputs the code from the encoding unit 522B as a code stream for odd-numbered pixels.

コンテクストモデル部520Aは、対象画素の周辺の画素群の画素値に基づいて、コンテクスト番号の決定を行い、決定されたコンテクスト番号に応じた符号表の選択を行う。標準可逆圧縮JPEG‐LSを例に挙げると、図17に示すような勾配検出処理が行われることにより、対象画素Xに対して以下に式に従って勾配D1、D2、D3が検出され、検出された勾配状況に応じてコンテクスト番号が決定され、符号表が選択される。なお、本実施の形態では、符号表が2種類用意されている場合を例に説明する。
D1=d−b
D2=b−c
D3=c−a
The context model unit 520A determines the context number based on the pixel values of the surrounding pixel group of the target pixel, and selects a code table according to the determined context number. Taking standard reversible compression JPEG-LS as an example, gradient D1, D2, and D3 are detected and detected for the target pixel X according to the following equation by performing gradient detection processing as shown in FIG. A context number is determined according to the gradient situation, and a code table is selected. In this embodiment, a case where two types of code tables are prepared will be described as an example.
D1 = db
D2 = b−c
D3 = c−a

また、コンテクストモデル部520Bでは、同様に、勾配検出処理が行われることにより、対象画素Yに対して以下に式に従って勾配D1、D2、D3が検出され、検出された勾配状況に応じてコンテクスト番号が決定され、符号表が選択される。
D1=e−d
D2=d−b
D3=b−x
Similarly, in the context model unit 520B, the gradient detection processing is performed, so that gradients D1, D2, and D3 are detected for the target pixel Y according to the following formula, and the context number is determined according to the detected gradient state. Is determined and a code table is selected.
D1 = ed
D2 = db
D3 = b−x

画像圧縮装置512では、圧縮部518A、518Bによって、対象画素群X、Yに対して、並列に画像データの予測符号化が行われ、各々によって生成される符号によって、偶数箇所及び奇数箇所の各々に対応する符号ストリームが生成されて出力される。   In the image compression apparatus 512, the compression units 518A and 518B perform predictive encoding of the image data on the target pixel groups X and Y in parallel, and each of the even-numbered places and the odd-numbered places is generated by the codes generated by each. A code stream corresponding to is generated and output.

画像伸張装置514は、画像圧縮装置512から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素の画素値に伸張する伸張部524Aと、画像圧縮装置512から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素の画素値に伸張する伸張部524Bと、マージ部26と、画像出力部28とを備えている。   The image expansion device 514 expands the code stream for the even-numbered pixels output from the image compression device 512 to the pixel value of the target pixel at the even-numbered location, and the odd-numbered portions output from the image compression device 512. The image processing apparatus includes an expansion unit 524B, a merge unit 26, and an image output unit 28 that expand the pixel stream of the pixel to the pixel value of an odd-numbered target pixel.

伸張部524Aは、符号入力部229Aと、既に伸張された対象画素の周辺の画素群の画素値に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部530Aと、選択された符号表に応じて、符号入力部229Aから入力された符号ストリームから、偶数箇所の対象画素の誤差Aを復号する復号部531Aと、逆予測部32Aとを備えている。   The decompression unit 524A determines a context based on the code input unit 229A, the pixel values of the surrounding pixel group of the target pixel that has already been decompressed, and selects a code table according to the context. According to the selected code table, a decoding unit 531A that decodes the error A of the target pixel at an even number from the code stream input from the code input unit 229A and an inverse prediction unit 32A are provided.

伸張部524Bは、符号入力部229Bと、符号入力部229Bから入力された符号ストリームから、一方の種類の符号表に応じて、奇数箇所の対象画素Yの誤差Bの候補を復号する復号部531Bと、符号入力部229Bから入力された符号ストリームから、他方の種類の符号表に応じて、奇数箇所の対象画素Yの誤差Bの候補を復号する復号部531Cと、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、一方の種類の符号表に応じて復号された対象画素Yの誤差Bの候補と逆予測された対象画素Yの画素値とから、対象画素Yの画素値の候補に伸張する逆予測部532Bと、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、他方の種類の符号表に応じて復号された対象画素Yの誤差Bの候補と逆予測された対象画素Yの画素値とから、対象画素Yの画素値の候補に伸張する逆予測部532Cと、対象画素群の周辺の参照画素群の画素値と対象画素群の先頭画素Xの誤差Aに基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部534Bと、選択された符号表に応じて復号された誤差Bの候補を用いて伸張された画素値を選択して出力する選択部536Bとを備えている。   The decompression unit 524B decodes a candidate for the error B of the target pixel Y at an odd-numbered location from the code input unit 229B and the code stream input from the code input unit 229B according to one type of code table. A decoding unit 531C that decodes a candidate for error B of an odd number of target pixels Y from the code stream input from the code input unit 229B according to the other type of code table, and a target pixel group that has already been expanded The pixel value of the target pixel Y is reverse-predicted from the pixel values of the reference pixel group around the target pixel Y, and the target pixel Y is reverse-predicted with the error B candidate of the target pixel Y decoded according to the one type of code table The pixel value of the target pixel Y from the pixel value of the reference pixel group around the target pixel group that has already been expanded, and the inverse prediction unit 532B that expands the candidate pixel value of the target pixel Y from the pixel value of the target pixel Y With the other A reverse prediction unit 532C that expands a candidate for the pixel value of the target pixel Y from a candidate for the error B of the target pixel Y decoded according to the type of code table and a pixel value of the target pixel Y that is reverse predicted; Based on the pixel value of the reference pixel group around the pixel group and the error A of the first pixel X of the target pixel group, a context is determined, and a context model unit 534B that selects a code table corresponding to the context is selected. A selection unit 536B that selects and outputs a decompressed pixel value using the error B candidate decoded according to the code table.

なお、復号部531A、531B、531Cが、本発明の並列復号手段に対応し、コンテクストモデル部530A、534B、選択部536B、逆予測部32A、532B、532Cが、本発明の伸張手段に対応している。 The decoding units 531A, 531B, and 531C correspond to the parallel decoding unit of the present invention, and the context model units 530A and 534B, the selection unit 536B, and the inverse prediction units 32A, 532B, and 532C correspond to the decompressing unit of the present invention. ing.

コンテクストモデル部530Aは、コンテクストモデル部520Aと同様に、対象画素の周辺の画素群の画素値に基づいて、コンテクスト番号の決定を行い、決定されたコンテクスト番号に応じた符号表の選択を行う。   Similarly to the context model unit 520A, the context model unit 530A determines the context number based on the pixel values of the surrounding pixel group of the target pixel, and selects a code table corresponding to the determined context number.

コンテクストモデル部534Bでは、上記図17に示す勾配検出処理が行われることにより、対象画素Yに対して以下に式に従って勾配D1、D2、D3が検出され、検出された勾配状況に応じてコンテクスト番号が決定され、符号表が選択される。
D1=e−d
D2=d−b
D3=c−a−Err1
In the context model unit 534B, the gradient detection processing shown in FIG. 17 is performed, whereby gradients D1, D2, and D3 are detected for the target pixel Y according to the following equations, and the context number is determined according to the detected gradient state. Is determined and a code table is selected.
D1 = ed
D2 = db
D3 = ca-Err1

上記のD3を算出する式は、対象画素Yのコンテクスト算出に必要であったXを、逆予測で用いられるX=Err1+(A+B−C)を利用して消去した式となっている。   The expression for calculating D3 is an expression obtained by erasing X, which is necessary for calculating the context of the target pixel Y, using X = Err1 + (A + BC) used in reverse prediction.

画像伸張装置514では、伸張部524A、524Bによって、対象画素群X、Yに対して、誤差値の復号が並列に行われると共に、画素値の逆予測及び伸張が並列に行われて、対象画素群X、Yの画素値が出力される。   In the image decompression device 514, the decompression units 524A and 524B perform error value decoding on the target pixel groups X and Y in parallel, and inverse prediction and decompression of the pixel values are performed in parallel. The pixel values of groups X and Y are output.

画像入力部16、圧縮部518A、圧縮部518B、伸張部524A、伸張部524B、マージ部26、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。   The image input unit 16, the compression unit 518A, the compression unit 518B, the expansion unit 524A, the expansion unit 524B, the merge unit 26, and the image output unit 28 are one or a plurality of computers that realize the functions of the respective units, or one or a plurality of units. The electronic circuit can be configured.

次に、第5の実施の形態に係る画像圧縮伸張システム510の作用を説明する。   Next, the operation of the image compression / decompression system 510 according to the fifth embodiment will be described.

まず、画像圧縮装置512において、画像入力部16から画像データが入力されると、圧縮部518A、518Bによって、画像データの対象画素群の偶数箇所の対象画素及び奇数箇所の対象画素の各々について、並列にコンテクストベースの予測符号化を行い、別々の符号ストリームとして符号を出力する。   First, in the image compression apparatus 512, when image data is input from the image input unit 16, the compression units 518A and 518B respectively apply even-numbered target pixels and odd-numbered target pixels of the target pixel group of the image data. Context-based predictive coding is performed in parallel, and the codes are output as separate code streams.

このとき、圧縮部518Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、予測部20Aによって、画像データにおける対象画素Xの周辺の画素の画素値を用いて、対象画素Xの画素値を予測すると共に、対象画素Xの実際の画素値との誤差を算出して、出力する。また、コンテクストモデル部520Aによって、対象画素Xの周辺の画素群の画素値を用いて、コンテクストを決定し、決定されたコンテクストに応じた符号表を選択する。   At this time, the compression unit 518A uses the pixel values of the pixels around the target pixel X in the image data by the prediction unit 20A using the even-numbered pixels (first pixels) X of the target pixel group as target pixels. While predicting the pixel value of X, an error from the actual pixel value of the target pixel X is calculated and output. In addition, the context model unit 520A determines a context using the pixel values of the pixel group around the target pixel X, and selects a code table corresponding to the determined context.

そして、符号化部522Aによって、予測部20Aから出力された誤差を、選択された符号表に応じて符号化して、符号を出力する。また、符号出力部223Aによって、符号化部522Aより出力された符号を、偶数箇所に対応する符号ストリームとして出力する。   Then, the encoding unit 522A encodes the error output from the prediction unit 20A according to the selected code table, and outputs a code. Further, the code output unit 223A outputs the code output from the encoding unit 522A as a code stream corresponding to an even number of places.

また、圧縮部518Bでは、対象画素群の奇数箇所の画素Yを対象画素として、圧縮部518Aの各部と同様に動作する。   Further, the compression unit 518B operates in the same manner as each unit of the compression unit 518A with the pixel Y at an odd number in the target pixel group as the target pixel.

次に、画像伸張装置514において、画像圧縮装置512から出力された、偶数箇所の画素に対応する符号ストリームと奇数箇所の画素に対応する符号ストリームとが入力されると、伸張部524A、524Bによって、画像データの対象画素群の偶数箇所の対象画素X及び奇数箇所の対象画素Yの各々について、誤差を並列に復号すると共に、逆予測及び伸張を並列に行って、画素値を各々出力する。   Next, when the code stream corresponding to even-numbered pixels and the code stream corresponding to odd-numbered pixels output from the image compression apparatus 512 are input to the image expansion device 514, the expansion units 524A and 524B For each of the even-numbered target pixel X and the odd-numbered target pixel Y in the target pixel group of the image data, the error is decoded in parallel, and inverse prediction and expansion are performed in parallel to output the pixel values.

このとき、伸張部524Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、コンテクストモデル部530Aによって、既に伸張された対象画素Xの周辺の画素群の画素値に基づいて、コンテクストを決定し、決定されたコンテクストに応じた符号表を選択する。   At this time, the expansion unit 524A sets the even-numbered pixel (first pixel) X of the target pixel group as the target pixel based on the pixel values of the pixel group around the target pixel X that has already been expanded by the context model unit 530A. The context is determined, and a code table corresponding to the determined context is selected.

そして、復号部531Aによって、符号ストリームから対象画素Xの符号を取り出し、取り出した符号を、選択された符号表を用いて、対象画素Xの誤差Aに復号する。このとき、復号部531Aにより復号された誤差Aは、逆予測部532B、532Cと、コンテクストモデル部534Bとに出力される。   Then, the decoding unit 531A extracts the code of the target pixel X from the code stream, and decodes the extracted code into the error A of the target pixel X using the selected code table. At this time, the error A decoded by the decoding unit 531A is output to the inverse prediction units 532B and 532C and the context model unit 534B.

次に、逆予測部32Aによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Xの画素値を予測すると共に、復号された誤差Aを用いて、対象画素Xの画素値に伸張して出力する。   Next, the pixel value of the target pixel X is predicted using the pixel values of the reference pixel group around the target pixel group in the image data that has already been decompressed and output from the merge unit 26 by the inverse prediction unit 32A. At the same time, the decoded error A is used to expand and output the pixel value of the target pixel X.

また、伸張部524Bでは、対象画素群の奇数箇所の画素(先頭画素の次の画素)Yを対象画素として、復号部531Bによって、符号ストリームから対象画素Yの符号を取り出し、一方の種類の符号表を用いて、取り出した符号を、対象画素Yの誤差Bの候補に復号する。また、復号部531Cによって、符号ストリームから対象画素Yの符号を取り出し、他方の種類の符号表を用いて、取り出した符号を、対象画素Yの誤差Bの候補に復号する。   Also, in the decompression unit 524B, the code of the target pixel Y is extracted from the code stream by the decoding unit 531B using the odd-numbered pixel (the pixel next to the first pixel) Y of the target pixel group as the target pixel, and one type of code Using the table, the extracted code is decoded into the error B candidate of the target pixel Y. Also, the decoding unit 531C extracts the code of the target pixel Y from the code stream, and decodes the extracted code into candidates for the error B of the target pixel Y using the other type of code table.

そして、逆予測部532Bによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号部531Bより復号された誤差Bの候補を用いて、対象画素Yの画素値の候補に伸張して出力する。   Then, using the pixel values of the reference pixel group around the target pixel group and the decoded error A in the image data that has already been decompressed by the inverse prediction unit 532B and output from the merge unit 26, the target pixel While predicting the pixel value of Y, the candidate of error B decoded by the decoding unit 531B is used to expand and output the candidate pixel value of the target pixel Y.

また、逆予測部532Cによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号部531Cより復号された誤差Bの候補を用いて、対象画素Yの画素値の候補に伸張して出力する。   In addition, among the image data that has already been decompressed by the inverse prediction unit 532C and output from the merge unit 26, the pixel value of the reference pixel group around the target pixel group and the decoded error A are used to calculate the target pixel. While predicting the pixel value of Y, the candidate of the error B decoded by the decoding unit 531C is used to expand and output the candidate pixel value of the target pixel Y.

また、復号部531Aによって誤差Aが復号されると、コンテクストモデル部534Bによって、既に伸張された対象画素群の周辺の参照画素群a,b,c,d,eの画素値と対象画素群の先頭画素Xの誤差A(Err1)に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択する。   When the error A is decoded by the decoding unit 531A, the pixel values of the reference pixel groups a, b, c, d, e around the target pixel group already expanded by the context model unit 534B and the target pixel group Based on the error A (Err1) of the first pixel X, a context is determined and a code table corresponding to the context is selected.

そして、選択部536Bによって、逆予測部532B、532Cの各々によって出力された画素値の候補のうち、選択された符号表を用いて伸張された対象画素Yの画素値の候補を選択し、マージ部26に出力する。   Then, the selection unit 536B selects pixel value candidates of the target pixel Y expanded using the selected code table from among the pixel value candidates output by each of the inverse prediction units 532B and 532C, and merges them. To the unit 26.

そして、マージ部26によって、伸張部524A、524Bの各々から、伸張された対象画素群X,Yの各画素の画素値を取得すると、取得した対象画素群の各画素の画素値を結合して、画像データとして画像出力部28、及び伸張部524A、524Bに出力する。   When the pixel value of each pixel of the expanded target pixel group X, Y is acquired from each of the expansion units 524A and 524B by the merge unit 26, the pixel value of each pixel of the acquired target pixel group is combined. The image data is output to the image output unit 28 and the expansion units 524A and 524B.

次に、画像伸張装置514の伸張部524A、524Bにおいて同期を取る場合のタイミングについて説明する。   Next, timing when synchronization is performed in the decompression units 524A and 524B of the image decompression apparatus 514 will be described.

図18に示すように、伸張部524Bにおいて、復号部531Aによる誤差Aの復号待ちが発生し、誤差Aの復号を待って、コンテクストに応じた符号表が選択される。また、画素マージ待ちが発生する。   As shown in FIG. 18, in the decompression unit 524B, the decoding unit 531A waits for decoding the error A, waits for the error A to be decoded, and a code table corresponding to the context is selected. In addition, pixel merge waiting occurs.

以上説明したように、第5の実施の形態に係る画像圧縮伸張装置によれば、コンテクストベースの予測符号化を行う場合であっても、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。   As described above, according to the image compression / decompression apparatus according to the fifth embodiment, even when context-based predictive coding is performed, the compression rate is lower than that in the case where images are not decompressed in parallel. The image can be expanded in parallel by the image expansion device without lowering the image quality.

また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行うと共に、コンテクストを決定しているので、圧縮率を低下させずに、画像データの圧縮、伸張を行うことができる。   Further, since error calculation is performed using the pixel value or error value of adjacent pixels and the context is determined, the image data can be compressed and expanded without reducing the compression rate.

また、隣接する画素の画素値を用いてコンテクストを決定する場合に比べて、隣接する画素の画素値が確定するのを待たなくても、コンテクストを決定することができるため、コンテクストに応じた符号表を用いて、並列に画像を伸張することができる。   Compared to the case where the context value is determined using the pixel value of the adjacent pixel, the context can be determined without waiting for the pixel value of the adjacent pixel to be determined. A table can be used to decompress images in parallel.

なお、上記の実施の形態では、決定されたコンテクスト番号に応じて符号表を選択した場合を例に説明したが、これに限定されるものではなく、コンテクスト毎に誤差値の計数を行い、誤差値の累積値に応じて符号表を選択するようにしてもよい。   In the above embodiment, the case where the code table is selected according to the determined context number has been described as an example. However, the present invention is not limited to this, and the error value is counted for each context. The code table may be selected according to the accumulated value.

また、符号表が2種類である場合を例に説明したが、これに限定されるものではなく、3種類以上のN種類の符号表が用意されていてもよい。この場合には、N種類の符号表の各々を用いた場合に対応して、伸張された対象画素の画素値の候補を求めておき、符号表が確定したとき、N種類の符号表に対応して求められた画素値の候補から、確定した符号表に対応する画素値を選択するようにすればよい。   Moreover, although the case where there are two types of code tables has been described as an example, the present invention is not limited to this, and three or more types of N code tables may be prepared. In this case, corresponding to the case where each of the N types of code tables is used, candidate pixel values of the expanded target pixels are obtained, and when the code table is determined, N types of code tables are supported. The pixel value corresponding to the determined code table may be selected from the pixel value candidates obtained in this way.

また、2つの連続する画素を対象画素群として、対象画素群の2つの対象画素に対して、並列に復号処理及び逆予測処理を行う場合を例に説明したが、これに限定されるものではなく、3つ以上のN個の連続する画素を対象画素群として、対象画素群のN個の対象画素に対して、並列に復号処理及び逆予測処理を行うようにしてもよい。この場合には、符号ストリームとして、N列の符号ストリームを生成して、画像伸張装置に入力するようにすればよい。   Moreover, although the case where the decoding process and the reverse prediction process are performed in parallel with respect to two target pixels of the target pixel group using two consecutive pixels as the target pixel group has been described, the present invention is not limited thereto. Instead, three or more N consecutive pixels may be used as the target pixel group, and the decoding process and the reverse prediction process may be performed in parallel on the N target pixels in the target pixel group. In this case, an N-sequence code stream may be generated as a code stream and input to the image expansion apparatus.

また、画像圧縮伸張システムの各部をコンピュータや電子回路で実現する場合を例に説明したが、画像圧縮装置の各機能を、コンピュータのプログラムで実現するようにしてもよく、また、画像伸張装置の各機能を、コンピュータのプログラムで実現するようにしてもよい。   Further, the case where each part of the image compression / decompression system is realized by a computer or an electronic circuit has been described as an example. However, each function of the image compression apparatus may be realized by a computer program. Each function may be realized by a computer program.

本発明の第1の実施の形態に係る画像圧縮伸張システムの構成を示すブロック図である。1 is a block diagram showing a configuration of an image compression / decompression system according to a first embodiment of the present invention. 予測処理及び逆予測処理を説明するための図である。It is a figure for demonstrating a prediction process and a reverse prediction process. 2つの符号ストリームを示すイメージ図である。It is an image figure which shows two code streams. 一般式に拡張した場合の予測処理及び逆予測処理を説明するための図である。It is a figure for demonstrating the prediction process and reverse prediction process at the time of extending to a general formula. 2つの伸張部で同期をとる場合のタイミングを示す図である。It is a figure which shows the timing in the case of taking synchronization with two expansion | extension parts. 本発明の第2の実施の形態に係る画像圧縮伸張システムの構成を示すブロック図である。It is a block diagram which shows the structure of the image compression / decompression system which concerns on the 2nd Embodiment of this invention. 偶数箇所の画素に対して伸張を行う伸張部におけるID符号と処理内容との関係を示す図である。It is a figure which shows the relationship between ID code | cord | chord and the processing content in the expansion | extension part which expand | extends the pixel of an even place. 奇数箇所の画素に対して伸張を行う伸張部におけるID符号と処理内容との関係を示す図である。It is a figure which shows the relationship between ID code | cord | chord and the process content in the expansion | extension part which expand | extends the pixel of an odd place. 双方で誤差IDであると解釈された場合に、2つの伸張部で同期をとる場合のタイミングを示す図である。It is a figure which shows the timing in the case of synchronizing with two expansion | extension parts, when both are interpreted as error ID. 偶数箇所の画素に対してランIDであると解釈され、かつ、奇数箇所の画素に対して誤差IDであると解釈された場合に、2つの伸張部で同期をとる場合のタイミングを示す図である。FIG. 6 is a diagram illustrating timing when synchronization is performed by two decompression units when a run ID is interpreted for even-numbered pixels and an error ID is interpreted for odd-numbered pixels. is there. 本発明の第3の実施の形態に係る画像圧縮伸張システムの構成を示すブロック図である。It is a block diagram which shows the structure of the image compression / decompression system which concerns on the 3rd Embodiment of this invention. 奇数箇所の画素に対して伸張を行う伸張部におけるID符号と処理内容との関係を示す図である。It is a figure which shows the relationship between ID code | cord | chord and the process content in the expansion | extension part which expand | extends the pixel of an odd place. 偶数箇所の画素に対してランIDであると解釈された場合に、2つの伸張部で同期をとる場合のタイミングを示す図である。It is a figure which shows the timing in the case of synchronizing with two expansion | extension parts, when it is interpreted that it is run ID with respect to the pixel of an even place. 双方で誤差IDであると解釈された場合に、2つの伸張部で同期をとる場合のタイミングを示す図である。It is a figure which shows the timing in the case of synchronizing with two expansion | extension parts, when both are interpreted as error ID. ヘッダと等長の符号とからなるブロックを示すイメージ図である。It is an image figure which shows the block which consists of a header and a code | symbol of equal length. 本発明の第4の実施の形態に係る画像圧縮伸張システムの構成を示すブロック図である。It is a block diagram which shows the structure of the image compression / decompression system which concerns on the 4th Embodiment of this invention. コンテクストモデルを説明するための図である。It is a figure for demonstrating a context model. 2つの伸張部で同期をとる場合のタイミングを示す図である。It is a figure which shows the timing in the case of taking synchronization with two expansion | extension parts.

符号の説明Explanation of symbols

10、210、310、510 画像圧縮伸張システム
12、212、312、512 画像圧縮装置
14、214、314、514 画像伸張装置
18A、18B、218A、218B、318、518A、518B 圧縮部
20A、20B、220A、220B、320 予測部
22A、22B、222A、222B、322、522A、522B 符号化部
24A、24B、224A、224B、324A、324B、524A、524B 伸張部
26、326 マージ部
30A、30B、231A、231B、331A、331B、531A、531B、531C 復号部
32A、32B、232A、236B、237B、336B、532B、532C 逆予測部
219A、219B、319 ラン計数部
221A、221B、321 ID符号化部
230A、230B、330A、330B ID復号部
232B、332B 制御部
233A、233B ラン保持部
234A、234B、334A、334B、335B ラン展開部
323 分割部
520A、520B、530A、534B コンテクストモデル部
536B 選択部
10, 210, 310, 510 Image compression / decompression system 12, 212, 312, 512 Image compression device 14, 214, 314, 514 Image expansion device 18A, 18B, 218A, 218B, 318, 518A, 518B Compression unit 20A, 20B, 220A, 220B, 320 Predictor 22A, 22B, 222A, 222B, 322, 522A, 522B Encoder 24A, 24B, 224A, 224B, 324A, 324B, 524A, 524B Decompressor 26, 326 Merger 30A, 30B, 231A 231B, 331A, 331B, 531A, 531B, 531C Decoding unit 32A, 32B, 232A, 236B, 237B, 336B, 532B, 532C Inverse prediction unit 219A, 219B, 319 Run counting unit 221A, 221B, 321 ID coding 230A, 230B, 330A, 330B ID decoding section 232B, 332B control unit 233A, 233B run holding unit 234A, 234B, 334A, 334B, 335B run expansion unit 323 dividing unit 520A, 520B, 530A, 534B context model unit 536B selector

Claims (7)

入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)先頭画素X1の画素値に対して予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(1)式に示す誤差値Err1を表わす符号、及び前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の画素値に基づく以下の(2)式に示す誤差値Errnを表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の各対象画素について並列に前記誤差値(Err1,・・・, Errn)を復号する並列復号手段と、
前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、前記対象画素群の各対象画素について並列に画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値に並列に伸張する伸張手段と、
を含み、
前記伸張手段は、
前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって復号された前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(3)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張し、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって復号された該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(4)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する画像伸張装置。
Err1=X1−F1(R1、・・・、Rm) ・・・(1)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(2)
X1=Err1+F1’(R1、・・・、Rm) ・・・(3)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(4)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
The target pixel group (X1) obtained by performing predictive coding on the pixel value of the first pixel X1 of the input target pixel group (X1,..., Xn) composed of a predetermined number of consecutive pixels. ,..., Xn) in the reference pixel group (R1,..., Rm) existing around the first pixel X1 including the reference pixel adjacent to the first pixel X1. For a sign representing an error value Err1 shown in the following equation (1) based on the pixel value and a pixel value of each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn) , The pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm) obtained by performing predictive coding and the target pixel group (X1,. . Before Xn-1) including the target pixel Xn-1 adjacent to the target pixel Xn Based on said predetermined number of code strings of columns each containing a code representing the error value Errn shown in the following equation (2) based on the pixel values of the target pixels around the target pixel Xn, the target pixel group (X1, , Xn) parallel decoding means for decoding the error values (Err1,..., Errn) in parallel for each target pixel;
The error value of each target pixel of the target pixel group decoded in parallel by the parallel decoding means, and the pixel value of each reference pixel of the reference pixel group that exists around the target pixel group and has been previously expanded DOO using, as well as inverse predictive pixel values in parallel for each pixel of the target pixel group, and expansion means for expanding in parallel to the pixel value of each pixel of the target pixel group,
Including
The extension means includes
For the first pixel X1 of the target pixel group (X1,..., Xn), the error value Err1 of the first pixel X1 decoded by the parallel decoding means and the reference pixel group (R1,. .., Rm), and the pixel value of the reference pixel around the head pixel X1 including the reference pixel adjacent to the head pixel X1 is used to calculate the head pixel X1 by the following equation (3) The pixel value is inversely predicted and expanded to the pixel value of the first pixel X1, and the parallel decoding unit applies each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn). The target pixel Xn including the decoded error value Errn of the target pixel Xn and the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1). Said object around Using the original error value and the pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm), the target pixel is expressed by the following equation (4). An image expansion device that performs reverse prediction of the pixel value of Xn and expands the pixel value of the target pixel Xn .
Err1 = X1-F1 (R1,..., Rm) (1)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (2)
X1 = Err1 + F1 ′ (R1,..., Rm) (3)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn−1) (4)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
前記入力された前記所定個の列の符号列の各々は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して並列に予測符号化を行って得られた誤差値を表わす符号を各々含む請求項1記載の画像伸張装置。 Each of the input code strings of the predetermined number of columns is an error value obtained by performing predictive coding in parallel on the pixel value of each target pixel of the target pixel group including a predetermined number of consecutive pixels. each includes claim 1 Symbol placement image decompression apparatus codes representing the. 入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)先頭画素X1の画素値に対して、予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(5)式に示す誤差値Err1を表わす符号、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素nの周辺の前記対象画素の画素値に基づく以下の(6)式に示す誤差値Errnを表わす符号、又は連長圧縮符号化を行って得られた連続数及び画素値を表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の各対象画素について並列に前記誤差値(Err1,・・・, Errn)又は前記連続数及び画素値を復号する並列復号手段と、
前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値又は前記連続数及び画素値に基づいて、前記対象画素群の各対象画素について、該対象画素の誤差値が復号された場合、該対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、該対象画素の画素値を逆予測すると共に、該対象画素の画素値に伸張する逆予測処理、及び、該対象画素の連続数及び画素値が復号された場合、該画素値を連続数分展開して、該対象画素の画素値に伸張する展開処理の何れか一方の処理を並列に行う展開手段と、
を含み、
前記展開手段は、
前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって前記先頭画素X1に対して誤差値Err1が復号された場合に、前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記参照画素の画素値とを用いて、以下の(7)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する逆予測処理、及び、前記先頭画素X1に対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、前記先頭画素X1以降の画素の画素値に伸張する展開処理の何れか一方を行い、
前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって該対象画素Xnに対して誤差値Errnが復号された場合に、該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値又は前記対象画素Xnに隣接する前記対象画素Xn−1に対して復号された画素値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(8)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する逆予測処理、及び、該対象画素Xnに対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、該対象画素Xn以降の画素の画素値に伸張する展開処理の何れか一方を行う画像伸張装置。
Err1=X1−F1(R1、・・・、Rm) ・・・(5)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(6)
X1=Err1+F1’(R1、・・・、Rm) ・・・(7)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(8)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
The target pixel group (X) obtained by performing predictive encoding on the pixel value of the first pixel X1 of the input target pixel group (X1,..., Xn) consisting of a predetermined number of consecutive pixels. .., Xn) of the reference pixels (R1,..., Rm) existing around the reference pixel adjacent to the start pixel X1 including the reference pixel adjacent to the start pixel X1. For a pixel value of each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn), a code representing an error value Err1 shown in the following equation (5) based on the pixel value of , The pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm) obtained by performing predictive coding and the target pixel group (X1,. ., Xn-1) including the target pixel Xn-1 adjacent to the target pixel Xn The code representing the target pixel below based on the pixel value of the (6) code, or a continuous number obtained by performing the run-length encoding encoding and the pixel value represents an error value Errn in the expression of the peripheral elephant pixel n The error values (Err1,..., Errn) or the continuous number in parallel for each target pixel of the target pixel group (X1,..., Xn) based on the code sequence of the predetermined number of columns included. Parallel decoding means for decoding pixel values;
Based on the error value of each target pixel of the target pixel group or the continuous number and the pixel value decoded in parallel by the parallel decoding means, the error value of the target pixel is decoded for each target pixel of the target pixel group. The pixel value of the target pixel using the error value of the target pixel and the pixel value of each reference pixel of the reference pixel group that exists in the periphery of the target pixel group and has been previously expanded. Is reverse-predicted and expanded to the pixel value of the target pixel, and when the continuous number and pixel value of the target pixel are decoded, the pixel value is expanded by the continuous number, and the target pixel Expansion means for performing in parallel one of the expansion processes for expanding the pixel value of
Including
The expansion means is
For the first pixel X1 of the target pixel group (X1,..., Xn), when the error value Err1 is decoded for the first pixel X1 by the parallel decoding means, the error value Err1 of the first pixel X1 Using the pixel value of the reference pixel including the reference pixel adjacent to the head pixel X1 in the reference pixel group (R1,..., Rm) expanded previously, the following (7) In the case where the pixel value is inversely predicted for the first pixel X1 by the equation, the inverse prediction process for expanding the pixel value to the pixel value of the first pixel X1, and the continuous number and the pixel value are decoded for the first pixel X1 , Performing any one of the expansion processes of expanding the pixel values by the continuous number and expanding the pixel values to the pixel values of the pixels after the first pixel X1,
For each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn), when the error value Errn is decoded for the target pixel Xn by the parallel decoding unit, The target around the target pixel Xn including the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1) and the error value Errn of the pixel Xn. A pixel error value or a decoded pixel value for the target pixel Xn−1 adjacent to the target pixel Xn, and the periphery of the target pixel Xn in the reference pixel group (R1,..., Rm) Using the pixel value of the reference pixel, and inversely predicting the pixel value of the target pixel Xn according to the following equation (8) and expanding the pixel value of the target pixel Xn, and the target The continuous number and image for the pixel Xn If the value is decoded, expand the pixel value number of consecutive image expansion apparatus for performing one of the expansion process of expanding the pixel value of the pixel of the object pixel Xn later.
Err1 = X1-F1 (R1,..., Rm) (5)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (6)
X1 = Err1 + F1 ′ (R1,..., Rm) (7)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Err-1) (8)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
前記入力された前記所定個の列の符号列は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して、予測符号化又は連長圧縮符号化を並列に行って得られた誤差値又は連続数及び画素値を表わす符号を各々含む請求項記載の画像伸張装置。 The input code string of the predetermined number of columns is obtained by performing predictive coding or continuous length compression coding in parallel on the pixel value of each target pixel of the target pixel group including a predetermined number of consecutive pixels. 4. The image expansion device according to claim 3 , wherein the obtained error value or the number of consecutive values and a code representing a pixel value are included. 入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)先頭画素X1の画素値に対して、先頭画素X1の周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(9)式に示す誤差値Err1を表わす符号、及び前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、前記対象画素Xnの周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素nの周辺の前記対象画素の画素値に基づく以下の(10)式に示す誤差値Errnを表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記先頭画素X1の周辺に存在し、かつ、先に伸張された画素群の画素値に対応する符号表を用いて前記先頭画素X1の誤差値Err1に復号する処理、及び前記対象画素群(X1,・・・,Xn)の先頭画素X1以外の各対象画素について、全ての符号表の各々を用いて該対象画素の誤差値の候補を各々復号する処理を並列に行う並列復号手段と、
前記並列復号手段によって復号された前記対象画素群(X1,・・・,Xn)の先頭画素X1の誤差値Err1と、前記先頭画素X1の周辺に存在し、かつ、先に伸張された参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(11)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する処理、及び、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって各符号表を用いて復号された前記対象画素Xnの誤差値の候補と、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、各符号表を用いた場合に対して、以下の(12)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素Xnの周辺の画素値に対応する符号表を用いた場合に対して伸張された画素値を選択する処理を、並列に行う伸長手段と、
を含む画像伸張装置。
Err1=X1−F1(R1、・・・、Rm) ・・・(9)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(10)
X1=Err1+F1’(R1、・・・、Rm) ・・・(11)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(12)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
Entered, the code that the pixel value of the first pixel X1, corresponding to the pixel values of the peripheral pixel group in the first pixel X1 of the target pixel group composed of a predetermined number of successive pixels (X1, · · ·, Xn) The first pixel in the reference pixel group (R1,..., Rm) existing around the target pixel group (X1,..., Xn) obtained by performing predictive coding using a table. A code representing an error value Err1 shown in the following equation (9) based on the pixel values of the reference pixels around the head pixel X1 including the reference pixels adjacent to X1 , and the target pixel group (X1,... , Xn) obtained by performing predictive coding on the pixel values of the target pixels Xn other than the first pixel X1 using the code table corresponding to the pixel values of the pixel groups around the target pixel Xn. , Around the target pixel Xn in the reference pixel group (R1,..., Rm) Of the pixel values of the reference pixel and the target pixel group (X1,..., Xn-1), the target pixels around the target pixel n including the target pixel Xn-1 adjacent to the target pixel Xn. based on the code sequence of said predetermined number of columns each containing a code representing the error value Errn shown in the following equation (10) based on the pixel value, the top pixel of the target pixel group (X1, · · ·, Xn) X1 And a process of decoding the error value Err1 of the first pixel X1 using a code table corresponding to the pixel value of the pixel group that is present in the vicinity of the first pixel X1 and previously expanded, and the target pixel group Parallel decoding means for performing in parallel a process of decoding each error value candidate of the target pixel using each of all the code tables for each target pixel other than the first pixel X1 of (X1,..., Xn) ,
An error value Err1 of the first pixel X1 of the target pixel group (X1,..., Xn) decoded by the parallel decoding means, and a reference pixel that exists in the vicinity of the first pixel X1 and has been previously expanded. group (R1, · · ·, Rm) by using the pixel values of the reference pixels around the first pixel X1 including the reference pixels adjacent to the first pixel X1 of, the following equation (11) with inverse prediction pixel value for the first pixel X1, the process of decompressing the pixel value of the first pixel X1, and each target pixel other than the head pixel X1 of the target pixel group (X1, · · ·, Xn) For Xn , error value candidates of the target pixel Xn decoded by the parallel decoding means using each code table, and the target pixel Xn of the target pixel group (X1,..., Xn−1). The target pixel Xn−1 adjacent to Above using the error value of the target pixel around the target pixel Xn, the reference pixel group (R1, ···, Rm) and a pixel value of the reference pixels around the target pixel Xn of including, In the case where each code table is used, the pixel value of the target pixel Xn is inversely predicted by the following equation (12) , and the pixel value is expanded to the candidate pixel value of the target pixel Xn , and the expanded pixel value Expansion means for performing parallel processing for selecting the pixel values expanded for the case of using the code table corresponding to the pixel values around the target pixel Xn among the candidates,
An image expansion device including:
Err1 = X1-F1 (R1,..., Rm) (9)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (10)
X1 = Err1 + F1 ′ (R1,..., Rm) (11)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn-1) (12)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
前記伸張手段は、各符号表を用いた場合に対して、前記対象画素群の各対象画素について画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素の周辺の画素値と該対象画素に隣接する前記対象画素の誤差値とに対応する符号表を用いた場合に対して伸張された画素値を選択する処理を行う請求項記載の画像伸張装置。 The decompression unit performs reverse prediction of the pixel value for each target pixel of the target pixel group, and expands the candidate pixel value of each target pixel of the target pixel group, when using each code table, Among the expanded pixel value candidates, a pixel value expanded with respect to a case where a code table corresponding to a pixel value around the target pixel and an error value of the target pixel adjacent to the target pixel is used The image expansion apparatus according to claim 5 , wherein a process for selecting is performed. 前記入力された前記所定個の列の符号列の各々は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して並列に、前記対象画素の周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた誤差値を表わす符号を各々含む請求項又は記載の画像伸張装置。 Each of the input code strings of the predetermined number of columns is a pixel of a pixel group around the target pixel in parallel with a pixel value of each target pixel of the target pixel group including a predetermined number of consecutive pixels. image decompressor each including claim 5 or 6, wherein the code representing the error values obtained by performing a predictive coding using a code table corresponding to the value.
JP2008306446A 2008-12-01 2008-12-01 Image expansion device Expired - Fee Related JP5217972B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008306446A JP5217972B2 (en) 2008-12-01 2008-12-01 Image expansion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008306446A JP5217972B2 (en) 2008-12-01 2008-12-01 Image expansion device

Publications (2)

Publication Number Publication Date
JP2010130635A JP2010130635A (en) 2010-06-10
JP5217972B2 true JP5217972B2 (en) 2013-06-19

Family

ID=42330629

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008306446A Expired - Fee Related JP5217972B2 (en) 2008-12-01 2008-12-01 Image expansion device

Country Status (1)

Country Link
JP (1) JP5217972B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8885704B2 (en) 2010-10-01 2014-11-11 Qualcomm Incorporated Coding prediction modes in video coding
JP6451221B2 (en) * 2014-10-31 2019-01-16 株式会社リコー Image processing apparatus and image processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0678294A (en) * 1992-08-21 1994-03-18 Sony Corp Coding method, coder and decoder
JP2000217003A (en) * 1999-01-20 2000-08-04 Ricoh Co Ltd Coding system and decoding system
JP3871995B2 (en) * 2002-10-25 2007-01-24 富士ゼロックス株式会社 Encoding device and decoding device

Also Published As

Publication number Publication date
JP2010130635A (en) 2010-06-10

Similar Documents

Publication Publication Date Title
KR102039049B1 (en) Sample array coding for low-delay
KR20070084128A (en) Two step arithmetic decoding with conversion into an intermediate format
JP2018107588A (en) Image processing device and semiconductor device
JP2006270958A (en) Movement-estimating method of improved type diamond search
CN104350751A (en) Extension data handling
JP5217972B2 (en) Image expansion device
US8189674B2 (en) Decoding method, program for decoding method, recording medium with recorded program for decoding method, and decoding device
JP2007235443A (en) Coding equipment and method therefor
KR20050079418A (en) Decoding method and decoding apparatus for preventing of error propagation and parallel processing
JP6073506B2 (en) Entropy changer and method
JP6280679B2 (en) Frame thinning device, frame interpolation device, video encoding device, video decoding device, and programs thereof
JP6614935B2 (en) Video encoding apparatus and program
JP2010050697A (en) Apparatus and method for compressing/decompressing image
JP4455199B2 (en) Adaptive variable length encoding apparatus, adaptive variable length decoding apparatus, adaptive variable length encoding / decoding method, and adaptive variable length encoding / decoding program
JP5105191B2 (en) Image processing device
JPH0946237A (en) Apparatus for coding and partitioning variable-length code
JP6368484B2 (en) Compression device and compression method
EP2259432A1 (en) Variable-length code decoding apparatus and method
JP2007336056A (en) Encoding device, encoding method and program
JP4184389B2 (en) Motion vector decoding apparatus and decoding method
JP4537089B2 (en) Variable length decoding apparatus and method, computer program, and computer readable storage medium
JP2004179752A (en) Huffman decoder
JP2005130352A (en) Decoder
JP4825755B2 (en) Arithmetic decoder and entropy decoder
US8594177B2 (en) Reducing reference frame data store bandwidth requirements in video decoders

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120822

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120918

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121116

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130218

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160315

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5217972

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees