KR100813989B1 - Coding and decoding method and apparatus using plural scanning patterns - Google Patents

Coding and decoding method and apparatus using plural scanning patterns Download PDF

Info

Publication number
KR100813989B1
KR100813989B1 KR1020070059520A KR20070059520A KR100813989B1 KR 100813989 B1 KR100813989 B1 KR 100813989B1 KR 1020070059520 A KR1020070059520 A KR 1020070059520A KR 20070059520 A KR20070059520 A KR 20070059520A KR 100813989 B1 KR100813989 B1 KR 100813989B1
Authority
KR
South Korea
Prior art keywords
data
scan pattern
scan
pattern selection
selection information
Prior art date
Application number
KR1020070059520A
Other languages
Korean (ko)
Other versions
KR20070074517A (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 KR1020070059520A priority Critical patent/KR100813989B1/en
Publication of KR20070074517A publication Critical patent/KR20070074517A/en
Application granted granted Critical
Publication of KR100813989B1 publication Critical patent/KR100813989B1/en

Links

Images

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/103Selection of coding mode or of prediction mode
    • H04N19/112Selection of coding mode or of prediction mode according to a given display mode, e.g. for interlaced or progressive display mode
    • 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

Abstract

복수개의 주사 패턴을 이용한 부호화 방법, 복호화 방법, 및 그 장치가 개시된다.Disclosed are a coding method, a decoding method, and an apparatus using a plurality of scan patterns.

본 발명에 따라 영상 데이터를 부호화하는 방법은 (a) 상기 영상 데이터를 제1 소스 부호화하여 N×M 데이터를 얻는 단계; (b) 얻어진 N×M 데이터에 응답하여 복수개의 스캔 패턴들 중 선택된 소정 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하는 단계; 및 (c) 스캐닝된 데이터를 제2 소스 부호화하는 단계를 포함하는 것을 특징으로 한다. 이에 의해, 다양한 특성의 영상 데이터에 대해 보다 효율적으로 부호화 및 복호화를 수행할 수 있다. 특히, 비월 주사 영상 프레임 구조를 갖는 영상 데이터에 대해 보다 효율적인 부호화 및 복호화가 가능하다.According to the present invention, a method of encoding image data includes: (a) obtaining N × M data by first source encoding the image data; (b) scanning the N × M data using a predetermined scan pattern selected from a plurality of scan patterns in response to the obtained N × M data; And (c) second source encoding the scanned data. As a result, encoding and decoding can be performed more efficiently on image data having various characteristics. In particular, it is possible to more efficiently encode and decode video data having an interlaced scanning image frame structure.

Description

복수개의 주사 패턴을 이용한 부호화 방법, 복호화 방법, 및 그 장치{Coding and decoding method and apparatus using plural scanning patterns}Coding and decoding method using a plurality of scanning patterns, and apparatus therefor {Coding and decoding method and apparatus using plural scanning patterns}

도 1은 종래 부호화 장치의 블록도,1 is a block diagram of a conventional encoding apparatus;

도 2는 도 1의 제2 소스 부호화부(700)의 상세 블록도,FIG. 2 is a detailed block diagram of the second source encoder 700 of FIG. 1;

도 3은 도 1의 부호화 장치에 의해 부호화된 데이터를 복호화하는 장치의 블록도,3 is a block diagram of an apparatus for decoding data encoded by the encoding apparatus of FIG. 1;

도 4는 도 3의 제2 소스 복호화부(710)의 상세 블록도,4 is a detailed block diagram of the second source decoder 710 of FIG. 3.

도 5는 지그재그 스캔 패턴의 일 예,5 is an example of a zigzag scan pattern;

도 6은 비월 주사 프레임 구조를 갖는 영상 데이터의 일 예,6 is an example of image data having an interlaced scanning frame structure;

도 7은 본 발명의 바람직한 실시예에 따른 부호화 장치의 블록도,7 is a block diagram of an encoding apparatus according to a preferred embodiment of the present invention;

도 8은 본 발명의 다른 바람직한 실시예에 따른 부호화 장치의 블록도,8 is a block diagram of an encoding apparatus according to another preferred embodiment of the present invention;

도 9는 본 발명의 바람직한 실시예에 따른 복호화 장치의 블록도,9 is a block diagram of a decoding apparatus according to a preferred embodiment of the present invention;

도 10 내지 12는 도 9의 스캔 패턴 선택부(93)의 구현 예들,10 to 12 illustrate examples of the scan pattern selector 93 of FIG. 9;

도 13 내지 15는 본 발명의 바람직한 실시예에 따른 스캔 패턴들,13 to 15 show scan patterns according to a preferred embodiment of the present invention,

도 16 내지 17은 본 발명의 다른 바람직한 실시예에 따른 스캔 패턴들,16 to 17 are scan patterns according to another preferred embodiment of the present invention,

도 18 내지 도 21은 본 발명의 또 다른 바람직한 실시예에 따라 복수개의 스캔 패턴을 사용하기 위한 분할 방식을 보여주는 참고도이다.18 to 21 are reference diagrams illustrating a division scheme for using a plurality of scan patterns according to another exemplary embodiment of the present invention.

본 발명은 영상 데이터의 부호화 및 복호화에 관한 것으로, 보다 상세하게는 복수개의 스캔 패턴을 사용하여 부호화하는 방법, 복호화하는 방법, 및 그 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to encoding and decoding of image data, and more particularly, to a method for encoding, a method for decoding, and an apparatus using a plurality of scan patterns.

H.261, H.263, H.263+ 등으로 이어지는 일련의 영상전화 관련 영상 부호화 방법이 ITU-T 국제표준으로 확정되고 그 이후, H.263++ Revision과 MPEG-4와 같은 기술이 추가되었다. 그러나, 이들 국제표준들은 단-대-단(end-to-end) 지연 시간, 부호화 효율 등에 대한 새로운 요구사항에 부응하지 못하여, ITU-T와 ISO/IEC는 차세대 영상전화와 관련하여 차세대 부호화 방법에 대한 국제 표준화 작업을 본격화하고 있다.A series of video phone-related video coding methods, leading to H.261, H.263, H.263 +, etc., have been confirmed as the ITU-T international standard, and after that, technologies such as H.263 ++ Revision and MPEG-4 have been added. It became. However, these international standards do not meet new requirements for end-to-end delay time, coding efficiency, etc., so that ITU-T and ISO / IEC are the next generation coding method for next-generation video telephony. International standardization work is in full swing.

H.261, H.263 등 종래 방식들이 순차 주사(progressive scanning)에 의해 얻어진 영상만을 부호화 대상으로 한 반면, 차세대 부호화 방법은 비월 주사(interlaced scanning)에 의해 얻어진 영상도 부호화 대상에 포함시키고 있다. 그러나, 순차 주사 영상에 사용되는 부호화 방법을 그대로 비월 주사 영상에 사용하거나 비월 주사 영상에 사용된 부호화 방법을 그대로 순차 주사에 사용할 경우에는 부호화 효율의 저하를 가져올 수 있다. 순차 주사 영상과 비월 주사 영상은 영상의 생성 방식이 서로 상이하여 부호화하고자 하는 영상 데이터의 특성이 달라질 수 있기 때문이다.While conventional methods such as H.261 and H.263 target only images obtained by progressive scanning, the next generation encoding method includes images obtained by interlaced scanning as well. However, if the encoding method used for the progressive scan image is used for the interlaced scan image as it is or if the encoding method used for the interlaced scan image is used for the progressive scan as it is, the encoding efficiency may be deteriorated. This is because the sequential scan image and the interlaced scan image may have different characteristics of image data to be encoded due to different generation methods of the images.

도 1은 종래 부호화 장치의 블록도이다.1 is a block diagram of a conventional encoding apparatus.

도 1을 참조하면, 부호화 장치는 부호화 제어부(100), 제1 소스 부호화부(200), 제2 소스 부호화부(700)를 구비한다. 또한, 제1 소스 복호화부(300), 프레임 메모리부(400), 움직임 보상부(500), 및 움직임 예측부(600)를 구비한다.Referring to FIG. 1, the encoding apparatus includes an encoding controller 100, a first source encoder 200, and a second source encoder 700. In addition, the first source decoder 300, the frame memory unit 400, the motion compensator 500, and the motion predictor 600 are provided.

영상 데이터가 입력되면 부호화 제어부(100)는 입력되는 영상의 특성 또는 사용자가 원하는 소정 동작 목적에 따라, 입력 영상에 대해 움직임 보상을 수행할지 여부, 즉 코딩-타입을 결정하여 대응하는 제어 신호를 제1 스위치(S10)로 출력한다. 움직임 보상을 수행할 경우에는 이전 또는 이후에 입력된 영상 데이터가 필요하므로 제1 스위치(S10)는 닫히게 되고 움직임 보상을 수행하지 않을 경우에는 이전 또는 이후에 입력된 영상 데이터가 필요하지 않으므로 제1 스위치(S10)는 열리게 된다. 제1 스위치(S10)가 닫히면 입력 영상과 이전 영상으로부터 얻어진 차 영상 데이터가 제1 소스 부호화부(200)로 입력되고 제1 스위치(S10)가 열리면 입력 영상이 제1 소스 부호화부(200)로 입력된다.When the image data is input, the encoding control unit 100 determines whether to perform motion compensation on the input image, that is, the coding type according to the characteristics of the input image or a predetermined operation purpose desired by the user, and generates a corresponding control signal. Outputs to the switch S10. When performing the motion compensation, since the image data inputted before or after is required, the first switch S10 is closed. When not performing the motion compensation, the first switch S10 is closed because the image data inputted before or after is not needed. S10 is opened. When the first switch S10 is closed, the difference image data obtained from the input image and the previous image are input to the first source encoder 200, and when the first switch S10 is opened, the input image is transferred to the first source encoder 200. Is entered.

제1 소스 부호화부(200)는 입력된 영상 데이터를 변환(transform)하여 얻어진 변환 계수값들을 소정 양자화 스텝에 따라 양자화하여 N×M 데이터를 얻는다. 사용되는 변환의 예로는 DCT(Discrete Cosine Transform)를 들 수 있다.The first source encoder 200 quantizes transform coefficient values obtained by transforming the input image data according to a predetermined quantization step to obtain N × M data. An example of the transform used may include a discrete cosine transform (DCT).

한편, 제1 소스 부호화부(200)로 입력되어 부호화된 영상 데이터는 이후 또는 이전에 입력된 영상 데이터의 움직임 보상을 위한 참조 데이터로 사용될 수 있으므로 소스 복호화부(300)에 의해 제1 소스 부호화부(200)의 역과정인 역양자화와 역변환을 거친 후 메모리부(400)에 저장된다. 이 때, 소스 복호화부(300)로부터 출력된 데이터가 차 영상 데이터이면 부호화 제어부(100)는 제2 스위치(S20)를 닫아서 제1 소스 복호화부(300)로부터 출력된 차 영상 데이터가 움직임 보상부(500)의 출력과 더해진 다음 프레임 메모리(400)에 저장되도록 한다.Meanwhile, since the image data input and encoded by the first source encoder 200 may be used as reference data for motion compensation of the image data input after or before, the first source encoder by the source decoder 300. After inverse quantization and inverse transformation, which are inverse processes of 200, the memory unit 400 is stored in the memory unit 400. At this time, if the data output from the source decoder 300 is difference image data, the encoding controller 100 closes the second switch S20 so that the difference image data output from the first source decoder 300 is a motion compensation unit. It is added to the output of 500 and then stored in the frame memory 400.

한편, 움직임 예측(motion estimation)부(600)는 입력된 영상 데이터와 메모리부(400)에 저장된 데이터를 비교하여, 현재 입력된 데이터와 가장 유사한 데이터를 찾은 다음, 입력된 영상 데이터와 비교하여 움직임 벡터(Moving Vector)를 출력한다. 움직임 벡터가 메모리부(400)에 주어지면 메모리부(400)는 해당 데이터를 움직임 보상부(motion compensation)(500)로 출력하며, 움직임 보상부(500)는 입력받은 데이터를 기초로 현재 부호화하는 영상 데이터에 해당하는 보상치를 만들어 출력한다.Meanwhile, the motion estimation unit 600 compares the input image data with data stored in the memory unit 400, finds the data most similar to the currently input data, and then compares the input image data with the input image data. Outputs a moving vector. When the motion vector is given to the memory unit 400, the memory unit 400 outputs the corresponding data to the motion compensation unit 500, and the motion compensation unit 500 encodes the current data based on the received data. Compensation values corresponding to the image data are created and output.

제2 소스 부호화부(700)는 제1 소스 부호화부(200)로부터 출력되는 양자화된 변환 계수들을 부호화하여 출력한다. 움직임 벡터 부호화부(900)는 움직임 예측부(600)로부터 출력된 움직임 벡터에 관한 정보를 입력받아 부호화하여 출력한다. 코딩 정보 부호화부(800)는 부호화 제어부(100)에서 제공되는 코딩 타입 정보, 양자화 스텝 정보, 등 기타 복호화에 필요한 정보들을 입력받아 부호화하여 출력한다. 먹싱부(1000)는 제2 소스 부호화부(700)와 코딩 정보 부호화부(800) 및 움직임 벡터 부호화부(900)의 출력들을 멀티플렉싱하여 최종적으로 얻어진 비트스트림을 출력한다.The second source encoder 700 encodes and outputs quantized transform coefficients output from the first source encoder 200. The motion vector encoder 900 receives and encodes information about a motion vector output from the motion predictor 600 and outputs the encoded information. The coding information encoder 800 receives and encodes coding type information, quantization step information, and other information necessary for decoding, which are provided by the encoding controller 100, and outputs the encoded information. The muxing unit 1000 outputs a bitstream finally obtained by multiplexing the outputs of the second source encoder 700, the coding information encoder 800, and the motion vector encoder 900.

이와 같은 종래 부호화 장치의 부호화 방법은 일반적으로, 입력되는 영상 데이터를 소정 크기로 분할하여 얻어진 매크로 블록 단위로 이루어진다.In general, such an encoding method of an encoding apparatus includes a macroblock unit obtained by dividing an input image data into a predetermined size.

도 2는 도 1의 제2 소스 부호화부(700)의 상세 블록도이다.FIG. 2 is a detailed block diagram of the second source encoder 700 of FIG. 1.

도 2를 참조하면, 제2 소스 부호화부(700)는 스캔부(701) 및 가변장 부호화부(702)를 포함한다. 스캔부(701)는 양자화된 변환 계수값들로 구성된 N×M 데이터를 입력받아 도 5와 같은 지그재그 패턴으로 스캐닝하고 가변장 부호화부(702)는 스캐닝된 데이터를 가변장 부호화한다.Referring to FIG. 2, the second source encoder 700 includes a scan unit 701 and a variable length encoder 702. The scan unit 701 receives the N × M data including the quantized transform coefficient values and scans them in a zigzag pattern as shown in FIG. 5, and the variable length encoder 702 variably encodes the scanned data.

도 3은 도 1의 부호화 장치에 의해 부호화된 데이터를 복호화하는 장치의 블록도이다.3 is a block diagram of an apparatus for decoding data encoded by the encoding apparatus of FIG. 1.

도 3을 참조하면, 복호화 장치는 비트스트림을 디먹싱하는 디먹싱부(110), 제2 소스 복호화부(710), 제1 소스 복호화부(210)을 구비한다. 또한, 코딩 타입 정보를 해석하는 코딩 타입 정보 해석부(120) 및 움직임 벡터 해석부(130)을 구비한다.Referring to FIG. 3, the decoding apparatus includes a demux 110, a second source decoder 710, and a first source decoder 210 for demuxing a bitstream. A coding type information analyzing unit 120 and a motion vector analyzing unit 130 for analyzing the coding type information are provided.

*비트스트림은 디먹싱부(110)에 의해 엔트로피 부호화된 양자화된 변환 계수들, 움직임 벡터 정보, 코딩 타입 정보 등으로 디먹싱된다. 제2 소스 복호화부(710)는 부호화된 변환 계수들을 엔트로피 복호화하여 양자화된 변환 계수들을 출력한다. 제1 소스 복호화부(210)는 양자화된 변환 계수들을 소스 복호화한다. 즉, 도 1의 제1 소스 부호화부(200)의 역과정을 수행한다. 예를 들어, 제1 소스 부호화부(200)가 DCT를 수행하였다면 제1 소스 복호화부(210)는 IDCT(Inverse Discrete Cosine Transform)를 수행한다. 이에, 영상 데이터가 복원된다. 복원된 영상 데이터는 움직임 보상을 위해 메모리부(410)에 저장된다.The bitstream is demuxed into quantized transform coefficients, motion vector information, coding type information, and the like entropy coded by the demux 110. The second source decoder 710 entropy decodes the encoded transform coefficients and outputs quantized transform coefficients. The first source decoder 210 source decodes the quantized transform coefficients. That is, the reverse process of the first source encoder 200 of FIG. 1 is performed. For example, if the first source encoder 200 performs the DCT, the first source decoder 210 performs an Inverse Discrete Cosine Transform (IDCT). Thus, the video data is restored. The reconstructed image data is stored in the memory unit 410 for motion compensation.

한편, 코딩 타입 정보 해석부(120)는 코딩 타입을 알아내어 움직임 보상이 필요한 인터 타입일 경우 제3 스위치(S30)를 닫아 제1 소스 복호화부(210)로부터 출력된 데이터에 움직임 보상부(510)로부터 출력된 움직임 보상값을 더해지도록 하여 복원된 영상 데이터가 얻어지도록 해준다. 움직임 벡터 해석부(130)는 움직임 벡터 정보로부터 얻은 움직임 벡터가 가리키는 위치를 알려주고, 움직임 보상부(510)는 움직임 벡터가 가리키는 참조 영상 데이터로부터 움직임 보상값을 생성하여 출력한다.On the other hand, the coding type information analyzer 120 detects the coding type and closes the third switch S30 in the case of an inter type requiring motion compensation, and then the motion compensator 510 to the data output from the first source decoder 210. Reconstructed image data is obtained by adding the motion compensation value output from The motion vector analyzer 130 informs the position indicated by the motion vector obtained from the motion vector information, and the motion compensator 510 generates and outputs a motion compensation value from the reference image data indicated by the motion vector.

도 4는 도 3의 제2 소스 복호화부(710)의 상세 블록도이다.4 is a detailed block diagram of the second source decoder 710 of FIG. 3.

도 4를 참조하면, 제2 소스 복호화부(710)는 가변장 복호화부(703) 및 역스캔부(704)를 구비하여 도 2의 제2 소스 부호화부(700)에서 수행되는 과정의 역과정을 수행한다. 가변장 복호화부(703)는 가변장 부호화된 양자화된 변환계수들을 가변장 복호화하여 N×M 데이터를 복원하고 역스캔부(704)는 도 5와 같은 지그재그 스캔 패턴을 사용하여 N×M 데이터를 역스캔한다.Referring to FIG. 4, the second source decoder 710 includes a variable length decoder 703 and an inverse scan unit 704, and the reverse process of the process performed by the second source encoder 700 of FIG. 2. Do this. The variable length decoder 703 variable length decodes the variable length coded quantized transform coefficients to restore the N × M data, and the inverse scan unit 704 uses the zigzag scan pattern as shown in FIG. Reverse scan.

그런데, 종래 부호화 장치 및 복호화 장치는 비월 주사 영상을 부호화하거나 복호화할 때 문제가 발생할 수 있다. 비월 주사 영상은 각 필드 사이에 시간 차가 존재하므로 인접 필드 사이에도 영상 내용이 변경될 수 있다. 움직임이 많은 영상의 경우 더욱 그러하다. 특히, 비월 주사 영상을 부호화할 때 필드 단위로 부호화하지 않고 프레임 단위로 부호화하는 경우, 즉 부호화를 위한 단위가 되는 픽처 구조가 비월 주사 프레임 구조일 때 영상에 존재하는 오브젝트는 탑 필드 데이터와 바텀 필드 데이터에 따라 그 위치가 변화하므로 경계선이 틀어지게 되고 수직 방향으로 데이터 특성이 현저하게 달라진다.However, the conventional encoding apparatus and the decoding apparatus may cause a problem when encoding or decoding the interlaced scan image. Since the interlaced scan image has a time difference between each field, the image content may be changed even between adjacent fields. This is especially true for moving images. In particular, when an interlaced scan image is encoded, instead of being encoded in a field unit but encoded in a frame unit, that is, when a picture structure that is a unit for encoding is an interlaced frame structure, objects present in the image are top field data and bottom field. Since the position changes according to the data, the boundary line is distorted, and the data characteristic is remarkably changed in the vertical direction.

도 6은 비월 주사 프레임 구조를 갖는 영상 데이터의 일 예이다.6 is an example of image data having an interlaced scanning frame structure.

도 6을 참조하면, N×M 블록을 구성하는 영상 데이터 중 첫 번째, 세 번째 등 홀수 번째 행들에 존재하는 데이터는 비월 주사 영상의 탑 필드(top field)에서 온 영상 데이터이고, 두 번째, 네 번째 등 짝수 번째 행들에 존재하는 데이터는 바텀 필드(bottom field)에서 온 영상 데이터이다. 탑 필드와 바텀 필드 사이에 시간 차가 존재하고 시간 차에 해당하는 움직임이 크면 동일한 오브젝트가 수직 방향으로 정열되지 않는 상태의 영상으로 구성되게 된다. 이와 같은 데이터를 변환 부호화하면 수직 방향으로 고주파 성분이 많아져 변환 부호화 계수들로 구성된 N×M 블록의 하단 행에서도 0이 아닌 변환 부호화 계수가 빈번하게 나타날 수 있다. 여기에, 도 5의 지그재그 스캔 패턴을 사용하여 스캐닝하면 수직 방향으로 0이 아닌 변환 계수가 빈번하게 발생한다는 특성이 충분히 반영되지 않아 부호화의 효율이 떨어지는 문제점이 있다. 움직임이 많은 영상, 수직 방향으로 변화가 심한 영상의 경우에도 마찬가지이다.Referring to FIG. 6, data existing in odd-numbered rows of the first, third, etc. of the image data constituting the N × M block are image data from the top field of the interlaced scan image, and second, four Data present in the first and even rows are image data from a bottom field. If there is a time difference between the top field and the bottom field and the motion corresponding to the time difference is large, the same object is composed of an image in which the same object is not aligned in the vertical direction. When transform-coding such data, high frequency components increase in the vertical direction, and non-zero transform coding coefficients may frequently appear in the lower row of the N × M block composed of the transform coding coefficients. When scanning using the zigzag scan pattern of FIG. 5, the characteristic that a non-zero transform coefficient frequently occurs in the vertical direction is not sufficiently reflected, resulting in a problem in that encoding efficiency is lowered. The same is true for images with a lot of motion and images with a large change in the vertical direction.

이처럼, 종래 부호화 방법은 단일의 스캔 패턴을 사용하여 스캐닝을 수행하므로 다양한 특성의 영상 데이터에 대한 부호화 효율을 극대화하지 못하는 문제점이 있다.As described above, the conventional encoding method performs a scan using a single scan pattern, and thus there is a problem in that the encoding efficiency of image data having various characteristics cannot be maximized.

따라서, 본 발명의 목적은 다양한 특성의 영상 데이터에 대해 보다 효율적으로 부호화를 수행할 수 있는 부호화 방법, 복호화 방법 및 그 장치를 제공하는 것이다.Accordingly, an object of the present invention is to provide an encoding method, a decoding method, and an apparatus capable of performing encoding on image data having various characteristics more efficiently.

본 발명의 다른 목적은 비월 주사 영상 프레임 구조를 갖는 영상 데이터에 대해 보다 효율적으로 부호화를 수행할 수 있는 부호화 방법, 복호화 방법, 및 그 장치를 제공하는 것이다.Another object of the present invention is to provide an encoding method, a decoding method, and an apparatus capable of more efficiently performing encoding on image data having an interlaced scanning image frame structure.

본 발명의 또 다른 목적은 움직임이 많은 영상 및 수직 방향으로 변화가 심한 영상에 대해 보다 효율적으로 부호화를 수행할 수 있는 부호화 방법, 복호화 방법, 및 그 장치를 제공하는 것이다.It is still another object of the present invention to provide an encoding method, a decoding method, and an apparatus capable of performing encoding on an image having a lot of motion and an image having a severe change in a vertical direction.

상기 목적은, 본 발명에 따라, 영상 데이터를 부호화하는 방법에 있어서, (a) 상기 영상 데이터를 제1 소스 부호화하여 N×M 데이터를 얻는 단계; (c) 얻어진 N×M 데이터에 응답하여 복수개의 스캔 패턴들 중 선택된 소정 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하는 단계; 및 (d) 스캐닝된 데이터를 제2 소스 부호화하는 단계를 포함하는 것을 특징으로 하는 부호화 방법에 의해 달성된다.According to the present invention, there is provided a method of encoding video data, the method comprising: (a) obtaining N × M data by first source encoding the video data; (c) scanning the N × M data using a predetermined scan pattern selected from a plurality of scan patterns in response to the obtained N × M data; And (d) second source encoding the scanned data.

또한, 영상 데이터를 부호화하는 방법에 있어서, (a) 상기 영상 데이터를 제1 소스 부호화하여 N×M 데이터를 얻는 단계; (b) 얻어진 N×M 데이터를 복수개의 영역으로 분할하는 단계; (c) 분할된 영역에 응답하여 복수개의 스캔 패턴 중 각각 선택된 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하는 단계; 및 (d) 스캐닝된 데이터를 제2 소스 부호화하는 단계를 포함하는 것을 특징으로 하는 부호화 방법에 의해서도 달성된다.A method of encoding video data, the method comprising: (a) obtaining N × M data by first source encoding the video data; (b) dividing the obtained N × M data into a plurality of regions; (c) scanning the N × M data using a scan pattern selected from a plurality of scan patterns in response to the divided region; And (d) second source encoding the scanned data.

상기 (a)단계는 (a1) 상기 영상 데이터를 변환 부호화하는 단계; 및 (a2) 변환된 데이터를 양자화하여 상기 N×M 데이터를 얻는 단계를 포함하는 것이 바람직 하다.Step (a) may include (a1) transcoding and encoding the image data; And (a2) quantizing the converted data to obtain the N × M data.

상기 (c)단계는 (c11) 상기 N×M 데이터 중 실질적으로 0인 성분값들이 많이 존재하는 영역일수록 나중에 스캐닝하는 스캔 패턴을 선택하는 단계; 및 (c2) 선택된 스캔 패턴으로 상기 N×M 데이터를 스캐닝하는 단계를 포함하는 것이 바람직하다.The step (c) may include (c11) selecting a scan pattern to be scanned later in an area in which a large number of substantially zero component values are present among the N × M data; And (c2) scanning the N × M data with the selected scan pattern.

상기 (b)단계는 (b1) 상기 N×M 데이터를 수평 방향으로 분할하여 적어도 2개의 서브 영역들을 얻는 단계를 포함하거나, (b2) 상기 N×M 데이터를 수직 방향으로 분할하여 적어도 2개의 서브 영역들을 얻는 단계를 포함하거나, (b3) 상기 N×M 데이터를 수직 방향 및 수평 방향으로 각각 분할하여 적어도 4 개의 서브 영역들을 얻는 단계를 포함하는 것이 바람직하다.Step (b) includes (b1) dividing the N × M data in a horizontal direction to obtain at least two sub-areas, or (b2) dividing the N × M data in a vertical direction to at least two sub-areas. And obtaining (b3) the N × M data in the vertical direction and the horizontal direction, respectively, to obtain at least four sub-regions.

또한, 영상 데이터를 복호화하는 방법에 있어서, (a) 복수개의 스캔 패턴 중 소정 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 생성하는 단계; (b) 가변장 복호화된 상기 영상 데이터를 상기 스캔 패턴 선택 정보를 기초로 선택된 적어도 하나의 스캔 패턴을 사용하여 N×M 데이터로 역스캐닝하는 단계; 및 (c) 상기 N×M 데이터를 복호화하는 단계를 포함하는 것을 특징으로 하는 복호화 방법에 의해서도 달성된다.The method of decoding image data, the method comprising: (a) generating scan pattern selection information for selecting a predetermined scan pattern from among a plurality of scan patterns; (b) reverse scanning the variable length decoded image data into N × M data using at least one scan pattern selected based on the scan pattern selection information; And (c) decoding the N × M data.

상기 (c)단계는 (c1) 상기 N×M 데이터를 역양자화하는 단계; 및 (c2) 역양자화된 N×M 데이터를 변환 복호화하는 단계를 포함하는 것이 바람직하다.Step (c) may include (c1) inverse quantization of the N × M data; And (c2) transform-decoding the dequantized N × M data.

또한, 영상 데이터를 복호화하는 방법에 있어서, (a) 상기 영상 데이터를 가변장 복호화하는 단계; (b) 가변장 복호화된 데이터를 복수개의 스캔 패턴들 중 선 택된 소정 스캔 패턴을 이용하여 역스캐닝하여 N×M 데이터를 얻는 단계; 및 (c) 상기 N×M 데이터를 복호화하는 단계를 포함하는 것을 특징으로 하는 복호화 방법에 의해서도 달성된다.A method of decoding image data, the method comprising: (a) variable length decoding the image data; (b) inversely scanning the variable length decoded data using a predetermined scan pattern selected from the plurality of scan patterns to obtain N × M data; And (c) decoding the N × M data.

상기 (b)단계는 (b11) 상기 N×M 데이터 중 실질적으로 0인 성분값들이 많이 존재하는 영역일수록 나중에 스캐닝하는 스캔 패턴을 선택하는 단계; 및 (b2) 선택된 스캔 패턴을 사용하여 역스캐닝하는 단계를 포함하는 것이 바람직하다.The step (b) may include (b11) selecting a scan pattern to be scanned later in an area in which a large number of substantially zero component values are present among the N × M data; And (b2) backscanning using the selected scan pattern.

상기 (b)단계는 (b21) 상기 N×M 데이터가 비월주사 프레임 구조의 영상 데이터에 기초한 경우 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 스캐닝하는 스캔 패턴을 선택하는 단계; 및 (b2) 선택된 스캔 패턴으로 역스캐닝하는 단계를 포함하는 것이 바람직하다.The step (b) may include (b21) selecting a scan pattern that scans a horizontal high frequency component value relatively earlier than a vertical high frequency component value when the N × M data is based on image data of an interlaced scanning frame structure; And (b2) backscanning with the selected scan pattern.

상기 (b)단계는 (b31) 상기 N×M 데이터가 비월주사 필드 구조 또는 순차주사 프레임 구조의 영상 데이터로부터 얻어진 경우 수직 주파수 성분값과 수평 주파수 성분값을 실질적으로 균등한 순서로 스캐닝하는 스캔 패턴을 선택하는 단계; 및 (b2) 선택된 스캔 패턴으로 역스캐닝하는 단계를 포함하는 것이 바람직하다.In the step (b), (b31) the scan pattern for scanning the vertical frequency component value and the horizontal frequency component value in substantially equal order when the N × M data is obtained from the image data of the interlaced field structure or the progressive scan frame structure. Selecting a; And (b2) backscanning with the selected scan pattern.

상기 (b)단계는 (b31) 상기 N×M 데이터의 매크로 블록 타입에 대응하는 스캔 패턴을 선택하는 단계; 및 (b2) 선택된 스캔 패턴으로 역스캐닝하는 단계를 포함하는 것이 바람직하다.Step (b) may include (b31) selecting a scan pattern corresponding to the macroblock type of the N × M data; And (b2) backscanning with the selected scan pattern.

상기 (b)단계는 (b41) 상기 N×M 데이터의 픽처 구조 및 매크로 블록 타입에 대응하는 스캔 패턴을 선택하는 단계; 및 (b2) 선택된 스캔 패턴으로 역스캐닝하는 단계를 포함하는 것이 바람직하다.Step (b) may include (b41) selecting a scan pattern corresponding to the picture structure and macroblock type of the N × M data; And (b2) backscanning with the selected scan pattern.

상기 (a)단계는 (a1) 상기 영상 데이터를 구성하는 코드 워드를 소정 심벌 데이터로 변환하는 단계를 포함하는 것이 바람직하다.The step (a) preferably includes (a1) converting a code word constituting the image data into predetermined symbol data.

또한, 영상 데이터를 복호화하는 방법에 있어서, (a) 상기 영상 데이터를 가변장 복호화하여 심벌 데이터를 얻는 단계; (b) 상기 심벌 데이터로부터 변환 계수값들을 얻는 단계; (c) 복수개의 스캔 패턴 중 소정 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 생성하는 단계; (d) 상기 변환 계수값들을 생성된 스캔 패턴 선택 정보에 따른 스캔 패턴을 사용하여 N×M 데이터로 역스캐닝하는 단계; 및 (e) 역스캐닝된 데이터를 복호화하는 단계를 포함하는 것을 특징으로 하는 복호화 방법에 의해서도 달성된다.A method of decoding image data, the method comprising: (a) obtaining symbol data by variable length decoding the image data; (b) obtaining transform coefficient values from the symbol data; (c) generating scan pattern selection information for selecting a predetermined scan pattern from among the plurality of scan patterns; (d) reverse scanning the transform coefficient values into N × M data using a scan pattern according to the generated scan pattern selection information; And (e) decrypting the backscanned data.

상기 (c)단계는 (c1) 픽처 구조 정보를 입력받아 분석하는 단계; 및 (c21) 분석 결과, 비월주사 프레임 구조인 경우 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 스캐닝하는 스캔 패턴을 선택하는 상기 스캔 패턴 선택 정보를 생성하는 단계를 포함하거나, (c1) 픽처 구조 정보를 입력받아 분석하는 단계; 및 (c22) 분석 결과, 비월주사 필드 구조 또는 순차주사 프레임 구조인 경우 수직 주파수 성분값과 수평 주파수 성분값을 실질적으로 균등한 순서로 스캐닝하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 생성하는 단계를 포함하는 것이 바람직하다.Step (c) includes (c1) receiving and analyzing picture structure information; And (c21) generating, as a result of the analysis, the scan pattern selection information for selecting a scan pattern that scans a horizontal high frequency component value relatively earlier than a vertical high frequency component value in the case of an interlaced scanning frame structure, or (c1) a picture. Receiving and analyzing structure information; And (c22) generating scan pattern selection information for selecting a scan pattern that scans the vertical frequency component values and the horizontal frequency component values in substantially equal order in the case of the interlaced field structure or the progressive scan frame structure. It is preferable to include.

한편, 본 발명의 다른 분야에 따르면, 영상 데이터를 부호화하는 장치에 있어서, 상기 영상 데이터를 부호화하여 N×M 데이터를 얻는 제1 부호화부; 상기 N×M 데이터에 응답하여 복수개의 스캔 패턴들 중 소정 스캔 패턴을 선택하기 위한 스 캔 패턴 선택 정보를 제공하는 부호화 제어부; 및 상기 스캔 패턴 선택 정보에 따른 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하고, 스캐닝된 데이터를 부호화하는 제2 부호화부를 포함하는 것을 특징으로 하는 장치에 의해서도 달성된다.According to another aspect of the present invention, there is provided an apparatus for encoding video data, the apparatus comprising: a first encoder which encodes the video data to obtain N × M data; An encoding control unit providing scan pattern selection information for selecting a predetermined scan pattern among a plurality of scan patterns in response to the N × M data; And a second encoder which scans the N × M data by using the scan pattern according to the scan pattern selection information, and encodes the scanned data.

상기 제1 부호화부는 상기 영상 데이터를 변환 부호화하는 변환 부호화부; 및 상기 변환 부호화부에 의해 변환된 데이터를 양자화하여 상기 N×M 데이터를 출력하는 양자화부를 포함하는 것이 바람직하다.The first encoder may include a transform encoder for transform encoding the image data; And a quantizer for quantizing the data converted by the transform encoder and outputting the N × M data.

또한, 상기 목적은 영상 데이터를 복호화하는 장치에 있어서, 상기 영상 데이터를 복호화하여 변환 계수값들을 얻는 제2 복호화부; 복수개의 스캔 패턴 중 소정 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 생성하는 스캔 패턴 선택부; 및 상기 변환 계수값들을 생성된 스캔 패턴 선택 정보에 따른 스캔 패턴을 이용하여 N×M 데이터로 역스캐닝하는 역스캐닝부를 포함하는 것을 특징으로 하는 장치에 의해서도 달성된다.In addition, the above object is an apparatus for decoding image data, the apparatus comprising: a second decoder to obtain transform coefficient values by decoding the image data; A scan pattern selection unit which generates scan pattern selection information for selecting a predetermined scan pattern from among a plurality of scan patterns; And an inverse scanning unit which inversely scans the transform coefficient values into N × M data using the scan pattern according to the generated scan pattern selection information.

또한, 본 발명의 다른 분야에 따르면 상기 목적은 상기 부호화 방법 또는 복호화 방법을 수행하기 위한 프로그램 코드가 기록된 컴퓨터 판독 가능 정보저장매체에 의해서도 달성된다.According to another field of the present invention, the above object is also achieved by a computer readable information storage medium having recorded thereon program code for performing the encoding method or the decoding method.

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

도 7은 본 발명의 바람직한 실시예에 따른 부호화 장치의 블록도이다.7 is a block diagram of an encoding apparatus according to a preferred embodiment of the present invention.

도 7을 참조하면, 부호화 장치는 본 발명에 따른 제2 소스 부호화를 위한 장치로서, 스캔부(71) 및 가변장 부호화부(72)를 구비한다. 참조번호 73은 외부로부 터 입력되는 스캔 패턴 선택 신호에 따라 복수개의 스캔 패턴 1,‥,k,‥,K 중 적어도 하나의 스캔 패턴을 선택하는 스위칭부(73)이다. 본 실시예에서 스캔 패턴 선택 신호는 부호화 제어부(도시되지 않음)로부터 입력된다. 스캔 패턴은 N×M 데이터를 읽어들이는 순서를 정해놓은 참조 정보를 말한다.Referring to FIG. 7, the encoding apparatus is a device for second source encoding according to the present invention, and includes a scan unit 71 and a variable length encoder 72. Reference numeral 73 is a switching unit 73 for selecting at least one scan pattern among a plurality of scan patterns 1, ..., k, ..., K according to a scan pattern selection signal input from the outside. In this embodiment, the scan pattern selection signal is input from an encoding control unit (not shown). The scan pattern refers to reference information in which the order of reading the N × M data is determined.

스캔부(71)는 외부로부터 입력되는 N×M 데이터를 스캔 패턴 선택 신호를 기초로 스위칭부(73)에 의해 선택된 적어도 하나의 스캔 패턴을 사용하여 스캐닝한다. 즉, N×M 데이터를 소정 순서대로 읽어들여 심벌 데이터로 변환한다. 가변장 부호화부(72)는 스캐닝된 데이터, 즉 심벌 데이터를 가변장 부호화한다.The scan unit 71 scans the N × M data input from the outside using at least one scan pattern selected by the switching unit 73 based on the scan pattern selection signal. That is, the N × M data is read in a predetermined order and converted into symbol data. The variable length encoder 72 variable length encodes the scanned data, that is, the symbol data.

본 실시예에서 N×M 데이터란 영상 데이터를 제1 소스(source) 부호화하여 얻어진 블록 데이터를 가리킨다. 여기서, 제1 소스 부호화란 복수개의 픽셀값으로 구성된 2차원 영상 데이터를 타 도메인의 데이터로 표현하는 변환(transformation)(및 양자화)을 수행함을 의미한다. 예를 들어, 픽셀값으로 구성된 영상 데이터는 DCT 변환에 의해 주파수 도메인의 데이터로 변환된다. 제1 소스 부호화에 의해, 영상 데이터는 실질적으로 동일한 정보를 담고 있으면서도 보다 작은 크기의 데이터로 표현가능하게 된다. 본 실시예에서 심벌 데이터란 N×M 데이터를 소정 스캔 패턴을 사용하여 읽어들인 다음 이를 기초로 얻어진 런-레벨 데이터를 말한다. 런-레벨 데이터는 런값과 레벨 값이 각각 분리되어 얻어지는 1차원 데이터일 수도 있고, 런 값과 레벨 값이 쌍을 이루는 2차원 데이터일 수도 있으며, Last 값, 런 값, 및 레벨 값으로 구성된 3차원 데이터일 수도 있다. 가변장 부호화부(72)는 2D 런-레벨 데이터 (Run, Level)에 대응하는 코드 워드로 부호화하 거나(2D 가변장 부호화), Run 성분들과 Level 성분들이 따로 분리된 1D 런-벨 데이터를 대응하는 코드 워드로 부호화한다(1D 가변장 부호화). 3D 런-레벨 데이터 (LAST, Run, Level)에 대응하는 코드 워드로 부호화하는 3D 가변장 부호화도 가능하다. 이 때, 가변장 부호화부(72)는 Huffman 부호화기 또는 산술 부호화기를 사용하여 부호화할 수 있다.In the present embodiment, the N × M data refers to block data obtained by encoding first image data. In this case, the first source encoding refers to performing transformation (and quantization) of two-dimensional image data composed of a plurality of pixel values as data of another domain. For example, image data composed of pixel values is converted into data in the frequency domain by DCT conversion. By the first source encoding, the image data can be represented as data of smaller size while containing substantially the same information. In the present embodiment, the symbol data refers to run-level data obtained based on reading N × M data using a predetermined scan pattern. The run-level data may be one-dimensional data obtained by separating the run value and the level value, or two-dimensional data in which the run value and the level value are paired, and the three-dimensional data including the last value, the run value, and the level value. It may be data. The variable length encoder 72 encodes a code word corresponding to 2D run-level data (Run, Level) (2D variable length coding), or generates 1D run-bell data in which Run components and Level components are separated. The code is coded with the corresponding code word (1D variable length coding). 3D variable length coding is also possible, which is coded by code words corresponding to 3D run-level data (LAST, Run, Level). At this time, the variable length encoder 72 may encode using a Huffman encoder or an arithmetic encoder.

부호화 제어부는 스캔 패턴을 선택하기 위한 로직을 가지고 있으며, 이에 따른 스캔 패턴 선택 정보를 스위칭부(73)로 제공한다. 스캔 패턴 선택 로직에 따라 부호화 제어부는 N×M 데이터 중 실질적으로 0인 성분값들이 많이 존재하는 영역일수록 나중에 읽어들이는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공한다. 특히, N×M 데이터가 비월 주사 프레임 구조의 영상 데이터로부터 얻어진 경우 지그재그 패턴에 비해 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 읽어들이는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하고, N×M 데이터가 비월 주사 필드 구조 또는 순차 주사 프레임 구조의 영상 데이터로부터 얻어진 경우 수직 주파수 성분값과 수평 주파수 성분값을 실질적으로 균등한 순서로 읽어들이는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공한다.The encoding controller has logic for selecting a scan pattern, and provides the scan pattern selection information to the switching unit 73 accordingly. According to the scan pattern selection logic, the encoding control unit provides scan pattern selection information for selecting a scan pattern to be read later in an area where a large number of substantially zero component values among N × M data exist. In particular, when N × M data is obtained from image data having an interlaced scan frame structure, scan pattern selection information for selecting a scan pattern that reads a horizontal high frequency component value relatively earlier than a vertical high frequency component value relative to a zigzag pattern is provided. Provides scan pattern selection information for selecting scan patterns that read vertical frequency component values and horizontal frequency component values in substantially equal order when N × M data is obtained from image data of interlaced scan field structure or sequential scan frame structure. do.

대안적으로, 부호화 제어부는 N×M 데이터의 매크로 블록 타입에 대응하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나, N×M 데이터의 픽처 구조 및 매크로 블록 타입에 대응하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다. 또는, 부호화 제어부는 N×M 데이터가 수평 방향으로 분할되어 얻어진 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패 턴 선택 정보를 제공하거나 N×M 데이터가 수직 방향으로 분할되어 얻어진 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나, N×M 데이터가 수직 방향 및 수평 방향으로 각각 분할되어 얻어진 적어도 4 개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다. 또는, N×M 데이터를 임의로 영역 분할하여 적어도 2개의 서브 영역들로 나눈 다음 각 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다.Alternatively, the encoding controller may provide scan pattern selection information for selecting a scan pattern corresponding to the macroblock type of the N × M data, or select a scan pattern corresponding to the picture structure and the macroblock type of the N × M data. Scan pattern selection information may be provided. Alternatively, the encoding control unit may provide scan pattern selection information for selecting different scan patterns for at least two sub-areas obtained by dividing the N × M data in the horizontal direction, or obtain the N × M data by dividing it in the vertical direction. Provide scan pattern selection information for selecting different scan patterns for at least two sub-areas, or different scan patterns for at least four sub-areas obtained by dividing N × M data in the vertical and horizontal directions, respectively The scan pattern selection information for selecting may be provided. Alternatively, N × M data may be arbitrarily divided into at least two sub-regions, and then scan pattern selection information for selecting different scan patterns for each sub-region may be provided.

도 8은 본 발명의 바람직한 실시예에 따른 영상 데이터의 부호화 장치의 블록도이다. 다만, 도 7의 그것과 동일한 기능을 발휘하는 블록에 대해서는 동일한 참조번호를 부여하고 반복되는 설명은 생략한다.8 is a block diagram of an apparatus for encoding image data according to a preferred embodiment of the present invention. However, for the block having the same function as that of FIG. 7, the same reference numerals will be given, and repeated descriptions will be omitted.

도 8을 참조하면, 부호화 장치는 영상 데이터를 소스 부호화하여 N×M 데이터를 얻는 제1 소스 부호화부(2), 복수개의 스캔 패턴 중 선택된 스캔 패턴을 알려주는 스캔 패턴 선택 정보를 제공하는 부호화 제어부(1), 및 스캔 패턴 선택 정보에 따라, 상기 N×M 데이터가 복수개의 서브 영역들로 분할되었을 때 각 서브 영역에 대응하도록 선택된 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하며, 스캐닝된 데이터를 엔트로피 부호화하는 제2 소스 부호화부(7)를 구비한다. 또한, 제1 소스 복호화부(3), 메모리부(4), 움직임 보상부(5), 움직임 예측부(6), 코딩 정보 부호화부(8), 움직임 벡터 부호화부(9), 및 먹싱부(10)를 포함한다. Referring to FIG. 8, the encoding apparatus may include a first source encoder 2 that obtains N × M data by source encoding image data, and an encoding controller that provides scan pattern selection information indicating a selected scan pattern among a plurality of scan patterns. (1) and scanning the N × M data using a scan pattern selected to correspond to each sub area when the N × M data is divided into a plurality of sub areas according to the scan pattern selection information. A second source encoder 7 for entropy encoding data is provided. In addition, the first source decoder 3, the memory unit 4, the motion compensator 5, the motion predictor 6, the coding information encoder 8, the motion vector encoder 9, and the muxing unit (10).

입력되는 영상 데이터는 시간축을 따라 카메라로부터 입력되는 프레임들 또는 프레임을 소정 크기로 분할하여 얻어진 블록들로 구성된다. 프레임은 순차 주 사 방식에 의해 얻어진 순차 주사 프레임, 비월 주사 방식에 의해 얻어진 필드 또는 비월 주사 프레임을 포함한다. 따라서, 이하 설명하는 영상 데이터는 순차 주사 프레임, 비월 주사 프레임, 필드, 블록 구조의 픽처를 의미한다.The input image data is composed of blocks obtained by dividing frames or frames input from a camera along a time axis into a predetermined size. The frame includes a sequential scan frame obtained by the sequential scan method, a field obtained by the interlaced scan method, or an interlaced scan frame. Therefore, the video data described below means pictures of progressive scan frames, interlaced scan frames, fields, and block structures.

영상 데이터가 입력되면 부호화 제어부(1)는 입력되는 영상의 특성 또는 사용자가 원하는 소정 동작 목적에 따라, 입력 영상에 대해 움직임 보상을 수행할지 여부에 따른 코딩-타입(인트라 코딩/인터 코딩)을 결정하여 대응하는 제어 신호를 제1 스위치(S1)로 출력한다. 움직임 보상을 수행할 경우에는 이전 또는 이후에 입력된 영상 데이터가 필요하므로 제1 스위치(S1)는 닫히게 되고 움직임 보상을 수행하지 않을 경우에는 이전 또는 이후에 입력된 영상 데이터가 필요하지 않으므로 제1 스위치(S1)는 열리게 된다. 제1 스위치(S1)가 닫히면 입력 영상과 이전 또는 이후 영상으로부터 얻어진 차 영상 데이터가 제1 소스 부호화부(2)로 입력되고 제1 스위치(S1)가 열리면 입력 영상만이 제1 소스 부호화부(2)로 입력된다.When image data is input, the encoding control unit 1 determines a coding-type (intra coding / inter coding) according to whether to perform motion compensation on the input image according to a characteristic of the input image or a predetermined operation purpose desired by the user. To output the corresponding control signal to the first switch S1. When performing the motion compensation, the first switch S1 is closed because the image data inputted before or after is required, and when the motion compensation is not performed, the first switch S1 is not needed. S1 is opened. When the first switch S1 is closed, the difference image data obtained from the input image and the before or after image are input to the first source encoder 2, and when the first switch S1 is opened, only the input image is the first source encoder ( 2) is entered.

한편, 부호화 제어부(1)는 스캔 패턴 선택 정보를 제2 소스 부호화부(7)로 출력한다. 스캔 패턴 선택 정보는 도 7을 참조하여 설명한 그것과 동일하다. 나아가, 부호화 제어부(1)는 필요한 경우 스캔 패턴 선택 정보를 송신단으로 전송하거나 저장해둔다.On the other hand, the encoding control unit 1 outputs the scan pattern selection information to the second source encoding unit 7. The scan pattern selection information is the same as that described with reference to FIG. Further, the encoding control unit 1 transmits or stores the scan pattern selection information to the transmitting end, if necessary.

제1 소스 부호화부(2)는 입력된 영상 데이터를 변환(transform) 부호화하여 얻어진 변환 계수값들을 소정 양자화 스텝에 따라 양자화하여 양자화된 변환 계수값들로 구성된 2차원 데이터인 N×M 데이터를 얻는다. 사용되는 변환의 예로는 DCT(Discrete Cosine Transform)을 들 수 있다. 양자화는 미리 결정된 양자화 스 텝에 따라 수행된다.The first source encoder 2 quantizes transform coefficient values obtained by transform encoding the input image data according to a predetermined quantization step to obtain N × M data that is two-dimensional data composed of quantized transform coefficient values. . An example of the transform used may include a discrete cosine transform (DCT). Quantization is performed according to a predetermined quantization step.

한편, 제1 소스 부호화부(2)로 입력되어 부호화된 영상 데이터는 이후 또는 이전에 입력된 영상 데이터의 움직임 보상을 위한 참조 데이터로 사용될 수 있으므로 제1 소스 복호화부(3)에 의해 제1 소스 부호화부(2)의 역과정인 역양자화와 역변환 부호화를 거친 후 메모리(4)에 저장된다. 또한, 제1 소스 복호화부(2)로부터 출력된 데이터가 차 영상 데이터이면 부호화 제어부(1)는 제2 스위치(S2)를 닫아서 제1 소스 복호화부(3)로부터 출력된 차 영상 데이터가 움직임 보상부(5)의 출력과 더해진 다음 메모리(4)에 저장되도록 한다.Meanwhile, since the image data input and encoded by the first source encoder 2 may be used as reference data for motion compensation of the image data input after or previously, the first source by the first source decoder 3 After the inverse quantization and inverse transform encoding, which are inverse processes of the encoder 2, are stored in the memory 4. In addition, if the data output from the first source decoder 2 is difference image data, the encoding controller 1 closes the second switch S2 so that the difference image data output from the first source decoder 3 is motion compensated. It is added to the output of section 5 and then stored in the memory 4.

한편, 움직임 예측(motion estimation)부(6)는 입력된 영상 데이터와 메모리(4)에 저장된 데이터를 비교하여, 현재 입력된 데이터와 가장 유사한 데이터를 찾은 다음, 입력된 영상 데이터와 비교하여 움직임 벡터 MV(Motion Vector)를 출력한다. 움직임 벡터는 적어도 하나의 픽처를 참조하여 구해진다. 즉, 복수개의 과거 및/또는 미래의 픽처를 참조하여 산출될 수 있다. 움직임 벡터가 메모리(4)로 전달되면 메모리(4)는 해당 데이터를 움직임 보상부(motion compensation)부(5)로 출력하며, 움직임 보상부(5)는 입력받은 데이터를 기초로 현재 부호화하는 영상 데이터에 해당하는 보상치를 만들어 출력한다.Meanwhile, the motion estimation unit 6 compares the input image data with the data stored in the memory 4 to find the most similar data to the currently input data, and then compares the input image data with the motion vector. Output MV (Motion Vector). The motion vector is obtained with reference to at least one picture. That is, it may be calculated with reference to a plurality of past and / or future pictures. When the motion vector is transferred to the memory 4, the memory 4 outputs corresponding data to the motion compensation unit 5, and the motion compensation unit 5 currently encodes the image based on the received data. Compensation values corresponding to data are created and output.

제2 소스 부호화부(7)는 제1 소스 부호화부(2)로부터 출력되는 양자화된 변환 계수들을 입력받아 N×M 데이터를 부호화 제어부(1)에서 제공되는 스캔 패턴 선택 정보에 따라 선택된 스캔 패턴을 사용하여 스캐닝한 다음 엔트로피 부호화한다. 움직임벡터 부호화부(9)는 움직임 예측부(6)로부터 출력된 움직임 벡터에 관한 정 보를 입력받아 부호화한다. 코딩 정보 부호화부(8)는 코딩 타입 정보, 양자화 스텝 정보, 등 기타 복호화에 필요한 정보들을 입력받아 엔트로피 부호화한다. 먹싱부(10)는 코딩 정보 부호화부(8), 제2 소스 부호화부(7), 움직임 벡터 부호화부(9)의 출력을 각각 입력받아 최종적으로 얻어진 비트스트림을 출력한다.The second source encoder 7 receives the quantized transform coefficients output from the first source encoder 2 and converts the N × M data into scan patterns selected according to scan pattern selection information provided from the encoding controller 1. Scanning then entropy encoding. The motion vector encoder 9 receives and encodes information about a motion vector output from the motion predictor 6. The coding information encoder 8 receives entropy coding by receiving coding type information, quantization step information, and other information necessary for decoding. The muxing unit 10 receives the outputs of the coding information encoder 8, the second source encoder 7, and the motion vector encoder 9, respectively, and outputs the finally obtained bitstream.

도 9는 본 발명의 바람직한 실시예에 따른 복호화 장치의 블록도이다.9 is a block diagram of a decoding apparatus according to a preferred embodiment of the present invention.

도 9를 참조하면, 복호화 장치는 본 발명에 따른 제2 소스 복호화를 위한 장치로서, 역스캔부(91), 가변장 복호화부(92), 및 스캔 패턴 선택부(93)를 구비한다. 참조번호 94는 스캔 패턴 선택부(93)로부터 제공되는 스캔 패턴 선택 정보에 따라 복수개의 스캔 패턴 1,‥,k,‥,K 중 적어도 하나의 스캔 패턴을 선택하는 스위칭부이다.Referring to FIG. 9, the decoding apparatus is a device for decoding a second source according to the present invention and includes an inverse scan unit 91, a variable length decoder 92, and a scan pattern selector 93. Reference numeral 94 is a switching unit that selects at least one scan pattern from among the plurality of scan patterns 1, ..., k, ..., K in accordance with the scan pattern selection information provided from the scan pattern selection unit 93.

가변장 복호화부(92)는 입력된 비트스트림을 가변장 복호화한 다음 심벌 데이터로 변환한다. 역스캔부(91)는 스위칭부(94)가 스캔 패턴 선택 정보를 기초로 선택한 적어도 하나의 스캔 패턴을 사용하여 심벌 데이터를 역스캐닝하여 N×M 데이터로 재구성한다. 이에, 제1 소스 부호화된 블록 데이터인 N×M 데이터가 얻어진다. 본 실시예에서 심벌 데이터는 런-레벨 데이터를 말한다. 가변장 복호화부(92)는 비트스트림에 포함된 소정 코드 워드를 복호화하여 대응 런-레벨 데이터를 얻어낸다.The variable length decoder 92 variable length decodes the input bitstream and then converts the input bitstream into symbol data. The inverse scan unit 91 rescans the symbol data using at least one scan pattern selected by the switching unit 94 based on the scan pattern selection information and reconstructs the N × M data. Thus, N × M data which is the first source coded block data is obtained. In the present embodiment, symbol data refers to run-level data. The variable length decoder 92 decodes a predetermined code word included in the bitstream to obtain corresponding run-level data.

스캔 패턴 선택부(93)는 스캔 패턴 선택 로직을 구비함으로써, 스스로 스캔 패턴 선택 정보를 생성하여 스위칭부(94)로 제공한다. 이하, 스캔 패턴의 특징은 설명의 편의를 고려하여 부호화 과정에서의 동작을 기초로 기술되었음을 밝혀둔다. 스캔 패턴 선택 정보에 따르면 재구성될 N×M 데이터 중 실질적으로 0인 성분값들이 많이 존재하는 영역일수록 나중에 읽어들이는 스캔 패턴을 선택하도록 해준다. 특히, 스캔 패턴 선택 정보에 따르면, 재구성될 N×M 데이터가 비월 주사 프레임 구조의 영상 데이터에 기초한 경우 지그재그 패턴에 비해 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 읽어들이는 스캔 패턴을 선택해주거나, 재구성될 N×M 데이터가 비월 주사 필드 구조 또는 순차 주사 프레임 구조의 영상 데이터에 기초한 경우 수직 주파수 성분값과 수평 주파수 성분값을 실질적으로 균등한 순서로 읽어들이는 스캔 패턴을 선택해준다.The scan pattern selection unit 93 includes scan pattern selection logic to generate scan pattern selection information by itself and provide it to the switching unit 94. Hereinafter, the features of the scan pattern will be described based on the operation in the encoding process in consideration of the convenience of description. According to the scan pattern selection information, a region in which there are substantially zero component values among the N × M data to be reconstructed selects a scan pattern to be read later. In particular, according to the scan pattern selection information, when the N × M data to be reconstructed is based on the image data of the interlaced scanning frame structure, a scan pattern that reads the horizontal high frequency component value relatively earlier than the vertical high frequency component value is selected compared to the zigzag pattern. When the N × M data to be reconstructed or reconstructed is based on image data of an interlaced scan field structure or a sequential scan frame structure, a scan pattern that reads vertical frequency component values and horizontal frequency component values in substantially equal order is selected.

또한, 스캔 패턴 선택부(93)는 재구성될 N×M 데이터의 매크로 블록 타입에 대응하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나, 재구성될 N×M 데이터의 픽처 구조 및 매크로 블록 타입에 대응하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다. 또는, 재구성될 N×M 데이터가 수평 방향으로 분할되어 얻어진 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나 재구성될 N×M 데이터가 수직 방향으로 분할되어 얻어진 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나, 재구성될 N×M 데이터가 수직 방향 및 수평 방향으로 각각 분할되어 얻어진 적어도 4 개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다.In addition, the scan pattern selection unit 93 provides scan pattern selection information for selecting a scan pattern corresponding to the macro block type of the N × M data to be reconstructed, or provides a picture structure and macroblock type of the N × M data to be reconstructed. Scan pattern selection information for selecting a corresponding scan pattern may be provided. Alternatively, scan pattern selection information for selecting different scan patterns may be provided for at least two sub-areas obtained by dividing the N × M data to be reconstructed in the horizontal direction, or the N × M data to be reconstructed is divided into the vertical direction. Provide scan pattern selection information for selecting different scan patterns respectively for at least two sub-areas, or different for at least four sub-areas obtained by dividing the N × M data to be reconstructed respectively in the vertical and horizontal directions, respectively. Scan pattern selection information for selecting a scan pattern may be provided.

특히, 부호화 과정에서 입력되는 영상 데이터의 부호화 단위가 프레임 구조인지 필드 구조인지, 또는 입력되는 영상 데이터가 순차주사 영상인지 비월주사 영 상인지 등을 알려주는, 즉 입력 영상 데이터의 픽처 구조를 알려주는 픽처 구조 정보나 매크로 블록 타입을 알려주는 매크로 블록 타입 정보는 복호화를 위해 부호화 장치가 반드시 복호화 장치로 전송해야 할 정보이다. 따라서, 이들 정보를 기초로 소정 스캔 패턴을 선택할 수 있도록 스캔 패턴 선택 로직을 미리 결정해둔다면 부호화 장치가 복호화 장치로 스캔 패턴의 선택을 위한 정보를 보내지 않고서도 스캔 패턴을 선택할 수 있는 잇점이 있다.In particular, a picture indicating whether a coding unit of the image data input in the encoding process is a frame structure or a field structure, or whether the input image data is a sequential scan image or an interlaced scan image, that is, a picture indicating the picture structure of the input image data The macroblock type information indicating the structure information or the macroblock type is information that the encoding apparatus must transmit to the decoding apparatus for decoding. Therefore, if the scan pattern selection logic is determined in advance so that the predetermined scan pattern can be selected based on the information, the coding apparatus can select the scan pattern without sending information for selecting the scan pattern to the decoding apparatus.

도 10 내지 12는 도 9의 스캔 패턴 선택부(93)의 구현 예들이다.10 to 12 are exemplary implementations of the scan pattern selector 93 of FIG. 9.

도 10을 참조하면, 스캔 패턴 선택부(93)는 픽처 구조 정보를 입력받고 스캔 패턴 선택 로직에 따라 이에 대응하는 스캔 패턴 선택 정보를 생성하여 출력하거나 매크로 블록 타입 정보를 입력받고 이에 대응하는 스캔 패턴 선택 정보를 생성하여 출력한다.Referring to FIG. 10, the scan pattern selector 93 receives picture structure information, generates and outputs scan pattern selection information corresponding to the scan pattern selection logic, or receives macroblock type information, and scan patterns corresponding thereto. Generate and output selection information.

도 11을 참조하면, 스캔 패턴 선택부(93)는 픽처 구조 정보와 매크로 블록 타입 정보를 입력받고 스캔 패턴 선택 로직에 따라 이에 대응하는 스캔 패턴 선택 정보를 생성하여 출력한다.Referring to FIG. 11, the scan pattern selection unit 93 receives picture structure information and macro block type information, and generates and outputs scan pattern selection information corresponding thereto according to the scan pattern selection logic.

도 12를 참조하면, 스캔 패턴 선택부(93)는 복수개의 부호화 정보 1, 2,‥,n을 입력받고 스캔 패턴 선택 로직에 따라 이에 대응하는 스캔 패턴 선택 정보를 생성하여 출력한다. 여기서, 부호화 정보는 부호화에 관한 조건 정보로서, 복호화를 위해 송신단에서 복호화 장치로 제공해주는 정보를 의미한다. Referring to FIG. 12, the scan pattern selector 93 receives a plurality of pieces of encoding information 1, 2,..., N, and generates and outputs scan pattern selection information corresponding to the scan pattern selection logic. Here, the encoding information is condition information on encoding, and means information provided from the transmitting end to the decoding apparatus for decoding.

도 10 내지 12의 경우, 스캔 패턴 선택 로직은 미리 저장된 매핑 테이블로 구현될 수 있다. 매핑 테이블에는 소정 부호화 정보에 대해 소정 스캔 패턴이 매 핑된 매핑 정보가 기록될 수 있다. 예를 들어, 매크로 블록 타입 정보, 픽처 구조 정보에 대한 대응 스캔 패턴이 매핑될 수 있다.10 to 12, the scan pattern selection logic may be implemented as a pre-stored mapping table. In the mapping table, mapping information in which a predetermined scan pattern is mapped to predetermined encoding information may be recorded. For example, corresponding scan patterns for macro block type information and picture structure information may be mapped.

도 13 내지 15는 본 발명의 일 실시예에 따른 스캔 패턴들이다.13 to 15 are scan patterns according to an embodiment of the present invention.

도 13 내지 15를 참조하면, 도 7 내지 9를 참조하여 설명한 부호화 장치 또는 복호화 장치가 사용가능한 스캔 패턴들이 도시되어 있다. 예를 들어, 부호화 장치의 부호화 제어부(1) 또는 복호화 장치의 스캔 패턴 선택부(93)는 픽처 구조가 비월 주사 프레임 구조인 경우 수직 고주파 성분값이 0이 될 개연성이 수평 고주파 성분값이 0이 될 개연성보다 낮음을 반영하는 스캔 패턴 4를 선택할 수 있다. 나머지 경우에는 스캔 패턴 3을 선택할 수 있다.13 to 15, scan patterns usable by the encoding apparatus or the decoding apparatus described with reference to FIGS. 7 to 9 are illustrated. For example, the encoding control unit 1 of the encoding apparatus or the scan pattern selection unit 93 of the decoding apparatus may have a probability that the vertical high frequency component value is 0 when the picture structure is an interlaced scanning frame structure. Scan pattern 4 can be selected which reflects a lower than probability. In other cases, scan pattern 3 can be selected.

도 16 및 17은 본 발명의 다른 실시예에 따른 스캔 패턴이다.16 and 17 are scan patterns according to another embodiment of the present invention.

도 16 및 17을 참조하면, 복수개의 N×M 블록들, 즉 복수개의 N×M 데이터를 하나의 블록으로 간주하여 동시에 스캐닝하는 스캔 패턴이 도시되어 있다. 이에 따르면, 복수개의 N×M 데이터 1, 2, 3, 4의 성분값들을 하나의 N×M 데이터의 성분값들로 취급하여 스캐닝한다. 하나의 블록으로 간주되는 N×M 데이터의 개수 및 크기는 필요에 따라 다양하게 설정될 수 있으며 그에 따른 스캐닝 순서는 합당하게 조정될 수 있다.16 and 17, a scan pattern for simultaneously scanning a plurality of N × M blocks, that is, a plurality of N × M data as one block is shown. According to this, the component values of the plurality of N × M data 1, 2, 3, and 4 are treated as component values of one N × M data and scanned. The number and size of the N × M data regarded as one block may be variously set as necessary, and the scanning order accordingly may be adjusted accordingly.

도 18 내지 도 21은 본 발명의 바람직한 실시예에 따라 복수개의 스캔 패턴을 사용하기 위한 분할 방식을 보여준다.18 through 21 illustrate a division scheme for using a plurality of scan patterns according to a preferred embodiment of the present invention.

도 18 내지 21을 참조하면, 도 7 내지 9를 참조하여 설명한 부호화 장치 또는 복호화 장치가 복수개의 스캔 패턴을 사용하기 위해 N×M 데이터를 분할하는 방 식이 도시되어 있다. 예를 들어, 부호화 장치의 부호화 제어부(1) 또는 복호화 장치의 스캔 패턴 선택부(93)는 도 16에 도시된 바와 같이, N×M 데이터가 수평 방향으로 분할되어 얻어진 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나, 도 17에 도시된 바와 같이, N×M 데이터가 수직 방향으로 분할되어 얻어진 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하거나, 도 18에 도시된 바와 같이, N×M 데이터가 수직 방향 및 수평 방향으로 각각 분할되어 얻어진 적어도 4 개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다. 나아가, 도 19에 도시된 바와 같이, N×M 데이터가 대각선 방향으로 분할된 적어도 2개의 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다. 또는, N×M 데이터를 임의로 영역 분할하여 적어도 2개의 서브 영역들로 나눈 다음 각 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다. 또는 복수개의 N×M 블록들 전체를 하나의 블록으로 간주하고 이를 임의로 영역 분할하여 적어도 2개의 서브 영역들로 나눈 다음 각 서브 영역들에 대해 각각 다른 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공할 수 있다.Referring to FIGS. 18 through 21, a method of dividing N × M data by the encoding apparatus or the decoding apparatus described with reference to FIGS. 7 through 9 to use a plurality of scan patterns is illustrated. For example, as shown in FIG. 16, the encoding control unit 1 of the encoding apparatus or the scan pattern selection unit 93 of the decoding apparatus may include at least two sub-regions obtained by dividing N × M data in a horizontal direction. Scan pattern selection information for selecting different scan patterns for each other, or as shown in FIG. 17, for each of at least two sub-regions obtained by dividing the N × M data in the vertical direction, respectively, Scan pattern selection information for providing scan pattern selection information or selecting different scan patterns for at least four sub-regions obtained by dividing N × M data in the vertical direction and the horizontal direction, respectively, as shown in FIG. 18. Can be provided. Furthermore, as shown in FIG. 19, scan pattern selection information for selecting different scan patterns may be provided for at least two sub-regions in which N × M data is divided diagonally. Alternatively, N × M data may be arbitrarily divided into at least two sub-regions, and then scan pattern selection information for selecting different scan patterns for each sub-region may be provided. Alternatively, a plurality of N × M blocks may be regarded as one block, arbitrarily divided into regions, divided into at least two sub-regions, and scan pattern selection information for selecting different scan patterns for each sub-region may be provided. Can be.

한편, 전술한 예와 달리, 복호화 장치의 스캔 패턴 선택부(93)는 부호화 장치로부터 제공된 스캔 패턴 선택 정보를 수신하거나 부호화 장치가 저장해둔 스캔 패턴 선택 정보를 읽어들여 이를 기초로 스캔 패턴 선택 정보를 출력하도록 구성하는 것도 가능하다.On the other hand, unlike the above-described example, the scan pattern selection unit 93 of the decoding apparatus receives scan pattern selection information provided from the encoding apparatus or reads scan pattern selection information stored by the encoding apparatus and based on the scan pattern selection information stored therein. It can also be configured to output.

전술한 부호화 방법 및 복호화 방법은 다차원 데이터에 그대로 적용할 수 있다.The above-described encoding method and decoding method can be applied to multidimensional data as it is.

나아가, 전술한 부호화 방법 및 복호화 방법은 컴퓨터 프로그램으로 작성 가능하다. 상기 프로그램을 구성하는 코드들 및 코드 세그먼트들은 당해 분야의 컴퓨터 프로그래머에 의하여 용이하게 추론될 수 있다. 또한, 상기 프로그램은 컴퓨터가 읽을 수 있는 정보저장매체(computer readable medium)에 저장되고, 컴퓨터에 의하여 읽혀지고 실행됨으로써 부호화 방법 및 복호화 방법을 구현한다. 상기 정보저장매체는 자기 기록매체, 광 기록매체, 및 캐리어 웨이브 매체를 포함한다.Furthermore, the above-described encoding method and decoding method can be created by a computer program. Codes and code segments constituting the program can be easily inferred by a computer programmer in the art. In addition, the program is stored in a computer readable medium, and read and executed by a computer to implement an encoding method and a decoding method. The information storage medium includes a magnetic recording medium, an optical recording medium, and a carrier wave medium.

전술한 바와 같이, 본 발명에 따르면 다양한 특성의 영상 데이터에 대해 보다 효율적으로 부호화 및 복호화를 수행할 수 있다. 특히, 비월 주사 영상 프레임 구조를 갖는 영상 데이터에 대해서도 보다 효율적인 부호화 및 복호화가 가능하다. 나아가, 움직임이 많은 영상 및 수직 방향으로 변화가 심한 영상에 대해서도 그 효율이 높아진다.As described above, according to the present invention, encoding and decoding can be performed more efficiently on image data having various characteristics. In particular, it is possible to more efficiently encode and decode video data having an interlaced scanning video frame structure. Furthermore, the efficiency is also increased for images with a lot of motion and images with a large change in the vertical direction.

본 발명의 이용이 예상되는 향후 주요 영역은 영상전화 류의 실시간 대화형 응용, 이동망 상에서의 오디오/비디오 통신, 인터넷상의 비디오 응용서비스, 실시간 수화(sign language) 및 lip-reading 통신용 비디오 전송, 주문형 비디오 서비스를 위한 비디오 저장 및 Retrieval, 비디오메일응용을 위한 비디오 저장 및 전송응용, 이종망(heterogeneous network)상의 다지점 통신, 디지털 방송 등으로, 본 발명의 활용범위는 매우 다양하다.In the future, the main areas for which the present invention is expected to be used are real-time interactive applications of video telephony, audio / video communication in mobile networks, video application services on the Internet, video transmission for real-time sign language and lip-reading communication, and video on demand. Video storage and retrieval for services, video storage and transmission applications for videomail applications, multi-point communication over heterogeneous networks, digital broadcasting, etc., the scope of application of the present invention is very diverse.

Claims (21)

영상 데이터를 부호화하는 방법에 있어서,In a method of encoding video data, (a) 상기 영상 데이터를 제1 소스 부호화하여 N×M 데이터를 생성하는 단계;(a) first N-M encoding the image data to generate N × M data; (c) 복수개의 스캔 패턴들 중 선택된 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하는 단계; 및(c) scanning the N × M data using a selected scan pattern among a plurality of scan patterns; And (d) 상기 스캐닝된 데이터를 제2 소스 부호화하는 단계를 포함하며,(d) second source encoding the scanned data, 상기 스캔 패턴은 상기 N×M 데이터의 픽쳐 포맷에 기초하여 선택되는 것을 특징으로 하는 부호화 방법.And the scan pattern is selected based on a picture format of the N × M data. 제1항에 있어서,The method of claim 1, 상기 (a)단계는Step (a) is (a1) 상기 영상 데이터를 변환하는 단계; 및(a1) converting the image data; And (a2) 상기 변환된 영상 데이터를 양자화하여 상기 N×M 데이터를 생성하는 단계를 포함하는 것을 특징으로 하는 부호화 방법.and (a2) quantizing the transformed image data to generate the N × M data. 제1항에 있어서,The method of claim 1, 상기 픽쳐 포맷은 비월 주사 필드 포맷 또는 순차 주사 필드 포맷인 것을 특징으로 하는 부호화 방법.And the picture format is an interlaced scan field format or a sequential scan field format. 영상 데이터를 복호화하는 방법에 있어서,In the method for decoding video data, (a) 복수개의 스캔 패턴들 중 하나의 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 생성하는 단계;(a) generating scan pattern selection information for selecting one of the plurality of scan patterns; (b) 가변장 복호화된 상기 영상 데이터를 상기 스캔 패턴 선택 정보를 기초로 선택된 적어도 하나의 스캔 패턴을 사용하여 N×M 데이터로 역스캐닝하는 단계; 및(b) reverse scanning the variable length decoded image data into N × M data using at least one scan pattern selected based on the scan pattern selection information; And (c) 상기 N×M 데이터를 소스 복호화하는 단계를 포함하며,(c) source decoding the N × M data, 상기 스캔 패턴 선택 정보는 상기 N×M 데이터의 픽쳐 포맷에 기초하여 생성되는 것을 특징으로 하는 복호화 방법.And the scan pattern selection information is generated based on a picture format of the N × M data. 제4항에 있어서,The method of claim 4, wherein 상기 픽쳐 포맷은 비월 주사 필드 포맷 또는 순차 주사 필드 포맷인 것을 특징으로 하는 복호화 방법.Wherein the picture format is an interlaced scan field format or a sequential scan field format. 제4항에 있어서, 상기 스캔 패턴 선택 정보는 상기 픽처 포맷이 비월주사 필드 포맷인 경우, 상기 스캔 패턴 선택 정보는 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 스캐닝하는 스캔 패턴을 선택하는 정보임을 특징으로 하는 복호화 방법.The method of claim 4, wherein the scan pattern selection information is information for selecting a scan pattern that scans a horizontal high frequency component value relatively earlier than a vertical high frequency component value when the picture format is an interlaced field format. Decoding method characterized in that. 제4항에 있어서, 상기 스캔 패턴 선택 정보는 상기 픽처 포맷이 비월주사 필드 포맷 또는 순차주사 필드 포맷인 경우, 상기 스캔 패턴 선택 정보는 수직 주파수 성분값과 수평 주파수 성분값을 균등한 순서로 스캐닝하는 스캔 패턴을 선택하는 정보임을 특징으로 하는 복호화 방법.The method of claim 4, wherein the scan pattern selection information is configured to scan vertical frequency component values and horizontal frequency component values in an equal order when the picture format is an interlaced field format or a sequential scan field format. Decoding method characterized in that the information to select a scan pattern. 제4항에 있어서, 상기 (c)단계는The method of claim 4, wherein step (c) (c1) 상기 N×M 데이터를 역양자화하는 단계; 및(c1) inverse quantization of the N × M data; And (c2) 상기 역양자화된 N×M 데이터를 변환 복호화하는 단계를 포함하는 것을 특징으로 하는 복호화 방법.(c2) transform-decoding the dequantized N × M data. 영상 데이터를 복호화하는 방법에 있어서,In the method for decoding video data, (a) 상기 영상 데이터를 가변장 복호화하는 단계;variable length decoding the image data; (b) 상기 가변장 복호화된 영상 데이터를 복수개의 스캔 패턴들 중 선택된 적어도 하나의 스캔 패턴을 이용하여 역스캐닝하여 N×M 데이터를 생성하는 단계; 및(b) inversely scanning the variable length decoded image data using at least one scan pattern selected from a plurality of scan patterns to generate N × M data; And (c) 상기 N×M 데이터를 소스 복호화하는 단계를 포함하며,(c) source decoding the N × M data, 상기 적어도 하나의 스캔 패턴은 상기 N×M 데이터의 픽쳐 포맷에 기초하여 복수개의 스캔 패턴들 중에서 선택되는 것을 특징으로 하는 복호화 방법.And the at least one scan pattern is selected from among a plurality of scan patterns based on a picture format of the N × M data. 제9항에 있어서,The method of claim 9, 상기 픽쳐 포맷은 비월 주사 필드 포맷 또는 순차 주사 필드 포맷인 것을 특 징으로 하는 복호화 방법.And the picture format is an interlaced scan field format or a sequential scan field format. 영상 데이터를 복호화하는 방법에 있어서,In the method for decoding video data, (a) 상기 영상 데이터를 가변장 복호화하여 심벌 데이터를 얻는 단계;(a) variable length decoding the image data to obtain symbol data; (b) 상기 심벌 데이터로부터 변환 계수값들을 얻는 단계;(b) obtaining transform coefficient values from the symbol data; (c) 복수개의 스캔 패턴들 중 소정 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 생성하는 단계;(c) generating scan pattern selection information for selecting a predetermined scan pattern among the plurality of scan patterns; (d) 상기 변환 계수값들을 생성된 스캔 패턴 선택 정보에 따른 스캔 패턴을 사용하여 N×M 데이터로 역스캐닝하는 단계; 및(d) reverse scanning the transform coefficient values into N × M data using a scan pattern according to the generated scan pattern selection information; And (e) 상기 역스캐닝된 데이터를 소스 복호화하는 단계를 포함하며,(e) source decoding the inversely scanned data; 상기 스캔 패턴 선택 정보는 상기 N×M 데이터의 픽쳐 포맷에 기초하여 생성되는 것을 특징으로 하는 복호화 방법.And the scan pattern selection information is generated based on a picture format of the N × M data. 제11항에 있어서,The method of claim 11, 상기 (c)단계는Step (c) is (c1) 상기 N×M 데이터의 픽처 포맷을 분석하는 단계; 및(c1) analyzing a picture format of the N × M data; And (c21) 상기 픽쳐 포맷이 비월주사 필드 포맷인 경우 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 스캐닝하는 스캔 패턴을 선택하는 상기 스캔 패턴 선택 정보를 생성하는 단계를 포함하는 것을 특징으로 하는 복호화 방법.and (c21) generating the scan pattern selection information for selecting a scan pattern that scans a horizontal high frequency component value relatively earlier than a vertical high frequency component value when the picture format is an interlaced field format. Way. 제11항에 있어서,The method of claim 11, 상기 (c)단계는Step (c) is (c1) 상기 수신된 N×M 데이터의 픽처 포맷을 분석하는 단계; 및(c1) analyzing a picture format of the received N × M data; And (c22) 상기 픽쳐 포맷이 비월주사 필드 포맷 또는 순차주사 필드 포맷인 경우 수직 주파수 성분값과 수평 주파수 성분값을 균등한 순서로 스캐닝하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 생성하는 단계를 포함하는 것을 특징으로 하는 복호화 방법.(c22) generating scan pattern selection information for selecting a scan pattern for scanning the vertical frequency component value and the horizontal frequency component value in equal order when the picture format is an interlaced field format or a sequential scan field format; Decoding method, characterized in that. 영상 데이터를 부호화하는 장치에 있어서,In the apparatus for encoding video data, 상기 영상 데이터를 제1 부호화하여 N×M 데이터를 얻는 제1 부호화부;A first encoder which first encodes the image data to obtain N × M data; 복수개의 스캔 패턴들 중 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 제공하는 부호화 제어부; 및An encoding control unit providing scan pattern selection information for selecting a scan pattern among a plurality of scan patterns; And 상기 스캔 패턴 선택 정보에 따른 스캔 패턴을 이용하여 상기 N×M 데이터를 스캐닝하고, 상기 스캐닝된 NXM 데이터를 부호화하는 제2 부호화부를 포함하며,A second encoder which scans the N × M data using the scan pattern according to the scan pattern selection information, and encodes the scanned NXM data, 상기 스캔 패턴 선택 정보는 상기 N×M 데이터의 픽쳐 포맷에 기초하여 생성되는 것을 특징으로 하는 부호화 장치.And the scan pattern selection information is generated based on a picture format of the N × M data. 제14항에 있어서,The method of claim 14, 상기 픽쳐 포맷은 비월 주사 필드 포맷 또는 순차 주사 필드 포맷인 것을 특징으로 하는 부호화 장치.And the picture format is an interlaced scan field format or a sequential scan field format. 제14항에 있어서,The method of claim 14, 상기 부호화 제어부는The encoding control unit 상기 N×M 데이터가 비월주사 필드 포맷의 영상 데이터로부터 얻어진 경우 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 스캐닝하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하는 것을 특징으로 하는 부호화 장치.And scan pattern selection information for selecting a scan pattern that scans a horizontal high frequency component value relatively earlier than a vertical high frequency component value when the N × M data is obtained from image data in an interlaced scan field format. 제14항에 있어서,The method of claim 14, 상기 부호화 제어부는The encoding control unit 상기 N×M 데이터가 비월주사 필드 포맷 또는 순차주사 필드 포맷의 영상 데이터로부터 얻어진 경우, 수직 주파수 성분값과 수평 주파수 성분값을 균등한 순서로 스캐닝하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 제공하는 것을 특징으로 하는 부호화 장치.When the N × M data is obtained from image data in an interlaced field format or sequential scan field format, scan pattern selection information for selecting a scan pattern for scanning the vertical frequency component values and the horizontal frequency component values in equal order is provided. And an encoding device. 영상 데이터를 복호화하는 장치에 있어서,An apparatus for decoding video data, 상기 영상 데이터를 복호화하여 변환 계수값들을 생성하는 제2 복호화부;A second decoder which decodes the image data to generate transform coefficient values; 복수개의 스캔 패턴들 중 소정 스캔 패턴을 선택하기 위한 스캔 패턴 선택 정보를 생성하는 스캔 패턴 선택부; 및A scan pattern selection unit generating scan pattern selection information for selecting a predetermined scan pattern among a plurality of scan patterns; And 상기 변환 계수값들을 상기 생성된 스캔 패턴 선택 정보에 따른 스캔 패턴을 이용하여 N×M 데이터로 역스캐닝하는 역스캐닝부를 포함하며,A reverse scanning unit which reverse-scans the transform coefficient values into N × M data using the scan pattern according to the generated scan pattern selection information, 상기 스캔 패턴 선택 정보는 상기 N×M 데이터의 크기에 기초하여 생성되는 것을 특징으로 하는 복호화 장치.And the scan pattern selection information is generated based on the size of the N × M data. 제18항에 있어서,The method of claim 18, 상기 픽쳐 포맷은 비월 주사 필드 포맷 또는 순차 주사 필드 포맷인 것을 특징으로 하는 복호화 장치.And the picture format is an interlaced scan field format or a sequential scan field format. 제18항에 있어서,The method of claim 18, 상기 스캔 패턴 선택부는The scan pattern selector 상기 N×M 데이터의 픽처 포맷을 분석하고, 상기 분석 결과 상기 픽쳐 포맷이 비월주사 필드 포맷인 경우 수직 고주파 성분값보다 수평 고주파 성분값을 상대적으로 먼저 스캐닝하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 생성하는 것을 특징으로 하는 복호화 장치.Scan pattern selection information for analyzing a picture format of the N × M data, and selecting a scan pattern for scanning a horizontal high frequency component value relatively earlier than a vertical high frequency component value when the picture format is an interlaced field format. And a decoding device. 제18항에 있어서,The method of claim 18, 상기 스캔 패턴 선택부는The scan pattern selector 상기 N×M 데이터의 픽처 포맷을 분석하고, 상기 분석 결과 비월주사 필드 포맷 또는 순차주사 필드 포맷인 경우 수직 주파수 성분값과 수평 주파수 성분값을 균등한 순서로 스캐닝하는 스캔 패턴을 선택하는 스캔 패턴 선택 정보를 생성하는 것을 특징으로 하는 복호화 장치.Scan pattern selection for analyzing the picture format of the N × M data and selecting a scan pattern for equally scanning the vertical frequency component value and the horizontal frequency component value in the case of the interlaced field format or the progressive scan field format as a result of the analysis. Decoding apparatus characterized by generating information.
KR1020070059520A 2007-06-18 2007-06-18 Coding and decoding method and apparatus using plural scanning patterns KR100813989B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070059520A KR100813989B1 (en) 2007-06-18 2007-06-18 Coding and decoding method and apparatus using plural scanning patterns

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070059520A KR100813989B1 (en) 2007-06-18 2007-06-18 Coding and decoding method and apparatus using plural scanning patterns

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020020041797A Division KR100846778B1 (en) 2002-07-06 2002-07-16 Coding and decoding method and apparatus using plural scanning patterns

Publications (2)

Publication Number Publication Date
KR20070074517A KR20070074517A (en) 2007-07-12
KR100813989B1 true KR100813989B1 (en) 2008-03-14

Family

ID=38508633

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070059520A KR100813989B1 (en) 2007-06-18 2007-06-18 Coding and decoding method and apparatus using plural scanning patterns

Country Status (1)

Country Link
KR (1) KR100813989B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000011096A (en) * 1997-03-17 2000-02-25 다니구찌 이찌로 Image encoder, image decoder, image encoding method, image decoding method and image encoding/decoding system
KR20010089626A (en) * 1998-01-23 2001-10-06 마츠시타 덴끼 산교 가부시키가이샤 Image transmission method, image data arrangement, and image data arranging method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000011096A (en) * 1997-03-17 2000-02-25 다니구찌 이찌로 Image encoder, image decoder, image encoding method, image decoding method and image encoding/decoding system
KR20010089626A (en) * 1998-01-23 2001-10-06 마츠시타 덴끼 산교 가부시키가이샤 Image transmission method, image data arrangement, and image data arranging method

Also Published As

Publication number Publication date
KR20070074517A (en) 2007-07-12

Similar Documents

Publication Publication Date Title
KR100846778B1 (en) Coding and decoding method and apparatus using plural scanning patterns
US10250885B2 (en) System and method for intracoding video data
KR100767557B1 (en) Moving picture coding apparatus and moving picture decoding apparatus
KR100468844B1 (en) Optimal scanning method for transform coefficients in image and video coding/decoding
RU2582579C2 (en) Signalling quantisation matrices for video coding
EP1649697B1 (en) Intra coding video data apparatuses
KR100732358B1 (en) Video encoding method, video decoding method, video encoding program, video decoding program, video encoding apparatus, and video decoding apparatus
TW201342920A (en) Transform unit partitioning for chroma components in video coding
KR100264711B1 (en) Coding and decoding apparatus with motion compensation
CN109155852A (en) Gathered using variable interior prediction direction and carries out interior coding and decoding
WO2013145021A1 (en) Image decoding method and image decoding apparatus
JP3518733B2 (en) Object-based video signal encoding / decoding apparatus and method
JP2015109695A (en) Moving image encoder and moving image decoder
EP1841235A1 (en) Video compression by adaptive 2D transformation in spatial and temporal direction
CN113994680A (en) Independent CABAC for sub-portions of pictures
JP2014078977A (en) Moving image decoder, moving image decoding method and program
US7426311B1 (en) Object-based coding and decoding apparatuses and methods for image signals
KR100813989B1 (en) Coding and decoding method and apparatus using plural scanning patterns
KR100775019B1 (en) Coding and decoding method and apparatus using plural scanning patterns
JP2013070419A (en) Video encoding device and video decoding device
EP1843595A2 (en) Coding and decoding method and apparatus using plural scanning patterns
JP2014042332A (en) Moving image encoding device and moving image decoding device
US20230141312A1 (en) Transformed coefficient ordering for entropy coding
JP4828630B2 (en) Video decoding method
EP1750452B1 (en) Apparatus for intra coding video data

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
A302 Request for accelerated 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: 20130227

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20140227

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20150226

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20160226

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20170224

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20180227

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20190227

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20200227

Year of fee payment: 13