JP3559419B2 - Method and apparatus for decompressing compressed image data - Google Patents

Method and apparatus for decompressing compressed image data Download PDF

Info

Publication number
JP3559419B2
JP3559419B2 JP6408097A JP6408097A JP3559419B2 JP 3559419 B2 JP3559419 B2 JP 3559419B2 JP 6408097 A JP6408097 A JP 6408097A JP 6408097 A JP6408097 A JP 6408097A JP 3559419 B2 JP3559419 B2 JP 3559419B2
Authority
JP
Japan
Prior art keywords
mcu
image
image data
data
compressed
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
JP6408097A
Other languages
Japanese (ja)
Other versions
JPH10262249A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP6408097A priority Critical patent/JP3559419B2/en
Publication of JPH10262249A publication Critical patent/JPH10262249A/en
Application granted granted Critical
Publication of JP3559419B2 publication Critical patent/JP3559419B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像圧縮データを伸張して原画像を再生する伸張方法及び装置に関するものである。
【0002】
【従来の技術】
現在、標準化されかつ互換性を持つ多数の画像圧縮フォーマットでは、圧縮前の原画像を所定画素毎に分割して取り扱う方法が用いられており、分割された各画素を読み出す順序は画面の上部から下部へ順に水平方向にスキャン(走査)するように統一されている。JPEG(Joint Photographic Experts Group)に代表される方式では、画像を復元するために必要な最小構成単位であるMCU(Minimum Coded Unit)単位に画面を分割する手法を取る。MCUは所定の個数の,8×8ピクセルからなるブロックによって構成される。画像の符号化手法としては、ブロック毎に画像データを圧縮し、画像データ圧縮処理の最終段階においては可変長符号化技術を用いて、画面水平方向にMCU単位で走査し、順に可変長ビットに変換し圧縮蓄積するという方法が用いられる。また、隣接する画素情報の差は小さいという画像の特性を利用して、各ブロックの直交変換データにおける周波数特性が0の値であるDC成分を記録する際に、近似した値である直前のブロックのDC成分との差分値を用いることによって、画像圧縮率を高める手法も利用されている。
【0003】
一方、印字ヘッドのシーク幅の狭いプリンタでは、より大きな画像の印刷出力を行うために横長の画像に対して垂直ライン方向に出力してゆく方法が使われている。
【0004】
ここで、画像圧縮データの伸張出力に垂直ライン方向出力の方法を適用する場合を考える。この場合、従来の技術では、画像圧縮データとして蓄積された以外の順序ではMCU単位でデータを取り出すことができないため、1画面分の画像データ用メモリを準備し、一旦1画面分の画像データを伸張して前記画像データ用メモリに蓄えてから垂直ライン方向に順に出力する方法がとられている。
【0005】
図4は従来の画像圧縮データの伸張装置の構成例を示すブロック図であり、画像圧縮データの伸張出力に垂直ライン方向出力の方法を適用したものである。
【0006】
図4において、61は画像圧縮データを取り込む画像データ入力部、60は1画面分の画像圧縮データの垂直伸張処理を行う画面処理部、50は画面処理部60の構成要素であり、MCU単位で画像圧縮データの伸張処理を行うMCU処理部である。MCU処理部50は可変長復号化部12、逆直交変換部13、逆量子化部14及びブロックデータ出力部15から構成され、画像データ入力部61から取り込まれた画像圧縮データは可変長復号化部12、逆直交変換部13、逆量子化部14、ブロックデータ出力部15の順に受け渡され伸張処理される。62はMCU処理部50により伸張されたデータを受け取り画像データとして出力する画像データ生成部、63は1画面分の画像データを蓄積可能な記憶容量を持ち画像データ生成部62から出力された画像データを記録する画像データ出力バッファァ、64は画像データ出力バッファ63に記録された画像データを垂直走査方向に列単位で出力する画像データ垂直出力部である。
【0007】
図4に示す従来の画像圧縮データの伸張装置について、以下その動作を説明する。
【0008】
画像データ入力部61から読み込まれた画像圧縮データに対して、画面処理部60では、MCU処理部50の構成要素である可変長復号化部12、逆直交変換部13、逆量子化部14、ブロックデータ出力部15が順に動作し、これによりブロック毎の画像圧縮データの伸張処理が行われ、画像データ生成部62にブロック毎の画像データが入力される。1MCU分に相当する個数のブロックの画像圧縮データの伸張処理が終了すると、画像データ生成部62は入力した各ブロックの画像データを合わせて1MCU分の画像データとし、画像圧縮時の走査順序と同様に水平走査方向に順に画像データ出力バッファ63に記録する。画面処理部60では、MCU処理部50により引き続きMCU単位の画像圧縮データの伸張処理を行い、これにより1画面分の画像データを再生する。
【0009】
画像データ生成部62によって1画面分の画像データが画像データ出力バッファ63に記録された後、画像データ垂直出力部64によって画像データ出力バッファ63に記録された画像データが垂直方向に列単位で出力される。
【0010】
【発明が解決しようとする課題】
前記のような従来の構成では、1画面分の画像データ出力バッファを準備する必要があるため、画像伸張処理に要するメモリの総記憶容量が非常に大きくなるという問題があった。
【0011】
すなわち、画像圧縮データが可変長符号化されている場合には各ブロックの符号化ビット長は一定ではないので、MCU単位の符号化ビット長も当然のことながら一定ではない。一方、可変長符号化されたときと異なる順序で伸張処理を行うためには、次の伸張処理を行うMCUの符号化ビットが画像圧縮データのどの位置にあるのかを知る必要がある。ところがMCU単位の符号化ビット長は一定ではないため、画像圧縮データにおいてMCUの符号化ビット位置は容易には知ることができない。
【0012】
このため、垂直走査方向に順に画像データを再生したい場合でも、可変長符号化された画像圧縮データにおける各MCUの符号化ビットの位置を例えば絶対アドレスを用いた単純な計算式を用いて特定することはできないことから、図4に示す従来例のように、1画面分の画像圧縮データ全てに対して伸張処理を行うことが必要となり、したがって画像伸張処理に大きな記憶容量のメモリが必要になった。
【0013】
また、垂直ライン方向出力の方法を前後のブロックのDC成分の差分値を利用するデータ圧縮規格に適用させる場合、一のブロックのDC成分の値を得るためには、その都度、画像圧縮データの先頭ブロックから前記一のブロックまでの各DC成分の値を読み取りその和を求める必要があるので、演算処理が煩雑になるという問題もあった。
【0014】
本発明は前記の問題を解決するものであり、可変長符号化された画像圧縮データの伸張方法として、画面全体に対して伸張処理を行わなくても可変長符号化と異なる順序で画像圧縮データを伸張可能にすることを目的とするものである。
【0015】
また本発明は、可変長符号化された画像圧縮データの伸張装置として、前記の方法を用いて、より少ないワークメモリ容量で画像データを所定の順に再生可能にすることを目的とする。
【0016】
【課題を解決するための手段】
前記の課題を解決するために、本発明は、画像圧縮データを画像伸張処理前に1度読み取り、1画面中のMCU毎の符号化ビット長情報を求め、求めた情報を参照して次の位置のMCUを伸張するために必要なビット位置情報を求め、所定の順にMCU単位で画像伸張処理を行うものである。
【0017】
請求項1の発明が講じた解決手段は、画像データをブロック毎に圧縮し、所定数のブロックからなるMCU( Minimum Coded Unit )単位で可変長符号化して得られた画像圧縮データを伸張して原画像データを再生する画像圧縮データの伸張方法として、前記画像圧縮データに対して可変長復号化処理を行い、この可変長復号化処理結果から前記画像圧縮データにおける各MCUの符号化ビット長を求める第1の工程と、前記第1の工程において求めた前記画像圧縮データにおける各MCUの符号化ビット長を基にして、前記画像圧縮データにおける伸張対象の一のMCUの符号化ビットの位置を求め、求めた位置の前記一のMCUの符号化ビットに対して伸張処理を行う第2の工程とを備え、前記画像圧縮データは画像を水平方向に走査する順にMCU単位で可変長符号化されたものであり、前記第2の工程を画像を垂直方向に走査する順に伸張対象の一のMCUを指定しつつ繰り返し行うものである
【0018】
請求項1の発明により、第1の工程において可変長復号化処理により求めた画像圧縮データにおける各MCUの符号化ビット長を基にして、第2の工程において画像圧縮データにおける所定のMCUの符号化ビットの位置を求めることができるので、1画面分の画像圧縮データ全てに対して伸張処理を行わなくても、所定のMCUの原画像データを再生することができる。そして第2の工程を一のMCUを順次指定しつつ繰り返し行うことにより、原画像データをMCU単位で、画像圧縮時に可変長符号化した順序に限定されることなく、所定の順に再生することができる。さらに、画像を水平方向に走査する順にMCU単位で可変長符号化された画像圧縮データから、画像を垂直方向に走査する順にMCU単位で原画像データを再生することができ、しかもこのとき1画面分の画像圧縮データ全てに対して伸張処理を行う必要がない。
【0019】
また、請求項2の発明が講じた解決手段は、画像データをブロック毎に圧縮し、所定数のブロックからなるMCU単位で可変長符号化して得られた画像圧縮データを入力とし、この画像圧縮データを伸張して原画像データを再生する画像圧縮データの伸張装置として、前記画像圧縮データを入力とし、入力した画像圧縮データに対してMCU単位で伸張処理を行うMCU処理部と、前記画像圧縮データを入力とし、入力した画像圧縮データに対して可変長復号化処理を行い、この可変長復号化処理結果から前記画像圧縮データにおける各MCUの符号化ビット長を求めるMCU情報生成部と、前記MCU情報生成部により求められた前記画像圧縮データにおける各MCUの符号化ビット長を基にして、前記画像圧縮データにおける一のMCUの符号化ビットの位置を示すビット位置情報を求め、求めたビット位置情報を前記MCU処理部に入力するMCU処理情報生成部とを備え、前記MCU処理部は、前記画像圧縮データにおける,前記MCU処理情報生成部から入力されたビット位置情報が示す位置の一のMCUの符号化ビットに対して伸張処理を行うことにより、前記一のMCUの原画像データを再生するものであり、かつ、前記画像圧縮データは画像を水平方向に走査する順にMCU単位で可変長符号化されたものであり、前記MCU処理情報生成部はビット位置情報を求める一のMCUを画像を垂直方向に走査する順に特定するものである
【0020】
請求項2の発明により、MCU情報生成部により求められた画像圧縮データにおける各MCUの符号化ビット長を基にして、MCU処理情報生成部により画像圧縮データにおける所定のMCUの符号化ビットの位置を示すビット位置情報が求められる。そしてMCU処理部は前記ビット位置情報が示す位置のMCUの符号化ビットに対して伸張処理を行うので、当該装置は1画面分の画像圧縮データ全てに対して伸張処理を行わなくても所定のMCUの原画像データを再生することができる。そして前記MCU処理情報生成部がMCUを順次指定しつつビット位置情報を求めることにより、原画像データをMCU単位で、画像圧縮時に可変長符号化した順序に限定されることなく、所定の順に再生することができる。さらに、画像を水平方向に走査する順にMCU単位で可変長符号化された画像圧縮データから、画像を垂直方向に走査する順にMCU単位で原画像データを再生することができ、しかもこのとき1画面分の画像圧縮データ全てに対して伸張処理を行う必要がない。
【0021】
請求項3の発明では、前記請求項2の画像圧縮データの伸張装置は、前記MCU処理部により再生された一のMCUの原画像データを順次蓄積する画像データ出力バッファと、前記画像データ出力バッファに一のMCUの原画像データが原画像垂直方向のMCUの個数分蓄積されたとき、前記画像データ出力バッファに蓄積された画像データを当該画像圧縮データの伸張装置から出力する画像データ垂直出力部とを備えているものとする。
【0022】
請求項3の発明により、前記画像データ出力バッファのメモリサイズは、1画面分の画像データを保存するために必要なメモリサイズの画像水平方向のMCUの個数分の1でよいので、従来よりも少ないワークメモリ容量で画像データをMCU単位で垂直方向に読み出して出力することが可能になる
【0023】
【発明の実施の形態】
以下、本発明の実施形態について図面を参照しながら説明する。
【0024】
図1は本発明の一実施形態に係る画像圧縮データの伸張装置の構成を示すブロック図である。図1に示す画像圧縮データの伸張装置は、画像データをブロック毎に圧縮し、所定数のブロックからなるMCU(Minimum Coded Unit)単位で水平走査方向に順に可変長符号化して得られた画像圧縮データを入力とし、この画像圧縮データをMCU単位で垂直走査方向に順に伸張して原画像データを再生するものである。
【0025】
図1において、10は画像圧縮データを入力とし、MCU単位で画像圧縮データの伸張処理を行うMCU処理部であり、入力した画像圧縮データを一旦格納する画像圧縮データメモリ11並びに画像圧縮データメモリ11から読み出した画像圧縮データに対して伸張処理を行う,可変長復号化部12、逆直交変換部13、逆量子化部14及びブロックデータ出力部15によって構成されている。MCU処理部10の構成要素である可変長復号化部12、逆直交変換部13、逆量子化部14及びブロックデータ出力部15の構成については従来技術と同様であるので本実施形態ではその詳細な説明を省略する。
【0026】
また20は画像圧縮データを入力とし、入力した画像圧縮データからMCU情報テーブル22を作成するMCU情報生成部としてのMCU情報テーブル作成部である。MCU情報テーブル22は符号化ビット長テーブル22a及びDC成分テーブル22bから構成される。25はMCU情報テーブル22を参照してMCU処理部10が次のMCUの伸張処理を実行するために必要となるパラメータを生成するMCU処理情報生成部としてのMCU先頭ブロックパラメータ生成部である。MCU処理部10及びMCU先頭ブロックパラメータ生成部25によって1画面分の垂直伸張処理を行う画面処理部30が構成されている。
【0027】
また31は画像圧縮データを取り込みMCU処理部10及びMCU情報テーブル作成部20に入力する画像圧縮データ入力部、32はMCU処理部10により再生された一のMCUの各ブロックのデータを受け取り一のMCUの原画像データを生成出力する画像データ生成部、33は画像データ生成部32から出力された一のMCUの原画像データを垂直走査方向並びの画像データとして順次格納する画像データ出力バッファ、34は垂直走査方向1列分のMCUの原画像データが画像データ出力バッファ33に格納される度に画像データ出力バッファ33から画像データを読み出して出力する画像データ垂直出力部である。画像データ出力バッファ33は垂直走査方向1列分のMCUの原画像データを格納するために必要なメモリ容量を有しており、図1では画像データ出力バッファ33のメモリ容量に対する画像サイズの仮想イメージ40を図示している。
【0028】
以上のように構成された本実施形態に係る画像圧縮データの伸張装置について、以下、その動作を1画面分の画像圧縮データを伸張する場合を例にとって説明する。
【0029】
まず画像圧縮データに対する伸張処理の前に、画像データ入力部31によりMCU情報テーブル作成部20に画像圧縮データを入力し、MCU情報テーブル作成部20は入力された画像圧縮データの可変長復号化処理を行い、ブロック毎の符号化ビット長及びDC成分値を求める。そして、可変長復号化処理により求めた各ブロックの符号化ビット長を基にしてMCU毎の符号化ビット長を計算し、計算した各MCUの符号化ビット長からなる符号化ビット長テーブル22aを作成すると共に、可変長復号化処理により求めた各ブロックのDC成分値を基にして各MCU毎のDC成分の差分値を計算した値からなるDC成分テーブル22bを作成する。すなわち1画面分の画像圧縮データ毎に、符号化ビット長テーブル22a及びDC成分テーブル22bからなるMCU情報テーブル22が伸張処理の前に新たに作成される。MCU情報テーブル22は例えば本装置に内蔵されたメモリ等に作成される。
【0030】
ここでMCU情報テーブル22について説明する。
【0031】
符号化ビット長テーブル22aとしては、1画面中のMCUの個数のサイズのデータテーブルを準備する必要がある。
【0032】
図2は画像データにおけるMCUの区分の例を表す図である。図2に示す画像データは垂直方向にHmax 列、水平方向にVmax 行に分割されており、合計(Hmax ×Vmax )個のMCUに区分されている。MCU1個当たりの画素サイズは画像圧縮時の設定によるため不定である。また、各MCUの符号化ビット長は可変長符号化されているので一定ではない。
【0033】
ここで列h,行vのMCU位置を(h,v) と表す。水平走査方向の順とは(1,1) から(Hmax,1)まで、(1,2) から(Hmax,2)まで、…、(1,Vmax)から(Hmax,Vmax) までというように画像を水平方向に走査する順序のことをいい、垂直走査方向の順とは(1,1) から(1,Vmax)まで、(2,1) から(2,Vmax)まで、…、(Hmax,1)から(Hmax,Vmax) までというように画像を垂直方向に走査する順序のことをいうものとする。
【0034】
水平走査方向の順にMCU単位で圧縮された画像圧縮データを垂直走査方向の順にMCU単位で伸張するためには、伸張対象のMCUに対して、例えば図2に示すような垂直方向ビット長bxを伸張処理の前に求める必要がある。水平走査方向の順にMCU単位で圧縮された画像圧縮データでは、MCUの符号化ビットは垂直走査方向の順には並んでいないからである。
【0035】
(h,v) の位置のMCUの伸張処理の終了時における符号化ビット位置a1から、垂直走査方向の次のMCUである(h,v+1) の位置のMCUの伸張処理の開始時における符号化ビット位置a2までの垂直方向ビット長bxをVbitlen(h,v)で表すものとすると、垂直方向ビット長Vbitlen(h,v)は、(h,v) の位置のMCUの符号化ビット長をbitlen(h,v) とすると、次のような計算式で求めることができる。

Figure 0003559419
(ただしv≠Vmax )
上式において、右辺の第1項が図2に示す符号化ビット長b1に相当し、第2項が図2に示す符号化ビット長b2に相当する。
【0036】
本実施形態では符号化ビット長テーブル22aには各MCUの符号化ビット長を計算して入れるものとし、MCU先頭ブロックパラメータ生成部25によって式(1)に従って垂直方向ビット長Vbitlen(h,v)を求めるものとする。
【0037】
また式(1)は、
Figure 0003559419
というように展開することができる。すなわち、
Figure 0003559419
という式によって、より短い演算回数で求めることができる。
【0038】
またDC成分テーブル22bとしては、MCUの個数の配列のデータテーブルを輝度や色差等の画素成分の種類別に準備する必要がある。
【0039】
図3はMCU内のブロックの構成例を示す図である。カラー画像の場合には画素成分の種類別に図3に示すようなブロックがそろって1個のMCUを構成するが、図3では説明を簡略化するために1つの画素成分についてのブロックのみを示している。
【0040】
MCUは(8×8)画素からなる任意の個数のブロックから構成されており、DC成分の読み出しはブロック単位で順次行われる。図3に示すMCUは4個のブロック(ブロックn−3,n−2,n−1,n)によって構成されている。
【0041】
MCU情報テーブル作成部20は画像圧縮データを画面水平方向に走査していき、画像圧縮データの先頭ブロックから各ブロックまでの全てのDC成分の和を各ブロックのDC成分差分値として計算し、各MCUの最終ブロックのDC成分差分値を各MCUのDC成分差分値として、DC成分テーブル22bに記録する。
【0042】
n番目のブロックのDC成分の値をDC(n) とすると、n番目のブロックのDC成分差分値ΔDC(n) は次のような計算式で求めることができる。
【0043】
n=1のとき ΔDC(1) =0
n≧2のとき ΔDC(n) =DC(n) ΔDC(n-1)
この結果、DC成分テーブル22bには、各MCUの最終ブロックのDC成分の元の値(差分ではない)と画像圧縮データの先頭ブロックのDC成分の元の値との差分データが記録されることになる。このため、DC成分テーブル22bを参照することにより、一のブロックのDC成分の元の値を得るために、符号化された画像圧縮データの先頭ブロックから前記一のブロックまでの各DC成分の値を読み取る必要がなくなる。
【0044】
MCU先頭ブロックパラメータ生成部25は、MCU処理部10において伸張処理が終了したMCUのDC成分差分値をDC成分テーブル22bから読み出し、次のMCUの伸張処理のパラメータとしてMCU処理部10に入力する。MCU処理部10は、MCU先頭ブロックパラメータ生成部25から入力された,直前に伸張処理を終了したMCUのDC成分差分値を基にして、次のMCUを構成する各ブロックのDC成分の元の値を求める。
【0045】
またMCU先頭ブロックパラメータ生成部25は、画像圧縮データの垂直走査方向の伸張を行う際に、垂直走査方向の始点すなわち図2におけるv=1のときに次の水平方向位置のMCUの伸張処理に用いるパラメータを内部メモリに記憶しておき、垂直方向1列分のMCUの伸張処理が終了したv=Vmax のときに、内部メモリに記憶したパラメータを次の列のMCUの伸張処理のために出力するようにしてもよい。
【0046】
次に画面処理部30によって画像圧縮データの伸張処理が行われる。1画面分の画像圧縮データが画像データ入力部31からMCU処理部10に入力され、MCU処理部10は入力した画像圧縮データを画像圧縮データメモリ11に一旦格納し、画像圧縮データメモリ11に格納した画像圧縮データに対してMCU単位で順に伸張処理を行う。MCU処理部10はブロック毎に画像圧縮データの伸張処理を行い、1MCU分のブロックの伸張処理が終了した後、MCU先頭ブロックパラメータ生成部25から、画像圧縮データにおける,次に伸張処理を行うMCUの符号化ビットの位置を示すビット位置情報を含むパラメータを入力し、このパラメータに基づき次のMCUの伸張処理を行う。MCU先頭ブロックパラメータ生成部25は、MCU処理部10が一のMCUに対する伸張処理が終了したときMCU情報テーブル22を参照し、次の垂直走査方向の位置のMCUの原画像データを再生するためのパラメータである,このMCUの符号化ビットの位置を示すビット位置情報及び直前に伸張処理が終了した前記一のMCUのDC成分差分値を求め、MCU処理部10に入力する。このような動作を繰り返すことによって、画面垂直方向の画像圧縮データの伸張処理を実現する。
【0047】
また、MCU処理部10で伸張された原画像データは、画像データ生成部32によって画像データ出力バッファ33に画面垂直方向に順に並べて記録され、画像データ出力バッファ33に垂直走査方向1列分のMCUの原画像データがそろう度に、画像データ垂直出力部34によって垂直方向1列分の原画像データとして出力され、出力終了後、画像データ出力バッファ33に記録された原画像データは消去される。
【0048】
以上のように本実施形態によると、各MCUの符号化ビット長データ等の情報を記憶するMCU情報テーブルを1画面毎に作成し、このMCU情報テーブルを参照して画像圧縮データにおける,次に伸張処理を行うMCUの符号化ビットの位置等の情報を生成し、生成した情報をMCU単位の伸張処理に利用することによって、垂直走査方向に原画像を再生する際に画像全体に対して伸張処理を行う必要がなくなるので、画面出力のためのデータバッファの記憶容量を画面水平方向のMCU個数分の1に削減することができる。
【0049】
ここでJPEG(Joint Photographic Experts Group)方式により画像情報を圧縮伸張する場合を例にとって、本実施形態を用いた場合と従来技術を用いた場合との比較を行う。
【0050】
比較条件として、画像サイズ640×480ドットのカラー画像であってベースライン方式でY:U:V比(輝度・色差の比)4:1:1又は4:2:2に対応するものを対象とし、画像情報を蓄積するためのデータバッファにはデータ間引きが行われていない画像情報を完全に再現させたデータが入るものとした。
【0051】
前記の条件より、1MCUが画面を分割する大きさは16×16ドットで、1画面が水平40個×垂直30個の計1200個のMCUによって構成され、1MCUは縦横8×8ピクセルの64バイトのブロック最大8個で構成され、画素成分数は輝度成分が1、色差成分2の計3成分で構成されていることが導かれる。またJPEG処理におけるハフマン圧縮は最悪の場合に1バイトを16ビットに変換する。
【0052】
ゆえに1MCUの最大ビット長は64×8×16=8192ビットであるので、符号化ビット長テーブル22aとしてはMCU1個当たり16ビットすなわち2バイト幅のテーブルを準備すればよいことになる。また、DC成分は1バイト幅と決まっており、画素成分が3種類なので、DC成分テーブル22bとしてはMCU1個当たり1×3バイトのテーブルを準備する必要がある。したがって、MCU情報テーブル22として必要な記憶容量は1200×(2+1×3)=6KBである。
【0053】
また画像データ出力バッファは、従来の方法では画像サイズに画素成分数を乗じた分の容量すなわち640×480×3=900KB必要であるが、本実施形態では垂直走査方向にMCU1列分の画像データを並べることができるだけの容量で済むので、従来の方法において必要であった容量の水平走査方向のMCU個数分の1すなわち900÷40=22.5KBで済むことが分かる。
【0054】
以上のことから分かるように、本実施形態において、MCU情報テーブル22として必要になる記憶容量を差し引いても、データ伸張時に必要な記憶容量を大幅に削減することができる。
【0055】
なお本実施形態では符号化ビット長テーブル22aのデータは各MCUの符号化ビット長すなわち各MCUを構成するブロックの符号化ビット長の合計値としたが、符号化ビット長テーブル22aの各データを記録するビット幅を本実施形態の場合よりも広くし、符号化ビット長テーブル22aとして、次の垂直位置のMCUまでのビット長合計値、又は次の垂直位置のMCUのデータの画像圧縮データメモリ11の格納アドレスを記録するようにしてもよい。
【0056】
さらに本発明は、本実施形態のように、画像を水平方向に走査する順にMCU単位で可変長符号化された画像圧縮データを垂直方向に順にMCU毎に伸張するものに限られるものではなく、画像圧縮時に可変長符号化した順序に限定されることなく、所定の順に、MCU単位で原画像データを再生する方法及び装置として他の用途にも適用可能である。すなわち、MCU先頭ブロックパラメータ生成部25によってパラメータを出力するMCUの順序を変えることによって、1画面分の画像圧縮データ全てに対して伸張処理を行うことなく、垂直走査方向以外の所定の順にMCU単位で原画像データを再生することができる。
【0057】
【発明の効果】
以上のように本発明によると、可変長復号化処理により求めた画像圧縮データにおける各MCUの符号化ビット長を基にして画像圧縮データにおける所定のMCUの符号化ビットの位置を求めることができるので、1画面分の画像圧縮データ全てに対して伸張処理を行わなくても、所定のMCUの原画像データを再生することができる。このため、原画像データをMCU単位で、画像圧縮時に可変長符号化した順序に限定されることなく、所定の順に再生することができる。
【0058】
特に、画像を水平方向に走査する順にMCU単位で可変長符号化された画像圧縮データから、1画面分の画像圧縮データ全てに対して伸張処理を行うことなく、画像を垂直方向に走査する順にMCU単位で原画像データを再生することができる。このため画像データ出力バッファのメモリサイズは、1画面分の画像データを保存するために必要なメモリサイズの画像水平方向のMCUの個数分の1でよいので、従来よりも少ないワークメモリ容量で画像データをMCU単位で垂直方向に読み出して出力することが可能になる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る画像圧縮データの伸張装置の構成を示すブロック図である。
【図2】図2は画像データにおけるMCUの区分の例を表す図であり、垂直走査方向のMCUの走査を説明するための概念図である。
【図3】MCU内のブロックの構成の例を示す図である。
【図4】従来の画像圧縮データの伸張装置の構成を示すブロック図である。
【符号の説明】
10 MCU処理部
20 MCU情報テーブル作成部(MCU情報生成部)
25 MCU先頭ブロックパラメータ生成部(MCU処理情報生成部)
33 画像データ出力バッファ
34 画像データ垂直出力部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a decompression method and apparatus for decompressing compressed image data to reproduce an original image.
[0002]
[Prior art]
At present, many standardized and compatible image compression formats use a method in which an original image before compression is divided into predetermined pixels and handled, and the order in which the divided pixels are read is from the top of the screen. It is unified so as to sequentially scan (scan) in the horizontal direction toward the bottom. In a method represented by JPEG (Joint Photographic Experts Group), a method of dividing a screen into MCU (Minimum Coded Unit) units, which are minimum constituent units necessary for restoring an image, is used. The MCU is constituted by a predetermined number of blocks each composed of 8 × 8 pixels. As an image encoding method, image data is compressed for each block, and in the final stage of the image data compression processing, scanning is performed in units of MCU in the horizontal direction of the screen using a variable length encoding technique, and sequentially into variable length bits. A method of converting and compressing and storing is used. Further, by utilizing the characteristic of an image that the difference between adjacent pixel information is small, when recording a DC component whose frequency characteristic in the orthogonal transform data of each block is 0, the immediately preceding block which is an approximate value is recorded. A method of increasing the image compression ratio by using a difference value between the DC component and the DC component is also used.
[0003]
On the other hand, in a printer having a narrow seek width of a print head, a method of outputting a horizontally long image in a vertical line direction is used to print out a larger image.
[0004]
Here, a case is considered in which the method of vertical line direction output is applied to the decompressed output of the compressed image data. In this case, in the conventional technique, data cannot be taken out in MCU units in an order other than the order in which the image data is stored as compressed image data. Therefore, an image data memory for one screen is prepared, and the image data for one screen is temporarily stored. A method is employed in which the image data is expanded and stored in the image data memory, and then sequentially output in the vertical line direction.
[0005]
FIG. 4 is a block diagram showing a configuration example of a conventional image compression data decompression device, in which a vertical line direction output method is applied to decompression output of image compression data.
[0006]
In FIG. 4, reference numeral 61 denotes an image data input unit that captures image compression data, 60 denotes a screen processing unit that performs vertical decompression processing of one screen of image compression data, 50 denotes a component of the screen processing unit 60, and is a unit of MCU. This is an MCU processing unit that performs decompression processing of compressed image data. The MCU processing unit 50 includes a variable length decoding unit 12, an inverse orthogonal transform unit 13, an inverse quantization unit 14, and a block data output unit 15. The compressed image data taken in from the image data input unit 61 is subjected to variable length decoding. The unit 12, the inverse orthogonal transform unit 13, the inverse quantization unit 14, and the block data output unit 15 are transferred in this order and subjected to expansion processing. Reference numeral 62 denotes an image data generation unit which receives data decompressed by the MCU processing unit 50 and outputs the image data as image data, and 63 denotes an image data output from the image data generation unit 62 having a storage capacity capable of storing image data for one screen. Is an image data output buffer for outputting image data, and 64 is an image data vertical output unit for outputting the image data recorded in the image data output buffer 63 in columns in the vertical scanning direction.
[0007]
The operation of the conventional image compression data decompression device shown in FIG. 4 will be described below.
[0008]
With respect to the compressed image data read from the image data input unit 61, the screen processing unit 60 includes a variable length decoding unit 12, an inverse orthogonal transform unit 13, an inverse quantization unit 14, The block data output unit 15 operates in order, thereby expanding the compressed image data for each block, and inputting the image data for each block to the image data generation unit 62. When the expansion processing of the image compressed data of the number of blocks corresponding to 1 MCU is completed, the image data generation unit 62 combines the input image data of each block into image data of 1 MCU, and performs the same as the scanning order at the time of image compression. The image data is sequentially recorded in the image data output buffer 63 in the horizontal scanning direction. In the screen processing unit 60, the MCU processing unit 50 continues to decompress the image compressed data for each MCU, thereby reproducing one screen of image data.
[0009]
After the image data for one screen is recorded in the image data output buffer 63 by the image data generation unit 62, the image data recorded in the image data output buffer 63 is output in column units in the vertical direction by the image data vertical output unit 64. Is done.
[0010]
[Problems to be solved by the invention]
In the conventional configuration as described above, since it is necessary to prepare an image data output buffer for one screen, there is a problem that the total storage capacity of the memory required for the image decompression processing becomes very large.
[0011]
That is, when the compressed image data is variable-length coded, the coded bit length of each block is not constant, so that the coded bit length of each MCU is naturally not constant. On the other hand, in order to perform decompression processing in a different order from that when variable-length coding is performed, it is necessary to know where the coded bits of the MCU to be subjected to the next decompression processing are located in the image compression data. However, since the coded bit length of each MCU is not constant, the coded bit position of the MCU cannot be easily known in the compressed image data.
[0012]
Therefore, even when it is desired to sequentially reproduce image data in the vertical scanning direction, the position of the coded bit of each MCU in the variable-length coded image compressed data is specified using, for example, a simple calculation formula using an absolute address. Therefore, as in the conventional example shown in FIG. 4, it is necessary to perform decompression processing on all of the compressed image data for one screen, and therefore, a memory having a large storage capacity is required for the image decompression processing. Was.
[0013]
Further, when the method of outputting in the vertical line direction is applied to a data compression standard using a difference value of the DC component of the preceding and following blocks, in order to obtain the value of the DC component of one block, it Since it is necessary to read the value of each DC component from the first block to the one block and calculate the sum thereof, there is also a problem that the arithmetic processing becomes complicated.
[0014]
SUMMARY OF THE INVENTION The present invention solves the above-described problem. As a method for expanding compressed image data subjected to variable-length coding, image compression data is compressed in a different order from variable-length coding without performing expansion processing on the entire screen. Is intended to be extensible.
[0015]
It is still another object of the present invention to be able to reproduce image data in a predetermined order with a smaller work memory capacity by using the above-described method as a device for expanding compressed image data subjected to variable length coding.
[0016]
[Means for Solving the Problems]
In order to solve the above-described problem, the present invention reads out the compressed image data once before the image decompression process, obtains the coded bit length information for each MCU in one screen, and refers to the obtained information to determine the following information. Bit position information necessary to decompress the MCU at the position is obtained, and image decompression processing is performed in MCUs in a predetermined order.
[0017]
According to a first aspect of the present invention, an image data is compressed for each block and an MCU (MCU) including a predetermined number of blocks is compressed. Minimum Coded Unit As a method for decompressing image compressed data obtained by decompressing image-compressed data obtained by variable-length coding in units and reproducing original image data, a variable-length decoding process is performed on the image-compressed data. A first step of obtaining an encoding bit length of each MCU in the image compressed data from the decoding processing result, and a coding bit length of each MCU in the image compression data obtained in the first step, A second step of obtaining the position of the coded bit of one MCU to be expanded in the image compression data, and performing expansion processing on the coded bit of the one MCU at the obtained position.The compressed image data is variable-length coded in MCU units in the order in which the image is scanned in the horizontal direction, and the second step is performed by designating one MCU to be expanded in the order in which the image is scanned in the vertical direction. What to do repeatedlyIs.
[0018]
According to the first aspect of the present invention, based on the coding bit length of each MCU in the compressed image data obtained by the variable length decoding process in the first step, the coding of the predetermined MCU in the compressed image data in the second step is performed. Since the position of the coded bit can be obtained, the original image data of the predetermined MCU can be reproduced without performing the expansion processing on all the image compressed data for one screen. By repeating the second process while sequentially specifying one MCU, the original image data can be reproduced in a predetermined order in MCU units, without being limited to the order of variable length encoding at the time of image compression. it can. further,Original image data can be reproduced in the unit of MCU in the order of scanning the image in the vertical direction from the compressed image data of the variable length coding in the unit of MCU in the order of scanning the image in the horizontal direction. There is no need to perform decompression processing on all image compression data.
[0019]
Further, the solution means adopted by the invention of claim 2 is to input image compressed data obtained by compressing image data for each block and performing variable length coding in units of MCUs composed of a predetermined number of blocks, A MCU processing unit that receives the image compressed data as input and performs expansion processing on the input image compressed data in MCU units as an image compressed data expansion device that expands data to reproduce original image data; An MCU information generating unit that receives data as input, performs variable length decoding processing on the input image compressed data, and obtains an encoding bit length of each MCU in the image compressed data from the variable length decoding processing result; One MCU in the image compression data is determined based on the coding bit length of each MCU in the image compression data obtained by the MCU information generation unit. An MCU processing information generating unit for obtaining bit position information indicating a position of a coded bit and inputting the obtained bit position information to the MCU processing unit, wherein the MCU processing unit performs the MCU processing on the compressed image data. By performing expansion processing on the coded bits of one MCU indicated by the bit position information input from the information generation unit, the original image data of the one MCU is reproduced, andThe compressed image data is obtained by performing variable-length coding on an MCU basis in the order in which the image is scanned in the horizontal direction, and the MCU processing information generating unit scans one MCU for obtaining the bit position information in the order in which the image is scanned in the vertical direction. What to identifyIs.
[0020]
According to the second aspect of the present invention, the MCU processing information generation unit determines the position of the coded bit of a predetermined MCU in the image compression data based on the coded bit length of each MCU in the image compression data obtained by the MCU information generation unit. Is obtained. Since the MCU processing unit performs the expansion process on the coded bits of the MCU at the position indicated by the bit position information, the apparatus can perform a predetermined process without performing the expansion process on all the image compressed data for one screen. The original image data of the MCU can be reproduced. The MCU processing information generation unit obtains the bit position information while sequentially specifying the MCU, so that the original image data is reproduced in a predetermined order in MCU units, without being limited to the order of variable length encoding at the time of image compression. can do. further,Original image data can be reproduced in the unit of MCU in the order of scanning the image in the vertical direction from the compressed image data of the variable length coding in the unit of MCU in the order of scanning the image in the horizontal direction. There is no need to perform decompression processing on all image compression data.
[0021]
Claim 3In the invention of the above,Claim 2The image compression data decompression device includes: an image data output buffer for sequentially storing original image data of one MCU reproduced by the MCU processing unit; and an original image data of one MCU stored in the image data output buffer. An image data vertical output unit for outputting the image data stored in the image data output buffer from the image compression data decompression device when the image data is accumulated by the number of MCUs in the vertical direction.
[0022]
Claim 3According to the invention, the memory size of the image data output buffer may be 1 / the number of MCUs in the image horizontal direction having a memory size necessary for storing image data for one screen. Capable of reading and outputting image data vertically in MCU units by capacity.
[0023]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0024]
FIG. 1 is a block diagram showing a configuration of an image compression data decompression device according to an embodiment of the present invention. The image compression data decompression apparatus shown in FIG. 1 compresses image data for each block, and compresses the image data by variable length coding in the horizontal scanning direction in units of MCU (Minimum Coded Unit) consisting of a predetermined number of blocks. Data is input, and the compressed image data is sequentially expanded in the vertical scanning direction in MCU units to reproduce the original image data.
[0025]
In FIG. 1, reference numeral 10 denotes an MCU processing unit which receives compressed image data and decompresses the compressed image data in MCU units, and includes an image compression data memory 11 and an image compression data memory 11 for temporarily storing the input image compression data. It comprises a variable-length decoding unit 12, an inverse orthogonal transformation unit 13, an inverse quantization unit 14, and a block data output unit 15, which perform an expansion process on the compressed image data read out from. The configurations of the variable length decoding unit 12, the inverse orthogonal transform unit 13, the inverse quantization unit 14, and the block data output unit 15, which are the components of the MCU processing unit 10, are the same as those in the related art. Detailed description is omitted.
[0026]
Reference numeral 20 denotes an MCU information table creation unit as an MCU information generation unit that receives image compression data as input and creates an MCU information table 22 from the input image compression data. The MCU information table 22 includes a coding bit length table 22a and a DC component table 22b. Reference numeral 25 denotes an MCU head block parameter generation unit as an MCU processing information generation unit that generates parameters necessary for the MCU processing unit 10 to execute the decompression processing of the next MCU with reference to the MCU information table 22. The MCU processing unit 10 and the MCU head block parameter generation unit 25 constitute a screen processing unit 30 that performs vertical expansion processing for one screen.
[0027]
Reference numeral 31 denotes an image compression data input unit which takes in image compression data and inputs it to the MCU processing unit 10 and the MCU information table creation unit 20, and 32 receives data of each block of one MCU reproduced by the MCU processing unit 10 and receives one data. An image data generating unit 33 for generating and outputting the original image data of the MCU; an image data output buffer 34 for sequentially storing the original image data of one MCU output from the image data generating unit 32 as image data arranged in the vertical scanning direction; Reference numeral denotes an image data vertical output unit that reads out image data from the image data output buffer 33 and outputs it each time original image data of an MCU for one column in the vertical scanning direction is stored in the image data output buffer 33. The image data output buffer 33 has a memory capacity necessary to store the original image data of the MCU for one column in the vertical scanning direction. In FIG. 1, a virtual image of the image size with respect to the memory capacity of the image data output buffer 33 is shown. 40 is illustrated.
[0028]
The operation of the image compression data decompression device according to the present embodiment configured as described above will be described below by taking as an example a case where image compression data for one screen is decompressed.
[0029]
First, before decompressing the compressed image data, the compressed image data is input to the MCU information table creating unit 20 by the image data input unit 31, and the MCU information table creating unit 20 performs the variable length decoding process of the input compressed image data. To determine the coded bit length and DC component value for each block. Then, the coding bit length of each MCU is calculated based on the coding bit length of each block obtained by the variable length decoding processing, and a coding bit length table 22a including the calculated coding bit length of each MCU is calculated. At the same time, a DC component table 22b including a value obtained by calculating a difference value of the DC component for each MCU based on the DC component value of each block obtained by the variable length decoding process is created. That is, the MCU information table 22 including the coded bit length table 22a and the DC component table 22b is newly created for each screen of compressed image data before the decompression process. The MCU information table 22 is created, for example, in a memory or the like built in the apparatus.
[0030]
Here, the MCU information table 22 will be described.
[0031]
As the encoding bit length table 22a, it is necessary to prepare a data table having the size of the number of MCUs in one screen.
[0032]
FIG. 2 is a diagram illustrating an example of MCU division in image data. The image data shown in FIG. 2 is divided into Hmax columns in the vertical direction and Vmax rows in the horizontal direction, and is divided into a total of (Hmax × Vmax) MCUs. The pixel size per MCU is undefined because it depends on the setting at the time of image compression. Also, the coded bit length of each MCU is not constant because it is variable length coded.
[0033]
Here, the MCU position in column h and row v is represented as (h, v). The order in the horizontal scanning direction is (1,1) to (Hmax, 1), (1,2) to (Hmax, 2), ..., (1, Vmax) to (Hmax, Vmax). The order in which the image is scanned in the horizontal direction means the order in the vertical scanning direction from (1,1) to (1, Vmax), (2,1) to (2, Vmax), ..., (Hmax , 1) to (Hmax, Vmax) means the order in which the image is scanned in the vertical direction.
[0034]
In order to decompress image compression data compressed in MCU units in the horizontal scanning direction in MCU units in the vertical scanning direction, for example, a vertical bit length bx as shown in FIG. Must be determined before decompression processing. This is because, in image compression data compressed in MCU units in the horizontal scanning direction, the coded bits of the MCU are not arranged in the vertical scanning direction.
[0035]
From the coded bit position a1 at the end of the decompression processing of the MCU at the position (h, v), at the start of the decompression processing of the MCU at the position (h, v + 1) which is the next MCU in the vertical scanning direction If the vertical bit length bx up to the coding bit position a2 is represented by Vbitlen (h, v), the vertical bit length Vbitlen (h, v) is the coding bit of the MCU at the position (h, v). If the length is bitlen (h, v), it can be obtained by the following formula.
Figure 0003559419
(However, v ≠ Vmax)
In the above equation, the first term on the right side corresponds to the coded bit length b1 shown in FIG. 2, and the second term corresponds to the coded bit length b2 shown in FIG.
[0036]
In the present embodiment, it is assumed that the coded bit length of each MCU is calculated and stored in the coded bit length table 22a, and the vertical bit length Vbitlen (h, v) is calculated by the MCU head block parameter generation unit 25 according to equation (1). Shall be sought.
[0037]
Equation (1) is
Figure 0003559419
It can be expanded as follows. That is,
Figure 0003559419
Can be obtained with a shorter number of calculations.
[0038]
Further, as the DC component table 22b, it is necessary to prepare a data table having an array of the number of MCUs for each type of pixel components such as luminance and color difference.
[0039]
FIG. 3 is a diagram illustrating a configuration example of a block in the MCU. In the case of a color image, a block as shown in FIG. 3 is arranged for each type of pixel component to constitute one MCU, but FIG. 3 shows only a block for one pixel component in order to simplify the description. ing.
[0040]
The MCU is composed of an arbitrary number of blocks composed of (8 × 8) pixels, and the reading of the DC component is sequentially performed in block units. The MCU shown in FIG. 3 includes four blocks (blocks n-3, n-2, n-1, and n).
[0041]
The MCU information table creation unit 20 scans the compressed image data in the horizontal direction of the screen, calculates the sum of all DC components from the first block to each block of the compressed image data as a DC component difference value of each block, and The DC component difference value of the last block of the MCU is recorded in the DC component table 22b as the DC component difference value of each MCU.
[0042]
Assuming that the value of the DC component of the n-th block is DC (n), the DC component difference value ΔDC (n) of the n-th block can be obtained by the following formula.
[0043]
ΔDC (1) = 0 when n = 1
When n ≧ 2 ΔDC (n) = DC (n)ΔDC (n-1)
As a result, difference data between the original value (not the difference) of the DC component of the last block of each MCU and the original value of the DC component of the first block of the image compression data is recorded in the DC component table 22b. become. Therefore, by referring to the DC component table 22b, in order to obtain the original value of the DC component of one block, the value of each DC component from the head block of the encoded image compressed data to the one block is obtained. No need to read
[0044]
The MCU head block parameter generation unit 25 reads the DC component difference value of the MCU that has been decompressed in the MCU processing unit 10 from the DC component table 22b, and inputs it to the MCU processing unit 10 as a parameter for the decompression process of the next MCU. The MCU processing unit 10 receives the original DC component of each block constituting the next MCU based on the DC component difference value of the MCU that has just completed the decompression process and that is input from the MCU head block parameter generation unit 25. Find the value.
[0045]
Also, the MCU head block parameter generation unit 25 performs the decompression processing of the MCU at the next horizontal position at the start point in the vertical scanning direction, that is, when v = 1 in FIG. The parameters to be used are stored in the internal memory, and the parameters stored in the internal memory are output for the processing for expanding the MCU in the next row when v = Vmax when the processing for expanding the MCU for one row in the vertical direction is completed. You may make it.
[0046]
Next, the screen processing unit 30 expands the compressed image data. One screen of image compressed data is input from the image data input unit 31 to the MCU processing unit 10, and the MCU processing unit 10 temporarily stores the input image compressed data in the image compressed data memory 11 and stores it in the image compressed data memory 11. The decompression process is sequentially performed on the compressed image data in MCU units. The MCU processing unit 10 decompresses the image compressed data for each block, and after the decompression process of the block for one MCU is completed, the MCU head block parameter generation unit 25 sends the MCU for performing the next decompression process in the image compressed data. , A parameter including bit position information indicating the position of the coded bit is input, and expansion processing of the next MCU is performed based on this parameter. The MCU head block parameter generation unit 25 refers to the MCU information table 22 when the MCU processing unit 10 completes the decompression processing for one MCU, and reproduces the original image data of the MCU at the next position in the vertical scanning direction. Bit position information indicating the position of the coded bit of this MCU, which is a parameter, and the DC component difference value of the one MCU whose decompression processing has been completed immediately before are obtained and input to the MCU processing unit 10. By repeating such an operation, the expansion processing of the image compression data in the screen vertical direction is realized.
[0047]
The original image data decompressed by the MCU processing unit 10 is sequentially recorded in the image data output buffer 33 by the image data generation unit 32 in the vertical direction of the screen, and is stored in the image data output buffer 33 for one column of MCU in the vertical scanning direction. Is output by the image data vertical output unit 34 as original image data for one column in the vertical direction each time the original image data is output. After the output is completed, the original image data recorded in the image data output buffer 33 is deleted.
[0048]
As described above, according to the present embodiment, an MCU information table that stores information such as the coded bit length data of each MCU is created for each screen, and the MCU information table is referred to for the next compressed image data. By generating information such as the position of the coded bit of the MCU to be decompressed, and using the generated information for decompression processing in MCU units, the entire image is decompressed when the original image is reproduced in the vertical scanning direction. Since there is no need to perform the processing, the storage capacity of the data buffer for screen output can be reduced to 1 / the number of MCUs in the screen horizontal direction.
[0049]
Here, taking a case where image information is compressed and decompressed by a JPEG (Joint Photographic Experts Group) method as an example, a comparison will be made between the case where the present embodiment is used and the case where the related art is used.
[0050]
As a comparison condition, a color image having an image size of 640 × 480 dots, which corresponds to a Y: U: V ratio (ratio of luminance and color difference) of 4: 1: 1 or 4: 2: 2 in a baseline method, is targeted. It is assumed that the data buffer for storing the image information contains data obtained by completely reproducing the image information for which no data thinning has been performed.
[0051]
According to the above conditions, the size of one MCU to divide a screen is 16 × 16 dots, and one screen is composed of a total of 1200 MCUs of 40 horizontal × 30 vertical, and 1 MCU is 64 bytes of 8 × 8 pixels vertically and horizontally. It can be derived that the number of pixel components is a total of three components of one luminance component and two color difference components. In the worst case, Huffman compression in JPEG processing converts one byte to 16 bits.
[0052]
Therefore, since the maximum bit length of one MCU is 64 × 8 × 16 = 8192 bits, it is sufficient to prepare a table of 16 bits per MCU, that is, a 2-byte width as the coding bit length table 22a. Since the DC component is determined to be 1 byte wide and there are three types of pixel components, it is necessary to prepare a table of 1 × 3 bytes per MCU as the DC component table 22b. Therefore, the storage capacity required for the MCU information table 22 is 1200 × (2 + 1 × 3) = 6 KB.
[0053]
In the conventional method, the image data output buffer requires a capacity equivalent to the image size multiplied by the number of pixel components, that is, 640 × 480 × 3 = 900 KB. In the present embodiment, the image data output buffer for one column of MCU in the vertical scanning direction is required. Can be arranged as much as possible, and it is understood that the required capacity in the conventional method is 1 / the number of MCUs in the horizontal scanning direction, that is, 900 ÷ 40 = 22.5 KB.
[0054]
As can be understood from the above, in the present embodiment, even if the storage capacity required for the MCU information table 22 is subtracted, the storage capacity required for data decompression can be significantly reduced.
[0055]
In the present embodiment, the data of the coded bit length table 22a is the coded bit length of each MCU, that is, the total value of the coded bit lengths of the blocks constituting each MCU. The bit width to be recorded is made wider than that of the present embodiment, and as the coded bit length table 22a, the image compression data memory of the bit length total value up to the MCU of the next vertical position or the data of the MCU of the next vertical position Eleven storage addresses may be recorded.
[0056]
Furthermore, the present invention is not limited to the present embodiment, in which image-compressed data that has been subjected to variable-length coding in units of MCUs in the order in which images are scanned in the horizontal direction is expanded in units of MCUs in the vertical direction. The present invention is not limited to the order of variable-length encoding during image compression, and can be applied to other uses as a method and apparatus for reproducing original image data in MCU units in a predetermined order. That is, by changing the order of the MCUs for outputting the parameters by the MCU head block parameter generation unit 25, the decompression process is not performed on all the image compressed data for one screen, and the MCU unit is determined in a predetermined order other than the vertical scanning direction. To reproduce the original image data.
[0057]
【The invention's effect】
As described above, according to the present invention, the position of the coded bit of a predetermined MCU in image compressed data can be obtained based on the coded bit length of each MCU in the image compressed data obtained by the variable length decoding process. Therefore, it is possible to reproduce the original image data of a predetermined MCU without performing the decompression processing on all the image compression data for one screen. For this reason, the original image data can be reproduced in a predetermined order in MCU units, without being limited to the order of variable-length encoding at the time of image compression.
[0058]
In particular, from the compressed image data variable-length coded in MCU units in the order in which the image is scanned in the horizontal direction, the image is scanned in the vertical direction without performing decompression processing on all the image compressed data for one screen. Original image data can be reproduced in MCU units. For this reason, the memory size of the image data output buffer may be 1 / the number of MCUs in the horizontal direction of the image having a memory size necessary to store image data for one screen. Data can be read and output in the vertical direction in MCU units.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image compression data decompression device according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of MCU division in image data, and is a conceptual diagram illustrating scanning of an MCU in a vertical scanning direction.
FIG. 3 is a diagram illustrating an example of a configuration of a block in an MCU.
FIG. 4 is a block diagram showing a configuration of a conventional image compression data decompression device.
[Explanation of symbols]
10 MCU processing unit
20 MCU information table creation unit (MCU information generation unit)
25 MCU top block parameter generation unit (MCU processing information generation unit)
33 Image data output buffer
34 Image data vertical output unit

Claims (3)

画像データをブロック毎に圧縮し、所定数のブロックからなるMCU( Minimum Coded Unit )単位で可変長符号化して得られた画像圧縮データを伸張して原画像データを再生する画像圧縮データの伸張方法であって、
前記画像圧縮データに対して可変長復号化処理を行い、この可変長復号化処理結果から前記画像圧縮データにおける各MCUの符号化ビット長を求める第1の工程と、
前記第1の工程において求めた前記画像圧縮データにおける各MCUの符号化ビット長を基にして、前記画像圧縮データにおける伸張対象の一のMCUの符号化ビットの位置を求め、求めた位置の前記一のMCUの符号化ビットに対して伸張処理を行う第2の工程とを備え、
前記画像圧縮データは、画像を水平方向に走査する順にMCU単位で可変長符号化されたものであり、
前記第2の工程を、伸張対象の一のMCUを画像を垂直方向に走査する順に指定しつつ、繰り返し行う
ことを特徴とする画像圧縮データの伸張方法。
A method of decompressing image data by compressing image data for each block and decompressing the image data obtained by performing variable length coding in units of MCU ( Minimum Coded Unit ) consisting of a predetermined number of blocks to reproduce the original image data And
Performing a variable-length decoding process on the image-compressed data, and determining a coding bit length of each MCU in the image-compressed data from the result of the variable-length decoding process;
On the basis of the coded bit length of each MCU in the compressed image data obtained in the first step, the position of the coded bit of one MCU to be decompressed in the compressed image data is obtained. A second step of performing a decompression process on the coded bits of one MCU,
The compressed image data is variable-length coded in MCU units in the order in which the image is scanned in the horizontal direction,
A method of decompressing compressed image data, wherein the second step is repeatedly performed while designating one MCU to be decompressed in the order in which an image is scanned in the vertical direction.
画像データをブロック毎に圧縮し、所定数のブロックからなるMCU単位で可変長符号化して得られた画像圧縮データを入力とし、この画像圧縮データを伸張して原画像データを再生する画像圧縮データの伸張装置であって、
前記画像圧縮データを入力とし、入力した画像圧縮データに対してMCU単位で伸張処理を行うMCU処理部と、
前記画像圧縮データを入力とし、入力した画像圧縮データに対して可変長復号化処理を行い、この可変長復号化処理結果から前記画像圧縮データにおける各MCUの符号化ビット長を求めるMCU情報生成部と、
前記MCU情報生成部により求められた前記画像圧縮データにおける各MCUの符号化ビット長を基にして、前記画像圧縮データにおける一のMCUの符号化ビットの位置を示すビット位置情報を求め、求めたビット位置情報を前記MCU処理部に入力するMCU処理情報生成部とを備え、
前記MCU処理部は、前記画像圧縮データにおける,前記MCU処理情報生成部から入力されたビット位置情報が示す位置の一のMCUの符号化ビットに対して伸張処理を行うことにより、前記一のMCUの原画像データを再生するものであり、かつ、
前記画像圧縮データは、画像を水平方向に走査する順にMCU単位で可変長符号化されたものであり、
前記MCU処理情報生成部は、ビット位置情報を求める一のMCUを,画像を垂直方向に走査する順に特定するものである
ことを特徴とする画像圧縮データの伸張装置。
Image compressed data obtained by compressing image data for each block and inputting image compressed data obtained by performing variable length coding in units of MCU consisting of a predetermined number of blocks, expanding this image compressed data and reproducing the original image data Stretching device,
An MCU processing unit that receives the image compressed data as input and performs decompression processing on the input image compressed data in MCU units;
An MCU information generating unit which receives the image compressed data as input, performs variable length decoding on the input image compressed data, and obtains an encoding bit length of each MCU in the image compressed data from the result of the variable length decoding process When,
Based on the coded bit length of each MCU in the compressed image data determined by the MCU information generation unit, bit position information indicating the position of the coded bit of one MCU in the compressed image data was determined and determined. An MCU processing information generation unit that inputs bit position information to the MCU processing unit,
The MCU processing unit performs the decompression process on the coded bit of one MCU at the position indicated by the bit position information input from the MCU processing information generation unit in the image compression data, thereby performing the one MCU. To reproduce the original image data of
The compressed image data is variable-length coded in MCU units in the order in which the image is scanned in the horizontal direction,
The apparatus for decompressing compressed image data, wherein the MCU processing information generation unit specifies one MCU for obtaining bit position information in the order in which the image is scanned in the vertical direction.
請求項2記載の画像圧縮データの伸張装置において、
前記MCU処理部により再生された一のMCUの原画像データを順次蓄積する画像データ出力バッファと、
前記画像データ出力バッファに一のMCUの原画像データが原画像垂直方向のMCUの個数分蓄積されたとき、前記画像データ出力バッファに蓄積された画像データを当該画像圧縮データの伸張装置から出力する画像データ垂直出力部とを備えている
ことを特徴とする画像圧縮データの伸張装置。
The image compression data decompression device according to claim 2 ,
An image data output buffer for sequentially storing original image data of one MCU reproduced by the MCU processing unit;
When the original image data of one MCU is accumulated in the image data output buffer by the number of MCUs in the original image vertical direction, the image data accumulated in the image data output buffer is output from the image compression data decompression device. An image compression data decompression device, comprising: an image data vertical output unit.
JP6408097A 1997-03-18 1997-03-18 Method and apparatus for decompressing compressed image data Expired - Fee Related JP3559419B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6408097A JP3559419B2 (en) 1997-03-18 1997-03-18 Method and apparatus for decompressing compressed image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6408097A JP3559419B2 (en) 1997-03-18 1997-03-18 Method and apparatus for decompressing compressed image data

Publications (2)

Publication Number Publication Date
JPH10262249A JPH10262249A (en) 1998-09-29
JP3559419B2 true JP3559419B2 (en) 2004-09-02

Family

ID=13247761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6408097A Expired - Fee Related JP3559419B2 (en) 1997-03-18 1997-03-18 Method and apparatus for decompressing compressed image data

Country Status (1)

Country Link
JP (1) JP3559419B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2003034709A1 (en) * 2001-10-17 2005-02-10 ナルテック株式会社 Decompression method and data processing apparatus
WO2003047272A2 (en) * 2001-11-21 2003-06-05 General Instrument Corporation Macroblock level adaptive frame/field coding for digital video content
JP4371632B2 (en) 2002-06-05 2009-11-25 キヤノン株式会社 Image recording apparatus and recording control method therefor

Also Published As

Publication number Publication date
JPH10262249A (en) 1998-09-29

Similar Documents

Publication Publication Date Title
US6643408B2 (en) Image coding and decoding apparatus, method of image coding and decoding, and recording medium for recording program for image coding and decoding
JPH1118087A (en) Device and method for converting image data
JP3984094B2 (en) Image processing apparatus and image processing method
JP3559419B2 (en) Method and apparatus for decompressing compressed image data
JP2006203270A (en) Image compression method and device
JP2003189109A (en) Image processor and image processing method, and computer program
JPH1175183A (en) Image signal processing method and device and storage medium
JP3023215B2 (en) Image processing device
JP3709106B2 (en) Image compression and decompression device
JP2791410B2 (en) Compressed image data extraction device
JP2839392B2 (en) Image data restoration method and apparatus
JP2006340300A (en) Signal processing method, signal processing apparatus, signal processing program and information recording medium
JPH10341437A (en) Image processing method and device therefor
JP2000244744A (en) Image data compression method and image data management method
JP3837197B2 (en) Image data decompression device
JP2935320B2 (en) Image compression / decompression device
JP2004253889A (en) Image processing apparatus and method
JP4274187B2 (en) Display data decompression method, display data compression / decompression method, display data decompression device, and display data compression / decompression device
JP3593727B2 (en) Image compression device
JPH07264591A (en) Scanning method for original image data
JPH04971A (en) Picture encoding system
KR100246390B1 (en) Block noise removing apparatus in image signal processor
JP3075935B2 (en) Still image coding method
JP2000232650A (en) Image processing method, image processor and recording medium
JPH10136363A (en) Compressed data decoder and compressed data decoding method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040414

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040521

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees