JP2004336661A - Method and instrument for picture decoding - Google Patents

Method and instrument for picture decoding Download PDF

Info

Publication number
JP2004336661A
JP2004336661A JP2003133534A JP2003133534A JP2004336661A JP 2004336661 A JP2004336661 A JP 2004336661A JP 2003133534 A JP2003133534 A JP 2003133534A JP 2003133534 A JP2003133534 A JP 2003133534A JP 2004336661 A JP2004336661 A JP 2004336661A
Authority
JP
Japan
Prior art keywords
data
group
pixel
register
decoded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2003133534A
Other languages
Japanese (ja)
Inventor
Kaname Tomiyasu
要 富安
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2003133534A priority Critical patent/JP2004336661A/en
Publication of JP2004336661A publication Critical patent/JP2004336661A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To perform decoding by smaller operand when encoded each pixel is decoded by using template based on a reference pixel. <P>SOLUTION: Source position of template in a first register which memorizes data of decoded pixels is fixed, and data of a group of the decoded pixels contained in the template are read to a second register (S103). The data of the group of the pixels which are read to the second register are linked in single dimension (S104). By using the linked data of the group of the pixels, pixels which are encoded by using the data of the group of the pixels at the time of encoding are decoded. Decoded data of the pixels are overwritten on data of the pixels before decoding in the first register. After that, storage location of each data memorized with the first register is shifted in the predetermined direction by 1 bit. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、画像における画素のデータを、当該画素の位置に応じた位置に配置されたテンプレートに含まれる画素群のデータを用いて符号化することで得られる画像符号化データを復号する画像復号装置、この画像復号装置が行う画像復号方法に関するものである。
【0002】
【従来の技術】
テンプレートの形状によって決まる参照画素データ群から処理対象画素の画素値を予測して符号化された画像情報の従来の復号方法を図4、図5を用いて説明する。
【0003】
図4(a)は画像情報を復号する際に使用するテンプレートの形状の例を示す図で、図4(b)は上記符号化方法により符号化された画像情報を復号するためのテンプレートの使用方法を説明するための図である。また、図5は第1のレジスタ群に読み込まれる復号済みの画素データ群から、1次元的に連結された参照画素データ群を得る様子を示す図である。
【0004】
図4(a)において、Aで示した位置の画像情報(以下、処理対象画素A)を復号するときには、周辺に位置する復号済みの画素データ群(図4の網掛け部分、即ち、テンプレートの領域)を参照する。これらの参照画素データ群は通常メモリ上に格納されているので、これら参照画素データ群を使用する場合には、これら参照画素データ群を今メモリから所定のレジスタへ読み込んで格納する必要がある。
【0005】
図4(b)に示したテンプレートは3行にまたがっているので、図5に示すように第1のレジスタ群として3個のレジスタ1、2、3を用意し、復号時にはメモリに格納された復号済み画素データ群をこれらのレジスタ群に読み出し、格納する。レジスタ1には(m−2)行目の復号済み画素データ群を、レジスタ2には(m−1)行目の復号済み画素データ群を、レジスタ3には処理対象画素Aと同一の行m(以下、処理対象行)の復号済み画素データ群をそれぞれ読み込んで格納する。
【0006】
メモリからレジスタへのデータの読み込みは通常バイト単位で行なわれるので、参照画素データ群以外の不要な復号済み画素データ群も同時に読み込んでしまうことがある。そこで、図5のように第1のレジスタ群と同数の第2のレジスタ群としてレジスタ4、5、6を用意し、第1のレジスタ群から読み込んだ参照画素データ群にマスクをかけて第2のレジスタ群に参照画素データ群だけを取り出す。すなわち、レジスタ1から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ4にテンプレートの1行目の参照画素データ群を得る。また、レジスタ2から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ5にテンプレートの2行目の参照画素データ群を得る。同様に、レジスタ3から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ6にテンプレートの3行目の参照画素データ群を得る。
【0007】
必要な全ての参照画素データ群は3個のレジスタ4、5、6に分割して格納されるが、このままでは処理対象画素Aの復号が複雑になる。そこで、図5の下部に示すように、参照画素データ群を1次元的に連結して参照画素データ群を一つのレジスタ7にまとめる。そしてこのように連結された参照画素データ群を参照することによって、処理対象画素Aを復号することができる。処理対象画素Aの復号が終わると、新たな処理対象画素であるAの右隣の画素を復号する準備としてテンプレートを右方向に1画素分移動させる。
【0008】
以上説明した方法、即ち従来の方法により、第2のレジスタ群(レジスタ4、5、6)に取り出された参照画素データ群から1次元的に連結された参照画素データ群をレジスタ7に得る様子を図6に2つ示す。
【0009】
図6は第2のレジスタ群に取り出された参照画素データ群を一次元的に連結してレジスタ7に格納する処理を説明する為の図である。
【0010】
図6(a)に示す例では、レジスタ4では左に2ビットシフト、レジスタ5では右に4ビットシフト、レジスタ6では右に12ビットシフトして、シフトされたそれぞれの参照画素データ群を連結(論理和演算)することによって、レジスタ7に1次元的に連結された参照画素データ群を得る。
【0011】
一方、図6(b)に示す例では、レジスタ4では左に9ビットシフト、レジスタ5は左に3ビットシフト、レジスタ6では右に5ビットシフトして、シフトされたそれぞれの参照画素データを連結することによって、レジスタ7に1次元的に連結された参照画素データ群を得る。
【0012】
このように、参照画素に基づくテンプレートを用いた符号化、復号に関するものとしては、JBIG方式(ITU−T T82)の符号化が知られている(例えば非特許文献1を参照)。
【0013】
このように第2のレジスタ群における処理対象画素Aの相対位置が変わると、夫々のレジスタのシフト方向、そしてシフトするビット数を変えなければ、レジスタ7に1次元的に連結された参照画素データ群を得ることができない。実際には第2のレジスタ群における処理対象画素Aの相対位置によって8通りのシフト形態が考えられる。
【0014】
【非特許文献1】
ディジタル静止画像圧縮符号化関連勧告集(ITU−T T82) 平成6年1月25日発行
【0015】
【発明が解決しようとする課題】
上記のように、従来手法では第2のレジスタ群における処理対象画素Aの相対位置によって、第2のレジスタ群に取り出される参照画素データ群に対して適用するシフト形態を変えなければならないため、1次元的に連結された参照画素データ群を得るための演算数が多くなってしまう。
【0016】
本発明は以上の問題に鑑みてなされたものであり、符号化された各画素を、参照画素に基づくテンプレートを用いて復号する場合に、より少ない演算数で行うことを目的とする。
【0017】
【課題を解決するための手段】
本発明の目的を達成するために、例えば本発明の画像復号方法は以下の構成を備える。
【0018】
すなわち、復号済みの画素データを記憶する第1のレジスタ群と、当該第1のレジスタとは異なる第2のレジスタ群とを備え、画像における画素のデータを、当該画素の位置に応じた位置に配置されたテンプレートに含まれる画素群のデータを用いて符号化することで得られる画像符号化データを復号する画像復号装置が行う画像復号方法であって、
前記第1のレジスタ群における前記テンプレートの位置を固定させ、前記テンプレートに含まれる復号済みの画素群のデータを第2のレジスタ群に読み出す読み出し工程と、
前記第2のレジスタ群に読み出された画素群のデータを一次元的に連結する連結工程と、
前記連結工程で連結した画素群のデータを用いて当該画素群のデータを符号化時に用いて符号化した画素が復号され、復号された当該画素のデータが前記第1のレジスタ群における復号前の当該画素のデータに上書きされた後に、前記第1のレジスタ群が記憶する各データの記憶位置を所定の方向に1ビット分シフトさせるシフト工程と
を備えることを特徴とする。
【0019】
本発明の目的を達成するために、例えば本発明の画像復号装置は以下の構成を備える。
【0020】
すなわち、画像における画素のデータを、当該画素の位置に応じた位置に配置されたテンプレートに含まれる画素群のデータを用いて符号化することで得られる画像符号化データを復号する画像復号装置であって、
復号済みの画素データを記憶する第1のレジスタ群と、
前記第1のレジスタ群における前記テンプレートの位置を固定させ、前記テンプレートに含まれる復号済みの画素群のデータを第2のレジスタ群に読み出す読み出し手段と、
前記第2のレジスタ群に読み出された画素群のデータを一次元的に連結する連結手段と、
前記連結手段が連結した画素群のデータを用いて当該画素群のデータを符号化時に用いて符号化した画素が復号され、復号された当該画素のデータが前記第1のレジスタ群における復号前の当該画素のデータに上書きされた後に、前記第1のレジスタ群が記憶する各データの記憶位置を所定の方向に1ビット分シフトさせるシフト手段と
を備えることを特徴とする。
【0021】
【発明の実施の形態】
以下添付図面を参照して、本発明を好適な実施形態に従って詳細に説明する。
【0022】
[第1の実施形態]
本実施形態では上記テンプレートを用いた周知の符号化処理によって符号化された画像を、後述の画像復号処理によって復号する画像復号装置として、RISC(Reduced Instruction Set Computer)プロセッサを用いたコンピュータを適用した場合について説明する。
【0023】
図7は本実施形態に係る画像復号装置の基本構成を示すブロック図である。701はCPUで、上述の通りRISC(Reduced Instruction Set Computer)プロセッサであって、RAM702やROM705に記憶されているプログラムやデータを用いて本装置全体の制御を行うと共に、後述の画像復号処理を実行する。また内部には後述する第1のレジスタ群703、第2のレジスタ群704を備える。
【0024】
702はRAMで、CPU701が各種の処理を行うために必要なワークエリアを備えると共に、外部記憶装置708や記憶媒体ドライブ709からロードされたプログラムやデータを一時的に記憶するためのエリアも備える。
【0025】
703は第1のレジスタ群で、復号済みのデータを一時的に記憶する。第1のレジスタ群703の詳細については後述する。
【0026】
704は第2のレジスタ群で、画像符号化データにおいて注目画素を復号するために必要な画素群のデータを後述する方法により第1のレジスタ群703から読み出して一時的に記憶する。第2のレジスタ群704の詳細については後述する。
【0027】
705はROMで、本装置全体の制御を行うためや、本装置の設定のためのプログラムやデータを格納する。
【0028】
706は表示部で、CRTや液晶画面等により構成されており、画像や文字情報などの各種の情報を表示することができ、例えば、後述復号処理の対象となる画像や、後述の復号処理を指示するためのGUIなどを表示することができる。
【0029】
707は操作部で、キーボードやマウスなどにより構成されており、各種の指示をCPU701に入力することができる。
【0030】
708は外部記憶装置で、一般にはハードディスクドライブなどの大容量情報記憶装置により構成されており、ここにはOSや後述する画像復号処理をCPU701に実行させるためのプログラムやデータが保存されており、これらプログラムやデータは必要に応じてCPU701からの指示に従ってRAM702にロードされる。また、外部記憶装置708には、処理対象の画像符号化データを保存されており、これも必要に応じてCPU701からの指示に従ってRAM702にロードされる。
【0031】
709は記憶媒体ドライブで、CD−ROMやDVD−ROMなどの記憶媒体に記憶されているプログラムやデータを読み出し、外部記憶装置708に出力することができる。なお上記外部記憶装置708に保存されている上記プログラムやデータをこの記憶媒体に記憶させておき、必要に応じてRAM702にロードするようにしても良い。
【0032】
710は上述の各部を繋ぐバスである。
【0033】
次に、上記構成を備える画像復号装置が行う、本実施形態に係る画像復号処理について説明する。図1はこの画像復号処理のフローチャートである。同図のフローチャートに従ったプログラムは外部記憶装置708もしくは記憶媒体ドライブ709からRAM702にロードされ、CPU701がこれを実行することで、本実施形態に係る画像復号装置は後述する画像復号処理を行うことができる。
【0034】
また、図2は、図1に示したフローチャートに従って復号処理を行う場合の、第1のレジスタ群703、第2のレジスタ群704の記憶内容を示す図である。以下、図1,2を用いて、本実施形態に係る画像復号処理について説明する。
【0035】
先ず復号の準備として、第1のレジスタ群703としてレジスタ1,2,3を、第2のレジスタ群704としてレジスタ4,5,6を、そして後述の処理により一次元的に連結された参照画素群のデータを格納する為のレジスタ7をCPU101内部に用意する。
【0036】
画像符号化データを復号する場合、画像の1行目から順に2行目、3行目、、、と復号するので、m行目を復号する場合にはn<mを満たす全てのnについてn行目は既に復号されており、復号された行の画素データはRAM702の所定の領域や外部記憶装置708(以下、これら「復号済みの画素データを記憶するためのメモリ」を総称して「復号済み画素データメモリ」と呼称する)に出力され、記憶される。
【0037】
従って、これから復号しようとする行(処理対象行)をm行目とした場合に、レジスタ1には(m−2)行目の復号済み画素データが復号済み画素データメモリから書き込まれ、レジスタ2には(m−1)行目の復号済み画素データが復号済み画素データメモリから書き込まれる。またレジスタ3は、処理対象行であるm行目の復号済み画素データを格納するために使用する。
【0038】
なお本実施形態ではレジスタ3には1バイト分の復号済み画素データを記憶させることができ、1バイト分の復号済み画素データが書き込まれると、これらは上記復号済み画素データメモリに出力される。このことから、第1のレジスタ群703の各レジスタ(1,2,3)はバイト単位で復号済みの画素データを記憶することができる。なお、本実施形態ではレジスタ1,2は3バイト分、レジスタ3は1バイト分とするが、これに限定されるものではない。
【0039】
上記準備が整うと、CPU701は第1のレジスタ群703に、復号済みの画素データを読み込むか否かを判断する(ステップS101)。読み込む場合には処理をステップS102に進め、先ず1バイト分の復号済みの画素データを、第1のレジスタ群703に読み込む(ステップS102)。具体的に、レジスタ1には(m−2)行目の1バイト分の復号済み画素データ群を、レジスタ2には(m−1)行目の1バイト分の復号済み画素データ群を読み込む。
【0040】
図2(a)は、ステップS102でレジスタ1,2の夫々に1バイト分の復号済み画素データ群を読み込む前の第1のレジスタ群703の記憶内容を示す図で、図2(b)は、ステップS102でレジスタ1,2の夫々に1バイト分の復号済み画素データ群を読み込むんだ後の第1のレジスタ群703の記憶内容を示す図である。
【0041】
図2(a)ではレジスタ1,2の最後1バイト分には何も読み込まれていないが、ステップS102における処理によって図2(b)に示すとおり、レジスタ1,2の最後の1バイト分に、夫々(m−2)行目、(m−1)行目の次の1バイト分の復号済みの画素データが読み込まれている。なお、図2(a)、(b)において斜線部分はテンプレートに含まれる部分を示しており、このテンプレートの位置は第1のレジスタ群703において固定しているものとする(換言すれば、第1のレジスタ群703における斜線部分の位置は固定されているものとする)。
【0042】
次に、図2(a)、(b)にAで示す位置の画素を復号する為に必要な参照画素群のデータ、即ち斜線部分の画素データを第1のレジスタ群703から第2のレジスタ群704に読み出す(ステップS102)。
【0043】
具体的には、レジスタ1から読み込んだ復号済み画素データ群にマスクをかけて(レジスタ1が格納する画像データ群のうち、参照画素データ群以外を0として読み出す)、レジスタ4にテンプレートの1行目の参照画素データ群((m−2)行目の画像のデータ)を得る。また、レジスタ2から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ5にテンプレートの2行目の参照画素データ群((m−1)行目の画像のデータ)を得る。同様に、レジスタ3から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ6にテンプレートの3行目の参照画素データ群(m行目の画像のデータ)を得る。
【0044】
図2(c)は、ステップS102において、取り出された参照画素データ群が記憶された第2のレジスタ群704の記憶内容を示す図である。同図に示すように、第1のレジスタ群703において、参照画素群のデータのみが第2のレジスタ群704に取り出されており、それ以外には0が記憶されている。
【0045】
次に、新たな復号対象である、Aで示す位置の右隣の位置の画素の復号の準備として、第1のレジスタ群703が記憶する各データの記憶位置を左の方向に1ビット分(1画素分)シフトさせる(ステップS103)。図2(d)はステップS103におけるシフト処理後の第1のレジスタ群703の記憶内容を示す図である。同図に示すように、レジスタ1,2の右端には復号済みの画素のデータが記憶されていない部分が1ビット分でき、レジスタ3の右端には図2(a)、(b)においてAで示す位置の画素のデータが記憶されている。当然このレジスタ3の右端に記憶されているデータ(図2(d)でAで示す位置に記憶されているデータ)はまだ復号されていないため、値が決まっていない。
【0046】
次に、第2のレジスタ群704に取り出された参照画素群のデータを一次元的に連結する処理を行う(ステップS104)。具体的には先ず、各レジスタ(4,5,6)が記憶しているデータを予め決まった方向、決まったビット数分だけシフトする。図2(c)を例に取ると、レジスタ4は右に2ビットシフト、レジスタ5は右に8ビットシフト、レジスタ6は16ビット右にシフトする。
【0047】
このようにシフトした結果の第2のレジスタ群704の記憶内容を図2(e)に示す。そして各レジスタ4,5,6において同じ記憶位置同士で論理和演算を行うことで、各レジスタ4,5,6の記憶内容を連結し、レジスタ7に格納する。図2(f)はレジスタ7の記憶内容を示す図である。同図において斜線部分のうち、先頭の4ビット分はレジスタ4が記憶していた参照画素群のデータ、次の7ビット分はレジスタ5が記憶していた参照画素群のデータ、そして最後の3ビット分はレジスタ6が記憶していた参照画素群のデータであり、結果としてレジスタ7にはレジスタ4,5,6の夫々が記憶していた参照画素群のデータを一次元的に連結したものが記憶されている。
【0048】
従来では上述の通り、次の画素を復号する場合には、第2のレジスタ群704においてテンプレートの位置が変化していたので(換言すれば、第2のレジスタ群704における復号対象画素の位置が変化していたので)、各レジスタでシフトする方向とシフトするビット数はその都度異なり、予め決めておくことはできないので、これをその都度求める必要があり、計算も複雑であった。
【0049】
しかし本実施形態に係る復号処理では、第2のレジスタ群704におけるテンプレートの位置が変化しないので(換言すれば、第2のレジスタ群704における復号対象画素の位置が変化しないので)、次の画素を復号する場合にも各レジスタでシフトする方向とシフトするビット数は常に同じであって、予め決めておくことができるので、計算をより簡便に行うことができ、より高速に一次元的に連結された参照画素群のデータを得ることができる。
【0050】
そしてこのようにして得られた一次元的に連結された参照画素群のデータを用いて、周知の方法により上記Aで示した位置の画素の復号処理を行い(ステップS105)、シフト後の第1のレジスタ群703における上記Aで示す位置(本実施形態では図2(d)におけるAで示す位置)に復号した画素のデータを上書きする(ステップS106)。これにより、図2(d)のAの位置には復号済みの画素のデータが記憶されていることになる。
【0051】
そして次に、まだ復号済み画素データメモリに書き込まれていない復号データを復号済み画素データメモリに書き込むか否かを判断する(ステップS107)。これは例えば書き込む単位を1バイト単位とする場合には、ステップS107では1バイト分の復号処理を行ったか否かを判断する。そして書き込むと判断した場合には処理をステップS108に進め、まだ復号済み画素データメモリに書き込まれていない復号データを復号済み画素データメモリに書き込む(ステップS108)。
【0052】
そして次に、1行分の画素を全て復号したか否かを判定する(ステップS109)。全て処理していなければ処理をステップS101に戻し、以降の処理を繰り返す。
【0053】
以上の説明により、本実施形態に係る画像復号装置は、第2のレジスタ群704の夫々のレジスタが記憶する参照画素群のデータを一次元的に連結する場合に、各レジスタでシフトする方向、ビット数を予め固定させておくことができるので、連結処理の際にこれらを従来のように求める必要が無く、復号処理をより簡便にすることができるため、処理全体をより高速化することができる。
【0054】
なお、レジスタ7を用いずに、レジスタ4、5、6のいずれかを代わりに使用してもよい。
【0055】
また本実施形態ではAの位置の画素の右隣の位置の画素の復号準備として、ステップS103で先に第1のレジスタ群703のシフト処理を行ったが、ステップS105でAの位置の画素を復号し、ステップS106で復号した画素のデータを上書きしたのちに、ステップS103におけるシフト処理を行っても良い。
【0056】
[第2の実施形態]
本実施形態では、CPU701としてSIMD(Single Instruction Multiple Data streams)演算能力を有するプロセッサを適用する。なお、本実施形態に係る画像復号装置の基本構成は図1と同じであり、CPU701がSIMDプロセッサであること以外は同じである。
【0057】
具体的に本実施形態に係る復号処理では、テンプレートの形状とCPU701に実装されている命令によって、使用するレジスタの数が適応的に変化する。例えば、図4に示したテンプレートを用い、CPU701は64ビットレジスタを持ち、32ビット単位でシフト演算を適用できる場合には、図3(a)、(b)に示すように、第1のレジスタ群703としてレジスタ1、2を、第2のレジスタ群704としてレジスタ3、4を用意する。図3は本実施形態に係る第1のレジスタ群703、第2のレジスタ群704の記憶内容を示す図である。
【0058】
ここで、”32ビット単位のシフト演算を適用する”とは、64ビットレジスタは2つの32ビットレジスタから構成されるとして、別々にシフト演算を適用できることを意味する。つまり、64ビットレジスタの内容が (x63, x62, …, x33, x32, x31, x30, …, x1, x0) であるとき、32ビット単位のシフト演算(1ビット左シフト)を適用すると、このレジスタの内容は (x62, x61, …, x32, 0, x30, x29, …, x0, 0)となる。
【0059】
図3(a)に示すように、レジスタ1は(m−2)行目と(m−1)行目の復号済み画素データを格納するために使用し、格納される画素データ群は復号済み画素データメモリから読み込んだ画素データ群である。レジスタ2は処理対象行mの復号済み画素データ群を格納するために使用し、格納される画素データ群は復号済みであるが、まだメモリへは書き込まれていない。
【0060】
次に本実施形態に係る復号処理の流れについて説明するが、基本的には第1の実施形態と同じであるので、異なる部分だけについて説明する。
【0061】
ステップS103では、レジスタ1から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ3にテンプレートの1行目と2行目の参照画素データ群を得る。同様に、レジスタ2から読み込んだ復号済み画素データ群にマスクをかけて、レジスタ4にテンプレートの3行目の参照画素データ群を得る。レジスタ1には(m−2)行目と(m−1)行目の復号済み画素データ群が格納されているため、一度に2行分の参照画素群のデータをレジスタ3に読み取ることができる。このため、第1の実施形態よりも一回分少ない処理回数で(m−2)行目と(m−1)行目の復号済み画素データ群をレジスタ3に格納することができる。
【0062】
図3(b)に示すように、レジスタ1において、(m−2)行目、(m−1)行目の参照画素群のデータのみがレジスタ3に取り出されており、それ以外には0が記憶されている。
【0063】
また、ステップS103では、新たな復号対象である、Aで示す位置の右隣の位置の画素の復号の準備として、第1のレジスタ群703が記憶する各データの記憶位置を左の方向に1ビット分(1画素分)シフトさせる。本実施形態では32ビット単位でシフト処理を行うことができるので、第1の実施形態よりも少ない演算数でシフト処理を行うことができる。
【0064】
図3(c)はステップS103におけるシフト処理後の第1のレジスタ群703の記憶内容を示す図である。
【0065】
このように、SIMD演算能力を有するCPU701を用いることで、第1の実施形態のCPU701、即ちRISCプロセッサを用いた場合よりもさらに演算数を減らすことができ、復号処理全体をより高速化することができる。
【0066】
[第3の実施形態]
本実施形態では、CPU701として特殊な命令を有するプロセッサを適用する。なお、本実施形態に係る画像復号装置の基本構成は図1と同じであり、CPU701が特殊な命令を有するプロセッサであること以外は同じであるとする。
【0067】
本実施形態に係る復号処理の流れについて説明するが、基本的には第1の実施形態と同じであるので、異なる部分だけについて説明する。
【0068】
例えば、特別な命令として、レジスタの所定の位置にあるデータ群を他のレジスタに取り出し、元のレジスタのデータ群を指定した数だけシフトするような命令があるとする。この場合、ステップS103において、図2(b)のレジスタ1に格納されている復号済み画素データ群から、図2(c)のレジスタ4のように参照画素データ群を取り出す処理と、図2(d)のレジスタ1のように格納されている復号済み画素データ群をシフトする処理が1つの命令でできるため、これに係る演算数を第1の実施形態と比べて減らすことができ、復号処理全体をより高速化することができる。
【0069】
また、レジスタに格納されているデータを指定した数だけシフトした後、他のレジスタとの論理和をとるような命令があるとする。この場合、ステップS104において、図2(e)の第2のレジスタ群704に格納されている参照画素データ群から、図2(f)のレジスタ7に1次元的に連結された参照画素データ群を得るときの演算数を減らすことができる。
【0070】
このように特別な命令を持つプロセッサを用いた場合、1次元的に連結された参照画素データ群を得る処理に係る演算数を第1の実施形態と比べて減らすことができ、復号処理全体をより高速化することができる。
【0071】
なお、以上の実施形態ではテンプレートの形状を図4に示したものを用いているが、以上の実施形態は、同図に示した形状、サイズのテンプレートに限定されるものではない。
【0072】
[その他の実施形態]
本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体(または記憶媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。
【0073】
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0074】
さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0075】
本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。
【0076】
【発明の効果】
以上の説明により、本発明によって、符号化された各画素を、参照画素に基づくテンプレートを用いて復号する場合に、より少ない演算数で行うことができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係る画像復号処理のフローチャートである。
【図2】図1に示したフローチャートに従って復号処理を行う場合の、第1のレジスタ群703、第2のレジスタ群704の記憶内容を示す図である。
【図3】本発明の第2の実施形態に係る第1のレジスタ群703、第2のレジスタ群704の記憶内容を示す図である。
【図4】(a)は画像情報を復号する際に使用するテンプレートの形状の例を示す図で、(b)は上記符号化方法により符号化された画像情報を復号するためのテンプレートの使用方法を説明するための図である。
【図5】第1のレジスタ群に読み込まれる復号済みの画素データ群から、1次元的に連結された参照画素データ群を得る様子を示す図である。
【図6】第2のレジスタ群に取り出された参照画素データ群を一次元的に連結してレジスタ7に格納する処理を説明する為の図である。
【図7】本発明の第1の実施形態に係る画像復号装置の基本構成を示すブロック図である。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention is directed to image decoding for decoding image encoded data obtained by encoding pixel data in an image using data of a pixel group included in a template arranged at a position corresponding to the position of the pixel. The present invention relates to an apparatus and an image decoding method performed by the image decoding apparatus.
[0002]
[Prior art]
A conventional decoding method of image information encoded by predicting a pixel value of a processing target pixel from a reference pixel data group determined by a template shape will be described with reference to FIGS.
[0003]
FIG. 4A is a diagram showing an example of the shape of a template used when decoding image information, and FIG. 4B is a diagram showing the use of a template for decoding image information encoded by the above encoding method. It is a figure for explaining a method. FIG. 5 is a diagram showing how to obtain a one-dimensionally linked reference pixel data group from the decoded pixel data group read into the first register group.
[0004]
In FIG. 4A, when decoding the image information at the position indicated by A (hereinafter referred to as “processing target pixel A”), a group of decoded pixel data located in the vicinity (the shaded portion in FIG. Region). Since these reference pixel data groups are usually stored on the memory, when these reference pixel data groups are used, it is necessary to read these reference pixel data groups from the memory into a predetermined register and store them.
[0005]
Since the template shown in FIG. 4B extends over three rows, three registers 1, 2, and 3 are prepared as a first register group as shown in FIG. 5, and are stored in the memory at the time of decoding. The decoded pixel data group is read out and stored in these register groups. Register 1 stores the decoded pixel data group in the (m-2) th row, register 2 stores the decoded pixel data group in the (m-1) th row, and register 3 stores the same row as the pixel A to be processed. m (hereinafter, processing target row) decoded pixel data groups are read and stored.
[0006]
Since reading of data from the memory to the register is usually performed in byte units, unnecessary decoded pixel data groups other than the reference pixel data group may be simultaneously read. Therefore, as shown in FIG. 5, registers 4, 5, and 6 are prepared as the second register group having the same number as the first register group, and the reference pixel data group read from the first register group is masked to form the second register group. Fetches only the reference pixel data group into the register group. That is, a mask is applied to the decoded pixel data group read from the register 1 to obtain a reference pixel data group in the first row of the template in the register 4. Further, a mask is applied to the decoded pixel data group read from the register 2 to obtain a reference pixel data group in the second row of the template in the register 5. Similarly, a mask is applied to the decoded pixel data group read from the register 3 to obtain a reference pixel data group in the third row of the template in the register 6.
[0007]
All necessary reference pixel data groups are divided and stored in the three registers 4, 5, and 6. However, decoding of the processing target pixel A becomes complicated as it is. Therefore, as shown in the lower part of FIG. 5, the reference pixel data groups are connected one-dimensionally to combine the reference pixel data groups into one register 7. The processing target pixel A can be decoded by referring to the reference pixel data group thus connected. After the decoding of the processing target pixel A is completed, the template is moved rightward by one pixel in preparation for decoding the pixel on the right of A which is a new processing target pixel.
[0008]
A state in which the reference pixel data group one-dimensionally linked from the reference pixel data group extracted to the second register group (registers 4, 5, 6) is obtained in the register 7 by the method described above, that is, the conventional method. Are shown in FIG.
[0009]
FIG. 6 is a diagram for explaining a process of connecting the reference pixel data groups extracted to the second register group one-dimensionally and storing the data in the register 7.
[0010]
In the example shown in FIG. 6A, the register 4 is shifted by 2 bits to the left, the register 5 is shifted by 4 bits to the right, the register 6 is shifted by 12 bits to the right, and the shifted reference pixel data groups are connected. By performing (OR operation), a reference pixel data group one-dimensionally connected to the register 7 is obtained.
[0011]
On the other hand, in the example shown in FIG. 6B, the register 4 is shifted 9 bits to the left, the register 5 is shifted 3 bits to the left, and the register 6 is shifted 5 bits to the right. By linking, a reference pixel data group one-dimensionally linked to the register 7 is obtained.
[0012]
As described above, JBIG (ITU-T T82) encoding is known as encoding and decoding using a template based on reference pixels (for example, see Non-Patent Document 1).
[0013]
If the relative position of the processing target pixel A in the second register group changes as described above, the reference pixel data one-dimensionally connected to the register 7 unless the shift direction of each register and the number of bits to be shifted are changed. You can't get a group. Actually, eight types of shift modes are conceivable depending on the relative position of the processing target pixel A in the second register group.
[0014]
[Non-patent document 1]
Recommendations on Digital Still Image Compression Coding (ITU-T T82) Published January 25, 1994
[0015]
[Problems to be solved by the invention]
As described above, in the conventional method, the shift mode applied to the reference pixel data group extracted to the second register group must be changed depending on the relative position of the processing target pixel A in the second register group. The number of operations required to obtain a group of dimensionally connected reference pixel data increases.
[0016]
The present invention has been made in view of the above problems, and has as its object to perform a smaller number of operations when decoding each encoded pixel using a template based on reference pixels.
[0017]
[Means for Solving the Problems]
In order to achieve the object of the present invention, for example, an image decoding method of the present invention has the following configuration.
[0018]
That is, a first register group for storing decoded pixel data and a second register group different from the first register are provided, and pixel data in an image is stored in a position corresponding to the position of the pixel. An image decoding method performed by an image decoding device that decodes image encoded data obtained by encoding using pixel group data included in an arranged template,
A reading step of fixing the position of the template in the first register group and reading out data of a decoded pixel group included in the template to a second register group;
A linking step of linking the pixel group data read to the second register group one-dimensionally;
A pixel coded by using the data of the pixel group at the time of encoding using the data of the pixel group connected in the connecting step is decoded, and the decoded data of the pixel before decoding in the first register group is decoded. A shifting step of shifting the storage position of each data stored in the first register group by one bit in a predetermined direction after the data of the pixel is overwritten;
It is characterized by having.
[0019]
In order to achieve the object of the present invention, for example, an image decoding device of the present invention has the following configuration.
[0020]
That is, an image decoding apparatus that decodes image data obtained by encoding pixel data in an image using data of a pixel group included in a template arranged at a position corresponding to the position of the pixel. So,
A first group of registers for storing decoded pixel data;
Reading means for fixing a position of the template in the first register group and reading data of a decoded pixel group included in the template into a second register group;
Connecting means for one-dimensionally connecting pixel group data read to the second register group;
A pixel coded by using the data of the pixel group at the time of encoding using the data of the pixel group connected by the connection unit is decoded, and the decoded data of the pixel before decoding in the first register group is decoded. Shift means for shifting the storage position of each data stored in the first register group by one bit in a predetermined direction after being overwritten with the data of the pixel;
It is characterized by having.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in detail according to preferred embodiments with reference to the accompanying drawings.
[0022]
[First Embodiment]
In this embodiment, a computer using a RISC (Reduced Instruction Set Computer) processor is applied as an image decoding device that decodes an image encoded by a known encoding process using the template by an image decoding process described later. The case will be described.
[0023]
FIG. 7 is a block diagram illustrating a basic configuration of the image decoding device according to the present embodiment. A reduced instruction set computer (RISC) processor 701 controls the entire apparatus using programs and data stored in a RAM 702 and a ROM 705 and executes an image decoding process described later. I do. Further, a first register group 703 and a second register group 704 described later are provided inside.
[0024]
A RAM 702 has a work area necessary for the CPU 701 to perform various types of processing, and also has an area for temporarily storing programs and data loaded from the external storage device 708 and the storage medium drive 709.
[0025]
A first register group 703 temporarily stores decoded data. Details of the first register group 703 will be described later.
[0026]
Reference numeral 704 denotes a second register group which reads out data of a pixel group necessary for decoding a pixel of interest in the encoded image data from the first register group 703 by a method described later and temporarily stores the data. Details of the second register group 704 will be described later.
[0027]
A ROM 705 stores programs and data for controlling the entire apparatus and setting the apparatus.
[0028]
Reference numeral 706 denotes a display unit which is configured by a CRT, a liquid crystal screen, or the like, and can display various information such as images and character information. A GUI or the like for instructing can be displayed.
[0029]
An operation unit 707 includes a keyboard, a mouse, and the like, and can input various instructions to the CPU 701.
[0030]
Reference numeral 708 denotes an external storage device, which is generally constituted by a large-capacity information storage device such as a hard disk drive, in which an OS and programs and data for causing the CPU 701 to execute image decoding processing to be described later are stored. These programs and data are loaded into the RAM 702 according to instructions from the CPU 701 as needed. The external storage device 708 also stores encoded image data to be processed, and is loaded into the RAM 702 according to an instruction from the CPU 701 as needed.
[0031]
Reference numeral 709 denotes a storage medium drive that can read out a program or data stored in a storage medium such as a CD-ROM or a DVD-ROM and output the program or data to the external storage device 708. Note that the programs and data stored in the external storage device 708 may be stored in this storage medium and loaded into the RAM 702 as needed.
[0032]
A bus 710 connects the above-described units.
[0033]
Next, an image decoding process according to the present embodiment performed by the image decoding apparatus having the above configuration will be described. FIG. 1 is a flowchart of the image decoding process. The program according to the flowchart of FIG. 13 is loaded from the external storage device 708 or the storage medium drive 709 to the RAM 702, and the CPU 701 executes the program, so that the image decoding device according to the present embodiment performs an image decoding process described later. Can be.
[0034]
FIG. 2 is a diagram showing the stored contents of the first register group 703 and the second register group 704 when the decoding process is performed according to the flowchart shown in FIG. Hereinafter, the image decoding process according to the present embodiment will be described with reference to FIGS.
[0035]
First, as preparation for decoding, registers 1, 2, and 3 as a first register group 703, registers 4, 5, and 6 as a second register group 704, and reference pixels one-dimensionally connected by processing described later. A register 7 for storing group data is prepared in the CPU 101.
[0036]
When decoding the encoded image data, the second row, the third row, and so on are sequentially decoded from the first row of the image. Therefore, when the m-th row is decoded, n is satisfied for all n that satisfies n <m. The row has already been decoded, and the decoded pixel data is stored in a predetermined area of the RAM 702 or an external storage device 708 (hereinafter, these “memory for storing decoded pixel data” are collectively referred to as “decoded (Referred to as “completed pixel data memory”).
[0037]
Therefore, if the row to be decoded (the row to be processed) is the m-th row, the decoded pixel data of the (m−2) -th row is written from the decoded pixel data memory to the register 1 and the register 2 The decoded pixel data of the (m-1) th row is written from the decoded pixel data memory. The register 3 is used to store the decoded pixel data of the m-th row which is the processing target row.
[0038]
In this embodiment, one byte of decoded pixel data can be stored in the register 3. When one byte of decoded pixel data is written, these are output to the decoded pixel data memory. Thus, each register (1, 2, 3) of the first register group 703 can store decoded pixel data in byte units. In this embodiment, the registers 1 and 2 have 3 bytes and the register 3 has 1 byte. However, the present invention is not limited to this.
[0039]
When the preparation is completed, the CPU 701 determines whether to read the decoded pixel data into the first register group 703 (step S101). In the case of reading, the process proceeds to step S102, and first, one-byte decoded pixel data is read into the first register group 703 (step S102). Specifically, the 1-byte decoded pixel data group of the (m-2) -th row is read into the register 1 and the 1-byte decoded pixel data group of the (m-1) -th row is read into the register 2. .
[0040]
FIG. 2A is a diagram showing the storage contents of the first register group 703 before reading a 1-byte decoded pixel data group into each of the registers 1 and 2 in step S102, and FIG. FIG. 17 is a diagram showing the storage contents of the first register group 703 after reading a 1-byte decoded pixel data group into each of the registers 1 and 2 in step S102.
[0041]
In FIG. 2A, nothing is read in the last 1 byte of the registers 1 and 2, but as shown in FIG. The decoded pixel data of the next one byte in the (m-2) th row and the (m-1) th row is read. In FIGS. 2A and 2B, hatched portions indicate portions included in the template, and the position of the template is assumed to be fixed in the first register group 703 (in other words, The position of the hatched portion in one register group 703 is assumed to be fixed.)
[0042]
Next, the data of the reference pixel group necessary for decoding the pixel at the position indicated by A in FIGS. 2A and 2B, that is, the pixel data of the shaded portion is transferred from the first register group 703 to the second register. The data is read out to the group 704 (step S102).
[0043]
Specifically, a mask is applied to the decoded pixel data group read from the register 1 (the image data group stored in the register 1 is read as 0 except for the reference pixel data group), and one line of the template is stored in the register 4. An eye reference pixel data group (data of the image in the (m−2) th row) is obtained. Further, a mask is applied to the decoded pixel data group read from the register 2 to obtain the reference pixel data group (the image data of the (m−1) th row) in the second row of the template in the register 5. Similarly, a mask is applied to the decoded pixel data group read from the register 3 to obtain a reference pixel data group (image data of the mth row) in the third row of the template in the register 6.
[0044]
FIG. 2C is a diagram showing the storage contents of the second register group 704 in which the reference pixel data group extracted in step S102 is stored. As shown in the drawing, in the first register group 703, only the data of the reference pixel group is extracted to the second register group 704, and 0 is stored in the other groups.
[0045]
Next, in preparation for decoding of a pixel to the right of the position indicated by A, which is a new decoding target, the storage position of each data stored in the first register group 703 is shifted by one bit in the left direction ( (Step S103). FIG. 2D is a diagram showing the storage contents of the first register group 703 after the shift processing in step S103. As shown in the figure, the right end of the registers 1 and 2 has a portion in which the data of the decoded pixel is not stored for one bit, and the right end of the register 3 is A in FIGS. 2 (a) and 2 (b). The data of the pixel at the position indicated by is stored. Naturally, the data stored at the right end of the register 3 (the data stored at the position indicated by A in FIG. 2D) has not been decoded yet, so the value has not been determined.
[0046]
Next, processing for one-dimensionally linking the data of the reference pixel group taken out to the second register group 704 is performed (step S104). Specifically, first, the data stored in each register (4, 5, 6) is shifted by a predetermined direction and by a predetermined number of bits. 2C, the register 4 shifts right by 2 bits, the register 5 shifts right by 8 bits, and the register 6 shifts right by 16 bits.
[0047]
FIG. 2E shows the storage contents of the second register group 704 as a result of the shift as described above. By performing a logical OR operation between the same storage locations in the registers 4, 5, and 6, the storage contents of the registers 4, 5, and 6 are linked and stored in the register 7. FIG. 2F is a diagram showing the contents stored in the register 7. In the figure, among the hatched portions, the first 4 bits are the data of the reference pixel group stored in the register 4, the next 7 bits are the data of the reference pixel group stored in the register 5, and the last 3 bits. The bits are the data of the reference pixel group stored in the register 6, and as a result, the register 7 is one-dimensionally linked data of the reference pixel group stored in each of the registers 4, 5, and 6. Is stored.
[0048]
Conventionally, as described above, when decoding the next pixel, the position of the template has changed in the second register group 704 (in other words, the position of the pixel to be decoded in the second register group 704 is Therefore, the shift direction and the number of bits to be shifted in each register are different each time, and cannot be determined in advance. Therefore, it is necessary to find this each time and the calculation is complicated.
[0049]
However, in the decoding processing according to the present embodiment, since the position of the template in the second register group 704 does not change (in other words, the position of the decoding target pixel in the second register group 704 does not change), the next pixel When decoding is performed, the direction of shifting in each register and the number of bits to be shifted are always the same and can be determined in advance, so that the calculation can be performed more easily, and one-dimensionally at a higher speed. Data of the connected reference pixel group can be obtained.
[0050]
Using the data of the one-dimensionally connected reference pixel group obtained in this manner, the pixel at the position indicated by A is decoded by a known method (step S105), and the shifted The data of the decoded pixel is overwritten at the position indicated by A (the position indicated by A in FIG. 2D in this embodiment) in the one register group 703 (step S106). As a result, the decoded pixel data is stored at the position A in FIG. 2D.
[0051]
Then, it is determined whether or not the decoded data that has not yet been written to the decoded pixel data memory is to be written to the decoded pixel data memory (step S107). For example, when the writing unit is a one-byte unit, it is determined in step S107 whether the decoding process for one byte has been performed. If it is determined that the data is to be written, the process proceeds to step S108, and the decoded data not yet written to the decoded pixel data memory is written to the decoded pixel data memory (step S108).
[0052]
Then, it is determined whether or not all the pixels for one row have been decoded (step S109). If not, the process returns to step S101, and the subsequent processes are repeated.
[0053]
As described above, the image decoding apparatus according to the present embodiment is configured such that when the data of the reference pixel group stored in each of the registers of the second register group 704 are connected one-dimensionally, the shift direction of each register, Since the number of bits can be fixed in advance, there is no need to obtain these in the concatenation process as in the conventional case, and the decoding process can be made simpler. it can.
[0054]
Note that, instead of using the register 7, any of the registers 4, 5, and 6 may be used instead.
[0055]
Further, in the present embodiment, in order to prepare for decoding of the pixel at the position on the right of the pixel at position A, the first register group 703 was first shifted in step S103. After decoding and overwriting the pixel data decoded in step S106, the shift process in step S103 may be performed.
[0056]
[Second embodiment]
In the present embodiment, as the CPU 701, a processor having SIMD (Single Instruction Multiple Data streams) arithmetic capability is applied. Note that the basic configuration of the image decoding apparatus according to the present embodiment is the same as that of FIG. 1, and is the same except that the CPU 701 is a SIMD processor.
[0057]
Specifically, in the decoding process according to the present embodiment, the number of registers to be used is adaptively changed according to the shape of the template and the instruction mounted on the CPU 701. For example, using the template shown in FIG. 4, the CPU 701 has a 64-bit register, and when a shift operation can be applied in 32-bit units, as shown in FIGS. Registers 1 and 2 are prepared as a group 703, and registers 3 and 4 are prepared as a second register group 704. FIG. 3 is a diagram showing the stored contents of the first register group 703 and the second register group 704 according to the present embodiment.
[0058]
Here, "apply a 32-bit shift operation" means that a 64-bit register is composed of two 32-bit registers, and that a shift operation can be applied separately. That is, when the contents of the 64-bit register are (x63, x62,..., X33, x32, x31, x30,..., X1, x0), if a 32-bit shift operation (1-bit left shift) is applied, The contents of the register are (x62, x61, ..., x32, 0, x30, x29, ..., x0, 0).
[0059]
As shown in FIG. 3A, the register 1 is used to store the decoded pixel data in the (m-2) th and (m-1) th rows, and the stored pixel data group is This is a pixel data group read from the pixel data memory. The register 2 is used to store the decoded pixel data group of the row m to be processed, and the stored pixel data group has been decoded but has not been written to the memory yet.
[0060]
Next, the flow of the decoding process according to the present embodiment will be described. However, since the flow is basically the same as that of the first embodiment, only different portions will be described.
[0061]
In step S103, a mask is applied to the decoded pixel data group read from the register 1 to obtain a reference pixel data group in the first and second rows of the template in the register 3. Similarly, a mask is applied to the decoded pixel data group read from the register 2 to obtain the reference pixel data group in the third row of the template in the register 4. Since the decoded pixel data groups of the (m−2) th and (m−1) th rows are stored in the register 1, the data of the reference pixel group for two rows can be read into the register 3 at a time. it can. For this reason, the decoded pixel data groups of the (m−2) th row and the (m−1) th row can be stored in the register 3 with the number of processing times smaller than that of the first embodiment.
[0062]
As shown in FIG. 3B, in the register 1, only the data of the reference pixel group in the (m−2) th row and the (m−1) th row is extracted to the register 3, and other than 0, Is stored.
[0063]
In step S103, in preparation for decoding of a pixel at a position on the right of the position indicated by A, which is a new decoding target, the storage position of each data stored in the first register group 703 is set to 1 in the left direction. Shift by one bit (one pixel). In the present embodiment, since the shift processing can be performed in units of 32 bits, the shift processing can be performed with a smaller number of operations than in the first embodiment.
[0064]
FIG. 3C is a diagram showing the storage contents of the first register group 703 after the shift processing in step S103.
[0065]
As described above, by using the CPU 701 having the SIMD operation capability, the number of operations can be further reduced as compared with the case where the CPU 701 of the first embodiment, that is, the RISC processor is used, and the speed of the entire decoding process can be further increased. Can be.
[0066]
[Third Embodiment]
In the present embodiment, a processor having a special instruction is applied as the CPU 701. Note that the basic configuration of the image decoding apparatus according to the present embodiment is the same as that in FIG. 1, and is the same except that the CPU 701 is a processor having a special instruction.
[0067]
The flow of the decoding process according to the present embodiment will be described. However, since it is basically the same as the first embodiment, only different portions will be described.
[0068]
For example, it is assumed that there is a special instruction that takes out a data group at a predetermined position of a register into another register and shifts the data group of the original register by a specified number. In this case, in step S103, a process of extracting the reference pixel data group from the decoded pixel data group stored in the register 1 of FIG. 2B as in the register 4 of FIG. Since the processing of shifting the decoded pixel data group stored as in the register 1 of d) can be performed by one instruction, the number of operations related to the processing can be reduced as compared with the first embodiment, and the decoding processing can be performed. The whole can be made faster.
[0069]
It is also assumed that there is an instruction for shifting the data stored in a register by a specified number and then performing a logical sum with another register. In this case, in step S104, the reference pixel data group one-dimensionally connected to the register 7 in FIG. 2F from the reference pixel data group stored in the second register group 704 in FIG. Can be reduced in the number of operations when obtaining.
[0070]
When a processor having a special instruction is used as described above, the number of operations related to a process of obtaining one-dimensionally connected reference pixel data groups can be reduced as compared with the first embodiment, and the entire decoding process can be performed. Higher speed can be achieved.
[0071]
In the above embodiment, the template shape shown in FIG. 4 is used, but the above embodiment is not limited to the template having the shape and size shown in FIG.
[0072]
[Other embodiments]
An object of the present invention is to supply a recording medium (or a storage medium) in which a program code of software for realizing the functions of the above-described embodiments is recorded to a system or an apparatus and a computer (or CPU or MPU) of the system or the apparatus. Can be achieved by reading and executing the program code stored in the recording medium. In this case, the program code itself read from the recording medium implements the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention.
[0073]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.
[0074]
Further, after the program code read from the recording medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is executed based on the instruction of the program code. It goes without saying that the CPU included in the expansion card or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0075]
When the present invention is applied to the recording medium, the recording medium stores program codes corresponding to the flowcharts described above.
[0076]
【The invention's effect】
As described above, according to the present invention, when each encoded pixel is decoded using the template based on the reference pixel, it can be performed with a smaller number of operations.
[Brief description of the drawings]
FIG. 1 is a flowchart of an image decoding process according to a first embodiment of the present invention.
FIG. 2 is a diagram showing storage contents of a first register group 703 and a second register group 704 when decoding processing is performed according to the flowchart shown in FIG.
FIG. 3 is a diagram showing stored contents of a first register group 703 and a second register group 704 according to the second embodiment of the present invention.
FIG. 4A is a diagram illustrating an example of the shape of a template used when decoding image information, and FIG. 4B is a diagram illustrating the use of a template for decoding image information encoded by the encoding method. It is a figure for explaining a method.
FIG. 5 is a diagram illustrating a state in which a one-dimensionally linked reference pixel data group is obtained from a decoded pixel data group read into a first register group.
FIG. 6 is a diagram for explaining a process in which reference pixel data groups taken out by a second register group are connected one-dimensionally and stored in a register 7;
FIG. 7 is a block diagram illustrating a basic configuration of an image decoding device according to the first embodiment of the present invention.

Claims (5)

復号済みの画素データを記憶する第1のレジスタ群と、当該第1のレジスタとは異なる第2のレジスタ群とを備え、画像における画素のデータを、当該画素の位置に応じた位置に配置されたテンプレートに含まれる画素群のデータを用いて符号化することで得られる画像符号化データを復号する画像復号装置が行う画像復号方法であって、
前記第1のレジスタ群における前記テンプレートの位置を固定させ、前記テンプレートに含まれる復号済みの画素群のデータを第2のレジスタ群に読み出す読み出し工程と、
前記第2のレジスタ群に読み出された画素群のデータを一次元的に連結する連結工程と、
前記連結工程で連結した画素群のデータを用いて当該画素群のデータを符号化時に用いて符号化した画素が復号され、復号された当該画素のデータが前記第1のレジスタ群における復号前の当該画素のデータに上書きされた後に、前記第1のレジスタ群が記憶する各データの記憶位置を所定の方向に1ビット分シフトさせるシフト工程と
を備えることを特徴とする画像復号方法。
A first register group that stores decoded pixel data; and a second register group that is different from the first register. Pixel data in an image is arranged at a position corresponding to the position of the pixel. An image decoding method performed by an image decoding device that decodes image encoded data obtained by encoding using data of a pixel group included in the template,
A reading step of fixing the position of the template in the first register group and reading out data of a decoded pixel group included in the template to a second register group;
A linking step of linking the pixel group data read to the second register group one-dimensionally;
A pixel coded by using the data of the pixel group at the time of encoding using the data of the pixel group connected in the connecting step is decoded, and the decoded data of the pixel before decoding in the first register group is decoded. Shifting the storage position of each data stored in the first register group by one bit in a predetermined direction after overwriting the data of the pixel.
前記読み出し工程では、前記第1のレジスタ群が記憶する行毎の復号済み画素データのうち、復号しようとする注目画素を復号するために必要な行の復号済み画素データを前記第2のレジスタ群に行毎に読み出し、
前記連結工程では、前記第2のレジスタ群に読み出された各行の画素データを、行毎に連結することを特徴とする請求項1に記載の画像復号方法。
In the reading step, among the decoded pixel data for each row stored in the first register group, decoded pixel data of a row necessary for decoding a pixel of interest to be decoded is stored in the second register group. Read line by line
2. The image decoding method according to claim 1, wherein, in the connecting step, the pixel data of each row read into the second register group is connected for each row.
画像における画素のデータを、当該画素の位置に応じた位置に配置されたテンプレートに含まれる画素群のデータを用いて符号化することで得られる画像符号化データを復号する画像復号装置であって、
復号済みの画素データを記憶する第1のレジスタ群と、
前記第1のレジスタ群における前記テンプレートの位置を固定させ、前記テンプレートに含まれる復号済みの画素群のデータを第2のレジスタ群に読み出す読み出し手段と、
前記第2のレジスタ群に読み出された画素群のデータを一次元的に連結する連結手段と、
前記連結手段が連結した画素群のデータを用いて当該画素群のデータを符号化時に用いて符号化した画素が復号され、復号された当該画素のデータが前記第1のレジスタ群における復号前の当該画素のデータに上書きされた後に、前記第1のレジスタ群が記憶する各データの記憶位置を所定の方向に1ビット分シフトさせるシフト手段と
を備えることを特徴とする画像復号装置。
An image decoding device for decoding image encoded data obtained by encoding pixel data in an image using data of a pixel group included in a template arranged at a position corresponding to the position of the pixel. ,
A first group of registers for storing decoded pixel data;
Reading means for fixing a position of the template in the first register group and reading data of a decoded pixel group included in the template into a second register group;
Connecting means for one-dimensionally connecting pixel group data read to the second register group;
A pixel coded by using the data of the pixel group at the time of encoding using the data of the pixel group connected by the connection unit is decoded, and the decoded data of the pixel before decoding in the first register group is decoded. An image decoding apparatus comprising: a shift unit that shifts a storage position of each data stored in the first register group by one bit in a predetermined direction after being overwritten with data of the pixel.
コンピュータに請求項1又は2に記載の画像復号方法を実行させるためのプログラム。A program for causing a computer to execute the image decoding method according to claim 1. 請求項4に記載のプログラムを格納し、コンピュータ読み取り可能な記憶媒体。A computer-readable storage medium storing the program according to claim 4.
JP2003133534A 2003-05-12 2003-05-12 Method and instrument for picture decoding Withdrawn JP2004336661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003133534A JP2004336661A (en) 2003-05-12 2003-05-12 Method and instrument for picture decoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003133534A JP2004336661A (en) 2003-05-12 2003-05-12 Method and instrument for picture decoding

Publications (1)

Publication Number Publication Date
JP2004336661A true JP2004336661A (en) 2004-11-25

Family

ID=33508045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003133534A Withdrawn JP2004336661A (en) 2003-05-12 2003-05-12 Method and instrument for picture decoding

Country Status (1)

Country Link
JP (1) JP2004336661A (en)

Similar Documents

Publication Publication Date Title
US6246396B1 (en) Cached color conversion method and apparatus
US6259456B1 (en) Data normalization techniques
US6414687B1 (en) Register setting-micro programming system
US6807620B1 (en) Game system with graphics processor
US6336180B1 (en) Method, apparatus and system for managing virtual memory with virtual-physical mapping
US20040263524A1 (en) Memory command handler for use in an image signal processor having a data driven architecture
JPH0689567A (en) Programmable processor used in video game system, etc. and external memory system having processor thereof
JP5317573B2 (en) How to procure immediate values from very long command words
JP2002522821A (en) Data processor and data processing method
JP3958224B2 (en) Parallel subword instructions with distributed results
KR20200067222A (en) Compression and decompression of indexes in the graphics pipeline
KR100971626B1 (en) Instruction encoding within a data processing apparatus having multiple instruction sets
US7787021B2 (en) Programmable architecture for flexible camera image pipe processing
US6674435B1 (en) Fast, symmetric, integer bezier curve to polygon conversion
JP2004336661A (en) Method and instrument for picture decoding
US7483595B2 (en) Image processing method and device
JP4442905B2 (en) Image data processing method
JP4482356B2 (en) Image processing method and image processing apparatus using SIMD processor
EP1367484B1 (en) Instruction encoding
CA2298337C (en) Game system with graphics processor
JP2004165766A (en) Image processing method
JP4294190B2 (en) Parallel processor and image processing apparatus using the same
US20080158238A1 (en) Format conversion apparatus from band interleave format to band separate format
JP2006260477A (en) Pipeline image processor, image processing method and program
JP2007080186A (en) Data processing apparatus, and control method thereof

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060801