JP3737352B2 - Start code search circuit - Google Patents

Start code search circuit Download PDF

Info

Publication number
JP3737352B2
JP3737352B2 JP2000290289A JP2000290289A JP3737352B2 JP 3737352 B2 JP3737352 B2 JP 3737352B2 JP 2000290289 A JP2000290289 A JP 2000290289A JP 2000290289 A JP2000290289 A JP 2000290289A JP 3737352 B2 JP3737352 B2 JP 3737352B2
Authority
JP
Japan
Prior art keywords
start code
bit stream
circuit
shift amount
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
JP2000290289A
Other languages
Japanese (ja)
Other versions
JP2002099407A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2000290289A priority Critical patent/JP3737352B2/en
Publication of JP2002099407A publication Critical patent/JP2002099407A/en
Application granted granted Critical
Publication of JP3737352B2 publication Critical patent/JP3737352B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、ビットストリームを検索してビットストリームに含まれるスタートコードを検出するスタートコード検索回路に関する。
【0002】
【従来の技術】
例えば、情報の圧縮規格の一つであるMPEGに準拠した圧縮画像データ(以下、ビットストリームと呼ぶ)をデコードするデコード装置としては、例えば図5に示すようなものがある。図5において、デコード装置は、可変長符号デコーダ回路B1、RLD回路B2、逆量子化回路B3、逆DCT回路B4、動き補償・フレーム予測回路B5ならびにフレームメモリM1を備えて構成されている。
【0003】
このようなデコード装置において、ビットストリームは例えば外部、例えば衛星電波受信機やDVDなどから入力される。入力されたビットストリームから、ビットストリーム内の目印であるスタートコードが可変長符号デコード回路B1で検索される。検索において、順次ビットストリームから画像のDCT係数のランレベル情報や、動きベクトル及びその他のヘッダ情報が復号される。復号されたDCT係数のランレベル情報はRLD回路B2でDCT係数へ変換され、更に逆量子化回路B3で量子化特性と量子化マトリクスによって決定される値で逆量子化される。そして、逆DCT回路B4で逆離散コサイン変換され、復号画像として動き補償・フレーム予測回路B5に入力される。動き補償・フレーム予測回路B5では、Iピクチャの場合は復号画像を復号信号として出力する。P、Bピクチャの場合は、各画像タイプに従って適時フレームメモリM1に格納された画像情報から動きベクトルを用いて予測画像を生成し、復号画像と予測画像を足し合わせたものを復号信号として出力する。
【0004】
図6は、従来のスタートコード検索機能付可変長符号デコード回路の構成を示す図である。図6において、スタートコード検索機能付可変長符号デコード回路は、レジスタR1〜R5、加算器A1、シフタ回路S1、ビットストリームからDCT係数のランレベル形式等に変換する変換テーブルT1、ビットストリームの先頭にある符号語から符号長を出力する符号長出力テーブルT2、ならびにスタートコードを検出する判定回路C1を備えて構成されている。なお、MPEGではスタートコードは32ビット長であり、最上位ビットから23ビット目までが“0”で、24ビット目が“1”という特徴を有している。また、スタートコードは、ビットストリーム内でバイトアラインされているものとする。
【0005】
図6において、FIFOに構成されたレジスタR2、R3、R4にビットストリームが先頭から順に格納される。レジスタR2〜R4に格納されたビットストリームの先頭ビット位置をレジスタR1に保持する。この状態で1サイクル分クロックを進めると、レジスタR2〜R4から出力されたビットストリームからシフタ回路S1によって頭出しが行われ、レジスタR5に格納される。これを初期状態とする。
【0006】
次に、判定回路C1をレジスタR5の値で参照することにより、頭出しされてレジスタR5に格納されたデータがスタートコードか否かが判定される。スタートコードであると判定されるまで、8ビット分ビットストリームを先頭から切り捨てる。すなわち、以下の処理を行う。
【0007】
1.レジスタR1の値と“8”を加算器A1で加えた値(これをnとする)が、新たなビットストリーム先頭の位置となる。この値nの下位5ビットを、レジスタR1に格納する。
【0008】
2.FIFO(レジスタR2、R3、R4)からの出力を、シフタ回路S1を用いてnビットシフトさせ、頭出ししたビットストリームをレジスタR5に格納する。
【0009】
3.nが32以上の値であった場合は、FIFOを32ビット分更新する。
【0010】
このような検索処理を行うことにより、与えられたビットストリームからスタートコードが検出され、検出されたスタートコードがレジスタR5に格納される。
【0011】
【発明が解決しようとする課題】
以上説明したように、ビットストリームからスタートコードを検索する従来の検索回路においては、ビットストリームから32ビットのスタートコードを検出する場合には、一連のビットストリームの先頭から1サイクル当たり8ビット(=スタートコードのバイト間隔)ずつ検索を進めていた。このため、ビットストリームからスタートコードを検出するためには、多大な検索時間が必要になるといった不具合を招いていた。
【0012】
そこで、この発明は、上記に鑑みてなされたものであり、その目的とするところは、ビットストリームを検索してスタートコードを検出する検出時間を短縮したスタートコード検索回路を提供することにある。
【0014】
【課題を解決するための手段】
上記目的を達成するために、課題を解決するための第1の手段は、与えられたシフト量にしたがって入力された圧縮データ(ビットストリーム)をシフトし、シフトしたビットストリームからスタートコードと同じビット数の単位ビットストリームを出力するシフタ回路と、前記シフタ回路から出力された単位ビットストリームがスタートコードであるか否かを判定する判定回路とを具備し、前記シフタ回路により一連のビットストリームをシフトしながら順次検索して、一連のビットストリームの中からスタートコードを検出するスタートコード検索回路において、前記シフタ回路から出力された単位ビットストリームを受けて、単位ビットストリームと、スタートコードのビット配列に応じて予め用意された複数の比較情報とを比較し、比較結果に応じて前記シフタ回路のシフト量を与えるシフト量出力テーブルを具備し、前記シフト量出力テーブルは、比較情報(ビットストリーム)と、該比較情報に対応するシフト量(切り捨て量)との関係が、
【0015】
【表3】

Figure 0003737352
であることを特徴とする。
【0016】
第2の手段は、与えられたシフト量にしたがって入力された圧縮データ(ビットストリーム)をシフトし、シフトしたビットストリームからスタートコードと同じビット数の単位ビットストリームを出力するシフタ回路と、前記シフタ回路から出力された単位ビットストリームがスタートコードであるか否かを判定する判定回路とを具備し、前記シフタ回路により一連のビットストリームをシフトしながら順次検索して、一連のビットストリームの中からスタートコードを検出するスタートコード検索回路において、前記シフタ回路から出力された単位ビットストリームを受けて、単位ビットストリームと、スタートコードのビット配列に応じて予め用意された複数の比較情報とを比較し、比較結果に応じて前記シフタ回路のシフト量を与えるシフト量出力テーブルを具備し、前記シフト量出力テーブルは、比較情報(ビットストリーム)と、該比較情報に対応するシフト量(切り捨て量)との関係が、
【0017】
【表4】
Figure 0003737352
であることを特徴とする。
【0018】
【発明の実施の形態】
以下、図面を用いてこの発明の実施形態を説明する。
【0019】
図1はこの発明の一実施形態に係るスタートコード検索回路の構成を示す図である。図1において、この実施形態のスタートコード検索回路は、図6に示す構成に加えて、シフト量出力テーブルT3を備えて構成され、図6に示す回路と同様にビットストリームから可変長符号をデコードする機能(この発明の特徴となるものではない)も備えており、図6に示すと同様の変換テーブルT1ならびに符号長出力テーブルT2は、専らビットストリームから可変長符号をデコードする際に使用される構成要素である。また、レジスタR1〜R5、加算器A1、シフタ回路S1は、ビットストリームからスタートコードを検出する際に用いられるとともに、ビットストリームから可変長符号をデコードする際にも使用されるものである。なお、この実施形態では、スタートコードは、従来と同様なビット構成とし、ビットストリーム内でバイトアラインされているものとする。
【0020】
シフト量出力テーブルT3は、レジスタR5に格納された32ビットのビットストリームと、図2に示す32ビットの4つの比較情報とを比較し、比較結果に応じて切り捨て量(シフト量)mを出力する。32ビットの比較情報は、図2に示すように、
【表5】
(1) 00000000_00000000_00000001_XXXXXXXX
(2) XXXXXXXX_00000000_00000000_00000001
(3) XXXXXXXX_XXXXXXXX_00000000_00000000
(4) XXXXXXXX_XXXXXXXX_XXXXXXXX_00000000
となる。レジスタR5に格納された32ビットのビットストリームと、上記(1)に示す比較情報との比較において両者が一致した場合には、レジスタR5に格納されたビットストリームは、スタートコードであり、判定回路C1によりスタートコードであると検出される。したがって、切り捨ては行われず、切り捨て量mとしては“0”となる。次に、レジスタR5に格納された32ビットのビットストリームと、上記(2)に示す比較情報との比較において両者が一致した場合には、シフト量出力テーブルT3は、切り捨て量mとして“8”を出力する。レジスタR5に格納された32ビットのビットストリームと、上記(3)に示す比較情報との比較において両者が一致した場合には、シフト量出力テーブルT3は、切り捨て量mとして“16”を出力する。レジスタR5に格納された32ビットのビットストリームと、上記(4)に示す比較情報との比較において両者が一致した場合には、シフト量出力テーブルT3は、切り捨て量mとして“24”を出力する。レジスタR5に格納された32ビットのビットストリームが、シフト量出力テーブルのいずれの値とも一致(マッチ)しなかった場合には、シフト量出力テーブルT3は、切り捨て量mとして“32”を出力する。このようなシフト量出力テーブルT3は、例えば論理ゲートやメモリのRAM、ROM等により構成される。
【0021】
このような構成において、まずFIFO(レジスタR2、R3、R4)にビットストリームが先頭から順に格納される。FIFOに格納されたビットストリームの先頭ビット位置をレジスタR1に保持する。この状態で1サイクル分クロックを進めると、FIFOから出力されたビットストリームからシフタ回路S1によって32ビットのビットストリームが出力されて頭出しが行われ、レジスタR5に格納される。これを初期状態とする。
【0022】
このような初期状態において、判定回路C1をレジスタR5の値で参照することにより、レジスタR5に格納された値がスタートコードであるか否かを判定する。スタートコードと判定されるまで、mビット分ビットストリームを先頭から順次切り捨てる。切り捨て量mの値は、レジスタR5の値をシフト量出力テーブルT3の図2に示す値と先頭から順次比較して、マッチあるいはマッチしないときのシフト量出力テーブルT3の値となる。レジスタR5の下位24ビットの値が、「00000000_00000000_00000001」にマッチするか否かが判定され、マッチした場合はm=8とする。レジスタR5の下位16ビットの値が、「00000000_00000000 」にマッチするか否かが判定され、マッチした場合はm=16とする。レジスタR5の下位8ビットの値が、「00000000」にマッチするか否かが判定され、マッチした場合はm=24とする。いずれでもない場合には、m=32とする。
【0023】
このようにして、切り捨て量mがシフト量出力テーブルT3から出力されると、この切り捨て量に基づいてFIFO(レジスタR2、R3、R4)からシフタ回路S1に与えられるビットストリームがシフタ回路S1でシフトされて切り捨てが行われる。切り捨て処理は、従来と同様に行われて、シフト量出力テーブルT3から出力された切り捨て量mとレジスタR1に格納された値とを加算器A1で加算し、加算結果のシフト量としてFIFO(レジスタR2、R3、R4)からシフタ回路S1に与えられてビットストリームがシフタ回路S1でシフトされる。
【0024】
このような検索処理をビットストリームからスタートコードが検出されるまで順次行われる。したがって、上記実施形態においては、シフト量出力テーブルT3を備えることによって、1サイクル当たり最大で32ビットずつビットストリームの検索を進めることが可能となる。これにより、ビットストリームからスタートコードを検出するまでの時間を従来に比べて短縮することができるようになる。
【0025】
図3はこの発明の他の実施形態に係るスタートコード検索回路の構成を示す図である。図3において、この実施形態の特徴とするところは、スタートコードが、ビットストリーム内でバイトアラインされていないものに適用できることを特徴とし、図1に示すシフト量出力テーブルT3に代えてシフト量出力テーブルT4を備え、他の構成は図1と同様である。なお、図3において、図1と同符号のものは同様な構成であり、その説明は省略する。
【0026】
シフト量出力テーブルT4は、レジスタR5に格納された32ビットのビットストリームと、図4に示す32ビットの比較情報とを比較し、比較結果に応じて切り捨て量(シフト量)mを出力する。32ビットの比較情報は、図4に示すように、「00000000_00000000_00000001_XXXXXXXX」〜 「XXXXXXXX_XXXXXXXX_XXXXXXXX_XXXXXXX0 」となり、切り捨て量mは、それぞれの比較情報に対応して図4に示すようにm=0〜31となり、いずれにもマッチしない場合には、m=32となる。
【0027】
このようなシフト量出力テーブルT4を用い、先の実施形態と全く同様にしてシフト量出力テーブルT4から出力された切り捨て量mに基づいてシフタ回路S1でシフトを行い、ビットストリームを検索してビットストリームからスタートコードを検出する。したがって、このような実施形態においては、スタートコードが、ビットストリーム内でバイトアラインされていない場合であっても、先の実施形態と同様の効果を得ることができる。
【0028】
【発明の効果】
以上説明したように、この発明によれば、ビットストリームをシフトするシフタ回路のシフト出力とシフト量出力テーブルの比較情報との比較結果に応じて、シフタ回路のシフト量を与えるようにしたので、ビットストリームを検索してスタートコードを検出するようにしたので、スタートコードを検出する時間を従来に比べて短縮することができる。
【図面の簡単な説明】
【図1】この発明の一実施形態に係るスタートコード検索回路の構成を示す図である。
【図2】図1に示すシフト量出力テーブルT3の内容を示す図である。
【図3】この発明の他の実施形態に係るスタートコード検索回路の構成を示す図である。
【図4】図3に示すシフト量出力テーブルT4の内容を示す図である。
【図5】圧縮画像データをデコードする従来の装置の構成を示す図である。
【図6】スタートコード検索機能を有する従来の可変長符号デコード回路の構成を示す図である。
【符号の説明】
R1,R2,R3,R4,R5 レジスタ
A1 加算器
S1 シフタ回路
C1 判定回路
T1 変換テーブル
T2 符号長出力テーブル
T3,T4 シフト量出力テーブル[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a start code search circuit for searching a bit stream and detecting a start code included in the bit stream.
[0002]
[Prior art]
For example, as a decoding apparatus for decoding compressed image data (hereinafter referred to as a bit stream) compliant with MPEG, which is one of information compression standards, there is a device as shown in FIG. In FIG. 5, the decoding apparatus includes a variable length code decoder circuit B1, an RLD circuit B2, an inverse quantization circuit B3, an inverse DCT circuit B4, a motion compensation / frame prediction circuit B5, and a frame memory M1.
[0003]
In such a decoding apparatus, the bit stream is input from the outside, for example, a satellite radio wave receiver or a DVD. From the input bit stream, a start code which is a mark in the bit stream is searched by the variable length code decoding circuit B1. In the search, the run level information of the DCT coefficient of the image, the motion vector, and other header information are sequentially decoded from the bit stream. The run level information of the decoded DCT coefficient is converted into a DCT coefficient by the RLD circuit B2, and further dequantized by a value determined by the quantization characteristic and the quantization matrix by the inverse quantization circuit B3. Then, the inverse DCT circuit B4 performs inverse discrete cosine transform and inputs the decoded image to the motion compensation / frame prediction circuit B5. In the case of an I picture, the motion compensation / frame prediction circuit B5 outputs a decoded image as a decoded signal. In the case of P and B pictures, a predicted image is generated from the image information stored in the frame memory M1 in accordance with each image type using a motion vector, and the decoded image and the predicted image added together are output as a decoded signal. .
[0004]
FIG. 6 is a diagram showing a configuration of a conventional variable length code decoding circuit with a start code search function. In FIG. 6, a variable length code decoding circuit with a start code search function includes registers R1 to R5, an adder A1, a shifter circuit S1, a conversion table T1 for converting a bitstream into a run level format of DCT coefficients, and the beginning of the bitstream. Are provided with a code length output table T2 for outputting a code length from a code word in (1) and a determination circuit C1 for detecting a start code. In MPEG, the start code has a length of 32 bits, and is characterized in that the most significant bit through the 23rd bit are “0” and the 24th bit is “1”. The start code is assumed to be byte aligned in the bitstream.
[0005]
In FIG. 6, bitstreams are stored in order from the top in registers R2, R3, and R4 configured in a FIFO. The head bit position of the bit stream stored in the registers R2 to R4 is held in the register R1. When the clock is advanced for one cycle in this state, the head search is performed by the shifter circuit S1 from the bit stream output from the registers R2 to R4 and stored in the register R5. This is the initial state.
[0006]
Next, by referring to the determination circuit C1 with the value of the register R5, it is determined whether or not the data that has been cued and stored in the register R5 is a start code. Until it is determined to be a start code, the 8-bit bit stream is truncated from the beginning. That is, the following processing is performed.
[0007]
1. A value obtained by adding the value of the register R1 and “8” by the adder A1 (this is n) becomes the position of the head of a new bit stream. The lower 5 bits of the value n are stored in the register R1.
[0008]
2. The output from the FIFO (registers R2, R3, R4) is shifted by n bits using the shifter circuit S1, and the headed bit stream is stored in the register R5.
[0009]
3. When n is a value of 32 or more, the FIFO is updated by 32 bits.
[0010]
By performing such a search process, a start code is detected from a given bit stream, and the detected start code is stored in the register R5.
[0011]
[Problems to be solved by the invention]
As described above, in a conventional search circuit that searches for a start code from a bit stream, when detecting a 32-bit start code from the bit stream, 8 bits per cycle (= The search was progressing by the start code byte interval). For this reason, in order to detect a start code from a bit stream, the trouble that much search time was required was caused.
[0012]
Accordingly, the present invention has been made in view of the above, and an object of the present invention is to provide a start code search circuit in which a detection time for detecting a start code by searching a bit stream is shortened.
[0014]
[Means for Solving the Problems]
In order to achieve the above object, a first means for solving the problem is to shift the input compressed data (bit stream) according to a given shift amount, and from the shifted bit stream, the same bits as the start code A shifter circuit that outputs a number of unit bitstreams, and a determination circuit that determines whether the unit bitstream output from the shifter circuit is a start code, and the shifter circuit shifts a series of bitstreams In the start code search circuit that sequentially searches and detects a start code from a series of bit streams, the unit bit stream output from the shifter circuit is received, and the bit array of the unit bit stream and the start code is received. Depending on the comparison information prepared in advance, A shift amount output table for giving a shift amount of the shifter circuit according to a comparison result, and the shift amount output table includes comparison information (bit stream) and a shift amount (truncation amount) corresponding to the comparison information; Relationship
[0015]
[Table 3]
Figure 0003737352
It is characterized by being.
[0016]
The second means shifts the input compressed data (bit stream) according to the given shift amount, and outputs a unit bit stream having the same number of bits as the start code from the shifted bit stream, and the shifter circuit A determination circuit for determining whether or not the unit bit stream output from the circuit is a start code, and sequentially searching while shifting the series of bit streams by the shifter circuit, and from among the series of bit streams In the start code search circuit for detecting a start code, the unit bit stream output from the shifter circuit is received, and the unit bit stream is compared with a plurality of comparison information prepared in advance according to the bit arrangement of the start code. The shift amount of the shifter circuit is given according to the comparison result. Comprising a shift amount output table, the shift amount output table, the comparative information (bit stream), the shift amount corresponding to the comparison information (truncated volume) relationship with the,
[0017]
[Table 4]
Figure 0003737352
It is characterized by being.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0019]
FIG. 1 is a diagram showing a configuration of a start code search circuit according to an embodiment of the present invention. In FIG. 1, the start code search circuit of this embodiment includes a shift amount output table T3 in addition to the configuration shown in FIG. 6, and decodes a variable-length code from a bit stream in the same manner as the circuit shown in FIG. The conversion table T1 and the code length output table T2 similar to those shown in FIG. 6 are used exclusively for decoding variable length codes from the bit stream. It is a component. The registers R1 to R5, the adder A1, and the shifter circuit S1 are used when detecting a start code from the bit stream and also when decoding a variable length code from the bit stream. In this embodiment, it is assumed that the start code has the same bit configuration as that of the conventional code and is byte-aligned in the bit stream.
[0020]
The shift amount output table T3 compares the 32-bit bit stream stored in the register R5 with the four 32-bit comparison information shown in FIG. 2, and outputs a truncation amount (shift amount) m according to the comparison result. To do. The 32-bit comparison information is as shown in FIG.
[Table 5]
(1) 00000000_00000000_00000001_XXXXXXXX
(2) XXXXXXXX_00000000_00000000_00000001
(3) XXXXXXXX_XXXXXXXX_00000000_00000000
(4) XXXXXXXX_XXXXXXXX_XXXXXXXX_00000000
It becomes. When the 32-bit bit stream stored in the register R5 matches the comparison information shown in (1) above, the bit stream stored in the register R5 is a start code, and the determination circuit The start code is detected by C1. Therefore, truncation is not performed, and the truncation amount m is “0”. Next, when the 32-bit bit stream stored in the register R5 matches the comparison information shown in (2) above, the shift amount output table T3 sets “8” as the truncation amount m. Is output. When the 32-bit bit stream stored in the register R5 matches the comparison information shown in (3) above, the shift amount output table T3 outputs “16” as the truncation amount m. . When the 32-bit bit stream stored in the register R5 matches the comparison information shown in (4) above, the shift amount output table T3 outputs “24” as the truncation amount m. . When the 32-bit bit stream stored in the register R5 does not match (match) any value in the shift amount output table, the shift amount output table T3 outputs “32” as the truncation amount m. . Such a shift amount output table T3 is constituted by, for example, a logic gate, a RAM of a memory, a ROM, or the like.
[0021]
In such a configuration, first, the bit stream is stored in the FIFO (registers R2, R3, R4) in order from the top. The head bit position of the bit stream stored in the FIFO is held in the register R1. When the clock is advanced by one cycle in this state, a 32-bit bit stream is output from the bit stream output from the FIFO by the shifter circuit S1, and the head is searched and stored in the register R5. This is the initial state.
[0022]
In such an initial state, it is determined whether or not the value stored in the register R5 is a start code by referring to the determination circuit C1 with the value of the register R5. The bit stream for m bits is sequentially cut off from the head until it is determined as a start code. The value of the cut-off amount m is the value of the shift amount output table T3 when the value of the register R5 is sequentially compared with the value of the shift amount output table T3 shown in FIG. It is determined whether or not the value of the lower 24 bits of the register R5 matches “00000000_00000000_00000001”. If they match, m = 8. It is determined whether or not the value of the lower 16 bits of the register R5 matches “00000000_00000000”. If they match, m = 16. It is determined whether or not the value of the lower 8 bits of the register R5 matches “00000000”. If there is a match, m = 24. Otherwise, m = 32.
[0023]
In this way, when the truncation amount m is output from the shift amount output table T3, the bit stream supplied from the FIFO (registers R2, R3, R4) to the shifter circuit S1 is shifted by the shifter circuit S1 based on the truncation amount. Is truncated. The truncation process is performed in the same manner as in the prior art. The truncation amount m output from the shift amount output table T3 and the value stored in the register R1 are added by the adder A1, and the FIFO (register R2, R3, R4) are applied to the shifter circuit S1, and the bit stream is shifted by the shifter circuit S1.
[0024]
Such search processing is sequentially performed until a start code is detected from the bit stream. Therefore, in the above embodiment, by providing the shift amount output table T3, it is possible to search for a bit stream by 32 bits at maximum per cycle. As a result, the time until the start code is detected from the bit stream can be shortened compared to the conventional case.
[0025]
FIG. 3 is a diagram showing the configuration of a start code search circuit according to another embodiment of the present invention. In FIG. 3, the feature of this embodiment is that the start code can be applied to a bit stream that is not byte-aligned, and a shift amount output is provided instead of the shift amount output table T3 shown in FIG. A table T4 is provided, and other configurations are the same as those in FIG. In FIG. 3, the same reference numerals as those in FIG. 1 have the same configuration, and description thereof is omitted.
[0026]
The shift amount output table T4 compares the 32-bit bit stream stored in the register R5 with the 32-bit comparison information shown in FIG. 4, and outputs a truncation amount (shift amount) m according to the comparison result. As shown in FIG. 4, the 32-bit comparison information is “00000000_00000000_00000001_XXXXXXXX” to “XXXXXXXX_XXXXXXXX_XXXXXXXX_XXXXXXX0”, and the truncation amount m is m = 0 to 31 as shown in FIG. If no match is found, m = 32.
[0027]
Using such a shift amount output table T4, the shifter circuit S1 performs a shift based on the truncation amount m output from the shift amount output table T4 in exactly the same manner as in the previous embodiment, and the bit stream is searched for bit. Detect start code from stream. Therefore, in such an embodiment, even if the start code is not byte-aligned in the bitstream, the same effect as in the previous embodiment can be obtained.
[0028]
【The invention's effect】
As described above, according to the present invention, the shift amount of the shifter circuit is given according to the comparison result between the shift output of the shifter circuit that shifts the bitstream and the comparison information of the shift amount output table. Since the start code is detected by searching the bitstream, the time for detecting the start code can be shortened as compared with the prior art.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a start code search circuit according to an embodiment of the present invention.
FIG. 2 is a view showing the contents of a shift amount output table T3 shown in FIG.
FIG. 3 is a diagram showing a configuration of a start code search circuit according to another embodiment of the present invention.
FIG. 4 is a diagram showing the contents of a shift amount output table T4 shown in FIG.
FIG. 5 is a diagram showing a configuration of a conventional apparatus for decoding compressed image data.
FIG. 6 is a diagram showing a configuration of a conventional variable length code decoding circuit having a start code search function.
[Explanation of symbols]
R1, R2, R3, R4, R5 Register A1 Adder S1 Shifter circuit C1 Determination circuit T1 Conversion table T2 Code length output table T3, T4 Shift amount output table

Claims (2)

与えられたシフト量にしたがって入力された圧縮データ(ビットストリーム)をシフトし、シフトしたビットストリームからスタートコードと同じビット数の単位ビットストリームを出力するシフタ回路と、
前記シフタ回路から出力された単位ビットストリームがスタートコードであるか否かを判定する判定回路とを具備し、
前記シフタ回路により一連のビットストリームをシフトしながら順次検索して、一連のビットストリームの中からスタートコードを検出するスタートコード検索回路において、
前記シフタ回路から出力された単位ビットストリームを受けて、単位ビットストリームと、スタートコードのビット配列に応じて予め用意された複数の比較情報とを比較し、比較結果に応じて前記シフタ回路のシフト量を与えるシフト量出力テーブルを具備し、
前記シフト量出力テーブルは、比較情報(ビットストリーム)と、該比較情報に対応するシフト量(切り捨て量)との関係が、
Figure 0003737352
であることを特徴とするスタートコード検索回路。
A shifter circuit that shifts the input compressed data (bit stream) according to a given shift amount and outputs a unit bit stream having the same number of bits as the start code from the shifted bit stream;
A determination circuit for determining whether or not the unit bit stream output from the shifter circuit is a start code,
In a start code search circuit for sequentially searching while shifting a series of bit streams by the shifter circuit and detecting a start code from the series of bit streams,
The unit bit stream output from the shifter circuit is received, the unit bitstream is compared with a plurality of comparison information prepared in advance according to the bit arrangement of the start code, and the shifter circuit shifts according to the comparison result. A shift amount output table for giving an amount,
In the shift amount output table, the relationship between the comparison information (bit stream) and the shift amount (truncation amount) corresponding to the comparison information is as follows:
Figure 0003737352
A start code search circuit characterized by the above.
与えられたシフト量にしたがって入力された圧縮データ(ビットストリーム)をシフトし、シフトしたビットストリームからスタートコードと同じビット数の単位ビットストリームを出力するシフタ回路と、
前記シフタ回路から出力された単位ビットストリームがスタートコードであるか否かを判定する判定回路とを具備し、
前記シフタ回路により一連のビットストリームをシフトしながら順次検索して、一連のビットストリームの中からスタートコードを検出するスタートコード検索回路において、
前記シフタ回路から出力された単位ビットストリームを受けて、単位ビットストリームと、スタートコードのビット配列に応じて予め用意された複数の比較情報とを比較し、比較結果に応じて前記シフタ回路のシフト量を与えるシフト量出力テーブルを具備し、
前記シフト量出力テーブルは、比較情報(ビットストリーム)と、該比較情報に対応するシフト量(切り捨て量)との関係が、
Figure 0003737352
であることを特徴とするスタートコード検索回路。
A shifter circuit that shifts the input compressed data (bit stream) according to a given shift amount and outputs a unit bit stream having the same number of bits as the start code from the shifted bit stream;
A determination circuit for determining whether or not the unit bit stream output from the shifter circuit is a start code,
In a start code search circuit for sequentially searching while shifting a series of bit streams by the shifter circuit and detecting a start code from the series of bit streams,
The unit bit stream output from the shifter circuit is received, the unit bitstream is compared with a plurality of comparison information prepared in advance according to the bit arrangement of the start code, and the shifter circuit shifts according to the comparison result. A shift amount output table for giving an amount,
In the shift amount output table, the relationship between the comparison information (bit stream) and the shift amount (truncation amount) corresponding to the comparison information is as follows:
Figure 0003737352
A start code search circuit characterized by the above.
JP2000290289A 2000-09-25 2000-09-25 Start code search circuit Expired - Fee Related JP3737352B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000290289A JP3737352B2 (en) 2000-09-25 2000-09-25 Start code search circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000290289A JP3737352B2 (en) 2000-09-25 2000-09-25 Start code search circuit

Publications (2)

Publication Number Publication Date
JP2002099407A JP2002099407A (en) 2002-04-05
JP3737352B2 true JP3737352B2 (en) 2006-01-18

Family

ID=18773536

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000290289A Expired - Fee Related JP3737352B2 (en) 2000-09-25 2000-09-25 Start code search circuit

Country Status (1)

Country Link
JP (1) JP3737352B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002080566A1 (en) * 2001-03-29 2002-10-10 Matsushita Electric Industrial Co., Ltd. Data processing apparatus, data processing method, data reproduction apparatus, data reproduction method, data transmission apparatus, data transmission method, and data storage medium
CN1618235A (en) 2002-01-22 2005-05-18 微软公司 Methods and systems for start code emulation prevention and data stuffing
JP3807379B2 (en) * 2003-02-21 2006-08-09 ソニー株式会社 Pattern detection circuit
US10271069B2 (en) 2016-08-31 2019-04-23 Microsoft Technology Licensing, Llc Selective use of start code emulation prevention

Also Published As

Publication number Publication date
JP2002099407A (en) 2002-04-05

Similar Documents

Publication Publication Date Title
US6587057B2 (en) High performance memory efficient variable-length coding decoder
US7132963B2 (en) Methods and apparatus for processing variable length coded data
US6842124B2 (en) Variable length decoder
US7119723B1 (en) Decoding variable length codes while using optimal resources
JP4422833B2 (en) Decoder and method for decoding variable length codeword
US7804903B2 (en) Hardware-based CABAC decoder
US8462841B2 (en) System, method and device to encode and decode video data having multiple video data formats
US6043765A (en) Method and apparatus for performing a parallel speculative Huffman decoding using both partial and full decoders
US6285789B1 (en) Variable length code decoder for MPEG
JP3737352B2 (en) Start code search circuit
US7880647B1 (en) Huffman decoding method
US20050174270A1 (en) Programmable variable length decoder including interface of cpu processor
US8228214B2 (en) Variable-length code decoding apparatus and method
US6798365B2 (en) JPEG Huffman table decoder and method thereof based on binary search technique
US6512852B1 (en) Method and apparatus for concatenating bits of odd-length words
US20040218679A1 (en) Method and system for predictive table look-up code length of variable length code
US7702021B2 (en) Decoding of digital video standard material during variable length decoding
JPH06338805A (en) Variable length decoder
JP2003529252A (en) Method and apparatus for concatenating bits of odd length words
JP2001007706A (en) Decoding device for variable length code
KR0122326B1 (en) Bit stream decoder of video
JP2000244752A (en) Decoder
JP2006041659A (en) Variable length decoder
KR19990049273A (en) Variable Length Decoding Device of Digital VR
KR20030080377A (en) Method for managing presentation time stamp in digital broadcasting receiver

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050531

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050607

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050803

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20051018

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051026

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

Free format text: PAYMENT UNTIL: 20081104

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20091104

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101104

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101104

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111104

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121104

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees