KR20040012403A - Decoding apparatus for variable length code and method thereof - Google Patents

Decoding apparatus for variable length code and method thereof Download PDF

Info

Publication number
KR20040012403A
KR20040012403A KR1020020045975A KR20020045975A KR20040012403A KR 20040012403 A KR20040012403 A KR 20040012403A KR 1020020045975 A KR1020020045975 A KR 1020020045975A KR 20020045975 A KR20020045975 A KR 20020045975A KR 20040012403 A KR20040012403 A KR 20040012403A
Authority
KR
South Korea
Prior art keywords
loc
node
bits
length code
variable length
Prior art date
Application number
KR1020020045975A
Other languages
Korean (ko)
Other versions
KR100486251B1 (en
Inventor
박태환
김태선
Original Assignee
삼성전자주식회사
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 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR10-2002-0045975A priority Critical patent/KR100486251B1/en
Priority to TW092120370A priority patent/TWI223501B/en
Priority to US10/632,010 priority patent/US6809665B2/en
Priority to JP2003285402A priority patent/JP4098187B2/en
Priority to CNB031602657A priority patent/CN1256848C/en
Publication of KR20040012403A publication Critical patent/KR20040012403A/en
Application granted granted Critical
Publication of KR100486251B1 publication Critical patent/KR100486251B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
    • H03M7/425Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory for the decoding process only

Abstract

PURPOSE: An apparatus and a method for decoding a variable length code are provided to realize fast decoding by dividing a data bit stream by 3 bits, and reduce the size of a target table to be decoded, thereby reducing power consumption. CONSTITUTION: A pre-decoder(107) receives a data bit stream, and generates a first selection signal or a second selection signal selecting one of first to Mth look-up table address registers(140). A selector(150) selects one of outputs of the first to Mth look-up table address registers according to the first selection signal or the second selection signal. A memory control unit(153) generates a third selection signal selecting a terminal value to obtain a predetermined symbol address, and a fourth selection signal selecting a predetermined fixed length code. A memory(165) stores an LOC table value, the terminal value, and the fixed length code, and outputs the LOC table value, the terminal value in response to the third selection signal, and outputs the fixed length code in response to the fourth selection signal. A shifter(130) shifts the data bit stream as many as certain bits in response to the first selection signal or the second selection signal, and continuous node signals.

Description

가변 길이 코드 복호화 장치 및 방법{Decoding apparatus for variable length code and method thereof}Variable length code decoding apparatus and method

본 발명은 복호화 장치에 관한 것으로서, 특히 가변 길이 부호화된 데이터를 복호화 하는 가변 길이 코드 복호화 장치에 관한 것이다.The present invention relates to a decoding apparatus, and more particularly, to a variable length code decoding apparatus for decoding variable length coded data.

동화상 전문가 그룹(MPEG: Moving Picture Expert Group 이하 MPEG)2의 비디오 규격의 국제 표준안은 1994년 4월에 발표된 동화상 압축 및 복원에 관한 규격으로서, 여러 관계자들이 규격의 실제적 구현을 위해서 노력하고 있다.The International Standard for the Video Specification of the Moving Picture Expert Group (MPEG) 2 is a standard for moving picture compression and decompression, published in April 1994, and several parties are working to make it a reality.

디지탈 영상신호의 압축은 디지탈 영상 데이타의 전송 및 디지탈 기억 장치 등의 여러 응용분야에서 그 수요가 증가되고 있다.Digital video signal compression is increasing in many applications such as digital image data transmission and digital storage devices.

영상 압축 알고리즘들은 일반적으로 마지막에 가변 길이 부호화 장치(Variable Length Encoder)를 사용하여 영상 데이터의 비손실 압축을 실시한다.Image compression algorithms generally perform lossless compression of image data using a variable length encoder.

가변 길이 부호화 장치는 많이 사용되는 데이터의 심볼에 대해서는 그 심볼을 표현하기 위하여 짧은 비트를 할당하고, 상대적으로 적게 사용되는 데이터의 심볼에 대해서는 긴 비트들 할당한다. 따라서, 가변 길이 부호화 장치는 동일한 길이의 데이터 비트 스트림을 부호화 할 경우, 고정 길이 부호화 장치보다 데이터 비트 스트림의 길이가 짧아진다.The variable length encoding apparatus allocates short bits for a symbol of data that is used a lot, and long bits for a symbol of data that is used relatively little. Therefore, when the variable length encoding apparatus encodes a data bit stream having the same length, the length of the data bit stream is shorter than that of the fixed length encoding apparatus.

가변 길이 복호화 장치(Variable Length Decoder)는 입력되는 가변 길이 부호화된 데이터 비트 스트림으로부터 하나의 심볼에 대응하는 가변 길이 코드를 분리해 낸다. 분리된 가변 길이 코드로부터 심볼 테이블을 이용하여 고정 길이 코드가 얻어질 수 있다.A variable length decoder separates a variable length code corresponding to one symbol from an input variable length coded data bit stream. Fixed length codes can be obtained using a symbol table from separate variable length codes.

이 경우, 만약 가변 길이 부호화 장치에서 사용하는 가변 길이 부호화 테이블이 사용자가 설정 할 수 있어야 한다면, 가변 길이 복호화 장치는 부호화 장치에서 쓰여진 테이블을 바탕으로, 입력되는 데이터 비트 스트림에서 고정 길이의 비트를 읽어보면서 가변 길이 코드를 분리해 낸다.In this case, if the variable length encoding table used in the variable length encoding apparatus should be set by the user, the variable length decoding apparatus reads a fixed length bit from the input data bit stream based on the table written in the encoding apparatus. As you look, you separate out the variable length code.

가장 기본적인 방법은 입력되는 데이터 비트 스트림을 1 비트씩 분리하면서 트리 서치 알고리즘(Tree search algorithm)을 이용하는 것이다. MPEG의 경우 코드의 최대 길이가 16 비트이므로, 최대 16 번의 트리 서치가 수행되어야만 코드 값이 얻어질 수 있다. 또 다른 방법은 데이터 비트 스트림을 2 비트씩 분리하면서 트리 서치 알고리즘(Tree search algorithm)을 이용하는 것이다. 이 경우 최대 8 번의 트리 서치가 수행되어야만 코드 값이 얻어진다.The most basic method is to use a tree search algorithm by separating the input data bit stream by one bit. In the case of MPEG, since the maximum length of a code is 16 bits, a code value can be obtained only when a maximum of 16 tree searches are performed. Another method is to use a tree search algorithm by separating the data bit stream by two bits. In this case, a maximum of eight tree searches must be performed to obtain a code value.

한번에 분리되는 데이터 비트 스트림의 비트 수가 많을수록 복호화 속도가 빨라진다. 그러나 분리되는 데이터 비트 스트림의 비트 수가 많을수록 복호화 장치의 구조가 복잡해지므로 복호화 속도와 복호화 장치의 면적사이의 적절한 트레이드 오프(trade off)가 필요하다.The more bits in the data bit stream that are separated at one time, the faster the decoding speed is. However, the larger the number of bits of the separated data bit stream, the more complicated the structure of the decoding apparatus is, so a proper trade off between the decoding speed and the area of the decoding apparatus is required.

본 발명에서는 입력되는 데이터 비트 스트림을 3 비트씩 분리하는 복호화 장치 및 방법을 제안한다. 또한 입력되는 데이터 비트 스트림의 코드 값의 특성에 따라 2 가지의 프리 디코딩 방법을 선택 할 수 있게 하는 복호화 장치 및 방법을 제안한다.The present invention proposes a decoding apparatus and method for separating an input data bit stream by three bits. The present invention also proposes a decoding apparatus and method for selecting two pre-decoding methods according to characteristics of code values of an input data bit stream.

본 발명이 이루고자하는 기술적 과제는, 입력되는 데이터 비트 스트림을 L 비트씩 분리하여 디코딩하며, 입력되는 데이터 비트 스트림의 코드 값의 특성에 따라 프리 디코딩 방법을 선택할 수 있는 가변 길이 코드 복호화 장치를 제공하는데 있다.An object of the present invention is to provide a variable length code decoding apparatus capable of separating and decoding an input data bit stream by L bits and selecting a pre-decoding method according to characteristics of a code value of an input data bit stream. have.

본 발명이 이루고자하는 다른 기술적 과제는, 입력되는 데이터 비트 스트림을 L 비트씩 분리하여 디코딩하며, 입력되는 데이터 비트 스트림의 코드 값의 특성에 따라 프리 디코딩 방법을 선택할 수 있는 가변 길이 코드 복호화 방법을 제공하는데 있다.Another technical problem to be solved by the present invention is to provide a variable length code decoding method for separating and decoding an input data bit stream by L bits and selecting a pre decoding method according to a characteristic of a code value of an input data bit stream. It is.

본 발명의 상세한 설명에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 간단한 설명이 제공된다.BRIEF DESCRIPTION OF THE DRAWINGS In order to better understand the drawings cited in the detailed description of the invention, a brief description of each drawing is provided.

도 1은 본 발명의 실시예에 따른 가변 길이 코드 복호화 장치를 나타내는 블록도이다.1 is a block diagram illustrating a variable length code decoding apparatus according to an embodiment of the present invention.

도 2는 도 1의 메모리 검색부에 저장되는 LOC 정보 테이블을 나타내는 도표이다.FIG. 2 is a diagram illustrating a LOC information table stored in the memory search unit of FIG. 1.

도 3은 심볼과 가변 길이 코드가 나타나있는 도표이다.3 is a diagram showing symbols and variable length codes.

도 4는 가변 길이 코드로부터 심볼을 구하는 개념도이다.4 is a conceptual diagram for obtaining a symbol from a variable length code.

도 5는 도 1의 메모리에 저장된 LOC 테이블 값과 터미널 값을 나타내는 도표이다.FIG. 5 is a diagram illustrating a LOC table value and a terminal value stored in the memory of FIG. 1.

도 6은 심볼과 고정 길이 코드를 나타내는 도표이다.6 is a diagram illustrating a symbol and a fixed length code.

도 7은 다른 기술적 과제를 달성하기 위한 본 발명의 제 1 실시예에 따른 가변 길이 코드의 복호화 방법을 나타내는 플로우 차트이다.7 is a flowchart illustrating a method of decoding a variable length code according to a first embodiment of the present invention for achieving another technical problem.

도 8은 도 7의 제 710 단계를 나타내는 플로우 차트이다.8 is a flowchart illustrating operation 710 of FIG. 7.

상기 기술적 과제를 달성하기 위한 본 발명의 실시예에 따른 복호화 장치는 프리 디코딩부, 쉬프팅부, 제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터, 선택부, 메모리 제어부, 메모리 및 메모리 검색부를 구비하는 것을 특징으로 한다.The decoding apparatus according to the embodiment of the present invention for achieving the above technical problem is a pre-decoding unit, a shifting unit, the first to M (M is a natural number) lookup table address register, selector, memory controller, memory and memory search unit It is characterized by including.

프리 디코딩부는 데이터 비트 스트림을 수신하고 상기 데이터 비트 스트림의 코드 값에 따라 소정의 제 1 내지 제 M 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 또는 제 2 선택 신호를 발생한다.The pre decoding unit receives a data bit stream and generates a first or second selection signal for selecting one of predetermined first through Mth lookup table address registers according to a code value of the data bit stream.

쉬프팅부는 상기 제 1 선택 신호 또는 상기 제 2 선택 신호 중 하나 및 상기 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 일정한 비트만큼 이동시킨다.The shifting unit shifts the data bit stream by a predetermined bit in response to one of the first selection signal or the second selection signal and the continuous node signal.

제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터는 소정의 메모리에 저장된 K(K는 자연수) 비트의 LOC 테이블 값을 지정하는 LOC 어드레스를 각각 구비한다.The first through Mth (M is a natural number) lookup table address registers each have a LOC address specifying an LOC table value of K (K is a natural number) bits stored in a predetermined memory.

선택부는 상기 제 1 선택 신호 또는 상기 제 2 선택 신호에 응답하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터의 출력들 중 하나를 선택하여 출력한다.The selector selects and outputs one of the outputs of the first to Mth lookup table address registers in response to the first selection signal or the second selection signal.

메모리 제어부는 상기 선택부의 출력을 수신하고, 소정의 연속 노드 신호에 응답하여 상기 메모리에 저장된 LOC 테이블 값 및 상기 LOC 테이블 값에 대응되며 소정의 심볼 어드레스를 구하기 위한 터미널 값을 선택하는 제 3 선택 신호를 발생하거나, 소정의 심볼 어드레스 신호에 응답하여 상기 메모리에 저장된 소정의 고정 길이 코드를 선택하는 제 4 선택 신호를 발생한다.The memory controller receives the output of the selector, and selects a third select signal for selecting a terminal value corresponding to the LOC table value stored in the memory and the LOC table value and obtaining a predetermined symbol address in response to a predetermined continuous node signal. Or a fourth selection signal for selecting a predetermined fixed length code stored in the memory in response to the predetermined symbol address signal.

메모리는 상기 LOC 테이블 값, 상기 터미널 값 및 상기 고정 길이 코드를 저장하고, 상기 제 3 선택 신호에 응답하여 선택된 상기 LOC 테이블 값 및 상기 터미널 값을 출력하거나 상기 제 4 선택 신호에 응답하여 상기 고정 길이 코드를 출력한다.The memory stores the LOC table value, the terminal value and the fixed length code and outputs the selected LOC table value and the terminal value in response to the third selection signal or the fixed length in response to the fourth selection signal. Output the code

메모리 검색부는 상기 메모리에서 출력되는 상기 선택된 LOC 테이블 값, 상기 터미널 값 및 상기 데이터 비트 스트림의 L (L은 자연수)비트를 수신하고, 내부에 저장되어 있는 LOC 정보 테이블을 이용하여 상기 데이터 비트 스트림의 L 비트가 터미널 노드인지 연속 노드인지를 판단하여 연속 노드 신호 또는 심볼 어드레스 신호를 발생하거나,The memory retrieval unit receives the selected LOC table value, the terminal value, and the L (L is a natural number) bit of the data bit stream output from the memory, and uses the LOC information table stored therein to determine the data bit stream. It is determined whether the L bit is a terminal node or a continuous node to generate a continuous node signal or a symbol address signal.

상기 메모리에서 출력되는 상기 고정 길이 코드를 수신하여 출력한다.The fixed length code output from the memory is received and output.

상기 프리 디코딩부는 제 1 프리 디코딩부 및 제 2 프리 디코딩부를 구비하는 것을 특징으로 한다.The pre decoding unit may include a first pre decoding unit and a second pre decoding unit.

제 1 프리 디코딩부는 상기 데이터 비트 스트림을 수신하고, 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 선택 신호를 발생한다.When the first pre-decoding unit receives the data bit stream and 0 or 1 is contiguous to the most significant bit MSB of the data bit stream, the first pre-decoding unit includes one of the first to Mth lookup table address registers according to the number of zeros or ones. Generate a first selection signal to select one.

제 2 프리 디코딩부는 상기 데이터 비트 스트림을 수신하고, 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽의 N(N은 자연수) 비트를 이용하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 2 선택 신호를 발생한다.The second pre-decoding unit receives the data bit stream and selects one of the first to Mth lookup table address registers by using N (N is a natural number) bit of the most significant bit (MSB) side of the data bit stream. Generate a second selection signal.

상기 쉬프팅부는 상기 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 3비트씩 이동시키는 것을 특징으로 한다.The shifting unit shifts the data bit stream by 3 bits in response to the continuous node signal.

상기 메모리 제어부는 오프셋 레지스터, 합산부, LOC 어드레스 레지스터 및 심볼 어드레스 레지스터를 구비하는 것을 특징으로 한다.The memory controller may include an offset register, an adder, a LOC address register, and a symbol address register.

오프셋 레지스터는 상기 선택부의 출력을 수신하고 상기 선택부의 새로운 출력이 수신될 때까지 상기 선택부의 출력을 저장한다.An offset register receives the output of the selector and stores the output of the selector until a new output of the selector is received.

합산부는 상기 오프셋 레지스터의 출력과 소정의 다음 LOC 어드레스를 더하여 상기 메모리에 저장된 LOC 테이블의 값들을 선택하는 제 3 선택 신호를 발생한다.The adder generates a third select signal that selects the values of the LOC table stored in the memory by adding the output of the offset register and a predetermined next LOC address.

LOC 어드레스 레지스터는 상기 연속 노드 신호에 응답하여 LOC 테이블 값을선택하기 위한 상기 다음 LOC 어드레스를 발생한다.The LOC address register generates the next LOC address for selecting a LOC table value in response to the continuous node signal.

심볼 어드레스 레지스터는 상기 심볼 어드레스 신호에 응답하여 상기 고정 길이 코드를 구하기 위한 상기 제 4 선택 신호를 발생한다.A symbol address register generates the fourth select signal for obtaining the fixed length code in response to the symbol address signal.

상기 다음 LOC 어드레스는 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값인 것을 특징으로 한다.The next LOC address is characterized by adding the current LOC address and the number of non-terminal nodes before the current node including the current node in the current LOC.

상기 심볼 어드레스는 현재의 LOC 테이블 값에 대응되는 터미널 값과 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값인 것을 특징으로 한다.The symbol address may be a value obtained by adding a terminal value corresponding to a current LOC table value and the number of terminal nodes before the current node excluding the current node in the current LOC.

상기 메모리 검색부에 저장되는 LOC 정보 테이블은 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입을 구비하며, 상기 각각의 노드 타입은 N* { 2}^{L } 비트의 LOC 정보 비트를 구비하며, 상기 LOC 정보 비트들은 각각 N 비트로 구성되는 A, B, C, D의 4가지 형태로 표현는 것을 특징으로 한다.The LOC information table stored in the memory retrieval unit has a node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node, wherein each node type is N * { 2} ^ {L} bits having LOC information bits, and the LOC information bits are characterized by being represented by four types of A, B, C, and D each consisting of N bits.

상기 메모리 검색부에 저장되는 LOC 정보 테이블은 가변 길이 코드가 0, 1, 00, 01, 10, 11인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 000부터 111 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이며,In the LOC information table stored in the memory searching unit, when the variable length code is 0, 1, 00, 01, 10, or 11, the node type indicated by the variable length code is a terminal node, and the variable length code is 000 to 111. If present, the node type indicated by the variable length code is any one of a terminal node, a continuous node, and an invalid node.

상기 N 이 2 비트이고, 상기 L 이 3비트라면 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 8 비트가 A B B B로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 8 비트가 A B B B로 표현되고, 가변 길이 코드가 00 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 01 인 경우는 LOC 정보 비트의 상위 5 비트에서 8 비트 사이가 A B로 표현되고, 가변 길이 코드가 10 인 경우는 LOC 정보 비트의 상위 9 비트에서 12 비트 사이가 A B로 표현되고, 가변 길이 코드가 11 인 경우는 LOC 정보 비트의 상위 13 비트에서 16 비트 사이가 A B로 표현되고, 가변 길이 코드가 000부터 111인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현되는 것을 특징으로 한다.If N is 2 bits and L is 3 bits, if the variable length code is 0, the upper 8 bits of the LOC information bits are represented by ABBB. If the variable length code is 1, the lower 8 bits of the LOC information bits are represented. If the variable length code is 00, the upper 4 bits of the LOC information bits are represented by AB. If the variable length code is 01, the upper 5 to 8 bits of the LOC information bits are represented by AB. If the variable length code is 10, the upper 9 to 12 bits of the LOC information bits are represented by AB, and when the variable length code is 11, the upper 13 to 16 bits of the LOC information bits are represented by AB. When the variable length code is 000 to 111, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the node is a continuous node. If the LOC is characterized in that the information bits are represented by D.

또한 상기 메모리 검색부에 저장되는 LOC 정보 테이블은 가변 길이 코드가 0, 1인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 00부터 11 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이며, 상기 N 이 2 비트이고, 상기 L 이 2비트라면, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 4 비트가 A B로 표현되고, 가변 길이 코드가 00부터 11인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현되는 것을 특징으로 한다.In the LOC information table stored in the memory retrieval unit, when the variable length code is 0 or 1, the node type indicated by the variable length code is a terminal node, and when the variable length code is present between 00 and 11, the variable length The node type indicated by the code is any one of a terminal node, a continuous node, and an invalid node. If the N is 2 bits and the L is 2 bits, the upper 4 bits of the LOC information bit are 0 when the variable length code is 0. When the variable length code is 1 and the variable length code is 1, the lower 4 bits of the LOC information bit are represented by the AB. When the variable length code is 00 to 11, the node type indicated by the variable length code is a terminal node. The LOC information bits are represented by A, the LOC information bits are represented by C when the node is a continuous node, and the LOC information bits are represented by D when the node is an invalid node.

상기 메모리에 저장되는 LOC 테이블 값은 가변 길이 코드가 지시하는 상기LOC 정보 테이블의 노드 타입에 대응되는 LOC 정보 비트들로 이루어지는 것을 특징으로 한다.The LOC table value stored in the memory may include LOC information bits corresponding to a node type of the LOC information table indicated by a variable length code.

상기 다른 기술적 과제를 달성하기 위한 본 발명의 제 1 실시예에 따른 가변 길이 코드 복호화 방법은, 소정의 LOC 어드레스를 각각 구비하는 제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터, 상기 LOC 어드레스에 대응되는 K(K는 자연수) 비트의 LOC 테이블 값, 소정의 터미널 값 및 고정 길이 코드를 저장하는 메모리 및 가변 길이 코드를 복호화 하는 기준이 되는 정보를 가지는 LOC 정보 테이블을 구비하는 메모리 검색부를 구비하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법에 있어서,According to another aspect of the present invention, there is provided a variable length code decoding method including: first through M (M is natural numbers) lookup table address registers each having a predetermined LOC address, and the LOC address. And a memory retrieval unit having a LOC table value corresponding to K (K is a natural number), a memory storing a predetermined terminal value and a fixed length code, and a LOC information table having information as a reference for decoding a variable length code. In the variable length code decoding method of a variable length code decoding apparatus,

(a) 데이터 비트 스트림을 수신하고 상기 데이터 비트 스트림의 코드 값에 따라 상기 룩업 테이블 어드레스 레지스터중 하나를 선택하는 제 1 또는 제 2 선택 신호를 발생하는 단계, (b) 상기 제 1 선택 신호 또는 상기 제 2 선택 신호에 응답하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터의 출력들 중 하나를 선택하여 출력하는 단계, (c) 상기 (b) 단계의 출력과 소정의 다음 LOC 어드레스를 더하여 상기 메모리에 저장된 LOC 테이블의 값 및 상기 LOC 테이블 값에 대응되며 소정의 심볼 어드레스를 구하기 위한 터미널 값을 선택하는 제 3 선택 신호를 발생하는 단계, (d) 상기 제 3 선택 신호에 응답하여 선택된 LOC 테이블 값 및 터미널 값을 출력하는 단계, (e) 상기 메모리에서 출력되는 상기 선택된 LOC 테이블 값, 터미널 값 및 상기 데이터 비트 스트림의 L 비트를 수신하고, 상기 LOC 정보 테이블을 이용하여 상기 데이터 비트 스트림의 L 비트가 터미널 노드인지 연속 노드인지를 판단하여 연속 노드 신호 또는 심볼 어드레스 신호를 발생하는 단계, (f) 상기 연속 노드 신호에 응답하여 상기 LOC 테이블 값을 선택하기 위한 상기 다음 LOC 어드레스를 발생하여 상기 (c) 단계로 인가하는 단계, (g) 상기 심볼 어드레스 신호에 응답하여 상기 고정 길이 코드를 구하기 위한 제 4 선택 신호를 발생하는 단계 및 (h) 상기 제 4 선택 신호에 응답하여 상기 메모리로부터 터미널 값을 출력하고, 상기 출력된 터미널 값에 응답하여 심볼 어드레스를 선택하며, 상기 선택된 심볼 어드레스에 대응되는 고정 길이 코드를 출력하는 단계를 구비하는 것을 특징으로 한다.(a) receiving a data bit stream and generating a first or second selection signal that selects one of the lookup table address registers according to a code value of the data bit stream; (b) the first selection signal or the Selecting and outputting one of the outputs of the first to Mth lookup table address registers in response to a second selection signal; (c) adding the output of step (b) and a predetermined next LOC address to the memory; Generating a third selection signal that selects a value of a stored LOC table and a terminal value corresponding to the LOC table value and to obtain a predetermined symbol address, (d) a LOC table value selected in response to the third selection signal, and Outputting a terminal value, (e) the selected LOC table value, terminal value and data bit stream output from the memory; Receiving an L bit, and determining whether the L bit of the data bit stream is a terminal node or a continuous node using the LOC information table to generate a continuous node signal or a symbol address signal; and (f) generating the continuous node signal. In response to generating the next LOC address for selecting the LOC table value and applying it to step (c), (g) generating a fourth selection signal for obtaining the fixed length code in response to the symbol address signal And (h) outputting a terminal value from the memory in response to the fourth selection signal, selecting a symbol address in response to the output terminal value, and outputting a fixed length code corresponding to the selected symbol address. Characterized in that it comprises a step.

상기 (a) 단계는 (a1) 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 상기 복수개의 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 선택 신호를 발생하는 단계, (a2) 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽의 N(N은 자연수) 비트를 이용하여 상기 복수개의 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 2 선택 신호를 발생하는 단계 및 (a3) 상기 제 1 선택 신호 또는 상기 제 2 선택 신호 중 하나 및 상기 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 일정한 비트만큼 이동시키는 단계를 구비한다.Step (a) may include (a1) a first selection of selecting one of the plurality of lookup table address registers according to the number of 0s or 1s when 0s or 1s are contiguous to the most significant bit (MSB) of the data bit stream. Generating a signal; (a2) generating a second selection signal for selecting one of the plurality of lookup table address registers using N (N is a natural number) bit of the most significant bit (MSB) side of the data bit stream; And (a3) moving the data bit stream by a constant bit in response to one of the first selection signal or the second selection signal and the continuous node signal.

상기 다음 LOC 어드레스는 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값인 것을 특징으로 한다.The next LOC address is characterized by adding the current LOC address and the number of non-terminal nodes before the current node including the current node in the current LOC.

상기 심볼 어드레스는 현재의 LOC 테이블 값에 대응되는 터미널 값과 현재의LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값인 것을 특징으로 한다.The symbol address may be a value obtained by adding a terminal value corresponding to a current LOC table value and the number of terminal nodes before the current node excluding the current node in the current LOC.

상기 메모리 검색부에 저장되는 LOC 정보 테이블은 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입을 구비하며,The LOC information table stored in the memory retrieval unit has a node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node.

상기 각각의 노드 타입은 N* { 2}^{L } 비트의 LOC 정보 비트를 구비하며,Each node type has a LOC information bit of N * {2} ^ {L} bits.

상기 LOC 정보 비트들은 각각 N 비트로 구성되는 A, B, C, D의 4가지 형태로 표현는 것을 특징으로 한다.The LOC information bits are represented by four types of A, B, C, and D each consisting of N bits.

상기 메모리에 저장되는 LOC 테이블 값은 가변 길이 코드가 지시하는 상기 LOC 정보 테이블의 노드 타입에 대응되는 LOC 정보 비트들로 이루어지는 것을 특징으로 한다.The LOC table value stored in the memory is characterized by consisting of LOC information bits corresponding to the node type of the LOC information table indicated by the variable length code.

본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도면 및 도면에 기재된 내용을 참조하여야 한다.DETAILED DESCRIPTION In order to fully understand the present invention, the operational advantages of the present invention, and the objects achieved by the practice of the present invention, reference should be made to the accompanying drawings which illustrate preferred embodiments of the present invention and the contents described in the drawings.

이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로써, 본 발명을 상세히 설명한다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Like reference numerals in the drawings denote like elements.

도 1은 본 발명의 실시예에 따른 가변 길이 코드 복호화 장치를 나타내는 블록도이다.1 is a block diagram illustrating a variable length code decoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 제 1 실시예에 따른 가변 길이 코드 복호화 장치(100)는 프리 디코딩부(107), 쉬프팅부(130), 제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터(140), 선택부(150), 메모리 제어부(153), 메모리(165) 및 메모리 검색부(170)를 구비한다.Referring to FIG. 1, the variable length code decoding apparatus 100 according to the first embodiment of the present invention may include a pre-decoding unit 107, a shifting unit 130, and first through M-th lookup table addresses. A register 140, a selector 150, a memory controller 153, a memory 165, and a memory searcher 170 are provided.

프리 디코딩부(107)는 데이터 비트 스트림(DSTREAM)을 수신하고 데이터 비트 스트림(DSTREAM)의 코드 값에 따라 소정의 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)중 하나를 선택하는 제 1 또는 제 2 선택 신호(SEL1, SEL2)를 발생한다.The pre-decoding unit 107 receives the data bit stream DSTREAM and selects one of the first to Mth lookup table address registers 140 according to a code value of the data bit stream DSTREAM. 2 Generates the selection signals SEL1 and SEL2.

프리 디코딩부(107)는 제 1 프리 디코딩부(110) 및 제 2 프리 디코딩부 (120)를 구비한다.The pre decoding unit 107 includes a first pre decoding unit 110 and a second pre decoding unit 120.

제 1 프리 디코딩부(110)는 데이터 비트 스트림(DSTREAM)을 수신하고, 데이터 비트 스트림(DSTREAM)의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140) 중 하나를 선택하는 제 1 선택 신호(SEL1)를 발생한다.The first pre-decoding unit 110 receives the data bit stream DSTREAM, and when 0 or 1 is contiguous to the most significant bit MSB of the data bit stream DSTREAM, the first pre decoding unit 110 according to the number of 0 or 1 may be used. A first select signal SEL1 for selecting one of the Mth lookup table address registers 140 is generated.

제 2 프리 디코딩부(120)는 데이터 비트 스트림(DSTREAM)을 수신하고, 데이터 비트 스트림(DSTREAM)의 최상위 비트(MSB)쪽의 N(N은 자연수) 비트를 이용하여 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140) 중 하나를 선택하는 제 2 선택 신호(SEL2)를 발생한다.The second pre-decoder 120 receives the data bit stream DSTREAM and uses the first to Mth lookup tables using N bits (N is a natural number) on the most significant bit MSB side of the data bit stream DSTREAM. A second select signal SEL2 for selecting one of the address registers 140 is generated.

쉬프팅부(130)는 제 1 선택 신호(SEL1) 또는 제 2 선택 신호(SEL2) 중 하나 및 연속 노드 신호(NCONS)에 응답하여 데이터 비트 스트림(DSTREAM)을 일정한 비트만큼 이동시킨다. 좀 더 설명하면, 쉬프팅부(130)는 연속 노드 신호(NCONS)에 응답하여 데이터 비트 스트림(DSTREAM)을 L비트씩 이동시킨다. 여기서 L은 3일 수 있다.The shifting unit 130 moves the data bit stream DSTREAM by a predetermined bit in response to one of the first selection signal SEL1 or the second selection signal SEL2 and the continuous node signal NCONS. In more detail, the shifting unit 130 moves the data bit stream DSTREAM by L bits in response to the continuous node signal NCONS. Where L may be 3.

제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터(140)는 소정의 메모리(165)에 저장된 K(K는 자연수) 비트의 LOC 테이블 값(LOCTV)을 지정하는 LOC 어드레스를 각각 구비한다.The first through M (M is natural numbers) lookup table address registers 140 each include LOC addresses specifying LOC table values (LOCTVs) of K (K is natural numbers) bits stored in the predetermined memory 165.

선택부(150)는 제 1 선택 신호(SEL1) 또는 제 2 선택 신호(SEL2)에 응답하여 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)의 출력들 중 하나를 선택하여 출력한다. 선택부(150)는 멀티플렉서일 수 있다.The selector 150 selects and outputs one of the outputs of the first to Mth lookup table address registers 140 in response to the first selection signal SEL1 or the second selection signal SEL2. The selector 150 may be a multiplexer.

메모리 제어부(153)는 선택부(150)의 출력을 수신하고, 소정의 연속 노드 신호(NCONS)에 응답하여 메모리(165)에 저장된 LOC 테이블 값(LOCTV) 및 터미널 값(TERMV)을 선택하는 제 3 선택 신호(SEL3)를 발생하거나, 소정의 심볼 어드레스 신호(SYMADDS)에 응답하여 상기 메모리(165)에 저장된 소정의 고정 길이 코드(SFLC)를 선택하는 제 4 선택 신호를 발생한다.The memory controller 153 receives an output of the selector 150 and selects a LOC table value LOCTV and a terminal value TRMV stored in the memory 165 in response to a predetermined continuous node signal NCONS. The third select signal SEL3 may be generated, or a fourth select signal for selecting a predetermined fixed length code SFLC stored in the memory 165 may be generated in response to a predetermined symbol address signal SYMADDS.

좀더 설명하면, 메모리 제어부(153)는 오프셋 레지스터(155), 합산부(160), LOC 어드레스 레지스터(175) 및 심볼 어드레스 레지스터(180)를 구비한다.In more detail, the memory controller 153 includes an offset register 155, an adder 160, a LOC address register 175, and a symbol address register 180.

오프셋 레지스터(155)는 선택부(150)의 출력을 수신하고 선택부(150)의 새로운 출력이 수신될 때까지 선택부(150)의 출력을 저장한다.The offset register 155 receives the output of the selector 150 and stores the output of the selector 150 until a new output of the selector 150 is received.

합산부(160)는 오프셋 레지스터(155)의 출력과 소정의 다음 LOC 어드레스(NLOCADD)를 더하여 메모리(165)에 저장된 LOC 테이블 값(LOCTV) 및 터미널 값(TERMV)을 선택하는 제 3 선택 신호(SEL3)를 발생한다.The adder 160 adds the output of the offset register 155 and a predetermined next LOC address NLOCADD to select a third selection signal (LOCTV) and a terminal value (TERMV) stored in the memory 165. SEL3).

LOC 어드레스 레지스터(175)는 연속 노드 신호(NCONS)에 응답하여 LOC 테이블 값(LOCTV)을 선택하기 위한 다음 LOC 어드레스(NLOCADD)를 발생한다. 다음 LOC 어드레스(NLOCADD)는 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값이다.The LOC address register 175 generates the next LOC address NLOCADD for selecting the LOC table value LOCTV in response to the continuous node signal NCONS. The next LOC address (NLOCADD) is a sum of the current LOC address and the number of non-terminal nodes before the current node including the current node in the current LOC.

심볼 어드레스 레지스터(180)는 심볼 어드레스 신호(SYMADDS)에 응답하여 고정 길이 코드(SFLC)를 구하기 위한 제 4 선택 신호(SEL4)를 발생한다. 심볼 어드레스는 현재의 LOC 테이블 값(LOCTV)에 대응되는 터미널 값(TERMV)과 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값이다.The symbol address register 180 generates a fourth select signal SEL4 for obtaining the fixed length code SFLC in response to the symbol address signal SYMADDS. The symbol address is obtained by adding the terminal value TRMV corresponding to the current LOC table value LOCTV and the number of terminal nodes before the current node except for the current node in the current LOC.

메모리(165)는 LOC 테이블 값(LOCTV), 소정의 터미널 값(TERMV) 및 고정 길이 코드(SFLC)를 저장하고, 제 3 선택 신호(SEL3)에 응답하여 선택된 LOC 테이블 값(LOCTV) 및 터미널 값(TERMV)을 출력하거나 소정의 제 4 선택 신호(SEL4)에 응답하여 고정 길이 코드(SFLC)를 출력한다.The memory 165 stores the LOC table value LOCTV, the predetermined terminal value TRMV, and the fixed length code SFLC, and selects the selected LOC table value LOCTV and the terminal value in response to the third selection signal SEL3. Outputs the fixed length code SFLC in response to the predetermined fourth selection signal SEL4.

메모리(165)에 저장되는 LOC 테이블 값(LOCTV)은 가변 길이 코드가 지시하는 LOC 정보 테이블(200)의 노드 타입에 대응되는 LOC 정보 비트들로 이루어진다.The LOC table value LOCTV stored in the memory 165 includes LOC information bits corresponding to the node type of the LOC information table 200 indicated by the variable length code.

메모리 검색부(170)는 메모리(165)에서 출력되는 선택된 LOC 테이블 값(LOCTV), 터미널 값(TERMV) 및 데이터 비트 스트림(DSTREAM)의 L (L은 자연수)비트를 수신하고, 내부에 저장되어 있는 LOC 정보 테이블(200)을 이용하여 데이터 비트 스트림(DSTREAM)의 L 비트가 터미널 노드인지 연속 노드인지를 판단하여 연속 노드 신호(NCONS) 또는 심볼 어드레스 신호(SYMADDS)를 발생한다. 여기서 L은 3일 수 있다.The memory search unit 170 receives the selected LOC table value (LOCTV), the terminal value (TERMV), and the L (L is a natural number) bit of the data bit stream DSTREAM, which are output from the memory 165, and are stored therein. The LC information table 200 determines whether the L bit of the data bit stream DSTREAM is a terminal node or a continuous node to generate a continuous node signal NCONS or a symbol address signal SYMADDS. Where L may be 3.

또한 메모리 검색부(170)는 메모리(165)에서 출력되는 고정 길이 코드(SFLC)를 수신하여 출력한다.In addition, the memory search unit 170 receives and outputs a fixed length code SFLC output from the memory 165.

메모리 검색부(170)에 저장되는 LOC 정보 테이블(200)은 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입을 구비하며, 상기 각각의 노드 타입은 N* { 2}^{L } 비트의 LOC 정보 비트를 구비하며, 상기 LOC 정보 비트들은 각각 N 비트로 구성되는 A, B, C, D의 4가지 형태로 표현된다.The LOC information table 200 stored in the memory retrieval unit 170 has a node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node. The type includes LOC information bits of N * {2} ^ {L} bits, and the LOC information bits are represented by four types of A, B, C, and D each consisting of N bits.

메모리 검색부(170)에 저장되는 LOC 정보 테이블은, 가변 길이 코드가 0, 1, 00, 01, 10, 11인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 000부터 111 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이다. 만일 상기 N 이 2 비트이고, 상기 L 이 3비트라면, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 8 비트가 A B B B 로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 8 비트가 A B B B로 표현되고, 가변 길이 코드가 00 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 01 인 경우는 LOC 정보 비트의 상위 5 비트에서 8 비트 사이가 A B로 표현되고, 가변 길이 코드가 10 인 경우는 LOC 정보 비트의 상위 9 비트에서 12 비트 사이가 A B로 표현되고, 가변 길이 코드가 11 인 경우는 LOC 정보 비트의 상위 13 비트에서 16 비트 사이가 A B로 표현되고, 가변 길이 코드가 000부터 111인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현된다.In the LOC information table stored in the memory retrieval unit 170, when the variable length code is 0, 1, 00, 01, 10, or 11, the node type indicated by the variable length code is a terminal node, and the variable length code is 000. To 111, the node type indicated by the variable length code is any one of a terminal node, a continuous node, and an invalid node. If N is 2 bits and L is 3 bits, the upper 8 bits of the LOC information bits are represented by ABBB when the variable length code is 0, and the lower 8 bits of the LOC information bits when the variable length code is 1. If the bit is represented by ABBB and the variable length code is 00, the upper 4 bits of the LOC information bit are represented by AB, and if the variable length code is 01, between the upper 5 bits and 8 bits of the LOC information bit is AB. If the variable length code is 10, the upper 9 to 12 bits of the LOC information bits are represented by AB. If the variable length code is 11, the upper 13 to 16 bits of the LOC information bits are represented by AB. When the variable length code is 000 to 111, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the continuous node is a continuous node. If the effective node LOC information bits are represented by D.

메모리 검색부(170)에 저장되는 LOC 정보 테이블은, 가변 길이 코드가 0, 1인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 00부터 11 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이다.In the LOC information table stored in the memory retrieval unit 170, when the variable length code is 0 or 1, the node type indicated by the variable length code is a terminal node, and when the variable length code is present between 00 and 11, The node type indicated by the variable length code is any one of a terminal node, a continuous node, and an invalid node.

상기 N 이 2 비트이고, 상기 L 이 2비트라면 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 4 비트가 A B로 표현되고, 가변 길이 코드가 00부터 11인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현된다.If N is 2 bits and L is 2 bits, if the variable length code is 0, the upper 4 bits of the LOC information bits are represented by AB. If the variable length code is 1, the lower 4 bits of the LOC information bits are represented. If the variable length code is 00 to 11 and is represented by AB, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the node is a continuous node. In case of an invalid node, the LOC information bit is represented by D.

도 2는 도 1의 메모리 검색부에 저장되는 LOC 정보 테이블을 나타내는 도표이다.FIG. 2 is a diagram illustrating a LOC information table stored in the memory search unit of FIG. 1.

도 3은 심볼과 가변 길이 코드가 나타나있는 도표이다.3 is a diagram showing symbols and variable length codes.

도 4는 가변 길이 코드로부터 심볼을 구하는 개념도이다.4 is a conceptual diagram for obtaining a symbol from a variable length code.

도 5는 도 1의 메모리에 저장된 LOC 테이블 값과 터미널 값을 나타내는 도표이다.FIG. 5 is a diagram illustrating a LOC table value and a terminal value stored in the memory of FIG. 1.

도 6은 심볼과 고정 길이 코드를 나타내는 도표이다.6 is a diagram illustrating a symbol and a fixed length code.

이하 도 1 내지 도 6을 참조하여 본 발명의 실시예에 따른 가변 길이 코드의복호화 장치의 동작이 상세히 설명된다.Hereinafter, the operation of the decoding apparatus of the variable length code according to the embodiment of the present invention will be described in detail with reference to FIGS. 1 to 6.

데이터 비트 스트림(DSTREAM)은 데이터 비트 스트림 저장부(105)에 저장된다. 그리고 데이터 비트스 트림 저장부(105)는 데이터 비트 스트림(DSTREAM)을 프리 디코딩부(107)로 인가한다. 데이터 비트 스트림 (DSTREAM)은 데이터가 가변 길이 코드로 인코딩 되어 있는 데이터 정보이다.The data bit stream DSTREAM is stored in the data bit stream storage 105. The data bit stream storage unit 105 applies the data bit stream DSTREAM to the pre decoding unit 107. A data bit stream (DSTREAM) is data information in which data is encoded with a variable length code.

도 3을 참조하여 좀더 설명한다. 심볼들은 인코딩 단계에서 고정 길이 코드로 인코딩될 수도 있고 가변 길이 코드로 인코딩 될 수도 있다.This will be described further with reference to FIG. 3. Symbols may be encoded with a fixed length code in the encoding step or may be encoded with a variable length code.

고정 길이 코드는 모든 심볼이 동일한 비트 수로 인코딩 된다. 가변 길이 코드는 심볼마다 서로 다른 비트 수로 인코딩 된다. 자주 사용되는 심볼은 적은 비트 수로 인코딩하고 자주 사용되지 않는 심볼은 많은 비트 수로 인코딩 한다면 인코딩 된 데이터의 비트 수를 줄일 수 있다.In fixed length codes, all symbols are encoded with the same number of bits. Variable length codes are encoded with a different number of bits per symbol. You can reduce the number of bits of encoded data by encoding frequently used symbols with fewer bits and encoding less frequently used symbols with more bits.

따라서 가변 길이 코드를 이용하여 인코딩 하는 방법이 많이 사용된다. 본 발명의 데이터 비트 스트림은 가변 길이 코드로 인코딩 된 것이다.Therefore, encoding using a variable length code is frequently used. The data bit stream of the present invention is encoded with a variable length code.

프리 디코딩부(107)는 제 1 프리 디코딩부(110)와 제 2 프리 디코딩부(120)를 구비한다.The pre decoding unit 107 includes a first pre decoding unit 110 and a second pre decoding unit 120.

제 1 프리 디코딩부(110)는 MPEG이나 JPEG의 DC 계수 테이블(coefficient table)과 같이 데이터 비트 스트림(DSTREAM)의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140) 중 하나를 선택하는 제 1 선택 신호(SEL1)를 발생한다.The first pre-decoding unit 110, according to the number of zeros or ones, is 0 or 1 in the most significant bit MSB side of the data bit stream DSTREAM, such as a DC coefficient table of MPEG or JPEG. The first selection signal SEL1 selects one of the first to Mth lookup table address registers 140.

즉, 제 1 선택 신호(SEL1)는 데이터 비트 스트림(DSTREAM)의 최상위 비트에0 이나 1 이 2개 이하인 경우에는 제 1 룩업 테이블 어드레스 레지스터(LUTADD0), 데이터 비트 스트림(DSTREAM)의 최상위 비트에 0 이나 1 이 4개 이하인 경우에는 제 2 룩업 테이블 어드레스 레지스터(LUTADD1) 등과 같이 데이터 비트 스트림(DSTREAM)의 특성에 따라서 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140) 중 하나를 선택한다.That is, the first selection signal SEL1 is 0 in the most significant bit of the data bit stream DSTREAM or 0 in the most significant bit of the data bit stream DSTREAM. If 1 or 4 is less than or equal to 1, one of the first to Mth lookup table address registers 140 is selected according to the characteristics of the data bit stream DSTREAM, such as the second lookup table address register LUTADD1.

제 2 프리 디코딩부(120)는 MPEG에서의 AC 계수 테이블(coefficient table)과 같이 연속되는 0 이나 1 이 없는 경우, 데이터 비트 스트림(DSTREAM)의 최상위 비트(MSB)쪽의 몇 개의 비트를 이용하여 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140) 중 하나를 선택하는 제 2 선택 신호(SEL2)를 발생한다.When there are no consecutive 0s or 1s as in the AC coefficient table in MPEG, the second pre-decoding unit 120 uses some bits toward the most significant bit MSB of the data bit stream DSTREAM. A second select signal SEL2 for selecting one of the first to Mth lookup table address registers 140 is generated.

만일 최상위 비트(MSB) 쪽의 4개의 비트를 이용한다면, 제 2 선택 신호(SEL2)는 데이터 비트 스트림(DSTREAM)의 최상위 비트쪽 4비트가 0000인 경우 제 1 룩업 테이블 어드레스 레지스터(LUTADD0), 0001인 경우 제 2 룩업 테이블 어드레스 레지스터(LUTADD1), 0010인 경우 제 3 룩업 테이블 어드레스 레지스터(LUTADD2) 등과 같이 데이터 비트 스트림(DSTREAM)의 특성에 따라서 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140) 중 하나를 선택한다.If four bits of the most significant bit MSB side are used, the second selection signal SEL2 may have a first lookup table address register LUTADD0, 0001 when the four bits of the most significant bit side of the data bit stream DSTREAM are 0000. Is one of the first to Mth lookup table address registers 140 according to the characteristics of the data bit stream DSTREAM, such as the second lookup table address register LUTADD1 and the third lookup table address register LUTADD2, etc. Select.

이와 같이 제 1 프리 디코딩부(110)와 제 2 프리 디코딩부(120)를 구별함으로써 입력되는 데이터 비트 스트림(DSTREAM)의 코드 값의 특성에 따라 디코딩 대상의 사이즈가 감소되어 전력 소모가 줄고 복호화 속도도 빨라진다.In this way, the size of the decoding target is reduced according to the characteristics of the code value of the input data bit stream DSTREAM by distinguishing the first pre decoding unit 110 and the second pre decoding unit 120, thereby reducing power consumption and decoding speed. Also faster.

이때 제 1 프리 디코딩부(110)와 제 2 프리 디코딩부(120) 중 어느 것을 선택할 것 인지의 여부는 사용자가 입력되는 데이터 비트 스트림(DSTREAM)을 파악하여 미리 그 정보를 제어 레지스터(미도시)에 입력하면, 데이터 비트 스트림(DSTREAM)은 선택된 프리 디코딩부(107)로 입력된다.In this case, whether the user selects whether the first pre-decoding unit 110 or the second pre-decoding unit 120 is to be selected, the data bit stream DSTREAM inputted by the user is grasped, and the information is pre-controlled. When input to, the data bit stream DSTREAM is input to the selected pre decoding unit 107.

쉬프팅부(130)는 제 1 선택 신호(SEL1) 또는 제 2 선택 신호(SEL2)에 응답하여 입력되는 데이터 비트 스트림(DSTREAM)을 쉬프트 한다. 만일 제 2 프리 디코딩부(120)가 입력되는 데이터 비트 스트림(DSTREAM)의 코드 값을 4 비트씩 나누어 그 특성을 판단한다면, 쉬프팅부(130)는 제 2 선택 신호(SEL2)에 응답하여 데이터 비트 스트림(DSTREAM)을 4비트씩 쉬프트 시킨다.The shifting unit 130 shifts the input data bit stream DSTREAM in response to the first selection signal SEL1 or the second selection signal SEL2. If the second pre-decoding unit 120 divides the code value of the input data bit stream DSTREAM by 4 bits and determines the characteristic thereof, the shifting unit 130 responds to the second selection signal SEL2. Shift the stream DSTREAM by 4 bits.

또한 쉬프팅부(130)는 연속 노드 신호(NCONS)에 응답하여 데이터 비트 스트림(DSTREAM)을 L 비트씩 이동시킨다. 본 발명의 실시예에서 L은 3일 수 있다. 이에 대해서는 후술된다.In addition, the shifting unit 130 moves the data bit stream DSTREAM by L bits in response to the continuous node signal NCONS. In an embodiment of the present invention, L may be 3. This will be described later.

제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)는 메모리(165)에 저장된 K(K는 자연수) 비트의 LOC 테이블 값(LOCTV)을 지정하는 LOC 어드레스를 각각 구비한다.The first through Mth lookup table address registers 140 each have a LOC address that specifies a LOC table value (LOCTV) of K (K is a natural number) bits stored in the memory 165.

도 5를 참조하면, LOC 어드레스는 주소(Addres)로 표시된 0과 1이다. LOC 테이블 값(LOCTV)은 내용(Content)으로 표시된 값들이다. 즉, LOC 어드레스 0 이 선택되면 K 비트의 LOC 테이블 값(LOCTV)은 11 10 11 01 11 10 11 11 의 16 비트가 선택된다.Referring to FIG. 5, LOC addresses are 0 and 1 indicated by addresses. The LOC table values (LOCTV) are the values marked with Content. That is, when LOC address 0 is selected, 16 bits of 11 10 11 01 11 10 11 11 are selected as the LOC table value (LOCTV) of K bits.

메모리(165)에는 LOC 테이블 값(LOCTV)이 저장되어 있고 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)에는 LOC 테이블 값(LOCTV)을 지정하는 LOC 어드레스가 저장된다.The memory 165 stores the LOC table value LOCTV, and the first to Mth lookup table address registers 140 store the LOC address specifying the LOC table value LOCTV.

선택부(150)는 제 1 선택 신호(SEL1) 또는 제 2 선택 신호(SEL2)에 응답하여 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)의 출력들 중 하나를 선택하여 출력한다. 선택부(150)는 멀티플렉서일 수 있다.The selector 150 selects and outputs one of the outputs of the first to Mth lookup table address registers 140 in response to the first selection signal SEL1 or the second selection signal SEL2. The selector 150 may be a multiplexer.

만일 데이터 비트 스트림(DSTREAM)이 제 2 프리 디코딩부(120)로 입력된다면 제 2 선택 신호(SEL2)가 발생되고 제 2 선택 신호(SEL2)는 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)에 저장된 LOC 어드레스 중 하나를 선택한다.If the data bit stream DSTREAM is input to the second pre-decoding unit 120, a second selection signal SEL2 is generated and the second selection signal SEL2 is input to the first to Mth lookup table address registers 140. Select one of the stored LOC addresses.

제 2 선택 신호(SEL2)에 의하여 선택된 LOC 어드레스는 메모리 제어부(153)로 입력된다. 메모리 제어부(153)는 입력되는 LOC 어드레스에 대응되는 LOC 테이블 값(LOCTV)을 선택한다.The LOC address selected by the second selection signal SEL2 is input to the memory controller 153. The memory controller 153 selects a LOC table value LOCTV corresponding to the input LOC address.

입력되는 데이터 비트 스트림(DSTREAM)의 코드 특성에 따라 데이터 비트 스트림(DSTREAM)이 프리 디코딩되고 LOC 어드레스가 선택되면, 트리 서치 알고리즘(Tree search algorithm)을 이용하여 데이터 비트 스트림(DSTREAM)을 디코딩 하는 동작이 수행된다.When the data bit stream DSTREAM is pre-decoded according to the code characteristics of the input data bit stream DSTREAM and the LOC address is selected, decoding the data bit stream DSTREAM using a tree search algorithm. This is done.

트리 서치 알고리즘(Tree search algorithm)은 LOC를 기초로 하여 수행된다. 도 4를 참조하여 데이터 비트 스트림(DSTREAM)을 디코딩 하는 동작을 상세히 설명한다.The tree search algorithm is performed based on the LOC. An operation of decoding the data bit stream DSTREAM will be described in detail with reference to FIG. 4.

LOC는 하나의 노드에 연결된 child 노드의 그룹이다. 노드는 디코딩 동작에 의하여 출력되는 데이터 심볼을 의미한다. 노드에는 터미널 노드와 연속 노드가 있다. 터미널 노드는 최종적으로 데이터 심볼로 나타내는 노드이고 연속 노드는 터미널 노드로 이동되는 중간 과정에 존재하는 노드이다. 도 4에서 터미널 노드는 내부에 빗금으로 표시되어 있고 연속 노드는 내부에 아무런 표시도 없다.LOC is a group of child nodes connected to one node. A node means a data symbol output by a decoding operation. Nodes have a terminal node and a continuation node. The terminal node is the node finally represented by the data symbol and the continuous node is the node present in the intermediate process of moving to the terminal node. In Fig. 4, the terminal node is indicated by hatching inside and the continuous node has no indication inside.

프리 디코딩 단계에서는 입력되는 데이터 비트 스트림(DSTREAM)의 코드 값의 특성에 따라 프리 디코딩 동작을 수행하고 LOC 어드레스를 선택한다. 이때 데이터 비트 스트림(DSTREAM)의 4 비트를 기준으로 코드 값의 특성을 판단 할 수도 있고 5 비트를 기준으로 코드 값의 특성을 판단할 수도 있다.In the pre-decoding step, the pre-decoding operation is performed according to the characteristics of the code value of the input data bit stream DSTREAM, and the LOC address is selected. At this time, the characteristic of the code value may be determined based on 4 bits of the data bit stream DSTREAM, or the characteristic of the code value may be determined based on 5 bits.

그러나 디코딩 동작은 데이터 비트 스트림(DSTREAM)을 L 비트씩 나누어 수행한다. 여기서는 설명의 편의를 위하여 L이 3 인 경우, 즉, 데이터 비트 스트림(DSTREAM)을 3 비트씩 나누어 디코딩 동작을 수행하는 경우를 설명한다.However, the decoding operation divides the data bit stream DSTREAM by L bits. For convenience of explanation, the case where L is 3, that is, the decoding operation is performed by dividing the data bit stream DSTREAM by 3 bits.

도 1의 가변 길이 코드 복호화 장치(100)의 디코딩 동작은 데이터 비트 스트림(DSTREAM)을 3 비트씩 수신하고 도 2의 LOC 정보 테이블(200)을 이용하여 데이터 비트 스트림(DSTREAM)의 3 비트가 터미널 노드인지 연속 노드인지를 판단하는 것이다.The decoding operation of the variable length code decoding apparatus 100 of FIG. 1 receives a data bit stream DSTREAM by three bits, and three bits of the data bit stream DSTREAM are received using the LOC information table 200 of FIG. 2. It is to determine whether it is a node or a continuous node.

도 2의 LOC 정보 테이블에 대하여 좀 더 설명한다. 메모리 검색부(170)에 저장되는 LOC 정보 테이블(200)은 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입과, 상기 노드 타입을 판단할 수 있는 LOC 정보 비트들을 구비한다.The LOC information table of FIG. 2 will be described in more detail. The LOC information table 200 stored in the memory retrieval unit 170 may determine a node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node, and determine the node type. With LOC information bits that may be present.

여기서 가변 길이 코드는 입력되는 데이터 비트 스트림(DSTREAM)의 3 비트의 코드 값을 의미한다.Herein, the variable length code refers to a code value of 3 bits of the input data bit stream DSTREAM.

도 2의 표에서 노드 타입을 나타내는 부분의 숫자는 3비트의 데이터 비트 스트림(DSTREAM)이다.The number of parts indicating the node type in the table of FIG. 2 is a 3-bit data bit stream DSTREAM.

메모리 검색부(170)에 저장되는 LOC 정보 테이블(200)은, 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입을 구비하며, 상기 각각의 노드 타입은 N* { 2}^{L } 비트의 LOC 정보 비트를 구비한다. LOC 정보 비트들은 각각 N 비트로 구성되는 A, B, C, D의 4가지 형태로 표현된다.The LOC information table 200 stored in the memory retrieval unit 170 has a node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node. The node type has LOC information bits of N * {2} ^ {L} bits. The LOC information bits are expressed in four forms, A, B, C, and D, each consisting of N bits.

도 2의 LOC 정보 테이블(200)에서 LOC 정보 비트들은 2 비트로 구성되는 A, B, C, D의 4가지로 표현되고 있다. 즉, 상기 A 는 11, 상기 B 는 10, 상기 C 는 01, 상기 D는 00으로 표현되고 있다. 즉, N 은 2 이다. 이는 설명의 편의를 위한 것이며 N이 2로 한정되는 것은 아니다. 또한 이하에서는 A, B, C, D 대신 각각 11, 10, 01, 00을 이용하여 설명한다.In the LOC information table 200 of FIG. 2, the LOC information bits are represented by four types of A, B, C, and D, which consist of 2 bits. That is, A is 11, B is 10, C is 01, and D is 00. That is, N is two. This is for convenience of description and N is not limited to two. In the following description, 11, 10, 01, and 00 are used instead of A, B, C, and D, respectively.

N은 2 이고 L은 3인 경우이므로, 결국, 노드 타입은 2* { 2}^{3 } = 16 비트의 LOC 정보 비트를 구비한다.Since N is 2 and L is 3, the node type eventually has 2 * {2} ^ {3} = 16 bits of LOC information bits.

데이터 비트 스트림(DSTREAM)의 3 비트중 최상위 비트가 0 이고, 만일 메모리(165)에 저장된 LOC 테이블 값이 LOC 정보 테이블(200)의 LOC 정보 비트들과 같다면 데이터 비트 스트림(DSTREAM)의 3 비트중 최상위 비트 0은 터미널 노드가 된다.If the most significant bit of the 3 bits of the data bit stream DSTREAM is 0, and the LOC table value stored in the memory 165 is equal to the LOC information bits of the LOC information table 200, the 3 bits of the data bit stream DSTREAM The most significant bit of zero is the terminal node.

메모리 검색부(170)에 저장되는 LOC 정보 테이블(200)을 살펴보면, 입력되는 데이터 비트 스트림(DSTREAM)의 3 비트가 0, 1, 00, 01, 10, 11을 포함한다면 0, 1, 00, 01, 10, 11이 지시하는 노드는 터미널 노드가 된다.Referring to the LOC information table 200 stored in the memory retrieval unit 170, if three bits of the input data bit stream DSTREAM include 0, 1, 00, 01, 10, 11, 0, 1, 00, Nodes indicated by 01, 10, and 11 become terminal nodes.

데이터 비트 스트림(DSTREAM)의 3 비트가 000부터 111 사이에 존재한다면000부터 111 사이에 존재하는 데이터 비트 스트림(DSTREAM)이 지시하는 노드는 LOC 정보 비트에 따라 각각 터미널 노드와 연속 노드 및 무효 노드를 모두 나타낼 수 있다. 터미널 노드와 연속 노드 및 무효 노드는 각각 16 비트의 LOC 정보 비트를 가진다.If three bits of the data bit stream (DSTREAM) are present between 000 and 111, the node indicated by the data bit stream (DSTREAM) between 000 and 111 indicates a terminal node, a continuous node, and an invalid node according to the LOC information bits, respectively. Can be represented. The terminal node, the continuous node, and the invalid node each have 16 bits of LOC information bits.

입력되는 데이터 비트 스트림(DSTREAM)의 최상위 비트가 0 이고 만일 0이 지시하는 노드가 터미널 노드라면, 0 터미널 노드는 LOC 정보 비트의 상위 8 비트에 11, 10, 10, 10을 가진다.If the most significant bit of the input data bit stream DSTREAM is 0 and the node indicated by 0 is a terminal node, the 0 terminal node has 11, 10, 10, 10 in the upper 8 bits of the LOC information bit.

입력되는 데이터 비트 스트림(DSTREAM)의 최상위 비트가 1 이고 만일 1이 지시하는 노드가 터미널 노드라면, 1 터미널 노드는 LOC 정보 비트의 하위 8 비트에 11, 10, 10, 10을 가진다.If the most significant bit of the input data bit stream DSTREAM is 1 and the node indicated by 1 is a terminal node, one terminal node has 11, 10, 10, 10 in the lower 8 bits of the LOC information bit.

입력되는 데이터 비트 스트림(DSTREAM)의 상위 2 비트가 00 이고 만일 00이 지시하는 노드가 터미널 노드라면, 00 터미널 노드는 LOC 정보 비트의 상위 4 비트에 11, 10을 가진다.If the upper two bits of the input data bit stream DSTREAM are 00 and the node indicated by 00 is a terminal node, the 00 terminal node has 11 and 10 in the upper four bits of the LOC information bit.

입력되는 데이터 비트 스트림(DSTREAM)의 상위 2 비트가 01 이고 만일 01이 지시하는 노드가 터미널 노드라면, 01 터미널 노드는 LOC 정보 비트의 상위 5 비트에서 8 비트 사이에 11, 10을 가진다.If the upper two bits of the input data bit stream DSTREAM are 01 and the node indicated by 01 is a terminal node, the 01 terminal node has 11 and 10 between the upper five bits and eight bits of the LOC information bit.

입력되는 데이터 비트 스트림(DSTREAM)의 상위 2 비트가 10 이고 만일 10이 지시하는 노드가 터미널 노드라면, 10 터미널 노드는 LOC 정보 비트의 상위 9 비트에서 12 비트 사이에 11, 10을 가진다.If the upper 2 bits of the input data bit stream DSTREAM are 10 and the node indicated by 10 is a terminal node, the 10 terminal node has 11 and 10 between the upper 9 and 12 bits of the LOC information bit.

입력되는 데이터 비트 스트림(DSTREAM)의 상위 2 비트가 11 이고 만일 11이지시하는 노드가 터미널 노드라면, 11 터미널 노드는 LOC 정보 비트의 상위 13 비트에서 16 비트 사이에 11, 10을 가진다.If the upper two bits of the input data bit stream DSTREAM are 11 and the node indicating 11 is a terminal node, the 11 terminal node has 11 and 10 between the upper 13 and 16 bits of the LOC information bit.

입력되는 데이터 비트 스트림(DSTREAM)의 3 비트가 000에서 111중 하나이고 만일 지시하는 노드가 터미널 노드라면, 당해 3비트가 지시하는 터미널 노드는 11을 가진다.If the three bits of the input data bit stream DSTREAM are one of 000 to 111 and the node indicated is a terminal node, the terminal node indicated by the three bits has 11.

입력되는 데이터 비트 스트림(DSTREAM)의 3 비트가 000에서 111중 하나이고 만일 지시하는 노드가 연속 노드라면, 당해 3비트가 지시하는 연속 노드는 01을 가진다.If the three bits of the input data bit stream DSTREAM are one of 000 to 111, and the node indicated is a continuous node, the continuous node indicated by the three bits has 01.

입력되는 데이터 비트 스트림(DSTREAM)의 3 비트가 000에서 111중 하나이고 만일 지시하는 노드가 무효 노드라면, 당해 3비트가 지시하는 무효 노드는 00을 가진다.If the three bits of the input data bit stream DSTREAM are one of 000 to 111 and the node indicated is an invalid node, the invalid node indicated by the three bits has 00.

메모리(165)에 저장되는 LOC 테이블 값(LOCTV)은 도 4의 개념도와 도 2의 LOC 정보 테이블(200)을 이용하여 얻어진다.The LOC table value LOCTV stored in the memory 165 is obtained using the conceptual diagram of FIG. 4 and the LOC information table 200 of FIG. 2.

도 4를 보면 입력되는 데이터 비트 스트림(DSTREAM)이 00 인 경우, 도 4의 00 가지는 터미널 노드 c를 지시한다. 이때의 LOC 정보 비트들은 도 2의 LOC 정보 테이블(200)에서 11 10 으로 표시됨을 알 수 있다. 이 값을 도 5의 LOC 테이블 값(LOCTV)을 나타내는 내용 (Content)부분에 기록한다.Referring to FIG. 4, when the input data bit stream DSTREAM is 00, 00 in FIG. 4 indicates a terminal node c. It can be seen that the LOC information bits at this time are indicated by 11 10 in the LOC information table 200 of FIG. 2. This value is recorded in the Content portion representing the LOC table value LOCTV in FIG.

입력되는 데이터 비트 스트림(DSTREAM)이 010 인 경우, 도 4의 010 가지는 터미널 노드 f를 지시한다. 이때의 LOC 정보 비트들은 도 2의 LOC 정보 테이블(200)에서 11로 표시됨을 알 수 있다. 이 값을 도 5의 LOC 테이블 값(LOCTV)을 나타내는 내용 (Content)부분 중 11과 10 다음에 기록한다.When the input data bit stream DSTREAM is 010, 010 in FIG. 4 indicates a terminal node f. It can be seen that the LOC information bits at this time are indicated by 11 in the LOC information table 200 of FIG. 2. This value is recorded after 11 and 10 of the Content part representing the LOC table value (LOCTV) in FIG.

입력되는 데이터 비트 스트림(DSTREAM)이 011 인 경우, 도 4의 011 가지는 연속 노드를 지시한다. 이때의 LOC 정보 비트들은 도 2의 LOC 정보 테이블(200)에서 01로 표시됨을 알 수 있다. 이 값을 도 5의 LOC 테이블 값(LOCTV)을 나타내는 내용 (Content)부분 중 11과 10 및 11 다음에 기록한다.When the input data bit stream DSTREAM is 011, 011 in FIG. 4 indicates a continuous node. It can be seen that the LOC information bits at this time are indicated by 01 in the LOC information table 200 of FIG. This value is recorded after 11, 10, and 11 of the Content portion representing the LOC table value (LOCTV) in FIG.

입력되는 데이터 비트 스트림(DSTREAM)이 10 인 경우, 도 4의 10 가지는 터미널 노드 a를 지시한다. 이때의 LOC 정보 비트들은 도 2의 LOC 정보 테이블(200)에서 11 10으로 표시됨을 알 수 있다. 이 값을 도 5의 LOC 테이블 값(LOCTV)을 나타내는 내용 (Content)부분 중 11, 10, 11, 01 다음에 기록한다.When the input data bit stream DSTREAM is 10, the 10 branches of FIG. 4 indicate the terminal node a. It can be seen that the LOC information bits at this time are indicated by 11 10 in the LOC information table 200 of FIG. 2. This value is recorded after 11, 10, 11, and 01 of the Content portion representing the LOC table value (LOCTV) in FIG.

입력되는 데이터 비트 스트림(DSTREAM)이 110 인 경우, 도 4의 110 가지는 터미널 노드 g를 지시한다. 이때의 LOC 정보 비트들은 도 2의 LOC 정보 테이블(200)에서 11로 표시됨을 알 수 있다. 이 값을 도 5의 LOC 테이블 값(LOCTV)을 나타내는 내용 (Content)부분 중 11, 10, 11, 01, 11, 10 다음에 기록한다.When the input data bit stream DSTREAM is 110, 110 branches of FIG. 4 indicate the terminal node g. It can be seen that the LOC information bits at this time are indicated by 11 in the LOC information table 200 of FIG. 2. This value is recorded after 11, 10, 11, 01, 11, and 10 of the Content portion representing the LOC table value (LOCTV) in FIG.

입력되는 데이터 비트 스트림(DSTREAM)이 111 인 경우, 도 4의 111 가지는 터미널 노드 b를 지시한다. 이때의 LOC 정보 비트들은 도 2의 LOC 정보 테이블(200)에서 11로 표시됨을 알 수 있다. 이 값을 도 5의 LOC 테이블 값(LOCTV)을 나타내는 내용 (Content)부분 중 11, 10, 11, 01, 11, 10, 11 다음에 기록한다.When the input data bit stream DSTREAM is 111, 111 in FIG. 4 indicates a terminal node b. It can be seen that the LOC information bits at this time are indicated by 11 in the LOC information table 200 of FIG. 2. This value is recorded after 11, 10, 11, 01, 11, 10, 11 of the Content portion representing the LOC table value (LOCTV) in FIG.

그러면 LOC 0에 대응되는 LOC 테이블 값이 모두 완성된다. LOC 어드레스 0은 LOC 0에 대응되고, LOC 어드레스 1은 LOC 1에 대응된다. LOC 0의 연속 노드에서 LOC 1로 연결되는 가지에 표시된 가변 길이 코드 0과 1에 대해서도 LOC 테이블값(LOCTV)을 구할 수 있다.Then all LOC table values corresponding to LOC 0 are completed. LOC address 0 corresponds to LOC 0, and LOC address 1 corresponds to LOC 1. LOC table values (LOCTV) can also be obtained for variable-length codes 0 and 1 indicated on branches from LOC 0 continuous nodes to LOC 1.

도 4에서 R 은 루트 노드이다. 루트 노드에서 LOC 0 으로 가지들이 연결되어 있고 각각의 가지에는 입력되는 데이터 비트 스트림(DSTREAM)이 가변 길이 코드의 형태로 표시되어 있다. 가변 길이 코드는 도 3에 나타나 있다.In Figure 4 R is the root node. Branches are connected to LOC 0 at the root node, and each branch has an input data bit stream (DSTREAM) in the form of variable length code. The variable length code is shown in FIG.

가변 길이 코드의 논리 값이 작은 것이 왼쪽에, 큰 것이 오른 쪽에 배치된다. 가변 길이 코드가 4 비트인 경우는 앞의 3비트가 연속 노드를 지시하도록 하고 당해 연속 노드로부터 가변 길이 코드의 마지막 1 비트가 터미널 노드를 지시하도록 한다.The smaller logical values of variable length codes are placed on the left and the larger on the right. If the variable length code is 4 bits, the first 3 bits indicate the continuous node, and the last 1 bit of the variable length code from the continuous node indicates the terminal node.

도 3에 표시된 가변 길이 코드는 예를 들어 설명한 것일 뿐이므로 심볼 a를 나타내는 가변 길이 코드가 반드시 00일 필요는 없다. 만일 가변 길이 코드가 도 3과 다르다면 도 4의 개념도도 달라질 것이다. 도 5의 표는 메모리(165)에 저장되는 LOC 테이블 값(LOCTV)을 나타낸다.Since the variable length code shown in FIG. 3 is merely an example, the variable length code indicating the symbol a does not necessarily need to be 00. If the variable length code is different from that of FIG. 3, the conceptual diagram of FIG. 4 will also be different. The table of FIG. 5 shows the LOC table value (LOCTV) stored in the memory 165.

주소(Address)로 표시된 부분은 LOC 어드레스를 나타내며 제 1 내지 제 M 룩업 테이블 어드레스 레지스터(140)에 저장되어 있다.The portion indicated by the address indicates the LOC address and is stored in the first to Mth lookup table address registers 140.

입력되는 데이터 비트 스트림(DSTREAM)은 여러 가지 코드 값을 가질 수 있다. 입력되는 데이터 비트 스트림(DSTREAM)의 3 비트가 도 4의 00, 010, 011, 10, 110, 111 중 하나가 아니라면 잘못된 데이터 비트 스트림(DSTREAM)이므로 인터럽트에 의하여 처리된다.The input data bit stream DSTREAM may have various code values. If the 3 bits of the input data bit stream DSTREAM are not one of 00, 010, 011, 10, 110, and 111 of FIG. 4, the data bit stream DSTREAM is an invalid data bit stream DSTREAM and is processed by an interrupt.

데이터 비트 스트림(DSTREAM)이 011000.... 인 경우를 예로 들어 설명한다.A case where the data bit stream DSTREAM is 011000 .... will be described as an example.

제 1 선택 신호(SEL1) 또는 제 2 선택 신호(SEL2)에 의하여 선택부(150)에서LOC 어드레스 값 0 이 출력되면 그 값은 오프셋 레지스터(155)에 저장된다.When the LOC address value 0 is output from the selector 150 by the first select signal SEL1 or the second select signal SEL2, the value is stored in the offset register 155.

메모리(165)에 저장된 LOC 테이블 값(LOCTV)중 LOC 어드레스가 0 인 경우가 선택된다.The case where the LOC address is 0 among the LOC table values LOCTV stored in the memory 165 is selected.

LOC 테이블 값(LOCTV)은 11, 10, 11, 01, 11, 10, 11, 11이고 입력되는 데이터 비트 스트림(DSTREAM)의 3 비트는 011 이다. LOC 테이블 값(LOCTV)을 참고하면 입력되는 데이터 비트 스트림(DSTREAM)이 00, 010, 011, 10, 110, 111인 경우 유효한 입력임을 알 수 있으며, 입력되는 데이터 비트 스트림(DSTREAM)이 011이므로 이는 유효한 입력 값이다. 또한 도 4의 개념도에서 알 수 있듯이, 데이터 비트 스트림(DSTREAM) 011이 지시하는 노드는 터미널 노드가 아니고 연속 노드이고, LOC 테이블 값(LOCTV)을 검색해 보면 011이 연속 노드 일 때의 값을 가지고 있으므로 메모리 검색부(170)는 연속 노드 신호(NCONS)를 발생한다.The LOC table value (LOCTV) is 11, 10, 11, 01, 11, 10, 11, 11 and 3 bits of the input data bit stream DSTREAM are 011. If the data bit stream (DSTREAM) is 00, 010, 011, 10, 110, and 111, the LOC table value (LOCTV) is valid. If the data bit stream (DSTREAM) is 011, Valid input value. Also, as can be seen in the conceptual diagram of FIG. 4, the node indicated by the data bit stream (DSTREAM) 011 is not a terminal node but a continuous node. The memory search unit 170 generates a continuous node signal NCONS.

메모리 제어부(153)의 LOC 어드레스 레지스터(175)는 연속 노드 신호(NCONS)를 수신하여 다음 LOC 어드레스(NLOCADD)를 발생한다.The LOC address register 175 of the memory controller 153 receives the continuous node signal NCONS to generate the next LOC address NLOCADD.

다음 LOC 어드레스(NLOCADD)는 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값이다. 현재의 LOC 어드레스는 0 이고, 현재의 LOC내에서 011을 가리키는 노드를 포함한, 그 이전의 연속 노드는 011 노드 하나 밖에서 없으므로, 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수는 1 이다. 그러므로 다음 LOC 어드레스(NLOCADD)는 1 이다.The next LOC address (NLOCADD) is a sum of the current LOC address and the number of non-terminal nodes before the current node including the current node in the current LOC. The number of non-terminal nodes before the current node, including the current node in the current LOC, since the current LOC address is 0 and there are only one 011 node in front of it, including nodes that point to 011 within the current LOC. Is 1 Therefore, the next LOC address (NLOCADD) is one.

이때 쉬프팅부(130)는 연속 노드 신호(NCONS)에 응답하여 입력되는 데이터비트 스트림(DSTREAM)을 3비트만큼 이동시킨다. 따라서 데이터 비트 스트림(DSTREAM)은 000 이 된다. 합산부(160)는 오프셋 레지스터(155)에 저장되어 있던 값 0 과 다음 LOC 어드레스 1을 더하여 제 3 선택 신호(SEL3)를 1로 출력한다.In this case, the shifting unit 130 moves the data bit stream DSTREAM input by 3 bits in response to the continuous node signal NCONS. Therefore, the data bit stream DSTREAM is 000. The adder 160 adds the value 0 stored in the offset register 155 and the next LOC address 1 to output the third selection signal SEL3 as 1.

오프셋 레지스터(155)에 저장된 처음의 LOC 어드레스 0은 데이터 비트 스트림(DSTREAM)이 터미널 노드를 지정하고 심볼 값으로 디코딩 되기 전까지는 동일한 값을 유지한다. 입력되는 데이터 비트 스트림(DSTREAM)이 심볼 값으로 디코딩 되면 다시 새로운 LOC 어드레스가 제 1 또는 제 2 프리 디코딩부(120)에 의하여 선택되고 새로운 LOC 어드레스가 오프셋 레지스터(155)에 저장된다.The first LOC address 0 stored in the offset register 155 remains the same until the data bit stream DSTREAM specifies a terminal node and is decoded to a symbol value. When the input data bit stream DSTREAM is decoded into a symbol value, a new LOC address is again selected by the first or second pre decoding unit 120 and the new LOC address is stored in the offset register 155.

제 3 선택 신호(SEL3)는 메모리(165)에 저장된 LOC 테이블 값(LOCTV)중 LOC 어드레스가 1 인 경우를 선택하여 메모리 검색부(170)로 인가한다. 또한 제 3 선택 신호(SEL3)는 메모리(165)에 저장된 터미널 값(TERMV)을 선택하여 메모리 검색부(170)로 인가한다.The third select signal SEL3 selects the case where the LOC address is 1 from the LOC table value LOCTV stored in the memory 165 and applies the selected LOC address to the memory search unit 170. In addition, the third selection signal SEL3 selects the terminal value TRMV stored in the memory 165 and applies it to the memory search unit 170.

메모리 검색부(170)는 메모리(165)로부터 출력되는 LOC 테이블 값(LOCTV), 터미널 값(TERMV) 및 데이터 비트 스트림(DSTREAM)의 3비트를 수신한다.The memory search unit 170 receives 3 bits of the LOC table value LOCTV, the terminal value TRMV, and the data bit stream DSTREAM output from the memory 165.

LOC 테이블 값(LOCTV)은 11, 10, 10, 10, 11, 10, 10, 10이고 입력되는 데이터 비트 스트림(DSTREAM)의 3 비트는 000 이다. LOC 테이블 값(LOCTV)을 참고하면 입력되는 데이터 비트 스트림(DSTREAM)이 0, 1인 경우 유효한 입력임을 알 수 있으며, 입력되는 데이터 비트 스트림(DSTREAM) 000중 상위 0 값이 유효한 입력 값이다.The LOC table value (LOCTV) is 11, 10, 10, 10, 11, 10, 10, 10 and 3 bits of the input data bit stream DSTREAM are 000. Referring to the LOCTV value (LOCTV), if the input data bit stream (DSTREAM) is 0 or 1, it can be known as a valid input. The upper 0 value of the input data bit stream (DSTREAM) 000 is a valid input value.

또한 도 4의 개념도에서 알 수 있듯이, 데이터 비트 스트림(DSTREAM) 0이 지시하는 노드는 터미널 노드이다. 도 5의 도표에서 터미널 값(TERMV)은 5임을 알 수 있다. 터미널 값(TERMV)은 메모리(165)에 저장되어 있다. 터미널 값(TERMV)은 LOC 어드레스가 1 인 경우에 대응되는 LOC 1 이전의 터미널 노드의 개수이다. LOC 어드레스가 1인 경우 터미널 값은 5이다. LOC 어드레스가 0 인 경우 터미널 값(TERMV)은 0이다.4, the node indicated by the data bit stream DSTREAM 0 is a terminal node. It can be seen from the diagram of FIG. 5 that the terminal value TRMV is five. The terminal value TRMV is stored in the memory 165. The terminal value TRMV is the number of terminal nodes before LOC 1 corresponding to the case where the LOC address is 1. If the LOC address is 1, the terminal value is 5. If the LOC address is zero, the terminal value (TERMV) is zero.

메모리 검색부(170)는 메모리(165)에서 출력되는 터미널 값(TERMV)을 수신하여 내부에 저장된 심볼 어드레스를 선택하고, 선택된 심볼 어드레스에 대응되는 심볼 어드레스 신호(SYMADDS)를 발생한다.The memory search unit 170 receives a terminal value TRMV output from the memory 165, selects a symbol address stored therein, and generates a symbol address signal SYMADDS corresponding to the selected symbol address.

심볼 어드레스는 현재의 LOC 테이블 값에 대응되는 터미널 값과 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값이다. 현재의 LOC 테이블 값에 대응되는 터미널 값(TERMV)은 5 이고, 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수는 0이다. 즉, 심볼 어드레스는 5가 된다.The symbol address is a value obtained by adding a terminal value corresponding to a current LOC table value and the number of terminal nodes before the current node excluding the current node in the current LOC. The terminal value TRMV corresponding to the current LOC table value is 5, and the number of terminal nodes before the current node except for the current node in the current LOC is 0. That is, the symbol address is five.

도 6에는 심볼 어드레스와 고정 길이 코드 및 심볼이 나타나 있다. 심볼 어드레스가 5 이므로 메모리 검색부(170)는 심볼 e를 선택하기 위한 심볼 어드레스 신호(SYMADDS)가 발생된다.6 shows a symbol address, a fixed length code and a symbol. Since the symbol address is 5, the memory search unit 170 generates a symbol address signal SYMADDS for selecting the symbol e.

심볼 어드레스 레지스터(180)는 심볼 어드레스 신호(SYMADDS)를 저장한 후 심볼 어드레스 신호(SYMADDS)를 고정 길이 코드(SFLC)를 구하기 위한 제 4 선택 신호(SEL4)로서 발생한다.The symbol address register 180 stores the symbol address signal SYMADDS and generates the symbol address signal SYMADDS as a fourth select signal SEL4 for obtaining the fixed length code SFLC.

제 4 선택 신호(SEL4)는 메모리(165)로 인가되어 메모리(165)에 저장되어 있으며, 심볼 e에 대응되는 고정 길이 코드(SFLC)를 출력시킨다.The fourth selection signal SEL4 is applied to the memory 165, stored in the memory 165, and outputs a fixed length code SFLC corresponding to the symbol e.

그러면 메모리 검색부(170)는 메모리(165)에서 출력되는 고정 길이 코드(SFLC)를 수신하고 이를 출력한다.Then, the memory search unit 170 receives the fixed length code SFLC output from the memory 165 and outputs it.

앞서 설명한 과정에 의하여 본 발명의 가변 길이 코드 복호화 장치(100)는 가변 길이 코드로 되어있는 데이터 비트 스트림(DSTREAM)을 3 비트씩 나누어 디코딩 할 수 있으므로 디코딩 속도가 빨라질 수 있다. 또한 제 1 프리 디코딩부(110)와 제 2 프리 디코딩부(120)를 사용함으로써 입력되는 데이터 비트 스트림의 코드 값의 특성에 따라 디코딩 하는 대상 테이블의 사이즈를 줄여 전체적인 전력 소모를 줄일 수 있다.By the above-described process, the variable length code decoding apparatus 100 of the present invention can decode a data bit stream DSTREAM having a variable length code by 3 bits, thereby increasing the decoding speed. In addition, by using the first pre-decoding unit 110 and the second pre-decoding unit 120, it is possible to reduce the overall power consumption by reducing the size of the target table to be decoded according to the characteristics of the code value of the input data bit stream.

데이터 비트 스트림(DSTREAM)을 3 비트씩 디코딩하기 위하여 도 2의 LOC 정보 테이블(200)과 같은 구조의 테이블이 작성되어야 하며 도 2의 LOC 정보 테이블(200)의 LOC 정보 비트들을 표현하는 A, B, C, D 가 2비트의 디지털 값으로 표현된다. 그러나 LOC 정보 비트를 표현하는 A, B, C, D가 반드시 2비트로 한정되는 것은 아니다.In order to decode the data bit stream DSTREAM by three bits, a table having the same structure as that of the LOC information table 200 of FIG. 2 should be created, and A and B representing the LOC information bits of the LOC information table 200 of FIG. 2. , C and D are represented by 2 bit digital values. However, A, B, C, and D representing the LOC information bits are not necessarily limited to 2 bits.

예를 들어, 데이터 비트 스트림(DSTREAM)을 2 비트씩 디코딩할 수도 있다. 이 때, A, B, C, D를 표현하는 비트가 2 비트라면 즉, N이 2라면, LOC 정보 비트는 2* { 2}^{2 } =8 비트를 구비한다.For example, the data bit stream DSTREAM may be decoded by 2 bits. At this time, if the bits representing A, B, C, and D are 2 bits, that is, if N is 2, the LOC information bits have 2 * {2} ^ {2} = 8 bits.

그러면, 도 2의 LOC 정보 테이블은 다음과 같이 변경될 것이다. 즉, 가변 길이 코드가 0, 1인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 00부터 11 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나가 된다.Then, the LOC information table of FIG. 2 will be changed as follows. That is, when the variable length code is 0 and 1, the node type indicated by the variable length code is a terminal node. When the variable length code is present between 00 and 11, the node type indicated by the variable length code is determined by the terminal node. It is either a continuous node or an invalid node.

그리고, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 4 비트가 A B로 표현되고, 가변 길이 코드가 00부터 11인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현될 것이다.If the variable length code is 0, the upper 4 bits of the LOC information bits are represented by AB. If the variable length code is 1, the lower 4 bits of the LOC information bits are represented by AB. In case of 11, LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, LOC information bit is represented by C when the node is a continuous node, and LOC information bit is D by an invalid node. Will be expressed.

도 7은 다른 기술적 과제를 달성하기 위한 본 발명의 제 1 실시예에 따른 가변 길이 코드의 복호화 방법을 나타내는 플로우 차트이다.7 is a flowchart illustrating a method of decoding a variable length code according to a first embodiment of the present invention for achieving another technical problem.

도 8은 도 7의 제 710 단계를 나타내는 플로우 차트이다.8 is a flowchart illustrating operation 710 of FIG. 7.

도 7을 참조하면, 본 발명의 제 1 실시예에 따른 가변 길이 코드 복호화 방법(700)은, 소정의 LOC 어드레스를 각각 구비하는 제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터, 상기 LOC 어드레스에 대응되는 K(K는 자연수) 비트의 LOC 테이블 값 및 소정의 터미널 값을 저장하는 메모리 및 가변 길이 코드를 복호화 하는 기준이 되는 정보를 가지는 LOC 정보 테이블을 구비하는 메모리 검색부를 구비하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법에 있어서, 데이터 비트 스트림을 수신하고 상기 데이터 비트 스트림의 코드 값에 따라 상기 룩업 테이블 어드레스 레지스터중 하나를 선택하는 제 1 또는 제 2 선택 신호를 발생한다.(710 단계)Referring to FIG. 7, the variable length code decoding method 700 according to the first embodiment of the present invention may include first to Mth lookup table address registers each having a predetermined LOC address, and the LOC. A variable length having a memory retrieval unit having a LOC table value of K (K is a natural number) bit corresponding to an address, a memory storing a predetermined terminal value, and a LOC information table having information as a reference for decoding a variable length code A variable length code decoding method of a code decoding apparatus, receiving a data bit stream and generating a first or second selection signal for selecting one of the lookup table address registers according to a code value of the data bit stream. step)

좀더 설명하면, 제 710 단계는, 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 상기 복수개의 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 선택 신호를 발생한다(810 단계)In more detail, step 710 may include a first selection of selecting one of the plurality of lookup table address registers according to the number of 0s or 1s when 0s or 1s are contiguous to the most significant bit MSB of the data bit stream. Generate a signal (step 810).

상기 데이터 비트 스트림의 최상위 비트(MSB)쪽의 N(N은 자연수) 비트를 이용하여 상기 복수개의 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 2 선택 신호를 발생한다.(820 단계)A second selection signal for selecting one of the plurality of lookup table address registers is generated using N bits (N is a natural number) of the most significant bit (MSB) side of the data bit stream (step 820).

상기 제 1 선택 신호 또는 상기 제 2 선택 신호 중 하나 및 상기 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 일정한 비트만큼 이동시킨다.(830 단계)The data bit stream is shifted by a predetermined bit in response to one of the first selection signal or the second selection signal and the continuous node signal (step 830).

상기 제 1 선택 신호 또는 상기 제 2 선택 신호에 응답하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터의 출력들 중 하나를 선택하여 출력한다.(720단계)In response to the first selection signal or the second selection signal, one of the outputs of the first to Mth lookup table address registers is selected and output (step 720).

상기 720 단계의 출력과 정의 다음 LOC 어드레스를 더하여 상기 메모리에 저장된 LOC 테이블의 값 및 상기 LOC 테이블 값에 대응되며 소정의 심볼 어드레스를 구하기 위한 터미널 값을 선택하는 제 3 선택 신호를 발생한다.(730 단계) 상기 다음 LOC 어드레스는 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값인 것을 특징으로 한다.The output of step 720 and the following LOC address are added to generate a third selection signal for selecting a value of a LOC table stored in the memory and a terminal value corresponding to the LOC table value to obtain a predetermined symbol address. Step) The next LOC address is characterized by adding the current LOC address and the number of non-terminal nodes before the current node including the current node in the current LOC.

상기 제 3 선택 신호에 응답하여 선택된 LOC 테이블 값 및 터미널 값을 출력한다.(740 단계) 상기 메모리에서 출력되는 상기 선택된 LOC 테이블 값, 터미널 값 및 상기 데이터 비트 스트림의 L 비트를 수신하고, 상기 LOC 정보 테이블을 이용하여 상기 데이터 비트 스트림의 L 비트가 터미널 노드인지 연속 노드인지를 판단하여 연속 노드 신호 또는 심볼 어드레스 신호를 발생한다.(750 단계) 상기 연속 노드 신호는 상기 데이터 비트 스트림을 3 비트씩 이동시킬 수 있다.The selected LOC table value and the terminal value are output in response to the third selection signal (step 740). The selected LOC table value, the terminal value and the L bit of the data bit stream are output from the memory, and the LOC is received. A continuous node signal or a symbol address signal is generated by determining whether the L bit of the data bit stream is a terminal node or a continuous node using an information table. (Step 750) The continuous node signal generates the data bit stream by 3 bits. You can move it.

상기 연속 노드 신호에 응답하여 상기 LOC 테이블 값을 선택하기 위한 상기 다음 LOC 어드레스를 발생하여 상기 730 단계로 인가한다.(760 단계) 상기 심볼 어드레스 신호에 응답하여 고정 길이 코드를 구하기 위한 제 4 선택 신호를 발생한다.(770 단계)The next LOC address for selecting the LOC table value is generated in response to the continuous node signal, and is applied to step 730. (Step 760) A fourth selection signal for obtaining a fixed length code in response to the symbol address signal. (Step 770).

상기 제 4 선택 신호에 응답하여 상기 메모리로부터 상기 고정 길이 코드를 출력한다.(780 단계)The fixed length code is output from the memory in response to the fourth selection signal (step 780).

상기 심볼 어드레스는 현재의 LOC 테이블 값에 대응되는 터미널 값과 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값인 것을 특징으로 한다.The symbol address may be a value obtained by adding a terminal value corresponding to a current LOC table value and the number of terminal nodes before the current node excluding the current node in the current LOC.

상기 메모리 검색부에 저장되는 LOC 정보 테이블은 상기 제 1 실시예의 LOC 정보 테이블과 동일하므로 여기서 상세한 설명은 생략한다.Since the LOC information table stored in the memory searching unit is the same as the LOC information table of the first embodiment, detailed description thereof will be omitted.

상기 메모리에 저장되는 LOC 테이블 값은 가변 길이 코드가 지시하는 상기 LOC 정보 테이블의 노드 타입에 대응되는 LOC 정보 비트들로 이루어지는 것을 특징으로 한다. 본 발명의 실시예에서 L은 3 일 수 있다.The LOC table value stored in the memory is characterized by consisting of LOC information bits corresponding to the node type of the LOC information table indicated by the variable length code. In an embodiment of the present invention, L may be 3.

도 7 및 도 8의 가변 길이 코드 복호화 방법(700)은 도 1의 가변 길이 코드복호화 장치(100)의 동작에 대응된다. 따라서 가변 길이 코드 복호화 방법(700)의 동작에 대한 상세한 설명은 생략된다.The variable length code decoding method 700 of FIGS. 7 and 8 corresponds to the operation of the variable length code decoding apparatus 100 of FIG. 1. Therefore, a detailed description of the operation of the variable length code decoding method 700 is omitted.

이상에서와 같이 도면과 명세서에서 최적 실시예가 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.As described above, optimal embodiments have been disclosed in the drawings and the specification. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not intended to limit the scope of the invention as defined in the claims or the claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

상술한 바와 같이 본 발명에 따른 가변 길이 코드 복호화 장치 및 방법은 입력되는 데이터 비트 스트림을 3 비트씩 분리하여 디코딩 하므로 빠른 디코딩이 가능하고, 입력되는 데이터 비트 스트림의 코드 값의 특성에 따라 프리 디코딩을 함으로써 디코딩 하는 대상 테이블의 사이즈를 줄여 전체적인 전력 소모를 줄일 수 있는 장점이 있다.As described above, the apparatus and method for variable-length code decoding according to the present invention decodes the input data bit stream by 3 bits so that fast decoding is possible, and pre-decoding is performed according to the characteristics of the code value of the input data bit stream. As a result, the overall power consumption can be reduced by reducing the size of the target table to be decoded.

Claims (19)

데이터 비트 스트림을 수신하고 상기 데이터 비트 스트림의 코드 값에 따라 소정의 제 1 내지 제 M 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 또는 제 2 선택 신호를 발생하는 프리 디코딩부 ;A pre-decoding unit for receiving a data bit stream and generating a first or second selection signal for selecting one of predetermined first to Mth lookup table address registers according to a code value of the data bit stream; 상기 제 1 선택 신호 또는 상기 제 2 선택 신호 중 하나 및 소정의 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 일정한 비트만큼 이동시키는 쉬프팅부 ;A shifting unit for shifting the data bit stream by a predetermined bit in response to one of the first selection signal or the second selection signal and a predetermined continuous node signal; 소정의 메모리에 저장된 K(K는 자연수) 비트의 LOC 테이블 값을 지정하는 LOC 어드레스를 각각 구비하는 제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터 ;First to Mth lookup table address registers each having a LOC address specifying a LOC table value of K (K is a natural number) bits stored in a predetermined memory; 상기 제 1 선택 신호 또는 상기 제 2 선택 신호에 응답하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터의 출력들 중 하나를 선택하여 출력하는 선택부 ;A selector configured to select and output one of outputs of the first to Mth lookup table address registers in response to the first selection signal or the second selection signal; 상기 선택부의 출력을 수신하고, 소정의 연속 노드 신호에 응답하여 상기 메모리에 저장된 LOC 테이블 값 및 상기 LOC 테이블 값에 대응되며 소정의 심볼 어드레스를 구하기 위한 터미널 값을 선택하는 제 3 선택 신호를 발생하거나, 소정의 심볼 어드레스 신호에 응답하여 상기 메모리에 저장된 소정의 고정 길이 코드를 선택하는 제 4 선택 신호를 발생하는 메모리 제어부 ;A third selection signal for receiving an output of the selection unit and selecting a terminal value corresponding to the LOC table value stored in the memory and the LOC table value and obtaining a predetermined symbol address in response to a predetermined continuous node signal; A memory control section for generating a fourth selection signal for selecting a predetermined fixed length code stored in the memory in response to a predetermined symbol address signal; 상기 LOC 테이블 값, 상기 터미널 값 및 상기 고정 길이 코드를 저장하고, 상기 제 3 선택 신호에 응답하여 선택된 상기 LOC 테이블 값 및 상기 터미널 값을 출력하거나 상기 제 4 선택 신호에 응답하여 상기 고정 길이 코드를 출력하는 상기 메모리 ; 및Store the LOC table value, the terminal value and the fixed length code, output the selected LOC table value and the terminal value in response to the third selection signal, or output the fixed length code in response to the fourth selection signal. The memory for outputting; And 상기 메모리에서 출력되는 상기 선택된 LOC 테이블 값, 상기 터미널 값 및 상기 데이터 비트 스트림의 L (L은 자연수)비트를 수신하고, 내부에 저장되어 있는LOC 정보 테이블을 이용하여 상기 데이터 비트 스트림의 L 비트가 터미널 노드인지 연속 노드인지를 판단하여 연속 노드 신호 또는 심볼 어드레스 신호를 발생하거나,Receives the L (L is a natural number) bit of the selected LOC table value, the terminal value, and the data bit stream output from the memory, and L bits of the data bit stream are stored using an internally stored LOC information table. Determine whether it is a terminal node or a continuous node to generate a continuous node signal or a symbol address signal, 상기 메모리에서 출력되는 상기 고정 길이 코드를 수신하여 출력하는 메모리 검색부를 구비하는 것을 특징으로 하는 가변 길이 코드 복호화 장치.And a memory retrieval unit for receiving and outputting the fixed length code output from the memory. 제 1항에 있어서, 상기 프리 디코딩부는,The method of claim 1, wherein the pre-decoding unit, 상기 데이터 비트 스트림을 수신하고, 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 선택 신호를 발생하는 제 1 프리 디코딩부 ; 및Receiving one of the data bit streams and selecting one of the first to Mth lookup table address registers according to the number of zeros or ones when 0 or 1 is consecutive to the most significant bit (MSB) of the data bit stream; A first pre decoding section for generating a first selection signal; And 상기 데이터 비트 스트림을 수신하고, 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽의 N(N은 자연수) 비트를 이용하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 2 선택 신호를 발생하는 제 2 프리 디코딩부를 구비하는 것을 특징으로 하는 가변 길이 코드 복호화 장치.A second selection signal for receiving the data bit stream and selecting one of the first to Mth lookup table address registers using N (N is a natural number) bit of the most significant bit (MSB) side of the data bit stream; And a second pre decoding unit for generating. 제 1항에 있어서, 상기 쉬프팅부는,The method of claim 1, wherein the shifting unit, 상기 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 3비트씩 이동시키는 것을 특징으로 하는 가변 길이 코드 복호화 장치.And varying the data bit stream by three bits in response to the continuous node signal. 제 1항에 있어서, 상기 메모리 제어부는,The method of claim 1, wherein the memory control unit, 상기 선택부의 출력을 수신하고 상기 선택부의 새로운 출력이 수신될 때까지 상기 선택부의 출력을 저장하는 오프셋 레지스터 ;An offset register for receiving the output of the selector and storing the output of the selector until a new output of the selector is received; 상기 오프셋 레지스터의 출력과 소정의 다음 LOC 어드레스를 더하여 상기 메모리에 저장된 LOC 테이블의 값들을 선택하는 제 3 선택 신호를 발생하는 합산부 ;A summation section for generating a third selection signal for selecting values of the LOC table stored in the memory by adding the output of the offset register and a predetermined next LOC address; 상기 연속 노드 신호에 응답하여 LOC 테이블 값을 선택하기 위한 상기 다음 LOC 어드레스를 발생하는 LOC 어드레스 레지스터 ; 및A LOC address register for generating said next LOC address for selecting a LOC table value in response to said continuous node signal; And 상기 심볼 어드레스 신호에 응답하여 상기 고정 길이 코드를 구하기 위한 상기 제 4 선택 신호를 발생하는 심볼 어드레스 레지스터를 구비하는 것을 특징으로 하는 가변 길이 코드 복호화 장치.And a symbol address register for generating said fourth select signal for obtaining said fixed length code in response to said symbol address signal. 제 4항에 있어서, 상기 다음 LOC 어드레스는,The method of claim 4, wherein the next LOC address, 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값인 것을 특징으로 하는 가변 길이 코드 복호화 장치.And a number of non-terminal nodes before the current node including the current node in the current LOC address and the current LOC. 제 1항에 있어서, 상기 심볼 어드레스는,The method of claim 1, wherein the symbol address is, 현재의 LOC 테이블 값에 대응되는 터미널 값과 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값인 것을 특징으로 하는 가변 길이 코드 복호화 장치.And a terminal value corresponding to a current LOC table value and a number of terminal nodes before a current node excluding a current node in a current LOC. 제 1항에 있어서, 상기 메모리 검색부에 저장되는 LOC 정보 테이블은,The LOC information table stored in the memory search unit, 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입을 구비하며,A node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node, 상기 각각의 노드 타입은 N* { 2}^{L } 비트의 LOC 정보 비트를 구비하며,Each node type has a LOC information bit of N * {2} ^ {L} bits. 상기 LOC 정보 비트들은 각각 N 비트로 구성되는 A, B, C, D의 4가지 형태로 표현는 것을 특징으로 하는 가변 길이 코드 복호화 장치.And the LOC information bits are represented by four types of A, B, C, and D each consisting of N bits. 제 7항에 있어서, 상기 메모리 검색부에 저장되는 LOC 정보 테이블은,The LOC information table stored in the memory search unit, 가변 길이 코드가 0, 1, 00, 01, 10, 11인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 000부터 111 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이며,When the variable length code is 0, 1, 00, 01, 10, 11, the node type indicated by the variable length code is a terminal node, and when the variable length code is present between 000 and 111, the variable length code indicates Node type is one of terminal node, continuous node and invalid node, 상기 N 이 2 비트이고, 상기 L 이 3비트라면,If N is 2 bits and L is 3 bits, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 8 비트가 A B B B 로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 8 비트가 A B B B로 표현되고, 가변 길이 코드가 00 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 01 인 경우는 LOC 정보 비트의 상위 5 비트에서 8 비트 사이가 A B로 표현되고, 가변 길이 코드가 10 인 경우는 LOC 정보 비트의 상위 9 비트에서 12 비트 사이가 A B로 표현되고, 가변 길이 코드가 11 인 경우는 LOC 정보 비트의 상위 13 비트에서 16 비트 사이가 A B로 표현되고,If the variable length code is 0, the upper 8 bits of the LOC information bits are represented by ABBB. If the variable length code is 1, the lower 8 bits of the LOC information bits are represented by ABBB. If the upper 4 bits of the LOC information bits are represented by AB, and the variable length code is 01, between the upper 5 bits and the 8 bits of the LOC information bits are represented by AB, and when the variable length code is 10, the LOC information bits When the upper 9 bits to 12 bits are represented by AB, and when the variable length code is 11, the upper 13 bits to 16 bits of the LOC information bit are represented by AB, 가변 길이 코드가 000부터 111인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현되는 것을 특징으로 하는 가변 길이 코드 복호화 장치.If the variable length code is 000 to 111, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the node is a continuous node, and LOC when the node is invalid. And an information bit is represented by D. 제 7항에 있어서, 상기 메모리 검색부에 저장되는 LOC 정보 테이블은,The LOC information table stored in the memory search unit, 가변 길이 코드가 0, 1인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 00부터 11 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이며,When the variable length code is 0 or 1, the node type indicated by the variable length code is a terminal node. When the variable length code is present between 00 and 11, the node type indicated by the variable length code is a terminal node and a continuous node. And the invalid node, 상기 N 이 2 비트이고, 상기 L 이 2비트라면,If N is 2 bits and L is 2 bits, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 4 비트가 A B로 표현되고,If the variable length code is 0, the upper 4 bits of the LOC information bits are represented by A B. If the variable length code is 1, the lower 4 bits of the LOC information bits are represented by A B. 가변 길이 코드가 00부터 11인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현되는 것을 특징으로 하는 가변 길이 코드 복호화 장치.If the variable length code is 00 to 11, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the node is a continuous node, and is an invalid node. And a LOC information bit is represented by D. 제 1항에 있어서, 상기 메모리에 저장되는 LOC 테이블 값은,The method of claim 1, wherein the LOC table value stored in the memory, 가변 길이 코드가 지시하는 상기 LOC 정보 테이블의 노드 타입에 대응되는 LOC 정보 비트들로 이루어지는 것을 특징으로 하는 가변 길이 코드 복호화 장치.And a plurality of LOC information bits corresponding to a node type of the LOC information table indicated by a variable length code. 제 1항에 있어서, 상기 선택부는,The method of claim 1, wherein the selection unit, 멀티플렉서인 것을 특징으로 하는 가변 길이 코드 복호화 장치.A variable length code decoding apparatus, characterized in that the multiplexer. 소정의 LOC 어드레스를 각각 구비하는 제 1 내지 제 M(M은 자연수) 룩업 테이블 어드레스 레지스터, 상기 LOC 어드레스에 대응되는 K(K는 자연수) 비트의 LOC 테이블 값, 소정의 터미널 값 및 고정 길이 코드를 저장하는 메모리 및 가변 길이 코드를 복호화 하는 기준이 되는 정보를 가지는 LOC 정보 테이블을 구비하는 메모리 검색부를 구비하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법에 있어서,A first through Mth lookup table address registers each having a predetermined LOC address, a LOC table value of K (K is a natural number) bits corresponding to the LOC address, a predetermined terminal value, and a fixed length code. A variable length code decoding method of a variable length code decoding apparatus, comprising: a memory retrieving unit having a memory to store and a LOC information table having information as a reference for decoding a variable length code; (a) 데이터 비트 스트림을 수신하고 상기 데이터 비트 스트림의 코드 값에 따라 상기 룩업 테이블 어드레스 레지스터중 하나를 선택하는 제 1 또는 제 2 선택 신호를 발생하는 단계 ;(a) receiving a data bit stream and generating a first or second selection signal for selecting one of the lookup table address registers according to a code value of the data bit stream; (b) 상기 제 1 선택 신호 또는 상기 제 2 선택 신호에 응답하여 상기 제 1 내지 제 M 룩업 테이블 어드레스 레지스터의 출력들 중 하나를 선택하여 출력하는 단계 ;(b) selecting and outputting one of the outputs of the first to Mth lookup table address registers in response to the first selection signal or the second selection signal; (c) 상기 (b) 단계의 출력과 소정의 다음 LOC 어드레스를 더하여 상기 메모리에 저장된 LOC 테이블의 값 및 상기 LOC 테이블 값에 대응되며 소정의 심볼 어드레스를 구하기 위한 터미널 값을 선택하는 제 3 선택 신호를 발생하는 단계 ;(c) a third selection signal for selecting a terminal value for obtaining a predetermined symbol address corresponding to the LOC table value and the LOC table value stored in the memory by adding the output of step (b) and a predetermined next LOC address; Generating a; (d) 상기 제 3 선택 신호에 응답하여 선택된 LOC 테이블 값 및 터미널 값을 출력하는 단계 ;(d) outputting a selected LOC table value and a terminal value in response to the third selection signal; (e) 상기 메모리에서 출력되는 상기 선택된 LOC 테이블 값, 상기 터미널 값 및 상기 데이터 비트 스트림의 L 비트를 수신하고, 상기 LOC 정보 테이블을 이용하여 상기 데이터 비트 스트림의 L 비트가 터미널 노드인지 연속 노드인지를 판단하여 연속 노드 신호 또는 심볼 어드레스 신호를 발생하는 단계 ;(e) receiving the selected LOC table value, the terminal value and the L bit of the data bit stream output from the memory, and using the LOC information table, whether the L bit of the data bit stream is a terminal node or a continuous node; Judging and generating a continuous node signal or a symbol address signal; (f) 상기 연속 노드 신호에 응답하여 상기 LOC 테이블 값을 선택하기 위한 상기 다음 LOC 어드레스를 발생하는 단계 ;(f) generating the next LOC address for selecting the LOC table value in response to the continuous node signal; (g) 상기 심볼 어드레스 신호에 응답하여 상기 고정 길이 코드를 구하기 위한 제 4 선택 신호를 발생하는 단계 ; 및(g) generating a fourth selection signal for obtaining the fixed length code in response to the symbol address signal; And (h) 상기 제 4 선택 신호에 응답하여 상기 메모리로부터 상기 고정 길이 코드를 출력하는 단계를 구비하는 것을 특징으로 하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법.and (h) outputting the fixed length code from the memory in response to the fourth selection signal. 제 12항에 있어서, 상기 (a) 단계는,The method of claim 12, wherein step (a) comprises: (a1) 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽에 0 또는 1이 연속되는 경우, 0 이나 1의 개수에 따라 상기 복수개의 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 1 선택 신호를 발생하는 단계 ;(a1) generating a first selection signal for selecting one of the plurality of lookup table address registers according to the number of zeros or ones when zeros or ones are contiguous with the most significant bit (MSB) of the data bit stream; (a2) 상기 데이터 비트 스트림의 최상위 비트(MSB)쪽의 N(N은 자연수) 비트를 이용하여 상기 복수개의 룩업 테이블 어드레스 레지스터 중 하나를 선택하는 제 2 선택 신호를 발생하는 단계 ; 및(a2) generating a second selection signal for selecting one of the plurality of lookup table address registers using N (N is a natural number) bit of the most significant bit (MSB) side of the data bit stream; And (a3) 상기 제 1 선택 신호 또는 상기 제 2 선택 신호 중 하나 및 상기 연속 노드 신호에 응답하여 상기 데이터 비트 스트림을 일정한 비트만큼 이동시키는 단계를 구비하는 것을 특징으로 하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법.(a3) varying the length of the data bit stream by a predetermined bit in response to one of the first selection signal or the second selection signal and the continuous node signal; Code decryption method. 제 12항에 있어서, 상기 다음 LOC 어드레스는,The method of claim 12, wherein the next LOC address, 현재의 LOC 어드레스와 현재의 LOC에서 현재의 노드를 포함한 현재 노드 이전의 비 터미널 노드의 개수를 더한 값인 것을 특징으로 하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법.A variable length code decoding method of a variable length code decoding apparatus, characterized by adding a current LOC address and a number of non-terminal nodes before a current node including a current node in a current LOC. 제 12항에 있어서, 상기 심볼 어드레스는,The method of claim 12, wherein the symbol address, 현재의 LOC 테이블 값에 대응되는 터미널 값과 현재의 LOC에서 현재의 노드를 제외한 현재 노드 이전의 터미널 노드의 개수를 더한 값인 것을 특징으로 하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법.And a terminal value corresponding to a current LOC table value and the number of terminal nodes before the current node excluding the current node in the current LOC. 제 12항에 있어서, 상기 메모리 검색부에 저장되는 LOC 정보 테이블은,The LOC information table stored in the memory search unit, 가변 길이 코드(variable length code)가 지시하는 노드가 터미널 노드인지 연속 노드인지 무효 노드인지를 나타내는 노드 타입을 구비하며,A node type indicating whether a node indicated by a variable length code is a terminal node, a continuous node, or an invalid node, 상기 각각의 노드 타입은 N* { 2}^{L } 비트의 LOC 정보 비트를 구비하며,Each node type has a LOC information bit of N * {2} ^ {L} bits. 상기 LOC 정보 비트들은 각각 N 비트로 구성되는 A, B, C, D의 4가지 형태로 표현는 것을 특징으로 하는 가변 길이 코드 복호화 장치.And the LOC information bits are represented by four types of A, B, C, and D each consisting of N bits. 제 16항에 있어서, 상기 메모리 검색부에 저장되는 LOC 정보 테이블은,The method of claim 16, wherein the LOC information table stored in the memory search unit, 가변 길이 코드가 0, 1, 00, 01, 10, 11인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 000부터 111 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이며,When the variable length code is 0, 1, 00, 01, 10, 11, the node type indicated by the variable length code is a terminal node, and when the variable length code is present between 000 and 111, the variable length code indicates Node type is one of terminal node, continuous node and invalid node, 상기 N 이 2 비트이고, 상기 L 이 3비트라면,If N is 2 bits and L is 3 bits, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 8 비트가 A B B B 로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 8 비트가 A B B B로 표현되고, 가변 길이 코드가 00 인 경우는 LOC 정보 비트의 상위 4 비트가A B로 표현되고, 가변 길이 코드가 01 인 경우는 LOC 정보 비트의 상위 5 비트에서 8 비트 사이가 A B로 표현되고, 가변 길이 코드가 10 인 경우는 LOC 정보 비트의 상위 9 비트에서 12 비트 사이가 A B로 표현되고, 가변 길이 코드가 11 인 경우는 LOC 정보 비트의 상위 13 비트에서 16 비트 사이가 A B로 표현되고,If the variable length code is 0, the upper 8 bits of the LOC information bits are represented by ABBB. If the variable length code is 1, the lower 8 bits of the LOC information bits are represented by ABBB. If the upper 4 bits of the LOC information bits are represented by AB, and the variable length code is 01, between the upper 5 bits and the 8 bits of the LOC information bits are represented by AB, and if the variable length code is 10, the LOC information bits When the upper 9 bits to 12 bits are represented by AB, and when the variable length code is 11, the upper 13 bits to 16 bits of the LOC information bit are represented by AB, 가변 길이 코드가 000부터 111인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현되는것을 특징으로 하는 가변 길이 코드 복호화 장치.If the variable length code is 000 to 111, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the node is a continuous node, and is an invalid node. And a LOC information bit is represented by D. 제 16항에 있어서, 상기 메모리 검색부에 저장되는 LOC 정보 테이블은,The method of claim 16, wherein the LOC information table stored in the memory search unit, 가변 길이 코드가 0, 1인 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드이고, 가변 길이 코드가 00부터 11 사이에 존재하는 경우 상기 가변 길이 코드가 지시하는 노드 타입은 터미널 노드와 연속 노드 및 무효 노드 중 어느 하나이며,When the variable length code is 0 or 1, the node type indicated by the variable length code is a terminal node. When the variable length code is present between 00 and 11, the node type indicated by the variable length code is a terminal node and a continuous node. And the invalid node, 상기 N 이 2 비트이고, 상기 L 이 2비트라면,If N is 2 bits and L is 2 bits, 가변 길이 코드가 0 인 경우는 LOC 정보 비트의 상위 4 비트가 A B로 표현되고, 가변 길이 코드가 1 인 경우는 LOC 정보 비트의 하위 4 비트가 A B로 표현되고,If the variable length code is 0, the upper 4 bits of the LOC information bits are represented by A B. If the variable length code is 1, the lower 4 bits of the LOC information bits are represented by A B. 가변 길이 코드가 00부터 11인 경우에는 상기 가변 길이 코드가 지시하는 노드 타입이 터미널 노드인 경우 LOC 정보 비트가 A로 표현되고, 연속 노드인 경우 LOC 정보 비트가 C로 표현되고, 무효 노드인 경우 LOC 정보 비트가 D로 표현되는 것을 특징으로 하는 가변 길이 코드 복호화 장치.If the variable length code is 00 to 11, the LOC information bit is represented by A when the node type indicated by the variable length code is a terminal node, and the LOC information bit is represented by C when the node is a continuous node, and is an invalid node. And a LOC information bit is represented by D. 제 12항에 있어서, 상기 메모리에 저장되는 LOC 테이블 값은,The method of claim 12, wherein the LOC table value stored in the memory, 가변 길이 코드가 지시하는 상기 LOC 정보 테이블의 노드 타입에 대응되는 LOC 정보 비트들로 이루어지는 것을 특징으로 하는 가변 길이 코드 복호화 장치의 가변 길이 코드 복호화 방법.And a LOC information bits corresponding to the node type of the LOC information table indicated by the variable length code.
KR10-2002-0045975A 2002-08-03 2002-08-03 Decoding apparatus for variable length code and method thereof KR100486251B1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
KR10-2002-0045975A KR100486251B1 (en) 2002-08-03 2002-08-03 Decoding apparatus for variable length code and method thereof
TW092120370A TWI223501B (en) 2002-08-03 2003-07-25 Apparatus and method for decoding variable length code
US10/632,010 US6809665B2 (en) 2002-08-03 2003-07-31 Apparatus and method for decoding variable length code
JP2003285402A JP4098187B2 (en) 2002-08-03 2003-08-01 Variable length code decoding apparatus and method
CNB031602657A CN1256848C (en) 2002-08-03 2003-08-03 Device for decoding and variable length coding and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2002-0045975A KR100486251B1 (en) 2002-08-03 2002-08-03 Decoding apparatus for variable length code and method thereof

Publications (2)

Publication Number Publication Date
KR20040012403A true KR20040012403A (en) 2004-02-11
KR100486251B1 KR100486251B1 (en) 2005-05-03

Family

ID=31185797

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2002-0045975A KR100486251B1 (en) 2002-08-03 2002-08-03 Decoding apparatus for variable length code and method thereof

Country Status (5)

Country Link
US (1) US6809665B2 (en)
JP (1) JP4098187B2 (en)
KR (1) KR100486251B1 (en)
CN (1) CN1256848C (en)
TW (1) TWI223501B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7439886B2 (en) 2005-12-29 2008-10-21 Samsung Electronics Co., Ltd. Variable-length decoder, video decoder and image display system having the same, and variable-length decoding method
KR101009725B1 (en) * 2008-09-04 2011-01-19 한국전자통신연구원 Table generation method for decoding variable-length codes

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0717576U (en) * 1993-09-07 1995-03-28 株式会社野口紙工 Binding device
US7594098B2 (en) * 2005-07-01 2009-09-22 Stmicroelectronics, Sa Processes and devices for compression and decompression of executable code by a microprocessor with RISC architecture and related system
US7974517B2 (en) * 2005-10-05 2011-07-05 Broadcom Corporation Determination of decoding information
JP2007312323A (en) * 2006-05-22 2007-11-29 Osaka Univ Data compression method, data compressor, computer program, and computer readable recording medium
WO2008087750A1 (en) * 2007-01-19 2008-07-24 Mitsubishi Electric Corporation Table device, variable-length encoding device, variable-length decoding device, and variable-length encoding/decoding device
JP2010176277A (en) * 2009-01-28 2010-08-12 Sanyo Electric Co Ltd Data transfer system
JP4764488B2 (en) * 2009-03-16 2011-09-07 株式会社東芝 Decoding device and decoding method
US9034850B2 (en) 2009-11-20 2015-05-19 Sk Chemicals Co., Ltd. Gonadotropin releasing hormone receptor antagonist, preparation method thereof and pharmaceutical composition comprising the same
JP2012033032A (en) * 2010-07-30 2012-02-16 Sony Corp Information processing device and method
TWI420830B (en) * 2010-12-31 2013-12-21 Ind Tech Res Inst Dynamic decoding lookup table generation method and electronic device applying the same
CN103327314B (en) * 2012-03-22 2016-06-29 上海算芯微电子有限公司 Variable-length decoder and method based on general format code table
CN103905054B (en) * 2012-12-25 2017-05-24 展讯通信(上海)有限公司 Code table establishing method and device, and encoding and decoding method and device
CN104427530B (en) * 2013-08-29 2019-05-31 锐迪科(重庆)微电子科技有限公司 A kind of control channel detection method and device
CN105980978B (en) * 2014-12-13 2019-02-19 上海兆芯集成电路有限公司 For detecting the logic analyzer of pause
CN116208667A (en) * 2023-01-18 2023-06-02 中国电子科技集团公司第二十八研究所 Variable-length high-compression bit message coding and decoding method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5842033A (en) * 1992-06-30 1998-11-24 Discovision Associates Padding apparatus for passing an arbitrary number of bits through a buffer in a pipeline system
US5226082A (en) * 1992-07-02 1993-07-06 At&T Bell Laboratories Variable length decoder
US5675332A (en) * 1996-02-01 1997-10-07 Samsung Electronics Co., Ltd. Plural-step chunk-at-a-time decoder for variable-length codes of Huffman type
US5841380A (en) * 1996-03-29 1998-11-24 Matsushita Electric Corporation Of America Variable length decoder and method for decoding two codes per clock cycle
US5990812A (en) * 1997-10-27 1999-11-23 Philips Electronics North America Corporation Universally programmable variable length decoder

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7439886B2 (en) 2005-12-29 2008-10-21 Samsung Electronics Co., Ltd. Variable-length decoder, video decoder and image display system having the same, and variable-length decoding method
KR101009725B1 (en) * 2008-09-04 2011-01-19 한국전자통신연구원 Table generation method for decoding variable-length codes
US7994948B2 (en) 2008-09-04 2011-08-09 Electronics And Telecommunications Research Institute Table generation method for decoding variable-length codes

Also Published As

Publication number Publication date
KR100486251B1 (en) 2005-05-03
TWI223501B (en) 2004-11-01
CN1256848C (en) 2006-05-17
US20040021593A1 (en) 2004-02-05
CN1496127A (en) 2004-05-12
JP2004096735A (en) 2004-03-25
TW200402940A (en) 2004-02-16
JP4098187B2 (en) 2008-06-11
US6809665B2 (en) 2004-10-26

Similar Documents

Publication Publication Date Title
KR100486251B1 (en) Decoding apparatus for variable length code and method thereof
US5696507A (en) Method and apparatus for decoding variable length code
US5600812A (en) Variable-length-code decoders storing decoding results and corresponding code-bit-length information in memory
US5841381A (en) Huffman coding/decoding using an intermediate code number
KR100748485B1 (en) A variable length codeword decoder and a variable length codeword decoding method
US6546053B1 (en) System and method for decoding signal and method of generating lookup table for using in signal decoding process
JP3189876B2 (en) Variable length code decoding circuit
JP4079965B2 (en) Decryption system
JP4841496B2 (en) Variable length code decoding apparatus
KR19980702418A (en) Variable length decoder
US6518896B1 (en) Multiple symbol length lookup table
JP3853439B2 (en) High speed variable length code decoding apparatus and high speed variable length code decoding method
JP3429623B2 (en) High-speed variable-length code decoding device
JP3304745B2 (en) Variable length code decoder
KR0152035B1 (en) Method and apparatus of variable length decode
JP2934603B2 (en) Method and apparatus for decoding variable length code
KR100207428B1 (en) Variable length coding apparatus and method adaptive to changes of the hoffman codes
JPH0653840A (en) Variable length decoder
JP2710917B2 (en) Header detector and decoding device using the same
KR100462060B1 (en) UVLC Multiple Decoding Method
JP3332630B2 (en) Decoding device and decoding table generation method
JP4466382B2 (en) Codeword extraction apparatus and method, decoding apparatus, and image reproduction apparatus
KR0125126B1 (en) High-speed apparatus for decoding variable length code
KR20050066142A (en) Apparatus and method of context-based adaptive variable length decoding
KR950008487B1 (en) Vlc decoding device and method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20090415

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee