KR100975063B1 - Apparatus for decoding variable length coded bitstream, and method thereof, and recording medium storing a program to execute thereof - Google Patents
Apparatus for decoding variable length coded bitstream, and method thereof, and recording medium storing a program to execute thereof Download PDFInfo
- Publication number
- KR100975063B1 KR100975063B1 KR1020030100401A KR20030100401A KR100975063B1 KR 100975063 B1 KR100975063 B1 KR 100975063B1 KR 1020030100401 A KR1020030100401 A KR 1020030100401A KR 20030100401 A KR20030100401 A KR 20030100401A KR 100975063 B1 KR100975063 B1 KR 100975063B1
- Authority
- KR
- South Korea
- Prior art keywords
- bit
- codeword
- decoded
- value
- variable length
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/48—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion 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/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/40—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
본 발명은 가변 길이 복호화 장치 및 방법에 관한 것으로, 보다 구체적으로는 디지털 영상 신호 등의 가변 길이 부호화된 비트 스트림을 입력 받아 보다 고속으로 가변 길이 복호화가 가능하도록 하기 위한 것이다.The present invention relates to an apparatus and method for variable length decoding, and more particularly, to enable variable length decoding at a higher speed by receiving a variable length coded bit stream such as a digital video signal.
이를 위해, 본 발명엘 따른 가변 길이 부호화된 입력 비트스트림에 포함된 소정의 코드워드를 복호화하기 위한 가변 길이 복호화 장치는 입력된 n 비트의 코드워드에 대응하는 제1 복호값을 출력하는 n 비트 코드워드 검색부와; 입력된 n+1 비트의 코드워드에 대응하는 제2 복호값을 출력하는 n+1 비트 코드워드 검색부와; 제1 복호값 및 제2 복호값을 논리합하여 최종 복호값을 출력하는 최종 복호값 계산부를 포함한다. 이때, 각각의 검색부에 포함된 검색 테이블은 현재의 비트스트림에 있는 비트스트림 중에서 주어진 가변길이코드에 해당하는 하나의 어드레스의 출력만이 '0'이 아닌 값을 가지게 되고, 다른 검색 테이블의 출력은 모두 '0'의 값을 갖도록 하기 위해, 사용되지 않는 코드워드에 대응하는 복호값은 '0'의 값을 가지도록 설정되어 있다.To this end, the variable length decoding apparatus for decoding a predetermined codeword included in the variable length coded input bitstream according to the present invention provides an n bit code for outputting a first decoding value corresponding to an input n bit codeword. A word search unit; An n + 1 bit codeword search unit for outputting a second decoded value corresponding to the input codeword of n + 1 bit; And a final decoded value calculating unit for ORing the first decoded value and the second decoded value to output the final decoded value. At this time, in the search table included in each search unit, only one output of the address corresponding to a given variable length code among the bitstreams in the current bitstream has a value other than '0', and the output of the other search table. In order to make all have a value of '0', the decoding value corresponding to the unused codeword is set to have a value of '0'.
가변 길이 복호화 검색 테이블 코드워드Variable-length decrypted lookup table codeword
Description
도 1은 종래의 가변 길이 복호화 방법을 설명하기 위한 흐름도이다.1 is a flowchart illustrating a conventional variable length decoding method.
도 2는 본 발명에 따른 가변 길이 복호화 장치를 도시하는 도면이다.2 is a diagram illustrating a variable length decoding apparatus according to the present invention.
도 3은 본 발명의 일 실시예에 적용되는 가변 길이 복호화 테이블을 도시하는 도면이다.3 is a diagram illustrating a variable length decoding table applied to an embodiment of the present invention.
도 4는 본 발명의 일 실시예에 적용되는 2비트 검색 테이블을 도시하는 도면이다.4 is a diagram illustrating a 2-bit lookup table applied to an embodiment of the present invention.
도 5는 본 발명의 일 실시예에 적용되는 3비트 검색 테이블을 도시하는 도면이다.5 is a diagram illustrating a 3-bit lookup table applied to an embodiment of the present invention.
도 6은 도 2에 도시된 코드 길이 검출부를 도시하는 도면이다.FIG. 6 is a diagram illustrating a code length detector shown in FIG. 2.
도 7은 본 발명에 따른 가변 길이 복호화 방법을 설명하기 위한 흐름도이다.7 is a flowchart illustrating a variable length decoding method according to the present invention.
본 발명은 가변 길이 복호화 장치 및 방법에 관한 것으로서, 보다 구체적으로는 디지털 영상 신호 등의 가변 길이 부호화된 비트스트림을 입력 받아 보다 고속으로 가변 길이 복호화할 수 있도록 하는 가변 길이 복호화 장치 및 방법에 관한 것이다.The present invention relates to a variable length decoding apparatus and method, and more particularly, to a variable length decoding apparatus and method for receiving a variable length coded bitstream such as a digital video signal and performing variable length decoding at a higher speed. .
최근, 디지털 미디어 시대를 맞아 오디오, 비디오 등을 디지털 방식으로 저장 또는 전송을 목적으로 압축하고 이를 다시 재생하는 기술이 많이 사용되고 있다. Recently, in the era of digital media, a lot of technologies for compressing and reproducing audio, video, and the like for digital storage or transmission are used.
일반적으로, 디지털 영상 신호는 아날로그 영상 신호보다 좋은 화질을 유지할 수 있는 등의 장점이 있어 점점 많이 사용되고 있다. 하지만, 영상 정보를 디지털화할 경우, 정보량이 방대해지기 때문에, 효율적인 영상 정보 전송을 위해서는 영상 정보량을 압축 및 감축시킬 필요성이 있다.In general, digital video signals are being used more and more because they have advantages such as better image quality than analog video signals. However, when the video information is digitized, the amount of information is huge, so it is necessary to compress and reduce the video information amount for efficient video information transmission.
따라서, 영상의 특성을 이용한 효율적인 영상 압축 기법은 영상 통신의 핵심 기술 중의 하나이다. 이러한 영상 압축 기법에는 시간적 압축 기법, 공간적 압축 기법, 및 확률적 부호화 기법을 결합한 하이브리드 부호화 기법이 있다.Therefore, an efficient video compression technique using the characteristics of video is one of the core technologies of video communication. Such image compression techniques include hybrid coding techniques that combine temporal compression, spatial compression, and stochastic coding.
대부분의 하이브리드 부호화 기법은 차분 펄스 부호 변조(differential pulse code modulation: DPCM), 이산 코사인 변환(discrete cosine transform: DCT), DCT 계수의 양자화(quantization), 및 가변 길이 부호화(variable length coding: VLC) 등을 이용한다.Most hybrid coding techniques include differential pulse code modulation (DPCM), discrete cosine transform (DCT), quantization of DCT coefficients, and variable length coding (VLC). Use
여기에서, 가변 길이 부호화는 다양한 무손실의 데이터 압축을 위해 사용되는 기법으로서, 데이터의 통계적 발생에 기초하여 고정된 길이의 데이터를 가변 길 이의 데이터로 변환한다. 비디오의 경우를 보면, JPEG, MPEG 등의 국제 표준에서 가변 길이 코드를 이용한 압축 방법을 사용하고 있다.Here, variable length coding is a technique used for various lossless data compression and converts fixed length data into variable length data based on statistical generation of data. In the case of video, international standards such as JPEG and MPEG use a compression method using variable length codes.
가변 길이 부호화 방식에서는, 정보원의 데이터에 포함된 각 코드 워드의 발생 빈도에 따라 발생 빈도가 큰 코드워드는 짧은 길이의 코드 워드로 변환하고, 발생 빈도가 작은 코드워드는 긴 길이의 코드워드로 표시한다.In the variable length coding scheme, codewords with a high frequency of occurrence are converted into short codewords according to the frequency of occurrence of each codeword included in the data of the information source, and codewords with a small frequency of occurrence are represented by long codewords. do.
이와 같이, 가능성 있는 모든 코드 워드의 라이브러리에 가변 길이 크기의 워드를 적절히 할당함으로써, 부호화된 데이터의 평균 워드 길이는 정보원 데이터의 평균 워드 길이보다 짧게되므로, 이러한 방식으로 데이터 압축이 이루어지게 된다.In this way, by appropriately allocating a variable length word to a library of all possible code words, the average word length of the encoded data is shorter than the average word length of the source data, so that data compression is achieved in this manner.
하지만, 가변 길이 부호화된 비트스트림은 순차적이므로, 하나의 코드워드가 복호화된 이후에야, 다음 코드워드를 복호화하는 것이 가능하다. 따라서, 가변 길이 부호화된 비트스트림의 복호화시 파이프 라인이나 병렬 처리가 곤란한 문제점이 있었다. 특히, JPEG의 경우에는 가변 길이 코드가 고정되어 있지 않고, 압축을 하는 쪽에서 가변 길이 코드를 정의해서 사용할 수 있도록 되어 있기 때문에, 고속으로 가변 길이 코드를 복호화해야 하는 경우, 기존에 많이 사용되는 이진 탐색을 사용하는 경우 복호화 속도가 문제될 수 있다.However, since the variable length coded bitstream is sequential, it is possible to decode the next codeword only after one codeword is decoded. Accordingly, there is a problem in that pipeline or parallel processing is difficult when decoding a variable length coded bitstream. In particular, in the case of JPEG, the variable length code is not fixed, and since the variable length code can be defined and used on the compression side, binary search, which is frequently used when decoding a variable length code at high speed, is required. When using the decoding speed may be a problem.
도 1은 종래의 가변 길이 복호화 방법을 설명하기 위한 흐름도이다. 1 is a flowchart illustrating a conventional variable length decoding method.
단계 120에서는 입력된 비트 스트림으로부터 하나의 비트를 가져오고, 현재 탐색하고 있는 코드워드의 크기 i를 1로 설정한다.In
단계 140에서는 단계 120에서 가져온 i 비트 크기의 코드워드를 i 비트 크기 의 코드북에서 탐색하고, 상기 i 비트 크기의 코드워드가 i 비트 크기의 코드북에서 발견된 경우에는 단계 160으로 진행하고, 발견되지 않은 경우에는 단계 180으로 진행한다.In
단계 160에서는 단계 140에서 탐색된 코드워드에 대응하는 복호값 및 코드워드의 크기 i를 출력한다.In
단계 180에서는 이전에 탐색한 코드워드를 한 비트 왼쪽으로 쉬프트하고, 비트스트림에서 다음 한 비트를 더 가져와서 최하위 비트에 부가한 다음, 현재 탐색하고 있는 코드워드의 크기를 나타내는 i 값을 1 만큼 증가시킨 후, 단계 140으로 진행하여, 새로운 코드워드에 대해 i+1 비트 코드북에서 코드값들과 비교해서 탐색을 수행한다.In
이와 같이, 종래의 기술에서는 초기화시 복호하고자 하는 비트스트림에서 최초 1 비트의 코드워드를 가져와서, 1 비트의 코드북의 코드값들과 비교해서 탐색을 수행하고, 해당 코드워드에 대응하는 코드값을 발견하지 못한 경우에는, 비트스트림에서 다음 1 비트를 더 가져와서, 2 비트의 코드워드를 생성하고, 생성된 2 비트 크기의 코드워드에 대해 2 비트 코드북에서 코드 값들과 비교해서 탐색을 수행한다. 이와 같이, 탐색하고자 하는 코드워드의 크기를 1 비트씩 더해가면서 코드북에서 탐색하는 과정을 거친다. As described above, in the related art, a codeword of the first 1 bit is taken from a bitstream to be decoded at the time of initialization, the search is performed by comparing with code values of a 1-bit codebook, and a code value corresponding to the codeword is obtained. If not found, the next 1-bit is taken from the bitstream to generate a 2-bit codeword, and the search is performed by comparing the code values in the 2-bit codebook to the generated 2-bit codeword. As such, the codebook is searched in the codebook by adding the size of the codeword to be searched by 1 bit.
따라서, 예를 들어 n 비트의 가변 길이 코드를 탐색하기 위해서는 최소한 n 번의 탐색 루프를 거쳐야 하고, 가변 길이 코드의 복호화시 이진 검색을 사용하기 때문에, n 비트 길이를 갖는 가변 길이 코드를 찾기 위해서는 최소한 n 클록이 소 요되기 때문에, 한 클록에 하나의 심볼을 처리해야하는 실시간 동작, 예를 들어 보안 장비 및 카메라폰 등에서 많이 사용하는 MJPEG 등과 같은 고속의 JPEG 디코딩을 요하는 경우에는 사용할 수 없다는 문제점이 있었다.Thus, for example, searching for n bits of variable length code requires at least n search loops, and since binary search is used to decode the variable length codes, at least n is needed to find a variable length code of n bits in length. Since a clock is required, there is a problem in that it cannot be used when a high-speed JPEG decoding such as MJPEG, which is frequently used in security equipment and camera phones, is required, for example, in which one symbol needs to be processed in one clock.
본 발명이 이루고자 하는 기술적 과제는, 이러한 문제점을 해소하여, 가변 길이 부호화된 비트스트림을 실시간 응용에 적용 가능할 수 있도록 고속으로 복호화하기 위한 복호화 방법 및 장치를 제공하는 데 있다. An object of the present invention is to solve the above problems and to provide a decoding method and apparatus for decoding a variable length coded bitstream at high speed so as to be applicable to a real time application.
상기의 과제를 이루기 위하여 본 발명에 따른 가변 길이 부호화된 입력 비트스트림에 포함된 소정의 코드워드를 복호화하기 위한 가변 길이 복호화 장치는 입력 비트스트림 중 n 비트의 코드워드를 입력 받아, 입력된 n 비트의 코드워드에 대응하는 제1 복호값을 출력하는 n 비트 코드워드 검색부와; 입력 비트스트림 중 n+1 비트의 코드워드를 입력 받아, 입력된 n+1 비트의 코드워드에 대응하는 제2 복호값을 출력하는 n+1 비트 코드워드 검색부와; 제1 복호값 및 제2 복호값을 논리합하여 최종 복호값을 출력하는 최종 복호값 계산부를 포함하며, n 비트 코드워드 검색부는 n 비트 코드워드 각각에 대응하는 복호값들을 저장하는 n 비트 검색 테이블을 포함하고, n+1 비트 코드워드 검색부는 n+1 비트 코드워드 각각에 대응하는 복호값들을 저장하는 n+1 비트 검색 테이블을 포함하며, n 비트 검색 테이블에 저장된 복호값들 중, n 비트의 코드워드들 중 사용되지 않는 코드워드에 대응하는 복호값은 '0'이고, n+1 비트 검색 테이블에 저장된 복호값들 중, n+1 비트의 코드워드들 중 사용되지 않는 코드워드에 대응하는 복호값은'0'이다.In order to achieve the above object, a variable length decoding apparatus for decoding a predetermined codeword included in a variable length coded input bitstream according to the present invention receives n codewords of an input bitstream and inputs n bits. An n-bit codeword search unit for outputting a first decoded value corresponding to a codeword of? An n + 1 bit codeword search unit which receives a codeword of n + 1 bits in the input bitstream and outputs a second decoded value corresponding to the input codeword of n + 1 bit; And a final decoded value calculating unit configured to logically combine the first decoded value and the second decoded value and output a final decoded value, wherein the n-bit codeword search unit comprises an n-bit search table that stores decoded values corresponding to each of the n-bit codewords. The n + 1 bit codeword search unit includes an n + 1 bit search table that stores decoded values corresponding to each of the n + 1 bit codewords. A decoded value corresponding to an unused codeword among the codewords is '0', and corresponds to an unused codeword among the n + 1 bit codewords among the decoded values stored in the n + 1 bit search table. The decoding value is '0'.
상기 과제를 달성하기 위한, 본 발명에 따른 가변 길이 부호화된 입력 비트스트림에 포함된 소정 크기의 코드워드를 복호화하기 위한 가변 길이 복호화 방법은 입력 비트스트림 중 n 비트의 코드워드를 입력 받아, n 비트 검색 테이블을 참조하여, 입력된 n 비트의 코드워드에 대응하는 제1 복호값을 출력하는 단계와; 입력 비트스트림 중 n+1 비트의 코드워드를 입력 받아, n+1 비트 검색 테이블을 참조하여, 입력된 n+1 비트의 코드워드에 대응하는 제2 복호값을 출력하는 단계와; 제1 복호값 및 제2 복호값을 논리합하여 최종 복호값을 출력하는 단계를 포함하며, n 비트 검색 테이블은 n 비트의 코드워드 각각에 대응하는 복호값들을 포함하고, n+1 비트 검색 테이블는 n+1 비트의 코드워드 각각에 대응하는 복호값들을 포함하며, n 비트 검색 테이블에 저장된 복호값들 중, n 비트의 코드워드들 중 사용되지 않는 코드워드에 대응하는 복호값은 '0'이며, n+1 비트 검색 테이블에 저장된 복호값들 중, n+1 비트의 코드워드들 중 사용되지 않는 코드워드에 대응하는 복호값은'0'이다.In order to achieve the above object, a variable length decoding method for decoding a codeword having a predetermined size included in a variable length coded input bitstream according to the present invention receives n bit codewords from an input bitstream, Outputting a first decoded value corresponding to an input n-bit codeword by referring to a look-up table; Receiving a codeword of n + 1 bits in the input bitstream and referring to the n + 1 bit search table, outputting a second decoded value corresponding to the input codeword of n + 1 bits; And ORing the first decoded value and the second decoded value to output a final decoded value, wherein the n-bit lookup table includes decoded values corresponding to each of the n-bit codewords, and the n + 1 bit lookup table is n Decoded values corresponding to each +1 bit codeword, and among the decoded values stored in the n-bit lookup table, a decoded value corresponding to an unused codeword among the n-bit codewords is '0', Among the decoded values stored in the n + 1 bit search table, a decoded value corresponding to an unused codeword among the codewords of n + 1 bit is '0'.
또한, 상기 과제는 입력 비트스트림 중 n 비트의 코드워드를 입력 받아, n 비트 검색 테이블을 참조하여, 입력된 n 비트의 코드워드에 대응하는 제1 복호값을 출력하는 단계와; 입력 비트스트림 중 n+1 비트의 코드워드를 입력 받아, n+1 비트 검색 테이블을 참조하여, 입력된 n+1 비트의 코드워드에 대응하는 제2 복호값을 출력하는 단계와; 제1 복호값 및 제2 복호값을 논리합하여 최종 복호값을 출력하는 단계를 포함하며, n 비트 검색 테이블은 n 비트의 코드워드 각각에 대응하는 복호 값들을 포함하고, n+1 비트 검색 테이블는 n+1 비트의 코드워드 각각에 대응하는 복호값들을 포함하며, n 비트 검색 테이블에 저장된 복호값들 중, n 비트의 코드워드들 중 사용되지 않는 코드워드에 대응하는 복호값은 '0'이며, n+1 비트 검색 테이블에 저장된 복호값들 중, n+1 비트의 코드워드들 중 사용되지 않는 코드워드에 대응하는 복호값은'0'인 가변 길이 부호화된 입력 비트스트림에 포함된 소정 크기의 코드워드를 복호화하기 위한 가변 길이 복호화 방법을 수행하기 위한 프로그램이 기록된 기록 매체에 의해서도 달성된다.In addition, the object of the present invention comprises the steps of: receiving an n-bit codeword of an input bitstream, referring to an n-bit search table, and outputting a first decoded value corresponding to the input n-bit codeword; Receiving a codeword of n + 1 bits in the input bitstream and referring to the n + 1 bit search table, outputting a second decoded value corresponding to the input codeword of n + 1 bits; And ORing the first decoded value and the second decoded value to output a final decoded value, wherein the n-bit lookup table includes decoded values corresponding to each of the n-bit codewords, and the n + 1 bit lookup table is n Decoded values corresponding to each +1 bit codeword, and among the decoded values stored in the n-bit lookup table, a decoded value corresponding to an unused codeword among the n-bit codewords is '0', Among the decoded values stored in the n + 1 bit lookup table, a decoded value corresponding to an unused codeword among the n + 1 bit codewords is '0', and has a predetermined size included in the variable length coded input bitstream. A program for performing a variable length decoding method for decoding a codeword is also achieved by a recorded recording medium.
이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 2는 본 발명에 따른 가변 길이 복호화 장치를 도시한다. 2 shows a variable length decoding apparatus according to the present invention.
본 발명에 따른 가변 길이 복호화 장치는 비트스트림 저장부(220), 소정수의 비트 크기를 갖는 코드값에 각각 대응하는 복수개의 코드워드 검색부, 즉 2비트 코드워드 검색부 및 3비트 코드워드 검색부(240, 242), 복호값 계산부(260), 및 코드워드 길이 검출부(280)를 포함한다.The variable length decoding apparatus according to the present invention includes a
비트스트림 저장부(220)는 디코딩하고자 하는 가변 길이 부호화된 비트스트림을 저장하기 위한 버퍼이다. 본 실시예에서는, 설명의 간단을 위해 가변 길이 코드의 크기가 2 - 3 비트까지인 코드값들을 갖는 경우를 설명하기 위해, 비트스트림 저장부(220)의 크기가 2 - 3 비트인 경우를 고려한다. 선택적으로 n 비트까지의 길이를 갖는 가변 길이 코드를 디코딩하기 위해, 비트스트림 저장부(220)로서 n 비트의 크기를 갖는 비트스트림 버퍼를 사용하는 것도 고려할 수 있다.The
본 실시예에 따른 코드워드 검색는 2비트 코드워드 검색부(240) 및 3비트 코 드워드 검색부(242)를 포함한다.The codeword search according to the present embodiment includes a 2-bit
도 3은 본 발명의 일 실시예에 적용되는 가변 길이 코드와 각각의 코드에 할당된 디코딩된 값을 도시하는 가변 길이 복호화 테이블을 도시한다.3 shows a variable length decoding table showing a variable length code and a decoded value assigned to each code applied to an embodiment of the present invention.
도 4는 도 3에 도시된 가변 길이 코드 중 2 비트의 길이를 갖는 가변 길이 코드의 검색 테이블, 즉 2 비트 검색 테이블을 도시하는 도면이다. 본 발명에 따른 2 비트 검색 테이블은 2 비트의 길이를 가지는 가변 길이 코드의 해당 코드를 어드레스로 해서, 해당 어드레스에 대응하는 디코드된 값이 저장되어 있다. 예를 들어, 도 3에 도시된 2 비트 가변 길이 코드들 중 '10'의 디코드된 값은, 2 비트 검색 테이블의 어드레스 '10'에 저장된 '11110000'이며, 2 비트 가변 길이 코드들 중 '11'의 디코딩된 값은, 2 비트 검색 테이블의 어드레스 '11'에 저장된 '11110100'이다.FIG. 4 is a diagram showing a lookup table of a variable length code having a length of 2 bits among the variable length codes shown in FIG. 3, that is, a 2-bit lookup table. In the two-bit lookup table according to the present invention, a decoded value corresponding to the address is stored with the corresponding code of a variable length code having a length of two bits as an address. For example, the decoded value of '10' among the 2-bit variable length codes shown in FIG. 3 is '11110000' stored at address '10' of the 2-bit variable length code, and '11' among the 2-bit variable length codes. The decoded value of 'is' 11110100' stored at address' 11 'of the 2-bit lookup table.
한편, 2 비트 검색 테이블의 어드레스로 사용되는 2 비트 코드들 중, 사용되지 않는 코드에는 '0' 값이 저장된다. 예를 들어, 2 비트 검색 테이블의 어드레스 '00' 및 '01'에는 '00000000' 값이 저장된다. Meanwhile, a value of '0' is stored in an unused code among two bit codes used as an address of a two bit search table. For example, values '00000000' are stored in addresses '00' and '01' of the 2-bit lookup table.
도 5는 도 3에 도시된 가변 길이 코드 중 3 비트의 길이를 갖는 가변 길이 코드의 검색 테이블, 즉 3 비트 검색 테이블을 도시하는 도면이다. 본 발명에 따른 3 비트 검색 테이블은 3 비트의 길이를 가지는 가변 길이 코드의 해당 코드를 어드레스로 해서, 해당 어드레스에 대응하는 디코딩된 값이 저장되어 있다. 예를 들어, 도 3에 도시된 3 비트 가변 길이 코드들 중 '010'의 디코딩된 값은, 3 비트 검색 테이블의 어드레스 '010'에 저장된 '11110101'이며, 3 비트 가변 길이 코드들 중 '011'의 디코딩된 값은, 3 비트 검색 테이블의 어드레스 '011'에 저장된 '11111000'이다.FIG. 5 is a diagram showing a lookup table of a variable length code having a length of 3 bits among the variable length codes shown in FIG. 3, that is, a 3-bit lookup table. In the 3-bit lookup table according to the present invention, a decoded value corresponding to the address is stored using the code of a variable length code having a length of 3 bits as an address. For example, the decoded value of '010' among the 3 bit variable length codes shown in FIG. 3 is '11110101' stored at address '010' of the 3 bit lookup table, and '011' among the 3 bit variable length codes. The decoded value of 'is' 11111000' stored at address' 011 'of the 3-bit lookup table.
한편, 3 비트 검색 테이블의 어드레스로 사용되는 3 비트 코드들 중, 사용되지 않는 코드에는 '0' 값이 저장된다. 예를 들어, 3 비트 검색 테이블의 어드레스 '000','001','100','101','110' 및 '111'에는 '00000000' 값이 저장된다. Meanwhile, a value of '0' is stored in an unused code among 3 bit codes used as an address of the 3 bit search table. For example, values '00000000' are stored at addresses '000', '001', '100', '101', '110' and '111' of the 3-bit search table.
2비트 검색 테이블(240)은 비트스트림 저장부(220)의 맨앞 2 비트에 연결된 어드레스 라인을 통해, 비트스트림 저장부(220)에 저장된 비트스트림 중 맨앞 2 비트를 어드레스 정보로서 입력 받는다. 또한, 3비트 검색 테이블(242)은 비트스트림 저장부(220)의 맨앞 3 비트에 연결된 어드레스 라인을 통해, 비트스트림 저장부(220)에 저장된 비트스트림 중 맨앞 3 비트를 어드레스 정보로서 입력 받는다. The 2-bit search table 240 receives the first two bits of the bitstream stored in the
2비트 코드워드 검색부(240) 및 3비트 코드워드 검색부(242)는 저장된 검색 테이블(도시되지 않음)을 참조하여, 입력된 각각의 코드워드에 대응하는 디코딩값을 출력한다.The 2-bit
예를 들어, 비트스트림 저장부(220)에 '110'가 저장되어 있는 경우, 2비트 코드워드 검색부(242)에는 어드레스 값 '11'이 입력되고, 2비트 코드워드 검색 부(242)는 도 4에 도시된 2비트 검색 테이블을 참조하여, 어드레스 '11'에 저장된 이진수 값 '11110100'을 출력한다. For example, when '110' is stored in the
또한, 3비트 코드워드 검색부(242)에는 어드레스 값 '110'가 입력되고, 3비트 코드워드 검색부(242)는 도 5에 도시된 3비트 검색 테이블을 참조하여, 어드레 스 '110'에 저장된 이진수 값 '00000000'을 출력한다. In addition, an address value '110' is input to the 3-bit
복호값 계산부(260)는 2비트 코드워드 검색부(240) 및 3비트 코드워드 검색부(242) 각각의 출력에 기초하여 입력 코드워드에 대응하는 복호값을 계산하고, 그 결과값을 출력한다. The
복호값 계산부(260)는 2비트 코드워드 검색부(240)에서 출력된 이진수 값 '11110100' 및 3비트 코드워드 검색부(242)에서 출력된 이진수 값 '00000000'을 입력받아, 이들 이진수 값의 논리합 '11110100'을 복호값으로 출력한다.The
이와 같이, 비트스트림 저장부(220)에 소정의 값이 입력되면, 각각의 검색 테이블에는 이 값이 어드레스 값으로서 입력되고, 모든 검색테이블의 출력 중에서 현재의 비트스트림에 있는 비트스트림 중에서 주어진 가변길이코드에 해당하는 하나의 어드레스의 출력만이 '0'이 아닌 값을 가지게 되고, 다른 검색 테이블들의 출력은 모두 '0'값을 가지게 된다. 복호값 계산부(260)는 이들 각각의 검색 테이블의 출력값들에 대해, 각각의 해당 위치의 비트들끼리 논리합하고, 이에 따라 얻어진 값은 가변 길이 코드를 디코딩 한 값이 되고, 이를 최종 복호값으로 출력한다.As such, when a predetermined value is input to the
동일한 방식으로, n 비트 코드워드를 디코딩하는 경우, 비트스트림 저장부의 최상위 비트로부터 n 비트를 n 개의 검색 테이블의 어드레스 라인에 연결하고, 각 검색 테이블을 도 4 및 도 5와 같이 코드의 길이가 같은 코드들을 분리해서, 그 코드를 각각의 검색 테이블의 어드레스로 하여, 각 코드에 할당된 값을 저장함으로써, 본 실시예에 따른 가변 길이 복호화 방법을 수행하는 것이 가능하다.In the same way, when decoding an n bit codeword, concatenate n bits from the most significant bit of the bitstream storage to the address lines of the n lookup tables, and each lookup table has the same length of code as shown in FIGS. 4 and 5. By separating the codes, making the code the address of each lookup table, and storing the value assigned to each code, it is possible to perform the variable length decoding method according to the present embodiment.
도 6은 도 2에 도시된 코드 길이 검출부(280)를 보다 구체적으로 도시하는 블록도이다.FIG. 6 is a block diagram illustrating the
도 2에 도시된 2비트 코드워드 검색부(240) 및 3비트 코드워드 검색부(242)로부터의 출력값은 1 검출기(282;284)로 입력된다.The output values from the 2-bit
1 검출기(282;284)는 입력 값이 '0'인 경우에는 '0'을 '0'이 아닌 경우에는 '1'을 출력한다. The
제1 논리곱 계산부(286)는 1 검출기(282)의 출력값과 2비트 코드워드 검색부(240)의 코드 길이 값 2를 논리곱하여, 그 결과값을 출력한다.The first AND
제2 논리곱 계산부(288)는 1 검출기(284)의 출력값과 3비트 코드워드 검색부(242)의 코드 길이 값 3을 논리곱하여, 그 결과값을 출력한다.The second AND
코드길이 계산부(290)는 제1 논리곱 계산부(286)의 출력값과 제2 논리곱 계산부(288)의 출력값을 논리합하여, 그 결과값을 비트스트림 저장부(220)에 저장된 비트스트림 중 가변 길이 복호화되어야 하는 가변 길이 코드의 코드길이로서 출력한다.The
예를 들어, 비트스트림 저장부(220)에 '110'가 저장되어 있는 경우, 상기에서 설명된 바와 같이, 2비트 코드워드 검색부(240)는 이진수 값 '11110100'을 출력하고, 3비트 코드워드 검색부(242)은 이진수 값 '00000000'을 출력한다. For example, when '110' is stored in the
따라서, 1 검출기(282)는 2비트 코드워드 검색부(240)로부터 이진수 값 '11110100'을 입력받고, 입력 값이 '0'이 아니기 때문에 '1' 값을 출력한다. 또 다른 1 검출기(284)는 3비트 코드워드 검색부(242)로부터 이진수 값 '00000000'을 입력 받고, 입력 값이 '0'이기 때문에, '0'값을 출력한다. Accordingly, the 1
제1 논리곱 계산부(286)는 1 검출기(282)의 출력값 '1'과 2비트 검색 테이블(240)의 코드 길이 값 2를 논리곱하여, 그 결과값 '2'를 출력한다.The first AND
제2 논리곱 계산부(288)는 1 검출기(284)의 출력값 '0'과 3비트 검색 테이블(242)의 코드 길이 값 3을 논리곱하여, 그 결과값 '0'을 출력한다.The second AND
코드길이 계산부(290)는 제1 논리곱 계산부(286)의 출력값 '2'와 제2 논리곱 계산부(288)의 출력값 '0'을 논리합하여, 그 결과값 '2'를 가변 길이 코드의 코드길이로서 출력한다.The
도 7은 본 발명에 따른 가변 길이 복호화 방법을 설명하기 위한 흐름도이다.7 is a flowchart illustrating a variable length decoding method according to the present invention.
단계 720에서는 입력 비트스트림 중 n 비트의 코드워드를 어드레스 정보로서 입력 받아, n 비트 검색 테이블을 참조하여, 상기 입력된 n 비트의 코드워드에 대응하는 제1 복호값을 계산한다. 예를 들어, n=2인 경우, 도 4에 도시된 2비트 검색 테이블을 참조하여, 입력된 2 비트 코드워드에 대응하는 복호값을 출력한다.In
단계 740에서는 입력 비트스트림 중 n+1 비트의 코드워드를 어드레스 정보로서 입력 받아, n+1 비트 검색 테이블을 참조하여, 상기 입력된 n+1 비트의 코드워더에 대응하는 제2 복호값을 계산한다. 예를 들어, n=2인 경우, 도 5에 도시된 3비트 검색 테이블을 참조하여, 입력된 3비트 코드워드에 대응하는 복호값을 출력한다.In
단계 760에서는 단계 740 및 단계 760에서 계산된 제1 복호값 및 제2 복호값을 논리합하여 최종 복호값을 출력한다.In
본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment for the present invention. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the scope will be construed as being included in the present invention.
상술한 바와 같이 본 발명에 따른 가변 길이 복호화 방법에 따르면, 고정되지 않은 가변 길이 코드로 부호화된 비트스트림, 특히 디지털 멀티 미디어를 실시간으로 재생하는 것이 가능하다는 효과가 있다.As described above, according to the variable length decoding method according to the present invention, there is an effect that it is possible to reproduce in real time a bitstream, especially a digital multimedia, encoded with an unfixed variable length code.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020030100401A KR100975063B1 (en) | 2003-12-30 | 2003-12-30 | Apparatus for decoding variable length coded bitstream, and method thereof, and recording medium storing a program to execute thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020030100401A KR100975063B1 (en) | 2003-12-30 | 2003-12-30 | Apparatus for decoding variable length coded bitstream, and method thereof, and recording medium storing a program to execute thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20050070633A KR20050070633A (en) | 2005-07-07 |
KR100975063B1 true KR100975063B1 (en) | 2010-08-11 |
Family
ID=37260690
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020030100401A KR100975063B1 (en) | 2003-12-30 | 2003-12-30 | Apparatus for decoding variable length coded bitstream, and method thereof, and recording medium storing a program to execute thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100975063B1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR19990050486A (en) * | 1997-12-17 | 1999-07-05 | 전주범 | High-speed processing variable-length codec device |
KR19990050488A (en) * | 1997-12-17 | 1999-07-05 | 전주범 | Efficient area variable length codec device |
KR19990081316A (en) * | 1998-04-28 | 1999-11-15 | 구자홍 | Table structure of variable length code and parallel decoding device and method |
-
2003
- 2003-12-30 KR KR1020030100401A patent/KR100975063B1/en not_active IP Right Cessation
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR19990050486A (en) * | 1997-12-17 | 1999-07-05 | 전주범 | High-speed processing variable-length codec device |
KR19990050488A (en) * | 1997-12-17 | 1999-07-05 | 전주범 | Efficient area variable length codec device |
KR19990081316A (en) * | 1998-04-28 | 1999-11-15 | 구자홍 | Table structure of variable length code and parallel decoding device and method |
Also Published As
Publication number | Publication date |
---|---|
KR20050070633A (en) | 2005-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11638007B2 (en) | Codebook generation for cloud-based video applications | |
US11770131B2 (en) | Method and device for arithmetic encoding or arithmetic decoding | |
EP1322119A2 (en) | Apparatus for encoding and decoding key data and keyvalue data of coordinate interpolator and recording medium | |
US7880647B1 (en) | Huffman decoding method | |
JP4502384B2 (en) | Variable length code decoding apparatus and variable length code decoding method | |
KR100667595B1 (en) | Variable length decoder | |
US6563442B1 (en) | Multiple symbol length lookup table | |
KR100975063B1 (en) | Apparatus for decoding variable length coded bitstream, and method thereof, and recording medium storing a program to execute thereof | |
KR100576548B1 (en) | Apparatus and Method of Context-based Adaptive Variable Length Decoding | |
JP2008517495A (en) | LASeR binary representation point sequence encoding / decoding method and apparatus | |
Mohamed | Wireless Communication Systems: Compression and Decompression Algorithms | |
JP2934603B2 (en) | Method and apparatus for decoding variable length code | |
CN113141505B (en) | Video data coding method and device | |
KR100686354B1 (en) | Huffman decoding method and device for using variable length tree | |
JP6509916B2 (en) | Method and apparatus for performing arithmetic coding based on concatenated ROM-RAM table | |
KR0134359B1 (en) | Coding and decoding system of variable scan region | |
JPH0983378A (en) | Encoding device and decoding device | |
KR19980023632A (en) | Video signal compression coding device | |
JPS62193382A (en) | System and device for encoding and decoding picture signal | |
JP2003102012A (en) | Image encoder and image decoder, and image encoding method and image decoding method | |
JPH05207292A (en) | Variable length coding decoding circuit | |
JPH05207293A (en) | Variable length coding decoding circuit | |
KR20030054146A (en) | Apparutus for Variable Length Coding with low power consumption | |
JPH06224775A (en) | Huffman decoder |
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: 20130730 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20140730 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20150730 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20160728 Year of fee payment: 7 |
|
LAPS | Lapse due to unpaid annual fee |