KR0152015B1 - Variable length encode/decode method and apparatus - Google Patents

Variable length encode/decode method and apparatus

Info

Publication number
KR0152015B1
KR0152015B1 KR1019920010502A KR920010502A KR0152015B1 KR 0152015 B1 KR0152015 B1 KR 0152015B1 KR 1019920010502 A KR1019920010502 A KR 1019920010502A KR 920010502 A KR920010502 A KR 920010502A KR 0152015 B1 KR0152015 B1 KR 0152015B1
Authority
KR
South Korea
Prior art keywords
scanning
address
scan
data
diagonal
Prior art date
Application number
KR1019920010502A
Other languages
Korean (ko)
Other versions
KR940001717A (en
Inventor
정제창
Original Assignee
강진구
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 강진구, 삼성전자주식회사 filed Critical 강진구
Priority to KR1019920010502A priority Critical patent/KR0152015B1/en
Publication of KR940001717A publication Critical patent/KR940001717A/en
Application granted granted Critical
Publication of KR0152015B1 publication Critical patent/KR0152015B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding

Landscapes

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

Abstract

정보신호를 N×NN 블록단위로 디지탈부호화하는 방법 및 장치에 있어서, 매크로블록내의 서브블록들에 서로 다른 복수의 지그재그주사방법을 번갈아 이용하여 길이/크기변환을 수행함으로써, 한 매크로블록내의 데이타패턴(분포)에 따라 가변장 부호화되어 출력되는 데이타량의 변화를 안정화하며, 출력데이타를 저장하는 버퍼의 제어를 용이하게 하는 효과가 있다.A method and apparatus for digitally encoding an information signal in units of N × NN blocks, wherein a length / size conversion is performed by alternately using a plurality of different zigzag scanning methods for subblocks in a macroblock, thereby performing data pattern in one macroblock. According to the (distribution), the variation in the amount of data output by variable length coding is stabilized, and the control of the buffer for storing the output data is facilitated.

Description

가변장 부호화/복호화 방법 및 그 장치Variable length encoding / decoding method and apparatus

제1도는 종래의 영상신호 디지탈부호화장치.1 is a conventional video signal digital encoding apparatus.

제2도는 2차원데이타의 지그재그주사(ZigZag Scan)방법.2 is a zigzag scan method of two-dimensional data.

제3도는 N×NN 블록에 대한 지그재그주사.3 is a zigzag scan for N × NN blocks.

제4도는 종래의 지그재그주사방식.4 is a conventional zigzag scan method.

제5도는 본 발명의 일 실시예에 따른 가변장 부호화장치.5 is a variable length encoding apparatus according to an embodiment of the present invention.

제6도는 본 발명의 일 실시예에 따른 2차원데이타의 지그재그주사방식.6 is a zigzag scanning method of two-dimensional data according to an embodiment of the present invention.

제7도는 2차원 허프만부호(2-Dim. Huffman Code)를 나타내는 테이블.FIG. 7 is a table showing 2-Dim. Huffman Code.

제8도는 본 발명의 일 실시예에 따른 가변장 복호화장치.8 is a variable length decoding apparatus according to an embodiment of the present invention.

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

10,27 : 메모리 11,22 : 카운터기10,27: memory 11,22: counter

12,13,23,24 : 주사번지발생기 14,25 : 절환제어기12,13,23,24: Scanning address generator 14,25: Switching controller

15,26 : 절환기 16 : 길이(RuN×Nength)/크기(Leve)변환기15,26: Changer 16: Length (RuN × Nength) / Leve converter

17 : 2차원 허프만부호화기 18 : 버퍼17 two-dimensional Huffman encoder 18 buffer

20 : 2차원 허프만복호화기 21 : 길이/크기 역변환기20: 2D Huffman Decoder 21: Length / Size Inverse Converter

본 발명은 가변장 부호화/복호화 방법 및 그 장치에 관한 것으로서 특히 양자화된 2차원데이타에 서로 다른 지그재그주사방법을 번갈아 사용하여 가변장 부호화 및 복호화하는 방법과 그 장치에 관한 것이다.The present invention relates to a variable length encoding / decoding method and apparatus, and more particularly, to a method and apparatus for variable length encoding and decoding using alternating zigzag scanning methods for quantized two-dimensional data.

HD-TV, HD-VTR, 디지탈 VTR, 디지탈캠코더 등의 화상과 음향을 디지탈부호화하여 전송하거나 저장한 후 다시 복호화하는 시스템에서는 영상신호에 들어있는 군더더기(ReduN×Nncy)를 없애고 데이타량을 줄이기 위하여 변환부호화, DPCM(DiffereN×Nal Pulse Code Modulation; 차분펄스부호 변조), 벡터양자화, 가변장 부호화(Variable LeN×Nh Coding;VLC))등의 여러가지 부호화방법을 사용한다.In a system that digitally encodes and transmits or stores images and audio such as HD-TV, HD-VTR, digital VTR, and digital camcorder, and then decodes them in order to remove redundancy in video signals and reduce data volume Various coding methods such as transform coding, DPCM (Differe N × Nal Pulse Code Modulation), vector quantization, and Variable LeN × Nh Coding (VLC) are used.

제1도는 종래의 영상신호 디지탈부호화장치를 나타내는 블록도로서, 동보상 DPCM 방식과 가변장 부호화방식을 이용하는 디지탈부호화장치를 나타낸 것이다.FIG. 1 is a block diagram showing a conventional video signal digital coding apparatus, and shows a digital coding apparatus using a dynamic compensation DPCM scheme and a variable length coding scheme.

제1도에 표시된 종래의 디지탈 부호화장치는 입력영상신호를 블록단위로 변환하여 양자화하는 수단과, 양자화된 영상신호를 가변장 부호화하는 수단과, 양자화수단의 출력신호를 역양자화 및 역변환하는 수단과, 역변환된 영상신호를 입력받아 움직임벡터(Motion Vector) 신호를 발생하며 영상의 변화를 보상하는 동보상수단으로 구성된다. 영상신호(VS)가 입력단을 통하여 디지탈 부호화장치에 입력되면, 시간영역의 데이터로 표시되는 영상신호(VS)는 N×N)에서 DCT(Discrete Cosine Transform) 등의 변환방법에 의하여 주파수영역의 변환계수로 변환된다. 변환에 의하여 발생하는 변환계수형태의 영상신호는 양자화기(2)에서 대표값들로 양자화되어 출력된다. 양자화기(2)의 출력신호가 역양자화기(3) 및 N×NN 역변환기(4)를 거치면서 시간영역의 데이터로 변환하여 출력되면, 프레임메모리(5), 동추정부(6) 및 동보상부(7)로 구성되는 동보상수단에서는 영상프레임간의 움직임을 추정하여 움직임벡터(Motion Ventor)를 발생한다. 또한, 동보상수단에서는 지금까지의 동보상에 의해서 얻어진 영상신호와 입력단자로 입력되는 그 다음 프레임의 영상신호를 비교하여 영상간의 차이에 의해 발생하는 차분(Differential)의 영상신호를 움직임벡터를 이용하여 보상하며, 보상된 영상신호를 가산기 A1 및 A2로 피드백하는 과정을 반복하면서 동보상 DPCM 과정을 이룬다.The conventional digital coding apparatus shown in FIG. 1 includes means for converting and quantizing an input video signal in units of blocks, variable length coding for quantized video signals, means for inverse quantization and inverse transformation of the output signal of the quantization means; In addition, the video signal is composed of dynamic compensation means for receiving an inversely converted video signal, generating a motion vector signal, and compensating for a change in the video. When the video signal VS is input to the digital encoding apparatus through an input terminal, the video signal VS, which is represented as data in the time domain, is converted into a frequency domain by a conversion method such as DCT (Discrete Cosine Transform) from N × N. Is converted to a coefficient. The video signal in the form of a transform coefficient generated by the transform is quantized and represented by representative values in the quantizer 2. When the output signal of the quantizer 2 is converted into data in the time domain through the inverse quantizer 3 and the N × NN inverse transformer 4 and outputted, the frame memory 5, the synchronization unit 6, and the broadcast In the dynamic compensating means composed of the upper portion 7, motion vectors are generated by estimating the motion between the image frames. Also, the motion compensating means compares the video signal obtained by the previous compensating image with the video signal of the next frame inputted to the input terminal, and uses the motion vector as the differential video signal generated by the difference between the images. By repeating the process of feeding back the compensated video signal to the adders A1 and A2.

상술의 양자화기(2)의 출력신호가 가변장 부호화기(8)에 입력되면, 그 신호는 가변장 부호화기(8)의 내부에 있는 메모리에 주파수영역의 2차원데이타로 저장된다.When the above-described output signal of the quantizer 2 is input to the variable length encoder 8, the signal is stored as two-dimensional data in the frequency domain in a memory inside the variable length encoder 8.

가변장 부호화기(8)는 영상신호가 변환계수형태로 저장된 메모리를 지그지그주사(ZigZag Scan)하여 발생하는 출력신호를 부호화하는 방식으로 영상신호를 가변장 부호화한다. 가변장 부호화되어 출력되는 영상신호는 버퍼(9)에 임시로 저장되며 버퍼(9)의 상태에 따라 발생하는 양자화스텝사이즈(Quantized Step Size)(QS)는 양자화기(2)의 양자화레벨을 조절한다.The variable length encoder 8 variably encodes an image signal in a manner of encoding an output signal generated by ZigZag scanning a memory in which the image signal is stored in the form of a transform coefficient. The video signal output by the variable length encoding is temporarily stored in the buffer 9, and the quantized step size QS generated according to the state of the buffer 9 adjusts the quantization level of the quantizer 2. do.

가변장 부호화에 이용하는 지그재그주사는 시스템의 해상도에 따라 화소 또는 여러개의 화소로 구성되는 단위블록이 여러개 모여서 구성되는 블록에 대한 변환계수 데이터값을 소정의 형태로 변환하기 위한 것으로서 제2도 및 제3도를 참조하여 설명한다.The zigzag scanning used for variable length coding is to convert the conversion coefficient data values of a block composed of a plurality of pixels or a unit block composed of several pixels according to the resolution of the system into a predetermined form. It demonstrates with reference to FIG.

제2도는 2차원데이타의 지그재그주사(ZigZag Scan)방법을 나타낸 것이다. 제2a도는 좌측상단에서 주사를 시작하여 우측으로 단위간격만큼 이동한 후 대각선 좌측하단방향으로 이동하는 방식으로 지그재그주사를 시작하는 방법(이하, '제1주사방법'이라함)을 도시한 것이며, 제2b도는 좌측 상단에서 주사를 시작하여 아래로 단위간격만큼 이동한 후 대각선 우측상단 방향으로 이동하는 방식으로 지그재그주사를 시작하는 방법(이하, '제2주사방법'이라함)을 나타낸 것이다.2 shows a zigzag scan method of two-dimensional data. FIG. 2a illustrates a method of starting a zigzag scan (hereinafter referred to as a 'first scanning method') by starting scanning in the upper left corner, moving the unit interval to the right side, and moving in the diagonal lower left direction. FIG. 2b shows a method of starting a zigzag scan (hereinafter, referred to as a 'second scan method') by starting scanning at the upper left side, moving downward by a unit interval, and moving in a diagonal upper right direction.

또한, 제3도는 N×NN 블록에 대한 2차원데이타의 지그재그주사를 나타낸 도식으로, 주파수영역에서 표시된 2차원데이타블록의 지그재그주사를 나타낸 것이다. 양자화된 변환계수가 좌측상단을 직류(CD) 성분으로 하여 가로축은 수평주파수성분, 세로축은 수직주파수성분으로 하는 주파수영역의 2차원데이타로 저장되면, 블록내에서 변환계수로 표시되는 영상신호는 제3도에 표시된 바와 같은 지그재그주사에 의하여 소정의 형태로 변환하여 부호화된다. 즉, 2차원데이타의 형태로 표시되는 양자화된 변환계수의 대부분이 0일때가 많은 점에 착안하여 저주파성분부터 시작하여 지그재그주사에의해 최고주파수성분까지 길이(RuN×Nength)/크기(Level)의 형태로 부호화한다. 여기서 '0'이 아닌 변환계수의 절대값은 '크기(Level)'이라고 한다.3 is a diagram showing a zigzag scan of two-dimensional data for an N × NN block, and shows a zigzag scan of a two-dimensional data block displayed in the frequency domain. If the quantized transform coefficient is stored as two-dimensional data of the frequency domain with the upper left as the direct current (CD) component and the horizontal axis as the horizontal frequency component and the vertical axis as the vertical frequency component, the video signal represented by the transform coefficient in the block is It is converted into a predetermined form and encoded by zigzag scanning as shown in FIG. That is, most of the quantized transform coefficients expressed in the form of two-dimensional data are zero, and the length (RuN × Nength) / Level (Level) starts from the low frequency component to the highest frequency component by zigzag scanning. Encode in form. Here, the absolute value of the conversion factor other than '0' is called 'level'.

제4도는 종래의 지그재그주사방식을 나타낸 것으로서, 하나의 매크로 블록(Macro Block)에서의 휘도신호에 의한 변환계수블록 Y1~Y4와 색신호에 의한 변환계수블록 C1, C2를 나타낸 것이다. 제4도에서 보는 바와 같이 종래의 지그재그주사에서는 매크로블록내의 블록들에 대응하는 변환계수블록전부를 동일한 주사방법, 즉, 제2a도에 도시한 바와 같은 방법으로 주사하는 방식을 이용하였다.FIG. 4 shows a conventional zigzag scanning method, and shows conversion coefficient blocks Y 1 to Y 4 based on luminance signals in one macro block and conversion coefficient blocks C 1 and C 2 based on color signals. As shown in FIG. 4, in the conventional zigzag scan, the entire transform coefficient block corresponding to the blocks in the macroblock is scanned by the same scanning method, that is, as shown in FIG. 2A.

상기와 같은 종래의 지그재그주사방법에 의하면 각 매크로블록에 대응하는 2차원 변환계쑤 데이터에서 가변장 부호화하여 출력되는 데이터량이 매크로블록들에 속해있는 영상에 의하여 결정되므로 영상의 패턴에 의해 각 매크로블록들에 존재하는 영상신호간에 큰 차이가 있으면 매크로블록들에 대응하는 변환계수블록들에서 발생되는 부호화한 출력데이타량 역시 큰 차이가 발생한다. 따라서 가변장 부호화하여 출력되는 영상신호를 임시저장하는 버퍼의 제어가 곤란해지는 문제가 발생한다.According to the conventional zigzag scanning method as described above, since the amount of data output by variable-length encoding on the two-dimensional transform series data corresponding to each macroblock is determined by the image belonging to the macroblocks, each macroblock is determined by the pattern of the image. If there is a large difference between the video signals existing in, the encoded output data amount generated in the transform coefficient blocks corresponding to the macroblocks also occurs. Therefore, a problem arises in that it becomes difficult to control a buffer for temporarily storing a video signal output by variable length encoding.

본 발명은 상기와 같은 문제점을 해결하기 위한 것으로서, 본 발명의 목적은 두가지 지그재그주사방법을 번갈아 사용하여 각 변환블록들을 주사함으로써 가변장 부호화되어 출력되는 데이터량을 일정하게 하며, 용이하게 버퍼를 제어할 수 있는 가변장 부호화방법 및 그 장치를 제공함에 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to uniformly output the variable length encoded data by scanning each transform block using two zigzag scanning methods alternately, and to easily control the buffer. The present invention provides a variable length encoding method and an apparatus thereof.

본 발명의 또 다른 목적은 본 발명에 따른 가변장 부호화 방법 및 그 장치에 의하여 부호화된 신호를 복호화하는 복호화방법 및 그 장치를 제공함에 있다.Another object of the present invention is to provide a variable length coding method and a decoding method for decoding a signal encoded by the apparatus and the apparatus according to the present invention.

상기의 목적으 달성하기 위한 본 발명의 특징은, 영상신호를 N×N은 정수)의 변환계수로 변환하여 부호화하는 방법에 있어서, 변환계수 데이터를 N×NN 블록단위로 저장하는 단계와; 서로 다른 복수개의 대각선 주사방법에 의해 발생하는 주사번지를 상기 단계에서 저장되는 변환계수 데이터의 블록들에 대하여 N×NN 블록단위로 번갈아 인가하여 인가되는 번지에 대응하는 데이터를 출력하는 변환계쑤 데이터 출력단계와; 상기 단계에서 출력하는 데이터를 길이(RuN×Nength)/크기(Level) 변환하는 단계와; 길이/크기변환된 데이터를 소정의 부호를 이용하여 부호화하는 단계를 포함하는 가변장 부호화방법에 있다.According to an aspect of the present invention, there is provided a method of converting and encoding a video signal into a transform coefficient of N × N, an integer, the method comprising: storing the transform coefficient data in N × NN block units; Transform output data outputting data corresponding to the applied address by alternately applying scanning addresses generated by a plurality of different diagonal scanning methods to blocks of the conversion coefficient data stored in the above step in N × NN block units Steps; Converting length (RuN × Nength) / size (Level) of the data output in the step; There is provided a variable length encoding method comprising encoding length / size converted data using a predetermined code.

상기의 목적을 달성하기 위한 본 발명의 다른 특징은, N×N 블록단위로 부호화한 영상신호를 복호화하는 방법에 있어서, 상기 제1항의 방법에 따라 부호화된 신호를 인가받아 소정의 부호를 이용하여 복호화하는 단계와; 상기 단계에서 복호화된 데이터를 길이/크기 역변환하는 단계와; 서로 다른 복수개의 대각선 주사방법에 의해 발생하는 주사번지를 N×N 블록단위로 번갈아 출력하는 대각선주사번지 출력단계와; 상기 길이/크기 역변환단계에서 발생하는 데이터를 대각선 주사번지 출력단계의 주사번지에 맞추어 저장하는 단계를 포함하는 가변장 복호화방법에 있다.Another feature of the present invention for achieving the above object is a method of decoding a video signal encoded in units of N × N blocks, by receiving a signal encoded according to the method of claim 1 by using a predetermined code Decrypting; Inversely converting the length / size of the data decoded in the step; A diagonal scan address output step of alternately outputting scanning addresses generated by a plurality of different diagonal scanning methods in units of N × N blocks; The variable length decoding method includes storing data generated in the length / size inverse transform step in accordance with a scan address of a diagonal scan address output step.

상기의 목적을 위한 본 발명은, 영상신호를 N×N 블록의 변환계수로 변환하여 부호화하는 장치에 있어서, 변환계수 데이터를 N×N 블록단위로 저장하는 수단과; 상기 저장수단에 저장되는 변환계수 데이터에 서로 다른 복수개의 주사방법에 의한 주사번지를 N×N 블록단위로 번갈아 인가하는 주사번지 발생수단과; 주사번지 발생수단에서 발생하는 주사번지에 의하여 저장수단으로부터 출력되는 데이터를 길이/크기변환하는 수단과; 길이/크기 변환된 데이터를 부호화하는 수단을 포함하는 가변장 부호화장치에 있다.According to an aspect of the present invention, there is provided an apparatus for converting and encoding a video signal into a transform coefficient of an N × N block, comprising: means for storing transform coefficient data in units of N × N blocks; Scanning address generating means for alternately applying scanning addresses by a plurality of different scanning methods in units of N × N blocks to the conversion coefficient data stored in the storage means; Means for length / size conversion of data output from the storage means by the scanning address generated in the scanning address generating means; A variable length coding apparatus including means for encoding length / size converted data.

또한, 상기의 목적을 위한 본 발명은, N×N 블록단위로 부호화한 영상신호를 복호화하는 장치에 있어서, 상기 제1항의 방법에 따라 부호화된 영상신호를 인가받아 복호화하는 수단과; 복호화수단의 출력데이타를 길이/크기 역변환하는 수단과; 서로 다른 복수개의 주사방법에 의한 주사번지를 N×N 블록단위로 번갈아 발생하는 주사번지 발생수단과; 길이/크기 역변환수단의 출력신호를 주사번지 발생수단의 주사번지에 맞추어 저장하는 저장수단을 포함하는 가변장 복호화장치에 있다.In addition, the present invention for the above object, the apparatus for decoding a video signal encoded in units of N × N block, means for receiving and decoding a video signal encoded according to the method of claim 1; Means for inversely converting the length / size of the output data of the decoding means; Scanning address generating means for alternately generating scanning addresses in units of N × N blocks by a plurality of different scanning methods; And a storage means for storing the output signal of the length / magnitude inverse converting means in accordance with the scanning address of the scanning address generating means.

이하 본 발명에 따른 가변장 부호화장치 및 복호화장치의 바람직한 일실시예를 첨부한 도면을 참조하여 상세히 설명한다. 또한, 본 발명에서는 변환계수블록을 8×8 블록이라 정하고 이하의 일실시예를 설명한다.Hereinafter, exemplary embodiments of a variable length encoder and a decoder according to the present invention will be described in detail with reference to the accompanying drawings. In addition, in the present invention, a transform coefficient block is defined as an 8x8 block, and one embodiment will be described below.

제5도는 본 발명의 일 실시예에 따른 가변장 부호화장치를 나타내는 블록도로서, 두 개의 대각선 지그재그주사(ZigZag Scan) 방법을 번갈아 사용함으로써 2차원데이타를 부호화하는 가변장 부호화장치를 나타낸 것이다.5 is a block diagram illustrating a variable length encoder according to an embodiment of the present invention, and illustrates a variable length encoder that encodes two-dimensional data by alternately using two diagonal ZigZag scan methods.

본 발명의 가변장 부호화장치는, 양자화된 변환계수 데이타를 저장하는 메모리(10)와, 메모리(10)에 주사번지를 발생하는 주사번지 발생수단과, 메모리(10)와 주사번지 발생수단을 연결하는 절환수단을 포함한다.The variable length encoding apparatus of the present invention comprises a memory 10 for storing quantized transform coefficient data, a scanning address generating means for generating a scanning address in the memory 10, and a connection between the memory 10 and the scanning address generating means. It includes a switching means to.

주사번지 발생수단은 제2a도의 제1주사방법에 따른 주사번지를 발생하는 제1주사번지발생기(12)와 제2b도의 제2주사방법에 따른 주사번지를 발생하는 제2주사번지발생기(13) 및 주사번지발생기(12,13)에 카운팅 신호를 인가하는 카운터기(11)로 구성된다. 또한, 절환수단은 하나의 연결단자 a로 입력되는 제1주사번지발생기(12)의 출력신호와 다른 하나의 연결단자 b로 입력되는 제2주사번지발생기(13)의 출력신호를 절환하여 메모리(10)에 인가하는 절환기(15)와, 절환기(15)를 제어하기위한 신호를 발생하는 절환제어기(14)를 구비한다. 여기서는 절환제어기(14)를 따로 구성하였으나 시스템전체를 제어하는 제어수단에서 발생하는 제어신호를 절환기(15)로 인가하도록 실시예를 구성할 수도 있다.The scanning address generating means includes a first scanning address generator 12 for generating an scanning address according to the first scanning method of FIG. 2A and a second scanning address generator 13 for generating an scanning address according to the second scanning method of FIG. 2B. And a counter 11 for applying a counting signal to the scan address generators 12 and 13. In addition, the switching means switches the output signal of the first scan address generator 12 input to one connection terminal a and the output signal of the second scan address generator 13 input to the other connection terminal b. A switch 15 applied to 10) and a switch controller 14 for generating a signal for controlling the switch 15 are provided. Although the switching controller 14 is configured separately here, the embodiment may be configured to apply the control signal generated from the control means for controlling the whole system to the switching unit 15.

상술의 메모리(10)에는 길이(RuN×Nength) 변환하는 길이/크기변환기(16)와 2차원 허프만부호화기(17) 및 버퍼(18)가 순차적으로 연결된다. 여기서 2차원 허프만부호화기(17)는 길이(RuN×Nength)의 범위 0~63, 크기(Level)의 범위 1~255인 2차원 허프만부호(2-Dim. Huffman Code)를 구현한 것이다.The length / size converter 16 for converting length RuN × Nength, the two-dimensional Huffman encoder 17, and the buffer 18 are sequentially connected to the memory 10 described above. Here, the two-dimensional Huffman coder 17 implements a two-dimensional Huffman code having a range of 0 to 63 of a length RuN × Nength and a range of 1 to 255 of a level.

제1도에 도시된 영상신호(VS)가 변환 및 양자화수단에 입력하면, 영상신호(VS)는 N×N 변환기(1)에 의하여 N×N 블록(예를 들어, 8×8 블록)에 대한 변환이 이루어진다. 즉, DCT(Discrete CosiN×NTransform) 등의 변환에 의하여 주파수를 독립변수로하는 변환계수의 형태로 변환한다. 변환에 의해 발생하는 변환계수는 양자화기(2)에서 양자화 과정을 통해 인간의 눈으로 느끼기 어려운정도까지 대표값들로 변환한다. 상술의 양자화기(2)의 출력신호는 제5도의 가변장부호화장치에 의하여 가변장 부호화된다. 가변장부호화장치의 메모리(10)에 입력하는 변환계수는 제3도에서 처럼 수직주파수성분 및 수평주파수성분을 8×8 크기의 메모리번지로하는 디지탈데이타로 저장된다.When the video signal VS shown in FIG. 1 is input to the conversion and quantization means, the video signal VS is input to an N × N block (for example, 8 × 8 block) by the N × N converter 1. Conversion is made. In other words, the transform is transformed into a transform coefficient having a frequency as an independent variable by transform such as DCT (Discrete CosiN × NTransform). The transformation coefficient generated by the transformation is converted into representative values to the extent that it is difficult for the human eye to feel through the quantization process in the quantizer 2. The output signal of the above-described quantizer 2 is variable length coded by the variable length coding apparatus of FIG. The conversion coefficient input to the memory 10 of the variable length coding apparatus is stored as digital data in which vertical frequency components and horizontal frequency components are 8 × 8 size memory addresses as shown in FIG.

제6도는 본 발명의 일 실시예에 따른 2차원데이타의 지그재그주사를 나타낸 것으로서, 하나의 매크로블록에 속하는 여러블록들에 대응하는 2차원 변환계수 데이타로 표시되는 블록들에 대한 지그재그주사를 표시한 것이다.6 is a diagram illustrating a zigzag scan of two-dimensional data according to an embodiment of the present invention, in which a zigzag scan of blocks represented by two-dimensional transform coefficient data corresponding to several blocks belonging to one macroblock is displayed. will be.

일반적으로 컬러화상부호에 있어서는 휘도신호 Y에 대한 데이터와 색신호 C에 대한 데이터로 나누어지는 데, 색신호는 대역폭이 작기 때문에 상하좌우로 데시매이션(Decimation)하면 정보를 그다지 잃어버리지 않으면서도 화소수를 줄일 수 있다. 따라서, 화면분할에 의한 블록 중 6개의 블록으로 하나의 매크로블록을 구성하는 경우, 휘도신호 Y에 대한 변환계수블록 Y1~Y4와 색신호 C에 대한 변환계수블록 C1, C2로 하나의 매크로블록들에 대한 변환계수형태의 영상신호데이타를 표시한다. 본 발명에서는 6개의 블록으로 하나의 매크로블록을 구성하였으나 블록갯수를 달리하여 매크로블록을 구성하는 것도 가능하다. 하나의 매크로블록에 해당하는 데이터가 수평주파수성분 및 수직주파수성분을 메모리번지로하는 2차원 변환계수 데이타 블록의 형태(Y1~Y4, C1,C2)로 메모리(10)에 저장된다. 또한, 메모리(10)에 저장되는 변환계수 데이터는 주사번지 발생수단 및 절환수단에 의하여 입력되는 주사번지에 대응하여 출력된다.In general, a color image code is divided into data for luminance signal Y and data for color signal C. Since the color signal has a small bandwidth, decimation of the image signal up, down, left, or right, the number of pixels can be reduced without losing much information. Can be reduced. Therefore, when one macroblock is composed of six blocks among screen divisions, one conversion coefficient block Y 1 to Y 4 for luminance signal Y and one conversion coefficient block C 1 and C 2 for color signal C are used. Displays image signal data in the form of transform coefficients for macroblocks. In the present invention, one macroblock is composed of six blocks, but macroblocks may be configured by varying the number of blocks. Data corresponding to one macroblock is stored in the memory 10 in the form of two-dimensional transform coefficient data blocks (Y 1 to Y 4 , C 1, C 2 ) having horizontal and vertical frequency components as memory addresses. . Further, the conversion coefficient data stored in the memory 10 is output corresponding to the scanning address input by the scanning address generating means and the switching means.

카운터기(11)에 소정의 타이머(도면에 표시되지 않음)로부터의 클럭신호(CK)가 입력되면, 업 카운트(Up Count)하도록 구성된 카운터기(11)는 카운팅신호를 동시에 제1, 2주사번지발생기(12, 13)로 출력한다. 카운터기(11)의 출력신호에 따라 제1주사번지발생기(12) 및 제2주사번지발생기(13)에서는 내장된 주사순서에 의한 메모리주사번지를 출력한다. 즉, 한 번의 카운터기(11)의 출력신호에 대하여 제1주사번지발생기(12) 및 제2주사번지발생기(13)는 각각 하나의 내장된 주사번지를 출력한다. 여기서 출력되는 주사번지의 갯수범위는 8×8 변환계수블록에 대하여 64개이다. 제1주사번지발생기(12)에 의해 제2a도의 순서로 출력되는 소정의 주사번지와 제2주사번지발생기(13)에 의해 제2b도의 순서로 출력되는 다른 소정의 주사번지는 각각 연결단자(a,b)를 통하여 절환기(15)에 인가된다. 그리고, 절환제어기(14)는 절환기(15)가 두 연결단자(a,b)를 한 번 씩 번갈아 선택하도록 하는 제어신호를 절환기(15)로 출력한다. 결국, 절환제어기(14)는 제6도에 도시된 바와 같이 데이터블록 Y1, Y4, C1에는 제1주사방법이 이용되고, 데이터블록 Y2, Y3, C2에는 제2주사방법이 이용되도록 절환기(15)를 제어한다. 그래서, 절환기(15)는 두 연결단자(a,b)로 입력되는 주사번지를 절환하여 메모리(10)에 절달한다. 결국, 절환제어기(14)의 제어에 따라 절환기(15)는 두개의 주사번지 발생기 중 하나를 선택하며, 선택된 주사번지 발생기에 의하여 인가되는 주사번지에 대응하는 변환계수 데이터는 메모리(10)로부터 출력된다.When the clock signal CK from the predetermined timer (not shown in the figure) is input to the counter 11, the counter 11 configured to up count up the counting signal simultaneously with the first and second scan address generators. Output as (12, 13). In accordance with the output signal of the counter 11, the first scan address generator 12 and the second scan address generator 13 output memory scan addresses in a built-in scan order. That is, the first scan address generator 12 and the second scan address generator 13 respectively output one built-in scan address with respect to the output signal of one counter machine 11. The number of scanning addresses output here is 64 for the 8x8 transform coefficient block. The predetermined scan address output by the first scan address generator 12 in the order of FIG. 2a and the other predetermined scan address output by the second scan address generator 13 in the order of FIG. It is applied to the switch 15 through b). Then, the switching controller 14 outputs a control signal to the switcher 15 for the switcher 15 to alternately select the two connection terminals a and b one by one. As a result, the switching controller 14 uses the first scanning method for the data blocks Y 1 , Y 4 , and C 1 , and the second scanning method for the data blocks Y 2 , Y 3 , and C 2 , as shown in FIG. 6. The switch 15 is controlled so that it is used. Thus, the switch 15 switches the scan addresses input to the two connection terminals a and b to deliver to the memory 10. As a result, the switch 15 selects one of two scan address generators according to the control of the switch controller 14, and the conversion coefficient data corresponding to the scan address applied by the selected scan address generator is stored from the memory 10. Is output.

주사번지에 대응하여 출력되는 데이터는 상술한 바와 같이 주파수 영역의 변환계수 데이터로서 그 대부분이 '0'일때가 많으므로 길이(RuN×Nength)/크기(Level)변환기(16)에 의하여 길이/크기 형태로 부호화된다.As the data output corresponding to the scan address is the conversion coefficient data in the frequency domain as described above, most of them are '0', so the length / size by the RuN × Nength / Level converter 16 is large. Encoded in the form.

예를들어, 8×8 블록의 경우, '길이'는 0~63까지의 값을 가질 수 있고, 양자화된 데이터가 -255~255 까지의 범위에 속하면 '크기'는 1~255의 범위를 가지며 부호비트(Sign Bit)는 별도로 지정한다.For example, for an 8x8 block, 'length' can range from 0 to 63. If quantized data is in the range from -255 to 255, 'size' can range from 1 to 255. The sign bit is specified separately.

길이/크기변환기(16)에서 출력되는 신호는 2차원 허프만부호화기(17)에 의하여 부호화된다.The signal output from the length / size converter 16 is encoded by the two-dimensional Huffman coder 17.

제7도는 2차원 허프만부호(2-Dim. Huffman Code)를 나타내는 테이블로서, 0~63까지의 길이(RuN×Nength)와 1~255의 크기(Level)을 갖는 2차원 허프만부호를 임의로 정하여 나타낸 것이다. 허프만부호는 높은 확률로서 출현하는 심볼(Symbol)일수록 보다 짧은 부호어(Code Word)로 변환시키는 부호화방식으로 지그재그주사에 따라 발생하는 길이/크기신호에서 발생빈도가 통계적으로 낮은 심볼에 대하여는 에스케이프영역(Escape Region)의 부호어를 할당하고, 반면에 매우 높은 발생빈도의 심볼에는 통상적인 허프만 알고리즘에 따르는 정규영역(Regular Region)의 부호어를 할당한다. 제7도의 경우, 정규영역에서는 2, 4, 5등이 부호어의 길이이고, 에스케이프영역에서는 6비트의 에스케이프부호 ESC와 6비트의 길이 및 8비트의 크기, 그리고 1비트의 부호(SigN×N구성되는 에스케이프 시이퀀스(Escape Sequence)로 부호어의 길이를 규정한다.7 is a table showing 2-Dim. Huffman Code, in which a 2-D Huffman code having a length from 0 to 63 (RuN × Nength) and a size of 1 to 255 is arbitrarily selected. will be. The Huffman code is a coding method that converts a symbol appearing with a higher probability into a shorter code word. The Huffman code is an escape area for a symbol having a low occurrence frequency in a length / size signal generated by a zigzag scan. The codeword of the (Escape Region) is assigned, while the codeword of the regular region is assigned to a symbol with a very high frequency. In the case of Fig. 7, the length of the codeword is 2, 4, 5, etc. in the normal region, and the 6-bit escape code ESC in the escape region, the length of 6 bits, the size of 8 bits, and the 1-bit code The length of the codeword is specified by an escape sequence composed of xN.

상술한 메모리(10)의 출력데이타가 길이/크기변환 및 2차원 허프만부호화하는 과정의 이해를 돕기위해 제3도에 표시한 A를 예를 들어 설명한다. 제3도에 표시된 'A'를 그 위치의 크기(Level)라 하고, 나머지 위치에서는 모두 '0'의 크기를 갖는다면, 제1주사방법에 따른 주사의 경우 그 길이/크기값은 15/A이며, 제2주사방법에 따르는 주사의 경우 그 길이/크기값은 20/A가 된다. 상술의 길이/크기값들은 제7도의 2차원 허프만부호에 의하여 20/A는 에스케이프 시이퀀스로 처리되어 가변장 부호화된 데이터의 길이가 매우 길고, 15/A는 정규영역에 속하므로 가변장 부호화된 데이터의 길이가 상대적으로 매우 짧게 된다. 이것은 길이/크기변환되어 변환계수블록내의 동일한 위치에 대해서도 주사방법을 달리함으로써 가변장 부호화한 데이터의 길이가 다르게 되는 것을 보인 것이다.A shown in FIG. 3 will be described as an example to help understand the process of output / output conversion of the memory 10 and length / size conversion and two-dimensional Huffman encoding. If 'A' shown in FIG. 3 is called the level of the position, and all other positions have the size of '0', the length / size value of the scan according to the first scanning method is 15 / A. In the case of the scan according to the second scanning method, the length / size value is 20 / A. The length / size values described above are processed by the two-dimensional Huffman code shown in FIG. 7 so that the length of the variable length coded data is very long, and the length of the variable length coded data is variable length coded since 15 / A belongs to the normal region. The length of data is relatively very short. This shows that the length of the variable length coded data is different by length / size conversion and different scanning methods even for the same position in the transform coefficient block.

이러한 방식으로 길이/크기값들은 2차원 허프만부호화기(17)에서 가변장 부호화한 데이터들로 변환하여 출력된다. 상술의 가변장 부호화과정을 거치며 2차원 허프만부호화기(17)에서 출력되는 부호들은 버퍼(18)에 저장된다. 따라서, 매크로블록내의 각 변환계수블록들에 대하여 지그재그주사를 하는 경우, 가로방향 또는 세로방향으로 서로 인접하는 각 변환 계수블록들에 대하여 서로 다른 주사방법을 번갈아 사용하면, 각 변환계수블록들의 계수분포가 상이할지라도 전체 매크로블록에 대한 변환계수블록들을 가변장 부호화한 후 출력되는 데이터량은 각 매크로블록마다 거의 일정하게 된다. 또한, 저장되는 버퍼(17)의 상태에 맞추어 변경되는 양자화스텝사이즈는 거의 일정하게 된다.In this manner, the length / size values are output after being converted into data having been variable-length coded by the two-dimensional Huffman encoder 17. The codes output from the 2D Huffman encoder 17 through the variable length encoding process described above are stored in the buffer 18. Therefore, when zigzag scanning is performed on each transform coefficient block in a macroblock, if a different scanning method is alternately used for each transform coefficient block adjacent to each other in the horizontal or vertical direction, the coefficient distribution of each transform coefficient block is used. Although different, the amount of data output after the variable length coding of the transform coefficient blocks for all macroblocks is substantially constant for each macroblock. In addition, the quantization step size changed in accordance with the state of the buffer 17 to be stored becomes almost constant.

제8도는 본 발명의 일 실시예에 따른 가변장 복호화장치를 나타내는 블록도로서, 두 개의 서로 다른 지그재그주사방법을 이용하여 2차원 데이터를 복호화하는 가변장 복호화장치를 나태낸 것이다.8 is a block diagram illustrating a variable length decoding apparatus according to an exemplary embodiment of the present invention, and illustrates a variable length decoding apparatus for decoding two-dimensional data using two different zigzag scanning methods.

본 발명의 가변장 복호화장치는, 상술의 가변장 부호화장치에 의하여 가변장 부호화된 데이터를 허프만부호를 이용하여 복호화하는 2차원 허프만 복호화기(20)와, 2차원 허프만복호화기(20)의 출력신호를 소정의 형태로 변환하여 메모리(27)에 인가하는 길이/크기 역변환기(21)와, 입력신호를 주파수 영역의 변환계수 데이타로 저장하는 메모리(27)를 포함한다.The variable length decoding apparatus of the present invention includes a two-dimensional Huffman decoder 20 and a two-dimensional Huffman decoder 20 for decoding variable length coded data by the variable length coding apparatus described above using a Huffman code. A length / magnitude inverse converter 21 for converting a signal into a predetermined form and applying it to the memory 27, and a memory 27 for storing an input signal as conversion coefficient data in a frequency domain.

또한, 가변장 복호화장치는 상술의 가변장 부호화장치와 동일한 주사번지를 발생하는 주사번지발생수단과, 매크로블록내의 각 블록들에 상술의 가변장 부호화장치에서와 동일한 주사방법을 인가하도록 메모리(27)에 인가되는 주사번지를 절환하는 수단을 구비한다. 상술의 주사번지 발생수단은 소정의 타이머(도면에 표시되지않음)로부터 인가되는 클럭신호(CK)를 업카운트하는 카운터기(22)와, 카운터기(22)의 출력신호를 입력받아 제1주사방법에 따른 주사번지를 발생하는 제3주사번지발생기(33) 및 제2주사방법에 따른 주사번지를 발생하는 제4주사번지발생기(24)로 구성된다. 주사번지 발생수단과 메모리(27)를 연결하는 절환수단은 제3주사번지발생기(23)의 출력신호가 인가되는 연결단자 c와 제4주사번지발생기(24)로부터 출력되는 신호가 인가되는 연결단자 d를 소정의 제어신호에 따라 절환하는 절환기(26) 및 상술의 가변장부호화장치에서의 절환제어기(14)와 동일한 방식으로 제어 신호를 생성하여 절환기(26)에 인가하는 절환제어기(25)를 구비한다.In addition, the variable length decoding apparatus includes a scanning address generating means for generating the same scanning address as the variable length coding apparatus described above, and a memory 27 to apply the same scanning method to each of the blocks in the macroblock as in the variable length coding apparatus described above. Means for switching the scanning address to be applied). The scan address generating means described above receives the counter device 22 for up counting the clock signal CK applied from a predetermined timer (not shown) and the output signal of the counter device 22 to receive the first scanning method. And a third scan address generator 33 for generating a scanning address according to the present invention, and a fourth scan address generator 24 for generating a scanning address according to the second scanning method. The switching means for connecting the scanning address generating means and the memory 27 includes a connection terminal c to which an output signal of the third scan address generator 23 is applied and a signal to which a signal output from the fourth scan address generator 24 is applied. A switching controller 25 for generating a control signal and applying it to the switching device 26 in the same manner as the switching device 26 for switching d according to a predetermined control signal and the switching controller 14 in the variable length coding apparatus described above. ).

상술의 가변장 부호화장치에서 부호화한 영상신호가 제8도의 2차원 허프만복호화기(20)에 입력되면, 입력되는 영상신호는 2차원 허프만복호화기(20)에서 2차원 허프만부호화기(17)와는 반대과정 즉, 소정의 크기를 갖는 부호어가 길이/크기의 형태로 변환되는 과정에 의해 변환출력된다.When the video signal encoded by the variable length encoding apparatus described above is input to the 2D Huffman decoder 20 of FIG. 8, the input video signal is opposite to the 2D Huffman encoder 17 in the 2D Huffman decoder 20. In other words, the codeword having a predetermined size is converted and output by a process of converting the codeword into a length / size form.

한편, 카운터기(22)는 상술한 카운터기(11)와 동일하게 작용을 한다. 그래서, 미도시한 타이머로부터 카운터기(22)로 클럭신호가 입력되면, 카운터기(22)는 클럭신호를 업카운트하여 카운팅신호를 동시에 제3,4주사번지발생기(23,24)로 인가한다. 그러면, 상술한 가변장 부호화장치의 제1주사번지발생기(12)와 동일한 주사순서를 내장한 제3주사번지발생기(23) 및 제2주사번지발생기(13)와 동일한 주사순서를 내장한 제4주사번지발생기(24)는 내장된 주사번지를 출력한다. 즉, 한 번의 카운터기(22)의 출력신호에 대하여 제3주사번지발생기(23) 및 제4주사번지발생기(24)는 각각 하나의 내장된 주사번지를 절환기(26)의 연결단자 c,d로 출력한다. 그리고, 절환기(26)는 절환제어기(25)의 제어신호에 따라 연결단자 c,d를 한 번씩 번갈아 선택하여 주사번지를 메모리(27)로 출력한다. 그래서, 절환기(26)에서는 절환제어기(25)의 제어신호에 따라 상술한 가변장 부호화장치와 동일한 주사방법을 각 블록에 할당함으로써 가변장 복호화장치에 입력되는 부호화된 영상신호를 부호화기 이전의 영상신호와 실제적으로 동일한 신호로 복호화한다. 즉, 매크로블록내의 각 블록들에 대해 Y1~Y4, C1, C2의 순서로 지그재그주사가 이루어지고, Y1, Y4, C1에 대하여는 제1주사방법에 의한 주사번지를 인가하며 Y2, Y3, C2에서는 제2주사방법에 의한 주사번지를 인가하여 길이/크기 역변환기(21) 출력신호를 메모리(27)에 저장함으로써 부호화하는 신호와 실제적으로 동일한 신호로 복호화한다. 복호화된 영상신호는 역양자화기(도면에 표시되지 않음)에 의하여 역양자화된 이산신호들로 변형된다.On the other hand, the counter machine 22 functions similarly to the counter machine 11 mentioned above. Therefore, when the clock signal is input from the timer (not shown) to the counter 22, the counter 22 counts up the clock signal and simultaneously applies the counting signal to the third and fourth scan address generators 23 and 24. Then, a fourth scan address generator 23 having the same scan order as the first scan address generator 12 of the variable length encoding apparatus described above and a fourth scan address having the same scan order as the second scan address generator 13 are embedded. The scan address generator 24 outputs a built-in scan address. That is, the third scan address generator 23 and the fourth scan address generator 24 each have one built-in scan address at the output signal of the counter 22, and the connection terminals c and d of the switch 26 are respectively. Will output Then, the changer 26 alternately selects the connection terminals c and d once in accordance with the control signal of the switching controller 25 and outputs the scanning address to the memory 27. Therefore, the switcher 26 assigns each block the same scanning method as the above-described variable length encoder in accordance with the control signal of the switch controller 25 so as to assign the encoded video signal inputted to the variable length decoder to the image before the encoder. Decode into a signal that is actually the same as the signal. That is, zigzag scanning is performed in the order of Y 1 to Y 4 , C 1 , and C 2 for each block in the macroblock, and scanning address according to the first scanning method is applied to Y 1 , Y 4 , and C 1 . In Y 2 , Y 3 , and C 2 , the scanning address according to the second scanning method is applied to store the output signal of the length / magnitude inverse converter 21 in the memory 27 to decode the signal to be substantially the same as the signal to be encoded. . The decoded video signal is transformed into dequantized discrete signals by an inverse quantizer (not shown in the figure).

상기의 일 실시예에서는 매크로블록내의 Y1, Y4, C1블록에는 제1주사방법을 이용하며, Y2, Y3, C2블록에서는 제2주사방법을 사용함으로써 발생되는 데이터량을 거의 일정하게 하였다. 그리고, 휘도신호블록에서 세로방향으로 두 개의 주사방법을 번갈아 사용하는 것, 즉 Y1, Y2블록에는 제1주사방법을, Y3, Y4블록에는 제2주사방법을 사용하는 것이나, 휘도신호블록에서 가로방향으로 두 개의 주사방법을 번가아 사용하는 것, 즉 Y1, Y3블록에는 제1주사방법을, Y2, Y4에는 제2주사방법을 사용하는 것은 상술한 휘도신호블록에서 대각선방향으로 동일한 주사방법을 사용함으로써 주사방법을 번갈아 사용하는 것과 동일한 효과를 지닌다.In the above embodiment, the first scanning method is used for the Y 1 , Y 4 , and C 1 blocks in the macro block, and the amount of data generated by using the second scanning method in the Y 2 , Y 3 , and C 2 blocks is almost reduced. It was made constant. In the luminance signal block, two scanning methods are alternately used in the longitudinal direction, that is, the first scanning method is used for the Y 1 and Y 2 blocks, and the second scanning method is used for the Y 3 and Y 4 blocks. Using two scanning methods alternately in the signal block in the horizontal direction, that is, using the first scanning method for the Y 1 and Y 3 blocks and the second scanning method for the Y 2 and Y 4 blocks described above. By using the same scanning method diagonally in, it has the same effect as alternating scanning methods.

즉, 본 발명에서는 휘도신호블록에서 어떠한 방향으로든지 상관없이 발생되는 데이터량을 일정하게 안정시키기위하여 두개의 주사방법을 번갈아 사용한다.That is, in the present invention, two scanning methods are alternately used to uniformly stabilize the amount of data generated in any direction in the luminance signal block.

또한, 상기의 일 실시예에서는 양자화된 변환계수 데이터를 메모리에 저장하며 그 메모리를 지그재그주사함으로써 길이/크기변환하는 가변장 부호화기와, 길이/크기 역변환한 데이터를 지그재그주사하여 메모리에 기록하며 그 데이터를 역양자화하는 가변장 복호화기를 구성하였으나, 지그재그주사에 의하여 메모리에서 출력되는 변환계수 데이타를 양자화한 후 길이/크기 변환하는 가변장 부호화기와, 길이/크기 역변환한 데이터를 역양자화한후 지그재그주사에 의하여 메모리에 기록하는 가변장 복호화기도 본 발명의 범주에 속한다.Further, in the above embodiment, a variable length encoder for storing quantized transform coefficient data in a memory and zigzag scanning the memory, and a length / size inverse transformed data are zigzag-scanned and recorded in the memory. Although a variable length decoder is inversely quantized, a variable length encoder that quantizes transform coefficient data output from a memory by zigzag scanning, and a length / size transform, and inversely quantizes the length / size inverse transformed data are subjected to a zigzag scan. The variable length decoder which writes to the memory by the memory also belongs to the scope of the present invention.

상기와 같은 본 발명에 따른 가변장 부호화장치 및 복호화장치에서는, 매크로블록의 각 변환계수 블록들에 서로 다른 주사방법을 번갈아 사용하여 길이/크기변환 및 길이/크기역변환을 수행함으로서, 데이터의 분포에 따라 각 매크로블록마다 발생하는 가변장부호화 및 복호화된 데이터의 출력량을 거의 일정하게 하는 효과가 있다. 또한 가변장 부호화한 데이타를 저장하는 버퍼의 제어를 용이하게 하는 효과가 있다.In the variable length encoding apparatus and the decoding apparatus according to the present invention as described above, the length / size conversion and the length / size inverse transformation are performed by alternately using different scanning methods for each transform coefficient block of the macroblock. Accordingly, there is an effect that the output amount of the variable-length coded and decoded data generated in each macroblock is almost constant. In addition, there is an effect of facilitating control of the buffer for storing the variable length coded data.

Claims (16)

영상신호를 N×N 블록(N은 정수)의 변환계수로 변환하여 부호화하는 방법에 있어서, 변환계수 데이터를 N×N 블록단위로 저장하는 단계와; 서로 다른 복수개의 대각선 주사방법에 의해 발생하는 주사번지를 상기 단계에서 저장되는 변환계수 데이터의 블록들에 대하여 N×N 블록단위로 번갈아 인가하여 인가되는 번지에 대응하는 데이터를 출력하는 변환계수 데이터 출력단계와; 상기 단계에서 출력하는 데이터를 길이(Run Length)/크기(Level)변환하는 단계와; 길이/크기변환된 데이터를 소정의 부호를 이용하여 부호화하는 단계를 포함하는 가변장 부호화방법.A method of converting and encoding a video signal into a transform coefficient of an N × N block (where N is an integer), the method comprising: storing transform coefficient data in units of N × N blocks; Conversion coefficient data output for outputting data corresponding to the applied address by alternately applying scanning addresses generated by a plurality of different diagonal scanning methods to blocks of the conversion coefficient data stored in the step in units of N × N blocks Steps; Run length / Level conversion of the data output in the step; And encoding the length / size converted data by using a predetermined code. 제1항에 있어서, 저장단계는 두 개의 주파수성분을 번지로하는 2차원 데이타형태로 저장하는 것을 특징으로 하는 가변장 부호화방법.The variable length encoding method according to claim 1, wherein the storing step stores two frequency components in a two-dimensional data form having addresses. 제1항에 있어서, 저장단계에서 저장되는 데이터는 양자화된 변환계수 데이타인 것을 특징으로 하는 가변장 부호화방법.The variable length encoding method of claim 1, wherein the data stored in the storing step is quantized transform coefficient data. 제1항에 있어서, 변환계수 데이터 출력단계는 소정의 대각선 주사방법에 따른 주사번지를 발생하는 제1주사번지 발생단계와; 소정의 다른 대각선 주사방법에 따른 주사번지를 발생하는 제2주사번지 발생단계와; 상기 두 개의 주사번지 발생단계에서 발생하는 주사번지를 N×N 블록단위로 절환하는 단계와; 절환단계에서 출력하는 주사번지를 이용하여 상기 저장단계의 변환계수 데이터를 출력하는 주사번지 인가단계를 포함하는 것을 특징으로 하는 가변장 부호화방법.The method of claim 1, wherein the transform coefficient data outputting step comprises: a first scanning address generating step of generating a scanning address according to a predetermined diagonal scanning method; A second scanning address generating step of generating a scanning address according to a predetermined different diagonal scanning method; Switching scan addresses generated in the two scan address generation steps by N × N block units; And a scanning address applying step of outputting the transform coefficient data of the storing step using the scanning address output in the switching step. 제1항 또는 제4항에 있어서, 대각선 주사방법은 하나의 대각선에서 다음의 대각선으로 바뀔 때 그 주사순서가 연속되는 지그재그주사(ZigZag Scan)인 것을 특징으로 하는 가변장 부호화방법.The variable length coding method according to claim 1 or 4, wherein the diagonal scanning method is a zigzag scan in which the scanning order is continuous when changing from one diagonal to the next diagonal. 제1항에 있어서, 부호화단계는 2차원 허프만부호(2-Dim. Huffman Code)를 이용하는 것을 특징으로 하는 가변장 부호화방법.The variable length encoding method of claim 1, wherein the encoding step uses a two-dimensional Huffman code (2-Dim. Huffman Code). N×N 블록단위로 부호화한 영상신호를 복호화하는 방법에 있어서, 상기 제1항의 방법에 따라 부호화된 신호를 인가받아 소정의 부호를 이용하여 복호화하는 단계와; 상기 단계에서 복호화된 데이터를 길이/크기 역변환하는 단계와; 서로 다른 복수개의 대각선 주사방법에 의해 발생하는 주사번지를 N×N 블록단위로 번갈아 출력하는 대각선주사번지 출력단계와; 상기 길이/크기 역변환단계에서 발생하는 데이터를 대각선 주사번지 출력단계의 주사번지에 맞추어 저장하는 단계를 포함하는 가변장 복호화방법.CLAIMS 1. A method for decoding a video signal encoded in N × N block units, the method comprising: receiving a signal encoded according to the method of claim 1 and decoding using a predetermined code; Inversely converting the length / size of the data decoded in the step; A diagonal scan address output step of alternately outputting scanning addresses generated by a plurality of different diagonal scanning methods in units of N × N blocks; And storing the data generated in the length / size inverse transform step in accordance with the scan address of the diagonal scan address output step. 제7항에 있어서, 복호화단계는 2차원 허프만부호를 이용하여 복호화하는 것을 특징으로 하는 가변장 복호화방법.8. The variable length decoding method of claim 7, wherein the decoding step is performed by using a two-dimensional Huffman code. 제7항에 있어서, 대각선주사번지 출력단계는 소정의 대각선 주사방법에 따른 주사번지를 발생하는 제3주사번지 발생단계와; 소정의 다른 대각선 주사방법에 따른 주사번지를 발생하는 제4주사번지 발생단계와; 상기 두 개의 주사번지 발생단계에서 발생하는 주사번지를 N×N 블록단위로 절환하는 단계를 포함하는 가변장 복호화방법.8. The method of claim 7, wherein the diagonal scanning address outputting step comprises: a third scanning address generating step of generating a scanning address according to a predetermined diagonal scanning method; A fourth scanning address generating step of generating a scanning address according to another predetermined diagonal scanning method; And switching the scanning addresses generated in the two scanning address generation units by N × N block units. 제7항에 있어서, 저장단계는 두 개의 주파수성분을 번지로하는 2차원 데이타형태로 저장하는 것을 특징으로 하는 가변장복호화방법.8. The variable length decoding method according to claim 7, wherein the storing step stores two frequency components in a two-dimensional data form having addresses. 영상신호를 N×N 블록의 변환계수로 변환하여 부호화하는 장치에 있어서, 변환계수 데이터를 N×N 블록단위로 저장하는 수단과; 상기 저장수단에 저장되는 변환계수 데이터에 서로 다른 복수개의 주사방법에 의한 주사번지를 N×N 블록단위로 번갈아 인가하는 주사번지 발생수단과; 주사번지 발생수단에서 발생하는 주사번지에 의하여 저장수단으로부터 출력되는 데이터를 길이/크기변환하는 수단과; 길이/크기변환된 데이터를 부호화하는 수단을 포함하는 가변장 부호화 장치.An apparatus for converting and encoding video signals into transform coefficients of N × N blocks, comprising: means for storing transform coefficient data in units of N × N blocks; Scanning address generating means for alternately applying scanning addresses by a plurality of different scanning methods in units of N × N blocks to the conversion coefficient data stored in the storage means; Means for length / size conversion of data output from the storage means by the scanning address generated in the scanning address generating means; And a means for encoding the length / scaled data. 제11항에 있어서, 저장수단은 N×N 블록의 변환계수 데이타를 저장함에 있어서 두 개의 주파수성분을 변환계수 데이터의 번지로하여 저장하는 것을 특징으로 하는 가변장 부호화장치.12. The variable length encoding apparatus of claim 11, wherein the storage means stores two frequency components as addresses of the transform coefficient data in storing the transform coefficient data of the N × N block. 제11항에 있어서, 주사번지 발생수단은 입력클럭신호를 카운팅하는 제1카운터와; 상기 카운터의 출력신호를 인가받아 N×N 크기의 변환계수 데이터블록에서 최초의 주사위치로부터 가로방향으로 주사위치를 이동함으로써 주사를 시작하는 2차원 대각선 지그재그주사에 따른 주사번지를 출력하는 제1주사번지 발생부와; 상기 카운터의 출력신호를 인가받아 N×N 크기의 변환계수 데이터블록에서 최초의 주사위치로부터 세로방향으로 주사위치를 이동함으로써 주사를 시작하는 2차원대각선 지그재그주사에 따른 주사번지를 출력하는 제2주사번지 발생부와; 상기 주사번지 발생부들의 출력신호를 N×N 블록단위로 절환하여 저장수단에 인가하는 절환부를 구비함을 특징으로 하는 가변장 부호화장치.12. The apparatus of claim 11, wherein the scanning address generating means comprises: a first counter for counting an input clock signal; The first scan outputs the scan address according to the two-dimensional diagonal zigzag scan which starts scanning by moving the dice from the first dice horizontally in the N × N transform coefficient data block by receiving the output signal of the counter. A bungee generator; A second scan outputting a scan address according to a two-dimensional diagonal zigzag scan that starts scanning by moving the dice vertically from the first dice in an N × N transform coefficient data block by receiving the output signal of the counter A bungee generator; And a switching unit for switching the output signals of the scanning address generators in units of N × N blocks and applying them to storage means. N×N 블록단위로 부호화한 영상신호를 복호화하는 장치에 있어서, 상기 제1항의 방법에 따라 부호화된 영상신호를 인가받아 복호화하는 수단과; 복호화수단의 출력데이타를 길이/크기 역변환하는 수단과; 서로 다른 복수개의 주사방버에 의한 주사번지를 N×N 블록단위로 번갈아 발생하는 주사번지 발생수단과; 길이/크기 역변환수단의 출력신호를 주사번지 발생수단의 주사번지에 맞추어 저장하는 저장수단을 포함하는 가변장 복호화장치.An apparatus for decoding a video signal encoded in N × N block units, comprising: means for receiving and decoding a video signal encoded according to the method of claim 1; Means for inversely converting the length / size of the output data of the decoding means; Scanning address generating means for alternately generating scanning addresses by a plurality of different scanning chambers in units of N × N blocks; And storage means for storing the output signal of the length / magnitude inverse converting means in accordance with the scanning address of the scanning address generating means. 제14항에 있어서, 주사번지 발생수단은 입력클럭신호를 카운팅하는 제2카운터와; 상기 카운터의 출력신호를 인가받아 N×N 크기의 변환계쑤 데이터블록에서 최초의 주사위치로부터 가로방향으로 주사위치를 이동함으로써 주사를 시작하는 2차원 대각선 지그재그주사에 따른 주사번지를 출력하는 제3주사번지 발생부와; 상기 카운터의 출력신호를 인가받아 N×N 크기의 변환계수 데이터블록에서 최초의 주사위치로부터 세로방향으로 주사위치를 이동함으로써 주사를 시작하는 2차원 대각선 지그재그주사에 따른 주사번지를 출력하는 제4주사번지 발생부와; 상기 주사번지 발생부들의 출력신호를 N×N 블록단위로 절환하여 저장수단에 인가하는 절환부를 구비함을 특징으로 하는 가변장 복호화장치.15. The apparatus of claim 14, wherein the scanning address generating means comprises: a second counter for counting an input clock signal; A third scan outputting a scan address according to a two-dimensional diagonal zigzag scan which starts scanning by moving the dice from the first dice horizontally in the N × N sized conversion data block in response to the output signal of the counter A bungee generator; A fourth scan that outputs a scan address according to a two-dimensional diagonal zigzag scan that starts scanning by moving the dice vertically from the first dice in an N × N transform coefficient data block by receiving the output signal of the counter A bungee generator; And a switching unit for switching the output signals of the scanning address generators in units of N × N blocks and applying them to storage means. 제9항에 있어서, 대각선 주사방법은 하나의 대각선에서 다음의 대각선으로 바뀔 때 그 주사순서가 연속되는 지그재그주사(Zig Zag Scan)인 것을 특징으로 하는 가변장 복호화방법.10. The variable length decoding method according to claim 9, wherein the diagonal scanning method is a zigzag scan in which the scanning order is continuous when changing from one diagonal line to the next diagonal line.
KR1019920010502A 1992-06-17 1992-06-17 Variable length encode/decode method and apparatus KR0152015B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019920010502A KR0152015B1 (en) 1992-06-17 1992-06-17 Variable length encode/decode method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019920010502A KR0152015B1 (en) 1992-06-17 1992-06-17 Variable length encode/decode method and apparatus

Publications (2)

Publication Number Publication Date
KR940001717A KR940001717A (en) 1994-01-11
KR0152015B1 true KR0152015B1 (en) 1998-10-15

Family

ID=19334804

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019920010502A KR0152015B1 (en) 1992-06-17 1992-06-17 Variable length encode/decode method and apparatus

Country Status (1)

Country Link
KR (1) KR0152015B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100798446B1 (en) * 2001-09-26 2008-01-28 에스케이 텔레콤주식회사 Adaptive double scan method in the H.26L
WO2018117657A1 (en) 2016-12-20 2018-06-28 에스케이이노베이션 주식회사 Pouch-type secondary battery

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100798446B1 (en) * 2001-09-26 2008-01-28 에스케이 텔레콤주식회사 Adaptive double scan method in the H.26L
WO2018117657A1 (en) 2016-12-20 2018-06-28 에스케이이노베이션 주식회사 Pouch-type secondary battery

Also Published As

Publication number Publication date
KR940001717A (en) 1994-01-11

Similar Documents

Publication Publication Date Title
US5136371A (en) Digital image coding using random scanning
KR950010913B1 (en) Vlc & vld system
USRE40980E1 (en) Adaptive variable-length coding and decoding methods for image data
US9432682B2 (en) System and method for intracoding video data
EP2285117B1 (en) Video coder providing implicit coefficient prediction and scan adaption for image coding and intra coding of video
US5774594A (en) Signal compression device
EP0518464A2 (en) Adaptive spatio-temporal compression/decompression of video image signals
US20040136457A1 (en) Method and system for supercompression of compressed digital video
EP0519995B1 (en) Digital image processing including block edges filtering
US5923787A (en) Quantization device and method, inverse-quantization device and method, and image processing device and method
KR0152015B1 (en) Variable length encode/decode method and apparatus
KR100233536B1 (en) Run-level symbol decoder and the method
KR100242832B1 (en) Apparatus for generating quantization step value
KR100233537B1 (en) Run-level symbol decoding method and the apparatus
JPH06244736A (en) Encoder
KR20030083703A (en) Moving picture information compressing method and its system
KR0148155B1 (en) Esc coding apparatus and method of image coding
KR0152025B1 (en) Encoding method and apparatus of e.o.b block data
KR0134359B1 (en) Coding and decoding system of variable scan region
JP3182920B2 (en) High efficiency coding device
JPH0730889A (en) Picture data encoder
JPH05300490A (en) Encoding device
JPH0723396A (en) Encoding device for digital picture signal
JPH06216780A (en) Variable length and decoder
KR19980030781A (en) Quantization Interval Level Shift Method of Digital VR

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: 20090529

Year of fee payment: 12

LAPS Lapse due to unpaid annual fee