KR100686354B1 - Huffman decoding method and device for using variable length tree - Google Patents

Huffman decoding method and device for using variable length tree Download PDF

Info

Publication number
KR100686354B1
KR100686354B1 KR1020050109795A KR20050109795A KR100686354B1 KR 100686354 B1 KR100686354 B1 KR 100686354B1 KR 1020050109795 A KR1020050109795 A KR 1020050109795A KR 20050109795 A KR20050109795 A KR 20050109795A KR 100686354 B1 KR100686354 B1 KR 100686354B1
Authority
KR
South Korea
Prior art keywords
information
bitstream
input
clock
bit
Prior art date
Application number
KR1020050109795A
Other languages
Korean (ko)
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 KR1020050109795A priority Critical patent/KR100686354B1/en
Application granted granted Critical
Publication of KR100686354B1 publication Critical patent/KR100686354B1/en

Links

Images

Classifications

    • 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/4093Variable length to variable length coding
    • 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/60General implementation details not specific to a particular type of compression
    • H03M7/6011Encoder aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A Huffman decoding method using a variable length tree and an apparatus thereof are provided to reduce a waste of a memory by reducing a generation of a non-terminal node through the variable length tree. A storing unit(140) stores data information to include segment information and symbol information for a coded code word, and data information including stream information to be received in an n+1 clock. A demultiplexer(110) receives a stream input control order or offset information of an n-1 clock. The demultiplexer(110) receives a variable bit stream from an external buffer according to the stream input control order. A bit movement unit(120) performs an operation when a bit stream is below a reference bit stream, and generates offset information by shifting the bit stream. An address determining unit(130) receives the offset information and the segment information of the n-1 clock, and calculates an address value by adding the offset information to the segment information. A control unit(150) reads and analyzes the data information from the storing unit(140) based on the calculated address value. The control unit(150) outputs the symbol information if index information is included in the read data information. The control unit(150) generates and outputs the segment information and the stream input control order if the symbol information is not included in the data information.

Description

가변 트리를 이용한 허프만 복호화 방법 및 장치{Huffman decoding method and device for using variable length tree }Huffman decoding method and device for using variable length tree

도 1은 본 발명의 바람직한 일 실시예에 따른 허프만 복호화 장치의 블록도.1 is a block diagram of a Huffman decoding apparatus according to an embodiment of the present invention.

도 2는 본 발명의 바람직한 일 실시예에 따른 제1 허프만 코드북 내지 제3 허프만 코드북을 예시한 도면.2 illustrates a first Huffman codebook to a third Huffman codebook according to an embodiment of the present invention.

도 3은 본 발명의 바람직한 일 실시예에 따른 허프만 코드북을 가변 트리로 나타낸 예시도.3 is an exemplary diagram showing a Huffman codebook in a variable tree according to an embodiment of the present invention.

도 4는 본 발명의 바람직한 일 실시예에 따른 가변 길이 트리 검색을 위한 메모리 구조를 테이블 형식으로 나타낸 예시도.4 is an exemplary diagram showing a memory structure for a variable length tree search in a table form according to an embodiment of the present invention.

도 5는 허프만 코드북을 종래의 이진 트리로 나타낸 예시도.5 illustrates an Huffman codebook as a conventional binary tree.

도 6은 종래의 이진 트리 검색을 위한 메모리 구조를 테이블 형식으로 나타낸 예시도.6 is an exemplary diagram showing a memory structure for a conventional binary tree search in a table format.

도 7a 내지 도 7c는 본 발명의 바람직한 일 실시예에 따른 저장부에 저장된 주소와 데이터의 형식을 예시한 도면.7A to 7C illustrate the format of an address and data stored in a storage unit according to an exemplary embodiment of the present invention.

도 8은 본 발명의 바람직한 일 실시예에 따른 허프만 복호화 장치의 동작 수행 과정을 나타낸 순서도.8 is a flowchart illustrating an operation of an Huffman decoding apparatus according to an embodiment of the present invention.

<도면의 주요 부분에 대한 부호의 설명> <Explanation of symbols for the main parts of the drawings>

110 : 역 다중화부110: demultiplexer

120 : 비트 이동부120: bit moving part

130 : 주소값 산출부130: address value calculation unit

140 : 저장부140: storage unit

150 : 제어부150: control unit

본 발명은 허프만 복호화 방법 및 장치에 관한 것으로, 특히 가변 트리를 이용한 허프만 복호화 방법 및 장치에 관한 것이다.The present invention relates to a Huffman decoding method and apparatus, and more particularly, to a Huffman decoding method and apparatus using a variable tree.

일반적으로 허프만 알고리즘은 무손실 압축(lossless compression) 기법의 하나로 엔트로피(entropy) 압축이 가능한 압축 기법이다. 허프만 알고리즘은 데이터들의 발생 빈도를 고려하여 서로 다른 길이의 부호를 할당함으로써 데이터 압축을 수행하며, 발생 빈도가 높은 데이터들에 대해서는 작은 부호를 할당하며 발생 빈도가 적은 데이터들에 대해서는 긴 부호를 할당하여 데이터 압축 성능을 향상시켰다. 허프만 알고리즘은 널리 알려진 바와 같이, 동영상, 정지 영상(still image) 및 오디오 데이터를 압축하기 위해 널리 사용되고 있다. In general, the Huffman algorithm is one of lossless compression techniques and is a compression technique capable of entropy compression. Huffman algorithm performs data compression by allocating codes of different lengths in consideration of the frequency of occurrence of data, and assigns small codes to frequently occurring data and long codes for less frequently occurring data. Improved data compression performance. Huffman algorithms are widely used to compress video, still images and audio data, as is well known.

종래의 이진 트리를 이용한 허프만 코딩 방법은 최대 및 평균 검색 시간 및 검색 시간의 편차 측면에서 매우 효율적인 방법으로 간주되어 왔다. 그러나 종래의 이진 트리를 이용한 허프만 코딩 방법은 이진 트리를 구성하는 복잡한 방법과 이진 트리의 특성으로 인해 실제 심볼보다 많은 수의 비 단말 노드의 생성으로 인한 메모리 낭비, 이진 트리 검색에 따른 노드 간의 이동을 위해 수행하는 비교 횟수 증가로 인해 전체 성능 저하 등과 같은 많은 문제점이 존재하였다. The Huffman coding method using a conventional binary tree has been regarded as a very efficient method in terms of maximum and average search time and deviation of search time. However, the Huffman coding method using the binary tree is a complex method of constructing a binary tree and the characteristics of the binary tree prevent memory waste due to the generation of more non-terminal nodes than actual symbols, and the movement between nodes due to the binary tree search. Due to the increase in the number of comparisons performed, there are many problems such as overall performance degradation.

따라서, 상술한 문제점을 해결하기 위한 본 발명의 목적은 가변 길이 트리를 이용하여 허프만 알고리즘을 이용하여 검색 단계를 줄여 전체적인 성능을 향상시킬 수 있는 허프만 복호화 장치 및 방법을 제공하는 것이다.Accordingly, an object of the present invention to solve the above problems is to provide a Huffman decoding apparatus and method that can improve the overall performance by reducing the search step using the Huffman algorithm using a variable length tree.

본 발명의 다른 목적은 가변 길이 트리를 이용함으로써 비 단말 노드의 생성을 줄여 결과적으로 메모리의 낭비를 줄일 수 있는 허프만 복호화 장치 및 방법을 제공하는 것이다.Another object of the present invention is to provide a Huffman decoding apparatus and method that can reduce the generation of non-terminal nodes by using a variable length tree, and consequently a waste of memory.

본 발명의 또 다른 목적은 적은 면적의 로직 게이트와 작은 메모리를 사용하여 MPEG 오디오 복호화기의 허프만 복호화기에 적용할 수 있는 허프만 복호화 장치 및 방법을 제공하는 것이다.It is still another object of the present invention to provide a Huffman decoding apparatus and method which can be applied to a Huffman decoder of an MPEG audio decoder using a small area of logic gate and a small memory.

본 발명의 또 다른 목적은 복호화 주기 편차를 현저하게 줄여 쉽게 클럭을 제어할 수 있으며 코드워드를 저장하지 않음으로써 메모리의 총 비트 수를 절반으로 줄일 수 있는 허프만 복호화 장치 및 방법을 제공하는 것이다.It is still another object of the present invention to provide a Huffman decoding apparatus and method which can easily control a clock by significantly reducing a decoding period deviation and can reduce the total number of bits of a memory by half by not storing a codeword.

이외의 본 발명의 목적들은 하기의 실시예에 대한 설명을 통해 쉽게 이해될 수 있을 것이다.Other objects of the present invention will be easily understood through the description of the following examples.

상술한 목적을 달성하기 위하여, 본 발명의 일 측면에 따르면, 가변적으로 비트스트림을 입력받아 복호화할 수 있는 허프만 복호화 장치가 제공된다.In order to achieve the above object, according to an aspect of the present invention, there is provided a Huffman decoding apparatus that can variably receive and decode a bitstream.

본 발명의 바람직한 일 실시예에 따르면, 허프만 코딩(coding)을 이용하여 부호화된 코드워드에 대한 세그먼트 정보 및 심볼 정보와 n+1 클럭에서 입력받을 스트림 정보를 포함하는 데이터 정보를 저장하고 있는 저장부; n-1 클럭의 스트림 입력 제어 명령 또는 오프셋 정보를 입력받아, 외부 버퍼로부터 스트림 입력 제어 명령에 따라 가변적으로 비트스트림을 입력받아 전달하는 역 다중화부; 상기 비트스트림이 기준 비트스트림이하이면 동작을 수행하여 상기 비트스트림을 자리 이동하여 오프셋 정보를 생성하는 비트 이동부; 상기 오프셋 정보와 n-1 클럭의 세그먼트 정보를 입력받아 상기 오프셋 정보와 상기 세그먼트 정보를 더하여 주소값을 산출하는 주소 결정부; 및 상기 산출된 주소값을 이용하여 상기 저장부로부터 데이터 정보를 독출하여 분석하여 인덱스 심볼 정보가 포함되어 있으면 상기 심볼 정보를 출력하고, 상기 심볼 정보가 포함되어 있지 않으면 세그먼트 정보와 스트림 입력 제어 명령을 생성하여 출력하는 제어부를 포함하는 허프만 복호화 장치가 제공될 수 있다. According to a preferred embodiment of the present invention, a storage unit for storing data information including segment information and symbol information on a codeword coded using Huffman coding and stream information to be input at an n + 1 clock. ; a demultiplexer which receives a stream input control command or offset information of an n-1 clock and variably receives a bitstream according to the stream input control command from an external buffer; A bit shifter for performing offset operation to shift the bitstream to generate offset information when the bitstream is less than or equal to a reference bitstream; An address determination unit receiving the offset information and segment information of the n-1 clock and calculating the address value by adding the offset information and the segment information; And read and analyze data information from the storage unit using the calculated address value to output the symbol information if index symbol information is included. If the symbol information is not included, segment information and stream input control command are issued. A Huffman decoding apparatus including a control unit for generating and outputting may be provided.

상기 입력된 비트스트림이 1비트이며 그 값이 0(zero)이면, 상기 역 다중화 부는 n-1 클럭의 오프셋 정보를 입력받아 출력할 수 있다.If the input bitstream is 1 bit and its value is 0, the demultiplexer may receive and output offset information of n-1 clocks.

상기 역 다중화부가 상기 버퍼로부터 처음으로 비트스트림을 입력받는 경우, 상기 역 다중화부는 1비트만을 입력받아 상기 비트 이동부로 전달하며, 상기 비트 이동부는 상기 1비트를 자리 이동하지 않고 오프셋 정보를 생성할 수 있다.When the demultiplexer receives the bitstream for the first time from the buffer, the demultiplexer receives only 1 bit and transfers the bitstream to the bit shifter, and the bit shifter can generate offset information without shifting the 1-bit. have.

상기 스트림 입력 제어 명령은 상기 버퍼로부터 입력받을 비트스트림에 대한 크기 정보일 수 있다. The stream input control command may be size information of a bitstream to be input from the buffer.

상기 비트 이동부는 상기 역 다중화부로부터 입력된 비트스트림이 2비트 이하인 경우 동작을 수행하여 상기 비트스트림을 왼쪽으로 자리 이동하여 오프셋 정보를 생성할 수 있다.The bit shifter may generate offset information by shifting the bitstream to the left by performing an operation when the bitstream input from the demultiplexer is 2 bits or less.

본 발명의 다른 측면에 따르면, 가변 길이 트리를 이용하여 허프만 알고리즘에 의해 부호화된 비트스트림을 입력받아 임의의 코드워드에 상응하는 심볼 정보를 출력하는 방법 및 그 방법을 수행하기 위한 프로그램을 기록한 기록 매체가 제공된다.According to another aspect of the present invention, a method for receiving a bitstream encoded by a Huffman algorithm using a variable length tree and outputting symbol information corresponding to an arbitrary codeword, and a recording medium having recorded thereon a program for performing the method. Is provided.

본 발명의 일 실시예에 따르면, 가변 길이 트리를 이용하여 허프만 알고리즘에 의해 부호화된 비트스트림을 입력받아 임의의 코드워드에 상응하는 심볼 정보를 출력하는 방법에 있어서, n-1 클럭으로부터 입력된 스트림 입력 제어 명령에 따라 가변적으로 비트스트림을 입력받는 단계; 상기 입력된 비트스트림이 기준 비트스트림이하인지 여부를 판단하는 단계; 상기 기준 비트스트림 이하이면 입력된 비트스트림을 자리 이동하여 오프셋 정보를 생성하는 단계; 상기 오프셋 정보와 n-1 클럭 의 세그먼트 정보를 더하여 주소 값을 산출하는 단계; 상기 주소 값에 저장된 데이터를 독출하여 분석하여 인덱스의 심볼 정보를 포함하고 있는지 여부를 판단하는 단계; 및 상기 심볼 정보를 포함하고 있다면, 상기 심볼 정보를 추출하여 출력하는 단계를 포함하는 가변 길이 트리를 이용한 허프만 복호화 방법이 제공될 수 있다.According to an embodiment of the present invention, in a method of receiving a bitstream encoded by a Huffman algorithm using a variable length tree and outputting symbol information corresponding to an arbitrary codeword, the stream input from an n-1 clock Receiving a bitstream variably according to an input control command; Determining whether the input bitstream is less than or equal to a reference bitstream; Generating offset information by shifting the input bitstream if it is less than or equal to the reference bitstream; Calculating an address value by adding the offset information and segment information of an n-1 clock; Reading and analyzing data stored in the address value to determine whether it includes symbol information of an index; And if the symbol information is included, a Huffman decoding method using a variable length tree including extracting and outputting the symbol information.

상기 입력된 비트스트림이 1비트이며 그 값이 0(zero)인지 여부를 판단하는 단계; 및 0(zero)라고 판단되면, n-1 클럭의 오프셋 정보를 입력받아 출력하는 단계를 더 포함할 수 있다.Determining whether the input bitstream is one bit and its value is zero; And if it is determined as 0 (zero), receiving and outputting offset information of the n-1 clock.

상기 심볼 정보를 포함하고 있지 않다면, n+1 클럭의 세그먼트 정보와 스트림 입력 제어 명령을 생성하는 단계를 더 포함할 수 있다.If the symbol information is not included, the method may further include generating segment information of the n + 1 clock and a stream input control command.

상기 입력된 비트스트림이 최초 입력인지 여부를 판단하는 단계; 최초 입력이면, 1비트 데이터만을 입력받는 단계; 및 상기 입력된 1비트 데이터를 이용하여 주소 값을 산출하는 단계를 더 포함할 수 있다.Determining whether the input bitstream is an initial input; Receiving only 1-bit data if it is the first input; And calculating an address value using the input 1-bit data.

상기 기준 비트스트림이하가 아니면, 입력된 비트스트림을 자리 이동 없이 오프셋 정보를 생성하는 단계를 더 포함할 수 있다.If it is not less than the reference bitstream, the method may further include generating offset information without shifting the input bitstream.

본 발명의 다른 실시예에 따르면, 가변 길이 트리를 이용하여 허프만 알고리즘에 의해 부호화된 비트스트림을 입력받아 임의의 코드워드의 인덱스 정보를 검색하는 복호화 방법을 수행하기 위해 디지털 처리 장치에 의해 실행될 수 있는 명령어의 프로그램이 유형적으로 구현되어 있으며, 상기 디지털 처리 장치에 의해 판독될 수 있는 프로그램을 기록한 기록매체에 있어서, n-1 클럭으로부터 입력된 스트림 입력 제어 명령에 따라 가변적으로 비트스트림을 입력받는 단계; 상기 입력된 비트스트림이 기준 비트스트림이하인지 여부를 판단하는 단계; 상기 기준 비트스트림 이하이면 입력된 비트스트림을 자리 이동하여 오프셋 정보를 생성하는 단계; 상기 오프셋 정보와 n-1 클럭의 세그먼트 정보를 더하여 주소 값을 산출하는 단계; 상기 주소 값에 저장된 데이터를 독출하여 분석하여 인덱스의 심볼 정보를 포함하고 있는지 여부를 판단하는 단계; 및 상기 심볼 정보를 포함하고 있다면, 상기 심볼 정보를 추출하여 출력하는 단계를 수행하는 프로그램을 기록한 기록 매체가 제공될 수 있다.According to another embodiment of the present invention, the digital processing apparatus may be executed by a digital processing apparatus to perform a decoding method of receiving a bitstream encoded by a Huffman algorithm using a variable length tree and searching index information of an arbitrary codeword. A recording medium in which a program of instructions is tangibly embodied, and recording a program that can be read by the digital processing apparatus, the recording medium comprising: receiving a bitstream variably according to a stream input control command input from an n-1 clock; Determining whether the input bitstream is less than or equal to a reference bitstream; Generating offset information by shifting the input bitstream if it is less than or equal to the reference bitstream; Calculating an address value by adding the offset information and segment information of an n-1 clock; Reading and analyzing data stored in the address value to determine whether it includes symbol information of an index; And a recording medium having a program for performing the step of extracting and outputting the symbol information, if the symbol information is included.

이하, 본 발명의 바람직한 실시예를 첨부한 도면들을 참조하여 상세히 설명하기로 한다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

본 발명은 가변 길이 트리를 이용한 허프만(Huffman) 코딩(coding)을 이용하여 부호화된 오디오 데이터(예를 들어, MP3(MPEG-1 Layer3, AAC 등)의 비트스트림에서 한번에 여러 비트를 입력받아 원하는 코드워드(codeword)의 인덱스 값을 출력할 수 있다.According to the present invention, a desired code is received by receiving several bits at a time from a bitstream of audio data (for example, MP3 (MPEG-1 Layer3, AAC, etc.)) encoded using Huffman coding using a variable length tree. The index value of a word can be output.

또한, 본 명세서에서 이용되는 숫자(예를 들어, 제1, 제2 등)는 동일 또는 유사한 개체를 구별하기 위한 것일 뿐 이에 의해 권리범위나 그 대상이 제한되는 것은 아니다.In addition, numbers (eg, first, second, etc.) used in the present specification are for distinguishing the same or similar entities, but the scope of the rights or the objects thereof are not limited thereto.

도 1은 본 발명의 바람직한 일 실시예에 따른 허프만 복호화 장치의 블록도이며, 도 2는 본 발명의 바람직한 일 실시예에 따른 제1 허프만 코드북 내지 제3 허프만 코드북을 예시한 도면이고, 도 3은 본 발명의 바람직한 일 실시예에 따른 허프만 코드북을 가변 트리로 나타낸 것이며, 도 4는 본 발명의 바람직한 일 실시예에 따른 가변 길이 트리 검색을 위한 메모리 구조를 테이블 형식으로 나타낸 것이고, 도 5는 허프만 코드북을 종래의 이진 트리로 나타낸 것이며, 도 6은 종래의 이진 트리 검색을 위한 메모리 구조를 테이블 형식으로 나타낸 것이고, 도 7a 내지 도 7c는 본 발명의 바람직한 일 실시예에 따른 저장부에 저장된 주소와 데이터의 형식을 예시한 도면이다. 1 is a block diagram of a Huffman decoding apparatus according to an embodiment of the present invention, Figure 2 is a diagram illustrating a first Huffman codebook to a third Huffman codebook according to an embodiment of the present invention, Figure 3 A Huffman codebook according to an embodiment of the present invention is shown in a variable tree, FIG. 4 is a memory structure for a variable length tree search according to an embodiment of the present invention in a table form, and FIG. 5 is a Huffman codebook. 6 illustrates a conventional binary tree, FIG. 6 illustrates a memory structure for searching a conventional binary tree in a table format, and FIGS. 7A to 7C illustrate addresses and data stored in a storage unit according to an exemplary embodiment of the present invention. A diagram illustrating the format of.

또한, 본 명세서에서 한 클럭은 본 발명에 따른 허프만 복호화 장치(100)의 각각의 구성 요소들이 한번씩 동작을 수행하여 임의의 결과를 출력하는 것으로 정의하기로 한다. In addition, in this specification, one clock is defined as each component of the Huffman decoding apparatus 100 according to the present invention performing an operation once to output an arbitrary result.

도 1을 참조하면, 본 발명에 따른 허프만 복호화 장치(100)는 역 다중화부(110), 비트 이동부(120), 주소값 산출부(130), 저장부(140) 및 제어부(150)를 포함한다.Referring to FIG. 1, the Huffman decoding apparatus 100 according to the present invention includes a demultiplexer 110, a bit shifter 120, an address value calculator 130, a storage 140, and a controller 150. Include.

역 다중화부(110)는 제어부(150)의 제어에 의해 허프만 부호를 이용하여 압축된 비트스트림 중에서 가변적으로 비트스트림을 입력받아 비트 이동부(120)로 전달한다. 또한, 역 다중화부(110)는 제어부(150)의 제어에 의해 저장부(140)로부터 출력되는 데이터를 입력받을 수도 있다. 이하에서, 비트스트림은 제1 데이터(예를 들어, '0')와 제2 데이터(예를 들어, '1')로 구성된 바이너리 데이터일 수 있다. 즉, 역 다중화부(110)는 제어부(150)로부터 n-1 클럭에서 생성된 스트림 입력 제어 명령을 입력받아 스트림 입력 제어 명령에 따라 가변적으로 외부 버퍼로부터 비트 스트림을 입력받아 비트 이동부(120)로 전달할 수 있다. 이하에서는 이해와 설명의 편의를 위해, 현재 클럭을 n으로 정의하면, 이전 클럭을 n-1, 다음 클럭을 n+1로 정의하여 사용하기로 한다. 여기서, n은 0 이상의 정수일 수 있다.The demultiplexer 110 receives the bitstream variably among the bitstreams compressed using the Huffman code under the control of the controller 150 and transmits the bitstream to the bit shifter 120. In addition, the demultiplexer 110 may receive data output from the storage 140 under the control of the controller 150. Hereinafter, the bitstream may be binary data composed of first data (eg, '0') and second data (eg, '1'). That is, the demultiplexer 110 receives a stream input control command generated at n-1 clocks from the controller 150 and receives a bit stream from an external buffer variably according to the stream input control command. Can be delivered to. Hereinafter, for convenience of understanding and explanation, if the current clock is defined as n, the previous clock is defined as n-1 and the next clock is defined as n + 1. Here, n may be an integer of 0 or more.

또한, 역 다중화부(110)는 버퍼(미도시)로부터 입력된 입력 스트림이 1비트이며, 제1 데이터(예를 들어, '0')이면, 입력 스트림을 비트 이동부(120)로 출력하지 않고, n-1 클럭의 오프셋 정보를 제어부(150)로부터 입력받아 이를 비트 이동부(120)로 출력할 수 있다. In addition, the demultiplexer 110 does not output the input stream to the bit shifter 120 when the input stream input from the buffer (not shown) is 1 bit and the first data (eg, '0'). Instead, the offset information of the n-1 clock may be received from the controller 150 and output to the bit shifter 120.

본 명세서에서 "입력 스트림"은 외부 버퍼(미도시)에 저장된 비트스트림중에서 n 클럭에서 역 다중화부(110)가 입력받는 비트스트림 또는 제어부(150)로부터 입력되는 n-1 클럭의 오프셋 정보인 것으로 정의하기로 한다.In the present specification, the "input stream" refers to offset information of a bit stream received from the demultiplexer 110 or n-1 clock input from the control unit 150 at n clocks among the bit streams stored in an external buffer (not shown). Let's define.

또한, 이하에서는 역 다중화부(110)가 1비트스트림 내지 3비트스트림을 입력받은 것을 가정하여 이를 중점으로 설명하지만, 구현 방법에 따라 더 많은 비트스트림을 한번에 입력받도록 구현할 수도 있다. In addition, hereinafter, the demultiplexer 110 assumes that the 1-bit to 3-bit streams are input.

비트 이동부(120)는 역 다중화부(110)로부터 입력된 입력 스트림이 기준 비트스트림 이하이면 동작을 수행하여 입력 스트림을 자리 이동하여 오프셋 정보를 생성하여 주소값 산출부(130)로 전달한다.If the input stream input from the demultiplexer 110 is less than or equal to the reference bitstream, the bit shifter 120 performs an operation by shifting the input stream to generate offset information and transmitting the offset information to the address value calculator 130.

예를 들어, 비트 이동부(120)는 역 다중화부(110)로부터 입력된 입력 스트림이 기준 비트스트림 이하이면 입력 스트림을 왼쪽으로 자리 이동하여 오프셋 정보를 생성할 수 있다. 예를 들어, 비트 이동부(120)로 입력되는 입력 스트림이 '10'이며, 비트 이동부(120)는 입력되는 입력 스트림이 2비트 이하인 경우 동작을 수행 하도록 구현되어 있다고 가정하자. 비트 이동부(120)는 입력 스트림이 2비트 이하이므로 왼쪽으로 한 비트 자리 이동한 후 오프셋 정보로서 '4'h를 생성하여 주소값 산출부(130)로 전달할 수 있다. For example, if the input stream input from the demultiplexer 110 is less than or equal to the reference bitstream, the bit shifter 120 may shift the input stream to the left to generate offset information. For example, assume that the input stream input to the bit shifter 120 is '10' and the bit shifter 120 is implemented to perform an operation when the input stream is 2 bits or less. Since the bit shifter 120 has two input bits or less, the bit shifter 120 shifts one bit to the left and generates' 4'h as offset information and transmits the offset to the address value calculator 130.

주소값 산출부(130)는 비트 이동부(120)로부터 오프셋 정보를 입력받고, 제어부(150)로부터 세그먼트 정보를 입력받아 합하여 메모리의 주소 값을 산출하여 제어부(150)로 전달할 수 있다. 여기서, 주소값 산출부(130)는 하나 이상의 덧셈기를 포함하여 구현될 수 있다. The address value calculator 130 receives offset information from the bit shifter 120, receives segment information from the controller 150, adds the segment information, calculates an address value of the memory, and transfers the segment information to the controller 150. Here, the address value calculator 130 may be implemented including one or more adders.

저장부(140)는 하나 이상의 코드워드에 대한 주소 정보(예를 들어, 세그먼트 정보 포함), 데이터 정보, 인덱스에 상응하는 심볼 정보 등이 저장되는 수단이다. 예를 들어, 저장부(140)는 롬(ROM)으로 구성될 수 있으며, 다른 매체로 구성될 수도 있다. 도 7a 내지 도 7c에 저장부(140)에 저장된 데이터 정보와 주소 정보 등의 형식이 예시되어 있다. 도 7a 내지 도 7c는 바람직한 일 실시예에 따른 데이터 및 주소의 형식이며 이외의 다른 형식일 수도 있다. 도 7a는 저장부(140)에 저장된 주소 형식을 예시한 것으로 8비트의 세그먼트 주소 정보와 3비트의 오프셋 주소 정보를 포함하여 총 11비트 형식이 예시되어 있다. 도 7b는 데이터가 코드워드와 일치할 경우의 데이터 형식을 예시한 것으로, 상위 2비트는 예를 들어, "00"으로 표현되고, 하위 20비트는 해당 코드워드에 상응하는 심볼 정보가 저장될 수 있다. 그리고, 도 7c는 데이터가 코드워드와 일치하지 않은 경우의 데이터 형식을 예시한 것으로, 상위 2비트는 다음 클럭에서 필요한 입력 비트스트림의 크기에 대한 정보가 저장되어 있으며, 하위 8비트에는 다음 클럭에서 사용될 세그먼트 정보가 저장되어 있을 수 있다. 도 7a 내지 도 7c는 일 예를 예시한 것으로, 이 이외의 형식으로 저장될 수도 있다.The storage 140 is a means for storing address information (eg, segment information), data information, symbol information corresponding to an index, and the like for one or more codewords. For example, the storage 140 may be configured as a ROM, or may be configured as other media. 7A to 7C illustrate formats of data information and address information stored in the storage 140. 7A to 7C are data and address formats according to a preferred embodiment, and may be other formats. FIG. 7A illustrates an address format stored in the storage 140. A total of 11 bit formats including 8 bit segment address information and 3 bit offset address information are illustrated. FIG. 7B illustrates a data format when data coincides with a codeword. The upper 2 bits may be represented by, for example, "00", and the lower 20 bits may store symbol information corresponding to the corresponding codeword. have. In addition, FIG. 7C illustrates a data format when data does not match a codeword. The upper 2 bits store information on the size of the input bitstream required for the next clock, and the lower 8 bits store information on the next clock. Segment information to be used may be stored. 7A to 7C illustrate an example and may be stored in a format other than this.

예를 들어, 저장부(140)는 코드워드의 인덱스에 상응하는 스펙트럼의 샘플 데이터인 심볼 정보를 저장하고 있을 수 있다. 저장되는 심볼 정보의 형식은 예를 들어 도 7b에 예시된 형식일 수 있다. For example, the storage 140 may store symbol information which is sample data of a spectrum corresponding to an index of a codeword. The format of the symbol information to be stored may be, for example, the format illustrated in FIG. 7B.

저장부(140)는 코드워드에 상응하는 인덱스 정보를 저장하여 이를 출력할 수 있으나, 본 명세서에서는 인덱스 정보에 상응하는 스펙트럼 샘플(이하에서는 심볼 정보라 칭함) 정보를 하기 수학식1, 수학식2, 수학식3, 수학식 4를 이용하여 산출하여 이를 저장한 후 심볼 정보를 직접 출력하도록 할 수 있다. The storage 140 may store and output index information corresponding to the codeword, but in the present specification, spectral sample (hereinafter referred to as symbol information) information corresponding to the index information is represented by Equations 1 and 2 below. After calculating using Equation 3, Equation 4, and storing it, the symbol information can be directly output.

Figure 112005065977452-pat00001
Figure 112005065977452-pat00001

Figure 112005065977452-pat00002
Figure 112005065977452-pat00002

Figure 112005065977452-pat00003
Figure 112005065977452-pat00003

Figure 112005065977452-pat00004
Figure 112005065977452-pat00004

여기서, qp는 저장부에 저장되어 있는 스펙트럼 샘플 정보로써 심볼 정보를 의미하는 정수 값이고, off는 오프셋 정보이며, idx는 인덱스 정보로서 정수 값이고, mod는 허프만 테이블을 만들기 위해 효율적인 계산을 위해 사용자가 정의한 값으로 정수 값이다. Here, qp is an spectral sample information stored in the storage unit, and an integer value representing symbol information, off is offset information, idx is an integer value as index information, and mod is a user for efficient calculation to create a Huffman table. Is an integer value.

제어부(150)는 본 발명에 따른 허프만 복호화 장치(100)의 각각의 구성 요소(예를 들어, 역 다중화부(110), 비트 이동부(120), 주소값 산출부(130), 저장부(140) 등)를 제어하는 기능을 수행한다. 또한, 제어부(150)는 주소값 산출부(130)로부터 산출되어 입력된 주소 값에 상응하여 저장부(140)에 저장된 데이터를 독출하여 코드북의 인덱스의 심볼 정보를 포함하고 있는지 여부를 판단한다. 만일 심볼 정보를 포함하고 있다면, 제어부(150)는 심볼 정보를 추출하여 출력한다. The controller 150 is a component of the Huffman decoding apparatus 100 according to the present invention (for example, the demultiplexer 110, the bit shifter 120, the address value calculator 130, the storage unit ( 140), etc.). In addition, the controller 150 reads data stored in the storage 140 corresponding to the address value calculated by the address value calculator 130 and determines whether the symbol information of the index of the codebook is included. If the symbol information is included, the controller 150 extracts and outputs the symbol information.

그러나, 심볼 정보를 포함하고 있지 않다면, 제어부(150)는 저장부(140)로부터 독출한 데이터를 분석하여 세그먼트 정보를 추출하여 주소값 산출부(130)로 전달하고, 스트림 입력 제어 명령을 생성하여 역 다중화부(110)로 전달한다. However, if the symbol information is not included, the controller 150 analyzes the data read from the storage 140, extracts segment information, transfers the segment information to the address value calculator 130, and generates a stream input control command. Transfer to the demultiplexer 110.

본 명세서에서 "스트림 입력 제어 명령"은 제어부(150)가 역 다중화부(110)로 입력되는 입력 스트림을 제어하기 위한 명령으로 정의하기로 한다.In the present specification, the "stream input control command" will be defined as a command for controlling the input stream inputted by the controller 150 to the demultiplexer 110.

또한, 제어부(150)는 역 다중화부(110)로 입력된 입력 스트림이 하나의 비트이며, 해당 입력 스트림의 비트 데이터가 제1 비트 데이터인 경우 비트 이동부(120)로 현재 클럭을 중심으로 바로 전 클럭의 오프셋 정보와 동작 개시 제어 명령을 전달할 수 있다.In addition, when the input stream input to the demultiplexer 110 is one bit, and the bit data of the corresponding input stream is the first bit data, the controller 150 immediately transfers the bit shifter 120 to the center of the current clock. Offset information of all clocks and an operation start control command can be transmitted.

이해와 설명의 편의를 위해 허프만 알고리즘에 대해 간략히 설명을 하고, 종래의 이진 트리를 이용한 방법과 본 발명에 따른 가변 길이 트리를 이용한 방법을 이용하여 인덱스 29를 검색하여 출력하기 위해 수행되는 단계를 각각의 클럭 단위로 설명하기로 한다. For convenience of understanding and explanation, the Huffman algorithm will be briefly described, and the steps performed to retrieve and output the index 29 using the conventional binary tree method and the variable length tree method according to the present invention will be described. It will be described in the clock unit of.

허프만 알고리즘은 임의의 원시 데이터들의 원시 데이터들의 통계적 발생 빈도를 산출하여 높은 발생 빈도에 따른 데이터에는 짧은 부호를 할당하고 발생 빈도가 낮은 데이터에는 긴 부호를 할당하는 방법이다. 이해를 위해 우선 원시 데이터가 예를 들어, "THIS IS THE TEST SENTENCE."라고 가정하자. 이때, 각각의 철자에 대해 발생 빈도를 산출하면 하기 표 1과 같다.The Huffman algorithm calculates the statistical occurrence frequency of the raw data of arbitrary raw data, and assigns a short sign to the data according to the high occurrence frequency and a long code to the low occurrence data. For the sake of understanding, suppose the raw data is, for example, "THIS IS THE TEST SENTENCE." At this time, the occurrence frequency for each spell is calculated as shown in Table 1 below.

표 1. 예제 데이터에 대한 발생 빈도Table 1. Frequency of occurrence for the sample data

EE TT SS NullNull HH II NN CC .. 55 55 44 44 22 22 22 1One 1One

이와 같이 원시 데이터에 대해 발생 빈도를 산출한 후 이를 이용하여 이진 트리를 구성하여 각각의 데이터들에 부호(즉, 코드워드)를 할당하면 하기 표 2와 같다.After calculating the frequency of occurrence for the raw data as described above, a binary tree is constructed using this to assign codes (ie, codewords) to the respective data, as shown in Table 2 below.

표 2. 이진 트리를 이용해 구현된 코드 Table 2. Code implemented using binary tree 할당표Allocation Table

데이터data 코드워드Codeword 데이터data 코드워드Codeword 데이터data 코드워드Codeword EE 1111 NullNull 010010 NN 00010001 TT 1010 HH 00110011 CC 0000100001 SS 011011 II 00100010 .. 0000000000

상술한 바와 같이, 허프만 부호화 방법은 원시 데이터의 통계적 발생 빈도에 따라 가변적으로 부호를 할당하는 방법이다. 이하에서 종래의 이진 트리를 이용한 허프만 복호화 방법과 본 발명에 따른 가변 길이 트리를 이용한 허프만 복호화 방법에서 임의의 인덱스를 출력하기 위해 필요한 클럭 사이클을 간략히 각각 설명하기로 한다. As described above, the Huffman coding method is a method of variably assigning codes according to the frequency of statistical occurrence of raw data. Hereinafter, the Huffman decoding method using the conventional binary tree and the Huffman decoding method using the variable length tree according to the present invention will be briefly described for each clock cycle required to output an arbitrary index.

우선, 도 2를 참조하여, AAC(Advanced Audio Coding)의 제1 허프만 코드북 내지 제3 허프만 코드북을 각각의 코드북당 16개의 코드워드를 길이 순으로 정렬하여 나타낸 것이 예시되어 있다. 도 2의 제1 허프만 코드북을 이진 트리로 구현한 예가 도 4에 예시되어 있다. 여기서, 각각의 노드는 인덱스를 나타내면, 점선으로 표현된 아크는 제1 비트(예를 들어, '0') 실선으로 연결된 아크는 제2 비트(예를 들어, '1')일 수 있다. 도 4에 보여지는 바와 같이 각각의 노드는 2개의 차일드(child) 노드로 구현될 수 있다. 도 4의 이진 트리는 리프 노드(leaf node)와 비-리프 노드(non-leaf node)로 구성된다. 리프 노드의 메모리 데이터 형식은 예를 들어, [0, 인덱스(index)]와 같이 표현될 수 있으며, 비-리프 노드의 메모리 데이터 형식은 예를 들어, [1, 세그먼트(segment)]과 같이 표현될 수 있다. 여기서, 세그먼트는 차일드 노드의 주소를 나타내며 비트스트림으로부터 입력되는 제1 비트(예를 들어, '0') 또는 제2 비트(예를 들어, '1')의 오프셋(offset) 주소로 사용될 수 있다. 이진 트리를 검색하기 위해 메모리의 주소를 결정하는 방법은 세그먼트와 오프셋을 더하여 다음 주소 값을 결정하는 방법이 이용될 수 있다. First, referring to FIG. 2, the first Huffman codebooks of the AAC (Advanced Audio Coding) to the third Huffman codebooks are illustrated by arranging 16 codewords per length in order of length. An example of implementing the first Huffman codebook of FIG. 2 as a binary tree is illustrated in FIG. 4. Here, when each node represents an index, the arc represented by the dotted line may be the first bit (eg, '0') and the arc connected by the solid line may be the second bit (eg, '1'). As shown in FIG. 4, each node may be implemented as two child nodes. The binary tree of FIG. 4 is composed of leaf nodes and non-leaf nodes. The memory data type of a leaf node may be represented, for example, as [0, index], and the memory data type of a non-leaf node may be represented as, for example, [1, segment]. Can be. Here, the segment represents an address of a child node and may be used as an offset address of a first bit (eg, '0') or a second bit (eg, '1') input from the bitstream. . As a method of determining an address of a memory for searching a binary tree, a method of determining a next address value by adding a segment and an offset may be used.

도 5에 이진 트리를 검색하기 위한 도 2의 제1 허프만 코드북의 메모리 구조가 예시되어 있다. 도 2에 레벨 5에 위치한 인덱스 29를 찾기 위한 과정을 간략히 설명하면, 우선, 제1 클럭에서 제1 입력 데이터(예를 들어, '1')가 입력된다. 제1 입력 데이터가 입력되면 메모리의 주소 값은 세그먼트와 오프셋을 더하여 결정된다. 즉, 제1 클럭에서 메모리의 주소 값은 예를 들어, '01'h로 결정될 수 있다. 결정된 메모리의 주소 값의 데이터가 코드북의 데이터와 일치하는지 여부를 판단한다. 즉, 메모리의 주소 값의 데이터가 예를 들어, [1, 02]이므로 코드북과 일치하지 않으므로 데이터에서 세그먼트를 추출한다. 예를 들어, '02'가 추출될 수 있다. 5 illustrates a memory structure of the first Huffman codebook of FIG. 2 for searching a binary tree. Referring to FIG. 2, a process for finding an index 29 located at level 5 will be briefly described. First, first input data (eg, '1') is input at a first clock. When the first input data is input, an address value of the memory is determined by adding a segment and an offset. That is, the address value of the memory in the first clock may be determined as' 01'h, for example. It is determined whether the data of the determined address value of the memory matches the data of the codebook. That is, since the data of the address value of the memory is, for example, [1, 02], the segment is extracted from the data because it does not match the codebook. For example, '02' may be extracted.

제2 클럭에서 제2 입력 데이터(예를 들어, 0)가 입력되면, 메모리의 주소 값은 제1 클럭에서 추출된 세그먼트와 오프셋을 더하여 결정될 수 있다. 예를 들어, 제2 클럭에서 메모리의 주소 값은 제1 클럭에서 추출된 세그먼트 예를 들어, '02'h와 제2 클럭의 오프셋 예를 들어, '0'h를 더한 '02'h로 결정될 수 있다. 결정된 주소 값의 데이터가 코드북의 데이터와 일치하는지 여부를 판단한다. 즉, 결정된 메모리 주소 값(예를 들어, '02'h)의 데이터가 예를 들어 [1, 04]이므로 코드북의 데이터와 일치하지 않으므로, 세그먼트를 추출한다.When the second input data (eg, 0) is input at the second clock, an address value of the memory may be determined by adding an offset and a segment extracted from the first clock. For example, the address value of the memory at the second clock may be determined as a segment extracted from the first clock, for example, '02'h plus an offset of the second clock, for example,' 02'h. Can be. It is determined whether the data of the determined address value matches the data of the codebook. That is, since the data of the determined memory address value (for example, '02'h) is, for example, [1, 04], it does not match the data of the codebook, and thus the segment is extracted.

제3 클럭에서 제3 입력 데이터(예를 들어, '1')가 입력되면, 메모리의 주소 값은 제2 클럭에서 추출된 세그먼트와 오프셋을 더하여 결정된다. 예를 들어, 메모리의 주소 값은 '05'h로 결정될 수 있다. 결정된 메모리 주소 값을 이용하여 해당 주소에 저장된 데이터를 읽어 코드북의 데이터와 일치하는지 여부를 판단한다. 즉, 메모리에 저장된 데이터가 예를 들어, [1, 0C]이므로 코드북의 데이터와 일치하지 않으므로 세그먼트를 추출한다.When third input data (eg, '1') is input at the third clock, an address value of the memory is determined by adding an offset and a segment extracted from the second clock. For example, the address value of the memory may be determined as' 05'h. The data stored in the address is read using the determined memory address to determine whether the data corresponds to the data in the codebook. That is, since the data stored in the memory is, for example, [1, 0C], the segment is extracted because it does not match the data of the codebook.

제4 클럭에서 제4 입력 데이터(예를 들어, 0)가 입력되면, 메모리의 주소 값 은 '0C'h로 결정될 수 있으며, 결정된 메모리 주소 값의 데이터가 [1, 0E]이므로 코드북의 데이터와 일치하지 않으므로, 세그먼트를 추출한다.When the fourth input data (eg, 0) is input at the fourth clock, the address value of the memory may be determined as' 0C'h. Since the data of the determined memory address value is [1, 0E], the data of the codebook Since it does not match, we extract the segment.

제5 클럭에서 제5 입력 데이터(예를 들어, 0)가 입력되면, 메모리의 주소 값은 '0E'h로 결정될 수 있으며, 결정된 메모리의 주소 값의 데이터가 코드북의 데이터와 일치하는지 여부를 판단한다. 여기서, 메모리의 주소 값의 데이터가 [0, 29]이므로 코드북의 데이터와 일치하므로 인덱스를 추출하여 출력할 수 있다. When the fifth input data (eg, 0) is input at the fifth clock, the address value of the memory may be determined as' 0E'h, and it is determined whether the data of the determined address value of the memory matches the data in the codebook. do. Here, since the data of the address value of the memory is [0, 29], since the data is identical to the data of the codebook, the index can be extracted and output.

이와 같이, 이진 트리는 각각의 클럭에서 1비트를 입력으로 받기 때문에 상술한 바와 같이 제5 레벨의 인덱스 데이터를 검색하기 위해 5사이클이 소요되었다. 즉, 이진 트리에서 최대 19비트로 구성된 코드워드에 대해 검색을 수행하기 위해 최대 19사이클이 소요되게 된다. 도 4에 예시된 바와 같이 이진 트리의 경우 실제 심볼보다 많은 수의 비 단말 노드가 생성되어 메모리가 낭비됨을 알 수 있다.As described above, since the binary tree receives 1 bit as an input from each clock, it took 5 cycles to retrieve the index data of the fifth level as described above. That is, it takes up to 19 cycles to perform a search for a codeword consisting of up to 19 bits in the binary tree. As illustrated in FIG. 4, in the case of a binary tree, a large number of non-terminal nodes are generated than actual symbols, and it can be seen that memory is wasted.

도 2의 제1 코드북을 본 발명에 따른 가변 길이 트리를 이용하여 구현한 예가 도 3에 예시되어 있다. 본 발명에서는 가변 길이를 3으로 하여 최대 3비트까지 가변적으로 비트열을 입력받아 복호화하였다. 이에 대해서는 하기에서 도 1을 참조하여 상세히 설명하기로 한다.An example of implementing the first codebook of FIG. 2 using the variable length tree according to the present invention is illustrated in FIG. 3. In the present invention, a variable length is set to 3, and a bit string is variably input and decoded up to 3 bits. This will be described in detail with reference to FIG. 1 below.

도 3은 도 2에 예시된 제1 허프만 코드북을 본 발명에 따른 가변 길이 트리를 이용하여 구현한 것이다. 본 발명에 따른 가변 길이 트리는 비트스트림으로부터 1비트에서 3비트씩 입력을 받아 트리의 레벨을 낮추었으며, 이로 인해 비 단말 노드의 수를 줄였다. 즉, 비 단말 노드로 인한 메모리의 낭비를 줄일 수 있다. 도 4에 도 3과 같이 표현된 가변 길이 트리의 검색을 위한 메모리 구조를 예시한 도면 이 있다. 도 4를 이용하여 인덱스 29를 검색하는 방법을 설명하기로 한다.3 illustrates the implementation of the first Huffman codebook illustrated in FIG. 2 using a variable length tree according to the present invention. The variable length tree according to the present invention receives an input of 1 bit to 3 bits from the bitstream to lower the tree level, thereby reducing the number of non-terminal nodes. That is, memory waste due to non-terminal nodes can be reduced. 4 is a diagram illustrating a memory structure for searching for a variable length tree represented as shown in FIG. 3. A method of searching index 29 will be described with reference to FIG. 4.

제1 클럭에서 제1 입력 데이터로 1비트를 입력받는다. 본 발명에 따른 가변 길이 트리를 이용한 검색에서는 비트스트림에서 최초로 비트를 입력받는 경우에는 1비트만을 입력받는다. 즉, 제1 입력데이터(예를 들어, '1')가 입력되면, 제1 입력데이터의 메모리 주소 값은 세그먼트와 제1 입력데이터를 더하여 결정된다. 즉, 제1 클럭에서 제1 입력 데이터의 메모리의 주소 값은 예를 들어, '01'h로 결정될 수 있다. 결정된 메모리의 주소 값을 이용하여 저장된 데이터를 읽어 제1 코드북의 데이터와 일치하는지 여부를 판단한다. 일치하지 않는 경우, 데이터를 판별하여 다음 클럭에서 몇 비트의 비트스트림을 입력받아야 하는지 여부를 결정하고, 다음 클럭의 메모리의 주소 값을 결정하기 위해 세그먼트를 추출한다. 결정된 메모리의 주소 값의 데이터가 예를 들어, [3, 08]이므로 제1 코드북의 데이터와 일치하지 않으며, 제2 클럭에서 3비트의 비트스트림을 입력받아야 한다는 것을 결정할 수 있다. 또한, 세그먼트 '08'h를 추출하여 제2 클럭의 입력 데이터의 메모리 주소 값 결정을 위해 사용한다.One bit is input to the first input data from the first clock. In the search using the variable length tree according to the present invention, when a bit is first input in the bitstream, only one bit is received. That is, when the first input data (eg, '1') is input, the memory address value of the first input data is determined by adding the segment and the first input data. That is, the address value of the memory of the first input data in the first clock may be determined as' 01'h, for example. The stored data is read using the determined address value of the memory to determine whether it matches the data of the first codebook. If it does not match, the data is determined to determine how many bits of the next bitstream to receive from the next clock, and the segments are extracted to determine the address value of the next clock's memory. Since the data of the determined address value of the memory is, for example, [3, 08], it may be determined that the data of the first codebook does not coincide with the data of the first codebook, and that a 3-bit bitstream should be input from the second clock. In addition, the segment '08'h is extracted and used to determine the memory address value of the input data of the second clock.

제2 클럭에서 제2 입력 데이터를 입력받는다. 여기서, 제1 클럭에서 3비트의 비트스트림을 입력받아야 하는 것으로 결정되었으며, 3비트스트림을 입력받는다. 즉, 제2 입력 데이터는 예를 들어, '010'이 될 수 있다. 제2 입력 데이터의 메모리의 주소 값은 제1 클럭에서 추출한 세그먼트와 제2 입력 데이터의 오프셋을 더하여 결정된다. 따라서, 제2 입력 데이터의 메모리의 주소 값은 예를 들어 '0A'h로 결정될 수 있다. 결정된 메모리의 주소 값의 데이터를 읽어 제1 코드북의 데이터와 일 치하는지 여부를 판단하여 일치하면 인덱스 데이터를 출력하고 일치하지 않으면, 다음 클럭에서 입력받을 비트스트림의 개수를 결정하고, 세그먼트를 추출한다. 예를 들어, 결정된 메모리의 주소 값이 '0A'h의 데이터가 [1,10]이므로 제1 코드북의 데이터와 일치하지 않는 것을 알 수 있다. 따라서, 제3 클럭에서 입력받을 비트스트림의 개수 '1'로 결정하고, 세그먼트 '10'h를 추출한다.The second input data is received at the second clock. Here, it is determined that a 3-bit bitstream must be input from the first clock, and the 3-bit stream is received. That is, the second input data may be, for example, '010'. The address value of the memory of the second input data is determined by adding the offset of the segment extracted from the first clock and the second input data. Therefore, the address value of the memory of the second input data may be determined as' 0A'h, for example. It reads the data of the address value of the determined memory and determines whether it matches with the data of the first codebook. If it matches, it outputs index data. If it does not match, the number of bitstreams to be input at the next clock is determined, and the segment is extracted. . For example, it can be seen that the address value of the determined memory does not match the data of the first codebook because the data of '0A'h is [1,10]. Therefore, the number of bitstreams to be input at the third clock is determined as' 1 ', and the segment' 10'h is extracted.

제3 클럭에서 제3 입력 데이터를 입력받는다. 여기서, 제2 클럭에서 결정된 것과 같이, 1비트스트림(예를 들어, '0')을 입력받는다. 제3 입력 데이터가 3비트스트림이 아닐 경우, 이전 오프셋 데이터를 3비트스트림에 상응하여 왼쪽으로 쉬프트한다. 즉, 제3 입력 데이터가 '0'이므로, 제2 클럭의 오프셋 '2'h를 한번 왼쪽으로 쉬프트한다. 즉, 제3 입력 데이터의 오프셋 값이 '4'h를 산출할 수 있다. 그리고, 제2 클럭의 세그먼트와 더하여 메모리의 주소 값을 결정한다. 예를 들어, 메모리의 주소 값을 '14'h로 결정할 수 있다. 결정된 메모리의 주소 값의 데이터를 독출하여 제1 코드북의 데이터와 일치하는지 여부를 판단한다. 여기서, 결정된 메모리 주소 값의 데이터가 [0, 29]이므로 제1 코드북의 데이터와 일치하는 것을 알 수 있다. 따라서, 인덱스 '29'h를 출력할 수 있다. The third input data is received at the third clock. Here, as determined in the second clock, one bit stream (eg, '0') is received. If the third input data is not a 3-bit stream, the previous offset data is shifted to the left corresponding to the 3-bit stream. That is, since the third input data is' 0 ', the offset' 2'h of the second clock is shifted to the left once. That is, the offset value of the third input data may calculate '4'h. In addition to the segment of the second clock, an address value of the memory is determined. For example, the address value of the memory may be determined as' 14'h. The data of the determined address value of the memory is read, and it is determined whether the data corresponds to the data of the first codebook. Here, since the data of the determined memory address value is [0, 29], it can be seen that the data of the first codebook matches. Therefore, the index '29'h can be output.

상술한 바와 같이, 본 발명에 의한 가변 길이 트리를 이용한 허프만 복호화 방법이 종래의 이진 트리를 이용한 허프만 복호화 방법에 비해 트리 검색 시간이 단축됨을 알 수 있다. As described above, it can be seen that the Huffman decoding method using the variable length tree according to the present invention has a shorter tree search time than the Huffman decoding method using the conventional binary tree.

도 8은 본 발명의 바람직한 일 실시예에 따른 허프만 복호화 장치의 동작 수행 과정을 나타낸 순서도이다. 이하에서는 허프만 부호화 방법을 이용하여 압축된 비트스트림을 복호화하는 과정에 대해 설명하기로 한다. 이하에서는 역 다중화부(110)가 최초 입력인 경우 하나의 비트만을 입력받아 복호화 과정을 수행하며, 이 이후에는 n-1 클럭에서 제어부(150)로부터 입력되는 스트림 입력 제어 명령에 따른 입력 스트림을 입력받아 복호화 과정을 수행할 수 있다. 이하에서는 역 다중화부(110)가 최대 3비트스트림을 입력받을 수 있는 것을 가정하여 이를 중점으로 설명하지만, 이 이외의 비트스트림을 한번에 입력받아 처리할 수도 있음은 당연하다. 또한, 이해와 설명의 편의를 위해, 이하에서는 하나의 허프만 코드북이 선택된 이후 임의의 코드워드에 일치하는 인덱스 데이터를 출력하는 과정을 설명하기로 한다. 또한 역 다중화부(110)로 입력되는 입력 스트림들은 예를 들어 1KB의 입력 버퍼에 저장되어 역 다중화부(110)로 1비트 내지 3비트스트림으로 입력될 수 있다. 물론, 입력 버퍼의 사이즈는 1KB 이외에 다양할 수도 있다.8 is a flowchart illustrating an operation of an Huffman decoding apparatus according to an embodiment of the present invention. Hereinafter, a process of decoding a compressed bitstream using the Huffman encoding method will be described. Hereinafter, when the demultiplexing unit 110 is the first input, only one bit is input and a decoding process is performed. After this, the input stream according to the stream input control command input from the control unit 150 at n-1 clock is input. Receive the decryption process. Hereinafter, assuming that the demultiplexer 110 can receive a maximum of 3 bit streams, the description will be focused on the above. However, it is natural that the demultiplexer 110 may receive and process other bit streams at once. Also, for convenience of explanation and explanation, the following describes a process of outputting index data corresponding to an arbitrary codeword after one Huffman codebook is selected. In addition, the input streams input to the demultiplexer 110 may be stored in, for example, a 1KB input buffer and input to the demultiplexer 110 as 1 to 3 bit streams. Of course, the size of the input buffer may vary in addition to 1KB.

단계 810에서 역 다중화부(110)는 n-1 클럭에서 제어부(150)로부터 스트림 입력 제어 명령을 입력받아 해당 스트림 입력 제어 명령에 따라 가변적으로 외부 버퍼(미도시)로부터 비트스트림을 입력받아(이하에서는 입력 스트림이라 칭함) 비트 이동부(120)로 전달한다. In operation 810, the demultiplexer 110 receives a stream input control command from the control unit 150 at n-1 clocks and variably receives a bitstream from an external buffer (not shown) according to the corresponding stream input control command (hereinafter, referred to as a multiplexer). In the following description, it is transmitted to the bit moving unit 120.

여기서, 스트림 입력 제어 명령은 상술한 바와 같이, 역 다중화부(110)가 외부 버퍼로부터 몇 비트의 스트림을 입력받을지를 제어하는 명령일 수 있다. Here, the stream input control command may be a command for controlling how many bits the demultiplexer 110 receives a stream from an external buffer as described above.

또한, 역 다중화부(110)는 입력받은 입력 스트림이 1비트 이며, 제1 데이터인 경우, 입력 스트림을 비트 이동부(120)로 전달하지 않고, n-1 클럭의 오프셋 정보를 제어부(150)로부터 전달받아 이를 비트 이동부(120)로 전달할 수도 있다. In addition, when the input multiplexer 110 receives an input stream of 1 bit and is the first data, the demultiplexer 110 does not transmit the input stream to the bit shifter 120, and controls the offset information of the n−1 clock. Received from the bit transfer unit 120 may be delivered.

예를 들어, 역 다중화부(110)로 입력된 입력 스트림이 1비트이며, 예를 들어, 제1 데이터(예를 들어, '0')이고, n-1 클럭의 오프셋 정보가 '10'이라고 가정하자. 그러면, 역 다중화부(110)는 입력 스트림이 제1 데이터만을 포함한 1비트스트림이므로, n-1 클럭의 오프셋 정보를 제어부(150)로부터 입력받아 비트 이동부(120)로 전달할 수 있다. For example, the input stream input to the demultiplexer 110 is 1 bit, for example, the first data (for example, '0'), and the offset information of the n-1 clock is '10'. Suppose Then, since the input multiplexer 110 is a 1-bit stream including only the first data, the demultiplexer 110 may receive the offset information of the n-1 clock from the controller 150 and transmit the received offset information to the bit shifter 120.

또한, 역 다중화부(110)는 입력 버퍼(미도시)로부터 입력 스트림을 처음으로 입력받은 경우에는 1비트만을 입력받아 비트 이동부(120)로 전달할 수 있으며, 이 경우 비트 이동부(120)는 입력된 1비트가 기준 비트스트림 이하일지라도 자리 이동하지 않고 오프셋 정보를 생성하여 주소값 산출부(130)로 전달할 수 있다.In addition, when the first multiplexer 110 receives an input stream from an input buffer (not shown) for the first time, the demultiplexer 110 may receive only one bit and transmit the received bit to the bit shifter 120. In this case, the bit shifter 120 Even if the input 1 bit is less than or equal to the reference bitstream, the offset information may be generated and transferred to the address value calculator 130 without shifting.

단계 815 내지 820에서 비트 이동부(120)는 역 다중화부(110)로부터 입력된 입력 스트림이 기준 비트스트림 이하인지 여부를 판단하여, 기준 비트스트림 이하이면 동작을 수행하여 입력 스트림을 왼쪽으로 자리 이동하여 오프셋 정보를 생성하여 주소값 산출부(130)로 전달한다.In steps 815 to 820, the bit shifter 120 determines whether the input stream input from the demultiplexer 110 is less than or equal to the reference bitstream, and if it is less than or equal to the reference bitstream, performs the operation to shift the input stream to the left. The offset information is generated and transmitted to the address value calculator 130.

예를 들어, 역 다중화부(110)로부터 입력된 입력 스트림이 "10"이고, 기준 비트스트림이 2비트라고 가정하자. 비트 이동부(120)는 입력 스트림이 기준 비트스트림이하이므로, 입력 스트림을 왼쪽으로 1비트 자리 이동하여 오프셋 정보를 생성하여 주소값 산출부(130)로 전달할 수 있다. For example, assume that the input stream input from the demultiplexer 110 is "10" and the reference bitstream is 2 bits. Since the input stream is less than or equal to the reference bitstream, the bit shifter 120 may shift the input stream by one bit to the left to generate offset information and transmit the offset information to the address value calculator 130.

비트 이동부(120)는 입력 스트림이 기준 비트스트림이 초과되었거나 최초 입력이면 동작을 수행하지 않고 입력된 비트스트림을 오프셋 정보로 생성하여 주소값 산출부(130)로 전달할 수 있다. The bit shifter 120 may generate the input bitstream as offset information and transmit it to the address value calculator 130 without performing an operation if the input stream exceeds the reference bitstream or is initially input.

단계 825에서 주소값 산출부(130)는 비트 이동부(120)로부터 입력된 오프셋 정보와 n-1 클럭에서 추출되어 제어부(150)로부터 입력된 세그먼트 정보를 더하여 주소값을 산출하여 제어부(150)로 전달한다. In operation 825, the address value calculator 130 calculates an address value by adding the offset information input from the bit shifter 120 and the segment information extracted from the n-1 clock and input from the controller 150 to calculate the address value. To pass.

예를 들어, 입력 스트림이 역 다중화부(110)로 최초 입력이며, 입력 스트림의 비트 데이터가 예를 들어, '1'이라고 가정하면, 주소값 산출부(130)는 주소 값은 '01'h로 산출하여 제어부(150)로 전달할 수 있다. For example, assuming that the input stream is the first input to the demultiplexer 110 and the bit data of the input stream is' 1 ', for example, the address value calculator 130 may set the address value to' 01'h. It can be calculated and delivered to the controller 150.

예를 들어, n-1 클럭에서 추출되어 n 클럭의 주소값 산출부(130)로 입력된 세그먼트 정보가 '10'h이고, n 클럭의 입력 스트림이 '0' 이며, n-1 클럭의 오프셋 정보가 '10'h라고 가정하자. 이때, 역 다중화부(110)는 n 클럭의 입력 스트림이 '0'이므로 n-1 클럭의 오프셋 정보 '10'을 비트 이동부(120)로 전달할 수 있다. n-1 클럭의 오프셋 정보를 입력받은 비트 이동부(120)는 기준 비트스트림 이하(예를 들어, 2비트스트림 이하)이면, 비트 이동부(120)는 n-1 오프셋 정보를 1비트 자리 이동하여 오프셋 정보 '100'을 주소값 산출부(130)로 전달할 수 있다. 따라서, 주소값 산출부(130)는 오프셋 정보 '04'h와 세그먼트 정보 '10'h를 더하여 주소값 '14'h를 산출하여 제어부(150)로 전달할 수 있다.For example, the segment information extracted from the n-1 clock and input to the address value calculator 130 of the n clock is' 10'h, the input stream of the n clock is' 0 ', and the offset of the n-1 clock. Suppose the information is' 10'h. In this case, since the n clock input stream is '0', the demultiplexer 110 may transmit the offset information '10' of the n-1 clock to the bit shifter 120. If the bit shifter 120 receiving the offset information of the n-1 clock is less than or equal to the reference bitstream (for example, 2 bitstream or less), the bit shifter 120 shifts the n-1 offset information by 1 bit. The offset information '100' may be transmitted to the address value calculator 130. Therefore, the address value calculator 130 may add the offset information '04'h and the segment information' 10'h to calculate the address value '14'h and transmit the address value' 14'h to the controller 150.

830에서 제어부(150)는 주소값 산출부(130)로부터 산출되어 입력된 주소 값을 이용하여 저장부(140)에서 해당 주소 값에 저장된 데이터를 독출하여 분석하여 인덱스에 상응하는 심볼 정보를 포함하는지 여부를 판단한다. In step 830, the controller 150 reads and analyzes the data stored in the address value in the storage 140 using the address value calculated and input from the address value calculator 130 to include symbol information corresponding to the index. Determine whether or not.

인덱스에 상응하는 심볼 정보를 포함하고 있지 않은 경우, 단계 835에서 제어부(150)는 독출된 데이터에서 세그먼트를 추출하여 주소값 산출부(130)로 전달하 고, 다음 클럭에서 역 다중화부(110)가 입력받을 입력 스트림에 대한 스트림 입력 제어 명령을 생성하여 역 다중화부(110)로 전달한 후 단계 810으로 진행한다.If it does not include symbol information corresponding to the index, in step 835, the controller 150 extracts the segment from the read data and transfers the segment to the address value calculator 130, and the demultiplexer 110 at the next clock. After generating a stream input control command for the input stream to receive the input and delivers to the demultiplexer 110 proceeds to step 810.

만일 인덱스에 상응하는 심볼 정보를 포함하고 있다면, 단계 840에서 제어부(150)는 인덱스에 상응하는 해당 심볼 정보를 추출하여 출력한다.If the symbol information corresponding to the index is included, the controller 150 extracts the corresponding symbol information corresponding to the index and outputs the symbol information corresponding to the index.

상술한 바와 같이, 본 발명에 의한 허프만 복호화 방법이 종래의 방법에 비해 복호화 주기 편차가 현저하게 줄어들어 쉽게 클럭을 제어할 수 있는 이점이 있다. 또한, 종래의 이진 트리를 이용한 허프만 복호화 방법에서는 100클럭까지 소요되던 검색 시간을 6클럭으로 줄일 수 있다. As described above, the Huffman decoding method according to the present invention has an advantage that the decoding period deviation is significantly reduced compared to the conventional method, so that the clock can be easily controlled. In addition, in the Huffman decoding method using the conventional binary tree, the search time required up to 100 clocks can be reduced to 6 clocks.

상술한 바와 같이, 본 발명에 따른 가변 길이 트리를 이용한 허프만 복호화 장치를 제공함으로써, 검색 단계를 줄여 전체적인 성능을 향상시킬 수 있는 효과가 있다. As described above, by providing a Huffman decoding apparatus using a variable length tree according to the present invention, it is possible to reduce the search step to improve the overall performance.

또한, 본 발명은 가변 길이 트리를 이용함으로써 비 단말 노드의 생성을 줄일 수 있어 메모리의 낭비를 줄일 수 있는 효과가 있다. In addition, the present invention can reduce the generation of non-terminal nodes by using a variable length tree can reduce the waste of memory.

또한, 본 발명은 적은 면적의 로직 게이트와 작은 메모리를 사용하여 MPEG 오디오 복호화기의 허프만 복호화기에 적용할 수 있는 효과가 있다. In addition, the present invention has an effect that can be applied to the Huffman decoder of the MPEG audio decoder using a small area logic gate and a small memory.

또한, 본 발명은 복호화 주기 편차를 현저하게 줄여 쉽게 클럭을 제어할 수 있으며 코드워드를 저장하지 않음으로써 메모리의 총 비트 수를 절반으로 줄일 수 있는 효과가 있다.In addition, the present invention can easily control the clock by significantly reducing the decoding period deviation, and has the effect of reducing the total number of bits in the memory by halving the codeword.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to a preferred embodiment of the present invention, those skilled in the art to which the present invention pertains without departing from the spirit and scope of the present invention as set forth in the claims below It will be appreciated that modifications and variations can be made.

Claims (11)

부호화된 코드워드에 대한 세그먼트 정보 및 심볼 정보와 n+1 클럭에서 입력받을 스트림 정보를 포함하는 데이터 정보를 저장하고 있는 저장부;A storage unit which stores data information including segment information, symbol information about the coded codeword, and stream information to be input at an n + 1 clock; n-1 클럭의 스트림 입력 제어 명령 또는 오프셋 정보를 입력받아, 외부 버퍼로부터 스트림 입력 제어 명령에 따라 가변적으로 비트스트림을 입력받아 전달하는 역 다중화부;a demultiplexer which receives a stream input control command or offset information of an n-1 clock and variably receives a bitstream according to the stream input control command from an external buffer; 상기 비트스트림이 기준 비트스트림이하인 경우 동작을 수행하며, 상기 비트스트림을 자리 이동하여 오프셋 정보를 생성하는 비트 이동부;A bit shifter which performs an operation when the bitstream is equal to or less than a reference bitstream and generates offset information by shifting the bitstream; 상기 오프셋 정보와 n-1 클럭의 세그먼트 정보를 입력받아 상기 오프셋 정보와 상기 세그먼트 정보를 더하여 주소값을 산출하는 주소 결정부; 및An address determination unit receiving the offset information and segment information of the n-1 clock and calculating the address value by adding the offset information and the segment information; And 상기 산출된 주소값을 이용하여 상기 저장부로부터 데이터 정보를 독출하여 분석하여 인덱스 심볼 정보가 포함되어 있으면 상기 심볼 정보를 출력하고, 상기 심볼 정보가 포함되어 있지 않으면 세그먼트 정보와 스트림 입력 제어 명령을 생성하여 출력하는 제어부를 포함하는 허프만 복호화 장치.Read and analyze data information from the storage unit using the calculated address value to output the symbol information if index symbol information is included, and generate segment information and stream input control command if the symbol information is not included. Huffman decoding apparatus including a control unit for outputting. 제 1항에 있어서,The method of claim 1, 상기 입력된 비트스트림이 1비트이며 그 값이 0(zero)이면, 상기 역 다중화부는 n-1 클럭의 오프셋 정보를 입력받아 출력하는 허프만 복호화 장치. And if the input bitstream is 1 bit and its value is 0, the demultiplexer receives and outputs offset information of n-1 clocks. 제 1항에 있어서,The method of claim 1, 상기 역 다중화부가 상기 버퍼로부터 처음으로 비트스트림을 입력받는 경우, 상기 역 다중화부는 1비트만을 입력받아 상기 비트 이동부로 전달하며, 상기 비트 이동부는 상기 1비트를 자리 이동하지 않고 오프셋 정보를 생성하는 허프만 복호화 장치.When the demultiplexer receives a bitstream from the buffer for the first time, the demultiplexer receives only 1 bit and transfers the bitstream to the bit shifter, and the bit shifter generates HIP only without shifting the 1-bit. Decryption device. 제 1항에 있어서,The method of claim 1, 상기 스트림 입력 제어 명령은 상기 버퍼로부터 입력받을 비트스트림에 대한 크기 정보인 허프만 복호화 장치.And the stream input control command is size information of a bitstream to be input from the buffer. 제 1항에 있어서,The method of claim 1, 상기 비트 이동부는 상기 역 다중화부로부터 입력된 비트스트림이 2비트 이하인 경우 동작을 수행하여 상기 비트스트림을 왼쪽으로 자리 이동하여 오프셋 정보를 생성하는 허프만 복호화 장치.And the bit shifter performs an operation when the bitstream input from the demultiplexer is 2 bits or less and shifts the bitstream to the left to generate offset information. 가변 길이 트리를 이용하여 허프만 알고리즘에 의해 부호화된 비트스트림을 입력받아 임의의 코드워드에 상응하는 심볼 정보를 출력하는 방법에 있어서,A method of receiving a bitstream encoded by a Huffman algorithm using a variable length tree and outputting symbol information corresponding to an arbitrary codeword, n-1 클럭으로부터 입력된 스트림 입력 제어 명령에 따라 가변적으로 비트스트림을 입력받는 단계;receiving a bitstream variably according to a stream input control command input from an n-1 clock; 상기 입력된 비트스트림이 기준 비트스트림이하인지 여부를 판단하는 단계;Determining whether the input bitstream is less than or equal to a reference bitstream; 상기 기준 비트스트림 이하이면 입력된 비트스트림을 자리 이동하여 오프셋 정보를 생성하는 단계;Generating offset information by shifting the input bitstream if it is less than or equal to the reference bitstream; 상기 오프셋 정보와 n-1 클럭의 세그먼트 정보를 더하여 주소 값을 산출하는 단계;Calculating an address value by adding the offset information and segment information of an n-1 clock; 상기 주소 값에 저장된 데이터를 독출하여 분석하여 인덱스의 심볼 정보를 포함하고 있는지 여부를 판단하는 단계; 및Reading and analyzing data stored in the address value to determine whether it includes symbol information of an index; And 상기 심볼 정보를 포함하고 있다면, 상기 심볼 정보를 추출하여 출력하는 단계를 포함하는 가변 길이 트리를 이용한 허프만 복호화 방법.If the symbol information is included, extracting the symbol information and outputting the Huffman decoding method. 제 6항에 있어서,The method of claim 6, 상기 입력된 비트스트림이 1비트이며 그 값이 0(zero)인지 여부를 판단하는 단계; 및Determining whether the input bitstream is one bit and its value is zero; And 0(zero)라고 판단되면, n-1 클럭의 오프셋 정보를 입력받아 출력하는 단계를 더 포함하는 가변 길이 트리를 이용한 허프만 복호화 방법.If it is determined to be zero, the Huffman decoding method using a variable length tree further comprising receiving and outputting offset information of the n-1 clock. 제 6항에 있어서,The method of claim 6, 상기 심볼 정보를 포함하고 있지 않다면, n+1 클럭의 세그먼트 정보와 스트림 입력 제어 명령을 생성하는 단계를 더 포함하는 가변 길이 트리를 이용한 허프만 복호화 방법.Generating a stream input control command and segment information of an n + 1 clock if the symbol information is not included. 제 6항에 있어서,The method of claim 6, 상기 입력된 비트스트림이 최초 입력인지 여부를 판단하는 단계;Determining whether the input bitstream is an initial input; 최초 입력이면, 1비트 데이터만을 입력받는 단계; 및Receiving only 1-bit data if it is the first input; And 상기 입력된 1비트 데이터를 이용하여 주소 값을 산출하는 단계를 더 포함하는 가변 길이 트리를 이용한 허프만 복호화 방법.Computing an address value using the input 1-bit data Huffman decoding method using a variable length tree. 제 6항에 있어서,The method of claim 6, 상기 기준 비트스트림이하가 아니면, 입력된 비트스트림을 자리 이동 없이 오프셋 정보를 생성하는 단계를 더 포함하는 가변 길이 트리를 이용한 허프만 복호화 방법.And generating offset information without shifting the input bitstream if the reference bitstream is not equal to or less than the reference bitstream. 가변 길이 트리를 이용하여 허프만 알고리즘에 의해 부호화된 비트스트림을 입력받아 임의의 코드워드의 인덱스 정보를 검색하는 복호화 방법을 수행하기 위해 디지털 처리 장치에 의해 실행될 수 있는 명령어의 프로그램이 유형적으로 구현되어 있으며, 상기 디지털 처리 장치에 의해 판독될 수 있는 프로그램을 기록한 기록매체에 있어서,In order to perform a decoding method of receiving a bitstream encoded by a Huffman algorithm using a variable length tree and searching index information of an arbitrary codeword, a program of instructions that can be executed by a digital processing apparatus is tangibly implemented. In the recording medium recording a program that can be read by the digital processing device, n-1 클럭으로부터 입력된 스트림 입력 제어 명령에 따라 가변적으로 비트스트림을 입력받는 단계;receiving a bitstream variably according to a stream input control command input from an n-1 clock; 상기 입력된 비트스트림이 기준 비트스트림이하인지 여부를 판단하는 단계;Determining whether the input bitstream is less than or equal to a reference bitstream; 상기 기준 비트스트림 이하이면 입력된 비트스트림을 자리 이동하여 오프셋 정보를 생성하는 단계;Generating offset information by shifting the input bitstream if it is less than or equal to the reference bitstream; 상기 오프셋 정보와 n-1 클럭의 세그먼트 정보를 더하여 주소 값을 산출하는 단계;Calculating an address value by adding the offset information and segment information of an n-1 clock; 상기 주소 값에 저장된 데이터를 독출하여 분석하여 인덱스의 심볼 정보를 포함하고 있는지 여부를 판단하는 단계; 및Reading and analyzing data stored in the address value to determine whether it includes symbol information of an index; And 상기 심볼 정보를 포함하고 있다면, 상기 심볼 정보를 추출하여 출력하는 단계를 수행하는 프로그램을 기록한 기록 매체.And recording the symbol information, if the symbol information is included.
KR1020050109795A 2005-11-16 2005-11-16 Huffman decoding method and device for using variable length tree KR100686354B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050109795A KR100686354B1 (en) 2005-11-16 2005-11-16 Huffman decoding method and device for using variable length tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050109795A KR100686354B1 (en) 2005-11-16 2005-11-16 Huffman decoding method and device for using variable length tree

Publications (1)

Publication Number Publication Date
KR100686354B1 true KR100686354B1 (en) 2007-02-22

Family

ID=38104474

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050109795A KR100686354B1 (en) 2005-11-16 2005-11-16 Huffman decoding method and device for using variable length tree

Country Status (1)

Country Link
KR (1) KR100686354B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021060758A1 (en) * 2019-09-24 2021-04-01 심인보 Lossless data compression device and method therefor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5226082A (en) 1992-07-02 1993-07-06 At&T Bell Laboratories Variable length decoder
JPH07170197A (en) * 1993-12-13 1995-07-04 Ricoh Co Ltd Automatic generating method for decoding table for variable length code
JPH1013247A (en) 1996-06-10 1998-01-16 Daewoo Electron Co Ltd Variable-length code decoding method and device
KR20050037307A (en) * 2003-10-18 2005-04-21 삼성전자주식회사 Huffman decoding method based on n-tree searching and apparatus thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5226082A (en) 1992-07-02 1993-07-06 At&T Bell Laboratories Variable length decoder
JPH07170197A (en) * 1993-12-13 1995-07-04 Ricoh Co Ltd Automatic generating method for decoding table for variable length code
JPH1013247A (en) 1996-06-10 1998-01-16 Daewoo Electron Co Ltd Variable-length code decoding method and device
KR20050037307A (en) * 2003-10-18 2005-04-21 삼성전자주식회사 Huffman decoding method based on n-tree searching and apparatus thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021060758A1 (en) * 2019-09-24 2021-04-01 심인보 Lossless data compression device and method therefor

Similar Documents

Publication Publication Date Title
KR101737294B1 (en) Methods and devices for source-coding and decoding of data involving symbol compression
KR100894002B1 (en) Device and data method for selective compression and decompression and data format for compressed data
RU2158057C1 (en) Device for encoding and decoding without errors
Fitriya et al. A review of data compression techniques
KR20010085220A (en) Efficient coding of side information in a lossless encoder
KR20060053269A (en) Method and apparatus for encoding/decoding point sequences on laser binary representation
JP2002135131A (en) Method and apparatus for performing variable-size vector entropy coding
US20100017196A1 (en) Method, system, and apparatus for compression or decompression of digital signals
Saravanan et al. Enhancing efficiency of huffman coding using Lempel Ziv coding for image compression
RU2611249C1 (en) Entropy modifier and method to use it
US20070143118A1 (en) Apparatus and method for lossless audio signal compression/decompression through entropy coding
US20050232362A1 (en) High-speed image compression apparatus using last non-zero detection circuit
KR100686354B1 (en) Huffman decoding method and device for using variable length tree
US7683809B2 (en) Advanced lossless bit coding
KR100667595B1 (en) Variable length decoder
US8421655B2 (en) Apparatus for parallel entropy encoding and decoding
KR101256893B1 (en) Apparatus and method for encoding/coding data
EP3991303A1 (en) Features of range asymmetric number system encoding and decoding
Ravi et al. A study of various Data Compression Techniques
JP2008517495A (en) LASeR binary representation point sequence encoding / decoding method and apparatus
KR100207428B1 (en) Variable length coding apparatus and method adaptive to changes of the hoffman codes
Mohamed Wireless Communication Systems: Compression and Decompression Algorithms
JP2001007706A (en) Decoding device for variable length code
KR100960008B1 (en) Method and Apparatus for Coding and Decoding Using Adaptive Bit Precision
KR101174598B1 (en) Apparatus for generating compression file using lossless data compression algorism and method thereof

Legal Events

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

Payment date: 20130221

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20140203

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20150129

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20180129

Year of fee payment: 12