JP3503711B2 - Raster / block conversion method and apparatus for implementing the method - Google Patents

Raster / block conversion method and apparatus for implementing the method

Info

Publication number
JP3503711B2
JP3503711B2 JP21447794A JP21447794A JP3503711B2 JP 3503711 B2 JP3503711 B2 JP 3503711B2 JP 21447794 A JP21447794 A JP 21447794A JP 21447794 A JP21447794 A JP 21447794A JP 3503711 B2 JP3503711 B2 JP 3503711B2
Authority
JP
Japan
Prior art keywords
block
raster
address
conversion
processing
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 - Lifetime
Application number
JP21447794A
Other languages
Japanese (ja)
Other versions
JPH0877343A (en
Inventor
淳 大島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP21447794A priority Critical patent/JP3503711B2/en
Publication of JPH0877343A publication Critical patent/JPH0877343A/en
Application granted granted Critical
Publication of JP3503711B2 publication Critical patent/JP3503711B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、画像圧縮処理等に用い
ることができるラスター/ブロック変換方法並びにこの
方法を実施する装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a raster / block conversion method that can be used for image compression processing and the like, and an apparatus for implementing this method.

【0002】[0002]

【従来の技術】従来の画像処理においては、画像データ
をラスター(線順次に並ぶ水平方向の画像データ)とし
てピクセル毎のデータ処理を行うことが主流であった。
しかし、近年の画像圧縮技術の向上等に伴い、上記ラス
ターで画像処理を行うよりも、ブロック(水平方向×垂
直方向のブロック状の画像データ群)で画像処理を行う
ことが多くなってきている。特に、カラー静止画におい
ては、JPEG方式がブロックで画像処理を行うように
規格化されたため、ラスター/ブロック変換装置の重要
度が増している。
2. Description of the Related Art In conventional image processing, it has been a mainstream to perform data processing for each pixel by using image data as a raster (image data in a horizontal direction arranged in line order).
However, with recent improvements in image compression technology and the like, it is becoming more common to perform image processing on blocks (horizontal × vertical block-shaped image data groups) than on the raster. . In particular, for color still images, the JPEG system has been standardized to perform image processing in blocks, so that the importance of raster / block conversion devices is increasing.

【0003】[0003]

【発明が解決しようとする課題】ところで、従来のラス
ター/ブロック変換装置において、当該変換処理をソフ
トウェアによって実行する場合は、1画面分の画像デー
タをフレームメモリに格納して必要なアドレスを発生す
るようにしており、ハードウェアによって実行する場合
には、画面サイズによってアドレスを指示するようにし
ていた。
By the way, in the conventional raster / block conversion device, when the conversion process is executed by software, the image data for one screen is stored in the frame memory to generate a necessary address. Therefore, when executing by hardware, the address is specified by the screen size.

【0004】図14は、1画面分の画像データを格納す
るフレームメモリを使用してブロック→ラスター変換を
行う場合の処理内容を示したフローチャートである。
FIG. 14 is a flow chart showing the processing contents when performing block-to-raster conversion using a frame memory which stores image data for one screen.

【0005】このフローチャートにおいて、Aはアドレ
ス、Bは水平方向ピクセル数/8の値(8×8ブロック
を想定している)である。まず、初期化を実行し(ステ
ップ71)、次に、カウントUP要因(本発明の実施例
を参照)に基づきカウントUPするか否かを判断する
(ステップ72)。カウントUPする場合には、Cの値
が8に一致するか否かを判断する(ステップ73)。C
の値が8に一致した場合には、D=D+1、A=A+
(8×D)、及びC=0の処理を実行する(ステップ7
4)。一方、一致しない場合には、A=A+B、及びC
=C+1の処理を実行する(ステップ75)。
In this flow chart, A is an address and B is a value of the number of horizontal pixels / 8 (assuming 8 × 8 blocks). First, initialization is executed (step 71), and then it is determined whether or not to count up based on the count UP factor (see the embodiment of the present invention) (step 72). When counting up, it is determined whether the value of C matches 8 (step 73). C
If the value of is equal to 8, D = D + 1, A = A +
(8 × D), and processing of C = 0 is executed (step 7
4). On the other hand, if they do not match, A = A + B, and C
= C + 1 is executed (step 75).

【0006】しかしながら、上記のラスター/ブロック
変換においては、1画面分のフレームメモリを備える必
要があるためコストが割高になる。また、ハードウェア
では画面サイズによりアドレスを指示しており、画面サ
イズが大きくなればそれだけ大きなメモリが必要になっ
てコスト高になる。また、画面サイズが違えば異なるア
ドレスを発生させる必要があるが、これに対応すること
はできなかった。
However, in the above raster / block conversion, it is necessary to provide a frame memory for one screen, so the cost becomes high. Further, in hardware, the address is designated by the screen size, and the larger the screen size, the larger the memory required and the higher the cost. Further, it is necessary to generate different addresses if the screen size is different, but this cannot be dealt with.

【0007】本発明は、上記の事情に鑑み、大きなメモ
リ容量のメモリを備えることなくラスター/ブロック変
換を行うことができ、また、画面サイズの相違で変化す
る演算係数を任意に変更可能としてアドレスを自動的に
発生することのできるラスター/ブロック変換方法並び
にこの方法を実施する装置を提供することを目的とす
る。
In view of the above circumstances, the present invention can perform raster / block conversion without providing a memory having a large memory capacity, and can arbitrarily change the arithmetic coefficient that changes depending on the screen size. It is an object of the present invention to provide a raster / block conversion method capable of automatically generating a signal and a device for implementing this method.

【0008】[0008]

【課題を解決するための手段】本発明のラスター/ブロ
ック変換方法は、Aを現在のアドレス座標とし、A′を
次のアドレス座標とし、Bを加算値とし、Cを水平方向
ピクセル数とし、χを1ブロックの水平方向ピクセル数
とし、XをC/χの演算で求めた値とし、Yを変換回数
とするとき、XY >(C−1)の関係が成立した場合
は、XY /(C−1)の式における余りをBとし、XY
>(C−1)の関係が成立しない場合は、XY の演算結
果をBとし、上記求めたBに基づき、A′=A+Bの式
によって次のアドレスを求めてラスターデータをブロッ
クデータに変換する一方、χY >(C−1)の関係が成
立した場合は、χY /(C−1)の式における余りをB
とし、χY >(C−1)の関係が成立しない場合は、χ
Y の演算結果をBとし、上記求めたBに基づき、A′=
A+Bの式によって次のアドレスを求めてブロックデー
タをラスターデータに変換することを特徴とする。
According to the raster / block conversion method of the present invention, A is the current address coordinate, A'is the next address coordinate, B is the addition value, and C is the number of horizontal pixels. When χ is the number of pixels in the horizontal direction of one block, X is a value obtained by the calculation of C / χ, and Y is the number of conversions, X Y > (C-1) is satisfied, then X Y Let B be the remainder in the formula of / (C-1), and X Y
When the relation of> (C-1) is not established, the calculation result of X Y is set to B, and the following address is calculated based on the above-obtained B by the formula of A '= A + B, and the raster data is converted into block data. On the other hand, when the relation of χ Y > (C-1) is established, the remainder in the formula of χ Y / (C-1) is B
And if the relationship of χ Y > (C-1) does not hold, χ
Let B be the calculation result of Y , and based on B obtained above, A ′ =
It is characterized in that the next address is obtained by the formula A + B and the block data is converted into raster data.

【0009】また、上記方法におけるXY の値或いはχ
Y を、カウント回数がX或いはχに至るまで同一値を順
次加算させた値を用いることにより得るとともに、ブロ
ックの大きさで定まるメモリ内の全ピクセルに対する変
換処理終了後の次の変換処理に際して上記順次加算させ
た値を上記同一値とするようにしてもよい。
The value of X Y or χ in the above method
Y is obtained by using a value obtained by sequentially adding the same value until the number of counts reaches X or χ, and at the time of the next conversion process after the conversion process for all pixels in the memory determined by the block size is completed, The values that are sequentially added may be set to the same value.

【0010】また、本発明のラスター/ブロック変換方
法においては、ブロックの大きさに対応して変数を適宜
変更することを特徴とするようにしてもよい。
Further, the raster / block conversion method of the present invention may be characterized in that the variables are appropriately changed in accordance with the size of the block.

【0011】また、本発明のラスター/ブロック変換装
置は、上記ラスター/ブロック変換方法を実施するため
に、カウント回数がX或いはχに至るまで同一値を順次
加算させる加算手段と、ブロックの大きさで定まるメモ
リ内の全ピクセルに対する変換処理終了後の次の変換処
理に際して上記順次加算させた値を上記同一値とするた
めのラッチ手段とを備えている。
Further, the raster / block conversion device of the present invention, in order to carry out the raster / block conversion method, adds means for sequentially adding the same value until the count reaches X or χ, and the size of the block. And latch means for setting the sequentially added values to the same value in the next conversion process after the conversion process for all the pixels in the memory determined by.

【0012】[0012]

【作用】上記第1の構成によれば、水平方向ピクセル数
×ブロックの一辺のピクセル数のメモリ容量があればラ
スター/ブロック変換を行うことができま。また、外部
で設定された任意の画面サイズにおいてラスター/ブロ
ック変換のためのメモリのアドレスを自動的に発生する
ことができる。しかも、ラスター→ブロック変換とブロ
ック→ラスター変換とを同じ演算式(係数を違えるの
み)によって行うことができる。
According to the first configuration, raster / block conversion can be performed if there is a memory capacity of the number of horizontal pixels × the number of pixels on one side of the block. Further, it is possible to automatically generate a memory address for raster / block conversion in an arbitrary screen size set externally. Moreover, the raster → block conversion and the block → raster conversion can be performed by the same arithmetic expression (only the coefficients are different).

【0013】上記第2、第4の構成によれば、乗算処理
を行わずに、加算処理によって変換のためのアドレスを
生成することができる。
According to the second and fourth configurations, it is possible to generate an address for conversion by addition processing without performing multiplication processing.

【0014】上記第3の構成によれば、ブロックの大き
さに対応して係数を任意に変更するので、一般的な8×
8ピクセルのブロックだけでなく、例えば、16×16
ピクセルのブロックにも容易に対応することができる。
According to the third configuration, the coefficient is arbitrarily changed according to the size of the block.
Not only blocks of 8 pixels, but for example 16x16
Blocks of pixels can be easily accommodated.

【0015】[0015]

【実施例】【Example】

(実施例1)以下、本発明のその実施例を示す図に基づ
いて説明する。本実施例では、ソフトウェアによってラ
スター/ブロック変換を実行する。
(Embodiment 1) An embodiment of the present invention will be described below with reference to the drawings. In this embodiment, software performs the raster / block conversion.

【0016】(ラスター→ブロック変換)まず、ラスタ
ーからブロック(8×8)への変換処理を示す。ラスタ
ーからブロックへの変換処理は、以下のようにメモリに
対する読出・書込アドレスを生成することによって行わ
れる。
(Raster-to-block conversion) First, the conversion process from raster to block (8 × 8) will be described. The raster-to-block conversion process is performed by generating a read / write address for the memory as follows.

【0017】読出・書込アドレスA′は、現在のアドレ
スであるAと、以下の計算によって与えられる加算値B
とを加算することによって得られる。加算値Bは、XY
>(C−1)の関係が成立した場合には、XY /(C−
1)の余りの値(後記するように、XY %(C−1)で
表わせる)であり、XY >(C−1)の関係が成立しな
い場合には、XY の値である。上記Xは、C/χの計算
により算出される。Cは水平方向ピクセル数であり、χ
はブロックの大きさ(ブロックの水平方向ピクセル数)
であり、Yは変換回数である。本実施例では、8×8ブ
ロックとしているので、χ=8となる。
The read / write address A'is a current address A and an added value B given by the following calculation.
It is obtained by adding and. The added value B is X Y
When the relationship of> (C-1) is established, X Y / (C-
1) The remainder value (which can be represented by XY % (C-1) as described later), and is the XY value when the relationship of XY > (C-1) is not established. . The X is calculated by calculating C / χ. C is the number of pixels in the horizontal direction, and χ
Is the block size (number of horizontal pixels in the block)
And Y is the number of conversions. In this embodiment, since 8 × 8 blocks are used, χ = 8.

【0018】以上の関係および各変数をまとめて示す
と、以下のようになる。
The above relationship and each variable are summarized as follows.

【0019】[0019]

【数1】XY >(C−1)の関係が成立した場合 B=XY %(C−1) XY >(C−1)の関係が成立しない場合 B=XY A′=A+B A=現在のアドレス座標 A′=次のアドレス座標 B=加算値 C=水平方向ピクセル数 χ=ブロックの大きさ(本実施例ではχ=8) X=C/χ Y=変換回数## EQU1 ## When the relationship of XY > (C-1) is established, B = XY % (C-1) When the relationship of XY > (C-1) is not established, B = XY A '= A + B A = current address coordinate A ′ = next address coordinate B = addition value C = horizontal pixel number χ = block size (χ = 8 in this embodiment) X = C / χ Y = number of conversions

【0020】図1は、ラスターからブロックへの変換処
理を示すフローチャートである。まず、ステップ1で
は、各変数の初期化処理を行う。次に、カウントアップ
決定要因に基づいてカウントアップするか否かを判断す
る(ステップ2)。このカウントアップを決定する要因
とは、以下のような場合を意味する。例えば、ブロック
が8×8から成るとき、この8×8ブロックにおける一
列の8個分のアドレスを発生させる場合、この8個のド
レスはアドレス信号の下位3ビットにおいて“000〜
111”で表すことができ、そして、その次のアドレス
を発生するためには第4ビット目に桁上げをする必要が
あるが、この桁上げが必要になる時点をカウントアップ
要因としている。
FIG. 1 is a flowchart showing a raster-to-block conversion process. First, in step 1, each variable is initialized. Next, it is determined whether to count up based on the count-up determination factor (step 2). The factors that determine the count-up mean the following cases. For example, when a block is composed of 8 × 8 and eight addresses in a row in this 8 × 8 block are generated, these eight addresses are “000 to 000” in the lower 3 bits of the address signal.
111 ", and it is necessary to carry to the 4th bit in order to generate the next address, but the point at which this carry is necessary is the count-up factor.

【0021】ステップ2でカウントアップを実行すべき
と判断した場合には、B=XY の計算を実行する(ステ
ップ3)。次に、B>(C−1)か否かを判断する(ス
テップ4)。ステップ4でYESとされるのは、XY
(C−1)の関係が成立した場合であるので、B=B%
(C−1)の計算を実行する(ステップ5)。ステップ
3ではB=XY の計算を行っているので、ステップ5の
計算は、XY /(C−1)の余りをBとする処理が行わ
れたことになる。そして、このように算出されたBを用
いて次のアドレスであるA′を、A=A+Bの計算処
理、及びA′=Aの処理によって求める(ステップ
6)。
When it is judged in step 2 that the count-up should be executed, B = X Y is calculated (step 3). Next, it is determined whether B> (C-1) (step 4). If YES in step 4, X Y >
Since the relationship (C-1) is established, B = B%
The calculation of (C-1) is executed (step 5). Since B = X Y is calculated in step 3, the calculation in step 5 means that the remainder of X Y / (C-1) is B. Then, using the B thus calculated, the next address A'is obtained by the calculation process of A = A + B and the process of A '= A (step 6).

【0022】一方、ステップ4でNOとされた場合は、
Y >(C−1)の関係が成立しない場合であるので、
ステップ3で求めたB(B=XY )を用いて、そのまま
A=A+Bの計算、及びA′=Aを実行する(ステップ
6)。
On the other hand, if NO in step 4,
Since it is a case where the relationship of XY > (C-1) is not established,
Using B (B = XY ) obtained in step 3, the calculation of A = A + B and A '= A are executed as they are (step 6).

【0023】以上のようにして求められた次のアドレス
A′によってメモリに対する読出・書込が実行される。
Reading / writing from / to the memory is executed by the next address A'obtained as described above.

【0024】上記ステップ6の処理の後、A′の値と
(C−1)の値とが一致するか否かを判断する(ステッ
プ7)。一致しなければ、ステップ2に進む一方、一致
したならば、A′=0及びA=0の処理を実行するとと
もに、Yをインクリメントする処理を実行し(ステップ
8)、ステップ2に進む。
After the processing of step 6 above, it is determined whether or not the value of A'is equal to the value of (C-1) (step 7). If they do not match, the process proceeds to step 2, while if they match, the process of A ′ = 0 and A = 0 is executed, and the process of incrementing Y is executed (step 8), and the process proceeds to step 2.

【0025】以上の処理が実行されることにより、図2
乃至図4に示すように、メモリにデータが格納されてい
くことになる。なお、この図は、8×56のラインメモ
リの内容を示したものであり、8×56個の枠中の数字
は、線順次に並ぶピクセルの番号を示している。また、
図2は0回目(Y=0)の時点のメモリ内容を、図3は
1回目(Y=1)の時点のメモリ内容を、図4は2回目
(Y=2)の時点のメモリ内容を示している。
By executing the above processing, the process shown in FIG.
As shown in FIG. 4, data is stored in the memory. It should be noted that this figure shows the contents of the 8 × 56 line memory, and the numbers in the 8 × 56 frame indicate the numbers of the pixels lined up in line order. Also,
2 shows the memory contents at the 0th time (Y = 0), FIG. 3 shows the memory contents at the 1st time (Y = 1), and FIG. 4 shows the memory contents at the 2nd time (Y = 2). Shows.

【0026】また、この例では、水平方向のピクセル数
は56なのでC=56となり、8×8のブロックとする
のでX=7(56/8)となる。なお、本実施例では、
このようにラインメモリを用いた例を示しているが、本
方法においても、1画面メモリを用いることが可能であ
る。
Further, in this example, the number of pixels in the horizontal direction is 56, so that C = 56, and since the block is 8 × 8, X = 7 (56/8). In this example,
Although an example using a line memory is shown in this way, a single screen memory can also be used in this method.

【0027】次に、図1のフローチャートに従って処理
の内容を具体的に説明する。まず、初期化後の最初のス
テップ3で行われる計算では、Y=0なので、XY =7
0 =1となる。従って、XY >(C−1)は成立せず、
ステップ4ではNOと判断され、ステップ6に進むこと
になる。前記のステップ3の処理によってB=1となっ
ているので、ステップ6では、A=A+1の計算、及び
A′=Aの処理によって次のアドレスA′を算出するこ
とになる。以上の処理は、A=(56−1)となるまで
繰り返し実行される。
Next, the contents of the processing will be concretely described with reference to the flowchart of FIG. First, in the calculation performed in the first step 3 after initialization, since Y = 0, X Y = 7
0 = 1. Therefore, X Y > (C-1) does not hold,
In step 4, NO is determined, and the process proceeds to step 6. Since B = 1 has been obtained by the process of step 3, the next address A'is calculated by the process of A = A + 1 and the process of A '= A in step 6. The above processing is repeatedly executed until A = (56-1).

【0028】ここで、0〜7までの合計8個のアドレス
は、アドレス信号の下位3ビットを000〜111まで
順にインクリメントすることにより行うことができる。
その次の8〜15までの合計8個のアドレスは、第4ビ
ット目を“1”とし、3ビットの信号を000〜111
まで順にインクリメントすればよいことになる。以後の
8個のアドレス発生も、同様に、第4ビット目以上にお
いて順次桁上げを実行していけばよい。この第4ビット
目以上において順次桁上げをする処理は、カウントアッ
プ要因が発生する毎にステップ2でYESとされ、ステ
ップ6を経ることにより実行される。
Here, a total of 8 addresses from 0 to 7 can be performed by sequentially incrementing the lower 3 bits of the address signal from 000 to 111.
In the next eight addresses in total, 8 to 15, the fourth bit is "1" and the 3-bit signal is 000 to 111.
It will be sufficient to increment in order. For the subsequent generation of eight addresses, similarly, carry may be sequentially executed at the fourth bit and above. The process of sequentially carrying the digits in the fourth bit and higher is executed by making YES in step 2 each time a count-up factor occurs and going through step 6.

【0029】前記のA=A+1、及びA′=Aで得られ
るA′は、既に述べたように、上記第4ビット目以上の
値に対応しており、このA′は下位3ビットが000〜
111を繰り返す毎に1ずつ増加するため、図2のごと
く、メモリのアドレス順にデータが格納されていくこと
になる。具体的には、Aの値が“0”のときは0〜7番
地、“1”のときは、8〜15番地、というようにアド
レスが生成されてデータが格納されていく。なお、この
図2に示した状態では、当初のメモリにはデータが格納
されていないため、上記のごとく生成されたアドレスに
よってデータの書込のみが行われる。
As described above, A'obtained by A = A + 1 and A '= A corresponds to the value of the fourth bit or more, and the lower 3 bits of this A'are 000. ~
Since the value increases by 1 every time 111 is repeated, the data is stored in the memory address order as shown in FIG. Specifically, when the value of A is "0", the address is 0 to 7, and when it is "1", the address is 8 to 15, and the data is stored. Note that, in the state shown in FIG. 2, since no data is initially stored in the memory, only the writing of data is performed by the address generated as described above.

【0030】ステップ7においてA′=(56−1)と
なると、ステップ8に進む。上記の“56”は、二進数
で表すと“111000”である。A′は前述のよう
に、第4ビット目以上の値に対応している。“1110
00”が上記A′として第4ビット目〜第9ビット目の
値であるため、その十進数値は、“448”になる。即
ちA′=(56−1)なるときのアドレスは、メモリの
最終番地である447番地であり、当該メモリ全体の処
理を終了したことになる。
When A '= (56-1) in step 7, the process proceeds to step 8. The above "56" is "111000" when expressed in binary. As described above, A'corresponds to the value of the fourth bit and above. "1110
Since 00 "is the value of the 4th to 9th bits as A ', the decimal value is" 448 ". That is, the address when A' = (56-1) is the memory. The last address is 447, which means that the processing of the entire memory has been completed.

【0031】そして、ステップ8で、AとA′のクリ
ア、及びYのインクリメントを実行し、再びステップ2
に進むことになる。
Then, in step 8, A and A'are cleared and Y is incremented, and step 2 is executed again.
Will proceed to.

【0032】上記ステップ8を経てステップ2に進む場
合、Y=1となっているため、XY=71 =7となる。
この場合も、ステップ3,4において、XY >(C−
1)は成立せず、B=XY =7となる。従って、ステッ
プ6において、A=A+7の計算及びA′=Aの処理に
よって次のアドレスが算出される。
When proceeding to step 2 through step 8 described above, since Y = 1, X Y = 7 1 = 7.
Also in this case, in steps 3 and 4, X Y > (C−
1) does not hold and B = XY = 7. Therefore, in step 6, the next address is calculated by calculating A = A + 7 and processing A '= A.

【0033】前記のA=A+7、及びA′=Aで得られ
るA′は、既に述べたように、上記第4ビット目以上の
値に対応しており、このA′は下位3ビットが000〜
111を繰り返す毎に7ずつ増加するため、図3のごと
く、56個飛びにメモリのアドレスが生成され、そのア
ドレスに次のデータが格納されていくことになる。
As described above, A'obtained by A = A + 7 and A '= A corresponds to the value of the fourth bit or more, and the lower 3 bits of this A'are 000. ~
Since it increases by 7 every time 111 is repeated, as shown in FIG. 3, every 56 addresses are generated in the memory, and the next data is stored at that address.

【0034】具体的には、Aの値が“0”のときは0〜
7番地には次のデータにおける0〜7が、“7”のとき
は56〜63番地には次のデータにおける8〜15が、
というように生成されたアドレスにデータが格納されて
いく。即ち、図2における0〜7,56〜63,112
〜119,……,392〜399のデータが読み出され
ると同時に、図3に示すように、上記ブロック枠内に、
次のデータにおける0〜7,8〜15,16〜23,…
…,56〜63の8個ずつのデータが書き込まれること
になる。
Specifically, when the value of A is "0", 0
At address 7, 0 to 7 in the next data, when it is "7", at addresses 56 to 63, 8 to 15 in the next data,
Data is stored at the generated address. That is, 0 to 7, 56 to 63, 112 in FIG.
.. 119, ..., 392 to 399 data are read out, and at the same time, as shown in FIG.
0-7, 8-15, 16-23, ... in the following data
.., 56 to 63, that is, eight pieces of data are written.

【0035】ここで、或るアドレスに0〜7を加算して
得られる合計8個のアドレスは、第4ビット目以上のビ
ットを上記或るアドレスに対応させるとともに下位3ビ
ットを000〜111まで順にインクリメントすること
により発生させることができる。図3の場合であれば、
0〜7のデータは0〜7のアドレスに、8〜15のデー
タは、56〜63のアドレスに、という具合であり、上
記或るアドレスといのは、この場合、“0”,“5
6”,“112”,…,“392”という具合になる。
Here, for a total of eight addresses obtained by adding 0 to 7 to a certain address, the fourth and higher bits correspond to the certain address, and the lower 3 bits are from 000 to 111. It can be generated by sequentially incrementing. In the case of FIG. 3,
The data of 0 to 7 are at addresses 0 to 7, the data of 8 to 15 are at addresses of 56 to 63, and the certain address is "0" or "5" in this case.
6 ”,“ 112 ”, ...,“ 392 ”.

【0036】前記のA=A+7の計算とA′=Aの処理
で得られるA′は、前述したように、第4ビット目以上
のビットに対応している。A′=7であるとき、この7
を二進数で表せば、“111”であり、この“111”
を第4〜第6ビットに当てはめれば、この“111”は
十進数で“56”を意味することになる。また、A′=
14であるとき、この14を二進数で表せば、“111
0”であり、この“1110”を第4〜第7ビットに当
てはめれば、この“1110”は十進数で“112”を
意味することになる。
As described above, A'obtained by the calculation of A = A + 7 and the process of A '= A corresponds to the fourth and higher bits. When A ′ = 7, this 7
When expressed in binary, it is "111".
Is applied to the 4th to 6th bits, this "111" means "56" in decimal. Also, A '=
When it is 14, if this 14 is expressed in a binary number, it is “111
It is 0, and if this "1110" is applied to the 4th to 7th bits, this "1110" means "112" in decimal.

【0037】即ち、前記のA=A+7の計算とA′=A
の処理で得られるA′は、前記の或るアドレスである
“0”,“56”,“112”,…,“392”を表す
ものとなる。このような或るアドレス(先頭アドレス)
の生成とそれに追加される下位3ビットのインクリメン
トにより、図3のごとく、8×8ブロックのデータ読出
が行われることになる。
That is, the above calculation of A = A + 7 and A '= A
A'obtained by the above process represents the above-mentioned certain addresses "0", "56", "112", ..., "392". Such an address (start address)
And the addition of the lower 3 bits added thereto, the 8 × 8 block data is read as shown in FIG.

【0038】次に、ステップ7においてA′=(56−
1)となると、ステップ8に進む。上記の“56”は、
二進数で表すと“111000”である。A′は前述の
ように、第4ビット目以上の値である。“11100
0”が上記A′として第4ビット目〜第9ビット目の値
であるため、その十進数値は、“448”になる。即ち
A′=(56−1)なるときのアドレスは、メモリの最
終番地である447番地であり、当該メモリ全体の処理
を終了したことになる。
Next, in step 7, A '= (56-
When 1) is reached, the process proceeds to step 8. The above "56" is
When expressed in binary, it is “111000”. As described above, A'is a value of the fourth bit or higher. "11100
Since 0 "is the value of the 4th to 9th bits as A ', its decimal value is" 448 ". That is, the address when A' = (56-1) is the memory. The last address is 447, which means that the processing of the entire memory has been completed.

【0039】そして、ステップ8で、AとA′のクリア
と、Yのインクリメントを実行し、再びステップ2に進
むことになる。
Then, in step 8, A and A'are cleared and Y is incremented, and the process proceeds to step 2 again.

【0040】上記ステップ8を経てステップ2に進む場
合、Y=2となっているため、XY=72 =49とな
る。この場合も、ステップ3,4において、XY >(C
−1)は成立せず、B=XY =49となる。従って、ス
テップ6において、A=A+49の計算及びA′=Aの
処理によって次のアドレスが算出される。
When proceeding to step 2 through step 8 described above, since Y = 2, X Y = 7 2 = 49. Also in this case, in steps 3 and 4, X Y > (C
-1) does not hold, and B = XY = 49. Therefore, in step 6, the next address is calculated by calculating A = A + 49 and processing A '= A.

【0041】前記のA=A+49およびA′=Aで得ら
れるA′は、既に述べたように、上記第4ビット目以上
の値に対応しており、このA′は下位3ビットが000
〜111を繰り返す毎に49ずつ増加するため、図4の
ごとく、392個飛びにメモリのアドレスが生成され、
そのアドレスに次のデータが格納されていくことにな
る。
As described above, A'obtained by A = A + 49 and A '= A corresponds to the value of the fourth bit or more, and the lower 3 bits of this A'are 000.
Each time ~ 111 is repeated, it increases by 49, so as shown in FIG. 4, memory addresses are generated in 392 jumps.
The next data will be stored at that address.

【0042】具体的には、Aの値が“0”のときは0〜
7番地に次のデータにおける0〜7を、“49”のとき
は56〜63番地に次のデータにおける8〜15を、と
いうように生成されたアドレスにデータが格納されてい
く。即ち、図3における0〜7,56〜63,112〜
119,……,392〜399のデータが読み出される
と同時に、図4に示すように、その読み出したアドレス
に、次のデータにおける0〜7,8〜15,16〜2
3,……,56〜63のデータが書き込まれることにな
る。
Specifically, when the value of A is "0", it is 0
The data is stored in the generated addresses such as 0 to 7 in the next data at address 7, 8 to 15 in the next data at addresses 56 to 63 when "49". That is, 0-7, 56-63, 112- in FIG.
At the same time that the data 119, ..., 392 to 399 are read out, as shown in FIG. 4, 0 to 7, 8 to 15, 16 to 2 in the next data are stored in the read address.
The data of 3, ..., 56-63 will be written.

【0043】次に、ステップ8を経てステップ2に進む
場合、Y=3となっているため、XY =73 =343と
なる。この場合は、ステップ3,4において、XY
(C−1)が成立するので、B=XY /(C−1)=1
3となる。従って、ステップ6において、A=A+13
の計算及びA′=Aの処理によって次のアドレスが算出
される。
Next, when proceeding to step 2 through step 8, since Y = 3, X Y = 7 3 = 343. In this case, in steps 3 and 4, XY >
Since (C-1) is established, B = XY / (C-1) = 1
It becomes 3. Therefore, in step 6, A = A + 13
And the processing of A ′ = A, the next address is calculated.

【0044】以後同様の処理が実行され、上記の如くラ
インメモリを用いて1画面のデータについてラスターか
らブロックへの変換処理が実行されることになる。
After that, the same processing is executed, and as described above, the conversion processing from raster to block is executed for the data of one screen by using the line memory.

【0045】(ブロック→ラスター変換)次に、ブロッ
ク(8×8)からラスターへの変換処理を示す。ブロッ
クからラスターへの変換処理は、以下のようにメモリに
対する読出・書込アドレスを生成することによって行わ
れる。
(Block → Raster Conversion) Next, the conversion processing from block (8 × 8) to raster will be described. The block-to-raster conversion process is performed by generating a read / write address for the memory as follows.

【0046】算出すべき読出・書込アドレスをA′は、
現在のアドレスであるAと、以下の計算によって与えら
れる加算値Bとを加算することによって算出される。加
算値Bは、χY >(C−1)の関係が成立した場合に
は、χY /(C−1)の余りであり、χY >(C−1)
の関係が成立しない場合には、χY である。上記Cは水
平方向ピクセル数であり、χはブロックの大きさであ
り、Yは変換回数である。本実施例では、8×8ブロッ
クとしているので、χ=8となる。
The read / write address to be calculated is A '.
It is calculated by adding the current address A and the addition value B given by the following calculation. The added value B is the remainder of χ Y / (C-1) when the relation of χ Y > (C-1) holds, and χ Y > (C-1)
If the relation of does not hold, then χ Y. C is the number of pixels in the horizontal direction, χ is the size of the block, and Y is the number of conversions. In this embodiment, since 8 × 8 blocks are used, χ = 8.

【0047】以上の関係および各変数のをまとめて示せ
ば、以下のようになる。なお、変数の定義は数1の場合
と同じである。
The above relationship and each variable can be summarized and shown as follows. The definition of the variable is the same as in the case of equation 1.

【0048】[0048]

【数2】χY >(C−1)の関係が成立した場合 B=χY %(C−1) χY >(C−1)の関係が成立しない場合 B=χY A′=A+B[Formula 2] When the relationship of χ Y > (C-1) is established, B = χ Y % (C-1) When the relationship of χ Y > (C-1) is not established, B = χ Y A ′ = A + B

【0049】図5は、ブロックからラスターへの変換処
理を示すフローチャートである。まず、ステップ11で
は、各変数の初期化処理を行う。次に、カウントアップ
するか否かを判断する(ステップ12)。このカウント
アップを決定する要因は、図1のフローチャートの場合
と同様である。
FIG. 5 is a flow chart showing the conversion processing from block to raster. First, in step 11, initialization processing of each variable is performed. Next, it is determined whether to count up (step 12). The factors that determine this count-up are the same as in the case of the flowchart of FIG.

【0050】ステップ12でカウントアップを実行すべ
きと判断した場合には、B=χY の計算を実行する(ス
テップ13)。次に、B>(C−1)か否かを判断する
(ステップ14)。ステップ14でYESとされた場合
は、χY >(C−1)の関係が成立した場合であるの
で、B=B%(C−1)の計算を実行する(ステップ1
5)。この計算は、ステップ13でB=XY の計算を行
っているので、χY /(C−1)の余りをBとする処理
が行われたことになる。そして、このように算出された
Bを用いて次のアドレスであるA′を、A=A+Bの計
算処理、及びA′=Aの処理によって求める(ステップ
16)。
When it is judged in step 12 that the count-up should be executed, B = χ Y is calculated (step 13). Next, it is determined whether B> (C-1) (step 14). If YES in step 14, it means that the relation of χ Y > (C-1) is established, and therefore the calculation of B = B% (C-1) is executed (step 1
5). In this calculation, since B = X Y is calculated in step 13, it means that the remainder of χ Y / (C−1) is B. Then, using the B thus calculated, the next address A'is obtained by the calculation process of A = A + B and the process of A '= A (step 16).

【0051】一方、ステップ14でNOとされた場合
は、χY >(C−1)の関係が成立しない場合であるの
で、ステップ13で求めたB(B=χY )を用いて、そ
のままA=A+Bの計算を実行する(ステップ16)。
On the other hand, if NO in step 14, it means that the relationship of χ Y > (C-1) is not established. Therefore, B (B = χ Y ) obtained in step 13 is used as it is. The calculation of A = A + B is executed (step 16).

【0052】以上のようにして求められた次のアドレス
A′によってメモリに対する読出・書込が実行される。
Reading / writing from / to the memory is executed by the next address A'obtained as described above.

【0053】上記ステップ6の処理の後、A′の値と
(C−1)の値とが一致するか否かを判断する(ステッ
プ7)。一致しなければ、ステップ2に進む一方、一致
したならば、A′=0及びA=A′の処理を実行すると
ともに、Yをインクリメントする処理を実行し(ステッ
プ8)、ステップ2に進む。
After the processing of step 6 above, it is judged whether or not the value of A'is equal to the value of (C-1) (step 7). If they do not match, the process proceeds to step 2. On the other hand, if they do match, the process of A '= 0 and A = A' is executed, and the process of incrementing Y is executed (step 8), and the process proceeds to step 2.

【0054】以上の処理が実行されることにより、図6
乃至図8に示すように、メモリにデータが格納されてい
くことになる。
By executing the above processing, FIG.
As shown in FIG. 8, data is stored in the memory.

【0055】図6は0回目(Y=0)の時点のメモリ内
容を示している。0回目では、A=A+1、及びA′=
Aによって次のアドレスA′が求められるため、ラスタ
ー→ブロック変換における0回目と同様のアドレス生成
が実行されることになる。
FIG. 6 shows the memory contents at the 0th time (Y = 0). At the 0th time, A = A + 1 and A ′ =
Since the next address A ′ is obtained by A, the same address generation as the 0th time in the raster → block conversion is executed.

【0056】図7は1回目(Y=1)の時点のメモリ内
容を示している。1回目では、A=A+8、A′=Aに
よって次のアドレスA′が求められるため、ラスター→
ブロック変換におけるA=A+7、A′=Aにおける処
理によるアドレス生成に対して、8個分増加したアドレ
スの生成が行われる。
FIG. 7 shows the memory contents at the first time (Y = 1). At the first time, the next address A'is obtained by A = A + 8 and A '= A, so the raster →
With respect to the address generation by the process of A = A + 7 and A ′ = A in the block conversion, an address increased by 8 is generated.

【0057】図8は2回目(Y=2)の時点のメモリ内
容を示している。1回目では、A=A+9、A′=Aに
よって次のアドレスA′が求められるため、ラスター→
ブロック変換におけるA=A+7、A′=Aにおける処
理によるアドレス生成に対して、16個分増加したアド
レスの生成が行われる。
FIG. 8 shows the memory contents at the time of the second time (Y = 2). At the first time, the next address A'is obtained by A = A + 9 and A '= A, so the raster →
With respect to the address generation by the processing of A = A + 7 and A ′ = A in the block conversion, the address generation increased by 16 is performed.

【0058】なお、図6〜図8のメモリ内容と図2〜図
4のメモリ内容との間には、対応関係はない。
There is no correspondence between the memory contents shown in FIGS. 6 to 8 and the memory contents shown in FIGS.

【0059】上記の構成により、水平方向ピクセル数×
ブロックの一辺のピクセル数のメモリ容量で、ラスター
データをブロックデータに変換でき、また、ブロックデ
ータをラスターデータに変換できる。更に、上記実施例
のように、8×8のブロックに限らず、任意のサイズの
ブロックへの変換およびその逆の変換が行える。例え
ば、数1の式のXの値を水平方向ピクセル数/7とし、
数2の式のχを7とすることにより、7×7のブロック
への変換およびその逆変換が行えることになる。なお、
χを7とする場合には、水平方向ピクセル数Cは、例え
ば49というように、7の倍数となる。更には、7×8
といったブロックにも対応できる。
With the above configuration, the number of horizontal pixels ×
Raster data can be converted into block data and block data can be converted into raster data with the memory capacity of the number of pixels on one side of the block. Further, as in the above embodiment, not only the 8 × 8 blocks but also blocks of any size and vice versa can be converted. For example, the value of X in the expression of Equation 1 is set to the number of horizontal pixels / 7,
By setting χ in the expression of Equation 2 to 7, conversion into a 7 × 7 block and its inverse conversion can be performed. In addition,
When χ is set to 7, the horizontal pixel number C is a multiple of 7 such as 49. Furthermore, 7 × 8
It can also be applied to such blocks.

【0060】(実施例2)以下、本発明のその実施例を
示す図に基づいて説明する。本実施例は、ハードウェア
によってラスター/ブロック変換を実行する場合を説明
する。
(Embodiment 2) An embodiment of the present invention will be described below with reference to the drawings. In this embodiment, a case where the raster / block conversion is executed by hardware will be described.

【0061】図9は、ハードウェアによってラスター→
ブロック変換を実行する場合の処理内容を示したフロー
チャートである。ハードウェアによる上記変換処理にお
いては、乗算器を用いずに加減算器で構成した。図9の
処理内容は、加減算器を用いて上記変換処理を行う場合
を示している。
FIG. 9 shows that the raster
It is the flowchart which showed the processing content in the case of performing block conversion. In the above conversion processing by hardware, it is configured by an adder / subtractor without using a multiplier. The processing content of FIG. 9 shows a case where the above conversion processing is performed using an adder / subtractor.

【0062】図10は、ハードウェアによってブロック
→ラスター変換を実行する場合の処理内容を示したフロ
ーチャートである。ハードウェアによる上記変換処理に
おいては、乗算器を用いずに加減算器で構成した。図1
0の処理内容は、加減算器を用いて上記変換処理を行う
場合を示している。
FIG. 10 is a flow chart showing the processing contents when the block → raster conversion is executed by hardware. In the above conversion processing by hardware, it is configured by an adder / subtractor without using a multiplier. Figure 1
The processing content of 0 indicates a case where the above conversion processing is performed using an adder / subtractor.

【0063】図11は、上記図9,10の処理内容を実
行するハードウェアを示した回路図である。
FIG. 11 is a circuit diagram showing hardware for executing the processing contents of FIGS. 9 and 10.

【0064】なお、図9,図10,図11の相互間で
は、各符号は対応関係を有すものであるが、前記の実施
例1で用いた符号との間には対応関係はない。本実施例
では、符号は以下のように定義される。
Note that, although the respective codes in FIG. 9, FIG. 10, and FIG. 11 have a corresponding relationship, they do not have a corresponding relationship with the codes used in the first embodiment. In the present embodiment, the code is defined as follows.

【0065】 A:水平方向ピクセル数/ブロックの大きさ B:水平方向ピクセル数 C:カウント値 D:実施例1におけるBに相当(初期値は、X0 =1な
ので1に設定) E:余りの数値 F:アドレス
A: Number of pixels in horizontal direction / size of block B: Number of pixels in horizontal direction C: Count value D: Corresponding to B in the first embodiment (initial value is set to 1 because X 0 = 1) E: Remainder Value F: Address

【0066】(ラスター→ブロック変換)まず、図9の
フローチャートを用いて、ラスター→ブロック変換を説
明する。変換の考え方自体は、実施例1の数1の式に基
づく変換処理と同じである。上記フローチャート及び上
記回路構成は、数1の式に基づく変換処理をハードウェ
アで行うのに適した構成にしたものである。
(Raster → Block Conversion) First, the raster → block conversion will be described with reference to the flowchart of FIG. The concept of conversion itself is the same as the conversion process based on the expression of Formula 1 in the first embodiment. The flow chart and the circuit configuration described above are configurations suitable for performing the conversion process based on the equation (1) by hardware.

【0067】図9のフローチャートを図1のフローチャ
ートとの対応関係で説明する。ステップ31,32は、
図1のステップ1,2と同様の処理を実行する。次に、
ステップ33の判断処理により、Cが1〜6の値を採る
間はYESとなり、ステップ34においてC=C+1及
びE=E+Dの加算処理を行うとともに、E>(B−
1)か否かを判断する(ステップ35)。Eが0〜55
の値を採る間は、NOと判断され、ステップ37に進む
が、Eが56以上の値を採ると、E=E−(B−1)の
処理を実行し(ステップ36)、その後にステップ37
に進む。また、ステップ33において、C=7とされた
ときには、NOとなり、そのままステップ37に進む。
The flowchart of FIG. 9 will be described in relation to the flowchart of FIG. Steps 31 and 32 are
Processing similar to steps 1 and 2 of FIG. 1 is executed. next,
According to the determination processing of step 33, YES is obtained while C takes a value of 1 to 6, and in step 34, addition processing of C = C + 1 and E = E + D is performed, and E> (B-
It is determined whether or not 1) (step 35). E is 0 to 55
While the value of is taken, NO is determined, and the process proceeds to step 37. However, when E takes a value of 56 or more, the process of E = E- (B-1) is executed (step 36), and then step 37
Proceed to. If C = 7 in step 33, the determination result is NO and the process directly proceeds to step 37.

【0068】ステップ37では、F=F+Dの処理を実
行する。この処理は、図1のステップ6に対応する。即
ち、アドレスを算出する処理である。
In step 37, the process of F = F + D is executed. This process corresponds to step 6 in FIG. That is, this is a process of calculating an address.

【0069】ここで、Fが1,2,3,…のように増加
する場合、即ち、ステップ38において、F>(B−
1)か否かの判断でNOとされ、更にステップ40にお
いてF==(B−1)か否かの判断でNOとされて再び
ステップ37に至る場合には、実施例1で示した0回目
(Y=0)と同様、図2に示したごとく、アドレスが生
成されてデータが格納されていく。
Here, when F increases like 1, 2, 3, ..., That is, in step 38, F> (B-
If the answer is NO in step 40, and the answer is NO in step 40, ie, if F == (B-1), the process returns to step 37. Similar to the first time (Y = 0), an address is generated and data is stored as shown in FIG.

【0070】なお、ステップ38とステップ39の処理
により、生成されたアドレスFがラインメモリの最大ア
ドレスを越えた場合に、当該アドレスFが適正値に修正
される。また、ステップ40は、図1のステップ7に対
応した処理を実行する。ステップ40においてNOとさ
れる場合は、ラインメモリの全アドレスを生成した場合
であり、この場合は、F=0,D=E,及びC=1の処
理が実行される(ステップ41)。F=0はアドレスを
初期化する処理である。D=Eの処理は、図1の処理で
いえば、Yをインクリメントし、このYによりBを求め
る処理に相当する。C=1は、Cの初期化である。
By the processing of steps 38 and 39, when the generated address F exceeds the maximum address of the line memory, the address F is corrected to an appropriate value. Further, the step 40 executes the processing corresponding to the step 7 of FIG. The case of NO in step 40 is a case where all the addresses of the line memory are generated, and in this case, the processing of F = 0, D = E, and C = 1 is executed (step 41). F = 0 is a process for initializing the address. The process of D = E corresponds to the process of incrementing Y and obtaining B from this Y in the process of FIG. C = 1 is the initialization of C.

【0071】上記のステップ41の処理を経た後のステ
ップ32以降の処理は、実施例1で示した1回目(Y=
1)の処理に相当するものである。即ち、D=Eの処理
によって、D=7となっており、このときのアドレスF
は、F=F+7で表されることになる。これは、ステッ
プ33により、Cが0〜6の間、ステップ34でE=E
+Dの処理が繰り返されていたため、E=7となってお
り、D=EによってD=7となるからである。
After the processing of step 41, the processing after step 32 is the first time (Y =
This corresponds to the process 1). That is, the processing of D = E results in D = 7, and the address F at this time is
Will be represented by F = F + 7. This means that C = 0 to 6 in step 33, and E = E in step 34.
This is because the processing of + D is repeated, so that E = 7, and D = 7 leads to D = 7.

【0072】また、ステップ38において、F>(B−
1)か否かの判断でNOとされ、更にステップ40にお
いてF==(B−1)か否かの判断でNOとされて再び
ステップ37に至る場合には、F=F+Dの処理によ
り、Fは、7,14,21,…のように増加することに
なる。従って、実施例1で示した1回目(Y=1)と同
様、図2に示したごとく、アドレスが生成されてデータ
が格納されていく。
In step 38, F> (B-
If it is determined to be 1) or not, and if it is determined to be NO in step 40 and if it is determined to be NO in step 40 to reach step 37 again, by the processing of F = F + D, F will increase like 7, 14, 21 ,. Therefore, similarly to the first time (Y = 1) shown in the first embodiment, as shown in FIG. 2, an address is generated and data is stored.

【0073】更に、上記の如く、実施例1で示した1回
目(Y=1)と同様の処理がなされた後、ステップ41
を経て再びステップ32以降の処理を繰り返すが、この
ときの上記のステップ41の処理を経た後のステップ3
2以降の処理は、実施例1で示した2回目(Y=2)の
処理に相当する。即ち、D=Eの処理によって、D=4
9となっており、このときのアドレスFは、F=F+4
9で表されることになる。これは、ステップ33によ
り、Cが1〜6の間、ステップ34でE=E+Dの処理
が繰り返されていたため、E=49となっており、D=
EによってD=49となるからである。
Further, as described above, after the same processing as the first time (Y = 1) shown in the first embodiment is performed, step 41 is performed.
After step 32, the process after step 32 is repeated again, but at this time, step 3 after the process of step 41 is performed.
The second and subsequent processes correspond to the second (Y = 2) process shown in the first embodiment. That is, by the processing of D = E, D = 4
9, and the address F at this time is F = F + 4
It will be represented by 9. This is E = 49 because the processing of E = E + D was repeated in step 34 while C was 1 to 6 in step 33, and thus D =
This is because E = D = 49.

【0074】また、ステップ38において、F>(B−
1)か否かの判断でNOとされ、更にステップ40にお
いてF==(B−1)か否かの判断でNOとされて再び
ステップ37に至る場合には、F=F+Dの処理によ
り、Fは、49,98,…のように増加することにな
る。従って、実施例1で示した2回目(Y=2)と同
様、図4に示したごとく、アドレスが生成されてデータ
が格納されていく。
In step 38, F> (B-
If it is determined to be 1) or not, and if it is determined to be NO in step 40 and if it is determined to be NO in step 40 to reach step 37 again, by the processing of F = F + D, F will increase like 49,98, .... Therefore, similarly to the second time (Y = 2) shown in the first embodiment, as shown in FIG. 4, the address is generated and the data is stored.

【0075】(ブロック→ラスター変換)まず、図10
のフローチャートを用いてブロック→ラスター変換を説
明する。変換処理自体は、実施例1の数式2に基づく変
換処理と同じである。このフローチャートは、図1のフ
ローチャートに対する図5のフローチャートの関係と同
様であり、図9のフローチャートの処理において、Cの
比較対象としてブロックを構成している一辺のピクセル
数を当てはめたものである。
(Block → Raster Conversion) First, referring to FIG.
The block → raster conversion will be described with reference to the flowchart of FIG. The conversion process itself is the same as the conversion process based on Formula 2 of the first embodiment. This flowchart is similar to the relationship of the flowchart of FIG. 5 with respect to the flowchart of FIG. 1, and in the process of the flowchart of FIG. 9, the number of pixels on one side forming a block as a comparison target of C is applied.

【0076】これにより、実施例1の図6乃至図8で示
したのと同様のアドレス生成が実行されることになる。
As a result, the same address generation as that shown in FIGS. 6 to 8 of the first embodiment is executed.

【0077】次に、図11の回路図を、図9,10の処
理内容との対応で説明する。
Next, the circuit diagram of FIG. 11 will be described in correspondence with the processing contents of FIGS.

【0078】減算器1は、B−1の処理を実行するもの
であり、その減算出力は、比較器7,12,13、及び
減算器8,14に入力されるようになっている。上記の
比較器7,12,13は、フローチャートのステップ3
5,55、ステップ40,60、ステップ38,58の
処理にそれぞれ対応し、減算器8,14は、ステップ3
6,56、ステップ39,59にそれぞれ対応する。
The subtractor 1 executes the processing of B-1, and the subtraction output is input to the comparators 7, 12, 13 and the subtracters 8, 14. The above-mentioned comparators 7, 12, 13 are the same as those in step 3 of the flowchart.
5, 55, steps 40 and 60, and steps 38 and 58, respectively.
6, 56 and steps 39, 59, respectively.

【0079】3ビットシフター2は、Bを1/8した
値、即ちAを生成し、これをマルチプレクサ3に入力す
る。
The 3-bit shifter 2 generates a value that is 1/8 of B, that is, A, and inputs this to the multiplexer 3.

【0080】マルチプレクサ3は、ラスター→ブロック
変換に際しては、Aの値を採用し、ブロック→ラスター
変換に際しては、8の値を採用し、その採用した値を比
較器4に出力する。なお、Aの値と8の値の切り替え
は、変換切換信号によって行われる。
The multiplexer 3 adopts the value of A in raster-to-block conversion and the value of 8 in block-to-raster conversion, and outputs the adopted value to the comparator 4. The value of A and the value of 8 are switched by a conversion switching signal.

【0081】比較器4は、マルチプレクサ3からの入力
値と、カウント値(C)とを比較する。この処理は、ス
テップ33,53に対応する。比較器4は、その比較結
果をCカウンタ5及び加算器6に出力する。Cカウンタ
5は、クロックが入力されると、上記比較結果がC<A
(or8)を示すときにはカウントUPを実行する。C
カウンタ及び加算器6は、C=C+1とE=E+Dの処
理を行うものであり、ステップ34,54に対応する。
また、加算器6の出力Eは、比較器7と減算器8とマル
チプレクサ9に入力される。
The comparator 4 compares the input value from the multiplexer 3 with the count value (C). This process corresponds to steps 33 and 53. The comparator 4 outputs the comparison result to the C counter 5 and the adder 6. When the clock is input to the C counter 5, the comparison result is C <A.
When (or8) is indicated, the count UP is executed. C
The counter and adder 6 performs the processing of C = C + 1 and E = E + D, and corresponds to steps 34 and 54.
The output E of the adder 6 is input to the comparator 7, the subtractor 8 and the multiplexer 9.

【0082】比較的7は、加算器6の出力Eと前記減算
器1のB−1出力とを比較する。この処理は、ステップ
35,55に対応する。減算器8は、加算器6の出力E
から前記減算器1のB−1出力を減ずる。この処理は、
ステップ36,56に対応する。マルチプレクサ9は、
比較器7の出力結果がE>(B−1)を示さない場合に
は、加算器6の出力Eを採用し、E>(B−1)を示す
場合には、減算器8の出力E(E=E−(B−1))を
採用する。Eレジスタ10にクロックが入力されると、
当該Eレジスタにマルチプレクサ9の出力Eがラッチさ
れる。
Relatively 7 compares the output E of the adder 6 with the B-1 output of the subtracter 1. This process corresponds to steps 35 and 55. The subtracter 8 outputs the output E of the adder 6.
To subtract the B-1 output of the subtractor 1. This process
Corresponding to steps 36 and 56. The multiplexer 9 is
When the output result of the comparator 7 does not show E> (B-1), the output E of the adder 6 is adopted, and when E> (B-1) is shown, the output E of the subtractor 8 is used. (E = E- (B-1)) is adopted. When a clock is input to the E register 10,
The output E of the multiplexer 9 is latched in the E register.

【0083】加算器11は、Fレジスタ16からの出力
Fと、Dレジスタ17からの出力Dとを加算した値をF
として出力する。この処理は、ステップ37,57に対
応する。加算器11の出力Fは、比較器12,13と減
算器14に入力される。
The adder 11 adds a value obtained by adding the output F from the F register 16 and the output D from the D register 17 to F.
Output as. This process corresponds to steps 37 and 57. The output F of the adder 11 is input to the comparators 12 and 13 and the subtractor 14.

【0084】比較的13は、加算器11の出力Fと前記
減算器1のB−1出力とを比較し、その比較結果を減算
器14と比較器12に出力する。この処理は、ステップ
38,58に対応する。減算器14は、比較器13の出
力がF>(B−1)を示す場合には、F−(B−1)の
減算処理を行うが、F>(B−1)を示さない場合に
は、Fをそのまま出力する。この処理は、ステップ38
とステップ39或いはステップ58とステップ59の処
理に対応する。比較器12は、加算器11の出力Fと減
算器1の出力B−1の一致を判断し、その判定結果をC
カウンタ5、マルチプレクサ15、及びDレジスタ17
に出力する。
Relatively 13 compares the output F of the adder 11 with the B-1 output of the subtracter 1 and outputs the comparison result to the subtractor 14 and the comparator 12. This process corresponds to steps 38 and 58. The subtractor 14 performs the subtraction process of F- (B-1) when the output of the comparator 13 indicates F> (B-1), but when it does not indicate F> (B-1). Outputs F as it is. This process is step 38.
Corresponds to the processing of step 39 or step 58 and step 59. The comparator 12 determines whether the output F of the adder 11 and the output B-1 of the subtractor 1 match, and the determination result is C.
Counter 5, multiplexer 15, and D register 17
Output to.

【0085】マルチプレクサ15は、比較器12の比較
結果が、一致を示さない場合は、減算器14の出力Fを
選択し、一致を示す場合は、0を選択してFレジスタ1
6に出力する。この処理は、ステップ40,60の処理
に対応する。
The multiplexer 15 selects the output F of the subtracter 14 when the comparison result of the comparator 12 does not indicate a match, and selects 0 when it indicates a match and selects the F register 1
Output to 6. This processing corresponds to the processing of steps 40 and 60.

【0086】Fレジスタ16は、クロックを入力する
と、マルチプレクサ15で選択された値をラッチする。
Fレジスタ16が0をラッチする処理は、ステップ4
1,61のF=0の処理に対応する。Fレジスタ16の
出力は、アドレス出力となる。
When the clock is input, the F register 16 latches the value selected by the multiplexer 15.
The process in which the F register 16 latches 0 is step 4
This corresponds to the processing of F = 0 of 1,61. The output of the F register 16 becomes an address output.

【0087】Dレジスタ17は、比較器12の比較結果
が、一致を示さない場合は、Dの値を保持し、一致を示
す場合は、Eレジスタ10の出力Eを保持する。一致を
示す場合の処理は、ステップ41,61のD=Eの処理
に対応する。
The D register 17 holds the value of D when the comparison result of the comparator 12 does not show a match, and holds the output E of the E register 10 when the comparison result shows a match. The process for indicating a match corresponds to the process of D = E in steps 41 and 61.

【0088】また、Cカウンタ5は、比較器12の比較
結果が、一致を示さない場合は、Dの値を保持し、一致
を示す場合は、Eレジスタ10の出力Eを保持する。一
致を示す場合の処理は、ステップ41,61のD=Eの
処理に相当する。
Further, the C counter 5 holds the value of D when the comparison result of the comparator 12 does not show a match, and holds the output E of the E register 10 when it shows a match. The process for indicating a match corresponds to the process of D = E in steps 41 and 61.

【0089】以上の構成により、ラスター/ブロック変
換が、乗算器を用いないハードウェア構成(IC或いは
これに準ずるデバイス)により、実行されることにな
る。
With the above configuration, the raster / block conversion is executed by the hardware configuration (IC or a device equivalent thereto) that does not use the multiplier.

【0090】また、上記回路には、ラインメモリ/フレ
ームメモリインターフェース18が設けられており、ピ
クセルデータの入力が可能となっている。フレームメモ
リインターフェースとすることにより、フレームメモリ
にも対応できる。
Further, a line memory / frame memory interface 18 is provided in the above circuit, and pixel data can be input. By using a frame memory interface, it can also support a frame memory.

【0091】図12及び図13は、上記の如く構成され
たラスター/ブロック変換装置(ソフトウェアで構成さ
れるものも含む)を用い、色変換とラスター/ブロック
変換とを同時に実現できるように構成したものである。
勿論、JEPEG方式に規定されているブロックデータ
を入出力できるように構成してもよい。
12 and 13 are configured so that the color conversion and the raster / block conversion can be realized at the same time by using the raster / block conversion device (including the one configured by software) configured as described above. It is a thing.
Of course, the block data defined in the JEPEG system may be input / output.

【0092】図12の色変換IC27においては、入力
回路21から入力されたラスターデータは、乗算器22
によって係数データ26に基づいて色変換が行われる。
ラスター/ブロック変換装置23は、ラスター/ブロッ
ク用RAM25を用いてラスターからブロックへの変換
処理を実行し、出力回路24によってブロック化された
データが出力される。
In the color conversion IC 27 shown in FIG. 12, the raster data input from the input circuit 21 is input to the multiplier 22.
The color conversion is performed on the basis of the coefficient data 26.
The raster / block conversion device 23 executes raster-to-block conversion processing using the raster / block RAM 25, and the output circuit 24 outputs the blocked data.

【0093】図13の色変換IC34においては、入力
回路28から入力されたブロックデータは、ラスター/
ブロック変換装置29に出力される。ラスター/ブロッ
ク変換装置29は、ラスター/ブロック用RAM33を
用いてラスターからブロックへの変換処理を実行する。
ラスター/ブロック変換装置29からのブロックデータ
は、乗算器30によって係数データ32に基づいて色変
換が行われ、出力回路31を経て出力される。
In the color conversion IC 34 shown in FIG. 13, the block data input from the input circuit 28 is raster /
It is output to the block conversion device 29. The raster / block conversion device 29 uses the raster / block RAM 33 to execute raster-to-block conversion processing.
The block data from the raster / block conversion device 29 is color-converted by the multiplier 30 based on the coefficient data 32, and is output through the output circuit 31.

【0094】これら図12,13のICにより、外部に
特別なソフトウェアやハードウェアを持たずに色変換が
行えることになる。
With the ICs shown in FIGS. 12 and 13, color conversion can be performed without any special software or hardware externally provided.

【0095】[0095]

【発明の効果】以上のように、本発明によれば、ライン
メモリの使用を可能にしてコストの低減を図ることがで
きるとともに、任意の画面サイズにおいて変換のための
メモリのアドレスを自動的に発生することのできる等の
優れた諸効果を奏する。
As described above, according to the present invention, the line memory can be used to reduce the cost, and the memory address for conversion can be automatically set in any screen size. It has various excellent effects that can be generated.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明におけるラスター→ブロック変換処理の
内容を示すフローチャートである。
FIG. 1 is a flowchart showing the contents of raster → block conversion processing in the present invention.

【図2】図1の処理において0回目(Y=0)ときのラ
インメモリの内容を示す説明図である。
FIG. 2 is an explanatory diagram showing the contents of a line memory at the 0th time (Y = 0) in the processing of FIG.

【図3】図1の処理において1回目(Y=1)ときのラ
インメモリの内容を示す説明図である。
FIG. 3 is an explanatory diagram showing the contents of the line memory at the first time (Y = 1) in the processing of FIG.

【図4】図1の処理において2回目(Y=2)ときのラ
インメモリの内容を示す説明図である。
FIG. 4 is an explanatory diagram showing the contents of the line memory at the second time (Y = 2) in the processing of FIG.

【図5】本発明におけるブロック→ラスター変換処理の
内容を示すフローチャートである。
FIG. 5 is a flowchart showing the contents of block → raster conversion processing in the present invention.

【図6】図5の処理において0回目(Y=0)ときのラ
インメモリの内容を示す説明図である。
FIG. 6 is an explanatory diagram showing the contents of the line memory at the 0th time (Y = 0) in the processing of FIG. 5;

【図7】図5の処理において1回目(Y=1)ときのラ
インメモリの内容を示す説明図である。
FIG. 7 is an explanatory diagram showing the contents of the line memory at the first time (Y = 1) in the processing of FIG.

【図8】図5の処理において2回目(Y=2)ときのラ
インメモリの内容を示す説明図である。
8 is an explanatory diagram showing the contents of the line memory at the second time (Y = 2) in the processing of FIG.

【図9】本発明におけるラスター→ブロック変換を加算
処理により実行する場合の処理内容を示すフローチャー
トである。
FIG. 9 is a flowchart showing the processing contents when the raster → block conversion in the present invention is executed by addition processing.

【図10】本発明におけるブロック→ラスター変換を加
算処理により実行する場合の処理内容を示すフローチャ
ートである。
FIG. 10 is a flowchart showing the processing contents when the block → raster conversion in the present invention is executed by addition processing.

【図11】図9及び図10の処理を実施する回路を示し
た回路図である。
FIG. 11 is a circuit diagram showing a circuit that implements the processing of FIGS. 9 and 10;

【図12】本発明のラスター/ブロック変換装置を内蔵
するとともに、色変換回路等を有し、任意の画面サイズ
で自由に色変換とラスター→ブロック変換を行う回路を
示した回路図である。
FIG. 12 is a circuit diagram showing a circuit that incorporates the raster / block conversion device of the present invention, has a color conversion circuit and the like, and freely performs color conversion and raster → block conversion at an arbitrary screen size.

【図13】本発明のラスター/ブロック変換装置を内蔵
するとともに、色変換回路等を有し、任意の画面サイズ
で自由に色変換とブロック→ラスター変換を行う回路を
示した回路図である。
FIG. 13 is a circuit diagram showing a circuit that incorporates the raster / block conversion device of the present invention, has a color conversion circuit, etc., and freely performs color conversion and block → raster conversion at an arbitrary screen size.

【図14】1画面メモリを使用してブロック→ラスター
変換を行う場合に考えられる処理内容を示したフローチ
ャートである。
FIG. 14 is a flowchart showing processing contents that can be considered when performing block → raster conversion using a single screen memory.

【符号の説明】[Explanation of symbols]

1 減算器 2 左3ビットシフター 3 マルチプレクサ 4 比較器 5 Cカウンタ 6 加算器 7 比較器 8 減算器 9 マルチプレクサ 10 Eレジスタ 11 加算器 12 比較器 13 比較器 14 減算器 15 マルチプレクサ 16 Fレジスタ 17 Dレジスタ 18 メモリインターフェース 1 subtractor 2 Left 3 bit shifter 3 multiplexer 4 comparator 5 C counter 6 adder 7 comparator 8 subtractor 9 multiplexer 10 E register 11 adder 12 Comparator 13 Comparator 14 Subtractor 15 multiplexer 16 F register 17 D register 18 memory interface

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 Aを現在のアドレス座標とし、A′を次
のアドレス座標とし、Bを加算値とし、Cを水平方向ピ
クセル数とし、χを1ブロックの水平方向ピクセル数と
し、XをC/χの演算で求めた値とし、Yを変換回数と
するとき、 XY >(C−1)の関係が成立した場合は、 XY /(C−1)の式における余りをBとし、 XY >(C−1)の関係が成立しない場合は、 XY の演算結果をBとし、 上記求めたBに基づき、A′=A+Bの式によって次の
アドレスを求めてラスターデータをブロックデータに変
換する一方、 χY >(C−1)の関係が成立した場合は、 χY /(C−1)の式における余りをBとし、 χY >(C−1)の関係が成立しない場合は、 χY の演算結果をBとし、 上記求めたBに基づき、A′=A+Bの式によって次の
アドレスを求めてブロックデータをラスターデータに変
換することを特徴とするラスター/ブロック変換方法。
1. A is the current address coordinate, A'is the next address coordinate, B is the added value, C is the horizontal pixel number, χ is the horizontal pixel number of one block, and X is C. / Y, where Y is the number of conversions, and when the relationship X Y > (C-1) holds, the remainder in the formula X Y / (C-1) is B, When the relation of XY > (C-1) is not established, the calculation result of XY is set to B, and based on the above-obtained B, the next address is obtained by the formula of A '= A + B and the raster data is made into block data. On the other hand, when the relation of χ Y > (C-1) is established, the remainder in the formula of χ Y / (C-1) is set as B, and the relation of χ Y > (C-1) is not established. If the calculation result of the chi Y is is B, on the basis of the obtained B, following the equation a '= a + B Raster / Block conversion method and converting the block data seeking address into raster data.
【請求項2】 請求項1の方法におけるXY の値或いは
χY を、カウント回数がX或いはχに至るまで同一値を
順次加算させた値を用いることにより得るとともに、ブ
ロックの大きさで定まるメモリ内の全ピクセルに対する
変換処理終了後の次の変換処理に際して上記順次加算さ
せた値を上記同一値とすることを特徴とする請求項1に
記載のラスター/ブロック変換方法。
2. The value of X Y or χ Y in the method of claim 1 is obtained by using a value obtained by sequentially adding the same value until the number of counts reaches X or χ, and is determined by the block size. 2. The raster / block conversion method according to claim 1, wherein the sequentially added values are set to the same value in the next conversion processing after the conversion processing is completed for all the pixels in the memory.
【請求項3】 ブロックの大きさに対応して変数を適宜
変更することを特徴とする請求項1又は請求項2に記載
のラスター/ブロック変換方法。
3. The raster / block conversion method according to claim 1, wherein the variable is appropriately changed in accordance with the size of the block.
【請求項4】 請求項2のラスター/ブロック変換方法
を実施するために、カウント回数がX或いはχに至るま
で同一値を順次加算させる加算手段と、ブロックの大き
さで定まるメモリ内の全ピクセルに対する変換処理終了
後の次の変換処理に際して上記順次加算させた値を上記
同一値とするためのラッチ手段とを備えていることを特
徴とするラスター/ブロック変換装置。
4. In order to implement the raster / block conversion method according to claim 2, addition means for sequentially adding the same value until the number of counts reaches X or χ, and all pixels in the memory determined by the size of the block. A raster / block converter, which is provided with latch means for making the sequentially added values the same value in the next conversion processing after the conversion processing for
JP21447794A 1994-09-08 1994-09-08 Raster / block conversion method and apparatus for implementing the method Expired - Lifetime JP3503711B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21447794A JP3503711B2 (en) 1994-09-08 1994-09-08 Raster / block conversion method and apparatus for implementing the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21447794A JP3503711B2 (en) 1994-09-08 1994-09-08 Raster / block conversion method and apparatus for implementing the method

Publications (2)

Publication Number Publication Date
JPH0877343A JPH0877343A (en) 1996-03-22
JP3503711B2 true JP3503711B2 (en) 2004-03-08

Family

ID=16656373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21447794A Expired - Lifetime JP3503711B2 (en) 1994-09-08 1994-09-08 Raster / block conversion method and apparatus for implementing the method

Country Status (1)

Country Link
JP (1) JP3503711B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5094274B2 (en) * 2006-10-06 2012-12-12 キヤノン株式会社 Image processing apparatus and method
US8466928B2 (en) 2006-10-06 2013-06-18 Canon Kabushiki Kaisha Image processing apparatus and method

Also Published As

Publication number Publication date
JPH0877343A (en) 1996-03-22

Similar Documents

Publication Publication Date Title
JP2903807B2 (en) Color signal conversion method and apparatus
KR940007161B1 (en) Electronic zooming system using image buffer
Griffin et al. New scaling algorithms for the Chinese Remainder Theorem
JP3577325B2 (en) Data processing method by discrete cosine transform (DCT), DCT method, and DCT data processing circuit
JP3503711B2 (en) Raster / block conversion method and apparatus for implementing the method
US5239628A (en) System for asynchronously generating data block processing start signal upon the occurrence of processing end signal block start signal
JP3348499B2 (en) Cyclic noise reduction device
JP3127883B2 (en) Image processing device
JP2003316331A (en) Display device
CN110647307B (en) Data processor, method, chip and electronic equipment
JPH01121930A (en) Data processor
KR960014197B1 (en) Distributed arithmetic unit
JP3123060B2 (en) Digital arithmetic circuit
JPS63207292A (en) Chrominance signal converter
JPS63102467A (en) Converting device for resolution of picture data
JP2623089B2 (en) Video processing system
JP2002159006A (en) Calculation assisting circuit
JP2889244B2 (en) Image processing device
JPH01302960A (en) Error disseminating processing circuit
KR100190019B1 (en) Address generator for graphic controller
JP3952804B2 (en) Data processing method and data processing apparatus
JP2002094833A (en) Method and apparatus for reducing noise
JP2985865B2 (en) Special effects device
KR100602249B1 (en) Video Processing Device and the Method thereof
JPH07146781A (en) Processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20031203

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20031203

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

Free format text: PAYMENT UNTIL: 20071219

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081219

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081219

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091219

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101219

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101219

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20131219

Year of fee payment: 10

EXPY Cancellation because of completion of term