JP3197408B2 - Additional bit processing device for marker identification - Google Patents

Additional bit processing device for marker identification

Info

Publication number
JP3197408B2
JP3197408B2 JP24887393A JP24887393A JP3197408B2 JP 3197408 B2 JP3197408 B2 JP 3197408B2 JP 24887393 A JP24887393 A JP 24887393A JP 24887393 A JP24887393 A JP 24887393A JP 3197408 B2 JP3197408 B2 JP 3197408B2
Authority
JP
Japan
Prior art keywords
bit
unit
code
data
additional bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP24887393A
Other languages
Japanese (ja)
Other versions
JPH0786956A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP24887393A priority Critical patent/JP3197408B2/en
Publication of JPH0786956A publication Critical patent/JPH0786956A/en
Application granted granted Critical
Publication of JP3197408B2 publication Critical patent/JP3197408B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、可変長コードのデコー
ドにおけるマーカ識別用付加ビット処理装置に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a marker identifying additional bit processing device for decoding a variable length code.

【0002】[0002]

【従来の技術】一般に、画像データ等の可変長コードを
デコードするには、可変長コードのサイズや伝送誤り発
生時の再デコードの開始位置を等を表わすためにマーカ
コードが必要である。このような可変長コードの画像デ
ータのデコード方式を規定する規格案の1つにJPEG
ハフマンコードのデコード方式(JPEG方式)があ
る。以下、この方式について説明する。JPEG方式の
詳細は、CD10918−1 Digital Compression Cod
ing ofContinuous-Tone Still Images Part 1: Require
ments and Guidelines に詳しく述べられている。
2. Description of the Related Art In general, in order to decode a variable length code such as image data, a marker code is required to indicate the size of the variable length code and the start position of re-decoding when a transmission error occurs. One of the draft standards that defines the decoding method for such variable-length code image data is JPEG.
There is a Huffman code decoding method (JPEG method). Hereinafter, this method will be described. For details of the JPEG method, see CD10918-1 Digital Compression Cod
ing ofContinuous-Tone Still Images Part 1: Require
Details are described in the ments and Guidelines.

【0003】まず、可変長コードから成るデータ中にマ
ーカコードを挿入する手順を以下に示す。 (1)挿入する手前がハフマンコードで終了しており、か
つバイト境界に達していない場合には、バイト境界に達
するまで“1”のビットをつめる。 (2)16進(以下、0xで表示する)で0xFFを1バ
イト挿入した後にマーカコードを1バイト挿入する。パ
ラメータを必要とするマーカコードの場合には、更にそ
のマーカコード全体のレングスを表わす情報とそのマー
カコードに含まれるパラメータが続く。レングスには、
自分自身の2バイトにパラメータのバイト数を加えた値
が書き込まれる。マーカコードの前の0xFFは通常1
バイトであるが、複数の0xFFを挿入する場合もあ
る。
First, a procedure for inserting a marker code into data composed of a variable length code will be described below. (1) If the end before the insertion ends with a Huffman code and does not reach the byte boundary, the bits of "1" are packed until the byte boundary is reached. (2) After inserting 1 byte of 0xFF in hexadecimal (hereinafter represented by 0x), insert 1 byte of marker code. In the case of a marker code requiring a parameter, information indicating the length of the entire marker code and a parameter included in the marker code follow. In length,
A value obtained by adding the number of bytes of the parameter to its own 2 bytes is written. 0xFF before marker code is usually 1
Although it is a byte, a plurality of 0xFFs may be inserted.

【0004】(3)このような可変長コードをエンコード
する場合には、ハフマン符号列の中に0xFFが発生し
たときに、マーカコードの前の0xFFと区別するため
に、その0xFFの次に0x00を挿入する。従って、
このような可変長コードをデコードする場合に、0xF
Fの次に0x00を受けたときは、これを取り外すよう
にする。一方、0xFFの次に0x00以外のバイトを
受けたときは、0xFFの次にマーカコードがあるもの
とみなす。
(3) In the case of encoding such a variable length code, when 0xFF occurs in the Huffman code string, 0xFF follows 0xFF in order to distinguish it from 0xFF preceding the marker code. Insert Therefore,
When decoding such a variable length code, 0xF
When 0x00 is received after F, this is removed. On the other hand, when a byte other than 0x00 is received after 0xFF, it is regarded that there is a marker code after 0xFF.

【0005】次に、このJPEG方式により、ハフマン
コード化された可変長コードのデコードを行なう場合の
マーカコードの取り扱いについて説明する。 (1)マーカコードの直前に可変長コードが存在する時に
は、バイト境界までのビットが“1”である。 (2)マーカコードの先頭にはバイト境界から始まる1バ
イト以上の長さの0xFFが挿入されており、その後に
1バイトのマーカ識別子がある。さらにマーカがパラメ
ータを必要とする時にはバイト数とパラメータが書き込
まれている。 (3)可変長コード内のバイト境界から始まるバイトに、
0xFFが存在する場合には、その後に0x00のバイ
トが挿入されている。 従って、デコードを行なう場合に、コード化された可変
長コード内のバイト境界に0xFFがあり、さらに0x
FFの直後のバイトが0x00であった時には、0x0
0がないものとしてデコードを行なわなければならな
い。
Next, a description will be given of the handling of a marker code when decoding a Huffman-coded variable-length code according to the JPEG method. (1) When a variable length code exists immediately before a marker code, bits up to a byte boundary are "1". (2) At the head of the marker code, 0xFF having a length of 1 byte or more starting from a byte boundary is inserted, followed by a 1-byte marker identifier. When the marker needs a parameter, the number of bytes and the parameter are written. (3) In the byte starting from the byte boundary in the variable length code,
If 0xFF is present, 0x00 bytes are inserted after that. Therefore, when decoding, there is 0xFF at the byte boundary in the coded variable-length code, and 0xFF
When the byte immediately after FF is 0x00, 0x0
Decoding must be performed assuming that there is no 0.

【0006】図2に、JPEGハフマンデコーダを用い
たシステムの例を示す。図2において、ホストプロセッ
サ1がバス5を介してメモリ2を読み書きするとともに
JPEG方式のデコードユニット3、I/O4を制御す
る。図3及び図4に、図2における従来技術によるJP
EG方式のデコードユニットの実現方式のブロック図を
示す。デコードユニット3は、データを取り込むデータ
入力部31、取り込んだデータをシフトするデータシフ
ト部32、シフトされたデータからコードデータを取り
出してデコードするデコーダ部33を備えている。ま
た、データから0xFF00を取り出すマーカ検出部3
4、ホストプロセッサ1との通信制御部35を備えてい
る。
FIG. 2 shows an example of a system using a JPEG Huffman decoder. In FIG. 2, a host processor 1 reads / writes a memory 2 via a bus 5 and controls a JPEG decoding unit 3 and an I / O 4. FIGS. 3 and 4 show the conventional JP in FIG.
FIG. 2 shows a block diagram of a method for realizing an EG decoding unit. The decoding unit 3 includes a data input unit 31 for receiving data, a data shift unit 32 for shifting the captured data, and a decoder unit 33 for extracting and decoding code data from the shifted data. Further, a marker detecting unit 3 for extracting 0xFF00 from the data
4. A communication control unit 35 for communicating with the host processor 1 is provided.

【0007】この例では、1つのコードデータ長が最大
16ビットであり、デコードされたデータは16ビット
のデータ列として得られる。図3及び図4に示された従
来技術によるJPEG方式のデコードユニットの各部の
詳細な構成と動作を以下に説明する。 (1)データ入力部は、それぞれ32ビットの2つのレジ
スタ311、312から成り、ホストプロセッサ1から
与えられた連続する2つの32ビットのコードデータ
を、2つのレジスタ311、312に保持する。 (2)データシフト部32は、シフタ321と、16ビッ
トのレジスタ322から成る。シフタ321は、1ビッ
トから32ビットまでの左シフトを行ないデータ入力部
31に保持されているデータを、これまでデコードが終
了したビット数分だけシフトする。そして、その結果
は、レジスタ322に保持される。
In this example, one code data length is a maximum of 16 bits, and decoded data is obtained as a 16-bit data string. The detailed configuration and operation of each part of the conventional JPEG decoding unit shown in FIGS. 3 and 4 will be described below. (1) The data input unit includes two registers 311, 312 each of 32 bits, and holds two consecutive 32-bit code data supplied from the host processor 1 in the two registers 311, 312. (2) The data shift unit 32 includes a shifter 321 and a 16-bit register 322. The shifter 321 performs a left shift from 1 bit to 32 bits to shift the data held in the data input unit 31 by the number of bits for which decoding has been completed. Then, the result is held in the register 322.

【0008】(3)デコーダ部33は、デコーダ331、
16ビットのレジスタ332及びシフト量加算器333
から成る。デコーダ331は、データシフト部32でシ
フトされたハフマンコードをデコードする。そして、デ
コード結果のデータをレジスタ332に保持する。一
方、シフト量加算器333は、オーバフロー出力を持つ
5ビットの加算器で、デコーダ331でデコードされた
コードのビット数を累積加算する。シフト量加算器33
3は、その加算結果をシフタ321に通知するとともに
オーバフローした時にはそのことを通信制御部35に通
知する。シフト量加算器333のオーバフロービットが
出力された時はデータ入力部31のレジスタ312に保
持されているコードがデコードされて不要になったこと
を示す。従って、この時、データ入力部31においてレ
ジスタ311のコードがレジスタ312に格納されると
ともに、新たな32ビットのコードがレジスタ311に
格納される。
(3) The decoder section 33 includes a decoder 331,
16-bit register 332 and shift amount adder 333
Consists of The decoder 331 decodes the Huffman code shifted by the data shift unit 32. Then, the data of the decoding result is held in the register 332. On the other hand, the shift amount adder 333 is a 5-bit adder having an overflow output, and cumulatively adds the number of bits of the code decoded by the decoder 331. Shift amount adder 33
3 notifies the addition result to the shifter 321 and, when overflow occurs, notifies the communication control unit 35 of the overflow. When the overflow bit of the shift amount adder 333 is output, it indicates that the code held in the register 312 of the data input unit 31 has been decoded and becomes unnecessary. Therefore, at this time, in the data input unit 31, the code of the register 311 is stored in the register 312, and a new 32-bit code is stored in the register 311.

【0009】(4)マーカ検出部34は、0xFF検出部
342、0x00検出部341及び0xFF00検出部
343から成る。0xFF検出部342は、レジスタ3
12の4バイト又はレジスタ311の上位2バイトの中
のどのバイトに0xFFが存在するかを検出する。0x
00検出部341は、レジスタ312の下位3バイト又
はレジスタ311の上位3バイトの中のどのバイトに0
x00が存在するかを検出する。0xFF00検出部3
43は、0x00検出部341と0xFF検出部342
の結果からどの連続する2バイトに0xFF00が存在
するかを判定する。
(4) The marker detecting section 34 includes a 0xFF detecting section 342, a 0x00 detecting section 341 and a 0xFF00 detecting section 343. The 0xFF detection unit 342 is a register 3
It detects which byte of the 12 4 bytes or the upper 2 bytes of the register 311 has 0xFF. 0x
00 detection unit 341 determines which byte in the lower 3 bytes of register 312 or the upper 3 bytes of register 311 is 0.
It detects whether x00 exists. 0xFF00 detector 3
43 denotes a 0x00 detection unit 341 and a 0xFF detection unit 342
It is determined from which result 0xFF00 exists in which two consecutive bytes.

【0010】(5)通信制御部35は、マーカ検出部34
がデータ入力部31の2つのレジスタ311、312の
中の2バイトに0xFF00が存在することを検出した
時、又はデコーダ部33でシフト量加算器333のオー
バフローが発生した時に、ホストプロセッサ1にそのこ
とを通知する。 (6)ホストプロセッサ1は、通信制御部35からデコー
ダ部33のシフト量加算器333のオーバフローの通知
が来た時には、データ入力部31においてレジスタ31
1の内容をレジスタ312に転送した後、新たな32ビ
ット分のデータをデータ入力部31のレジスタ311に
書き込む。また、マーカ検出部34がデータ入力部31
の2つのレジスタ311、312の中の2バイトに0x
FF00が存在することを検出したことの通知が来た時
には、ホストプロセッサ1は先にデータ入力部31のレ
ジスタ311、312に格納したデータの中からバイト
境界にある0xFF00のうちの0x00を取り除いて
0xFFとして、再度データ入力部31の2つの32ビ
ットのレジスタ311、312に書き込む。
(5) The communication control unit 35 includes a marker detection unit 34
Detects that 0xFF00 exists in two bytes in the two registers 311 and 312 of the data input unit 31 or when the overflow of the shift amount adder 333 occurs in the decoder unit 33, Notify that. (6) When the communication control unit 35 notifies the overflow of the shift amount adder 333 of the decoder unit 33 from the communication control unit 35, the host processor 1 registers the register 31 in the data input unit 31.
After the content of 1 is transferred to the register 312, new 32-bit data is written to the register 311 of the data input unit 31. Further, the marker detection unit 34 is connected to the data input unit 31.
0x in 2 bytes of the two registers 311 and 312
When the host processor 1 receives notification that the presence of FF00 has been detected, the host processor 1 removes 0x00 of 0xFF00 at the byte boundary from the data stored in the registers 311 and 312 of the data input unit 31 earlier. The value is written to the two 32-bit registers 311 and 312 of the data input unit 31 again as 0xFF.

【0011】以上の構成とその動作において、0xFF
00が検出された時の動作とその後のホストプロセッサ
1の動作を具体的に示す。図5〜図8は、ホストプロセ
ッサ1がメモリ2内のコードデータをデコードユニット
3内のレジスタ311に転送する時のデータの流れを示
しており、メモリ2の4つのワード21〜24、ホスト
プロセッサ1とホストプロセッサ1の内部のレジスタ1
1、12、及び従来技術によるデコードユニット3の一
部であるレジスタ311、312、シフタ321、レジ
スタ322が含まれている。メモリ2の4つのワード2
1〜24には、それぞれa〜d、e〜h、i〜l、m〜
pという8ビット×4のコードデータが書き込まれてい
る。
In the above configuration and its operation, 0xFF
The operation when 00 is detected and the subsequent operation of the host processor 1 will be specifically described. FIGS. 5 to 8 show the data flow when the host processor 1 transfers the code data in the memory 2 to the register 311 in the decode unit 3, and includes four words 21 to 24 of the memory 2 and the host processor. 1 and register 1 inside host processor 1
1 and 12 and registers 311, 312, a shifter 321, and a register 322 which are part of the decoding unit 3 according to the prior art. Four words 2 of memory 2
A to d, e to h, i to l, m to
Code data of 8 bits × 4 called p is written.

【0012】次に、通常の動作を説明する。ホストプロ
セッサ1は、メモリ2から最初のワード21を取り出し
てデコードユニット3内のレジスタ311に書き込む。
次に、先にレジスタ311に書き込まれたデータがレジ
スタ312に格納されるとともに、ホストプロセッサ1
はメモリ2から新たなワード22を読み出して再度レジ
スタ311に書き込む。以上の動作の結果を図5に示
す。デコードユニット3は、以上の動作で得られたデー
タをデコードする。ここで、図5に示す状態から、最初
の8ビットがデコードされた状態を考える。この時の状
態を図6に示す。この状態では、シフタ出力を保持する
レジスタ322の内容が図5の状態と異なるのみであ
る。つまり、次にはバイトaを除いた残りのデータでデ
コードを行なう。
Next, normal operation will be described. The host processor 1 takes out the first word 21 from the memory 2 and writes it into the register 311 in the decode unit 3.
Next, while the data previously written in the register 311 is stored in the register 312, the host processor 1
Reads a new word 22 from the memory 2 and writes it to the register 311 again. FIG. 5 shows the result of the above operation. The decode unit 3 decodes the data obtained by the above operation. Here, consider a state in which the first 8 bits are decoded from the state shown in FIG. FIG. 6 shows the state at this time. In this state, the contents of the register 322 holding the shifter output are different from the state of FIG. That is, next, decoding is performed with the remaining data excluding the byte a.

【0013】そして、この時、b、cのデータが0xF
F00であることが検出されたとする。すると、0x0
0であるcは、デコードには不要なデータであるので、
これを除く。このためにホストプロセッサ1は図7に示
すようにレジスタ12においてcを取り除いた後をdで
埋める。そして、更にメモリ2から新たにレジスタ11
に読み込んだワード22の先頭の8ビットeをレジスタ
12上のdの後に移す操作を行ない、レジスタ311に
書き込む。更にこの後、ホストプロセッサ1は、新たな
ワード22をデコードユニット3のレジスタ311に格
納する際には、図8に示すように、ワード22から先頭
の8ビットを取り除くためのシフトを行なった後、その
シフト後のワード22の下位8ビットに次のワード23
の先頭の8ビットを移す操作を行なう。
At this time, the data of b and c is 0xF
It is assumed that F00 is detected. Then, 0x0
Since c, which is 0, is unnecessary data for decoding,
Exclude this. For this purpose, the host processor 1 fills in the register 12 after removing c from the register 12 as shown in FIG. Then, the register 11 is newly added from the memory 2.
The operation of shifting the leading 8 bits e of the word 22 read into the register 12 after d on the register 12 is performed, and the result is written into the register 311. Thereafter, when storing the new word 22 in the register 311 of the decoding unit 3, the host processor 1 performs a shift for removing the first 8 bits from the word 22 as shown in FIG. , The lower 8 bits of the shifted word 22 and the next word 23
To move the first 8 bits of.

【0014】[0014]

【発明が解決しようとする課題】しかしながら、上述し
た従来の技術には、次のような問題があった。即ち、従
来の方式では、可変長コード内のバイト境界から始まる
2バイト0xFF00が存在した場合には、上述のよう
に、デコードを一旦中断してホストプロセッサ1が0x
00のバイトを削除して再度デコードユニット3にデー
タを渡して起動する必要がある。従って、データ処理の
スループットが低下するという問題があった。更に、従
来の方式では一旦0xFF00の2バイトが出現する
と、ホストプロセッサ1は、上述したように、0x00
を削除した分のバイト位置合せをそれ以降メモリからワ
ードを読み込むごとに常に行なわなければならないとい
う問題があった。
However, the above-mentioned prior art has the following problems. That is, in the conventional method, if there is a 2-byte 0xFF00 starting from a byte boundary in the variable-length code, as described above, the decoding is temporarily interrupted and the host processor 1
It is necessary to delete the 00 byte and pass the data to the decoding unit 3 again to start. Therefore, there is a problem that the throughput of data processing is reduced. Further, in the conventional method, once the two bytes of 0xFF00 appear, the host processor 1 sets 0x00 as described above.
There is a problem in that the byte alignment for the number of bytes deleted must always be performed each time a word is read from the memory thereafter.

【0015】本発明は、以上の点に着目してなされたも
ので、マーカコードの識別用の付加コードを除去して再
デコードする場合においても、ホストプロセッサの付加
が増大しないようにしたマーカ識別用付加ビット処理装
置を提供することを目的とするものである。
The present invention has been made in view of the above points, and has a marker identification function in which the addition of a host processor is not increased even when an additional code for identifying a marker code is removed and re-decoded. It is an object of the present invention to provide an additional bit processing device.

【0016】[0016]

【課題を解決するための手段】本発明のマーカ識別用付
加ビット処理装置は、ビット列中のデータの開始位置を
表わすためのマーカコードを検出するためのヘッダコー
ドを他のビット列と区別するために付加される付加ビッ
トを処理する処理装置において、マーカコードに先行す
るヘッダコードより以前のビット列を保持するデータ入
力部と、当該データ入力部に保持されたビット列をシフ
トするデータシフト部と、前記付加ビットの検出時に前
記データ入力部に保持されたヘッダコードより以前のビ
ット列、前記ヘッダコードと同様のビット列、及び前記
付加ビットより以降のビット列を合成することにより、
前記付加ビットを除去する付加ビット処理部と、前記付
加ビットの検出時に前記データシフト部が出力するビッ
ト列を前記付加ビット処理部を介して入力してデコード
し、前記データシフト部に対し前記付加ビットのビット
数と同じビット数のシフトを行なうよう、シフト量を出
力するデコーダ部とから成るものである。
According to the present invention, there is provided a marker identifying additional bit processing apparatus for distinguishing a header code for detecting a marker code representing a start position of data in a bit string from other bit strings. In a processing device for processing an additional bit to be added, a data input unit for holding a bit sequence before a header code preceding a marker code, a data shift unit for shifting a bit sequence held in the data input unit, By synthesizing a bit sequence before the header code held in the data input unit at the time of detecting the bit, a bit sequence similar to the header code, and a bit sequence after the additional bit,
An additional bit processing unit that removes the additional bit, a bit string output by the data shift unit when the additional bit is detected is input via the additional bit processing unit and decoded, and the additional bit processing unit And a decoder for outputting a shift amount so as to shift the same number of bits as the number of bits.

【0017】[0017]

【作用】本発明のマーカ識別用付加ビット処理装置にお
いては、デコードユニットにおいてホストプロセッサか
ら入力したビット列データを以下のようにしてデコード
する。データ入力部のレジスタに読み込まれたビット列
は、データシフト部で1ビットずつシフトされ、デコー
ダ部でデコードされる。一方、データ入力部のレジスタ
に読み込まれたビット列は、マーカ検出部にも送られ、
マーカ検出部でマーカコードに先行して挿入されている
ヘッダコード(例えば、0xFF)と付加ビット(例え
ば、0x00)が検出される。そして、バイト境界にお
いてヘッダコードに連続する付加ビットが検出された時
は、付加ビット処理部により付加ビットを除去したビッ
ト列がデコーダ部に入力される。デコーダ部は、このビ
ット列をデコードし、その際データシフト部を付加ビッ
トのビット数分シフトさせ、以後のビット列のデコード
を継続する。従って、ホストプロセッサは付加ビットの
除去を行なう必要がない。
In the marker identification additional bit processing device of the present invention, the decoding unit decodes the bit string data input from the host processor as follows. The bit string read into the register of the data input unit is shifted one bit at a time by the data shift unit and decoded by the decoder unit. On the other hand, the bit string read into the register of the data input unit is also sent to the marker detection unit,
The marker detector detects a header code (for example, 0xFF) and an additional bit (for example, 0x00) inserted before the marker code. When an additional bit continuous to the header code is detected at the byte boundary, the bit string from which the additional bit has been removed by the additional bit processing unit is input to the decoder unit. The decoder unit decodes this bit string, shifts the data shift unit by the number of additional bits, and continues decoding the subsequent bit string. Therefore, the host processor does not need to remove the additional bit.

【0018】[0018]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。図1は、本発明のマーカ識別用付加ビット
処理装置の一実施例のブロック図である。図1におい
て、デコードユニット3′は、図3に示す従来のデコー
ドユニット3と同様に、データを取り込むデータ入力部
31、取り込んだデータをシフトするデータシフト部3
2、シフトされたデータからコードデータを取り出して
デコードするデコーダ部33、データから0xFF00
を取り出すマーカ検出部34、通信制御部35を備えて
いる。更に、バイト境界にある0xFF00が検出され
た時に付加ビットである0x00を取り除いてデコーダ
部33にコードデータを供給する付加ビット処理部36
を備えている。即ち、デコードユニット3′は、図3及
び図4に示す従来のデコードユニット3に付加ビット処
理部36を備えた構成となっており、この部分以外の構
成は、従来のものと同様である。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram of an embodiment of an additional bit processing device for marker identification according to the present invention. In FIG. 1, a decoding unit 3 'includes a data input unit 31 for taking in data and a data shift unit 3 for shifting the taken data, similarly to the conventional decoding unit 3 shown in FIG.
2. Decoder unit 33 for extracting and decoding code data from the shifted data, 0xFF00 from the data
And a communication control unit 35 for extracting the information. Further, when 0xFF00 at the byte boundary is detected, the additional bit processing unit 36 that removes the additional bit 0x00 and supplies the code data to the decoder unit 33
It has. That is, the decoding unit 3 'has a configuration in which the additional bit processing unit 36 is provided in the conventional decoding unit 3 shown in FIGS. 3 and 4, and the configuration other than this portion is the same as the conventional one.

【0019】図10に、付加ビット処理部の内容を詳し
く示す。付加ビット処理部36は、0xFFを保持する
レジスタ361、シフタ出力の下位ビットを0xFFと
合成する下位ビット合成部362、下位ビット合成部3
62の出力を保持する下位ビット保持レジスタ363を
備えている。また、この付加ビット処理部36は、レジ
スタ363の出力とシフタ321の出力を選択して0x
00を除去する0x00除去セレクタ364、シフト量
加算器333の下位3ビットを数値“8”から減算する
3ビット減算器365を備えている。更に、下位ビット
合成部362は3ビット減算器365の出力により制御
され、0x00除去セレクタ364は0xFF00検出
部343の出力により0x00の付加ビットを除去する
よう、制御される。
FIG. 10 shows the contents of the additional bit processing section in detail. The additional bit processing unit 36 includes a register 361 that holds 0xFF, a lower bit combination unit 362 that combines lower bits of the shifter output with 0xFF, and a lower bit combination unit 3
There is provided a lower bit holding register 363 for holding the output of L.62. Further, the additional bit processing unit 36 selects the output of the register 363 and the output of the shifter 321 to select 0x
A 0x00 removal selector 364 for removing 00 and a 3-bit subtractor 365 for subtracting the lower 3 bits of the shift amount adder 333 from the numerical value “8” are provided. Further, the lower bit synthesizing unit 362 is controlled by the output of the 3-bit subtractor 365, and the 0x00 removal selector 364 is controlled by the output of the 0xFF00 detection unit 343 to remove the additional bit of 0x00.

【0020】次に、上述した付加ビット処理部36の動
作を説明する。まず、データシフト部32から出力され
るコードを1ビットずつデコーダ331に入力し、デコ
ーダ331でデコードを行なう。そして、例えば、図1
1に示す“abcde”の5ビットでデコードができれ
ば、コード長は5ビットであることが判明する。このよ
うな時には、0xFF00を含まない、0xFFのバイ
トよりも前のコードだけでデコード可能なので、この付
加ビット処理部36は起動されない。一方、図11に示
す“abcde”の5ビットではデコードできず、更に
“1111111100000000fgh”をデコー
ダ331に入力しなければならないような時には、付加
ビット処理部36が起動される。つまり、付加ビット処
理部36は、デコーダ331によるデコードが完了しな
いときだけ、起動される。
Next, the operation of the additional bit processing section 36 will be described. First, the code output from the data shift unit 32 is input to the decoder 331 one bit at a time, and the decoder 331 performs decoding. And, for example, FIG.
If decoding can be performed with 5 bits of “abcde” shown in FIG. 1, the code length is found to be 5 bits. In such a case, the additional bit processing unit 36 is not activated because the code can be decoded only by the code before 0xFF, not including 0xFF00. On the other hand, when decoding cannot be performed with the five bits “abcde” shown in FIG. 11 and “1111111110000000000fgh” must be input to the decoder 331, the additional bit processing unit 36 is activated. That is, the additional bit processing unit 36 is activated only when the decoding by the decoder 331 is not completed.

【0021】0xFF00検出部343がバイト境界に
0xFF00が存在することを検出すると、シフタ32
1の出力のうちのバイト境界までのコードビットと0x
FFを下位ビット合成部362で合せて下位ビット保持
レジスタ363に保持する。更に、シフト量加算器33
3で“8”だけ加算した結果をもとに、シフタ321で
シフトを行なう。その結果を上位ビットとし、下位ビッ
ト保持レジスタ363の内容を下位ビットとして0x0
0除去セレクタ364で選択を行なう。これにより、も
とのコード列から0x00を取り除いたコードをデコー
ダ331に供給することができる。
When the 0xFF00 detection unit 343 detects that 0xFF00 exists at the byte boundary, the shifter 32
Code bits up to byte boundary of output of 1 and 0x
The FFs are combined by the lower bit synthesizing unit 362 and held in the lower bit holding register 363. Further, the shift amount adder 33
The shifter 321 shifts based on the result of adding “8” by 3. The result is set as the upper bit, and the contents of the lower bit holding register 363 are set as the lower bit, and
The selection is performed by the 0 removal selector 364. Thus, a code obtained by removing 0x00 from the original code sequence can be supplied to the decoder 331.

【0022】この動作をさらに具体的に図11に示す。
図11は、下位ビット保持レジスタ363、シフト量加
算器333の出力、シフタ321、0x00除去セレク
タ364の出力を示している。 (1)始めの状態を図11(a)に示す。シフト量加算器
333の出力は“00011”であるとし、シフタ出力
は“ビット5”〜“ビット20”が0xFF00になっ
ている。この時、0xFF00検出部343がバイト境
界にある0xFF00を検出したことを付加ビット処理
部36とシフト量加算器333に通知する。付加ビット
処理部36では現在のシフト量加算器333の出力の下
位3ビットを“8”から減算したビット数(つまりこの
時は5ビット)を0xFFと共に下位ビット保持レジス
タ363に保持する。
FIG. 11 shows this operation more specifically.
FIG. 11 shows the output of the lower bit holding register 363, the output of the shift amount adder 333, the output of the shifter 321, and the output of the 0x00 removal selector 364. (1) The initial state is shown in FIG. It is assumed that the output of the shift amount adder 333 is “00011”, and the shifter output is “0xFF00” for “bit 5” to “bit 20”. At this time, the 0xFF00 detection unit 343 notifies the additional bit processing unit 36 and the shift amount adder 333 that the 0xFF00 at the byte boundary has been detected. The additional bit processing unit 36 holds the number of bits obtained by subtracting the lower 3 bits of the current output of the shift amount adder 333 from “8” (ie, 5 bits at this time) together with 0xFF in the lower bit holding register 363.

【0023】(2)次の状態を図11(b)に示す。シフ
ト量加算器に“8”だけ加算し、その結果で再度シフタ
321を用いてシフトを行なう。 (3)次の状態を図11(c)に示す。0x00除去セレ
クタ364において、“ビット0”〜“ビット12”は
下位ビット保持レジスタ363の出力を選択し、“ビッ
ト13”〜“ビット15”はシフタ出力を選択する。 このようにして、0x00を連続して除去することがで
き、従来技術におけるバイト位置合せも不要となる。
尚、上述した実施例においては、ハフマンコードのデコ
ード方式について説明したが、本発明はこれに限定され
ることなく、他の可変長コードのデコード方式について
も適用できることはいうまでもない。
(2) The next state is shown in FIG. "8" is added to the shift amount adder, and the shift is performed again using the shifter 321 with the result. (3) The next state is shown in FIG. In the 0x00 removal selector 364, “bit 0” to “bit 12” select the output of the lower bit holding register 363, and “bit 13” to “bit 15” select the shifter output. In this manner, 0x00 can be continuously removed, and byte alignment in the prior art is not required.
In the above-described embodiment, the description has been given of the Huffman code decoding method. However, it is needless to say that the present invention is not limited to this, and can be applied to other variable length code decoding methods.

【0024】[0024]

【発明の効果】以上説明したように、本発明のマーカ識
別用付加ビット処理装置によれば、付加ビットの除去を
行なう付加ビット処理部を備えるようにしたので、マー
カコードであることを識別するためのヘッダと同じコー
ドがコード列内にあるために、ヘッダに付加ビットを追
加してマーカコードであることを示さなければならない
コード方式の場合にも、デコード時に連続的に当該識別
コードを除去することが可能である。従って、ホストプ
ロセッサによって除去するための時間を不要とし、さら
にホストプロセッサによるバイト位置合せのための時間
をも不要とすることが可能である。
As described above, according to the additional bit processing apparatus for marker identification of the present invention, since the additional bit processing section for removing the additional bit is provided, it is possible to identify the marker code. Since the same code as the header in the code sequence is used in the code sequence, an additional bit must be added to the header to indicate that the code is a marker code. It is possible to Therefore, it is possible to eliminate the time for removing by the host processor and the time for byte alignment by the host processor.

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

【図1】本発明のマーカ識別用付加ビット処理装置の一
実施例のブロック図(その1)である。
FIG. 1 is a block diagram (part 1) of an embodiment of an additional bit processing device for marker identification of the present invention.

【図2】JPEGハフマンコードを用いたシステムの例
を示すブロック図である。
FIG. 2 is a block diagram illustrating an example of a system using a JPEG Huffman code.

【図3】従来のJPEG方式のデコードユニットの一例
のブロック図(その1)である。
FIG. 3 is a block diagram (part 1) of an example of a conventional JPEG decoding unit.

【図4】従来のJPEG方式のデコードユニットの一例
のブロック図(その2)である。
FIG. 4 is a block diagram (part 2) of an example of a conventional JPEG decoding unit.

【図5】従来のマーカ識別用付加ビット処理手順を説明
するブロック図(その1)である。
FIG. 5 is a block diagram (part 1) for explaining a conventional marker identification additional bit processing procedure;

【図6】従来のマーカ識別用付加ビット処理手順を説明
するブロック図(その2)である。
FIG. 6 is a block diagram (part 2) for explaining a conventional marker identification additional bit processing procedure;

【図7】従来のマーカ識別用付加ビット処理手順を説明
するブロック図(その3)である。
FIG. 7 is a block diagram (part 3) for explaining a conventional marker identification additional bit processing procedure;

【図8】従来のマーカ識別用付加ビット処理手順を説明
するブロック図(その4)である。
FIG. 8 is a block diagram (part 4) for explaining a conventional marker identification additional bit processing procedure;

【図9】本発明のマーカ識別用付加ビット処理装置の一
実施例のブロック図(その2)である。
FIG. 9 is a block diagram (part 2) of an embodiment of an additional bit processing device for marker identification according to the present invention.

【図10】付加ビット処理部の詳細な構成を示すブロッ
ク図である。
FIG. 10 is a block diagram illustrating a detailed configuration of an additional bit processing unit.

【図11】本発明に係るマーカ識別用付加ビット処理手
順の説明図である。
FIG. 11 is an explanatory diagram of a marker identification additional bit processing procedure according to the present invention.

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

1 ホストプロセッサ 2 メモリ 3 デコードユニット 31 データ入力部 32 データシフト部 33 デコーダ部 34 マーカ検出部 35 通信制御部 DESCRIPTION OF SYMBOLS 1 Host processor 2 Memory 3 Decoding unit 31 Data input unit 32 Data shift unit 33 Decoder unit 34 Marker detection unit 35 Communication control unit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ビット列中のデータの開始位置を表わす
ためのマーカコードを検出するためのヘッダコードを他
のビット列と区別するために付加される付加ビットを処
理する処理装置において、 マーカコードに先行するヘッダコードより以前のビット
列を保持するデータ入力部と、 当該データ入力部に保持されたビット列をシフトするデ
ータシフト部と、 前記付加ビットの検出時に前記データ入力部に保持され
たヘッダコードより以前のビット列、前記ヘッダコード
と同様のビット列、及び前記付加ビットより以降のビッ
ト列を合成することにより、前記付加ビットを除去する
付加ビット処理部と、 前記付加ビットの検出時に前記データシフト部が出力す
るビット列を前記付加ビット処理部を介して入力してデ
コードし、前記データシフト部に対し前記付加ビットの
ビット数と同じビット数のシフトを行なうよう、シフト
量を出力するデコーダ部とから成ることを特徴とするマ
ーカ識別用付加ビット処理装置。
1. A processing device for processing a header code for detecting a marker code for indicating a start position of data in a bit string, which is added to distinguish a header code from other bit strings, comprises: A data input unit that holds a bit string before the header code to be shifted, a data shift unit that shifts the bit string held in the data input unit, and a header code that is held before the header code held in the data input unit when the additional bit is detected. An additional bit processing unit that removes the additional bit by synthesizing a bit sequence of the header code, a bit sequence similar to the header code, and a bit sequence subsequent to the additional bit, and the data shift unit outputs when the additional bit is detected. A bit string is input through the additional bit processing unit and decoded, and the data shift is performed. Wherein to perform the shifting of the same number of bits as the number of bits of the additional bits, the marker identification additional bit processing apparatus characterized by comprising a decoder unit for outputting a shift amount to.
JP24887393A 1993-09-09 1993-09-09 Additional bit processing device for marker identification Expired - Fee Related JP3197408B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24887393A JP3197408B2 (en) 1993-09-09 1993-09-09 Additional bit processing device for marker identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24887393A JP3197408B2 (en) 1993-09-09 1993-09-09 Additional bit processing device for marker identification

Publications (2)

Publication Number Publication Date
JPH0786956A JPH0786956A (en) 1995-03-31
JP3197408B2 true JP3197408B2 (en) 2001-08-13

Family

ID=17184701

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24887393A Expired - Fee Related JP3197408B2 (en) 1993-09-09 1993-09-09 Additional bit processing device for marker identification

Country Status (1)

Country Link
JP (1) JP3197408B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4614732B2 (en) * 2004-10-22 2011-01-19 パナソニック株式会社 Decoding device
SE531398C2 (en) * 2007-02-16 2009-03-24 Scalado Ab Generating a data stream and identifying positions within a data stream
SE533185C2 (en) 2007-02-16 2010-07-13 Scalado Ab Method for processing a digital image and image representation format
JP2010233235A (en) * 2010-05-10 2010-10-14 Panasonic Corp Encoding device
CN106205726B (en) * 2016-06-30 2020-02-04 深圳市航顺芯片技术研发有限公司 Quick test technology for EEPROM memory

Also Published As

Publication number Publication date
JPH0786956A (en) 1995-03-31

Similar Documents

Publication Publication Date Title
EP0814614B1 (en) High bit-rate Huffman decoding
JP4349533B2 (en) Flexible multiplexed signal transmission system
KR100486251B1 (en) Decoding apparatus for variable length code and method thereof
US6285789B1 (en) Variable length code decoder for MPEG
JPS60140981A (en) Method and device for decoding digital coded word of coded word system
JP3197408B2 (en) Additional bit processing device for marker identification
JPS60140980A (en) Method and device for encoding signal representing flow of digital data group
US6385341B1 (en) Technique for decoding variable length data codes
US20020006228A1 (en) Data decoding apparatus and method of same
US6563442B1 (en) Multiple symbol length lookup table
JP2003526986A (en) Arithmetic decoding of arithmetically encoded information signals
WO2009122675A1 (en) Variable length code decoding apparatus and method
JP3417684B2 (en) Image processing device
JPH04298164A (en) Data compression/release circuit for facsimile apparatus
JPH06121174A (en) Encoder/decoder
JP2003198378A (en) Decoding apparatus and method therefor, record medium, and program
JP2005026955A (en) Section filter circuit, transport stream processing apparatus, and digital broadcast reception system
JP3108243B2 (en) Encoding and decoding device
JPH0638048A (en) Data compressing method for image and code
JP2556160B2 (en) Compression code decompression device
JP2795023B2 (en) Encoding device
JPH0569342B2 (en)
JP2776075B2 (en) Transmission method of variable length coded data
JP3142911B2 (en) Processing method of encoding / decoding device
JP2005130490A (en) False sync code protection (fsp) decoding by software

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090608

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090608

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100608

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100608

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110608

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110608

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20130608

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees