JP3578497B2 - Zigzag scan circuit - Google Patents
Zigzag scan circuit Download PDFInfo
- Publication number
- JP3578497B2 JP3578497B2 JP29302094A JP29302094A JP3578497B2 JP 3578497 B2 JP3578497 B2 JP 3578497B2 JP 29302094 A JP29302094 A JP 29302094A JP 29302094 A JP29302094 A JP 29302094A JP 3578497 B2 JP3578497 B2 JP 3578497B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- ram
- data
- circuit
- zigzag
- 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
Links
Images
Description
【0001】
【産業上の利用分野】
本発明は、データ順序を変換するジグザグスキャン回路に関し、特に、画像符号化/復号化装置に適用して好適なものである。
【0002】
【従来の技術】
画像信号を符号化して伝送する場合において、仮に同じ伝送量を伝送するのであれば、低域成分の情報量を高域成分の情報量より多くした方が、人間の視覚特性により合致した再生画像が得られる。換言するならば、圧縮率を高めるのならば、高域成分をより圧縮した方が人間の視覚特性により合致した再生画像が得られる。このような観点に鑑みてなされた画像符号化方式が提案されており、このような画像符号化方式では、画像の量子化データを、水平方向及び垂直方向の周波数成分に応じて並び換えるジグザグスキャンを適用している。
【0003】
このような画像符号化方式に従う画像圧縮/伸張アルゴリズムの中で用いられているジグザグスキャンは、ハードウエア構成的には、図2に示すように、量子化/逆量子化回路1と、ハフマン符号化/復号化回路3との間に存在するジグザグスキャン回路2が実行するプロセスであり、例えば、64個のデータを仮に図3(a)に示すような方形状に配置して考えたときに、図3(b)に示すラスタスキャン状のデータ順序と、図3(c)に示す斜め方向に往復するジグザグスキャン状のデータ順序との間でデータ順序を変換するという働きを持っている。
【0004】
画像圧縮時には、量子化/逆量子化回路1で量子化されたDCT(離散コサイン変換)係数がデータ線101を介してジグザグスキャン回路2に入力され、ジグザグスキャン回路2によって、そのデータ順序が図3(c)に示すジグザグスキャン状に変換され、データ線102を介して、ハフマン符号化/復号化回路3に入力され、可変長符号化される。
【0005】
逆に、画像伸張時には、ハフマン符号化/復号化回路3によってDCT係数に復号されたデータは、データ線102を介してジグザグスキャン回路2に入力され、ジグザグスキャン回路2によって、ジグザグの順序であったデータが図3(b)に示す元の並びに逆変換され、データ線101を介して量子化/逆量子化回路1に入力される。
【0006】
図4は、ジグザグスキャン回路2を単純にハードウエア化した場合に考えられる構成例を示したものである。
【0007】
図4において、64ワード(1ワードは11ビット)のデータの順序は、RAM20の書込み、読出しを通じて変換され、かかる変換のために、書込みアドレス及び読出しアドレスの変化順序が異なっている。
【0008】
以下、図4に示すジグザグスキャン回路2の画像圧縮時の動作、すなわち、図3(b)に示すデータ順序を図3(c)に示すデータ順序に変換する動作を、書込みアドレス及び読出しアドレスの変化を中心に説明する。
【0009】
カウンタ22は6ビットのものであり、アドレス0〜63を64サイクルかかって、アドレス変換ROM21及び選択器23に順次出力していく。RAM20に入力データ201を書込む際には、選択器23はカウンタ22の出力アドレス203を選択する状態になっており、選択されたアドレス205がRAM20に与えられる。かくして、RAM20には、0、1、2、3、…、63と変化する図3(d)に示す書込みアドレスが与えられ、各アドレスエリアに入力データ201が格納される。アドレス変換ROM21は、カウンタ22からの0から63まで1インクリメントずつ変化するアドレス203を、図3(c)に示すジグザグスキャン状(0、1、8、16、…、64)に変化するアドレス204に変換するものである。RAM20から出力データ202を読出す際には、選択器23はROM21の出力アドレス204を選択する状態になっており、選択されたアドレス205がRAM20に与えられる。かくして、RAM20には、0、1、8、16、…、64と変化する図3(d)に示す読出しアドレスが与えられ、各アドレスエリアからデータ202が出力される。
【0010】
一方、画像伸張時においては、入力データ201をRAM20に順次書込む際に、図3(e)に示すようにアドレス変換ROM21からのアドレス204が書込みアドレスとして選択され、RAM20から格納データ202を読出す際には、図3(e)に示すようにカウンタ22からのアドレス203が読出しアドレスとして選択され、ジグザグスキャン状のデータ201が元のラスタスキャン状のデータ202に変換される。
【0011】
【発明が解決しようとする課題】
しかしながら、図4に示すジグザグスキャン回路2では、ROM21を利用してデータ順序変換用の一方のアドレスを発生しているため、以下のような課題を有するものであった。
【0012】
クロック同期形のROM21を用いた場合には、ROM21にアドレスを入力させてデータ(変換アドレス)を読出すサイクルと、読み出された変換アドレスをRAM20に与えるサイクルとが必要となり、1個のデータをRAM20にアクセスさせるのに2サイクル必要となって処理速度が低速となる。これを避けようとすると、ROM21をパイプライン的に動作させることを要するが、セレクタレジスタ等が必要となって構成が複雑になる。なお、非同期形のROM21は、消費電力が大きいと共に、処理速度はクロック同期形のものより遅い。
【0013】
ROM21は、他の集積回路に比べて占有面積が大きく、ジグザグスキャン回路の小形化には適していない。また、ROM21をRAM20と同一の集積回路チップ内に形成するとしても、その占有面積が大きいことは他の構成用の面積を制限してしまう。
【0014】
そのため、データ順序の変換を高速に実行できるジグザグスキャン回路や、小形化に寄与できるジグザグスキャン回路が望まれている。
【0015】
【課題を解決するための手段】
かかる課題を解決するため、本発明は、入力データを一時記憶するRAMと、該RAMに該入力データを書込む際に与える書込みアドレス及び該RAMから格納データを読出す際に与える読出しアドレスを発生するアドレス発生回路とを備えたジグザグスキャン回路であって、アドレス発生回路が、以下の構成要素により構成されていることを特徴とする。
【0016】
すなわち、アドレス発生回路が、 (1) ジグザグスキャン用のアドレスを生成するために用いられる状態遷移パラメータを格納する状態遷移レジスタと、 (2) Yアドレスを示す上位ビットとXアドレスを示す下位ビットとにより構成され、上記RAMに出力されるアドレスを一時的に格納するアドレスレジスタと、 (3) 上記アドレスレジスタから出力された上記アドレスを1つだけ増加するインクリメンタと、 (4) 上記状態遷移パラメータを用いて、ジグザグスキャン用のアドレスを生成するジグザグアドレス演算回路と、 (5) 画像圧縮時に上記入力データを上記RAMに書込むとき若しくは画像伸張時に上記RAMから上記格納データを読出すときに上記インクリメンタから出力された上記アドレスを選択し、画像圧縮時に上記RAMから上記格納データを読出すとき若しくは画像伸張時に上記入力データを上記RAMに書込むときに上記ジグザグ演算回路から出力された上記アドレスを選択する選択回路とにより構成されていることを特徴とする。
【0019】
【作用】
ジグザグスキャン状のアドレス変化は、相前後する2個のアドレスの変化状態に着目すると、数種類の状態のいずれかである。従って、現アドレスと状態遷移が定まると、次のアドレスと次の状態遷移を定めることができる。
【0020】
本発明では、アドレスの遷移状態を規定する状態遷移パラメータを状態遷移レジスタに保持し、ジグザグアドレス演算回路が、この状態遷移パラメータをも利用してジグザグスキャン用のアドレスを生成する。また、アドレスレジスタとインクリメンタとによって、ラスタスキャン用のアドレスを生成する。そして、選択回路は、画像圧縮時に入力データをRAMに書込むとき若しくは画像伸張時にRAMから格納データを読出すときにインクリメンタから出力されたアドレスを選択し、画像圧縮時にRAMから格納データを読出すとき若しくは画像伸張時に入力データをRAMに書込むときにジグザグ演算回路から出力されたアドレスを選択する。
【0021】
ジグザグアドレス演算回路は、ビットデータでなる現アドレス及び状態遷移パラメータを処理するので論理ゲートで構成でき、その結果、高速処理を可能とすると共に、ジグザグスキャン回路全体の小形化に寄与できる。
【0024】
なお、本発明において、RAMを2面(又は3面以上)設けて対称動作(又は切替え動作)させることにより、一段と高速に処理させることができるようになる。
【0025】
【実施例】
(A)第1実施例
以下、本発明によるジグザグスキャン回路の第1実施例を図面を参照しながら詳述する。ここで、図1がこの第1実施例のジグザグスキャン回路2−1の構成を示すものであり、上述した図4との同一、対応部分には、同一符号を付して示している。
【0026】
図1において、第1実施例のジグザグスキャン回路2−1も、大きくみれば、RAM20及びアドレス発生回路24からなり、アドレス発生回路24が発生した書込みアドレス205に基づいて、入力データ201をRAM20に書込み、その後、アドレス発生回路24が発生した読出しアドレス205に基づいて、格納データ202をRAM20から読出すことを通じて、64ワード(1ワードは11ビット)のデータの順序を変換するものである。
【0027】
しかし、アドレス発生回路24の詳細構成が、「従来の技術」の項で説明した図4に示すジグザグスキャン回路2とは異なっている。なお、RAM20は同一のものである。RAM20は、図1に示す書込みデータ端子WDや読出しデータ端子RDやアドレス端子Aの他に、図示は省略しているが、書込み又は読出しを指示する信号やクロック信号等の各種のコントロール信号用の入出力端子を当然に備えている。
【0028】
この第1実施例のアドレス発生回路24は、例えば、これ全体が1チップで構成されているものであり、アドレスレジスタ25、状態遷移レジスタ26、インクリメンタ27、ジグザグアドレス演算回路28及び選択器29から構成されている。
【0029】
アドレスレジスタ25は、RAM20に与える6ビット構成のアドレス205を一時記憶するものであり、一時記憶したアドレス205は、RAM20だけでなくインクリメンタ27及びジグザグアドレス演算回路28にも与えられる。
【0030】
状態遷移レジスタ26は、ジグザグアドレス演算回路28から出力された4ビット構成の状態遷移パラメータ207(SYU、SYD、SXU、SXD)を一時記憶するものであり、一時記憶した状態遷移パラメータ207をジグザグアドレス演算回路28に出力するものである。
【0031】
インクリメンタ27は、アドレスレジスタ25に一時記憶されたアドレス205を1インクリメントして選択器29に与えるものである。
【0032】
ジグザグアドレス演算回路28は、後述する一例のように例えばゲートアレイで構成され、アドレスレジスタ25からのアドレス205及び状態遷移レジスタ26からの状態遷移パラメータ207に基づいて、次のタイミングでのアドレス209及び状態遷移パラメータ208を形成してそれぞれ、選択器209、状態遷移レジスタ26に出力するものである。
【0033】
なお、ジグザグアドレス演算回路28の動作原理、構成及び動作の詳細については後述する。
【0034】
選択器29は、外部から与えられたアドレス種類信号(図示せず)に基づいて、ジグザグアドレス演算回路28からのアドレス209又はインクリメンタ27からのアドレス206の一方を選択し、選択アドレス210をアドレスレジスタ25に入力させるものである。ここで、選択器29は、画像圧縮時に入力データ201をRAM20に書込む際や、画像伸張時にRAM20から格納データ202を読出す際には、アドレス種類信号に基づいて、インクリメンタ27からのアドレス206を選択させ、画像圧縮時に格納データ202をRAM20から読出す際や、画像伸張時にRAM20に入力データ201を書込む際には、アドレス種類信号に基づいて、ジグザグアドレス演算回路28からのアドレス209を選択させる。
【0035】
以上の構成を有するジグザグスキャン回路2−1は、画像圧縮時には以下のように動作する。
【0036】
画像圧縮時において、RAM20に入力データ201を書込む際には、選択器29はインクリメンタ27からのアドレス206を選択する状態になると共に、アドレスレジスタ25は初期値として“000000”(2進表記)が設定される。かくして、RAM20には、インクリメント27が1インクリメントずつ更新させた0、1、2、3、…、63(10進表記)と変化する書込みアドレス205(図3(d)参照)が与えられ、各アドレスエリアに入力データ201が格納される。全64ワードの入力データ201がRAM20に格納されると、RAM20からの読出し動作に移行する。
【0037】
この画像圧縮時において、RAM20から格納データ202を読出す際には、選択器29はジグザグアドレス演算回路28からのアドレス209を選択する状態になると共に、アドレスレジスタ25は初期値として“000000”(2進表記)が設定され、状態遷移レジスタ26には初期値として“0110”(2進表記;意味については後述する)が設定される。ジグザグアドレス演算回路28は、両レジスタ25及び26の格納データに基づいて、ジグザグスキャン状に従う次のアドレス209と、現アドレスから次のアドレスへ移行する際の状態遷移を規定する状態遷移パラメータ208とを順次出力し、これにより、アドレスレジスタ25に保持されてRAM20に与えられる読出しアドレス205は、0、1、8、16、…、64(10進表記)のようにジグザグスキャン状に変化する(図3(d)参照)。
【0038】
かくして、上記図3(b)に示すようなラスタスキャン状のデータ順序に従う入力データ201が上記図3(c)に示すようなジグザグスキャン状のデータ順序に従う出力データ202に変換される。
【0039】
一方、画像伸張時において、入力データ201をRAM20に順次書込む際には、ジグザグアドレス演算回路28が形成して選択器29を介してアドレスレジスタ25に与えられて一時記憶された0、1、8、16、…、64(10進表記)のようにジグザグスキャン状に変化するアドレス209が書込みアドレス205としてRAM20に与えられ(図3(e)参照)、RAM20から格納データ202を読出す際には、インクリメンタ27が1インクリメントずつ更新し、選択器29を介してアドレスレジスタ25に与えられて一時記憶された0、1、2、3、…、64(10進表記)のようにラスタスキャン状に変化するアドレス206が読出しアドレス205としてRAM20に与えられる(図3(e)参照)。
【0040】
かくして、上記図3(c)に示すようなジグザグスキャン状のデータ順序に従う入力データ201が上記図3(b)に示すようなラスタスキャン状のデータ順序に従う出力データ202に変換される。
【0041】
以下、ジグザグアドレス発生回路28について、動作原理、動作及び構成について詳述する。
【0042】
この実施例の場合、6ビットのアドレス205は、ジグザグアドレス演算回路28での処理との関係では、上位3ビットと下位3ビットとに区別されている。今、画像圧縮時にシリアルに入力される64ワードの各データに対して、アドレス000000〜111111(2進表記;10進表記では0〜63)を対応付け、それら64ワードのシリアルデータを8×8の方形状にラスタ状に配置したと考えると、各ワードについての6ビットアドレスは、図5に示すように、下位3ビットが横方向(以下、X方向と呼ぶ)の位置を規定し、上位3ビットが縦方向(以下、X方向と呼ぶ)の位置を規定していることになる。以下、下位3ビットをジグザグアドレス発生回路28との関係ではXアドレスと呼び、上位3ビットをジグザグアドレス発生回路28との関係ではYアドレスと呼ぶ。
【0043】
また、図5に示すようなXアドレス及びYアドレスの組として、各データのアドレスを捕らえた場合において、ジグザグスキャン上でのアドレス変化状態は、図6に示すような4個の状態S1〜S4に分類できる。すなわち、次のアドレスは、現アドレスよりXアドレスのみ+1したアドレスになる状態S1(図中実線で示している)、次のアドレスは、現アドレスよりYアドレスのみ+1したアドレスになる状態S2(図中破線で示している)、次のアドレスは、現アドレスよりXアドレスは−1、Yアドレスは+1になる状態S3(図中1点鎖線で示している)、次のアドレスは、現アドレスよりXアドレスは+1、Yアドレスは−1になる状態S4(図中2点鎖線で示している)に分類できる。
【0044】
これら4状態S1〜S4を区別するための状態遷移パラメータの表現としては、種々のものがある。
【0045】
例えば、Yアドレスが変化したか(“1”)否か(“0”)を表す1ビットパラメータと、Yアドレスが変化した場合に+1か(“1”)−1か(“0”)を表す1ビットパラメータと、Xアドレスが変化したか(“1”)否か(“0”)を表す1ビットパラメータと、Xアドレスが変化した場合に+1か(“1”)−1か(“0”)を表す1ビットパラメータとの4ビットパラメータで表現することができる。また例えば、Yアドレスが+1変化したか(“1”)か否か(“0”)を表す1ビットパラメータSYUと、Yアドレスが−1変化したか(“1”)か否か(“0”)を表す1ビットパラメータSYDと、Xアドレスが+1変化したか(“1”)か否か(“0”)を表す1ビットパラメータSXUと、Xアドレスが−1変化したか(“1”)か否か(“0”)を表す1ビットパラメータSXDとの4ビットパラメータで表現することができる。
【0046】
この実施例では、後者の表現を用いることとした。なお、前者の表現を用いて構成したジグザグアドレス演算回路を適用したものも本発明の他の実施例を構成する。
【0047】
従って、図6に示すように、状態S1は、4ビットの状態遷移パラメータSYU、SYD、SXU、SXDで“0010”、状態S2は“1000”、状態S3は“1001”、状態S4は“0110”で表される。
【0048】
これら状態遷移パラメータSYU、SYD、SXU、SXDが上述した状態遷移レジスタ26に一時保持される。
【0049】
ここで、現アドレス205がアドレスレジスタ25に一時記憶されると同時に状態遷移レジスタ26に一時記憶される状態遷移パラメータ207(SYU、SYD、SXU、SXD)としては、現アドレス205に遷移した際の状態遷移パラメータ207(SYU、SYD、SXU、SXD)を記憶することと、現アドレス205から次のアドレスへの遷移を表す状態遷移パラメータ207(SYU、SYD、SXU、SXD)を一時記憶させることとが考えられるが、この実施例では前者を採用している。なお、後者の一時記憶方法も本発明の他の実施例を構成する。
【0050】
図6から明らかなように、上記4状態S1〜S4間の遷移を整理すると図7に示す状態遷移図で表すことができる。
【0051】
まず、状態S1からの遷移を考える。状態S1からは状態S3及びS4に遷移し得る(A13、A14)。状態S3へ遷移するか状態S4に遷移するかは、そのときのYアドレスによって区別できる。すなわち、図6から明らかなように、Yアドレスが“000”のときの状態S1からは状態S3に遷移し、Yアドレスが“111”のときの状態S1からは状態S4に遷移するので、Yアドレスによって区別できる。
【0052】
次に、状態S2からの遷移を考える。状態S2からは状態S3及びS4に遷移し得る(A23、A24)。状態S3へ遷移するか状態S4に遷移するかは、そのときのXアドレスによって区別できる。すなわち、図6から明らかなように、Xアドレスが“000”のときの状態S2からは状態S4に遷移し、Xアドレスが“111”のときの状態S2からは状態S3に遷移するので、Xアドレスによって区別できる。
【0053】
次に、状態S3からの遷移を考える。状態S3からは状態S1、S2及びS3に遷移し得る(A31、A32、A33)。どの状態S1、S2及びS3に遷移するかは、そのときのXアドレスやYアドレスによって区別できる。すなわち、図6から明らかなように、Xアドレスが“000”のときの状態S3からは状態S2に遷移し、Yアドレスが“111”のときの状態S3からは状態S1に遷移し、これ以外の状態S3からは状態S3に遷移するので、Xアドレス及びYアドレスによって区別できる。
【0054】
最後に、状態S4からの遷移を考える。状態S4からは状態S1、S2及びS4に遷移し得る(A41、A42、A44)。どの状態S1、S2及びS4に遷移するかは、そのときのXアドレスやYアドレスによって区別できる。すなわち、図6から明らかなように、Yアドレスが“000”のときの状態S4からは状態S1に遷移し、Xアドレスが“111”のときの状態S4からは状態S2に遷移し、これ以外の状態S4からは状態S4に遷移するので、Xアドレス及びYアドレスによって区別できる。
【0055】
このようにして現アドレス及び現状態から次の状態が定まると、現アドレス及び次の状態から次のアドレスを決定することができる。
【0056】
アドレス発生時の初期値としては、現アドレスは当然に“000000”であり、上記遷移条件から逆に考えると、初期の状態遷移パラメータ207が表す状態は状態S4(“0110”)である。
【0057】
図8は、上記遷移規則を適用した場合のYアドレス、Xアドレス、状態遷移パラメータSYU、SYD、SXU、SXDのサイクル毎の変化を示すものである。ここで、Yアドレス、Xアドレス、状態遷移パラメータSYU、SYD、SXU、SXDは全てビットデータであるので、かかる遷移を実現するジグザグアドレス演算回路28は、論理ゲートの組み合わせによって実現できる。
【0058】
図9〜図11は、上記遷移規則を適用した論理ゲートの組み合わせによって実現されたジグザグアドレス演算回路28の一構成例を示すものである。
【0059】
この構成例は、Xアドレスに変化がない状態の次にはXアドレスに変化がある状態が現れることや(S2からS3又はS2からS4)、Yアドレスに変化がない状態の次にはYアドレスに変化がある状態が現れること(S1からS3又はS1からS4)等の性質を、次の状態遷移パラメータSYU、SYD、SXU、SXDの形成に利用している。また、XアドレスやYアドレスの変化は、+1、0、−1のいずれかであることを、次のアドレスの形成に利用している。
【0060】
図9は、主として、次の状態遷移パラメータSYU、SYD、SXU、SXDや次のアドレスを形成するための条件値を作成する部分である。図9(a)に示す部分は、アドレスレジスタ25からのアドレス205をYアドレス及びXアドレスと区別して取り込む部分である。図9(b)に示す部分は、状態遷移レジスタ26からの状態遷移パラメータ207をY方向及びX方向のパラメータとして区別して取り込むと共に、その否定値を形成する部分である。図9(c)に示す部分は、Yアドレスが“000”や“111”であるか否かを示す条件値を形成する部分である。図9(d)に示す部分は、Xアドレスが“000”や“111”であるか否かを示す条件値を形成する部分である。図9(e)に示す部分は、現状態がY方向に変化した状態か否かを表す条件値を形成する部分である。図9(f)に示す部分は、現状態がX方向に変化した状態か否かを表す条件値を形成する部分である。図9(g)に示す部分は、最終アドレス(“111111”)に到達したか否かを表す部分である。
【0061】
図10は、各種条件値に基づいて、次の状態遷移パラメータを形成して状態遷移レジスタ26に出力する部分を示している。図10(a)、(b)、(c)、(d)に示す部分はそれぞれ、次の状態の状態遷移パラメータSYU、SYD、SXU、SXDを形成する部分である。
【0062】
図11は、次の状態及び現アドレス等から次のアドレスを形成する部分を示している。図11(a)、(b)に示す部分はそれぞれ、次のXアドレス、Yアドレスを形成してアドレスレジスタ25に出力する部分である。次のXアドレス、Yアドレスはそれぞれ、現Xアドレス、現Yアドレスに+1、0、−1のいずれかの操作を行なうことで形成でき、図11(c)は、図11(a)、(b)におけるかかる操作を行なう部分28aの詳細構成例を示している。
【0063】
以上のように、第1実施例によれば、ジグザグスキャンを一種の状態遷移とみなして、ジグザグスキャン状のアドレス発生を、論理ゲートでなるジグザグアドレス演算回路、状態遷移レジスタ及びアドレスレジスタとの協働によって行なうようにしたので、ジグザグスキャン発生回路の占有面積を小さくできて小形化に寄与できると共に、高速にアドレスを発生できるようになる。なお、第1実施例のジグザグスキャン回路は、特に、そのアドレス発生回路24は、セミカスタム、ゲートアレイ向きである。
【0064】
上記説明においても、第1実施例を変形したいくつかの他の実施例を挙げたが、更に、以下のような第1実施例を変形したいくつかの他の実施例を挙げることができる。
【0065】
第1実施例は、ジグザグスキャン状のアドレスの形成構成に特徴があり、ラスタスキャン状のアドレスの形成構成は、第1実施例のものに限定されない。例えば、クロックによって1インクリメントずつ行なうカウンタを用いたものであっても良い。また、アドレスレジスタ25及びインクリメンタ27(又はカウンタ)の出力側に選択器29を設けることも可能である。
【0066】
第1実施例においては、次のアドレスをXアドレス及びYアドレスを別個に操作することで形成するものを示したが、Xアドレス及びYアドレスを区別することなく、全体のアドレスを操作して新たなアドレスを形成するようにしても良い。例えば、図5から明らかなように、サイクル毎の全体アドレスの変化は、+1、+7、+8及び−7の4種類しかなく、この変化は状態の遷移によって一義なので、この性質を利用して次のアドレスを形成するようにしても良い。
【0067】
また、第1実施例においては、次の状態遷移パラメータを形成した後、次のアドレスを形成するものを示したが、逆の順序で形成するようにしても良い。例えば、他の実施例として上述した状態遷移レジスタ26に現アドレスから次のアドレスへの変化状態に係る状態遷移パラメータを格納するものの場合、このような順序での処理が構成を簡単にする。
【0068】
さらに、第1実施例においては、ジグザグスキャンでのアドレス変化状態を4種類に別けてジグザグアドレス演算回路28を構成したものを示したが、状態数や状態を区別する観点はこれに限定されるものではない。例えば、上述した状態S1を、Yアドレスが“000”での状態とYアドレスが“111”での状態とに分け、また、上述した状態S2を、Xアドレスが“000”での状態とXアドレスが“111”での状態とに分け、計6種類の状態にし、これら6種類の状態遷移に応じてジグザグアドレス演算回路28を形成するようにしても良い。
【0069】
(B)第2実施例
次に、本発明によるジグザグスキャン回路の第2実施例を図面を参照しながら詳述する。ここで、図12がこの第2実施例のジグザグスキャン回路2−2の構成を示すものである。
【0070】
この第2実施例においては、データ順序を変換するためにデータが書き込れると共に、その後読み出されるRAMとして2個の同一構成のRAM20a及び20bが設けられており、これらRAM20a及び20bは、第1の実施例のものと同様なものである。これらRAM20a及び20bは、図示しない書込/読出コントロール信号に応じて、相補的に(対称的に)動作するものである。すなわち、RAM20aが入力データ201を書込んでいるときには、RAM20bは格納データ202bを読出し動作し、RAM20aが格納データ202aを読出しているときには、RAM20bは入力データ201を書込み動作する。
【0071】
これらRAM20a及び20bに対するアドレス発生構成は共用化されており、アドレス発生構成としては、カウンタ22、ジグザグアドレス発生回路24a、2個の選択器38及び39が該当する。
【0072】
カウンタ22は6ビット構成のものであり、アドレスをラスタスキャン状に発生するものである。発生したアドレス203は、選択器38及び39に選択入力として与えられる。
【0073】
ジグザグアドレス発生回路24aは、その内部構成が、第1の実施例のアドレス発生回路24から、インクリメンタ27及び選択器29を取除き、データ線209及び210を直接接続したものに等しい(図1参照)。従って、ジグザグアドレス発生回路24aは、ジグザグスキャン状に従うアドレス205を発生し、このアドレス205も選択器38及び39に選択入力として与えられる。
【0074】
選択器38は、ジグザグアドレス発生回路24aからのアドレス205と、カウンタ26からのアドレス203との一方を選択して、RAM20aに入力するものである。一方、選択器39は、ジグザグアドレス発生回路24aからのアドレス205と、カウンタ26からのアドレス203との一方を選択して、RAM20bに入力するものである。ここで、選択器38及び39は、図示しない選択制御信号に応じて、一方がジグザグアドレス発生回路24aからのアドレス205を選択しているときには、他方がカウンタ26からのアドレス203を選択するように制御される。
【0075】
両RAM20a及び20bから読み出されたデータ202a及び202bは共に、選択器37に与えられ、選択器37は、図示しない選択制御信号に応じて、そのとき、読出し動作を実行しているRAM20a又は20bからの出力データ202(202a又は202b)を選択して、当該ジグザグスキャン回路2−2からの出力データとして送出する。
【0076】
上述したように、画像圧縮時と画像伸張時とでは、書込みアドレス及び読出しアドレスとして、ラスタスキャン状又はジグザグスキャン状のいずれのアドレスを選択するかの違うだけであり、その他は同様であるので、以下では画像圧縮時についてのみ図13をも参照しながら動作を説明する。なお、図13は、当該ジグザグスキャン回路2−2に与えられる動作クロック(図12では省略している)と、RAM20a及び20bの動作内容との関係を示すものである。
【0077】
まず、選択器38をカウンタ22からのアドレス203を選択する状態に切り替え、カウンタ22からのラスタスキャン状に変化するアドレス203をRAM20aに与えて、最初の64サイクルT1の入力データ201をRAM20aに格納させる。
【0078】
RAM20aに対する全ての書込みが完了すると、選択器38をジグザグアドレス発生回路24aからのアドレス205を選択する状態に切り替え、一方、選択器39をカウンタ22からのアドレス203を選択する状態に切り替え、さらに、選択器37をRAM22aからの出力データ202aを選択する状態に切り替える。これにより、新たな64サイクルT2では、RAM20aから前の64サイクルT1で格納された64ワードのデータ202aがジグザグスキャン状に読み出されて外部に出力され、これに並行して、RAM20bに64ワードの入力データ201がラスタスキャン状に書き込まれる。
【0079】
かかる64サイクルT2が終了すると、選択器38をカウンタ22からのアドレス203を選択する状態に切り替え、一方、選択器39をジグザグアドレス発生回路24aからのアドレス205を選択する状態に切り替え、さらに、選択器37をRAM22bからの出力データ202bを選択する状態に切り替える。これにより、新たな64サイクルT3では、RAM20bから前の64サイクルT2で格納された64ワードのデータ202bがジグザグスキャン状に読み出されて外部に出力され、これに並行して、RAM20aに64ワードの入力データ201がラスタスキャン状に書き込まれる。
【0080】
以下、以上のようなRAM22a及び22bに対する相補的な動作が繰り返され、入力データ201を待機させることなく、入力データ201をジグザグスキャン状に変化する順序のデータに連続して変換できる。
【0081】
従って、上記第2実施例によれば、データ順序変換用のRAMとして2面を用いて連続的にデータ順序を変換すると共に、ジグザグアドレス発生回路として、ジグザグスキャンを一種の状態遷移とみなして構成したものを適用したので、ハードウエアの僅かな大型化でかなりの高速性を実現できるジグザグスキャン回路を提供できる。なお、第2実施例のジグザグスキャン回路は、高速のセミカスタム、ゲートアレイ向きである。
【0082】
なお、第2実施例を変形した実施例としては、ラスタスキャン状アドレスをカウンタ22ではなくインクリメンタが発生するようにしたものや、アドレスが7ビット以上である2ポートRAMをRAM20a及び20bとして用いたもの等を挙げることができる。後者の場合、アドレスが7ビット目以上の上位ビットでRAM20a及び20bとして動作するメモリ領域を特定することを要する。
【0083】
(C)第3実施例
次に、本発明によるジグザグスキャン回路の第3実施例を図面を参照しながら詳述する。ここで、図14がこの第3実施例のジグザグスキャン回路2−3の構成を示すものである。
【0084】
第3実施例のジグザグスキャン回路2−3は、データ順序変換のために入力データ201を一時記憶するRAM20−1と、ラスタスキャン状アドレスを発生するカウンタ22から構成されている。
【0085】
この第3実施例のRAM20−1は、2種類のアドレス入力ポートAA及びBAを有し、その双方にカウンタ22からのアドレス203が入力されるようになされており、また、いずれのアドレス入力ポートを有効とするかを表すアドレス制御信号220も入力されるようになされている。
【0086】
RAM20−1の内部は、ラスタスキャン用アドレスデコーダ30、RAMセルアレイ31、ジグザグスキャン用アドレスデコーダ32、第1のトライステートバッファ群33a〜33n、第2のトライステートバッファ群34a〜34n及びインバータ35から構成されている。
【0087】
RAMセルアレイ31は、内部構成(セルやセンスアンプ等)が一般的なRAMのものと同様なものであるが、第1のトライステートバッファ群33a〜33nを介してラスタスキャン用アドレスデコーダ30から所望のワード線に駆動電圧が適宜供給され得ると共に、第2のトライステートバッファ群34a〜34nを介してジグザグスキャン用アドレスデコーダ32から所望のワード線に駆動電圧が適宜供給され得るようになっている。
【0088】
ラスタスキャン用アドレスデコーダ30は、第1実施例や第2実施例のRAM20、20a、20bと同様なデコードを行なうものであり、入力アドレス203によって定まるRAMセルアレイ31のワード線に駆動電圧を供給するものである。一方、ジグザグスキャン用アドレスデコーダ32は、ラスタスキャン用アドレスデコーダ30のデコード内容が図15のカラムC1及びC2に示すような場合に、図15のカラムC3に示すように入力アドレス203をデコードし、RAMセルアレイ31のデコードで定まったワード線に駆動電圧を供給するものである。
【0089】
第1のトライステートバッファ群33a〜33nは、アドレス制御信号220が“1”のときに、ラスタスキャン用アドレスデコーダ30をRAMセルアレイ31に接続させ、これに対して、アドレス制御信号220が“0”のときに、ラスタスキャン用アドレスデコーダ30をRAMセルアレイ31から切り離すものである。第2のトライステートバッファ群33a〜33nには、アドレス制御信号220がインバータ35を介して反転されて与えられる。そのため、第2のトライステートバッファ群33a〜33nは、アドレス制御信号220が“0”のときに、ジグザグスキャン用アドレスデコーダ32をRAMセルアレイ31に接続させ、これに対して、アドレス制御信号220が“1”のときに、ジグザグスキャン用アドレスデコーダ32をRAMセルアレイ31から切り離す。
【0090】
なお、図14では、書込み又は読出しを指示するコントロール信号等の信号線やその処理構成は図示を省略している。
【0091】
次に、画像圧縮時の動作を説明する。最初の64サイクルによって、64ワードの入力データ201を順次RAM20−1の各ワードに書き込んで行く際には、アドレス制御信号220はその期間中“1”を示している。カウンタ22が初期値0から順次カウントアップし、アドレス203が0から63に順次変化する。ラスタスキャン用アドレスデコーダ30があるサイクルのアドレス203をデコードしたときには、第1のトライステートバッファ群33a〜33nを介してRAMセルアレイ31の所望のワード線に駆動電圧が供給され、そのサイクルでの入力データ201が格納される。このようにして、RAM20−1には第0番地から第63番地のワードまで順序よくデータが書き込まれる。
【0092】
RAM20−1に64ワードのデータ201が書き込まれた後、64サイクルかかってデータを読み出すこととなる。RAM20−1から格納データ202を読出して出力していく際には、アドレス制御信号220は“0”を示しており、この間、RAMセルアレイ31へのワード線の駆動電圧は、第2のトライステートバッファ群34a〜34nを介してジグザグスキャン用アドレスデコーダ32から供給される。アドレスデコーダ32は、カウンタ22のカウントが0から63まで順次カウントアップされていくに従って、ジグザグスキャン状の所望のワード線駆動電圧をRAMセルアレイ31に供給し、これによりRAMセルアレイ31から、ジグザグスキャンの順序でデータ202が読み出される。
【0093】
従って、上記第3実施例によれば、RAM20−1内にジグザグスキャン用のデコーダを設けたので、占有面積が小さくなって小形化に寄与でき、しかも、別にゲート回路を設ける必要もなく設計が容易な高速動作が可能なジグザグスキャン回路を提供できる。なお、第3実施例のジグザグスキャン回路は、カスタム設計や面積重視設計に向いたものである。
【0094】
第3実施例を変形した実施例としては、カウンタ22をもRAM22−1と同一チップ上に形成したものや、カウンタ22に代えて他のアドレス発生構成を適用したもの等を挙げることができる。
【0095】
(D)第4実施例
次に、本発明によるジグザグスキャン回路の第4実施例を図面を参照しながら詳述する。ここで、図16がこの第4実施例のジグザグスキャン回路2−4の構成を示すものである。
【0096】
第4実施例のジグザグスキャン回路2−4は、第3実施例に示す構成を2面持たせて相補動作(対称動作)させると共に、それらの出力データ202a及び202bを選択する選択器37を設けたものである。そのため、各面の動作は第3実施例と同様であり、面の制御は第2実施例と同様であるので、動作の説明は省略する。
【0097】
第4実施例によれば、ジグザグスキャン用のRAMを2面設けて相補動作させるようにしたので、従来のものに比べて、格段的に高速にデータ順序変換を行なうことができるジグザグスキャン回路を提供できる。なお、第4実施例のジグザグスキャン回路は、カスタム設計や処理速度重視設計に向いたものである。
【0098】
第4実施例を変形した実施例としては、2面のカウンタ22a及び22bを共用化させたものや、カウンタ22a及び22bに代えて他のアドレス発生構成を適用したもの等を挙げることができる。
【0099】
(E)他の実施例
上記でも種々本発明の他の実施例について言及したが、さらにいくつかの他の実施例を挙げると以下の通りである。
【0100】
上記各実施例では、データ順序の変換に供するワード数が64個のものを示したが、整数の他の2乗がワード数のものにも本発明を適用することができる。また、各ワードのビット数も11ビットに限定されるものではない。
【0101】
上記各実施例においては、RAMとして入力データ端子と出力データ端子とが別個のものを示したが、これらが同じ端子のRAMであっても良い。
【0102】
本発明のジグザグスキャン回路は、画像符号化/復号化装置に適用されるだけでなく、画像符号化専用装置や画像復号化専用装置にも適用できる。さらに、データシャフリングを要する装置等にも適用可能である。
【0103】
上記第2実施例及び第4実施例においては、RAMを2面設けたものを示したが、タイミング等によって完全な対称動作が難しいのならば、3面以上設けて切り替えて用いるようにしても良い。
【0104】
【発明の効果】
以上のように、本発明によれば、高速処理が可能な小形のジグザグスキャン回路を提供できる。
【図面の簡単な説明】
【図1】第1実施例の構成を示すブロック図である。
【図2】画像符号化/復号化装置におけるジグザグスキャン回路の位置を示すブロック図である。
【図3】ジグザグスキャン回路によるデータ順序の変換の様子等の説明図である。
【図4】考えられる従来のジグザグスキャン回路を示すブロック図である。
【図5】第1実施例においてアドレスを方向別アドレスに別けて処理することの説明図である。
【図6】第1実施例での状態種類の説明図である。
【図7】第1実施例での状態遷移図である
【図8】第1実施例のジグザグスキャン時のアドレス及び状態遷移パラメータの変化を示す説明図である。
【図9】第1実施例のジグザグアドレス演算回路の詳細構成図(その1)である。
【図10】第1実施例のジグザグアドレス演算回路の詳細構成図(その2)である。
【図11】第1実施例のジグザグアドレス演算回路の詳細構成図(その3)である。
【図12】第2実施例を示すブロック図である。
【図13】第2実施例の動作の説明図である。
【図14】第3実施例を示すブロック図である。
【図15】第3実施例のRAM内デコーダのデコード内容の説明図である。
【図16】第4実施例を示すブロック図である。
【符号の説明】
2−1、2−2、2−3、2−4…ジグザグスキャン回路、 20、20a、20b、20−1、20−1a、20−1b…RAM、 22、22a、22b…カウンタ、 24…アドレス発生回路、 24a…ジグザグアドレス発生回路、 25…アドレスレジスタ、 26…状態遷移レジスタ、 27…インクリメンタ、 28…ジグザグアドレス演算回路、 29、37〜39…選択器、 30、32…アドレスデコーダ、 31…RAMセルアレイ、 33a〜33n、34a〜34n…トライステートバッファ、 35…インバータ。[0001]
[Industrial applications]
The present invention relates to a zigzag scan circuit for converting a data order, and is particularly suitable for application to an image encoding / decoding device.
[0002]
[Prior art]
If the same amount of transmission is to be transmitted when the image signal is encoded and transmitted, it is better to make the amount of information of the low-frequency component larger than the amount of information of the high-frequency component, so that a reproduced image that matches human visual characteristics better. Is obtained. In other words, if the compression ratio is to be increased, a reproduced image that is more consistent with human visual characteristics can be obtained by compressing the high-frequency component more. An image coding method has been proposed in view of such a viewpoint. In such an image coding method, a zigzag scan for rearranging quantized data of an image in accordance with horizontal and vertical frequency components is proposed. Has been applied.
[0003]
The zigzag scan used in the image compression / decompression algorithm according to such an image coding method has a hardware configuration, as shown in FIG. 2, which includes a quantization /
[0004]
At the time of image compression, the DCT (discrete cosine transform) coefficient quantized by the quantization /
[0005]
Conversely, at the time of image decompression, data decoded into DCT coefficients by the Huffman encoding /
[0006]
FIG. 4 shows an example of a configuration that can be considered when the
[0007]
In FIG. 4, the data order of 64 words (one word is 11 bits) is converted through writing and reading of the
[0008]
Hereinafter, the operation at the time of image compression of the
[0009]
The
[0010]
On the other hand, when the
[0011]
[Problems to be solved by the invention]
However, the
[0012]
When the clock
[0013]
The
[0014]
For this reason, a zigzag scan circuit that can convert the data order at high speed and a zigzag scan circuit that can contribute to miniaturization are desired.
[0015]
[Means for Solving the Problems]
To solve such issues,BookThe invention provides a RAM for temporarily storing input data,When writing the input data to the RAMWrite address to give andProvided when reading stored data from the RAMAn address generation circuit for generating a read address.TajiZag scan circuitWherein the address generation circuit is constituted by the following components.
[0016]
That is,The address generation circuit (1) A state transition register that stores state transition parameters used to generate an address for zigzag scanning; (2) An address register configured by an upper bit indicating a Y address and a lower bit indicating an X address, and temporarily storing an address output to the RAM; (3) An incrementer for increasing the address output from the address register by one, (Four) A zigzag address operation circuit that generates an address for zigzag scanning using the state transition parameter; (Five) The address output from the incrementer is selected when the input data is written to the RAM at the time of image compression or when the storage data is read from the RAM at the time of image expansion, and the storage data is read from the RAM at the time of image compression. And a selection circuit for selecting the address output from the zigzag operation circuit when the input data is written to the RAM when reading out or when decompressing an image.It is characterized by the following.
[0019]
[Action]
TheThe address change in the zigzag scan form is one of several types of states when attention is paid to the change state of two consecutive addresses. Therefore, when the current address and the state transition are determined, the next address and the next state transition can be determined.
[0020]
In the present invention, the transition state of the address isThe specified state transition parameters are held in the state transition register, and the zigzag address arithmetic circuitShapeAn address for zigzag scanning is generated using the state transition parameter. Further, an address for raster scanning is generated by the address register and the incrementer. AndThe selection circuit selects an address output from the incrementer when input data is written to the RAM at the time of image compression or reads out stored data from the RAM at the time of image expansion, and reads out the stored data from the RAM at the time of image compression. Alternatively, the address output from the zigzag operation circuit is selected when the input data is written to the RAM at the time of image expansion.
[0021]
The zigzag address operation circuit processes the current address consisting of bit data and the state transition parameter, so that it can be constituted by logic gates. As a result, high-speed processing can be performed and the zigzag scan circuit can be downsized as a whole.
[0024]
In addition,In the present invention,By providing two (or three or more) RAMs and performing a symmetric operation (or a switching operation), processing can be performed at a higher speed.
[0025]
【Example】
(A) First embodiment
Hereinafter, a first embodiment of a zigzag scan circuit according to the present invention will be described in detail with reference to the drawings. FIG. 1 shows the configuration of the zigzag scan circuit 2-1 of the first embodiment, and the same or corresponding parts as those in FIG. 4 described above are denoted by the same reference numerals.
[0026]
In FIG. 1, the zigzag scan circuit 2-1 of the first embodiment also includes a
[0027]
However, the detailed configuration of the
[0028]
The
[0029]
The address register 25 temporarily stores an
[0030]
The state transition register 26 temporarily stores the 4-bit state transition parameters 207 (SYU, SYD, SXU, SXD) output from the zigzag
[0031]
The
[0032]
The zigzag
[0033]
The operation principle, configuration and operation of the zigzag
[0034]
The
[0035]
The zigzag scan circuit 2-1 having the above configuration operates as follows during image compression.
[0036]
When the
[0037]
At the time of image compression, when reading the stored
[0038]
Thus, the
[0039]
On the other hand, when sequentially writing the
[0040]
Thus, the
[0041]
Hereinafter, the operation principle, operation and configuration of the zigzag
[0042]
In the case of this embodiment, the 6-
[0043]
Further, when the address of each data is captured as a set of the X address and the Y address as shown in FIG. 5, the address change state on the zigzag scan includes four states S1 to S4 as shown in FIG. Can be classified. That is, the next address is a state S1 (shown by a solid line in the figure) where only the X address is +1 from the current address, and the next address is a state S2 (only the Y address is +1 from the current address). The next address is a state S3 (shown by a dashed line in the figure) where the X address is -1 and the Y address is +1 from the current address, and the next address is the current address from the current address. The state can be classified into a state S4 in which the X address is +1 and the Y address is -1 (shown by a two-dot chain line in the figure).
[0044]
There are various expressions of state transition parameters for distinguishing these four states S1 to S4.
[0045]
For example, a one-bit parameter indicating whether the Y address has changed (“1”) or not (“0”), and +1 or (“1”) − 1 or (“0”) when the Y address changes. A 1-bit parameter indicating whether the X address has changed (“1”) or not (“0”), and a +1 or (“1”) − 1 or (“ 0 ") and a 4-bit parameter representing a 1-bit parameter. Also, for example, a one-bit parameter SYU indicating whether the Y address has changed by +1 ("1") or not ("0") and whether or not the Y address has changed by -1 ("1") ("0") )), A 1-bit parameter SXU indicating whether the X address has changed by +1 (“1”) or not (“0”), and whether the X address has changed by −1 (“1”). ) Or 1-bit parameter SXD indicating whether or not (“0”).
[0046]
In this embodiment, the latter expression is used. It is to be noted that a circuit to which a zigzag address arithmetic circuit configured using the former expression is applied also constitutes another embodiment of the present invention.
[0047]
Therefore, as shown in FIG. 6, the state S1 is “0010” with 4-bit state transition parameters SYU, SYD, SXU, and SXD, the state S2 is “1000”, the state S3 is “1001”, and the state S4 is “0110”. ".
[0048]
These state transition parameters SYU, SYD, SXU, and SXD are temporarily stored in the state transition register 26 described above.
[0049]
Here, the state transition parameter 207 (SYU, SYD, SXU, SXD) temporarily stored in the state transition register 26 at the same time that the
[0050]
As is clear from FIG. 6, the transitions among the four states S1 to S4 can be represented by a state transition diagram shown in FIG.
[0051]
First, consider the transition from the state S1. From the state S1, a transition can be made to the states S3 and S4 (A13, A14). The transition to the state S3 or the state S4 can be distinguished by the Y address at that time. That is, as is clear from FIG. 6, the state changes from state S1 when the Y address is "000" to state S3, and from state S1 when the Y address is "111" changes to state S4. Can be distinguished by address.
[0052]
Next, consider a transition from the state S2. A transition from the state S2 to the states S3 and S4 is possible (A23, A24). The transition to the state S3 or the state S4 can be distinguished by the X address at that time. That is, as is apparent from FIG. 6, the state transits from the state S2 when the X address is "000" to the state S4, and from the state S2 when the X address is "111" to the state S3. Can be distinguished by address.
[0053]
Next, consider the transition from the state S3. From the state S3, transition can be made to the states S1, S2 and S3 (A31, A32, A33). Which of the states S1, S2, and S3 transits can be distinguished by the X address or Y address at that time. That is, as is apparent from FIG. 6, the state transits from state S3 when the X address is "000" to state S2, transitions from state S3 when the Y address is "111" to state S1, and otherwise. Since the state S3 changes to the state S3, it can be distinguished by the X address and the Y address.
[0054]
Finally, consider the transition from state S4. A transition from the state S4 to the states S1, S2 and S4 can be made (A41, A42, A44). Which of the states S1, S2, and S4 transits can be distinguished by the X address or Y address at that time. That is, as is apparent from FIG. 6, the state changes from the state S4 when the Y address is "000" to the state S1, the state S4 when the X address is "111" changes to the state S2. Since the state S4 changes to the state S4, it can be distinguished by the X address and the Y address.
[0055]
When the next state is determined from the current address and the current state, the next address can be determined from the current address and the next state.
[0056]
As an initial value when an address is generated, the current address is naturally “000000”, and the state represented by the initial
[0057]
FIG. 8 shows changes of the Y address, the X address, and the state transition parameters SYU, SYD, SXU, and SXD for each cycle when the above transition rules are applied. Here, since the Y address, the X address, and the state transition parameters SYU, SYD, SXU, and SXD are all bit data, the zigzag
[0058]
9 to 11 show one configuration example of the zigzag
[0059]
In this configuration example, a state in which there is a change in the X address appears after a state in which there is no change in the X address (from S2 to S3 or from S2 to S4), and a state in which there is no change in the Y address. Are used to form the next state transition parameters SYU, SYD, SXU, and SXD. Further, the fact that the change of the X address or the Y address is any of +1, 0, and -1 is used for forming the next address.
[0060]
FIG. 9 mainly shows a portion for creating condition values for forming the next state transition parameters SYU, SYD, SXU, SXD and the next address. The part shown in FIG. 9A is a part that takes in the
[0061]
FIG. 10 shows a portion that forms the next state transition parameter based on various condition values and outputs the same to the
[0062]
FIG. 11 shows a portion for forming the next address from the next state, the current address, and the like. The portions shown in FIGS. 11A and 11B are portions for forming the next X address and Y address and outputting them to the
[0063]
As described above, according to the first embodiment, the zigzag scan is regarded as a kind of state transition, and the generation of the zigzag scan address is performed in cooperation with the zigzag address operation circuit including the logic gate, the state transition register, and the address register. Since the operation is performed by the operation, the area occupied by the zigzag scan generation circuit can be reduced, which can contribute to downsizing and can generate addresses at high speed. In the zigzag scan circuit of the first embodiment, the
[0064]
In the above description, some other embodiments obtained by modifying the first embodiment have been described. However, some other embodiments obtained by modifying the first embodiment as described below can be given.
[0065]
The first embodiment is characterized by the configuration of forming a zigzag scan address, and the configuration of forming a raster scan address is not limited to that of the first embodiment. For example, a counter using a counter that increments by one with a clock may be used. It is also possible to provide a
[0066]
In the first embodiment, the next address is formed by separately operating the X address and the Y address. However, the entire address is operated without discriminating the X address and the Y address. Address may be formed. For example, as is apparent from FIG. 5, there are only four types of changes in the total address in each cycle, +1, +7, +8, and -7, and these changes are unique due to state transitions. May be formed.
[0067]
Further, in the first embodiment, the next state transition parameter is formed, and then the next address is formed. However, the next address may be formed in the reverse order. For example, in the case of storing a state transition parameter relating to a change state from the current address to the next address in the state transition register 26 described above as another embodiment, the processing in this order simplifies the configuration.
[0068]
Furthermore, in the first embodiment, the zigzag
[0069]
(B) Second embodiment
Next, a second embodiment of the zigzag scan circuit according to the present invention will be described in detail with reference to the drawings. Here, FIG. 12 shows the configuration of the zigzag scan circuit 2-2 of the second embodiment.
[0070]
In the second embodiment, two
[0071]
The address generation configuration for the
[0072]
The
[0073]
The zigzag
[0074]
The
[0075]
The
[0076]
As described above, at the time of image compression and at the time of image decompression, the only difference is whether to select a raster scan or zigzag scan address as a write address and a read address, and otherwise the same. In the following, only the operation during image compression will be described with reference to FIG. FIG. 13 shows the relationship between the operation clock (omitted in FIG. 12) applied to the zigzag scan circuit 2-2 and the operation contents of the
[0077]
First, the
[0078]
When all writing to the
[0079]
When the 64 cycle T2 is completed, the
[0080]
Thereafter, the above-described complementary operations for the
[0081]
Therefore, according to the second embodiment, the data order conversion RAM is used to continuously convert the data order by using two sides, and the zigzag address generation circuit is configured to consider the zigzag scan as a kind of state transition. Since this is applied, it is possible to provide a zigzag scan circuit capable of realizing a considerably high speed with a slight increase in hardware. The zigzag scan circuit of the second embodiment is suitable for a high-speed semi-custom, gate array.
[0082]
As a modified example of the second embodiment, a raster scan address is generated by an incrementer instead of the
[0083]
(C) Third embodiment
Next, a third embodiment of the zigzag scan circuit according to the present invention will be described in detail with reference to the drawings. Here, FIG. 14 shows the configuration of the zigzag scan circuit 2-3 of the third embodiment.
[0084]
The zigzag scan circuit 2-3 of the third embodiment includes a RAM 20-1 for temporarily storing
[0085]
The RAM 20-1 of the third embodiment has two types of address input ports AA and BA, to which the
[0086]
The inside of the RAM 20-1 includes a raster
[0087]
The
[0088]
The raster
[0089]
When the
[0090]
In FIG. 14, signal lines such as a control signal for instructing writing or reading and a processing configuration thereof are omitted.
[0091]
Next, an operation at the time of image compression will be described. When the
[0092]
After the 64-
[0093]
Therefore, according to the third embodiment, since the decoder for zigzag scanning is provided in the RAM 20-1, the occupied area can be reduced to contribute to downsizing, and the design can be made without the need to separately provide a gate circuit. A zigzag scan circuit capable of easy high-speed operation can be provided. The zigzag scan circuit according to the third embodiment is suitable for custom design and area-oriented design.
[0094]
As a modified example of the third embodiment, the
[0095]
(D) Fourth embodiment
Next, a fourth embodiment of the zigzag scan circuit according to the present invention will be described in detail with reference to the drawings. FIG. 16 shows the configuration of the zigzag scan circuit 2-4 of the fourth embodiment.
[0096]
The zigzag scanning circuit 2-4 of the fourth embodiment has two surfaces of the configuration shown in the third embodiment to perform complementary operation (symmetric operation) and has a
[0097]
According to the fourth embodiment, two RAMs for zigzag scanning are provided for complementary operation, so that a zigzag scanning circuit capable of performing data order conversion at a much higher speed than the conventional one is provided. Can be provided. The zigzag scan circuit of the fourth embodiment is suitable for a custom design or a design that emphasizes processing speed.
[0098]
As modified examples of the fourth embodiment, there can be cited one in which the
[0099]
(E) Another embodiment
Although various other embodiments of the present invention have been described above, some other embodiments are as follows.
[0100]
In each of the embodiments described above, the number of words to be used for data order conversion is 64. However, the present invention can be applied to the case where the other square of the integer is the number of words. Further, the number of bits of each word is not limited to 11 bits.
[0101]
In each of the above embodiments, the input data terminal and the output data terminal are separate RAMs, but they may be RAMs having the same terminal.
[0102]
The zigzag scan circuit of the present invention can be applied not only to an image encoding / decoding device but also to an image encoding dedicated device or an image decoding exclusive device. Further, the present invention can be applied to an apparatus that requires data shuffling.
[0103]
In the second and fourth embodiments, two RAMs are provided. However, if complete symmetric operation is difficult due to timing or the like, three or more RAMs may be provided for switching. good.
[0104]
【The invention's effect】
As above,BookAccording to the invention, it is possible to provide a small zigzag scan circuit capable of high-speed processing.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a first embodiment.
FIG. 2 is a block diagram illustrating a position of a zigzag scan circuit in the image encoding / decoding device.
FIG. 3 is an explanatory diagram showing a state of conversion of a data order by a zigzag scan circuit and the like.
FIG. 4 is a block diagram illustrating a possible conventional zigzag scan circuit.
FIG. 5 is an explanatory diagram of processing in which an address is divided into direction-specific addresses in the first embodiment.
FIG. 6 is an explanatory diagram of state types in the first embodiment.
FIG. 7 is a state transition diagram in the first embodiment.
FIG. 8 is an explanatory diagram showing changes in addresses and state transition parameters during zigzag scanning according to the first embodiment.
FIG. 9 is a detailed configuration diagram (part 1) of a zigzag address operation circuit of the first embodiment.
FIG. 10 is a detailed configuration diagram (part 2) of the zigzag address operation circuit of the first embodiment.
FIG. 11 is a detailed configuration diagram (part 3) of the zigzag address operation circuit of the first embodiment.
FIG. 12 is a block diagram showing a second embodiment.
FIG. 13 is an explanatory diagram of the operation of the second embodiment.
FIG. 14 is a block diagram showing a third embodiment.
FIG. 15 is an explanatory diagram of decoding contents of a decoder in a RAM according to a third embodiment.
FIG. 16 is a block diagram showing a fourth embodiment.
[Explanation of symbols]
2-1, 2-2, 2-3, 2-4... Zigzag scanning circuit, 20, 20a, 20b, 20-1, 20-1a, 20-1b... RAM, 22, 22, 22a, 22b. Address generation circuit, 24a Zigzag address generation circuit, 25 ... Address register, 26 ... State transition register, 27 ... Incrementer, 28 ... Zigzag address operation circuit, 29, 37-39 ... Selector, 30, 32 ... Address decoder, 31 RAM cell array, 33a-33n, 34a-34n Tristate buffer, 35 inverter.
Claims (2)
上記アドレス発生回路は、
ジグザグスキャン用のアドレスを生成するために用いられる状態遷移パラメータを格納する状態遷移レジスタと、
Yアドレスを示す上位ビットとXアドレスを示す下位ビットとにより構成され、上記RAMに出力されるアドレスを一時的に格納するアドレスレジスタと、
上記アドレスレジスタから出力された上記アドレスを1つだけ増加するインクリメンタと、
上記状態遷移パラメータと上記アドレスレジスタの出力アドレスとを用いて、ジグザグスキャン用のアドレスと上記状態遷移パラメータとを生成するジグザグアドレス演算回路と、
画像圧縮時に上記入力データを上記RAMに書込むとき若しくは画像伸張時に上記RAMから上記格納データを読出すときに上記インクリメンタから出力された上記アドレスを選択し、画像圧縮時に上記RAMから上記格納データを読出すとき若しくは画像伸張時に上記入力データを上記RAMに書込むときに上記ジグザグ演算回路から出力された上記アドレスを選択する選択回路とにより構成される
ことを特徴とするジグザグスキャン回路。A RAM for temporarily storing input data, di Guzagusukyan circuit and an address generation circuit for generating a read address to be given to when reading the stored data from the write address and the RAM give when writing input data to the RAM And
The address generation circuit ,
A state transition register that stores state transition parameters used to generate an address for zigzag scanning;
An address register configured by an upper bit indicating a Y address and a lower bit indicating an X address, and temporarily storing an address output to the RAM;
An incrementer for increasing the address output from the address register by one,
A zigzag address operation circuit that generates an address for zigzag scanning and the state transition parameter using the state transition parameter and the output address of the address register;
The address output from the incrementer is selected when the input data is written to the RAM at the time of image compression or when the storage data is read from the RAM at the time of image expansion, and the storage data is read from the RAM at the time of image compression. And a selection circuit for selecting the address output from the zigzag arithmetic circuit when the input data is written to the RAM at the time of reading the image or at the time of image expansion. circuit.
2個の上記選択回路を対称的に動作させ、ラスタスキャン状のアドレスを一方の上記RAMに与えているときに、ジグザグスキャン状のアドレスを他方の上記RAMに与え、読出し動作中の上記RAMからのデータを上記出力データ選択手段で選択させる
ことを特徴とする請求項1に記載のジグザグスキャン回路。Two RAMs are used, two RAMs are provided for each RAM as the selection means, and output data selection means for selecting data read from the two RAMs is provided.
Two of the selection circuit symmetrically operated, when giving a raster scan-like address on one of the RAM, giving di Guzagusukyan like addresses to the other of said RAM, said RAM during a read operation 2. The zigzag scanning circuit according to claim 1, wherein the output data selecting means selects the data from the output data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP29302094A JP3578497B2 (en) | 1994-11-28 | 1994-11-28 | Zigzag scan circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP29302094A JP3578497B2 (en) | 1994-11-28 | 1994-11-28 | Zigzag scan circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08153188A JPH08153188A (en) | 1996-06-11 |
JP3578497B2 true JP3578497B2 (en) | 2004-10-20 |
Family
ID=17789449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP29302094A Expired - Fee Related JP3578497B2 (en) | 1994-11-28 | 1994-11-28 | Zigzag scan circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3578497B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102595134A (en) * | 2012-02-23 | 2012-07-18 | 杭州士兰微电子股份有限公司 | Four-channel zig-zag scanning structure and method |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100502413B1 (en) | 2002-11-07 | 2005-07-19 | 삼성전자주식회사 | Image processing apparatus and method for converting image data between raster scan order and block scan order |
CN103428492B (en) * | 2013-07-16 | 2016-11-16 | 山东大学 | The method of quickly zig-zag scanning in a kind of high definition AVS coding |
-
1994
- 1994-11-28 JP JP29302094A patent/JP3578497B2/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102595134A (en) * | 2012-02-23 | 2012-07-18 | 杭州士兰微电子股份有限公司 | Four-channel zig-zag scanning structure and method |
CN102595134B (en) * | 2012-02-23 | 2014-06-11 | 杭州士兰微电子股份有限公司 | Four-channel zig-zag scanning structure and method |
Also Published As
Publication number | Publication date |
---|---|
JPH08153188A (en) | 1996-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
GB2530311A (en) | Data compression | |
JP4442891B2 (en) | Variable length coding apparatus and variable length coding method | |
JPH10207868A (en) | Two-dimensional array transposition circuit | |
JPH0969951A (en) | Encoding method and decoding method | |
US7389007B2 (en) | Semiconductor memory apparatus | |
JP4547503B2 (en) | Arithmetic coding apparatus, arithmetic coding method, arithmetic coding program, and computer-readable recording medium storing the program | |
JP3578497B2 (en) | Zigzag scan circuit | |
JPH05218880A (en) | Method of converting sign of thermetric sign data and decoder and converter used for said method | |
KR100448282B1 (en) | Method for balanced encoding and decoding of locks having the different constant weight | |
JP2003259370A (en) | Image encoding method and image decoding method | |
JPH0653840A (en) | Variable length decoder | |
JPH08251590A (en) | Digital encoding device | |
JP3532137B2 (en) | Data generation circuit | |
JPH0936749A (en) | Coding decoding device and coding method used for it | |
JPH06334869A (en) | Data transposition device | |
JPS60128722A (en) | Variable length encoding and decoding system | |
Paul et al. | GF (2/sup p/) CA based vector quantization for fast encoding of still images | |
KR200309400Y1 (en) | Raster-to-block Converter | |
JP3432655B2 (en) | Image coding device | |
JPH0345093A (en) | Variable length code decoding circuit | |
JPH09294078A (en) | Rearrangement method and circuit for output data in variable length decoder | |
JPH09121286A (en) | Method and device for compressing picture data | |
JP2006115194A (en) | Coding device and method | |
JP2002159006A (en) | Calculation assisting circuit | |
JP2007104155A (en) | Image decoding apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20040713 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040713 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080723 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080723 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090723 Year of fee payment: 5 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090723 Year of fee payment: 5 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |