JPH0234508B2 - - Google Patents

Info

Publication number
JPH0234508B2
JPH0234508B2 JP57057586A JP5758682A JPH0234508B2 JP H0234508 B2 JPH0234508 B2 JP H0234508B2 JP 57057586 A JP57057586 A JP 57057586A JP 5758682 A JP5758682 A JP 5758682A JP H0234508 B2 JPH0234508 B2 JP H0234508B2
Authority
JP
Japan
Prior art keywords
code
length
bit
codes
special code
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
JP57057586A
Other languages
Japanese (ja)
Other versions
JPS58175366A (en
Inventor
Kiichi Matsuda
Toshihiro Pponma
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP57057586A priority Critical patent/JPS58175366A/en
Publication of JPS58175366A publication Critical patent/JPS58175366A/en
Publication of JPH0234508B2 publication Critical patent/JPH0234508B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】 (1) 発明の技術分野 本発明は、一定速度で受信した可変長符号化信
号列を復号するための復号化回路に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION (1) Technical Field of the Invention The present invention relates to a decoding circuit for decoding a variable length encoded signal sequence received at a constant speed.

(2) 技術の背景 画像信号を符号化して伝送する時に帯域圧縮の
ために差分符号化方式が適用されている。この時
差分に応じてビツト長を変え更に符号化を容易に
するためにパターンも固定的に割当てて可変長の
符号とし、伝送する時は、伝送速度を一定とする
ために固定長の符号とする方式が実施されてい
る。このことを第1図を用いて説明する。a図の
如く、差分が、“+10”の時“0001”、“+5”の
時“001”、“+2”の時“01”、“−2”の時”10
“、“−10”の時“1001”と固定的にパターンを割
当て、伝送する時は例えば8ビツトの固定長とし
て送信する。この固定長に変換する様子をb図に
示す。差分データを“+10”、“+5”、“+2”、
“−2”、“−10”の順に送るとすると、最初は
“+10”を表わす“0001”と“+5”を表す
“001”と“+2”を表わす“01”の内先頭の
“0”を送信バツフアにセツトして送信する。次
は“+2”を表わす“01”の“1”と“−2”を
表わす“10”と“−10”を表わす“1001”を順に
送信バツフアにセツトする。
(2) Background of the technology Differential encoding methods are used to compress bandwidth when encoding and transmitting image signals. The bit length is changed according to this time difference, and a pattern is also fixedly assigned to make encoding easier, creating a variable length code.When transmitting, a fixed length code is used to keep the transmission speed constant. A method to do so is being implemented. This will be explained using FIG. As shown in figure a, when the difference is “+10” it is “0001”, when it is “+5” it is “001”, when it is “+2” it is “01”, when it is “-2” it is “10”.
", "-10" is assigned a fixed pattern of "1001", and when transmitted, it is transmitted as a fixed length of, for example, 8 bits. Figure b shows how the data is converted to this fixed length. The differential data is " +10”, “+5”, “+2”,
If you send "-2" and "-10" in this order, the first "0001" representing "+10", "001" representing "+5", and the first "0" of "01" representing "+2" Set in the send buffer and send. Next, "1" of "01" representing "+2", "10" representing "-2", and "1001" representing "-10" are sequentially set in the transmission buffer.

この様に固定長符号に変換して送信されたデー
タの復号は、パターンと差分とが対応しているの
で、パターンの検出を行なうことにより行なわれ
る。
Since the pattern and the difference correspond to each other, decoding of the data converted into a fixed length code and transmitted is carried out by detecting the pattern.

(3) 従来技術及び問題点 上記方式において、従来用いられている復号化
回路として、第2図a,bに示す構成が提案され
ている。まず、第2図aの場合について、説明す
ると、図中1は入力端子、2はバツフアメモリ、
3は相拡張回路、4はマルチプレクサ、5は可変
長復号化器、6は出力端子、7は復号符号長管理
回路である。
(3) Prior Art and Problems In the above system, the configurations shown in FIGS. 2a and 2b have been proposed as decoding circuits that have been conventionally used. First, to explain the case in Fig. 2a, 1 in the figure is an input terminal, 2 is a buffer memory,
3 is a phase expansion circuit, 4 is a multiplexer, 5 is a variable length decoder, 6 is an output terminal, and 7 is a decoding code length management circuit.

バツフアメモリ2は入力端子1から入力された
定速度の固定符号を定速度のまま順次書き込みK
ビツト(例えば8ビツト)づつ並列に出力する様
にする。相拡張回路3はフリツプフロツプで構成
され、バツフアメモリ2から送られて来る信号を
交互に記憶し、2Kビツト分を並列出力する。マ
ルチプレクサ4は、復号符号長管理回路7からの
指示を受けて、相拡張回路3から送られてくる
2Kビツトの信号の中から次に復号されるべき符
号を先頭とする信号系列をKビツト分の形で並列
に出力する。該マルチプレクサ4は、上記復号符
号長管理回路7からの指示(シフト量)1が与え
られると上記2Kビツトの信号を例えば下方向に
1ビツト分ワイヤード論理によつてシフトしKビ
ツトの信号を並列に出力するようにされる。可変
長符号器5は、マルチプレクサ4より出力された
信号系列を入力して予め約束されている可変長符
号パターンを検出し、復号された符号を出力端子
6に出力し、該出力された符号の符号長を2進n
ビツトで表して、復号符号長管理回路7に送出す
る。例えば出力された符号が5ビツトの符号長を
もつていれば「0101」の形で管理回路7に送出す
る。復号符号長管理回路7はそれ自体の出力値と
可変長復号器5から送られてくる信号とを加算す
る(n+1)ビツト加算器で構成され、その出力
値即ち加算結果は相拡張回路3の中に記憶されて
いる信号の内で現時点までに復号されているビツ
ト数を表している。この。加算結果は(n+1)
ビツトの2進数の形でマルチプレクサ4に送られ
該マルチプレクサ4において制御信号として使用
される。さらに復号符号管理回路7の出力の内n
ビツト目の信号はバツフアメモリ2から読み出し
クロツクとして用いられ、(n+1)ビツト目で
あるNBSは相拡張回路3に対するクロツクとし
て使用される。なお上記においてKビツトは2n
ツトであると考えてよい。
The buffer memory 2 sequentially writes the constant speed fixed code input from the input terminal 1 at a constant speed.
The bits (for example, 8 bits) are output in parallel. The phase expansion circuit 3 is composed of a flip-flop, and alternately stores the signals sent from the buffer memory 2, and outputs 2K bits in parallel. The multiplexer 4 receives instructions from the decoding code length management circuit 7 and receives instructions from the phase expansion circuit 3.
A signal sequence starting from the code to be decoded next from among the 2K bit signals is output in parallel in the form of K bits. When the multiplexer 4 receives an instruction (shift amount) 1 from the decoding code length management circuit 7, it shifts the 2K bit signal downward by 1 bit, for example, by wired logic, and parallelizes the K bit signal. will be output to . The variable length encoder 5 inputs the signal sequence output from the multiplexer 4, detects a predetermined variable length code pattern, outputs the decoded code to the output terminal 6, and outputs the decoded code to the output terminal 6. code length in binary n
It is expressed in bits and sent to the decoding code length management circuit 7. For example, if the output code has a code length of 5 bits, it is sent to the management circuit 7 in the form of "0101". The decoding code length management circuit 7 is composed of an (n+1) bit adder that adds its own output value and the signal sent from the variable length decoder 5, and the output value, that is, the addition result is sent to the phase expansion circuit 3. It represents the number of bits that have been decoded up to this point in the signal stored in the memory. this. The addition result is (n+1)
It is sent in the form of a binary number of bits to the multiplexer 4, where it is used as a control signal. Furthermore, among the outputs of the decoding code management circuit 7, n
The bit-th signal is used as a read clock from the buffer memory 2, and the (n+1)th bit, NBS, is used as a clock for the phase expansion circuit 3. Note that in the above, K bits can be considered to be 2 n bits.

説明を判り易くするため、例を挙げて説明す
る。今仮にバツフアメモリ2に対して符号長
「2」、「3」、「5」、「4」、……の如き可変長符

が順に格納され、フアーストイン・フアーストア
ウト形式で出力端子6から送出されてゆくものと
し、n=4、K=24=16とする。
In order to make the explanation easier to understand, an example will be given. Suppose that variable length codes such as code lengths ``2'', ``3'', ``5'', ``4'', etc. are sequentially stored in the buffer memory 2 and sent out from the output terminal 6 in a first-in, first-out format. n = 4, K = 2 4 = 16.

(1) この場合、上記符号長「2」、「3」、「5」、
「4」と「6」の最初の2ビツト分との16ビツ
ト分が図示上段のフリツプ・フロツプにセツト
され、符号長「6」の残る4ビツト、「1」、
「4」、「7」の16ビツト分が図示上段のフリツ
プ・フロツプにセツトされ、マルチプレクサ4
に供給される。
(1) In this case, the above code lengths are “2”, “3”, “5”,
The 16 bits (4 and the first 2 bits of 6) are set in the flip-flop at the top of the figure, and the remaining 4 bits of the code length 6, 1,
The 16 bits of "4" and "7" are set in the flip-flop at the top of the diagram, and multiplexer 4 is set.
supplied to

(2) この場合復号符号長管理回路7の(n−1)
ビツト加算器の加算値は「00000」であり、こ
のためマルチプレクサ4は0シフト即ち入力信
号をシフトすることなく上記最初の符号長
「2」の可変長符号を先頭とする16ビツト分を
可変長復号器5に供給する。
(2) In this case, (n-1) of the decoding code length management circuit 7
The added value of the bit adder is "00000", so the multiplexer 4 shifts the input signal by 0, that is, without shifting the input signal, converts the 16 bits starting from the variable length code of the first code length "2" into a variable length code. The signal is supplied to the decoder 5.

(3) この状態で可変長復号器5は先ず符号長
「2」の符号を復号して出力端子6に出力する。
このとき同時に可変長復号器5は(n+1)ビ
ツト加算器に対して2進数「0010」を供給す
る。
(3) In this state, the variable length decoder 5 first decodes the code with code length “2” and outputs it to the output terminal 6.
At the same time, the variable length decoder 5 supplies the binary number "0010" to the (n+1) bit adder.

(4) これにより(n+1)ビツト加算器により加
算結果は「00010」となり、その旨はマルチプ
レクサ4に通知される。これによりマルチプレ
クサ4は入力信号を2ビツト分シフトした形で
上記復号済みの符号長「2」を除去して符号長
「3」の可変長符号を先頭とする16ビツト分を
可変長復号器5に供給する。
(4) As a result, the addition result by the (n+1) bit adder becomes "00010", and the multiplexer 4 is notified of this fact. As a result, the multiplexer 4 shifts the input signal by 2 bits, removes the decoded code length "2", and transfers the 16 bits starting with the variable length code of code length "3" to the variable length decoder 5. supply to.

(5) 可変長復号器5は、これにより符号長「3」
の符号を復号して出力端子6に出力し、同時に
(n+1)ビツト加算器に対して2進数「0010」
を供給する。
(5) The variable length decoder 5 now has a code length of “3”.
The code is decoded and output to the output terminal 6, and at the same time, the binary number "0010" is sent to the (n+1) bit adder.
supply.

(6) これにより(n+1)ビツト加算器による加
算結果は「2」+「3」即ち「00101」となり、
その旨はマルチプレクサ4に通知される。これ
によりマルチプレクサ4は上記と同様に入力信
号を5ビツト分シフトした形で符号済の上記符
号長「2」と「3」とを除去して符号長「5」
の可変長符号を先頭とする16ビツト分を可変長
復号器5に供給する。
(6) As a result, the addition result by the (n+1) bit adder is "2" + "3", that is, "00101",
The multiplexer 4 is notified of this fact. As a result, the multiplexer 4 shifts the input signal by 5 bits and removes the code lengths "2" and "3" which have already been encoded, and generates the code length "5" in the same manner as described above.
The 16 bits starting with the variable length code are supplied to the variable length decoder 5.

(7) 可変長復号器5は、これにより符号長「5」
の符号を復号して出力端子6に出力し、同時に
(n+1)ビツト加算器に対して2進数「0101」
を供給する。
(7) The variable length decoder 5 now has a code length of “5”.
The code is decoded and output to the output terminal 6, and at the same time, the binary number "0101" is sent to the (n+1) bit adder.
supply.

(8) これにより(n+1)ビツト加算器による加
算結果は「5」+「5」即ち「01010」となり、
その旨はマルチプレクサ4に通知される。
(8) As a result, the addition result by the (n+1) bit adder is "5" + "5", that is, "01010",
The multiplexer 4 is notified of this fact.

(9) このとき(n+1)ビツト加算器の加算結果
においてnビツト目即ちこの場合4ビツト目が
論理「1」に変化するので、この条件によりバ
ツフアメモリ2にクロツクが供給されて読み出
しが行われる。このとき(n+1)ビツト加算
器の加算結果において(n+1)ビツト目即ち
MSBは論理「0」にあたるので、図示下段の
フリツプ・フロツプに上記仮定した符号長
「3」を先頭にする16ビツト分がセツトされる。
(9) At this time, in the addition result of the (n+1) bit adder, the n-th bit, that is, the fourth bit in this case, changes to logic "1", so a clock is supplied to the buffer memory 2 under this condition and reading is performed. At this time, in the addition result of the (n+1) bit adder, the (n+1)th bit, that is,
Since the MSB corresponds to logic ``0'', 16 bits starting from the assumed code length ``3'' are set in the flip-flop at the bottom of the diagram.

(10) 上記(8)の処理においてマルチプレクサ4には
加算結果「01010」が通知され、マルチプレク
サ4は上記と同様に上記符号長「4」の符号を
先頭とする16ビツト分を可変長復号器5に供給
する。
(10) In the process of (8) above, the multiplexer 4 is notified of the addition result "01010", and the multiplexer 4 converts the 16 bits starting from the code with the code length "4" to the variable length decoder in the same way as above. Supply to 5.

(11) 可変長復号器5は、これにより符号長「4」
の符号を復号して出力端子6に出力し、同時に
(n+1)ビツト加算器に対して2進数「0100」
を供給する。
(11) The variable length decoder 5 now has a code length of “4”.
The code is decoded and output to the output terminal 6, and at the same time, the binary number "0100" is sent to the (n+1) bit adder.
supply.

以上の様にして復号を行う。 Decryption is performed as described above.

ところが、この回路では、伝送路でビツト誤り
が生じると、例えば符号長「2」の可変長符号
が、符号長「2」では復号できない符号長「3」、
「4」の可変長符号として復号されることが生じ
た。ところが、一度はたまたま復号化されても、
次の符号からはパターンが一致しないので、復号
されなくなつてしまう欠点が生じる。
However, in this circuit, if a bit error occurs in the transmission path, for example, a variable length code of code length "2" becomes code length "3", which cannot be decoded with code length "2", or
It happened that it was decoded as a variable length code of "4". However, even if it happens to be decrypted once,
Since the patterns do not match from the next code onwards, there is a drawback that the code cannot be decoded.

このために、第2図bに示す如き復号化回路も
提案されている。
For this purpose, a decoding circuit as shown in FIG. 2b has also been proposed.

この場合の動作について説明する。 The operation in this case will be explained.

受信信号はバツフアメモリ(BM)20に一旦
格納され、ヘツダ(HD)検出部21にフレーム
のヘツダ(ユニークワード)が検出されると送信
ワード数カウンタ23に送信ワード数が格納され
る。一方、符号解読部22では受信信号(デー
タ)中、可変長符号の解読に入り、受信ワード単
位で受信ワード数カウンタ24に更新信号を送り
カウントを開始する。そして送信ワード数Aと受
信ワード数Bとが一致するまで受信ワード数カウ
ンタ24は更新され続ける。このとき受信データ
は可変長復号器にも送られる。そこで1フレーム
が受信完了、即ち、次のフレームのヘツダが検出
されたときに、送信ワード数カウンタ23の値A
と受信ワード数カウンタ24の計数値Bの一致が
見られないときには、そのAとBとの大小関係に
より次の処理を行う。BがAより小さいとき、擬
似情報送出回路28は符号解読部22へ、指示信
号を出し、未処理ワード数分の擬似信号を可変長
復号器へ送出する。またBがAより大きいときは
早読み回路29により次の1フレーム分を早読み
するように指示信号を符号解読部22へ出す。こ
れらの信号は前者はリセツト信号相当となり、後
者はデータ読み込みクロツク周期の変更等により
行われる。
The received signal is temporarily stored in a buffer memory (BM) 20, and when a header (unique word) of a frame is detected by a header (HD) detection section 21, the number of transmitted words is stored in a transmitted word number counter 23. On the other hand, the code decoder 22 starts decoding the variable length code in the received signal (data), and sends an update signal to the received word number counter 24 in units of received words to start counting. The received word number counter 24 continues to be updated until the number of transmitted words A and the number of received words B match. At this time, the received data is also sent to a variable length decoder. Then, when one frame is completely received, that is, when the header of the next frame is detected, the value A of the transmission word counter 23 is
When the count value B of the received word number counter 24 does not match, the next process is performed depending on the magnitude relationship between A and B. When B is smaller than A, the pseudo information sending circuit 28 outputs an instruction signal to the code decoder 22, and sends pseudo signals corresponding to the number of unprocessed words to the variable length decoder. When B is larger than A, the fast reading circuit 29 sends an instruction signal to the code decoder 22 to read the next frame quickly. The former of these signals corresponds to a reset signal, and the latter is performed by changing the data reading clock cycle, etc.

すなわち第2図に示されたバツフアメモリ
(BM)20に受信データを一旦格納し、受信フ
レームのヘツダ部HDの検出を行うことによつ
て、公知のフレーム同期方式によつて送信側との
フレーム同期が取られる。そして、固定データ部
の情報に基づいてフレーム内の可変長データ部の
復号化が行われる。この場合、受信側において、
データ誤りによりワード数が増減すると、送信ワ
ード数WDによつて指定される送信側ワード数と
受信ワード数とが一致しなくなり、送信部と受信
部とにおけるヘツダ部HDの位置の相対的関係が
ずれて、送信側と受信側とは同期外れの状態とな
る。
That is, by temporarily storing the received data in the buffer memory (BM) 20 shown in FIG. 2 and detecting the header part HD of the received frame, frame synchronization with the transmitting side is achieved using a known frame synchronization method. is taken. Then, the variable length data part within the frame is decoded based on the information in the fixed data part. In this case, on the receiving side,
If the number of words increases or decreases due to a data error, the number of words on the transmitting side specified by the number of transmitted words WD will no longer match the number of received words, and the relative position of the header HD in the transmitter and receiver will change. As a result, the sending and receiving sides become out of synchronization.

このような不連続を吸収するため前術のように
送信ワード数カウンタ23の計数値Aとじゆうん
ワード数カウンタ24の計数値Bとの大小関係を
みて、未処理ワード数分の擬似情報を挿入する
か、または過剰となつたワード数分を次のフレー
ムで早読みすることによつて、不連続状態を解消
してさらに次のヘツダ部HDで送信側との同期を
取り直すものであり、これによつて再同期が行わ
れる。
In order to absorb such discontinuity, as in the previous procedure, by looking at the magnitude relationship between the count value A of the transmission word number counter 23 and the count value B of the transmission word number counter 24, pseudo information for the number of unprocessed words is generated. By inserting or quickly reading the excess number of words in the next frame, the discontinuity is resolved and synchronization with the transmitting side is reestablished in the next header HD. This will cause resynchronization.

c図はb図の再同期回路における動作を説明す
る図である。同図においてイは送信情報を示し、
ロ,ハは受信側の動作を示している。またこれら
各図において↑印は各フレームのヘツダ部を示し
ている。
Figure c is a diagram for explaining the operation of the resynchronization circuit in figure b. In the figure, A indicates transmission information,
B and C show the operations on the receiving side. In each of these figures, the ↑ mark indicates the header portion of each frame.

c図イにおいて、A1,A2,A3,……は送信さ
れた各フレームのワード数を示している。ロは符
号誤りを生じて受信側で処理されたたワード数が
少なくA1>B1であつた場合を示している。この
場合は次のフレームにおいてまず(A1−B1)ワ
ードの擬似情報が処理された後、送信側ワード数
A2と等しいワード数B2の処理が受信側で行われ
て、そのフレームの終了時以後、送信側と受信側
の同期がとれる。
In Figure C, A 1 , A 2 , A 3 , . . . indicate the number of words in each transmitted frame. B shows the case where a code error occurs and the number of words processed on the receiving side is small and A 1 >B 1 . In this case, in the next frame, (A 1 − B 1 ) words of pseudo information are first processed, and then the number of words on the transmitter side is
Processing of the number of words B 2 equal to A 2 is performed on the receiving side, and after the end of the frame, the transmitting side and the receiving side are synchronized.

ハは符号誤りを生じて受信側で処理されたワー
ド数が多く、A1<B1であつた場合を示している。
この場合は受信側におけるB1ワードの処理終了
時、(B1<A1)を未処理ワード数信号源25に読
込んだのち、送信されたA2ワード分の情報の早
読みを行う。ハにおいてB2′はこのようにして早
読みされたワード数を示している。しかるのち
A2−{(B1−A1)+B2′}だけ擬似情報を送出し、
次に送信された送信側のA3に等しくB3の処理を
行うことによつて、そのフレームの終了時以後、
送信側と受信側との同期がとれる。
C shows a case where the number of words processed on the receiving side due to code errors is large, and A 1 <B 1 .
In this case, when the processing of B 1 words on the receiving side is completed, (B 1 <A 1 ) is read into the unprocessed word number signal source 25, and then the information for the transmitted A 2 words is quickly read. In C, B 2 ′ indicates the number of words read quickly in this way. Afterwards
Send pseudo information by A 2 − {(B 1 − A 1 ) + B 2 ′},
By processing B 3 equal to A 3 of the next transmitted sender, after the end of that frame,
The sender and receiver can be synchronized.

ところが、この回路では、特殊符号を送出して
符号の切り拾てを行なうことが必要であるので、
制御が複雑になる問題があつた。
However, with this circuit, it is necessary to send out a special code and pick up the code.
There was a problem that the control became complicated.

(4) 発明の目的 本発明は、上記の点に鑑みてなされたもので、
ビツト誤まりが生じてもその波及をできるだけ小
さくできる復号化回路において、特殊符号検出時
に於ける制御を簡易化した復号化回路を提供する
ことを目的とするものである。
(4) Purpose of the invention The present invention has been made in view of the above points.
It is an object of the present invention to provide a decoding circuit which can minimize the influence of bit errors even if they occur, and which simplifies control when detecting special codes.

(5) 発明の構成 上記目的は、可変長符号列に一定周期で特殊符
号を挿入した可変長符号化信号列を一定速度で受
信バツフアで受信し、該受信バツフアから予め定
められたビツト長単位で読み出して保持回路で保
持し、加算回路出力で示されるビツト位置を先頭
ビツトとして読み出し、ビツトパターンに応じて
復号器により復号するとともに各ビツトパターン
に対応するビツト数を該加算回路に入力して、前
回の読出し位置に加算し、該特殊符号を検出した
時は、該加算回路出力と該特殊符号の先頭ビツト
の該予め定められたビツト長内における位置との
比較を行い、加算回路出力ビツト位置<特殊符号
出力ビツト位置のとき、従来通り、加算回路出力
を出力とする符号解読を続行し加算回路出力ビツ
ト位置≧特殊符号出力ビツト位置のとき、制御回
路をリセツトし、特殊符号に付加されている各ビ
ツト情報及び送出符号数等を解読するための制御
を行い、その後で実際に伝送された符号数n′と特
殊符号間に含まれるべき符号数nとの比較を行
い、n′がnより小さい時、nとn′が等しくなるま
での該保持回路からの読み出しを停止し、n′が大
きい時は、前記予め定められたビツト長単位で読
取りを次の特殊符号を検出するまで行い、この時
点で前記予め定められたビツト長単位で読取つた
符号数n″とn′−nの値を加算した値とnとの差の
符号数だけ読取りを停止する様にしたことを特徴
とする復号化回路によつて達成される。
(5) Structure of the Invention The above object is to receive a variable-length coded signal sequence in which a special code is inserted at a constant period into a variable-length code sequence at a constant speed, and to receive a predetermined bit length unit from the reception buffer. The bit position indicated by the adder circuit output is read out as the first bit, and the decoder decodes it according to the bit pattern, and the number of bits corresponding to each bit pattern is input to the adder circuit. , and when the special code is detected, the adder circuit output is compared with the position of the first bit of the special code within the predetermined bit length, and the adder circuit output bit is added to the previous read position. When the position < special code output bit position, the code decoding using the adder circuit output as the output continues as before, and when the adder circuit output bit position ≧ the special code output bit position, the control circuit is reset and the code added to the special code is decoded. Control is performed to decode each bit information and the number of transmitted codes, etc., and then the number n' of actually transmitted codes is compared with the number n of codes to be included between special codes, and n' is When it is smaller than n, reading from the holding circuit is stopped until n and n' become equal; when n' is larger, reading is continued in units of the predetermined bit length until the next special code is detected. and at this point, the reading is stopped for the number of codes that is the difference between n and the sum of the number of codes n'' read in the predetermined bit length unit and the value of n'-n. This is achieved by a decoding circuit.

(6) 発明の実施例 本発明では、送信側で一定周期毎に、特殊符号
並びに特殊符号間の符号数を示す符号を挿入し、
この特殊符号を検出する毎に、保持回路からの読
出し位置を補正する。
(6) Embodiments of the invention In the present invention, a special code and a code indicating the number of codes between the special codes are inserted at fixed intervals on the transmitting side,
Every time this special code is detected, the reading position from the holding circuit is corrected.

以下第3図に従つて説明する。 This will be explained below with reference to FIG.

図中8は制御回路、9は特殊符号検出回路、7
a,7b,10はフリツプフロツプ、7cは加算
器、SELはセレクタ、CMPは比較器、ORはオア
ゲート、AND1,AND2はアンドゲートであ
り、第2と同一部材には同一符号を付与してい
る。
In the figure, 8 is a control circuit, 9 is a special code detection circuit, and 7
a, 7b, and 10 are flip-flops, 7c is an adder, SEL is a selector, CMP is a comparator, OR is an OR gate, AND1 and AND2 are AND gates, and the same reference numerals are given to the same components as the second one.

動作を説明すると、入力端子1からの可変長符
号列をバツフアメモリ2にストアし、フリツプフ
ロツプ3に出力するとともに特殊符号検出回路9
に入力する。特殊符号は例えば12ビツトで構成
し、そのパターンとしては、「100000000001」と
する。特殊符号を検出していない時は、セレクタ
SELは加算器7cの出力をフリツプフロツプ7a
にセツトし、加算器7cにフイードバツクすると
ともにマルチプレクサ4に入力する。
To explain the operation, a variable-length code string from input terminal 1 is stored in buffer memory 2, output to flip-flop 3, and special code detection circuit 9
Enter. The special code is composed of, for example, 12 bits, and its pattern is "100000000001". If no special code is detected, selector
SEL connects the output of the adder 7c to the flip-flop 7a.
, and feeds it back to the adder 7c and inputs it to the multiplexer 4.

一方特殊符号検出回路9で特殊符号を検出する
と、検出したことを示すビツトとKビツト内での
特殊符号の先頭ビツトの位置をフリツプフロツプ
10にセツトする。そして比較器CMPで加算器
出力とフリツプフロツプにセツトした特殊符号の
先頭ビツト位置とを比較する。加算器出力が小さ
い時は比較器CMP出力により、セレクタSELで
は、加算器出力をセレクトしフリツプフロツプ7
aにセツトする。一方等しくなつた時又は加算器
出力が大きくなつた時は比較器CMPの出力によ
りフリツプフロツプ10の出力をセレクトし、フ
リツプフロツプ7aにセツトし、マルチプレクサ
4から特殊符号を読み出し可変長復号器5にセツ
トする。更に比較器出力はフリツプフロツプ7b
にセツトされる。フリツプフロツプ7bの出力は
制御回路8並びにオアゲートOR、アンドゲート
AND1を介して、フリツプフロツプ3,10に
入力する。制御回路8はフリツプフロツプ7bの
出力が入力されると、第4図に示す如き処理を行
なう。
On the other hand, when the special code detection circuit 9 detects a special code, a bit indicating the detection and the position of the first bit of the special code within the K bits are set in the flip-flop 10. Then, the comparator CMP compares the adder output with the first bit position of the special code set in the flip-flop. When the adder output is small, the selector SEL selects the adder output using the comparator CMP output, and flip-flop 7
Set to a. On the other hand, when they are equal or when the adder output becomes large, the output of the flip-flop 10 is selected by the output of the comparator CMP, set in the flip-flop 7a, and the special code is read out from the multiplexer 4 and set in the variable length decoder 5. . Furthermore, the comparator output is sent to flip-flop 7b.
is set to . The output of the flip-flop 7b is connected to the control circuit 8, an OR gate, and an AND gate.
It is input to flip-flops 3 and 10 via AND1. When the control circuit 8 receives the output of the flip-flop 7b, it performs processing as shown in FIG.

すなわちa図の熱く、n1符号毎に特殊符号uw
を挿入して、送信すると仮定する。そして、前術
の如く、マルチプレクサ4から特殊符号uwを読
み出した場合、前回読み出した特殊符号からの符
号数を検定し、n1であつた場合には可変長復号器
5内の符号長検出回路から特殊符号のビツト数を
強制的に出力する様にする。
In other words, a special code uw for every n 1 code in the figure a.
Assume that you insert and send. Then, when the special code uw is read from the multiplexer 4 as in the previous procedure, the number of codes from the previously read special code is tested, and if n 1 , the code length detection circuit in the variable length decoder 5 Forcibly output the number of bits of the special code.

これにより加算器出力は特殊符号の次の符号の
先頭ビツトのアドレスを示す様になる。
This causes the adder output to indicate the address of the first bit of the code following the special code.

一方b図の如く送出した符号数より受信した符
号数が少ない場合は、符号数の差(n1−n1′)だ
けアンドゲートAND2を閉じて、クロツクを禁
止し、加算器の更新を禁止する。そして可変長復
号器5への制御信号でn1−n1′個の符号を発生し
た時点で、符号長検出回路から特殊符号を強制的
に出力する。更にc図の如く、受信した符号数
n1″がn1より大きい場合は、可変長復号器から最
大固定符号長、図の例ではビツト数Kを連続し
て、次の特殊符号を検出するまで出力し、早読み
を行う。そして次の特殊符号を検出した時点で、
n1−(n1″−n1+nx)符号だけ読取りを禁止する。
On the other hand, if the number of received codes is less than the number of codes sent as shown in figure b, the AND gate AND2 is closed by the difference in the number of codes (n 1 - n 1 '), the clock is disabled, and the update of the adder is prohibited. do. Then, when n 1 -n 1 ' codes are generated by the control signal to the variable length decoder 5, a special code is forcibly output from the code length detection circuit. Furthermore, as shown in figure c, the number of received codes
If n 1 '' is larger than n 1 , the variable length decoder continuously outputs the maximum fixed code length, in the example shown in the figure, the number of bits K, until the next special code is detected, and fast reading is performed. When the next special code is detected,
Only n 1 − (n 1 ″− n 1 + n x ) codes are prohibited from being read.

しかる後特殊符号のビツト数を出力させる。 After that, the number of bits of the special code is output.

(7) 発明の効果 以上の如く本発明によれば、伝送路誤り等によ
り送信符号数と受信符号数に不一致が生じたと
き、解読開始ビツト位置を示す回路に特殊符号の
ビツト位置を入力することで誤りからの復帰が容
易になる。
(7) Effects of the Invention As described above, according to the present invention, when a mismatch occurs between the number of transmitted codes and the number of received codes due to a transmission path error, etc., the bit position of the special code is input to the circuit that indicates the decoding start bit position. This makes it easier to recover from mistakes.

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

第1図は、可変長符号は固定長符号に変換する
過程を示す図、第2図a,b,cは従来の復号回
路及びその動作を示す図、第3図は本発明による
復号回路を示す図、第4図は本発明による復合回
路の動作を示す図である。 図中2はバツフアメモリ、3,7a,7b,1
0はフリツプフロツプ、4はマルチプレクサ、5
は可変長復号器、7は復号符号長管理回路、8は
制御回路、9は特殊符号検出回路である。
Fig. 1 is a diagram showing the process of converting a variable length code into a fixed length code, Fig. 2 a, b, and c are diagrams showing a conventional decoding circuit and its operation, and Fig. 3 is a diagram showing a decoding circuit according to the present invention. FIG. 4 is a diagram showing the operation of the decoding circuit according to the present invention. In the figure, 2 is buffer memory, 3, 7a, 7b, 1
0 is a flip-flop, 4 is a multiplexer, 5
7 is a variable length decoder, 7 is a decoding code length management circuit, 8 is a control circuit, and 9 is a special code detection circuit.

Claims (1)

【特許請求の範囲】 1 可変長符号列に一定周期で特殊符号を挿入し
た可変長符号化信号列を受信バツフアに入力し、 該受信バツフアから予め定められたビツト長k
単位で読み出して保持回路で該予め定められたビ
ツト長kを連続して2k分保持し、 マルチプレクサでは加算回路出力で示されるビ
ツト位置を先頭ビツトとして該予め定められたビ
ツト長単位で読み出し、 ビツトパターンに応じて復号器により復号する
とともに各ビツトパターンに対応するビツト数を
該加算回路に入力して、前回のマルチプレクサか
らの読出し位置に加算することで可変長符号化信
号列を順次復号し、 該特殊符号を検出して特殊符号の先頭ビツトの
該予め定められたビツト長内における位置を保持
し、 比較器により、該加算回路出力と該特殊符号の
先頭ビツトの該予め定められたビツト長内におけ
る位置との比較を行ない、 一致した時又は該加算器出力が大きくなつた時
に、 該加算器に特殊符号の先頭ビツトの該予め定め
られたビツト長内における位置を設定し、 前に特殊符号を検出してから復号された符号数
n′と特殊符号間に含まれるべき符号数nとの比較
を行ない、 n′がnより小さい時、 nとn′が等しくなるまで、該バツフアメモリか
らの読出しと、マルチプレクサからの読出し位置
の変更を停止し、 n′がnより大きい時、 可変長復号化器で復号化信号列を予め定められ
たビツト長単位で特殊符号を検出するまで読出
し、 この後、前記予め定められたビツト長単位で読
取つた符号数をnxとすると、2n−(n′+nx)で示
される符号数だけ符号の該バツフアメモリからの
読出しと、マルチプレクサからの読出し位置の変
更を停止する ようにしたことを特徴とする復号化回路。
[Claims] 1. Inputting a variable-length encoded signal string in which a special code is inserted at a constant period into a variable-length code string into a receiving buffer, and extracting a predetermined bit length k from the receiving buffer.
The data is read out in units of the predetermined bit length, and the holding circuit holds the predetermined bit length k continuously for 2k, and the multiplexer reads the data in units of the predetermined bit length with the bit position indicated by the output of the adder circuit as the first bit. The variable length encoded signal string is decoded by a decoder according to the pattern, and the number of bits corresponding to each bit pattern is input to the adder circuit and added to the position read from the previous multiplexer, thereby sequentially decoding the variable length encoded signal string. Detects the special code and holds the position of the first bit of the special code within the predetermined bit length, and uses the comparator to compare the output of the adder circuit with the predetermined bit length of the first bit of the special code. When they match or when the output of the adder becomes large, set the position of the first bit of the special code in the predetermined bit length in the adder, and set the special code before the special code. Number of codes decoded after detecting the code
Compare n' with the number n of codes that should be included between special codes, and when n' is smaller than n, read from the buffer memory and change the read position from the multiplexer until n and n' become equal. and when n' is larger than n, the variable length decoder reads the decoded signal sequence in a predetermined bit length unit until a special code is detected, and then reads the decoded signal string in the predetermined bit length unit. The reading of codes from the buffer memory and the change of the reading position from the multiplexer are stopped by the number of codes represented by 2n - (n′+n x ), where n x is the number of codes read in decoding circuit.
JP57057586A 1982-04-07 1982-04-07 Decoding circuit Granted JPS58175366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57057586A JPS58175366A (en) 1982-04-07 1982-04-07 Decoding circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57057586A JPS58175366A (en) 1982-04-07 1982-04-07 Decoding circuit

Publications (2)

Publication Number Publication Date
JPS58175366A JPS58175366A (en) 1983-10-14
JPH0234508B2 true JPH0234508B2 (en) 1990-08-03

Family

ID=13059945

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57057586A Granted JPS58175366A (en) 1982-04-07 1982-04-07 Decoding circuit

Country Status (1)

Country Link
JP (1) JPS58175366A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04167624A (en) * 1990-03-22 1992-06-15 Nippon Columbia Co Ltd Code conversion method

Also Published As

Publication number Publication date
JPS58175366A (en) 1983-10-14

Similar Documents

Publication Publication Date Title
US4506372A (en) Method and apparatus for recognizing in a receiver the start of a telegram signal consisting of a bit impulse sequence
US5692021A (en) Encoding digital data
JP3249405B2 (en) Error correction circuit and error correction method
JP3433426B2 (en) Method and apparatus for decoding Manchester encoded data
US5734341A (en) Encoding digital data
US7102553B2 (en) Signal transmission method and signal transmission device
JPS5854695B2 (en) Signal control method
US5805087A (en) Encoding scheme
JPH0234508B2 (en)
US4964142A (en) Receiver synchronization in encoder/decoder
JP2786342B2 (en) Viterbi decoder
JP2947955B2 (en) Modem device
JPS58173933A (en) Transmission system of code signal
US7292667B1 (en) Method and system for transmitting synchronization information with data
JPH038140B2 (en)
US5963152A (en) Resolving block method for synchronization correction in run-length limited codes
JPH07121067B2 (en) Run length decoding device
JPS6132867B2 (en)
JP2762528B2 (en) Transmission line encoding / decoding method
JPH0123972B2 (en)
JPH1198200A (en) Start-stop synchronization type serial data transmission and reception method, transmitter, receiver and transmitter-receiver
JPH0683184B2 (en) Sequential decoding device
KR880001024B1 (en) Data transmission system
JPS63197151A (en) Serial data transfer system
JP3142911B2 (en) Processing method of encoding / decoding device